AirPort mode Monitor en Mac OSX

Si volem fer una captura de trànsit amb el Mac hem de posar la tarja wifi en mode Monitor per poder capturar el trànsit.

Hem d’utilitzar la comanda del airport. És una opció no descrita en l’ajuda de la comanda.

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -h
Supported arguments:
 -c[<arg>] --channel=[<arg>]    Set arbitrary channel on the card
 -z        --disassociate       Disassociate from any network
 -I        --getinfo            Print current wireless status, e.g. signal info, BSSID, port type etc.
 -s[<arg>] --scan=[<arg>]       Perform a wireless broadcast scan.
				   Will perform a directed scan if the optional <arg> is provided
 -x        --xml                Print info as XML
 -P        --psk                Create PSK from specified pass phrase and SSID.
				   The following additional arguments must be specified with this command:
                                  --password=<arg>  Specify a WPA password
                                  --ssid=<arg>      Specify SSID when creating a PSK
 -h        --help               Show this help

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport <interfície> sniff <canal>
</canal></interfície>

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport en1 sniff 5

Això ens guardarà un fitxer tipus cap en el directori /tmp que podrem obrir amb el Wireshark per exemple.