User Tools

Site Tools


easside-ng

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
easside-ng [2007/07/19 17:06] – created easside-ng original page darkaudaxeasside-ng [2009/09/08 01:20] – removed availability warning (1.0 is released) mister_x
Line 1: Line 1:
 ====== Easside-ng ====== ====== Easside-ng ======
  
-++++++ IMPORTANT ++++++\\ +===== Description =====
-++++++ IMPORTANT ++++++\\ +
-++++++ IMPORTANT ++++++\\+
  
-This functionality will be available in a future release. It is NOT available currently.+Easside-ng is an auto-magic tool which allows you to communicate via an WEP-encrypted access point (AP) without knowing the WEP key It first identifies a network, then proceeds to associate with it, obtain PRGA (pseudo random generation algorithm) xor data, determine the network IP scheme and then setup a TAP interface so that you can communicate with the AP without requiring the WEP key.  All this is done without your intervention.
  
-++++++ IMPORTANT ++++++\\ +There are two primary papers "The Fragmentation Attack in Practice"  by Andrea Bittau and "The Final Nail in WEP's Coffin" by Andrea Bittau, Mark Handley and Josua Lockey which are of interest.  See the the [[links|links page]] for these papers and more.  The papers referenced provide excellent background information if you would like to understand the underlying methodologies.  The concepts for the fragment attack currently incorporated in aircrack-ng came from these papers.
-++++++ IMPORTANT ++++++\\ +
-++++++ IMPORTANT ++++++\\+
  
 +In order to access the wireless network without knowing the WEP key is done by having the AP itself decrypt the packets.  This is achieved having a "buddy" process running on a server accessible on the Internet.  This "buddy" server echoes back the decrypted packets to the system running easside-ng.  This imposes a number of critical requirements for easside-ng to work:
  
-===== Description =====+  * The target access point must be able to communicate with the Internet. 
 +  * A "buddy" server must exist on the Internet without firewalling of the port used by easside-ng.  The default is TCP and UDP port 6969. 
 +  * The system running easside-ng must have access to the Internet and be able to communicate with the "buddy" server. 
 + 
 +There are two overall phases:
  
-Easside-ng is an auto-magic tool which allows you to communicate via an access point (AP) without knowing the WEP key.  It first identifies a network, then proceeds to associate with it, obtain PRGA (pseudo random generation algorithm) xor data, determine the network IP scheme and then setup a TAP interface so that you can communicate with the AP.  All this is done without your intervention.+  * Establish basic connectivity between easside-ng, buddy server and the access point. 
 +  * Communication with the WIFI network.
  
