Commit graph

590 commits

Author SHA1 Message Date
merlokk 73d7bf75c8 small fix #416 2017-10-16 11:33:17 +03:00
Oleg Moiseenko 275d9e61c2 Check keys in hf mf nested and hf mf chk (#414)
Improve hf mf chk and hf mf nested
* hf mf chk. added interrupt of procedure by usb
* extract mifare default keys into separate module
* arm side multisector `hf mf chk`
* hf mf nested. change key search procedure
* hf mf nested. added key check after we have found a key.
* small fix hf list f
* hf mf chk. add timeout (arm side) and some tweaks.
2017-10-15 21:19:34 +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
Oleg Moiseenko 3a05a1e739 reworking magic cheneese card wipe (#365)
Implement hf mf cwipe. Remove wipe parameter from hf mf csetuid.
2017-09-22 19:40:42 +02:00
marshmellow42 8c8317a5e9 fix lf sim fpga download overwrites sim buffer (#391)
* adjust LFSim to download lf fpga prior to setting emulation buffer to prevent buffer overwrite condition if you are coming from HF fpga.
* fix lf sim big buff overwrite with fpga download. Move fix to the buffer download cmd.
2017-09-11 19:18:32 +02:00
marshmellow42 1dae9811f2 Indala fixes - set accurate preamble and start of.. (#385)
.. data for both format types (64 bit and 224 bit)
also adjust 224 bit demod and clone to output and input in PSK2 instead
of PSK1 as this appears to be most common for this format.
2017-08-27 12:10:28 +02:00
pwpiwi 930763e86d Use PolarSSL DES implementation (GPL 2 or later) for both client and firmware (#378)
to prevent licensing issues with ARM-Crypto-Lib (GPL 3 or later)
2017-08-22 10:04:47 +02:00
marshmellow42 fe087813f6 Merge pull request #356 from pwpiwi/low_frequencies
revert removal of quarter frequency support for hi_read_rx_xcorr.v
2017-08-21 15:29:56 -04: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 f2081c4356 adjust lf simulation - fix one bug + attempt... (#369)
... to speed up the loops waiting for carrier signal to go high or low
by only checking for a halt (button press or usbpol) every 1000th loop
iteration.
some users were experiencing modulating reactions to be too slow.
2017-08-08 21:08:59 +02:00
pwpiwi 3f7aaf24fb revert removal of quarter frequency support for hi_read_rx_xcorr.v 2017-07-13 08:48:27 +02:00
Fl0-0 7906cb41ff Improve 'Magic' Mifare tags generation detection & hf mf c* commands magic 4k compatibility (#349)
* Improve 'Magic' Mifare tags detection

* Magic Mifare tags detection and version printing

* Magic s50/1k tag halt error correction for cload and csave

* hf mf c* commands for gen1b

* Use |= for bitwise operation

* gen1b: don't issue wipe command and don't expect response from WUPC1 magic command after a SELECT_UID: old UID display works in hf mf csetuid

* hf mf cgetsc compatibility for 4k

* hf mf csave compatibility for 4k

* hf mf cload compatibility for 4k, suppress halt errors messages for debug level 2

* Revert to MF_DBG_ERROR level in mifare_classic_halt() and don't issue the halt command for gen1b

* Improve 'Magic' Mifare tags generation detection & hf mf c* commands magic 4k compatibility
2017-07-12 15:58:32 +02:00
Henrik Johansson 52244230d3 hitag2 write (#310)
Usage is similar to hitagS write: lf hitag write 24 KEY pagenumber 32bitvalue
* added changlelog entry
2017-07-05 20:16:54 +02:00
marshmellow42 979c76556a fix some iclass reader bugs (#350)
endless loop in reader if no tag was found
button press on pm3 did not cancel.
led_b was left on in some cases
also moved 14b detection to last in hf search to help speed up the
command for the other tags.  14b is slow (does multiple tests)
Thanks to @Fl0-0 and @pwpiwi for their idenfication of some of the
issues.
2017-07-05 18:11:48 +02:00
Iceman 6100040454 Update hfsnoop.c (#338)
fix:  missed a include for usb_poll_validate_length
2017-06-26 08:37:32 +02:00
pwpiwi 893d0fcc49 Merge pull request #337 from Proxmark/iceman1001-patch-4
Iceman1001 patch 4
2017-06-26 07:50:57 +02:00
Iceman d8e61a3004 Update aes.c (#336)
FIX:  coverity scan - improper use of sizeof
2017-06-26 00:52:09 +02:00
Iceman 06ed826c01 Update hfsnoop.c
chg:  enabled snooping function to break on receiving a usbpackage.
2017-06-25 19:39:45 +02:00
Iceman e7fd9f5ff4 Update BigBuf.h
added the header definition
2017-06-25 19:35:59 +02:00
Iceman f4329b1732 Update BigBuf.c
chg:  change from defines to booleans.
add: bigbuf_clear_em(),  empties the reserved emulator part only
2017-06-25 19:35:03 +02:00
Iceman e702439e00 Update fpgaloader.c
CHG:  just making sure the bigbuff is cleared after the zlib played.  So we don't get the random noice that ppl are posting thinking they got a signal.
2017-06-25 19:30:07 +02:00
marshmellow42 34e2af02a4 bug fix for hf iclass reader and iclass detection
memory locations in code are now accurate and the CC output is not
corrupted by the config's crc.

also the looping and flags for what to read are now correctly
implemented in the code.
2017-06-23 13:50:25 -04: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
Iceman c7b2751136 Merge pull request #297 from pwpiwi/hardnested
Implement hf mf hardnested
2017-06-01 14:34:43 +02:00
pwpiwi c48c4d7856 New: implementing hf mf hardnested
This implements the attack described in
	Carlo Meijer, Roel Verdult, "Ciphertext-only Cryptanalysis on Hardened
	Mifare Classic Cards" in Proceedings of the 22nd ACM SIGSAC Conference on
	Computer and Communications Security, 2015
It uses precomputed tables for many bitflip properties (not only two as in the paper)
and is therefore quite efficient. To prevent failing it doesn't do
differential analysis with several nonce bytes' Sum(a8) properties (each of them
may be wrongly guessed) - instead it concentrates on one nonce byte and tries all
Sum(a8) property guesses sequentially (ordered by probability). The brute force phase
makes use of aczid's bit sliced brute forcer (https://github.com/aczid/crypto1_bs).
Includes runtime CPU-detection to leverage modern (and old) SIMD instructions
with a single executable.
2017-05-31 07:30:56 +02:00
ikarus c87c452120 Fix increment on bool variable (#294) 2017-05-26 11:26:27 +02:00
pwpiwi b535053a77 fix hf 15 commands (#293) 2017-05-26 07:10:30 +02:00
marshmellow42 1c70664ae7 finish FSK graph index changes 2017-04-15 16:18:54 -04:00
marshmellow42 b9957414a5 lf read adjustments
add parameter for # bits to read
auto get samples after lf read/snoop (don't need to do a `data samples`
anymore)
add safe function to get DemodBuffer
add some lf demod comments and apply new lf_read function instead of
read then get samples.
fixed output bug in lf t55xx config print
fixed small bug in lf t55xx detect during ST check
2017-04-07 17:28:12 -04:00
marshmellow42 bed24f53c2 no longer need doT55x7Acquisition... 2017-04-05 21:37:04 -04:00
marshmellow42 2229ee897e adjust t55x7 testmode write timing 2017-04-05 21:19:48 -04:00
marshmellow42 bf85d22f96 fix bug in st detect +
adjust nrz t55xx detection to reduce false positives on weak antennas
adjust t55xx read wait to get past initial startup wave.
2017-04-04 17:22:21 -04:00
marshmellow42 b97311b1bd lf improvements
fix noralsy demod bug (st should be true)
fix sprint_bin_break bug (didn't print last bit)
add a function to save/restore demodbuffer
remove redundant countFC call in PSKDemod
clean up pskclockdetect functions
fix indala26decode bug (end of data sometimes not correct)
improve PSK detection / demodulation
improve NRZ detection
improve t55xx commands & fix a few bugs
add t55xx page1 detection - added it to lf search
added experimental t55xx testmode write
2017-04-04 11:52:10 -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
Iceman 1ee7925609 Merge pull request #249 from pwpiwi/parity
Refactor parity functions
2017-03-26 08:28:43 +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
marshmellow42 28598e80c0 hitag sim fix
from
e1778858dd
and http://www.proxmark.org/forum/viewtopic.php?pid=26733#p26733
sim mode should not have the reader field on.
2017-03-25 07:49:53 -04: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
pwpiwi b8e461ff61 Remove local armsrc/stdint.h and fix some other #includes 2017-03-06 19:22:35 +01:00
marshmellow42 62a38cc883 adjust em4x05/em4x69 command timings to...
better conform to datasheet.
2017-02-28 13:18:52 -05:00
marshmellow42 40c6a02bc9 Add a retry loop to hf mf dump
helps get the data dumped even if positioning isn't 100% perfect.

also switched em4x05 commands to WaitUS instead of SpinDelayUs, per
@pwpiwi 's suggestion.
2017-02-28 11:09:42 -05:00
pwpiwi 4c16ae80f0 Code cleanup:
- correctly using stdtypes.h printf and scanf format string macros (PRIx64 et al)
- coverity fixes to client/cmdhfmf.c
- fix linker warning re missing entry point when linking fullimage.elf
2017-02-23 18:29:03 +01:00
marshmellow42 33a1fe9636 small text adjustments plus...
small improvement to fsk clock detect + fixed a bug where it would
default to rf/16 when it couldn't find a valid one...
2017-02-22 10:41:40 -05:00
marshmellow42 34ff898553 fix false positive psk demod with fsk wave
also break out new find start of modulation routine.
2017-02-21 23:00:43 -05:00
marshmellow42 a37228c8c2 shorten em4x05 capture samples
add cap option for 4469
add sample size option for  DoAcquisition so i can limit how many
samples i want to collect.
use with DoPartialAcquisition
2017-02-20 17:39:39 -05:00
marshmellow42 893534d3b5 speed up the em4x05 cmds by only getting 6k...
samples back
2017-02-20 15:06:22 -05:00
marshmellow42 fa1e00cfbb add em4x05 info command
plus some minor adjustments
and added a quick em4x05 test:
bool EM4x05Block0Test(uint32_t *wordData)
if successful very likely the tag is an em4x05 or compatible...
2017-02-20 09:50:00 -05:00
marshmellow42 6980d66b05 add psk to em4x05 reads and tweak psk demod 2017-02-17 14:40:40 -05:00
marshmellow42 c85858f524 minor fixes for FSK demod
works better with EM4x03 and t55x7 tags (in theory)...
2017-02-17 12:59:35 -05:00
marshmellow42 e39a92bb1d em4x05 getting better
got the read/dump cmds working pretty well
some tweaking still left to do.
2017-02-17 01:33:27 -05:00