Commit graph

45 commits

Author SHA1 Message Date
Jouni Malinen
98cd3d1c3b Preparations for variable length KCK and KEK
This modifies struct wpa_ptk to allow the length of KCK and KEK to be
stored. This is needed to allow longer keys to be used, e.g., with
Suite B 192-bit level.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-01-27 01:26:49 +02:00
Ashok Kumar Ponnaiah
eb2223e0ec wlantest: Add decryption of CCMP-256, GCMP, GCMP-256
This extends wlantest support for decrypting the new cipher suites.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-09-03 15:41:35 +03:00
Ashok Kumar Ponnaiah
3a3cb8ee81 wlantest: Indicate if a TKIP/CCMP replay has Retry=1
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2014-09-03 15:41:35 +03:00
Jouni Malinen
0187c41d88 Declare wpa_debug_* variables in src/utils/wpa_debug.h
These were somewhat more hidden to avoid direct use, but there are now
numerous places where these are needed and more justification to make
the extern int declarations available from wpa_debug.h. In addition,
this avoids some warnings from sparse.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-31 19:29:52 +02:00
Jouni Malinen
99d7c1dedf wlantest: Add per-TID RX/TX counters
Signed-hostap: Jouni Malinen <j@w1.fi>
2013-12-24 20:21:27 +02:00
Jouni Malinen
a0530dff5b wlantest: Allow additional PTKs to be specified from a file
A text file with a hexdump of PTK (KCK|KEK=TK with 48 octets for CCMP or
64 octets for TKIP or alternative 16 or 32 octet TK for CCMP/TKIP) can
now be read from a file specified with the -T command line argument. If
the current known PTK fails to decrypt a frame (or if no current PTK is
known) all listed PTKs are iterated to see if any of them matches.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-11-17 23:09:38 +02:00
Jouni Malinen
ace4e460e5 wlantest: Select correct TDLS context if multiple exists
Some corner cases may result in both directions of TDLS tracking context
existing. If that is the case, the incorrect one may end up getting
picked when figuring out which TK to use for decryption or fix
statistics counter to increment. Fix this by preferring the context that
has TDLS link up.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-26 22:14:00 +03:00
Jouni Malinen
e4d99217f7 wlantest: Use add_note() to annotate frames
This adds debug information from wlantest into pcapng frame comments to
make the information more convenient to use, e.g., in Wireshark.

Signed-hostap: Jouni Malinen <j@w1.fi>
2013-05-26 22:14:00 +03:00
Jouni Malinen
0f3d578efc Remove the GPL notification from files contributed by Jouni Malinen
Remove the GPL notification text from the files that were
initially contributed by myself.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-11 19:39:36 +02:00
Jouni Malinen
d0b251d2e8 wlantest: Fix handling of PTK rekeying
Use a temporary PTK buffer during 4-way handshake when rekeying PTK
so that the new EAPOL-Key frame MIC values are checked against the
new PTK and frames are decrypted using the old PTK. Take the new
PTK into use once msg 4/4 is processed and clear RSC counters at
that point (including moving of RSC update to avoid setting RSC
based on the msg 4/4).

