Wifitap EN
De Page Personnelle de Cédric Blancher.
Sommaire |
[modifier] Description
Wifitap is a proof of concept for communication over WiFi networks using traffic injection.
This project is nowadays maintained by Oliver Lavery who set a GitHub repository for his work: https://github.com/gdssecurity/wifitap/.
[modifier] Wifitap in action
[modifier] Direct communication without association
Wifitap allows direct communication with an associated station to a given access point directly, meaning:
- not being associated ourselves;
- not being handled by access point.
~# modprobe prism54
~# ifconfig eth1 up
~# iwlist eth1 scan
eth1 Scan completed :
Cell 01 - Address: 00:13:10:30:22:5C
ESSID:"linksys"
Mode:Master
Encryption key:off
Frequency:2.462 GHz (Channel 11)
Quality:19/0 Signal level:-28 dBm Noise level:-47 dBm
We set our WiFi interface in monitor mode on channel 11.
~# iwconfig eth1 mode monitor channel 11 ~# ifconfig eth1 promisc
Wifitap is ready to be launched to communicate with reachable associated stations to access point 00:13:10:30:22:5C.
~# wifitap.py
Error: BSSID not defined
Usage: wifitap -b <BSSID> [-o <iface>] [-i <iface>] [-s <SMAC>] [-w <WEP key> [-k <key id>]] [-d [-v]] [-h]
-b <BSSID> specify BSSID for injection
-o <iface> specify interface for injection (default: ath0)
-i <iface> specify interface for listening (default: ath0)
-s <SMAC> specify source MAC address
-w <key> WEP mode and key
-k <key id> WEP key id (default: 0)
-d activate debug
-v verbose debugging
-h this so helpful output
~# wifitap.py -b 00:13:10:30:22:5C -i eth1 -p -o eth1 IN_IFACE: eth1 (no Prism headers in capture) OUT_IFACE: eth1 BSSID: 00:13:10:30:22:5c tcpdump: WARNING: eth1: no IPv4 address assigned Interface wj0 created. Configure it and use it [...]
Launching Wifitap creates an tuntap interface named wj0 through which we can inject regular IP traffic
~# ifconfig wj0 192.168.11.11 mtu 1400
~# ifconfig wj0
wj0 Link encap:Ethernet HWaddr 66:F6:C9:1E:E2:13
inet addr:192.168.11.11 Bcast:192.168.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING ALLMULTI MULTICAST MTU:1400 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 b) TX bytes:36 (36.0 b)
~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.11.0 0.0.0.0 255.255.255.0 U 0 0 0 wj0
Now we can reach 192.168.11.0/24 through wj0. Listening to eth1 (with tcpdump as an example), we can discover associated stations and communicate with them with IP.
NB : wj0 MAC address is used as source for sent frames if you don't provide source MAC address using -s <SMAC>.
~# ping 192.168.11.10 PING 192.168.11.10 (192.168.11.10): 56 data bytes 64 bytes from 192.168.11.10: icmp_seq=0 ttl=64 time=37.222 ms 64 bytes from 192.168.11.10: icmp_seq=1 ttl=64 time=0.200 ms 64 bytes from 192.168.11.10: icmp_seq=2 ttl=64 time=0.188 ms 64 bytes from 192.168.11.10: icmp_seq=3 ttl=64 time=0.206 ms --- 192.168.11.10 ping statistics --- 4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.188/9.454/37.222/16.032 ms
[modifier] Further applications of Wifitap
Wifitap allows any application do send and receive IP packets using 802.11 traffic capture and injection over a WiFi network simply configuring wj0, which means :
- setting an IP address consistent with target network address range ;
- routing desired traffic through it.
In particular, it's a cheap method for arbitrary packets injection in 802.11 frames without specific library.
In addition, it will allow one to get rid of any limitation set at access point level, such as bypassing inter-client communications prevention systems (e.g. Cisco PSPF) or reaching multiple SSID handled by the same access point.
[modifier] Hacking Wifitap
Wifitap can easily be modified to be used as a framework for simple tasks such as injecting answers to captured frames.
If you want to use Scapy for captured packets parsing and answers generation, it is necessary to add import for related classes. For instance, if you want to work on ICMP packets, just add:
from scapy import IP,ICMP
Then, you have to rip tuntap interface handling:
- initialisation;
- reading;
- writting.
Finally, you have to modify the main loop to handle interesting frames identification, fields parsing, then answers generation and injection.
Wifitap tarball contains sample programs:
- ARP requests answering machine (wifiarp.py);
- DNS requests answering machine (wifidns.py).
- ICMP Echo Requests answering machine (wifiping.py);
[modifier] Dependencies
Wifitap depends on :
- Python >= 2.2
- Scapy devel version with 802.11 support (included in tgz)
- Psyco Python optimizer (optional, but warmly recommanded)
- Injection aware WiFi adapter and driver :
- Prism54 FullMAC chipset prism54 driver (patch optional but recommanded);
- Atheros chipset with patched Madwifi driver;
- Prism2/2.5/3 chipset with patched hostap or wlan-ng drivers;
- Ralink RT2500 chipset with rt2500 driver;
- Ralink RT2750 chipset with patched rt2750 driver;
- Realtek RTL8180 chipset with patched rtl8180 driver.
See PATCHING file for drivers installation. Patches were written by Christophe Devine and are now maintained by Aircrack-ng team.
[modifier] Downloads
[modifier] Wifitap source code
- GitHub: https://github.com/gdssecurity/wifitap/.
- Older versions hosted locally
- Tar.gz: http://sid.rstack.org/code/wifitap.tgz (109KB, 0.4.0 version)
- Repository: http://sid.rstack.org/code/wifitap/
- Drivers and patches: http://patches.aircrack-ng.org/ (or http://sid.rstack.org/code/mirror/aircrack-ng.org.tgz, 14KB)
- README
- PATCHING
- Changelog
- Wifitap is also mirrored at Packetstorm
[modifier] External distribution
- BackTrack Linux Live CD features Wifitap 0.3.7 from 1.0 Final
- Pentoo Linux Live CD features a Wifitap 0.3.7 package
- Troppix Linux Live CD (discontinued) features Wifitap from 1.1-beta
- Wifitap is listed in Wireless Vulnerabilities & Exploits database as candidate WVE-2005-0058
[modifier] Related stuff
[modifier] Videos
- Attacking WiFi Networks With Traffic Injection (145MB) at Recon 2005 in Montreal.
- Videos courtesy of Christophe Devine:
- Cracking WEP in 10 easy steps (and 10 minutes)
- Cracking WPA in 10 easy steps
[modifier] Talks
- BA-Con, Buenos Aires, Argentina: PDF, 873KB
- Éducation Nationale, Paris, France: PDF, 2.7MB
- WSC, Singapore: PDF1, 754KB, PDF2, 1.3MB
- JSSIC, Dakar, Senegal: PDF, 1.9MB
- SecurityOpus 2007, San Francisco, USA: PDF, 4MB
- Hack.lu 2006, Luxembourg: PDF, 3MB
- Bellua Cyber Security Asia 2006, Jakarta, Indonesia: PDF, 3MB
- Eusecwest/core06 lightning talk, London, UK: PDF, 393KB.
- SecureCon 2006, Melbourne, Australia: PDF, 2.1MB
- Pacsec/core05, Tokyo, Japan: PDF, 1.9MB
- Ruxcon 2005, Sydney, Australia: PDF, 2MB.
- Syscan'05, Bangkok, Thailand: PDF, 2.1MB
- LSM 2005, Dijon, France : PDF, 1.9MB
- Recon 2005, Montreal, Canada, and Wifitap public release: PDF, 1.2MB
- SSTIC 2005 Rump Session, Rennes, France: PDF, 220KB
[modifier] Trainings
- Pacsec/core06, Tokyo, Japan
- Bellua Cyber Security Asia 2006, Jakarta, Indonesia
- SyScan 2006, Singapore
- Cansecwest/core06, Vancouver, Canada
- Eusecwest/core06, London, United Kingdom
[modifier] Trackbacks
- EN
- http://packetstormsecurity.org/filedesc/wifitap-0.3.7.html
- http://www.wi-foo.com/index-3.html
- http://www.attackprevention.com/article/Wifitap-2813.html
- http://ejohansson.se/archives/2006/02/17/wep-cracking-and-wifi-security/
- http://www.learnsecurityonline.com/forum/viewtopic.php?t=189
- http://www.wardrive.net/wardriving/tools (http://802.11-security.net/wardriving/tools)
- http://www.wirelessdefence.org/Contents/WifitapMain.htm
- http://www.rockyh.net/blog/2005/10/2/impressions-of-ruxcon-2005.html
- http://blog.pentester.com.au/2005/10/ruxcon-wrap-up.html
- http://isc.sans.org/diary.php?date=2005-06-26
- http://www.professionalsecuritytesters.org/modules.php?name=News&new_topic=41
- http://www.pauldotcom.com/oct-2005-oshean.pdf
- http://www.monkey.org/~jose/blog/viewpage.php?page=june_05_moblog
- http://www.researchzilla.com/node/3535
- http://www.raulsiles.com/resources/wifi.html
- http://www.wardrivingonline.com/downloads/wardriving.htm
- http://del.icio.us/url/bab396f0b27c0f29753e577e39064cb5
- FR
- http://www.weka.fr/informatique/securite/itsecurite/actu/failles/42721/
- http://www.mtl2600.org/forum/viewtopic.php?t=752&postdays=0&postorder=asc&start=30
- http://www.hsc-news.com/archives/2005/000024.html
- http://www.reseaux-telecoms.com/cso_btree/05_07_01_124058_106/CSO/Newscso_view
- http://bruno.kerouanton.net/papers/sstic05-bk-synthese.doc
- http://www.mag-securs.com/article.php3?id_article=2789
- http://synhack.org/?p=14
- http://www.brest-wireless.net/wiki/softs:securite
- http://www.rezalfr.org/francois.ropert/index.php?2005/10/04
- http://revhosts.net/
- JP



