NetStumbler.org Forums

Go Back   NetStumbler.org Forums > Software > Unix/Linux
Register Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old 04-09-2005   #1 (permalink)
johnmac99
Registered Member
 
johnmac99's Avatar
 
Join Date: Apr 2002
Posts: 6
aireplay 2.1 arp capture / flood tutorial

My principle interest is in using the aireplay code from the aircrack tools to send an ARP flood that will generate enough IV packets for collection by airodump and cracking by aircrack or another similar program. Aireplay beta 2.2 supports single-NIC injection/monitor on prism2 (wlan-ng), atheros (madwifi) and prism54.

I did not see anything similar in the forums, please correct any areas where you think I have gone wrong. I used the following for this guide: aireplay mini-howto (included in the source code here http://www.cr0.net:8040/code/network/aireplay-2.2.tgz) and Christopher Devine's aircrack documentation here (http://www.cr0.net:8040/code/network/aircrack/)

This tutorial describes using airplay for "Attack 2: classic ARP-request resend" as described in the mini-howto attack number 2.

It is assumed that you already have a basic working knowlege of Linux and were able to patch your kernel and load the appropriate drivers. If have not accomplished these tasks, I suggest you try auditor (http://remote-exploit.org/).

You now need to capture arp traffic. You can use airodump, however, I prefer to use Kismet and use the .dump files -- for either of these tools you will have to put the wireless interface in monitoring mode prior to executing the tool. Once you have what you believe is a large enough dump file to have generated at least one arp request, you can examine it with Ethereal to determine if you have a arp from a particular BSSID that you are interested in (filter frame.pkt_len==68 and wlan.da==ff:ff:ff:ff:ff:ff). An easier option is to execute aireplay and let it tell you the BSSID of the ARP packets it has collected. Prior to running aireplay, you need to ensure your wireless card is properly configured. I personally use both a senao and linksys card with no problems. Run the following commands (subsitute wlan0, wlan1, etc as appropriate):

# iwpriv wlan0 hostapd 1
# iwpriv wlan0ap host_encrypt 1
# iwpriv wlan0ap host_decrypt 1
# iwconfig wlan0ap retry 1
# iwconfig wlan0ap mode Master
# iwconfig wlan0ap key 01:02:04:08:10
# iwconfig wlan0ap channel <channel of the AP that you are interested in cracking>
# ifconfig wlan0 hw ether <put a random MAC here, should follow this format ff:ff:ff:ff:ff:ff>
# ifconfig wlan0ap up

Now you are ready to run aireplay.

# aireplay wlan0ap replay.pcap <where replay.cap is the name of your airodump or kismet .dump file from the previous step>

The last line executes aireplay, it will parse the supplied log and will report whethr a suitable ARP packet was found. If one was not found, aireplay will report "got 0 poetnetial ARP requests", if aireplay it finds an ARP request, it will report the name of the BSSID and ask whether or not to use it. If the ARP packet BSSID matches that of the AP of interet (refer to kismet and airodump) then indicate "yes". Aireplay will begin to replay / retransmit the arp request to the AP, aireplay will also indicate that you should open another window and capture the replies with airodump. This will allow you to force the AP to rapidly generate traffic. Collect to your hearts desire and then attempt to crack the collected traffic using aircrack, weplab, airsnort, etc.

Please feel free to flame me if I have left out a pertinent piece of information. I will gladly correct this as required or answer any questions you may pose.

Last edited by johnmac99 : 04-22-2005 at 07:53 AM.
johnmac99 is offline   Reply With Quote
Old 04-24-2005   #2 (permalink)
MarkieUSA
Registered Member
 
Join Date: Jul 2002
Location: Raleigh, NC
Posts: 8
Question

Thanks for the guide, the Ethereal filter syntax is especially useful.

One question, does the client that the ARP was sniffed from need to remain associated with the AP while reinjecting.

Using two NICs on my AP, I have to disassociate after sniffing the ARP broadcast so that I can use that client to then do the injection with the second laptop being the IV collector, though I see encrypted traffic hugely increase, though the IVs are not unique and therefore useless (I'm seeing my injection and nothing back from the AP)
Can anyone verify if the client needs to remain or can the replay be performed on an AP without clients?
cheers.
__________________
Doc, It hurts when IP, and last week I pinged myself and I got a loop back.
MarkieUSA is offline   Reply With Quote
Old 04-25-2005   #3 (permalink)
johnmac99
Registered Member
 
johnmac99's Avatar
 
Join Date: Apr 2002
Posts: 6
Good question and one I have also had problems with, perhaps someone else can answer this. I thought this might be due to the fact that non-arp traffic was being re-injected.

[quote=MarkieUSA]I see encrypted traffic hugely increase, though the IVs are not unique and therefore useless (I'm seeing my injection and nothing back from the AP)
QUOTE]
johnmac99 is offline   Reply With Quote
Old 07-06-2005   #4 (permalink)
Mother
Too many secrets...
 
Mother's Avatar
 
Join Date: Apr 2002
Location: Barcelona, Spain
Posts: 204
The answer is YES, my child...

Hi,

For the most part, the client needs to be associated to the AP in order to get a reply to the injected ARP packets.

While testing aireplay on a WAP54G, I noticed that the client was being flooded by aireplay, and wasn't aswering the power save polls from the AP, and thus after some 2-3 minutes, the AP deauthenticated the station (internally, there was no visible deauth packet sent). I would have to sniff from another box to see the entire exchange, maybe I'm missing the initial deauth packet.

When this happened, from then onwards the AP replied always with a deauth packet to every ARP packet injected, with the reason that a frame was received from an unassociated station. In airodump, the IV count stopped increasing.

I am now trying to get aireplay to send the flood at slower rates, to try and keep the client associated.

Regards,

Mother
__________________
Out of paper on drive C:

tech.am
Mother is offline   Reply With Quote
Old 07-06-2005   #5 (permalink)
G8tK33per
Asshole Emeritus
 
G8tK33per's Avatar
 
Join Date: May 2003
Location: S.E. VA.
Posts: 5,939
Quote:
Originally Posted by Mother
Hi,

For the most part, the client needs to be associated to the AP in order to get a reply to the injected ARP packets.

While testing aireplay on a WAP54G, I noticed that the client was being flooded by aireplay, and wasn't aswering the power save polls from the AP, and thus after some 2-3 minutes, the AP deauthenticated the station (internally, there was no visible deauth packet sent). I would have to sniff from another box to see the entire exchange, maybe I'm missing the initial deauth packet.

When this happened, from then onwards the AP replied always with a deauth packet to every ARP packet injected, with the reason that a frame was received from an unassociated station. In airodump, the IV count stopped increasing.

I am now trying to get aireplay to send the flood at slower rates, to try and keep the client associated.

Regards,

Mother
MOM!!

How ya' been?
__________________
"Benjamin is nobody's friend. If Benjamin were an ice cream flavor, he'd be pralines and dick."

Sons of Confederate Veterans
G8tK33per is offline   Reply With Quote
Old 07-06-2005   #6 (permalink)
Dutch
Humourless EuroMod.
 
Dutch's Avatar
 
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
Quote:
Originally Posted by Mother
Hi,

For the most part, the client needs to be associated to the AP in order to get a reply to the injected ARP packets.

While testing aireplay on a WAP54G, I noticed that the client was being flooded by aireplay, and wasn't aswering the power save polls from the AP, and thus after some 2-3 minutes, the AP deauthenticated the station (internally, there was no visible deauth packet sent). I would have to sniff from another box to see the entire exchange, maybe I'm missing the initial deauth packet.

When this happened, from then onwards the AP replied always with a deauth packet to every ARP packet injected, with the reason that a frame was received from an unassociated station. In airodump, the IV count stopped increasing.

I am now trying to get aireplay to send the flood at slower rates, to try and keep the client associated.

Regards,

Mother
-x param works with the -3 arp replay attack. Used -x 800 to get 49K IV's a minute on my test setup. Reduce the 800 as applicable in your case.

Dutch
__________________
All your answers are belong to Google. SEARCH DAMMIT!
Warning. Warning.
Low C8H10N4O2 level detected. Operator halted....
Dutch is offline   Reply With Quote
Old 07-12-2005   #7 (permalink)
MarkieUSA
Registered Member
 
Join Date: Jul 2002
Location: Raleigh, NC
Posts: 8
Quote:
Originally Posted by Dutch
-x param works with the -3 arp replay attack. Used -x 800 to get 49K IV's a minute on my test setup. Reduce the 800 as applicable in your case.

Dutch
I concur, the only time not specifying -x time delay is viable is when replaying an airforge deauth packet, and even then it is unecessary to "spray" the deauth if the client is close or you're using a directional antenna, -x 1 is effective enough when the client is in line of sight for deauth.

(of course a deauth being a good way to cause a WPA-PSK EAPOL four way handshake to re-occur on the current, sniffed main channel of the AP or a method used to kick pay as you go customers from public APs to grab the MAC and DHCP renew as their IP)
__________________
Doc, It hurts when IP, and last week I pinged myself and I got a loop back.
MarkieUSA is offline   Reply With Quote
Old 07-13-2005   #8 (permalink)
Mother
Too many secrets...
 
Mother's Avatar
 
Join Date: Apr 2002
Location: Barcelona, Spain
Posts: 204
LOL I've been under a rock for some time...seriously, work and new kids have kept me really busy. I take all is OK in stumblerland?

As for aireplay, beta6 is out and I'll be trying the new modes out, it looks quite promising and some favourable reports have been heard.

BTW I've worked out what was happening - the client is a Nokia 9500 phone (yes, it has wifi), and it was being DoS'd by the aireplay flood!!! What then happened is that the phone wasn't answering the AP's power-saving polls, and after a few unanswered ones it deauthenticated the client, thus dropping all further ARP packets. The only way to get the phone to work again was to remove and reinsert the battery. Ain't wireless fun?

Cheers,

Mother
__________________
Out of paper on drive C:

tech.am
Mother is offline   Reply With Quote
Old 07-13-2005   #9 (permalink)
devine
Emergence
 
Join Date: Jul 2004
Location: Paris
Posts: 389
Quote:
Originally Posted by Mother
BTW I've worked out what was happening - the client is a Nokia 9500 phone (yes, it has wifi), and it was being DoS'd by the aireplay flood!!!
Heh, I'm not that surprised

Also aireplay -1 before beta6 causes OpenBSD in master mode to crash -- that's what you call "secure by default"
devine is offline   Reply With Quote
Old 07-16-2005   #10 (permalink)
killa-berlin
Registered Member
 
Join Date: Jul 2005
Posts: 3
where to get airforge??

I need the airforge program to do the following:

'airforge <bssid> <dst mac> <packet-name>'

It should create a the file <packet-name> (normally 'deauth.cap').

I have the the packets 'aireplay2.2.tgz' and 'aircrack2.2.tgz' and everything runs fine. But I googled for 'airforge' and found at least nothing. Where can I get 'airforge'????

regards,
killa-berlin
killa-berlin is offline   Reply With Quote
Old 07-16-2005   #11 (permalink)
Dutch
Humourless EuroMod.
 
Dutch's Avatar
 
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
Quote:
Originally Posted by killa-berlin
I need the airforge program to do the following:

'airforge <bssid> <dst mac> <packet-name>'

It should create a the file <packet-name> (normally 'deauth.cap').

I have the the packets 'aireplay2.2.tgz' and 'aircrack2.2.tgz' and everything runs fine. But I googled for 'airforge' and found at least nothing. Where can I get 'airforge'????

regards,
killa-berlin
Nowhere.
It's "arpforge", not "airforge", and it is included in the aircrack 2.2 & aircrack 2.2betaX tarballs.

Dutch
__________________
All your answers are belong to Google. SEARCH DAMMIT!
Warning. Warning.
Low C8H10N4O2 level detected. Operator halted....
Dutch is offline   Reply With Quote
Old 07-16-2005   #12 (permalink)
killa-berlin
Registered Member
 
Join Date: Jul 2005
Posts: 3
Sorry but ...

... please see:
http://new.remote-exploit.org/index.php/Research

and also the WPA cracking tutorial on

http://new.remote-exploit.org/index.php/Tutorials

Thats what I want to test here on my local Wlan. The syntax
of arpforge is something different from the airforge-tool I am looking for.

Regards,
killa-berlin
killa-berlin is offline   Reply With Quote
Old 07-16-2005   #13 (permalink)
Dutch
Humourless EuroMod.
 
Dutch's Avatar
 
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
Quote:
Originally Posted by killa-berlin
... please see:
http://new.remote-exploit.org/index.php/Research

and also the WPA cracking tutorial on

http://new.remote-exploit.org/index.php/Tutorials

Thats what I want to test here on my local Wlan. The syntax
of arpforge is something different from the airforge-tool I am looking for.

Regards,
killa-berlin
Look in your tarballs. In aireplay beta 2.2 as well as in aircrack 2.2beta1 arpforge was named airforge. From aircrack 2.2beta2 it was renamed more appropriately to arpforge.

Dutch
__________________
All your answers are belong to Google. SEARCH DAMMIT!
Warning. Warning.
Low C8H10N4O2 level detected. Operator halted....

Last edited by Dutch : 07-16-2005 at 03:43 PM.
Dutch is offline   Reply With Quote
Old 07-16-2005   #14 (permalink)
killa-berlin
Registered Member
 
Join Date: Jul 2005
Posts: 3
Ok, ...

... I believe. THX anyway.
killa-berlin is offline   Reply With Quote
Old 07-17-2005   #15 (permalink)
devine
Emergence
 
Join Date: Jul 2004
Location: Paris
Posts: 389
About WPA cracking with an Atheros card:

I've noted that, in a G network, the handshake usually takes place in G mode. However, when using aireplay w/ attack -0 the card must be set in B mode, thus airodump won't capture G packets.

There's a workaround for it: start airodump on the proper channel, then start aireplay -0 1 -a [ap mac] ath0, it sends a deauth, then quickly press Ctrl-C and run "iwpriv ath0 mode 0". If you're fast enough you should catch a WPA handshake.

I've changed the aireplay -0 option in the current devel code: it specifies the deauth count (and not the delay anymore). So running "aireplay -0 3 ..." will send 256*3 deauth broadcast packets and then exit; each batch being separated by a 100ms delay. Thus, it's easier to capture a handshake by just running "aireplay -0 5 -a [ap mac] ath0; iwpriv ath0 mode 0".

Of course you can still perform a DoS attack by specifying -0 0, in this case aireplay will run until it's stopped by the user. You can use the -c option to target a specific wireless station instead of broadcast.
devine is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Google
 
Web NetStumbler.org

All times are GMT -7. The time now is 12:44 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 ©2007, Crawlability, Inc.


All messages express the views of the author and are for entertainment purposes only. Netstumbler.org cannot be held responsible for the authenticity of the content or the actions of its members. By using this site and its services, you warrant that you will not post any messages that are discriminating, obscene, hateful, threatening, or otherwise violates any laws and you release Netstumbler.org from any future claims of any kind whatsoever including, but not limited to, addiction and loss of productivity. All forum messages, private messages and any other content are properties of Netstumbler.org. Even if publicly available, personal or copyrighted information are not to be posted without the consent of the owner. Distribution of licensed and copyrighted materials in any way not endorsed by the copyright owner is strictly prohibited. You may not use this site and its resources to spam other sites or individuals or perform any action that violates any law. Items sold or bought in the For Sale forum are sold as is and no warranty or insurance of any kind is provided. Netstumbler.org cannot be held responsible for the outcome of any transactions and no warranty of any kind is provided, either express or implied. Vulgar words are not allowed in the subject lines ; they may be used in the message body in any forum. The Administrator, Super Moderators and Moderators of Netstumbler.org have the right to remove, edit, move or close any thread for any reason and to reveal your identity and other known information in the event of a complaint or legal action arising from any message posted by you.