Site Tools

Table of Contents

Tkiptun-ng

Description

NOTE: This documentation is still under development. Please check back on a regular basis to obtain the latest updates. If you have any feedback on the documentation, please post your comments to the Forum.

IMPORTANT NOTE: The tkiptun-ng included in v1.0 is not fully working. The final attack phase is not yet implemented. The other portions are working with the ieee80211 drivers for RT73 and RTL8187L chipsets. The madwifi-ng driver is definitely broken and is known to completely fail. tkiptun-ng may work with other drivers but has not been tested so your mileage may vary.

Tkiptun-ng is a tool created by Martin Beck aka hirte, a member of aircrack-ng team. This tool is able to inject a few frames into a WPA TKIP network with QoS. He worked with Erik Tews (who created PTW attack) for a conference in PacSec 2008: “Gone in 900 Seconds, Some Crypto Issues with WPA”.

Basically tkiptun-ng starts by obtaining the plaintext of a small packet and the MIC (Message Integrity Check). This is done via chopchop-type method. Once this is done, the MICHAEL algorithm is reversed the MIC key used to protect packets being sent from the AP to the client can be calculated.

At this point, tkiptun-ng has recovered the MIC key and knows a keystram for access point to client communication. Subsequently, using the XOR file, you can create new packets and inject them. The creation and injection are done using the other aircrack-ng suite tools.

Cryptanalysis of IEEE 802.11i TKIP by Finn Michael Halvorsen and Olav Haugen, June 2009 provides an excellent detailed description of how tkiptun-ng works. As well, their paper includes detailed descriptions of many other attacks against WEP/WPA/WPA2.

Please remember this is an extremely advanced attack. You must possess advanced linux and aircrack-ng skills to use this tool. DO NOT EXPECT support unless you can demonstrate you have these skills. Novices will NOT BE SUPPORTED.

General Requirements

Both the AP and the client must support QoS or sometimes called Wi-Fi Multi-media (WMM) on some APs.

The AP must be configured for WPA plus TKIP.

A fairly long rekeying time must be in use such as 3600 seconds. It should be at least 20 minutes.

Specific Requirements

The network card MAC address used by tkiptun-ng needs to be set to the MAC address of the client you are attacking.

Why?

This section is very preliminary. As tkiptun-ng works, it goes through various phases. People ask “Why is such and such done?”. This section attempts to answer those questions.

Question:
Why is the handshake gathered?

Answer:
It is done for debugging reasons. First, so that the temporal keys in tkiptun can be calculated. Second, check them against the calculated values from the plaintext packet.

Another reason, is to check if the AP/client reuses the nonces after a mic shutdown.

Usage

Usage: tkiptun-ng <options> <replay interface>

Filter options:

-d dmac : MAC address, Destination

-s smac : MAC address, Source

-m len : minimum packet length

-n len : maximum packet length

-t tods : frame control, To DS bit

-f fromds : frame control, From DS bit

-D : disable AP detection

Replay options:

-x nbpps : number of packets per second

-a bssid : set Access Point MAC address

-c dmac : set Destination MAC address

-h smac : set Source MAC address

-F : choose first matching packet

-e essid : set target AP SSID

Debug options:

-K prga : keystream for continuation

-y file : keystream-file for continuation

-j : inject FromDS packets

-P pmk : pmk for verification/vuln testing

-p psk : psk to calculate pmk with essid

Source options:

-i iface : capture packets from this interface

-r file : extract packets from this pcap file

--help : Displays this usage screen

Usage Examples

The example below is incomplete but it gives some idea of how it looks.