Commit graph

86 commits

Author SHA1 Message Date
pwpiwi
a4ff62be63
fix 'hf iclass writebl' and 'hf iclass clone' (#896)
* check for correct responses after block updates
* reduce number of tries from 10 to 3
* Allow to override warning on attempt to clone blocks < 5
* add same warning and override option to 'hf iclass writebl'
* some reformatting and minor refactoring
* Drop field after dump and clone functions
* If dumping AA1 with Credit Key, authenticate as Debit Key
* Initialize reader when beginning to clone
2019-12-28 17:03:20 +01:00
pwpiwi
e73c9f1bd4
fix 'hf iclass chk' (#894)
* Check for Credidt Keys as well
* reduce authentication tries from 6 to 3
* correct text in 'hf iclass clone' for 'l' parameter
* some reformatting and whitespace fixes
2019-12-09 08:27:42 +01:00
pwpiwi
28ae37b746
fix 'hf iclass replay' (#888)
* implement option -n for authentication with replayed NR/MAC pairs in 'dump' and 'readbl'
* delete 'hf iclass replay'
2019-12-04 18:34:53 +01:00
pwpiwi
cd028159be implement 'hf iclass snoop -j'
* fix long option --jam
* make room for one more bit for FPGA minor mode
* new mode FPGA_HF_READER_MODE_SEND_JAM
* implement jamming in Handle15693SampleFromReader
2019-11-13 18:03:40 +01:00
pwpiwi
be09ea8603 fix 'hf iclass snoop'
* code deduplication: use ISO15693 snoop function
* speed up SnoopIso15693(), reduce DMA buffer size
* add jamming option '-j' to 'hf iclass snoop'
* fix issue #882
* whitespace fixes
2019-11-13 18:03:39 +01:00
pwpiwi
496bb4be33
fix 'hf iclass' (#879)
* add loooong timeout for UPDATE command
* add flags FLAG_ICLASS_READER_INIT and FLAG_ICLASS_READER_CLEARTRACE
* don't overwrite trace buffer during 'hf iclass dump'
* fix long waiting time when start_time==0 in TransmitTo15693Tag()
* remove some additional debug prints
* refactoring: move helper functions from protocols.c to cmdhficlass.c
* add 'h' and '1' options to 'hf iclass reader' (from RRG repository)
* use correct key when only CreditKey is given in 'hf iclass dump'
* separate select_and_auth
* DropField() on errors
* dump last block in 'hf iclass dump'
* display correct memory size (number of blocks) in 'hf iclass reader' and dump
* more whitespace fixes
2019-11-13 18:00:33 +01:00
pwpiwi
ece38ef311 fix 'hf iclass reader' and 'hf iclass readblk'
* don't do READCHECK when not trying to authenticate
* standard LED handling
* remove unused FLAG_ICLASS_READER_ONLY_ONCE and FLAG_ICLASS_READER_ONE_TRY
* sanity check for negative times in TransmitTo15693Tag()
* increase reader timeout for 'hf 15' functions to be enough for slot 7 answers to ACTALL
* add 'hf iclass permute' inspired by RRG repository
* whitespace fixes
2019-10-27 17:32:22 +01:00
pwpiwi
f31b4cd888 Merge branch 'master' into fix_iclass_sim 2019-10-08 11:54:22 +02:00
pwpiwi
26d0156a46
fix 'hf iclass eload' (thanks to @sherhannn79) 2019-09-30 07:29:20 +01:00
pwpiwi
e49d31c0e7 fix 'hf iclass sim':
* ignore standard iso15693 INVENTORY commands silently
* make iso15693 command decoder more strict (prevent decoding rubbish)
* re-enable sim 3
2019-09-25 14:24:36 +02:00
pwpiwi
5b12974a7f fix 'hf iclass sim':
* chg to reader command decoder in iso15693.c (require no modulation before SOF)
* add 'has_been_low_for' logic to hi_simulate.v (same as in other FPGA modes, default to "no modulation")
* add simulation of chip status (IDLE, ACTIVE, SELECTED, HALTED)
* check ACSN on SELECT
* add simulation of RESELECT
* always check length of reader commands
* fix printing of NR, MAC in sim 2 mode
* fix response length to CHECK command
2019-09-24 19:23:21 +02:00
pwpiwi
0ab9002f36 fix hf iclass sim
* sim 2: add responses to read(1) (Config) and read(5) (AIA)
* sim 2/3: don't restrict CC to 00 bytes only
* sim 3: add responding to read block commands
* sim 2/3: add responding to READ_CHECK_KC
* fix sizes of pre-encoded tag answers
* change default card challenge
* remove commented code
* use #defines instead of numerical constants for simulation modes
* some reformatting
2019-08-31 17:53:14 +02:00
pwpiwi
4be9f36ebe
start updating 'hf mfu' commands (#818)
* use PrintAndLogEx()
* fix some printouts
* some #include refactoring
* whitespace
2019-05-28 07:48:55 +02:00
pwpiwi
aa0b1c431f
Change mbedtls initializers to be compatible with older versions of gcc (#732)
* fix issue #731
2018-12-06 07:53:25 +01:00
Oleg Moiseenko
e0991f6aa7 Get rid of polarssl (#717) 2018-11-23 19:03:46 +01:00
pwpiwi
ad939de501
USB comms: part 4 towards @micolous PR #463
* make uart_communication(), storeCommand() and getCommand() static in comms.c
* move receiver thread creation and respective mutexes to comms.c
* add mutex and signal for tx buffer
* use comms.c for flasher as well
* remove comm functions from client/proxmark3.h
* this completes isolating all USB communication related functions in comms.c
* don't assume a port to be defined by a name. Change parameter in OpenProxmark() to void*
* comms.c: set sp and serial_port_name to NULL when offline
2018-06-03 14:25:20 +02:00
pwpiwi
babca445ff
rework of GetFromBigBuf() (#597)
* this should fix crashes reported in issue #497
* don't allow receiver thread to write directly into arbitrary main thread's memory
* instead use cmdBuffer[] for CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K as well
* add timeout and warning options to GetFromBigBuf(), same as in WaitForResponseTimeoutW()
* move GetFromBigBuf() from data.c to comms.c
* remove data.c and data.h
2018-05-08 07:54:49 +02:00
Iceman
5e4932e846 'hf iclass chk' part3 (#525)
added the options 
E -   target elite keys
R -  interpret dictionary keys as raw (already diversified keys)
2017-12-17 12:53:21 +01:00
Iceman
385c1a5ebc
Update cmdhficlass.c
ADD: 'hf iclass chk'  - new command to check for keys from a dictionary file. 

hf iclass chk h
hf iclass chk f default_iclass_keys.dic
2017-12-15 15:53:58 +01:00
William S. Moses
874572d419 Fix memory bounds error 2017-11-11 16:15:29 -05:00
merlokk
872337e019 change ul_switch_off_field to DropField fix #473 2017-11-11 01:19:34 +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
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
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
67e344df90 iclass - updates
clean up output
allow readblock without authenticating (can read blocks 0, 1, 2, 5
without authenticating.)
add Application Issuer Area to reader output and use it to attempt to
identify legacy vs NOT legacy.
2017-06-21 17:07:55 -04:00
pwpiwi
43534cbad2 Code cleanup:
- correctly use inttypes.h scanf and printf macros (PRIx64 et al)
- fix indendation warnings
2017-02-22 22:45:00 +01:00
marshmellow42
89696b8b24 fixed lf antenna left on bug && some iclass ...
output cleanup by @iceman1001
2016-12-19 09:45:23 -05:00
Martin Holst Swende
b31ef4f510 Merge pull request #162 from marshmellow42/CoverityFixes
Coverity fixes - mainly from @iceman1001 s fork
2016-02-15 18:43:25 +01:00
marshmellow42
38d618baa9 remove redundant llx prix64 defines
remove unused commented out #includes
coverity indicates compressed_fpga_stream.opaque needs to be initialized
to Z_NULL
fgetc returns int
define llu
2016-02-14 14:43:19 -05:00
marshmellow42
165e0775b1 fix possible null if no file found
also initialize filename variable so not null

found by iceman1001
2016-02-14 12:33:07 -05:00
marshmellow42
b0c68b72d3 fix keyNbr entry error checking
coverity scan by iceman1001 found.
2016-02-14 12:26:03 -05:00
marshmellow42
eb5b63b4a6 FIX, Coverity, Argument can't be negative. CID# 212322, ftell(f) can …
…be negative. Not allowed in malloc...
from iceman1001
2016-02-14 12:13:22 -05:00
marshmellow42
7a616c0d70 FIX, Coverity, Argument can't be negative. CID# 212322, ftell(f) can …
…be negative. Not allowed in malloc...
from @iceman1001
2016-02-14 12:06:29 -05:00
marshmellow42
33c795d0bd add check to fread call 2016-02-14 11:07:16 -05:00
William Robinet
b8140ab108 Fix typos 2016-02-11 23:03:15 +01:00
marshmellow42
c4c3af7c16 some @iceman1001 s coverty scan fixes
great work!
2016-01-08 18:26:56 -05:00
Adam Laurie
bc37cfb3eb add support for raw block 3/4 iclass keys 2015-12-19 16:37:32 +00:00
marshmellow42
bbd19beced update books to app_areas. clearer. 2015-07-25 23:24:53 -04:00
marshmellow42
b82d809852 update iClass chip identification 2015-07-25 23:09:07 -04:00
marshmellow42
3ac22ee1cf use read instead of readcheck except to auth 2015-07-23 01:12:02 -04:00
marshmellow42
4d68ec02b2 iclass refactor/cleanup 2015-07-21 14:26:46 -04:00
marshmellow42
aa53efc340 iclass additions
multiple contributors - thanks!
2015-07-20 13:41:40 -04:00
marshmellow42
6ce0e5386a HF Search - refactoring cmds to work with it 2015-05-12 16:45:48 -04:00
Martin Holst Swende
0e6c7336b0 Fixed issue with dumping iclass tags > 2KB in size 2015-04-23 09:50:44 +02:00
Martin Holst Swende
caaf9618ae Minor mod to 'hf iclass read', it now also reads and prints the configuration of the tag found 2015-03-29 21:49:58 +02:00
Martin Holst Swende
1defcf606f More work on iclass full simulation, and some work on iclass tag dump parsing 2015-02-19 10:48:33 +01:00
Martin Holst Swende
b67f7ec359 Further implementation of iclass 'fullsim'. Moved protocol definitions to shared file. Had to add some loclass-function to arm-side to support authentication in fullsim mode 2015-02-18 20:02:44 +01:00
Martin Holst Swende
9a9bcea82b Iclass decrypt error, shouldn't have decrypted block 6 according to Heart of darkness-paper 2015-02-17 23:17:43 +01:00
Martin Holst Swende
41524d8a39 Implemented 'hf iclass decrypt <tagdump>'. This performs the 3des decryption of iclass tag dumps, but requires the decryption file to be present on the filesystem 2015-02-17 22:07:40 +01:00
Martin Holst Swende
a4749080d9 Removed un-implemented 'hf iclass write', it's confusing to have there since there's no actual support for this on the device side 2015-02-14 21:18:39 +01:00