Commit Graph

278 Commits

Author SHA1 Message Date
feitoi acfc3ddabe decrease definition of EAPOL_START_MAX_TRIES (#290)
this improves performance of brute-force attacks.
2019-10-08 04:01:37 +01:00
rofl0r 6f1c14f80d remove duplicate definition of FAKE_RADIO_TAP_HEADER
following up on 23dcc42cd1, and adding
a comment for why the functions dealing with it exist in 2 versions.
2019-10-05 18:30:35 +01:00
rofl0r d5e2c820d3 wash: remove usage of pcap-based packet filtering
instead, we filter out unwanted packets ourselves, which allows us to record
a full packet capture with --output-file option.
2019-10-05 17:21:27 +01:00
rofl0r 4b51249bd7 --output-file: save all packets received by the pcap driver
previously only packets with bad FCS were saved.
2019-10-05 16:09:52 +01:00
rofl0r 53e7855196 wash: implement -O output option too 2019-10-05 16:08:39 +01:00
rofl0r 37de8c8822 print message when we get EAP_FAILURE 2019-06-21 22:54:50 +01:00
rofl0r 916f63e579 don't go into endless loop when AP has WPS turned off
encountered an AP that turned off WPS completely after a couple
NACK-interrupted attempts.
reaver then went into an endless loop trying to figure out whether
it is locked.
2019-06-21 22:54:50 +01:00
feitoi 1a1c1f8e7a session.c: remove unnecessary type cast 2019-05-14 08:08:14 -03:00
feitoi 7e519fed18 wash: fix calculation of attack progress 2019-05-13 00:14:40 -03:00
rofl0r 75c8e7be61 cracker: whitespace cleanup 2019-05-12 23:26:35 +01:00
rofl0r 231df4a616 cracker: remove indent level 2019-05-12 23:23:20 +01:00
rofl0r c6baab313d restore_session: and another indent layer 2019-05-12 23:07:55 +01:00
rofl0r 9db8bb69f6 restore_session: remove yet one more indent layer 2019-05-12 23:06:39 +01:00
rofl0r 113f12fe26 restore_session: remove one more indent layer 2019-05-12 23:05:26 +01:00
rofl0r daf4906c15 restore_session: remove yet another indent layer 2019-05-12 22:57:49 +01:00
rofl0r b5c960e9c5 restore_session: remove another indent level 2019-05-12 22:54:40 +01:00
rofl0r b1c4516ea3 restore_session: remove indentation level 2019-05-12 22:51:19 +01:00
rofl0r 09d1ec5189 save_session: remove another indentation level 2019-05-12 22:46:09 +01:00
rofl0r 4c1bf602f0 save_session: remove more unused code 2019-05-12 22:39:33 +01:00
rofl0r 442300a9d4 save_session: remove more unused code 2019-05-12 22:36:59 +01:00
rofl0r 079c837e8d misc: add mac2str_buf()
allows to use a stack buffer instead of returning a new heap allocation.
2019-05-12 22:36:18 +01:00
rofl0r 7553070190 save_session: remove unused code 2019-05-12 22:20:26 +01:00
rofl0r fdeb73b03a save_session: simplify code 2019-05-12 19:32:26 +01:00
rofl0r f38637bf2f save_session: remove indentation level 4 2019-05-12 19:27:29 +01:00
rofl0r 9b977465e5 save_session: remove indentation level 3 2019-05-12 19:25:15 +01:00
rofl0r 609b809230 save_session: remove indentation level 2 2019-05-12 19:23:00 +01:00
rofl0r 7f82c34925 save_session: remove indentation level 2019-05-12 19:18:30 +01:00
feitoi 4ea108d4d8 save .wpc file if the first half of first pin is correct 2019-05-10 17:55:37 -03:00
rofl0r 23dcc42cd1 enhance radiotap header with TX capabilities
it seems some badly written drivers require/expect to see some
TX capability flags in the radiotap header.
this was discovered by a study of aircrack-ng commit history
(which turned out to be very annoying because the current build
system maintainer @jbenden seems to love to move files from one
directory to the other, apply automatic code formatting programs
etc which limits usability of git log/git history very much ...)

the interesting commit in aircrack-ng is
commit 47743c161800721d9c09d3fe4ba7e457360f7fe5
Author: Gábor Stefanik <netrolller.3d@gmail.com>
Date:   Mon Dec 15 16:22:19 2008 +0000

    Set the proposed F_TX_NOACK and F_TX_NOSEQ flags in the TX radiotap header. (Kernel patch to handle these flags in mac
80211 coming soon.)

the code is prepared to additionally allow usage of a TX rate
field, which aircrack-ng uses as well and even sets it to
the rate of the current adapter. Hopefully this will turn
out to not be required.

unfortunately during reaver development it was decided to
use a struct radio_tap_header even for sending of packets,
rather than just using raw bytes which complicates any
changes to it.

there's also libwps/libwps.h which uses its own copy of the
struct, though fortunately only for the code inside libwps.c,
and only for reading purposes. therefore it was left untouched.

addressing #279
2019-04-28 00:32:53 +01:00
rofl0r 63fb581eed builder: start with sequence number 0 2019-04-27 21:54:13 +01:00
rofl0r 8f13728492 builder: remove single-use DEFAULT_DURATION from header 2019-04-27 21:50:25 +01:00
rofl0r e90bf38193 build_dot11_frame_header_m: make static 2019-04-27 21:48:06 +01:00
rofl0r 396f27d9e6 builder: remove SEQ_MASK header macro
the macro was only used in one spot, so use the value there directly.
simplifies code reading.
2019-04-27 21:44:34 +01:00
rofl0r f579dde53b common.h: fall back to endianness.h if end. cannot be determined
actually this whole mess should be removed and endianness.h used
instead, but its too much off a mess to even touch it with a stick.
2019-04-25 03:05:38 +01:00
rofl0r f8847d4123 wash: fix channel 0 being displayed with some 5GHz APs in file mode
in file replay mode (-f), there is no scanned channel, therefore
APs might come out with channel 0 if they don't have a tagged IE
with the channel number. we now take it from radiotap header, if
existing. FIXME fixed.
2019-04-15 21:19:52 +01:00
rofl0r 46ad89ac6e wash: fix bogus output with wrong FCS packets
when pcap-file output for interesting packets for reaver was added in
fd5dc9590a, only reaver itself properly init-
ialized the output fd to -1. wash however didn't initialize it, so it was still
0 from the memset of the globule struct, which caused packets with wrong FCS to
be dumped to stdin, where it eventually produced garbled output on the tty.
this fixes wash output with some broken mac drivers that only sporadically have
correct packets in monitor mode.
2019-04-10 02:22:11 +01:00
rofl0r feb454c4d9 activate rfmon only on apple
even though most drivers on linux properly work with rfmon turned on, a few
badly written ones create issues:

issue #202 : rfmon mode causes additional interfaces to appear
issue #265 : issues with RTL8812AU hackjob driver
2019-03-22 20:52:09 +00:00
feitoi 48a0a8bedc wash: show crack progress with -p option (#268) 2019-02-27 13:57:26 +00:00
rofl0r c7040da3a9 fix #271 2019-02-22 17:38:24 +00:00
feitoi 7a4aaef39b Stop attack if the specified 4/8 digit WPS PIN has been already tried 2019-01-04 16:22:51 +00:00
feitoi 7a915551a4 Specified PIN into current index of p1 and p2 array + warning message 2018-12-20 11:56:16 -02:00
feitoi 841db531dc Save .wpc file if the first attempt is correct 2018-11-27 20:05:42 -02:00
feitoi b89bf9cf42 Fix invalid format .wpc file
argsparser.c: deleted 'set_key_status(KEY2_WIP)' for fix key status
     because do_wps_exchange() will do it.
keys.c: 'get_k1_key_index()' and 'get_k2_key_index()' are for get
     the index of k1[] and k2[] respectively.
pinc.c: lines deleted are for not create invalid format .wpc file.
pinc.c: news lines are for to generate .wpc file with the first half
     and second half specified PIN in first position.
2018-11-27 20:03:37 -02:00
feitoi f936d3dde8 globule string setters: use free and strdup consistently 2018-11-17 16:21:59 +00:00
rofl0r 7c619ebd8d make pcap writer code endian-safe
- also added support for RcB build tool
2018-08-27 05:35:13 +01:00
rofl0r 61915956f2 fix bogus "wrong FCS" report caused by packets we send ourselves
the packets we send have a minimalistic radiotap header without
additional flags set in presentflags. it was previously wrongly
assumed that lack of those flags would imply the FCS checksum has
to be appended at the end of the packet, but that is not the case.
2018-08-27 02:24:33 +01:00
rofl0r fd5dc9590a implement -O which writes a pcap file with interesting packets
currently only packets which are reported as having bad FCS are written.
2018-08-27 02:01:02 +01:00
schoonc 126a197534 README.md: fix typo 2018-08-07 04:47:52 +01:00
feitoi d143a8de25 Fix memleak of p1 and p2 array (#256) 2018-07-25 18:08:30 +01:00
rofl0r f813196b39 add some test code for WPS exchange
this allows to test the WPS exchange code with a .pcap file.
2018-06-19 21:28:05 +01:00