User Tools

Site Tools


newbie_guide

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
newbie_guide [2018/10/08 04:09]
mister_x Updated links
newbie_guide [2018/11/21 23:31] (current)
mister_x [Further tools and information] updated
Line 2: Line 2:
 Idea and initial work: ASPj\\ Idea and initial work: ASPj\\
 Additions by: a number of good souls\\ Additions by: a number of good souls\\
-Last updated: ​May 092008\\+Last updated: ​Nov 212018\\
 \\ \\
 This tutorial will give you the basics to get started using the aircrack-ng suite. ​ It is impossible to provide every piece of information you need and cover every scenario. ​ So be prepared to do some homework and research on your own.  The [[https://​forum.aircrack-ng.org/​|Forum]] and the [[main|Wiki]] have lots of supplementary tutorials and information. This tutorial will give you the basics to get started using the aircrack-ng suite. ​ It is impossible to provide every piece of information you need and cover every scenario. ​ So be prepared to do some homework and research on your own.  The [[https://​forum.aircrack-ng.org/​|Forum]] and the [[main|Wiki]] have lots of supplementary tutorials and information.
Line 19: Line 19:
 First, you need to know which chipset is used in your wireless card and which driver you need for it. You will have determined this using the information in the previous paragraph. ​ The [[install_drivers|drivers section]] will tell you which drivers you need. First, you need to know which chipset is used in your wireless card and which driver you need for it. You will have determined this using the information in the previous paragraph. ​ The [[install_drivers|drivers section]] will tell you which drivers you need.
  
-As I own a Ralink USB device, I am providing the steps to get it working with Aircrack-ng. ​ Before you are able to compile and install drivers, you need the kernel-sources for your distribution installed. ​ 
- 
-If you own another type of card, check the [[install_drivers|installing drivers page]] for instructions about other drivers. ​ As well, do a search in the net if you're unsure how to install them. 
- 
- 
-===== RaLink USB rt2570 Setup guide ===== 
- 
-If you own a rt2570 USB device (like D-Link DWL-G122 rev. B1 or Linksys WUSB54G v4) you should use the drivers from [[https://​web.archive.org/​web/​20140430151116/​http://​homepages.tu-darmstadt.de/​~p_larbig/​wlan/​|http://​homepages.tu-darmstadt.de/​~p_larbig/​wlan/​]] These are special modified drivers, which support injection and are reported to work best with Aircrack-ng. They don't need to be patched. Of course these drivers do also work for normal operation. (Starting with kernel 2.6.25 and Aircrack-ng v1.0-rc1, the in-kernel driver, rt2500usb, can also be used.) 
- 
-Lets unpack, compile and install the drivers: 
- 
-  tar xfj rt2570-k2wrlz-1.3.0.tar.bz2 
-  cd rt2570-k2wrlz-1.3.0/​Module 
-  make 
-  make install 
- 
-The last step has to be performed as root. Use su to change to root. 
-Now we can load the module into the kernel: 
-  modprobe rt2570 
- 
-Plug in your card, it should be recognized as rausb0 now. Run iwconfig to list your wireless devices and check if everything is working. 
  
 ===== Aircrack-ng installation ===== ===== Aircrack-ng installation =====
  
-==== Source ==== +Get the latest copy of aircrack-ng from the [[main|homepage]],​ use our packages ​or use a penetration testing distribution such as Kali Linux or Pentoo where Aircrack-ng is already installed and up to date.
- +
-Get the latest copy of aircrack-ng from the [[main|homepage]]+
-The following commands would have to be changed if you use a newer version of the software. +
- +
-Unpacking, compiling, installing:​ +
- +
-  tar xfz aircrack-ng-1.4.tar.gz +
-  cd aircrack-ng-1.4 +
-  autoreconf -i +
-  ./configure --with-experimental +
-  make +
-  make install +
- +
-As usual, the last step needs to be performed as root, use **su** ​or **sudo -s** to login as root (use **sudo make** install for Ubuntu). +
- +
-==== YUM ==== +
- +
-**WARNING!!!** Currently, neither of the repositories hosts the latest version of Aircrack-ng. It's recommended that you use the first method instead. +
- +
-If you are using system like Redhat ​Linux or Fedora Core you can install aircrack-ng with yum. First you have to add the repository of [[http://​dag.wieers.com/​home-made/​apt/​|Dag Wieers]] or [[http://​dries.studentenweb.org/​rpm/​|Dries]]. +
- +
-  su +
-  yum -y install aircrack-ng +
- +
-==== RPM ==== +
- +
-**WARNING!!!** Currently, neither of the repositories hosts the latest version of Aircrack-ng. It's recommended that you use the first method instead. +
- +
-If you are using a system which is rpm-based then you can take the easy way to install aircrack-ng. (Example for Redhat Linux 4) +
- +
-  su +
-  rpm -ihv http://​dag.wieers.com/​rpm/​packages/​aircrack-ng/​aircrack-ng-0.7-1.el4.rf.i386.rpm+
  
-IMPORTANT: Check http://​dag.wieers.com/​rpm/​packages/​aircrack-ng/ for the latest version of the aircrack-ng suite and change the command above to reference ​the latest version.+To install ​aircrack-ng, refer to the documentation on the [[install_aircrack|installation page]].
  
 ====== IEEE 802.11 basics ====== ====== IEEE 802.11 basics ======
Line 119: Line 66:
 ===== Discovering Networks ===== ===== Discovering Networks =====
  
-The first thing to do is looking out for a potential target. The aircrack-ng suite contains [[airodump-ng]] for this - but other programs like +The first thing to do is looking out for a potential target. The aircrack-ng suite contains [[airodump-ng]] for this - but other programs like [[https://​kismetwireless.net/​|Kismet]] can be used too.
-[[http://www.kismetwireless.net/​|Kismet]] can be used too.+
  
-Prior to looking for networks, you must put your wireless card into what is called "​monitor mode"​. ​ Monitor mode is a special mode that allows your PC to listen to every wireless packet. ​ This monitor mode also allows you to optionally inject packets into a network. ​ Injection will be covered later in this tutorial.+Prior to looking for networks, you must put your wireless card into what is called "​monitor mode"​. ​ Monitor mode is a special mode that allows your computer ​to listen to every wireless packet. ​ This monitor mode also allows you to optionally inject packets into a network. ​ Injection will be covered later in this tutorial.
  
-To put your wireless card into monitor mode:+To put your wireless card into monitor mode using [[airmon-ng]]:
  
-[[airmon-ng]] start rausb0+  ​airmon-ng start wlan0
  
-To confirm it is in monitor mode, run "​iwconfig"​ and confirm the mode.  The [[airmon-ng|airmon-ng page]] on the Wiki has generic information and how to start it for other drivers.+It will create create another interface, and append "​mon"​ to it. So, **wlan0** will become **wlan0mon**. ​To confirm it is in monitor mode, run "​iwconfig"​ and confirm the mode.
  
-Then, start airodump-ng to look out for networks:+Then, start [[airodump-ng]] to look out for networks:
  
-  airodump-ng ​rausb0+  airodump-ng ​wlan0mon
  
-"​rausb0"​ is the network interface (nic) name. If you are using a different WLAN device than a rt2570 you'll have to use a different nic name. 
-Take a look in the documentation of the nic driver. For most newer drivers, the primary interface name is "​wlan0",​ but for monitoring, a secondary interface ("​mon0",​ created when you run airmon-ng) is used. 
  
 If airodump-ng could connect to the WLAN device, you'll see a screen like this: If airodump-ng could connect to the WLAN device, you'll see a screen like this:
Line 141: Line 85:
 {{https://​www.aircrack-ng.org/​img/​newbie_airodump.png}} {{https://​www.aircrack-ng.org/​img/​newbie_airodump.png}}
  
-[[airodump-ng]] hops from channel to channel and shows all access points it can receive beacons from. Channels 1 to 14 are used for 802.11b and g (in US, they only are allowed to use 1 to 11; 1 to 13 in Europe with some special cases; 1-14 in Japan). ​Channels between 36 and 149 are used for 802.11a. The current channel is shown in the top left corner.+[[airodump-ng]] hops from channel to channel and shows all access points it can receive beacons from. Channels 1 to 14 are used for 802.11b and g (in US, they only are allowed to use 1 to 11; 1 to 13 in Europe with some special cases; 1-14 in Japan). 802.11a ​is in the 5GHz and availability in different countries is more fragmented than on 2.4GHz. In general, known channels starts at 36 (32 in some countries) to 64 (68 in some countries) and 96 to 165. Wikipedia has more details on channel availability. The Linux [[https://​wireless.wiki.kernel.org/​en/​developers/​Regulatory/​CRDA|Central Regulatory Domain Agent]] takes care of allowing/​forbidding transmissions on the different channels for your country; however, it needs to be set appropriately 
 + 
 +The current channel is shown in the top left corner.
  
 After a short time some APs and (hopefully) some associated clients will show up. After a short time some APs and (hopefully) some associated clients will show up.
Line 148: Line 94:
  
 ^ BSSID        | The MAC address of the AP  | ^ BSSID        | The MAC address of the AP  |
 +^ RXQ          | Quality of the signal, when locked on a channel |
 ^ PWR          | Signal strength. Some drivers don't report it  | ^ PWR          | Signal strength. Some drivers don't report it  |
 ^ Beacons ​     | Number of beacon frames received. If you don't have a signal strength you can estimate it by the number of beacons: the more beacons, the better the signal quality | ^ Beacons ​     | Number of beacon frames received. If you don't have a signal strength you can estimate it by the number of beacons: the more beacons, the better the signal quality |
Line 164: Line 111:
 ^ Probes ​      | Network names (ESSIDs) this client has probed ​ | ^ Probes ​      | Network names (ESSIDs) this client has probed ​ |
  
-Now you should look out for a target network. It should have a client connected because cracking networks without a client is an advanced topic (See [[how_to_crack_wep_with_no_clients|How to crack wep with no clients]]). It should use WEP encryption and have a high signal strength. Maybe you can re-position your antenna to get a better signal. Often a few centimeters make a big difference in signal strength.+Now you should look out for a target network. It should have a client connected because cracking networks without a client is an advanced topic (See [[how_to_crack_wep_with_no_clients|How to crack WEP with no clients]]). It should use WEP encryption and have a high signal strength. Maybe you can re-position your antenna to get a better signal. Often a few centimeters make a big difference in signal strength.
  
 In the example above the net 00:​01:​02:​03:​04:​05 would be the only possible target because it's the only one with an associated client. But it also has a high signal strength so it's really a good target to practice. In the example above the net 00:​01:​02:​03:​04:​05 would be the only possible target because it's the only one with an associated client. But it also has a high signal strength so it's really a good target to practice.
Line 172: Line 119:
 Because of the channel hopping you won't capture all packets from your target net. So we want to listen just on one channel and additionally write all data to disk to be able to use it for cracking: Because of the channel hopping you won't capture all packets from your target net. So we want to listen just on one channel and additionally write all data to disk to be able to use it for cracking:
  
-  airodump-ng -c 11 --bssid 00:​01:​02:​03:​04:​05 -w dump rausb0+  airodump-ng -c 11 --bssid 00:​01:​02:​03:​04:​05 -w dump wlan0mon
  
 With the -c parameter you tune to a channel and the parameter after -w is the prefix to the network dumps written to disk.  The "​-''''​-bssid"​ combined with the AP MAC address limits the capture to the one AP.  The "​-''''​-bssid"​ option is only available on new versions of airodump-ng. With the -c parameter you tune to a channel and the parameter after -w is the prefix to the network dumps written to disk.  The "​-''''​-bssid"​ combined with the AP MAC address limits the capture to the one AP.  The "​-''''​-bssid"​ option is only available on new versions of airodump-ng.
Line 204: Line 151:
 Try to connect to your AP using [[aireplay-ng]]:​ Try to connect to your AP using [[aireplay-ng]]:​
  
-  aireplay-ng --fakeauth 0 -e "your network ESSID" -a 00:​01:​02:​03:​04:​05 ​rausb0+  aireplay-ng --fakeauth 0 -e "your network ESSID" -a 00:​01:​02:​03:​04:​05 ​wlan0mon
  
 The value after -a is the BSSID of your AP. The value after -a is the BSSID of your AP.
Line 238: Line 185:
 Wait for a client to show up on the target network. Then start the attack: Wait for a client to show up on the target network. Then start the attack:
  
-  aireplay-ng --arpreplay -b 00:​01:​02:​03:​04:​05 -h 00:​04:​05:​06:​07:​08 ​rausb0+  aireplay-ng --arpreplay -b 00:​01:​02:​03:​04:​05 -h 00:​04:​05:​06:​07:​08 ​wlan0mon
  
 -b specifies the target BSSID, -h the MAC of the connected client. -b specifies the target BSSID, -h the MAC of the connected client.
Line 253: Line 200:
 the -r <​filename>​ option. the -r <​filename>​ option.
  
-When using the arp injection technique, you can use the PTW method to crack the WEP key.  This dramatically reduces the number of data packets you need and also the time needed. ​ You must capture the full packet in airodump-ng,​ meaning do not use the "​-''''​-ivs"​ option when starting it.  For [[aircrack-ng]],​ use "​aircrack -z <file name>"​. (PTW is the default attack ​in 1.0-rc1.)+When using the ARP injection technique, you can use the PTW method to crack the WEP key.  This dramatically reduces the number of data packets you need and also the time needed. ​ You must capture the full packet in airodump-ng,​ meaning do not use the "​-''''​-ivs"​ option when starting it.  For [[aircrack-ng]],​ use "​aircrack -z <file name>"​. (PTW is the default attack)
  
 If the number of data packets received by airodump-ng sometimes stops increasing you maybe have to reduce the replay-rate. You do this with the -x <packets per second> option. I usually start out with 50 and reduce until packets are received continuously again. Better positioning of your antenna usually also helps. If the number of data packets received by airodump-ng sometimes stops increasing you maybe have to reduce the replay-rate. You do this with the -x <packets per second> option. I usually start out with 50 and reduce until packets are received continuously again. Better positioning of your antenna usually also helps.
Line 263: Line 210:
 Keep your airodump-ng and aireplay-ng running. Open another window and run a [[deauthentication]] attack: Keep your airodump-ng and aireplay-ng running. Open another window and run a [[deauthentication]] attack:
  
-  aireplay-ng --deauth 5 -a 00:​01:​02:​03:​04:​05 -c 00:​04:​05:​06:​07:​08 ​rausb0+  aireplay-ng --deauth 5 -a 00:​01:​02:​03:​04:​05 -c 00:​04:​05:​06:​07:​08 ​wlan0mon
  
 -a is the BSSID of the AP, -c the MAC of the targeted client. -a is the BSSID of the AP, -c the MAC of the targeted client.
  
-Wait a few seconds and your arp replay should start running.+Wait a few seconds and your ARP replay should start running.
  
-Most clients try to reconnect automatically. But the risk that someone recognizes this attack or at least attention is drawn to the stuff happening on the WLAN is higher +Most clients try to reconnect automatically. But the risk that someone recognizes this attack or at least attention is drawn to the stuff happening on the WLAN is higher than with other attacks.
-than with other attacks.+
  
  
  
 ====== Further tools and information ====== ====== Further tools and information ======
-[[https://​www.tuto-fr.com/​tutoriaux/​crack-wep/​aircrack-ng.php|Tutorial in french for aircrack-ng]] [[https://​www.tuto-fr.com/​en/​tutorial/​tutorial-crack-wep-aircrack.php|or in english]]+ 
 +More tutorials can be found on [[tutorial|this page]].
newbie_guide.1538964555.txt.gz · Last modified: 2018/10/08 04:09 by mister_x