317 Commits

Author SHA1 Message Date
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
fd5dc9590a340ab8cd43e3f35763b73e7f53e969, 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
rofl0r
375973b5d4 reaver: print hint when we get deauth packets during WPS exchange
when we get deauth, something went wrong, so at least inform the user.
we have not yet decided the best strategy to automatically recover, or
whether that is even desirable.
2018-06-19 21:26:24 +01:00
rofl0r
78651c216f wash: display APs with broken WPS version 0.0 field
closes #239

note: locked field != 2 is tested because any AP gets 2 assigned as
default value even if WPS is not active.
2018-06-19 16:22:15 +01:00
rofl0r
78c8de717a wash: fix endless loop in file-based mode
introduced in the parent commit:
b32cbe91906c3cedfe1f6a8256bd3bd9ddc38003
2018-06-19 16:11:26 +01:00
rofl0r
b32cbe9190 wash: catch SIGINT for a proper shutdown
pcap under some circumstances (nl80211 driver and linked against
libnl) creates a new monitor interface on initialization, and puts
cleanup code into the atexit() queue.

since wash usually runs forever until interrupted with SIGINT, we
need to catch the signal so the atexit code can do its cleanup.

addressing #202
2018-06-17 22:13:08 +01:00
rofl0r
140507a120 Makefile: remove bogus distclean target 2018-05-16 17:55:03 +01:00
rofl0r
a3b25763fe Release 1.6.5 v1.6.5 2018-05-11 18:11:29 +01:00
kcdtv
de9ca5b05f Update readme for version 1.6.5 (#236)
Some words about the column "Vendor"
2018-05-10 19:55:07 +01:00
rofl0r
d92b77d6e5 wash: double the amount of maximal APs to 512
the struct is 12 bytes per entry, so it's 3KB per 256 entries.
using 6 KB of RAM for a bigger list is not an issue.
2018-05-09 17:29:38 +01:00
ianox
93fda2cd19 wash: fix list index retrieval when more than MAX_APs APs have been seen
list_insert() is not only used as an insertion function, but also for
retrieving the index for a given bssid.
However, latter functionality is broken once wash has seen MAX_AP
networks.
The function then would always return -1.
Therefore the order of those lines were altered such, that the comparison
with all previously seen networks would still take place and eventually
return the index of seen_list[].

taken from PR #232.
2018-05-09 17:27:47 +01:00
rofl0r
1d47eb552b wpsmon.c: replace hardcoded AP limit with a macro 2018-05-09 16:53:38 +01:00
Vasiliy Glazov
b4ba9b8bee Pass on pixiewps exit code. (#230)
Additionally fixes a warning about unused result.

pixie.c: In function 'pixie_attack':
pixie.c:29:3: warning: ignoring return value of 'system', declared with attribute warn_unused_result [-Wunused-result]
system(cmd);
^~~~~~~~~~~
2018-04-12 21:20:27 +01:00