Commit graph

164 commits

Author SHA1 Message Date
pwpiwi
664e132f88 hf mf mifare:
* prevent WDT crash on repeated tries
* comes with faster execution as side effect
* use uint8_t instead of byte_t
* populate ar instead of (correctly) assuming that it is zero
* remove the "will take a few seconds longer" message because it is no longer true
2018-02-08 14:51:24 +01:00
merlokk
35cc71b075 delete opposite states fix 2018-01-17 14:10:26 +02:00
merlokk
feb328c90a hf mf sniff small fix 2018-01-16 14:34:04 +02:00
Oleg Moiseenko
8ec06f5ef3 hf mf sniff: small fixes 2018-01-12 22:37:55 +01:00
pwpiwi
fa85b08504 fix iso14a_set_timeout() adjustment 2017-12-11 20:40:09 +01:00
pwpiwi
7c7327e7c8 fix: hf mf hardnested failed with new WUPA timing
* allow additional 2 ssp_frame cycles to detect SOF
* use only respective functions to get/set iso14a_timeout
* remove waiting time in MifareAcquireEncryptedNonces(). This is covered by GetATQA() now.
2017-12-10 19:27:46 +01:00
pwpiwi
47b78133a0 minor iso14443a timing fixes to avoid select errors:
* take setup frame guard time (SFGT) into account
* adjust iso14a_timeout by FPGA delays
* don't give up on first WUPA. Retry several times
2017-11-22 19:43:12 +01:00
pwpiwi
db68bcdb06
Complete WTX handling 2017-11-15 07:47:18 +01:00
merlokk
ba4f95b4af added some info from @peterfillmore fork 2017-11-11 23:05:08 +02:00
merlokk
a63505c953 Added work with S-Block WTX in 14a apdu on arm side 2017-11-11 22:56:50 +02:00
Iceman
e464f62258
Merge pull request #462 from pwpiwi/fix_hfmfsim
Fix hf mf sim (issue #412)
2017-11-10 18:07:25 +01:00
merlokk
b7d3e89923 changed iso14aapdu arm side and client 2017-11-09 16:39:40 +02:00
merlokk
eb6e8de45d moved includes, added clear_trace flag (it was there...) and fixed multiapdu iso14443 stream 2017-11-03 13:42:38 +02:00
pwpiwi
82f4955245 Merge branch 'master' into fix_hfmfsim 2017-11-02 21:37:42 +01:00
pwpiwi
b35e04a7c6 fix hf mf sim:
* more timing fixes
* correctly determine correction bit (taken from iceman's fork)
* add checking of Access Conditions for Read command
* never allow reading KeyA
2017-11-02 21:29:08 +01:00
Oleg Moiseenko
378d3406ca
Merge branch 'master' into 14a_rework3 2017-11-02 14:14:55 +02:00
Oleg Moiseenko
83df98d691 change comment in iso14443a.c (#459) 2017-11-01 17:44:43 +01:00
merlokk
499df9088d fix behavier reading iso14443-3 and iso14443-4 cards 2017-11-01 18:34:15 +02:00
merlokk
7376da5c44 revert SAK check 2017-11-01 18:22:03 +02:00
merlokk
bed3e4c20d Merge branch 'master' of github.com:merlokk/proxmark3 into 14a_rework3 2017-11-01 17:13:27 +02:00
merlokk
89ec86abd2 now SAK check is OK 2017-11-01 17:02:35 +02:00
merlokk
c5e9a0212e deleted condition in iso14a select (sak & 0x20 ==0) - error. Usually SAK = 88 2017-11-01 16:55:12 +02:00
merlokk
f1a983a330 fixed bug in CmdHF14ACmdRaw: if we cant select we send command anyway... 2017-10-30 17:58:43 +02:00
Oleg Moiseenko
618c220c38 small fixes in ReaderIso14443a() (#446) 2017-10-29 16:34:51 +01:00
pwpiwi
bb04ef216d small fix: make iso14a_set_timeout() external 2017-10-20 20:20:07 +02:00
pwpiwi
6e49717b5e fix hf mf sim (issue #412) (#419)
* move to separate files mifaresim.[ch]
* check CRC of commands
* don't execute commands without successfull authentication
* ensure correct timing of REQA, WUPA, ANTICOL and SELECT responses
* trace reader commands immediately, only fix start time after tag response. Decreases time to be ready for next reader command.
* remove iso14443-4 remnants
* trace raw reader commands instead of decrypted ones
* some refactoring

* fix hf mf sim
* timing: decrease time to get ready for new reader commands
2017-10-20 17:55:13 +02:00
pwpiwi
c04a4b60ce Don't do iso14443-4 select for mifare emulations on processor cards (IDPrime, SmartMX, ...) 2017-10-01 17:52:10 +02:00
etmatrix
4efdfbe638 Fixes 2 bugs in mifare simulate (#380)
- Check button press when there is NOFIELD, so we can exit also without FIELD
- struct nonces_t is moved to include/mifare.h so client and arm has the same definition
2017-08-17 16:59:48 +02:00
marshmellow42
3d542a3dfa coverity scan bug fixes
mfu keyNo buffer overflow
mf reader attack key count reduced to not overrun c.d.asBytes buffer.
2017-06-06 12:12:18 -04:00
pwpiwi
de77d4acde add: iceman1001's idea to reuse @pwpiwi's fast select without anticollision to speedup hf mf chk
(see http://www.proxmark.org/forum/viewtopic.php?id=2920)
2017-03-27 10:29:44 +02:00
pwpiwi
1f065e1dad Refactor parity functions
- get rid of __asm function in crapto1.h, use gcc builtin function instead
- make parity functions available in common directory
2017-03-25 22:03:17 +01:00
pwpiwi
33443e7caa Code cleanup: deduplicate crapto1 library (#228)
- merge the existing 4 crapto1 sources into common/crapto1
2017-03-09 11:12:50 +01:00
Michael Farrell
5b5489baf4 hf mf sim: Multiple fixes from review of PR #209.
- Don't increment the nonce when random mode is disabled (this breaks the
  standard attack).

- Don't attempt the standard attack when random mode is enabled (there's no
  point as it won't work, per comments from @pwpiwi).

- Attempt the moebius attack if the standard attack fails.
2017-01-26 20:30:13 +11:00
Michael Farrell
f9c1dcd9f6 Adds random nonce (r) option to hf mf sim.
This makes the PM3 generate pseudo-random nonces rather than sequential
nonces, to make it act a bit more like a "real" MFC card.  A reader would
otherwise be able to detect the PM3 probing based on the predictable nonces
and throw different authentication challenges (or refuse to authenticate at
all).

The code includes an implementation of a rand-like function (prand), similar
to the one from libc, which is seeded automatically based on the time it
takes between the PM3 starting up and the first call to the RNG.

This isn't cryptographically random, but should be "good enough" to be able
to evade basic detection.
2017-01-26 18:32:25 +11:00
marshmellow42
91f4d53123 couple bug fixes - clean up 2016-06-28 21:02:26 -04:00
marshmellow42
76ef5273d8 hf mf sim code cleanup - update changelog 2016-06-27 00:09:40 -04:00
marshmellow42
73ab92d14c mf 1k sim reader attack cleanup
add abort options - keyboard & button press.
2016-06-25 00:53:53 -04:00
marshmellow42
6eae192c41 fix bug in moebius nonce collection - now finishes
also cleaned up some comments
note previous update added the creation of a stats.txt file to generate
statistics of the differences between std mfkey32 and the moebius
version.
2016-06-24 16:46:11 -04:00
marshmellow42
c872d8c177 update hf mf sim x attack mode - start 10byte uid..
..support  (some from @iceman1001)
(sim reader attack currently testing std mfkey32 vs mfkey32_moebius
version...)  possibly will remove one later.
2016-06-24 01:31:27 -04:00
marshmellow42
79dcb9e090 improve hf mf sim x reader attack
can now directly extract multiple keys for multiple sectors
2016-06-22 11:03:37 -04:00
pwpiwi
d9cc4e1ae2 Merge branch 'master' into topaz. Update Changelog. 2015-10-27 20:57:16 +01:00
pwpiwi
8c6b22980c hf mf mifare: (finally) fix watchdog reset
- minor changes to sync
- try alternative strategies when debugging
2015-10-10 15:04:17 +02:00
pwpiwi
dfb387bf0f hf mf mifare:
- gracefully exit on unsuccessful syncs instead of hard watchdog reset
2015-09-30 20:59:50 +02:00
pwpiwi
8e21541e77 Merge branch 'master' into topaz 2015-08-25 07:53:00 +02:00
Craig Young
c89274cc60 Stand Alone Mode changes for NFC (part 2) 2015-07-25 14:35:14 -04:00
pwpiwi
db2b81ba11 Merge branch 'master' into topaz
Conflicts:
	client/Makefile
	client/cmdhf.c
	client/cmdhf14a.c
2015-07-01 08:17:00 +02:00
pwpiwi
09ffd16ee2 - fix: ensure that FpgaDownloadAndGo() is always called before requesting
any memory from BigBuf[]. This is required because FpgaDownloadAndGo() might
  allocate, use, and free most of BigBuf[] when decompressing FPGA configs.
- cleanup: remove rests of deprecated "end of trace markers" (0x44)
2015-06-29 09:08:52 +02:00
pwpiwi
dc8ba239fb (implementing suggestion #94)
hf mf mifare: gracefully exit if tag isn't vulnerable to this attack
hf mf nested: dito
2015-06-25 08:32:29 +02:00
marshmellow42
e35031d2b7 MFU code cleanup - final ?
fixed bug in debug print in MF 1k sim.
2015-05-27 17:21:42 -04:00
marshmellow42
e9b8d0dd6e Iceman's mf sim 7bt UID fix from #97 2015-04-28 15:43:58 -04:00