Commit Graph

242 Commits

Author SHA1 Message Date
Victor Golovanenko 464326fbcc Update gitignore: add pixiewrapper binary 2020-11-08 12:58:38 +00:00
rofl0r 85af251806 remove gmtime()-related code duplication 2020-10-20 01:44:56 +01:00
rofl0r c1dd3a9ff6 use gmtime_r() to mute code analysis tools (gmtime() is non-mt-safe) 2020-10-20 01:28:21 +01:00
rofl0r a6b3fa514c add pixiewrapper
a small tool to be used as a frontend to pixiewps to do a smart series of
short timespan checks when the initial run fails, before finally doing a
full --force run.

additionally, it supports an option -u where the caller can pass the timestamp
contained in the AP's last beacon packet before the attack, which practically
gives us already the exact seed when we guess the router reset date correctly.
theoretically, we could just pass a range of ~60 seconds around the guessed
date and would hit it with huge likelyhood. however pixiewps needs a relatively
big amount of time to get the cracking started, so effectively the amount of
time needed to scan for a whole month isn't much longer than for a few seconds.
a future version of reaver might automatically supply that uptime timestamp.

in my personal setup, i renamed the pixiewps binary to pixie-core, and compile
the program with the CPPFLAGS=-DPIXIE_BIN=\"pixie-core\", then rename pixie-
wrapper to pixiewps itself, so this is what gets called by reaver.
2019-10-30 00:00:04 +00:00
rofl0r 8964527b85 add --cstart/cend switches for time_t range 2019-10-29 20:23:22 +00:00
rofl0r 9e5bdc6c86 endianeness.h: fix logical bug which broke big endian
due to usage of ifdef where if was due, the little endian branch was
always taken, since the macro ENDIANNESS_LE is *defined*, but set to 0.
2018-03-19 20:00:25 +00:00
wiire-a 28f68e694b Bumped version to 1.4.2 2018-01-25 22:05:41 +01:00
wiire-a 706f3baba9 Fixed logic when nonce seed is found but pin is not
The logic should be rewritten in a better way. This is a quick fix before the next release.
2018-01-23 17:52:32 +01:00
wiire-a ec3c4ca567 Removed old wpa_supplicant defines 2018-01-22 18:16:35 +01:00
wiire-a d73d93656e Updated CHANGELOG 2018-01-21 21:40:17 +01:00
wiire-a b0b7dbb888 Added another comment on the modulo trick 2018-01-12 15:23:13 +01:00
wiire-a c44ce9e923 Give possibility to make glibc PRNG work for every seed
Because of the modulo trick the current glibc PRNG version doesn't work for seed == 0x7fffffff or seed == 0xfffffffe.

The former is used only if the user specifically uses --start / --end 02/2038. The latter is never used as negative values are not legal for time.

In any case a compilation guard (PWPS_UNERRING) has been added for correctness to make the PRNG spit correct values even for those 2 seeds.
2018-01-11 23:31:50 +01:00
wiire-a 0584a78d9b Fixed issue with previous changes in glibc PRNG
With the previous changes the PRNG was faster but didn't work on all instances.
2018-01-11 15:23:16 +01:00
wiire-a 7acd739002 Finished integrating new glibc PRNG code and further optimizations
On my laptop the difference with these new changes, compared to the older code is more than 4x faster. The code was tested on ~10 different data sets and seems to work fine.
2018-01-10 16:00:54 +01:00
wiire-a 7738fda7d8 Improvement in glibc PRNG cracking
The code is based on a precomputed initial seed table, instead of re-seeding from scratch everytime the whole state. On my x86 test machine this new code seems to be ~60% faster.

Some further testing and tuning may be needed.

Credits to @1yura.
2018-01-09 20:33:23 +01:00
wiire-a c14f1227af Fixed another redefinition of ulong64
This one was caught only after testing on FreeBSD.
2018-01-06 21:07:00 +01:00
wiire-a d6de90fb18 Fixed unused variable warning in tomsfastmath 2018-01-06 20:35:07 +01:00
wiire-a 0d600e1600 Commented unused function 2018-01-06 20:24:26 +01:00
wiire-a 61e73e5703 Fixed redefinition of type ulong64 in tomcrypt 2018-01-06 20:21:43 +01:00
wiire-a ce5d96b661 Added casts to correct types when printing elapsed time
This fixes a warning on macOS due to tv_usec being of type int32_t.
2018-01-06 18:23:20 +01:00
wiire-a f8c295c5b5 Removed unused tomcrypt headers 2018-01-06 16:53:09 +01:00
wiire-a 65dd9975da Properly removed tomcrypt LTC_ARGCHK via config macro
This way <signal.h> doesn't get included and (hopefully) the program compiles on macOS without _DARWIN_C_SOURCE.
2018-01-06 16:01:31 +01:00
wiire-a 838f69d1e1 Removed contributing message for some data sets 2018-01-06 11:36:54 +01:00
wiire-a b570608250 Added missing objects to Makefile clean 2018-01-03 21:30:23 +01:00
wiire-a 1ddc765477 Revert "build tomcrypt sha256 code as separate object"
This reverts commit e552d93a50.

