rofl0r
2a24083f33
improve hmac_sha256 cracking speed and re-add option openssl support
2017-11-30 17:20:01 +01:00
wiire-a
5bf902b187
Fixed UB in the new PRNG due to int overflow
2017-11-30 15:48:46 +01:00
wiire-a
feeb389017
Got rid of some warnings
2017-11-30 12:04:33 +01:00
wiire-a
8de0422164
Made static more functions in main file
2017-11-30 11:31:52 +01:00
wiire-a
d73b71803a
Added more useful debugging prints
2017-11-30 11:19:58 +01:00
rofl0r
cf25128e28
fix display of psk for null pin
2017-11-30 01:04:17 +01:00
rofl0r
189a51b6fd
whitespace cleanup
...
fix whitespace errors introduced during refactoring.
2017-11-30 01:04:17 +01:00
rofl0r
bb5c1d1d5f
implement parallel search of es1 nonce for RTL
...
each thread searches 1 seed forward, then 1 seed backwards in time.
the main thread handles the case seed enonce==seed es1.
2017-11-30 01:04:17 +01:00
rofl0r
226c2deb39
prepare find_rtl_es for threadsafe usage
2017-11-30 01:04:17 +01:00
rofl0r
94d6dddc26
fix wrong display of seed for es2
2017-11-29 23:06:48 +00:00
rofl0r
0591369505
find_rtl_es: speed up search by cracking es1 and es2 independently
2017-11-29 21:01:44 +01:00
rofl0r
9d59eda03b
refactor crack() to crack each half separately
2017-11-29 21:01:44 +01:00
rofl0r
5e4d55f55f
remove anylength code temporarily from crack()
...
in preparation of refactoring it to support usage with search for
only one half.
thankfully @binarymaster agreed to re-add it after the refactoring.
2017-11-29 21:01:44 +01:00
rofl0r
c673bedd76
factor pin half checks ouf of crack()
...
maybe due to adding the const to the function params, a small speedup
was noticed on a 8x4Ghz box, searching an empty pin example during
one month now takes 3.9 secs, before this change 4.1 (averages).
2017-11-29 18:15:38 +01:00
rofl0r
ef4eaffd57
calculate hmac_sha256 for empty pin only once
...
since crack() can be called thousands of times, dont waste cpu for
calculating the empty pin over and over again.
2017-11-29 17:22:58 +01:00
rofl0r
707894f2f1
remove dynamic allocation from crack() - simplifies code a lot
...
it's just a couple hundred bytes, less than half a KB anyway - using
malloc there was overkill and had huge error-handling overhead.
2017-11-29 17:22:58 +01:00
rofl0r
c3fc4a81a0
find_rtl_es(): remove duplicated code
...
the code was copy/pasted twice, with the only difference being the
direction of the iteration.
care has been taken not to change the existing logic, even though
it appears it could be simplified further in the added conditional
where i + 1 is added to es1 in one case, and es2 in the other.
2017-11-29 15:03:03 +01:00
rofl0r
f2490d219b
fix DEBUG macros to be usable like a generic function call
...
the macros were broken for use in a context like
if(foo) DEBUG_XXX(); else DEBUG_XXX();
since multiple statements were executed.
2017-11-29 15:03:03 +01:00
wiire-a
efd4c4427a
Merge pull request #73 from rofl0r/refact
...
Factor out code searching RTL es1 and es2 nonces
2017-11-28 21:46:16 +01:00
rofl0r
7725967026
factor out code searching RTL es1 and es2 nonces
2017-11-28 20:44:29 +00:00
wiire-a
e3917d2c83
Updated endianness.h
2017-11-26 16:50:30 +01:00
wiire-a
0c9f51e171
Added contributing message
2017-11-26 12:42:27 +01:00
wiire-a
73a884fbd3
Fixed assignment in conditional expression
2017-11-26 11:39:35 +01:00
wiire-a
ff0beef1b2
Updated usage, deprecated -S
2017-11-25 21:55:24 +01:00
wiire-a
d29099449e
Removed print of N1 if not found
2017-11-25 21:10:47 +01:00
wiire-a
c7a237e3a2
Added .gitignore
2017-11-25 17:33:08 +01:00
wiire-a
962383d50e
Updated README
2017-11-25 13:05:45 +01:00
wiire-a
462cf4e1d3
Updated man page
2017-11-24 19:40:49 +01:00
wiire-a
f734149af2
Switched to compile-time endianness detection
2017-11-24 18:48:40 +01:00
wiire-a
ee43785c68
Adopted consistent code style
2017-11-23 20:04:07 +01:00
wiire-a
fd6f4a28e2
Merge pull request #68 from binarymaster/master
...
Allow to set seed up to 0x7FFFFFFF
2017-11-22 19:50:28 +01:00
Stas'M
5159a6971b
Allow to set seed end to 0x7FFFFFFF
2017-11-22 21:48:16 +03:00
wiire-a
b8c4636d98
Fixed #67
...
Fixed issue of non-termination when using 01/1970 (Unix epoch -> 0) as
ending point on Windows.
Thanks to @rofl0r for fixing it.
2017-11-19 16:17:57 +01:00
wiire-a
6082da892b
Added print of every seed in every mode
2017-11-19 12:17:23 +01:00
wiire-a
455ccbae9c
Fixed wrong type variable
2017-11-19 12:15:42 +01:00
wiire-a
249ed725b9
Updated README
2017-11-18 23:36:00 +01:00
wiire-a
e1f3bbe466
Updated man page
2017-11-18 23:35:16 +01:00
wiire-a
c21e8b061c
Fixed new PRNG false positive issue
2017-11-18 23:33:09 +01:00
rofl0r
7db5fd84f9
implement parallel cracking for ralink
...
since we already had realtek parallelized, let's do the same for
ralink too.
this commit is the result of a collaborative effort between
@wiire-a and myself.
2017-11-18 22:35:26 +00:00
wiire-a
14ad43fa6d
Added crack of pin with -7
...
The two hashes (-s and -z) and -5 must be supplied.
2017-11-16 22:24:13 +01:00
wiire-a
7474c547eb
Shrunk output format
...
The output has been shrunk to fit in 80 columns. To do so the colon ':'
has been removed as a byte separator. Moreover, some names (mostly the
keys), have been shortened. The WPS pin tag has been left unchanged
(except for a couple of spaces in between).
2017-11-16 22:21:06 +01:00
wiire-a
06ce5c870c
Fixed redundant memcpy of E-S1 and E-S2
2017-11-16 14:43:27 +01:00
wiire-a
edd5d30b4c
Added another simpler glibc PRNG
...
With these changes I was able to get a 9% increase in speed on my
laptop.
2017-11-16 14:38:45 +01:00
wiire-a
ceea7143cb
Implemented faster glibc random function
...
The glibc random function has been rewritten is a simpler manner which
should make it faster to execute. Possibly up to a x2 increase in speed.
2017-11-15 19:14:28 +01:00
wiire-a
8b7b4b3172
Updated copyright information
2017-11-15 19:06:56 +01:00
wiire-a
4109810199
Print program version on stdout
...
All the other information is still printed on stderr. The idea to print
them on separate streams was to make it easier from wrappers to get the
version discarding all the other information, however this was never the
case until now.
2017-11-15 13:09:25 +01:00
wiire-a
c47b51baf0
Fixed previous commit
2017-11-15 13:02:56 +01:00
wiire-a
e265a62b1d
Improved auto mode detection
2017-11-15 13:01:25 +01:00
wiire-a
6bdf8e8f37
Fixed a few warnings
...
Warnings were found with GCC, Clang and Cppcheck.
2017-11-13 12:23:44 +01:00
wiire-a
81301b7e71
Fixed potential integer overflow
...
The variable 'i' was of type uint_fast8_t which most compiler typedef as
unsigned char or uint8_t which both (in C99) can hold a number between 0
and 255. This could cause an integer overflow when seed was found in
mode 3 but the the program was unsuccessful to recover the PIN within
the first 255 tries of the first time window set in the future.
This bug was introduced when the constant MODE3_TRIES was increased to
10 minutes (60 * 10 = 600 which is > 255) in commit (d3e4aab).
2017-11-13 11:15:34 +01:00