pwpiwi [Mon, 25 Nov 2019 07:38:23 +0000 (08:38 +0100)]
Hitag fixes (#887)
* don't display error message during 'lf search' when no Hitag tag is present
* remove superfluous options in 'lf hitag read'
* fix setting of default threshold when selecting FPGA_CMD_SET_EDGE_DETECT_THRESHOLD major mode
* some refactoring
pwpiwi [Tue, 19 Nov 2019 17:11:26 +0000 (18:11 +0100)]
Merge pull request #884 from pwpiwi/fix_iclass_snoop
* determine and write meaningful times into trace
* 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
* make room for one more bit for FPGA minor mode
* new mode FPGA_HF_READER_MODE_SEND_JAM
* implement jamming in Handle15693SampleFromReader
pwpiwi [Wed, 13 Nov 2019 15:42:29 +0000 (16:42 +0100)]
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
pwpiwi [Wed, 13 Nov 2019 17:00:51 +0000 (18:00 +0100)]
mod 'hf list' (#881)
* switch to argtable command line parsing (i.e. options must now be preceded by '-')
* add option '-r' to display relative times
* add option '-u' to display times in microseconds
* fix: graceful exit if trace is requested from offline PM3
pwpiwi [Wed, 13 Nov 2019 17:00:33 +0000 (18:00 +0100)]
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
pwpiwi [Wed, 30 Oct 2019 17:55:13 +0000 (18:55 +0100)]
Merge pull request #876 from pwpiwi/fix_iclass_reader
fix 'hf iclass reader'
* code deduplication. Use functions from iso15693.c
* speedup CodeIso15693AsReader()
* invert reader command coding. 0 now means 'unmodulated' ( = field on)
* decode SOF only as a valid tag response in Handle15693SamplesFromTag()
* complete decoding of EOF in Handle15693SamplesFromTag()
* determine and write correct times to trace
* FPGA-change: generate shorter frame signal to allow proper sync in StartCountSspClk()
* modify StartCountSspClk() for 16bit SSC transfers
* whitespace in util.c
* add specific LogTrace_ISO15693() with scaled down duration. Modify cmdhflist.c accordingly.
* allow 'hf 15 raw' with single byte commands
* check for buffer overflow, card timeout and single SOF in 'hf 15 raw'
* decode and handle SOF only responses in Handle14443bSamplesDemod()
* allow 1 byte commands with 'hf 14b raw'
* 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 in cmdhficlass.c
pwpiwi [Sun, 27 Oct 2019 15:51:27 +0000 (16:51 +0100)]
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
pwpiwi [Wed, 16 Oct 2019 07:36:37 +0000 (09:36 +0200)]
fix 'hf iclass reader'
* code deduplication. Use functions from iso15693.c
* speedup CodeIso15693AsReader()
* invert reader command coding. 0 now means 'unmodulated' ( = field on)
* decode SOF only as a valid tag response in Handle15693SamplesFromTag()
* complete decoding of EOF in Handle15693SamplesFromTag()
* determine and write correct times to trace
* FPGA-change: generate shorter frame signal to allow proper sync in StartCountSspClk()
* modify StartCountSspClk() for 16bit SSC transfers
* whitespace in util.c
* add specific LogTrace_ISO15693() with scaled down duration. Modify cmdhflist.c accordingly.
* allow 'hf 15 raw' with single byte commands
* check for buffer overflow, card timeout and single SOF in 'hf 15 raw'
pwpiwi [Mon, 21 Oct 2019 19:25:44 +0000 (21:25 +0200)]
Merge pull request #862 from pwpiwi/fix_iclass_sim
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
* sim 2: change default card challenge
* remove commented code
* use #defines instead of numerical constants for simulation modes
* some reformatting and whitespace fixes
* fix debug print on unhandled commands
* deduplicate: use sim functions from iso15693.c
* fix times in tracelog and 'hf list iclass' (sim only)
* don't check parity in 'hf list iclass'
* fix timing in TransmitTo15693Reader()
* add simulation of block 3 and 4 (Kd and Kc) reads
* add simulation of READ4 (4 blocks read)
* FPGA change (hi_simulate.v): avoid spp_clk phase changes
* 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
* implement UPDATE and CHECK[Kc]
* add simulation of multiple pages (PAGESEL by @sherhannn9)
* maintain cipher states per page
* update cipher state after UPDATE commands (@sherhannn9)
* add simulation of personalization mode
* respond with SOF on HALT
* display "\<SOF\>" instead of "0f" in 'hf list iclass'
* standard LED handling
* speedup CodeIso15693AsTag()
* TransmitTo15693Tag(): don't send unmodulated start of SOF
* reduce modulation depth in hi_simulate.v
pwpiwi [Sat, 5 Oct 2019 15:57:16 +0000 (17:57 +0200)]
fix 'hf iclass sim'
* fix tag response timing. iClass differs from ISO15693 in this respect.
* speedup CodeIso15693AsTag()
* TransmitTo15693Tag(): don't send unmodulated start of SOF
* reduce modulation depth in hi_simulate.v
* calculate CRC for configuration block when simulating
* Show real response time instead of planned response time in 'hf list iclass'
pwpiwi [Tue, 1 Oct 2019 19:03:18 +0000 (21:03 +0200)]
fix 'hf iclass sim'
* add simulation of multiple pages (PAGESEL by @sherhannn9)
* maintain cipher states per page
* update cipher state after UPDATE commands (@sherhannn9)
* add simulation of personalization mode
* respond with SOF on HALT
* display "<SOF>" instead of "0f" in 'hf list iclass'
* standard LED handling
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
fix 'hf iclass sim'
* fix debug print on unhandled commands
* deduplicate: use sim functions from iso15693.c
* fix times in tracelog and 'hf list iclass' (sim only)
* don't check parity in 'hf list iclass'
* fix timing in TransmitTo15693Reader()
pwpiwi [Thu, 22 Aug 2019 05:54:55 +0000 (07:54 +0200)]
'lf hitag writer': add Hitag2 password auth
* (PRs 233, 303, 304 by @ViRb3 on https://github.com/RfidResearchGroup/proxmark3)
* replace byte_t by uint8_t
* note that Hitag1 commands are not yet available
* whitespace fixes
* #define Hitag2 commands
* whitespace
* add EOF wait time
* add powerup wait time
pwpiwi [Sat, 10 Aug 2019 21:30:47 +0000 (23:30 +0200)]
chg 'hf mf chk':
* don't repeatedly clear trace while running (PR 243 by @mceloff from https://github.com/RfidResearchGroup/proxmark3)
* standard LED handling
* better check for key file syntax
* get rid of "res" column when printing the result. Show unknown keys more prominent as " ? "
pwpiwi [Thu, 1 Aug 2019 15:01:56 +0000 (11:01 -0400)]
'hf 14a apdu' improvement
(PR 249 by @merlokk on https://github.com/RfidResearchGroup/proxmark3)
* add option to print APDU (if it can be decoded)
* add option to cconstruct extended and normal size APDUs
pwpiwi [Thu, 1 Aug 2019 14:53:26 +0000 (10:53 -0400)]
Implement Originality Signature Check in 'hf mfu info'
* add support for elliptic curve 'secp128r1' to mbedtls library
* change ecdsa_signature_verify() to allow different curves, signature lengths, and skipping hash
* add another public key for Mifare Ultralight EV1
marshmellow42 [Sun, 23 Jun 2019 11:43:56 +0000 (07:43 -0400)]
add lf em 4x05protect plus lf config s option (#833)
* add "samples to skip" for lf config (mainly for lf snoop)
* add lf em 4x05protect command to write protection on em4x05 chips
* fix spacing
* and remove old comment git added back in..
* update changelog
* fix flags - only need 1 bit
mwalker33 [Sun, 16 Jun 2019 05:35:10 +0000 (15:35 +1000)]
T55xx downlink Modes
Changes :
- Added t55xx downlink protocols (long leading reference, leading 0 and 1 of 4)
- Added function to all read to call differnet downlink functions (to match write)
- Update functions to support using differnet downlink modes.
- Added support for calling downlink modes for lf t55 read, write and detect
- Added new function lf t55 bruteforcedl to support downlink modes as well as try each mode
for each password in password file.
for functions with downlink mode extenstion.
e <mode> - OPTIONAL downlink encoding '0' fixed-bit-length (default),
'1' Long Zero Reference,
'2' Leading Zero,
'3' 1 of 4
pwpiwi [Thu, 6 Jun 2019 05:33:12 +0000 (07:33 +0200)]
upgrading 'hf mfu' (#830)
* chg: write new dump file format by @mceloff
* chg: rename 'hf mfu dump' option 'n' to 'f' to align with other commands and RRG repo
* chg: replace ISO14443A_CMD_READBLOCK by MIFARE_CMD_READBLOCK, same for WRITEBLOCK
* fix: mifare_ultra_readblock() returned 14 bytes instead of 16
* chg: param_gethex_ex() now checks maximum output buffer length
* chg: ul_comp_write() was incomplete and for magic testing only
* fix: 16bit ULC counter had been displayed as 32bit
* chg: add check for 7 Byte UID, drop check for ATQA in type identification GetHF14AMfU_Type()
* fix: send HALT instead of dropping field in order to maintain a defined state
* chg: DropField() when command ends
* chg: check for invalid page ranges in 'hf mfu dump'
* fix: print correct lock bits when page range is used
* fix: do not write (incomplete) dumpfile when page range is used
* add: use UID for filename when no filename is given (RRG repo)
* chg: don't clear trace on each ULC authentication, clear trace at beginning of each command
* fix: don't send (DESFire?) deselect command after authentication
* fix parity encryption (thanks to Eloff, http://www.proxmark.org/forum/viewtopic.php?id=6347)
* add support to simulate Mifare Mini, Mifare 2K and Mifare 4K
* change to standard LED handling (A: PM is working, B: reader is sending, C: tag is responding, D: HF field is on)
* NAK on unknown commands
* allow unencrypted HALT
* don't display messages during simulation (or we will miss next reader command)
* use DMA to receive reader command
* switch earlier from send to listen mode
* move ADC initializer to iso14443_setup
* remove remainders of incomplete Mifare 10Byte UID simulation
* show 'short' bytes (7Bits or 8Bits without parity) in 'hf list mf' and 'hf list 14a'
* whitespace
pwpiwi [Sun, 24 Mar 2019 17:11:41 +0000 (18:11 +0100)]
FPGA changes (#803)
* merge hf_rx_xcorr and hf_tx modes into one module with common ssp_clk and ssp_frame
* get rid of most of the warnings when compiling the HF verilog sources
* refactoring the constants in Verilog sources
pwpiwi [Wed, 20 Feb 2019 18:18:12 +0000 (19:18 +0100)]
Add raw HF signal plotting (#786)
* Add raw HF signal plotting
* new fpga module hi_get_trace.v - store A/D converter output to circular buffer on FPGA
* new command 'hf plot' - pull data from FPGA and display it in Graph Window
pwpiwi [Sat, 16 Feb 2019 16:51:04 +0000 (17:51 +0100)]
add tracing functions (#784)
* add trace buffer for PCSC smartcard readers
* new option 'p' in 'hf list' to select PCSC trace buffer
* 'sc list' now supports PCSC smartcard readers
* add 'hf list 14-4' for ISO 14443-4 protocol