Usign GCC version 5.4.0 20160609 the code was 3 times slower (probably due to missing inlining and other optimizations). The binary was also >15kB bigger.
2018-01-03 21:13:00 +01:00
wiire-a 8cce17630d Updated README 2018-01-03 17:24:55 +01:00
rofl0r e552d93a50 build tomcrypt sha256 code as separate object 2018-01-03 16:55:20 +01:00
rofl0r fffb4eeea0 use aes cbc code from tomcrypt 2018-01-03 16:55:20 +01:00
rofl0r e9ed76bd49 use tomcrypt for sha256 2018-01-03 16:55:20 +01:00
wiire-a dbb70b14be Removed Android.mk
The standard Makefile can be used for cross-compilation anyway.
2018-01-03 15:21:02 +01:00
wiire-a 9e7ba19ee9 Removed useless include
Not needed anymore since we've moved away from libtommath.c.
2018-01-01 17:36:18 +01:00
rofl0r a07ebfb376 tomsfastmath: further size optimizations
sources list created via

    make clean ; make CC=gcc LDFLAGS="-Wl,--gc-sections" CFLAGS="-O -ffunction-sections"
    readelf -a pixiewps | grep '\.c' | awk '{print "./" $8 " \\"}' > tfm_used.txt

and some manual cleanups.
2018-01-01 17:26:55 +01:00
rofl0r 2b229ba129 tomsfastmath: prefer size over speed
we can disable highly optimized mul/sqr operations for about 30% speed
decrease but saving a lot in binary size.
only build the files necessary by including an explicit list of filenames
rather than doing a wildcard over tfm/*.c.
2018-01-01 17:26:55 +01:00
rofl0r 6985cff7b5 tomfastmath: fix compile with tinycc
compiling with tinycc, we get:

fp_montgomery_reduce.c:510: error: invalid clobber register '%rax'

disabling asm pulls in a couple new files, adding them too.
2018-01-01 17:26:55 +01:00
rofl0r d8e7bba357 use tomsfastmath instead of tommath hack from wpa_supplicant
using latest git version from https://github.com/libtom/tomsfastmath
2018-01-01 17:26:55 +01:00
wiire-a 7576a68717 Fixed UB due to int promotion before shifting of u8 values
Added casts to u32 for 'rcons' and 'Td4s' which are of type uint8_t*, so their elements, before being shifted, are promoted to int (not to unsigned int) unless explicitly casted, due to integer promotion rules of the C language.

This caused the "left shift of * by 24 places cannot be represented in type 'int'" error when compiling with GCC's -fsanitize=undefined.

The code is from an old version of wpa_supplicant/hostapd.
2017-12-31 12:43:24 +01:00
wiire-a 6438a9cf29 Fixed struct ie_vtag misalignment access due to not packed struct
This struct must be packed (no padding).

Found with GCC's -fsanitize=undefined.
2017-12-31 11:37:59 +01:00
wiire-a 2fd91f919c Removed typedef with _t suffix
*_t naming convention is reserved for POSIX types
2017-12-31 10:34:53 +01:00
wiire-a 07392b96fd Simplified internal logic on supplied args
Also added possibility to avoid --authkey if known static PKe is used, in which case --r-nonce and --e-bssid must be supplied.
2017-12-30 21:11:10 +01:00
wiire-a 2c8bf618b6 Fixed segfault when -a is not supplied
This is a quick fix. The code should be refactored and the logic adjusted.
2017-12-30 18:01:27 +01:00
wiire-a 9304e82888 Fixed leak if one hash is not supplied 2017-12-30 14:32:59 +01:00
wiire-a 68f72d5d18 Updated .gitignore 2017-12-27 12:30:38 +01:00
wiire-a 5670f8ce0e Use internal flags in Makefile
So one can safely override CFLAGS, CPPFLAGS and LDFLAGS

E.g. make CFLAGS=-Os OPENSSL=1
2017-12-27 12:25:58 +01:00
wiire-a a2f11824bc Updated Makefile 2017-12-27 12:20:59 +01:00
wiire-a d95bf76f33 Removed boilerplate from mbedtls sources 2017-12-27 11:57:31 +01:00
wiire-a 9a69827c41 Fixed broken links in README 2017-12-26 11:09:06 +01:00
wiire-a 80d8d4cae5 Updated README 2017-12-26 11:04:03 +01:00
wiire-a fa4b514369 Moved Makefile to top dir
Also added the installation of the man page.
2017-12-24 16:05:29 +00:00
wiire-a 7ae30e8a08 Removed useless check for PKe 2017-12-23 20:04:08 +01:00
wiire-a a52de0d335 Cosmetic changes 2017-12-23 20:00:16 +01:00