In addition, add a workaround to handle supplicant implementations that
set Secure bit to one during PTK rekeying 4-way handshake in msg 2/4.
This was previously assumed to be msg 4/4, but the key data contents
can be used to figure out whether this is msg 2/4 even if the Secure
bit is set to one.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-14 22:36:02 +02:00
Jouni Malinen
39c147261e wlantest: Fix source address for FromDS frames 2011-03-14 21:35:14 +02:00
Jouni Malinen
9559a7f882 wlantest: Fix compiler warnings 2011-01-24 16:57:36 +02:00
Jouni Malinen
244c9303cb wlantest: Determine ping matches properly for direct link
Check ICMP echo request/response matches for both STAs to get proper
counter values for a ping from a one STA to another one using TDLS.
2011-01-24 14:50:51 +02:00
Jouni Malinen
2e479416d1 wlantest: Add support for decrypting WEP frames 2011-01-14 17:43:17 +02:00
Jouni Malinen
0a9ddd92cd wlantest: Add STA counter prot_data_tx 2011-01-07 17:09:09 +02:00
Jouni Malinen
01b397dd94 wlantest: Add more details for replay debug messages
These make it easier to find the frame in question when looking at
the capture in Wireshark.
2011-01-07 14:17:08 +02:00
Jouni Malinen
0e42fff3de wlantest: Add counters and AP/direct path validation for TDLS
These can be used to write automated test scripts for verifying
that TDLS STAs are using correct data path.
2010-12-16 19:08:49 +02:00
Jouni Malinen
b39f58347d wlantest: Add support for decrypting TDLS frames
Derive TPK based on TDLS TPK Handshake and decrypt frames on the
direct link with TPK-TK.
2010-12-13 11:20:55 +02:00
Jouni Malinen
ee3b84beb3 wlantest: Parse ICMP echo packet and record STA ping success 2010-11-20 22:34:42 +02:00
Jouni Malinen
161d0339c6 wlantest: Move RX EAPOL processing into its own file 2010-11-20 21:40:04 +02:00
Jouni Malinen
2e4c34691b wlantest: Add support for protecting injected broadcast frames 2010-11-19 16:48:33 +02:00
Jouni Malinen
6d5ce9fc90 wlantest: Add BSS/STA statistics counters
These counters can be cleared and queried from external programs to
script various testing tasks.
2010-11-18 19:05:29 +02:00
Jouni Malinen
77ac47278a wlantest: Validate EAPOL-Key reserved fields
In addition, this handles WPA difference in Key Info for Secure
bit in msg 3/4 and 4/4 (not set, since GTK is not yet available).
2010-11-13 14:09:40 +02:00
Jouni Malinen
16b8b6eadf wlantest: Validate reserved bits in TKIP/CCMP header 2010-11-13 13:03:21 +02:00
Jouni Malinen
20062114cd wlantest: Verify that TKIP/CCMP frames set ExtIV=1 2010-11-13 12:54:07 +02:00
Jouni Malinen
4dac84539e wlantest: Implement TKIP replay detection 2010-11-13 12:40:36 +02:00
Jouni Malinen
6c9c513783 wlantest: Add support for WPA key handshakes
The Key Data field is handled differently in msg 3/4 and 1/2 in WPA,
so add separate code for processing non-RSN case.
2010-11-13 11:59:43 +02:00
Jouni Malinen
2924b0eb79 wlantest: Add support for TKIP decryption 2010-11-13 11:36:37 +02:00
Jouni Malinen
a9dd29d3e1 wlantest: Use negotiated AKM/cipher to select PMK-to-PTK parameters 2010-11-12 23:33:42 +02:00
Jouni Malinen
9bb6cdaaaf wlantest: Verify that WPA/RSN IE matches in EAPOL-Key and mgmt frames
Verify that WPA/RSN IE in (Re)Association Request is identical to the
one used in EAPOL-Key message 2/4.

Verify that WPA/RSN IE in Beacon/Probe Response is identical to the
one(s) used in EAPOL-Key message 3/4.
2010-11-12 22:54:28 +02:00
Jouni Malinen
8c2cfd973a wlantest: Dump decrypted Key Data from Group Handshake msg 1/2 2010-11-12 01:02:45 +02:00
Jouni Malinen
64f45d070b wlantest: Add option for writing a PCAP dump file
The output file includes all the capture (or read from wireless PCAP
file) frames in their original contents and another copy of each
frame that is decrypted in wlantest (including EAPOL-Key Key Data
field).
2010-11-12 01:00:31 +02:00
Jouni Malinen
5db8cf314e wlantest: Add Group Key handshake processing
Decrypt GTK/IGTK updates in Group Key message 1/2 and update the
keys. In addition, verify the MIC on both Group Key handshake
messages.
2010-11-11 22:04:38 +02:00
Jouni Malinen
2edd5c23ad wlantest: Add replay detection for CCMP 2010-11-11 20:21:11 +02:00
Jouni Malinen
07d0a5be45 wlantest: Decrypt group addressed Data frames 2010-11-11 19:53:12 +02:00
Jouni Malinen
d318c534da wlantest: Add support for decrypting CCMP protected unicast Data frames 2010-11-11 01:29:30 +02:00
Jouni Malinen
f0a782979d wlantest: Parse KDEs from message 2/4 2010-11-10 01:16:32 +02:00
Jouni Malinen
c09caa5882 wlantest: Use more consistent debug levels for keys 2010-11-09 20:35:24 +02:00
Jouni Malinen
4d9f9ee7e5 wlantest: Parse Key Data KDEs and store GTK and IGTK 2010-11-09 20:29:12 +02:00
Jouni Malinen
8672562b04 wlantest: Decrypt EAPOL-Key 3/4 Key Data 2010-11-09 00:39:43 +02:00
Jouni Malinen
d06df64d14 wlantest: Derive PMK from RADIUS exchange
Decrypt MPPE keys and derive PMK from RADIUS exchange if RADIUS
shared secret is known. Use the derived PMK when trying to derive
PTK during 4-Way Handshake.
2010-11-07 23:29:02 +02:00
Jouni Malinen
4bc82fc7ae wlantest: Fix LLC debug print 2010-11-07 23:29:01 +02:00
Jouni Malinen
53650bcab4 wlantest: Add PTK derivation based on passphrases
Allow pre-configuration of passphrases (-p<passphrase>) to provide
enough information for wlantest to be able to derive PMK for each
BSS and PTK for each STA going through 4-Way Handshake (at least
message 2 and 3 needs to be received).
2010-11-07 23:29:01 +02:00
Jouni Malinen
32234bba52 wlantest: Parse EAPOL-Key frames 2010-11-07 23:29:01 +02:00
Jouni Malinen
2d73f0a875 wlantest: Move Mgmt and Data frame processing into their own files 2010-11-07 23:29:01 +02:00