Aireplay-ng
Z AirDump WiKi
Obsah |
[editovat] Specifikace
Aireplay-ng je injektor data framů. Primární funkcí aplikace je generování trafiku pro pozdejší použití v aircrack-ng pro crack WEP a WPA klíčů. Aireplay-ng je nástupce staršího Aireplay a implementuje řadu nových technik. Deautentikaci pro odpojení klienta z AP za ůčelem zisku WPA handshaku, fake autentifikace (falešná autentifikace), Interactive packet replay (Interaktivní procházení paketů), manuální ARP request injekce a ARP-request reinjekce. S nastrojem packetforge-ng je možné vytvořit libovolné rámce.
Většina ovládačů se neobejde bez patche (injekce paketů na běžných ovládačích možná není). Přečtěte si článek instalace ovládačů.
Tip! Použití aplikací pro hacking wifi je demonstrováno v AirDump.Cz Tutoriálech a článku hacking Wi-Fi
[editovat] Přepínače a funkce
Implementuje několik různých útoků:
- Útok 0: Deautentifikace
- Útok 1: Falešná autentifikace
- Útok 2: Interaktivní prehravani paketu
- Útok 3: ARP požadavek replay útok
- Útok 4: KoreK chopchop útok
- Útok 5: Fragmentační útok
- Útok 9: Test injekce
[editovat] Použití
Tato část je souhrn a neukazuje všechny možnosti aplikace. Pro detaily se podívejte do man.
Použití:
aireplay-ng <volba> <replay rozhraní>
Nejbežnejší volbou je "-b" pro označení specifického Access Pointu. Typické použití přepínače "-b" je pouze jednou z možností. Pro každý útok (mimo deautentifikace a falešné autentifikace) používejte tyto filtry
-b bssid : MAC adresa, Access Point -d dmac : MAC adresa cíl -s smac : MAC adresa zdroj -m len : minimální délka paketu -n len : maximální délka paketu -u typ : frame kontrola, typ pole -v subt : frame kontrola, subtyp pole -t tods : frame kontrola, do DS bit -f fromds : frame kontrola, Z DS bit -w iswep : frame kontrola, WEP bit
Když přehrávate (injektujete) pakety aplikujte následující volby a mějte na paměti, žené každá volba je relevantní pro každý typ útoku. Dokumentace ku každému útoku uvádí příklady relevantních voleb.
Replay možnosti:
-x nbpps : pocet paketu za sekundu -p fctrl : nastav kontrolu frame (hex) -a bssid : nastav Access Point MAC adresa -c dmac : nastav Cil MAC adresa -h smac : nastav MAC adresu zdroje -e essid : falesna autent : nastav cilove AP SSID -j : utok opakovani arp : injekce ZDS paketu -g value : zmen ring buffer size (default: 8) -k IP : nastav cilovou IP ve fragmentech -l IP : nastav zdrojovou IP ve fragmentech -o npckts : pocet paketu na burst (-1) -q sec : sekund mezi dozaem keep-alives (-1) -y prga : proud klicu pro autent sdilenym klicem
Pro prehravání lze získat pakety ze dvou zdrojů. První je aktuaální proud paketů z vaší bazdrátové karty. Druhý může být ze souboru pcap. Standardní pcap formát (packet CAPture, asociace http://tcpdump.org libpcap knihovna), je respektován většinou komerčních a open-source analytických nástrojů. Čtení ze souboru je často prohlížená vlastnost aireplay-ng. Umožňuje číst pakety z jiných relací nebo znovu použit vygenrované pcap soubory.
Možnosti zdrojů:
-i iface : záznam paketů z tohoto rozhraní -r file : extrahuj data pakety z tohoto souboru
Ne každá volba je aplikovatelná (v závislosti na použitém módu). Specifikace módu ve kterém bude program operovat.
Módy útoku (čísla lze používat i nadále):
--deauth count : deautentifikuje 1 nebo vsechny stanice (-0) --fakeauth delay : falesna autentifikace s AP (-1) --interactive : interaktivni vyber framu (-2) --arpreplay : standardni opakovani ARP-dotazu(-3) --chopchop : desifruje/chopchopuje WEP paket (-4) --fragment : generuje validni proud klicu (-5) --test : test injekce (-9)
[editovat] Fragmentace vs. Chopchop
Rozdíl mezi fragmentací a útokem ChopChop
Fragmentace
Pros
- Typicky obsahne plnou delku paketu 1500 bytu xor. To znamena, ze muzes hezky subsekvencne vytvaret paket o ruzne velikosti. Even in cases where less then 1500 bytes are collected, there is sufficient to create ARP requests.
- May work where chopchop does not.
- Is extremely fast. It yields the xor stream extremely quickly when successful.
Cons
- Need more information to launch it - IE IP adresa info. Quite often this can be guessed. Better still, aireplay-ng assumes source and destination IPs of 255.255.255.255 if nothing is specified. This will work successfully on most if not all APs. So this is a very limited con.
- Setup to execute the attack is more subject to the device drivers. For example, Atheros does not generate the correct pakety unless the wireless card is set to the mac adresa you are spoofing.
- You need to be physically closer to the access point since if any pakety are lost then the attack fails.
- The attack will fail on access points which do not properly handle fragmented pakety.
Chopchop
Pros
- Muze fungovat i kdyz nefunguje fragmentace.
- Neni potreba zadne informace o IP.
Cons
- Nelze pouzit proti vsem AP.
- Maximum pocet xor bitu je limitovan do delky paketu kterou chopchopujes. Although in theory you could obtain 1500 bytes of the xor stream, in practice, you rarely if ever see 1500 byte wifi paketu.
- Much slower then the fragmentation attack
[editovat] Tipy na použití
[editovat] Optimalizace rychlosti injekce
Optimalizace rychlosti injekce je vic umenim nez vedou. Pro zacatek pouzivej veci "tak jak jsou". Muzes pouzit parametr "-x" pro zmenu rychlosti injekce. Prekvapive snizovani teto hodnoty muze obcas zvysit celkovy vykon.
You may try to playing with the rate "iwconfig wlan0 rate 11M". Depending on the driver and how you started the card in monitor mode, it is typically 1 or 11MBit by default. If you are close enough set it up to a higher value, like 54M, this way you'll get more pakety per second. If you are too far away and the pakety don't travel that far, try to lowering it to (for example) 1M.
[editovat] Rešení problému
Poznámky se vztahujou na všechny módy aireplay-ng.
[editovat] Madwifi-ng žádne další VAPy
Ujistěte se, ze vam v systemu nebezi zadne dalsi VAPy. Pokud tak neucinite, mohou nastat komplikace. Obzvlastpokud vytvarite novy VAP v monitor modu a v systemu vam bezi jiny VAP v managed modu.
Nejdriv zastav ath0 a pak spust wifi0:
airmon-ng stop ath0 airmon-ng start wifi0
nebo
wlanconfig ath0 destroy wlanconfig ath create wlandev wifi0 wlanmode monitor
[editovat] Aireplay-ng končí bez výsledku
You enter the command and the command appears to hang and there is no output.\\
This is typically caused by being on the wrong channel compared to the access point. Another potential cause of this problem is when you are using an old version of firmware on prism2 chipset. Be sure you are running firmware 1.7.4 or above to resolve this. See Prism card for more details. Firmware upgrade instruction can be found here.
As well, if you have another instance of aireplay-ng running in background mode, this can cause the second to hang if the options conflict.
[editovat] Pomalá injekce, "rtc: lost some interrupts at 1024Hz"
Symptoms: The injection works but very slowly, at around 30 pakety per second (pps). Whenever you start injecting pakety, you get the following or similar kernel message:
"rtc: lost some interrupts at 1024Hz"
This message is then repeated thousands of times. If you start a second instance of aireplay, then the injection would increases to around 300 pps.
There is no solution at this point in time, just the workaround to start a second instance. See this forum thread.
[editovat] Pomalá injekce - Souhrn
Being too close to the AP can dramatically reduce the injection rate. This is caused by packet corruption and/or overloading the the AP. See this thread for an example of the impact of being too close to the AP.
[editovat] Interface MAC doesn't match the specified MAC
After entering an aireplay-ng command similar to:
aireplay-ng -1 0 -e horcer -a 00:50:18:4C:A5:02 -h 00:13:A7:12:3C:5B ath0
You get a message similar to:
The interface MAC (06:13:F7:12:23:4A) doesn't match the specified MAC (-h).
ifconfig ath1 hw ether 00:13:A7:12:3C:5B
This occurs when the source MAC adresa for injection (specified by -h) is different then your card MAC adresa. In the case above, the injection MACof 00:13:A7:12:3C:5B does not match the card MAC of 06:13:F7:12:23:4A. In some cases, but not all, this will cause injection to fail. That is why it gives you this warning. So it is always recommended that your injection MAC match the card MAC adresa.
Detailed instructions on changing the card MAC adresa can be found in the FAQ: [do I change my card's MAC adresa ?].
[editovat] Skryté SSIDs "<length: ?>"
Many aireplay-ng commands require knowing the SSID. You will sometimes see "<length: ?>" as the SSID on the airodump-ng display. This means the SSID is hidden. The "?" is normally the length of the SSID. For example, if the SSID was "test123" then it would show up as "<length: 7>" where 7 is the number of characters. When the length is 0 or 1, it means the AP does not reveal the actual length and the real length could be any value.
Pro ziskani schovane SSID jsou tyto moznosti:
- Wait for a wireless client to associate with the AP. When this happens, airodump-ng will capture and display the SSID.
- Deauthenticate an existing wireless client to force it to associate again. The point above will apply.
- Use a tool like mdk3 to bruteforce the SSID.
[editovat] Mezery a úvozovky v názvu Access Pointu
Jak používat ESSID s mezerou v názvu. Pro postup se podívejte se na Aircrack-ng.
[editovat] Souhrn
Nezapomeňte:
- Vetšina módu aireplay-ng vyžaduje asociaci MAC adresy s access pointem. Vyjímaje disasociaci klienta, test injekce a falešnou autentifikaci (fake auth). Musite provest falesnou autentifikaci pro asocici vasi MAC adresy s acess pointem nebo pouzit MAC adresu klienta asociovaneho s AP. Nuespech u zminovanych krocich znamena poue jedno * access point nebude akceptovat vase pakety. Look for deauthentication or disassociation messages during injection which indicate you are not associated with the access point. aireplay-ng will typically indicate this or it can be done using tcpdump: "tcpdump -n -e -s0 -vvv -i <interface name>". You can filter it by piping it to grep with something like `tcpdump -n -e -s0 -vvv -i ath0 | grep -E "DeAuth|assoc"'.
- The wireless card driver is properly patched and installed. Use the injection test to confirm your card can inject.
- You are physically close enough to the access point. You can confirm that you can communicate with the specific AP by following these instructions.
- The wireless card is in monitor mode. Use "iwconfig" to confirm this.
- The card is configured on the same channel as the access point. Use "iwconfig" to confirm this.
- Make sure you are using a real MAC adresa. See discussion in setting MAC adresa).
- Some access points are programmed to only accept connections from specific MAC adresaes. In this case you will need to obtain a valid MAC adresa by observation using airodump-ng and use that particular MAC adresa. Do not do a fake authentication for a specific MAC adresa if the client is active on the AP. MAC access kontrola lists do not apply to deauthentication. See the MAC access kontrola troubleshooting tip here.
- The BSSID and ESSID (-a / -e options) are correct.
- If Prism2, make sure the firmware was updated.
- Ensure your are running the current stable version. Some options are not available in older versions of the program. As well, the current stable version contains many bug fixes.
- It does not hurt to check the Trac System to see if your "problem" is actually a known bug in the current stable version. Many times the current development version has fixes to bugs within the current stable version.
