Airbase-ng

Aus Wardriving-Forum.de Enzyklopädie

Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

[Bearbeiten] Anwendung

  airbase-ng <options> <replay interface>

Optionen

 * -a bssid : setzt Access Point MAC Adresse
 * -i iface : emfpange Pakete von diesem Interface
 * -w WEP key : benutzt diesen WEP-Schlüssel um Pakete zu ver/entschlüsselen
 * -h MAC : Ursprungs MAC für MITM mode
 * -f disallow : verbiete spezifizierte Client MACs (Standart: allow (erlaubt))
 * -W 0|1 : setzt [nicht] WEP flag in beacons 0|1 (Standart: auto)
 * -q : schließen(zeige keine Statistiken)
 * -v : wortreich (gibt mehr Meldunge) (lang -'-verbose)
 * -M : M-I-T-M zwischen [spezifizierten] Slients und BSSIDs
 * -A : Ad-Hoc Mode (erlaubt andern Clients sich als peer zu verbinden) (lang -'-ad-hoc)
 * -Y in|out|both : external packet processing
 * -c channel : setzt den Kanal auf dem der AP arbeitet
 * -X : verborgene ESSID (lang -'-hidden)
 * -s : erzwinge Shared-Key Authorisation
 * -S : set shared key challenge length (default: 128)
 * -L : Caffe-Latte Atacke (lang  -'-caffe-latte)
 * -N : Hirte Atacke (cfrag Atacke), erstellt arp request gegen WEP Clients (lang --cfrag)
 * -x n : Anzahl der Pakete in der Sekunde (Standart: 100)
 * -z type : setzt WPA1 tags. 1=WEP40 2=TKIP 3=WRAP 4=CCMP 5=WEP104
 * -Z type : das selbe wie -z, aber für WPA2
 * -V type : fake EAPOL 1=MD5 2=SHA1 3=auto

Filter Optionen:

 * -'-bssid <MAC> : BSSID die benuzt werden soll (kurz -b)
 * -'-bssids <file> : liest eine Liste von BSSIDs aus der Datei (kurz -B)
 * -'-client <MAC> : MAC vom Client der akzeptiert wird (kurz -d)
 * -'-clients <file> : liest eine Liste mit Clienet MACs aus der Datei (kurz -D)
 * -'-essid <ESSID> : gibt eine einzelne ESSID an (kurz -e)
 * -'-essids <file> : liest eine Liste von ESSIDs aus der Datei(kurz -E)

Hilfe:

 * -'-help: Zeigt die Hilfe (kurz -H)  

Falls er meckert und ein "error opening tap device:No such..." versucht es vorher mal mit

  modprobe tun [interface]


[Bearbeiten] -a BSSID Definition

Wenn die BSSID nicht mit "-a <BSSID>" gesetzt wurde, wird die aktuelle MAC des aktuellen Adapters (ath0;ath1...) verwendet.


[Bearbeiten] -i iface

Wenn ein interface gesetzt wird, werden die Pakete ebenfalls aufgefangen und verarbeitet (in addition to replay interface).

[Bearbeiten] -w WEP Key

Wenn WEP als Verschlüsselung benutzt werden sollte, dann definiert "-w <WEP key> den Ver-/Entschlüsselungskey. Dies genügt, damit airbase-ng alle anderen Werte selbst setzt.

Wenn der softAP WEP-Verschlüsselung benutzt, dann kann der Client sich zwischen Open-System-Authentication oder Shared-Key-Authentication entscheiden. Beide Authentisierungsmethoden werden von airbase-ng unterstützt. Aber um einen Keystream zu bekommen, kann der Benutzer den Client dazu zwingen Shared-Key-Authentication zu benutzen. "-s" zwingt zu einer Shared-Key-Authentication und "-S <len>" definiert die Herausforderungslänge.

[Bearbeiten] -h MAC

Ursprungs MAC-Adresse für die "man-in-the-middle attack". "-M" muss auch angegeben werden.

[Bearbeiten] -f allow/disallow

Wenn diese Option nicht gesetzt ist, werden alle Clients, die mit der Option -d und -D definiert worden sind akzeptiert werden. Im Falle, dass die Option "-f disallow" gesetzt wird, werden alle Clients, die mit der -d und -D Option definiert wurden abgeleht statt akzeptiert.

[Bearbeiten] -W WEP Flag

Diese Option setzt die WEP beacon flag fest. Die Clients werden sich nur zu dem AP Verbinden, der die selbe flag besitzen wie sie selbst. Also WEP zu WEP und open zu open. Die "auto" Option erlaubt es airbase-ng automatisch die flag zu setzen je nach den anderen Optionen, die noch gesetzt wurden. Zum Beispiel, wenn man mit -w einen WEP-Key setzt dann würde airbase-ng die beacon flag automatisch auf WEP setzen.

Eine andere Situation in der "auto" benutzt werden kann, ist wenn man mit Clients zu tun hat, die ihren Verbindungstyp automatisch wählen. Aber diese sind eher selten. Im Allgemeinen ist es das Beste, den Wert je nach Typ der Clients mit denen man es zu tun hat zu setzen.

[Bearbeiten] -M MITM Attack

Diese Option ist noch nicht implementiert. Sie ist eine man-in-the-middle Attacke zwischen beliebigen Clients und BSSIDs.

[Bearbeiten] -A Ad-Hoc Mode

airbase-ng fungiert als ad-hoc Client anstatt als Access Point.

In ad-hoc mode airbase-ng also sends beacons, but doesn't need any authentication/association. It can be activated by using "-A". The soft AP will adjust all flags needed to simulate a station in ad-hoc mode automatically and generate a random MAC, which is used as CELL MAC instead of the BSSID. This can be overwritten by the "-a <BSSID>" tag. The interface MAC will then be used as source mac, which can be changed with "-h <sourceMAC>".

[Bearbeiten] -Y External Processing

The parameter "-Y" enables the "external processing" Mode. This creates a second interface "atX", which is used to replay/modify/drop or inject packets at will. This interface must also be brought up with ifconfig and an external tool is needed to create a loop on that interface.

The packet structure is rather simple: the ethernet header (14 bytes) is ignored and right after that follows the complete ieee80211 frame the same way it is going to be processed by airbase-ng (for incoming packets) or before the packets will be sent out of the wireless card (outgoing packets). This mode intercepts all data packets and loops them through an external application, which decides what happens with them. The MAC and IP of the second tap interface doesn't matter, as real ethernet frames on this interface are dropped dropped anyway.

There are 3 arguments for "-Y": "in", "out" and "both", which specify the direction of frames to loop through the external application. Obviously "in" redirects only incoming (through the wireless NIC) frames, while outgoing frames aren't touched. "out" does the opposite, it only loops outgoing packets and "both" sends all both directions through the second tap interface.

There is a small and simple example application to replay all frames on the second interface. The tool is called "replay.py" and is located in "./test". It's written in python, but the language doesn't matter. It uses pcapy to read the frames and scapy to possibly alter/show and reinject the frames. The tool as it is, simply replays all frames and prints a short summary of the received frames. The variable "packet" contains the complete ieee80211 packet, which can easily be dissected and modified using scapy.

This can be compared to ettercap filters, but is more powerful, as a real programming language can be used to build complex logic for filtering and packet customization. The downside on using python is, that it adds a delay of around 100ms and the cpu utilizations is rather large on a high speed network, but its perfect for a demonstration with only a few lines of code.

[Bearbeiten] -s erzwingt Shared Key Authentication

Wenn gesetzt zwingt es alle Clients die Shared-Key Authentivication zu verwenden.

Der Software-AP sendet auf die Aufforderung zur Open Aurhentivication "authentication method unsupported" wenn das Parameter "-s" gesetzt ist.

[Bearbeiten] -S Shared Key Challenge Length

"-S <len>" sets the challenge length, which can be anything from 16 to 1480. The default is 128 bytes. It is the number of bytes used in the random challenge. Since one tag can contain a maximum size of 255 bytes, any value above 255 creates several challenge tags until all specified bytes are written. Many clients ignore values different then 128 bytes so this option may not always work.

[Bearbeiten] -L Caffe Latte Attack

Airbase-ng also contains the new caffe-latte attack, which is also implemented in aireplay-ng as attack "-6". It can be used with "-L" or "--caffe-latte". This attack specifically works against clients, as it waits for a broadcast arp request, which happens to be a gratuitous arp. See [[1]] for an explaination of what a [arp] is. It then flips a few bits in the sender MAC and IP, corrects the ICV (crc32) value and sends it back to the client, where it came from. The point why this attack works in practice is, that at least windows sends gratuitous arps after a connection on layer 2 is established and a static ip is set, or dhcp fails and windows assigned an IP out of 169.254.X.X.

"-x <pps>" sets the number of packets per second to send when performing the caffe-latte attack. At the moment, this attack doesn't stop, it continuously sends arp requests. Airodump-ng is needed to capture the replys.

[Bearbeiten] -N Hirte Attack (Fragmentation Attack)

This attack listens for an ARP request or IP packet from the client. Once one is received, a small amount of PRGA is extracted and then used to create an ARP request packet targeted to the client. This ARP request is actually made of up of multiple packet fragments such that when received, the client will respond.

This attack works especially well against ad-hoc networks. As well it can be used against softAP clients and normal AP clients.