Classes

Common classes

  • IV
    • MAC
    • IV (3 bytes)
    • constructor: IV(WirelessPacket?)
    • constructor: IV(bytes [raw data])
    • isWeak
  • MACAddress
  • WirelessPacket?
    • constructor(bytes [raw data])
    • MAC source
    • MAC destination
    • other MACs
    • other flags (encryption, ...)
    • getPacket() -> return the packets ready to be sent by the interface
    • getIV()
    • packetType (needed): ARP/Spanning tree/...
  • SendReceive?: take care of sending the packet and reverse/add/remove bytes (in the packet) if needed (example: wlanng)

Airmon-ng

Interface

This class will take care of putting a card into monitor mode. I mean that it will contains some parts of iwpriv/iwconfig/ifconfig functions needed. It will be able to identify the interface type and also tell if monitoring/injection is possible with that interface. Detection will be easy thanks to the the iwpriv list:  http://tinyshell.be/aircrackng/forum/index.php?topic=943.0

Shared Memory

Class with a private constructor and a getInstance() that will take care of all packets. Packet writing to a file will be done by blocks, we won't open the file for each packet. To do that, we'll put each packet in a queue. We need to care about locking when adding a packet to the queue. When there will be enough packet received, for example 100-500, it will write it to a file. Of course, that value can be changed, for embedded devices for example.

Main

This class will take care of starting and stopping all threads and restart threads if they are dead. For each card to be put in monitor mode (and also for each link with another airmon-ng), there will be one thread and each card will call the shared memory to append its packet to the queue. There will also be one/more thread for the communication with airodump and aireplay (client connection).