-There are two primary papers "The Fragmentation Attack in Practice"  by Andrea Bittau and "The Final Nail in WEP's Coffin" by Andrea Bittau, Mark Handley and Josua Lockey which are of interest.  See the the [[http://aircrack-ng.org/doku.php?id=links|links page]] for these papers and more.  The papers referenced provide excellent background information if you would like to understand the underlying methodologies.  The concepts for the fragment attack currently incorporated in aircrack-ng came from these papers.+Each phase will be described in more detail in the following sections.
  
-In order to access the wireless network without knowing the WEP key is done by having the AP iteself decrypt the packets.  This is achieved having a "buddy" process running on a server accessable on the Internet.  This "buddy" server echoes back the received decrypted packets to the system running easside-ng.  This imposes a number of critical requirements for easside-ng to work: 
  
-  * The access point must be able to communicate with the Internet +==== Establish Connectivity ====
-  * A "buddy" server must exist on the Internet without firewalling +
-  * The system running easside-ng must have access to the Internet and be able to communicate with the "buddy" server +
-  * The system running easside-ng must have a wireless card+
  
-Here are the steps which essside-ng takes:+Here are the steps which essside-ng performs during the establishing connectivity phase:
  
   - Channel hops looking for a WEP network.   - Channel hops looking for a WEP network.
Line 31: Line 29:
   - Once the program has successfully authenticated then it associates with the AP.   - Once the program has successfully authenticated then it associates with the AP.
   - After sniffing a single data packet, it proceeds to discover at least 1504 bytes of PRGA by sending out larger broadcasts and intercepting the relayed packets.  This is what is known as the fragmentation attack.  The PRGA is written to the prga.log file.   - After sniffing a single data packet, it proceeds to discover at least 1504 bytes of PRGA by sending out larger broadcasts and intercepting the relayed packets.  This is what is known as the fragmentation attack.  The PRGA is written to the prga.log file.
-  - It then decrypts the IP network by guessing the next three bytes of PRGA using multicast frames and the linear keystream expansion technique.  By decrypting the ARP request, the network number scheme can be determined.  This is used to build the ARP request which is used for subsequent injection.+  - It then decrypts the IP network by guessing the next four bytes of PRGA using multicast frames and the linear keystream expansion technique.  By decrypting the ARP request, the network number scheme can be determined.  This is used to build the ARP request which is used for subsequent injection.  Easside-ng can also use an IP packet to determine the IP network as well, it just takes a bit longer.
   - It creates a permanent TCP connection with the "buddy" server and verifies connectivity.   - It creates a permanent TCP connection with the "buddy" server and verifies connectivity.
 +  - ARPs to get the MAC addresses for the router and source IP.  The defaults are .1 for the router and .123 for the client IP.
   - It then tests connectivity via the access point and determines the Internet IP address that the AP uses.  It also lists the round trip time of the test packets.  This gives you an idea of the quality of connection.   - It then tests connectivity via the access point and determines the Internet IP address that the AP uses.  It also lists the round trip time of the test packets.  This gives you an idea of the quality of connection.
   - The TAP interface is then created.   - The TAP interface is then created.
  
-At this point, you run "ifconfig at0 up" and you are now able to communicate with any host on the AP network via this TAP interface.  Notice that you don't need the WEP key to do this!+At this point, you run "ifconfig at0 up" and you are now able to communicate with any host on the wifi network via this TAP interface.  Notice that you don't need WEP key to do this!  The TAP interface is a virtual interface that acts as if it were the wifi interface with the correct WEP key configured.  You can assign an IP, use DHCP with it and so on.
  
-So you may be asking "What is the magic?  How can you access the AP without knowing the WEP key?" The method is quite simple yet ingenious.  To send packets, most APs have the bad habit of accepting packets with the same initialization vector over and over again.  Thus the PRGA is used to encrypt packets being sent to hosts on the AP network.  To receive packets, the "buddy" server is leveraged.  When encrypted packets are received, headers are added to them and the extended packet is sent (using UDP packets) to the "buddy" server via the AP.  The AP decrypts this extended packet and forwards it the "buddy" server on the Internet.  In turn, the "buddy" server sends the decrypted packet back directly to easside-ng via the "easside-ng - buddy" connection. 
  
-So you may also be asking "What is the linear keystream expansion technique?" The foundation is the fact that packets like an encrypted ARP request can easily be identified combined with the fact that the start of it has known plain text.  So the program first obtains the PRGA from known plain text portion of the ARP request. Then it creates a new ARP request packet broken into two fragments.  The first fragment is one more byte then the know PRGA and the PRGA is guessed for the extra byte.  These guesses are sent and the program listens to see which one is replayed by the AP.  The replayed packet has the correct PRGA and this value was included in the destination multicast address.  Now that we know the correct PRGA, one more byte can be decrypted in the original ARP request.  This process is repeated until the sending IP in the original ARP request is decrypted.  It takes a maximum of 256 guesses to determine the correct PRGA for a particular byte and on average only 128 guesses.+==== What role does the buddy server play====
  
-There are few known limitations: +The following is simplistic description.  A very detailed description of the steps to decrypt packets is included in later sections. 
-  * Only open authentication is supportShared key authentication is not supported+ 
-  * Only B and G networks are supported.+  * You sniff packet X on the wifi and it is encrypted. 
 +  * If say, that packet was going to cnn.com, then on the Internet it would arrive in clear-text.  The Internet does not use WEP. 
 +  * The idea is to retransmit that packet, but instead of sending it to its original destination (cnn.com) we send it to our buddy on the Internet. 
 +  * The buddy gets it in clear-text (the AP will decrypt packet before sending to the internet) and sends it back to us. 
 + 
 + 
 +==== Communication with the WIFI network ==== 
 + 
 +The following describes this diagram in more detail.  
 +\\  
 +\\  
 +\\  
 +{{ http://www.aircrack-ng.org/img/easside-buddy-server.png?600x200 }} 
 +\\  
 +\\  
 +So you may be asking "What is the magic?  How can you access the WIFI network without knowing the WEP key?" The method is quite simple yet ingenious. 
 + 
 +Lets look at the details of sending and receiving packets via the at0 TAP interface. 
 + 
 +Sending packets: 
 + 
 +  *  A packet  is given to the at0 (TAP interface) based on the local network routing table.  Depending on what destination IP address you are trying to communicate with, you may have to manually add static routing entries.  By default, the wifi network is added to the routing table for you. 
 +  * The TAP interface hands the packet over to easside-ng 
 +  * Easside-ng then encrypts it for injection using the PRGA gathered in the initial connectivity phase. 
 +  * Easside-ng then injects the packet into the wifi network via the wireless device. 
 + 
 +Receiving packets: 
 + 
 +  * A source device (wired or wireless) sends a packet destined for the IP assigned to the ath0 interface or to a broadcast destination.  The AP transmits the packet into the air. 
 +  * Easside-ng constantly listens to the packets being transmitted by the AP.  It then processes packets addressed to the TAP IP based on the MAC address or broadcasts. 
 +  * For each packet it needs to process, the packet must first be decrypted.  This will be done in multiple steps.  The steps follow. 
 +  * Easside-ng creates a new packets composed of two fragments.  The first fragment has no data, it simply has the destination IP of the buddy-server.  This fragment is encrypted using the PRGA (keystream).  The second fragment contains the packet to be decrypted.  Since this packet is already encrypted, it is used "as is" This new packet consistently of two fragments is then injected into the wifi network. 
 +  * The AP receives the fragmented packet, decrypts each fragment and reassembles the fragments into a single packet.  Since the destination IP of the reassembled packet is the buddy-server, it forwards it to the buddy server.  You should note that the AP was kind enough to decrypt the packet for you! 
 +  *  The buddy server receives the decrypted packet from the AP by UDP.  It then resends the decrypted information back to easside-ng. 
 +  *  Easside-ng then sends the decrypted packet out the at0 (TAP) interface. 
 + 
 +==== Fragmentation Technique ==== 
 + 
 +This section provides a brief explanation of the fragmentation technique used in easside-ng. 
 + 
 +This technique, when successful, can obtain 1504 bytes of PRGA (pseudo random generation algorithm). This attack does not recover the WEP key itself, but merely obtains the PRGA. The PRGA can then be used to encrypt packets you want to transmit.  It requires at least one data packet to be received from the access point in order to initiate the attack. 
 + 
 +Basically, the program obtains a small amount of keying material from the packet then attempts to send packets with known content to the access point (AP).  If the packet is successfully echoed back by the AP then a larger amount of keying information can be obtained from the returned packet.  This cycle is repeated several times until 1504 bytes of PRGA are obtained. 
 + 
 +The original paper, [[http://darkircop.org/bittau-wep.pdf|The Fragmentation Attack in Practice]], by Andrea Bittau provides a much more detailed technical description of the technique.  A local copy is located [[http://download.aircrack-ng.org/wiki-files/doc/Fragmentation-Attack-in-Practice.pdf|here]].  A local copy of the presentation slides is located [[http://download.aircrack-ng.org/wiki-files/doc/Final-Nail-in-WEPs-Coffin.slides.pdf|here]].  Also see the paper "The Final Nail in WEP's Coffin" on this page. 
 + 
 +==== Linear Keystream Expansion Technique ==== 
 + 
 +This section provides a brief explanation of the linear keystream expansion technique used in easside-ng. 
 + 
 +So you may also be asking "What is the linear keystream expansion technique?" The foundation is the fact that packets like an encrypted ARP request can easily be identified combined with the fact that the start of it has known plain text. 
 + 
 +The program first obtains the PRGA from known plain text portion of the ARP request. Then it creates a new ARP request packet broken into two fragments.  The first fragment is one more byte then the know PRGA and the PRGA is guessed for the extra byte.  These guesses are sent and the program listens to see which one is replayed by the AP.  The replayed packet has the correct PRGA and this value was included in the destination multicast address.  Now that we know the correct PRGA, one more byte can be decrypted in the original ARP request.  This process is repeated until the sending IP in the original ARP request is decrypted.  It takes a maximum of 256 guesses to determine the correct PRGA for a particular byte and on average only 128 guesses. 
 + 
 +The linear keystream expansion technique (Arbaugh inductive) is reverse  
 +[[korek_chopchop|chopchop]].  Chopchop decrypts packets from back to the front.  Linear decrypts packets from the front to the back.  Actually, chopchop is reverse Arbaugh. 
 + 
 +==== Easside-ng compared to Wesside-ng ==== 
 + 
 +The companion aircrack-ng suite program to easside-ng is [[wesside-ng]].  Here is a brief comparison of the two tools: 
 + 
 +^Feature^easside-ng^wesside-ng^ 
 +|Stability of the program|Stable|Proof of concept| 
 +|Finds a MAC address to spoof|No|Yes| 
 +|Fake Authentication to AP|Yes|Yes| 
 +|Can use ARP packets for fragmentation|Yes|Yes| 
 +|Can use IP packets for fragmentation|Yes|No| 
 +|Fragmentation attack to obtain PRGA|Yes|Yes| 
 +|Linear Keystream Expansion Technique|Yes|Yes| 
 +|Communication with wifi network without WEP key|Yes|No| 
 +|Network ARP request flooding|No|Yes| 
 +|Aircrack-ng PTW attack|No|Yes| 
 +|Recovers WEP key|No|Yes| 
 + 
 +==== Why easside-ng when aircrack-ng has PTW? ==== 
 + 
 +Why release easside-ng when aircrack-ng has PTW? 
 + 
 +  * easside-ng was private and came a year before PTW. 
 +  * easside-ng is handy for a quick and stealthy attack.  It is significantly faster than PTW.  It's "instant" and requires no flooding.
  
  
Line 50: Line 127:
  
  
-Usage: easside-ng <arg[v0]+Usage: easside-ng <args>
  
 Where: Where:
Line 62: Line 139:
   * -f                Wireless interface name. (Mandatory)   * -f                Wireless interface name. (Mandatory)
   * -c               Locks the card to the specified channel (Optional)   * -c               Locks the card to the specified channel (Optional)
-  * [v0]            Current version number.  Informational only. 
  
  
Line 81: Line 157:
 ===== Scenarios ===== ===== Scenarios =====
  
-==== Standard Usage Example ====+==== Specific AP Usage Example ====
  
 Be sure to use [[airmon-ng]] to put your card into monitor mode. Be sure to use [[airmon-ng]] to put your card into monitor mode.
  
-First, you need to start a buddy server.  This needs to be located on the Internet and be accessable from the system running easside-ng via TCP.  It must also be accessable from the AP via UDP.  Port 6969 cannot be firewalled on it.+First, you need to start a buddy server.  This needs to be located on the Internet and be accessible from the system running easside-ng via TCP.  It must also be accessible from the AP via UDP.  Port 6969 cannot be firewalled on it.
  
 You start the buddy sever: You start the buddy sever:
Line 158: Line 234:
    ifconfig at0 up    ifconfig at0 up
  
-Now you can send and receive packets to and from the AP network which in this case is 192.168.1.0/24 via the at0 inteface.+Now you can send and receive packets to and from the AP network which in this case is 192.168.1.0/24 via the at0 inteface.  Notice that you don't need a WEP key to do this!  The TAP interface is a virtual interface that acts as if it were the wifi interface with the correct WEP key configured.  You can assign an IP, use DHCP with it and so on.  By default, the at0 interface is assigned the network obtained at the start plus ".123"
 + 
 + 
 +==== Scanning for APs Usage Example ==== 
 + 
 +The "Specific AP Usage Example" is for targeting a single Access Point on a specific channel.  You can also let easside-ng scan for APs by using "easside-ng -f ath0 -s 10.116.23.144".
  
  
 ===== Usage Tips ===== ===== Usage Tips =====
  
-The above example is for specific Access Point on a specific channel.  You can also let easside-ng scan for the AP by using "easside-ng -f ath0 -s 10.116.23.144".+==== Combining easside-ng and wesside-ng ==== 
 + 
 +As you may know, wesside-ng is a proof-of-concept tool which is rich in functionality, but is not as stable and bug-free compared to easside-ng.  You can combine the strengths of [[wesside-ng]] and easside-ng together. 
 + 
 +First run easside-ng to obtain the prga file.  Then run wesside-ng to flood the network and obtain the WEP key.  It is really that simple! 
 + 
 +Playfully, this is known as "besside-ng"
 + 
 +==== Demonstrating Insecurity! ==== 
 + 
 +IMPORTANT: You must have written permission from the owner of the AP prior to using the instructions in this section.  It is illegal to access networks which do not belong to you. 
 + 
 +A clever way to demonstrate the insecurity of WEP networks and access points: 
 + 
 +  * Use easside-ng to create an access mechanism to the WIFI network. 
 +  * Log into the AP with your favourite browser.  99% of the time, the APs have default ids and passwords.  Many times there are no passwords set.  Once logged into the AP, you can go to the WEP settings page  and read off the WEP key from the configuration page.  In some cases, where there are asterisks (*) for the key, you may need to look at the HTML source or use a tool to reveal the password. 
 +  * Now you can configure your wireless card with the WEP key and access the network normally.  
 + 
 + 
 +==== Test Setup ==== 
 + 
 +This section will discuss what works and what does not work with regards to testing easside-ng against your own wireless LAN. 
 + 
 +6969 is the standard port used by easside-ng and buddy-ng.  If you change it, then of course, use the revised port number in all references below. 
 + 
 +First, some simple assumptions about your wireless LAN: 
 + 
 +  * It has access to the Internet. 
 +  * Outbound UDP port 6969 to the Internet is not blocked.  Some firewalls only allow communication on ports which have been explicitly allowed. 
 +  * You have tested your ability to connect to the buddy-ng server.  See how to perform this test below. 
 + 
 +Assumptions about your buddy-ng server: 
 + 
 +  * It is running on Internet with a routeable IP address 
 +  * It is accessable by both the system running easside-ng and the wireless LAN 
 +  * Inbound and outbound UDP and TCP port 6969 is permitted. 
 + 
 +Assumptions about the system running easside-ng; 
 + 
 +  * It is running on Internet with a routeable IP address. 
 +  * Outbound TCP port 6969 to the Internet is not blocked.  Some firewalls only allow communication on ports which have been explicitly allowed. 
 +  * You have tested your ability to connect to the buddy-ng server.  See how to perform this test below. 
 +  * It contains a wireless device supported by aircrack-ng and it is in monitor mode. 
 + 
 +The easiest way to test connectivity to the buddy-ng server is by using telnet.  Be sure to start your buddy server process prior to doing this test!  Otherwise it will fail for sure. 
 + 
 +Enter: 
 + 
 +   telnet <ip of buddy server> 6969 
 + 
 +The system should respond: 
 + 
 +   Trying <ip of buddy server>... 
 +   Connected to <ip of buddy server>
 +   Escape character is '^]'
 + 
 +The buddy server should look like this: 
 + 
 +   Waiting for connexion 
 +   Got connection from <ip of the easside-ng system> 
 + 
 +When you terminate the telnet session, it should look like this: 
 + 
 +   That was it 
 +   Waiting for connexion 
 + 
 +The above examples show a successful test.  If your test fails then use tcpdump or wireshark on the source and destination systems to sniff port 6969.  Determine the problem with these tools and others then correct the root problem. 
 + 
 +If you are running easside-ng and buddy-ng on the same system then the system must have a routeable Internet IP address You cannot be on a LAN behind a firewall which does network address translation (NAT). 
 + 
 +The ideal situation is to have the buddy-ng server running on a separate system someplace on the Internet Then have a second system with easside-ng running with a routeable IP address. 
 + 
 + 
 +===== Tap interface under Windows ===== 
 + 
 +To obtain a tap interface in a MS Windows environment, install OpenVPN.
  
  
 ===== Usage Troubleshooting ===== ===== Usage Troubleshooting =====
  
-Make sure your card is in monitor mode.+  * Make sure your card is in monitor mode.
  
-Make sure your card can inject by testing it with the [[http://aircrack-ng.org/doku.php?id=injection_test|aireplay-ng injection test]].  Also specifically ensure you can communicate with the AP in question.+  * Make sure your card can inject by testing it with the [[injection_test|aireplay-ng injection test]].  Also specifically ensure you can communicate with the AP in question.
  
-Make sure your card supports the fragmentation attack.  Again, this can be confirmed with the aireplay-ng injection test.+  * Make sure your card supports the fragmentation attack.  Again, this can be confirmed with the aireplay-ng injection test.
  
-Make sure to delete prga.log if you are changing access points or if you want to restart cleanly.  In general, if you have problems, it is a good idea to delete it.+  * Make sure to delete **prga.log** if you are changing access points or if you want to restart cleanly.  In general, if you have problems, it is a good idea to delete it.
  
-There are a few known limitations: +  * There are a few known limitations: 
-  * Only open authentication is support.  Shared key authentication is not supported. +    * Only open authentication is support.  Shared key authentication is not supported. 
-  * Only B and G networks are supported.+    * Only B and G networks are supported.
  
easside-ng.txt · Last modified: 2013/03/19 18:21 by jano