RfidResearchGroup / proxmark3

Iceman Fork - Proxmark3
http://www.icedev.se
GNU General Public License v3.0
4k stars 1.05k forks source link

LEGIC Sim broken? #2056

Closed 0none closed 1 year ago

0none commented 1 year ago

Describe the bug

Somewhere between the latest release ("seven") and master, tie ability to simulate a legic prime 1024 was lost. Recompiling and repeating on current master (1a4df13aaec982f66777b06e1231807eaba54979) the B and C lights flicker on, but the reader does not react.

To Reproduce

Steps to reproduce the behavior:

Expected behavior

Loading the same dump file to memory, at "seven" the pm3 (generic) successfully transmits to the reader, in this case a door control system, authenticating the user and opening the door.

Desktop (please complete the following information):

OS: Ubuntu on WSL2 / Windows 11

hw version ``` [ Proxmark3 RFID instrument ] [ CLIENT ] Iceman/master/v4.16717-236-g7f5590d94 2023-07-27 12:06:44 f67bd6537 compiled with............. GCC 12.2.0 platform.................. Linux / x86_64 Readline support.......... present QT GUI support............ present native BT support......... present Python script support..... present Lua SWIG support.......... present Python SWIG support....... present [ PROXMARK3 ] firmware.................. PM3 GENERIC [ ARM ] bootrom: Iceman/master/v4.16717-236-g7f5590d94 2023-07-27 12:06:30 f67bd6537 os: Iceman/master/v4.16717-236-g7f5590d94 2023-07-27 12:06:58 f67bd6537 compiled with GCC 12.2.1 20221205 [ FPGA ] fpga_pm3_lf.ncd image 2s30vq100 2023-07-12 16:12:04 fpga_pm3_hf.ncd image 2s30vq100 2023-07-12 16:12:14 fpga_pm3_felica.ncd image 2s30vq100 2023-07-12 16:12:34 fpga_pm3_hf_15.ncd image 2s30vq100 2023-07-12 16:12:24 [ Hardware ] --= uC: AT91SAM7S512 Rev B --= Embedded Processor: ARM7TDMI --= Internal SRAM size: 64K bytes --= Architecture identifier: AT91SAM7Sxx Series --= Embedded flash memory 512K bytes ( 60% used ) ```
hw status ``` [#] Memory [#] BigBuf_size............. 42400 [#] Available memory........ 42400 [#] Tracing [#] tracing ................ 1 [#] traceLen ............... 0 [#] Current FPGA image [#] mode.................... fpga_pm3_hf.ncd image 2s30vq100 2023-07-12 16:12:14 [#] LF Sampling config [#] [q] divisor............. 95 ( 125.00 kHz ) [#] [b] bits per sample..... 8 [#] [d] decimation.......... 1 [#] [a] averaging........... yes [#] [t] trigger threshold... 0 [#] [s] samples to skip..... 0 [#] [#] LF T55XX config [#] [r] [a] [b] [c] [d] [e] [f] [g] [#] mode |start|write|write|write| read|write|write [#] | gap | gap | 0 | 1 | gap | 2 | 3 [#] ---------------------------+-----+-----+-----+-----+-----+-----+------ [#] fixed bit length (default) | 31 | 20 | 18 | 50 | 15 | N/A | N/A | [#] long leading reference | 31 | 20 | 18 | 50 | 15 | N/A | N/A | [#] leading zero | 31 | 20 | 18 | 40 | 15 | N/A | N/A | [#] 1 of 4 coding reference | 31 | 20 | 18 | 34 | 15 | 50 | 66 | [#] [#] HF 14a config [#] [a] Anticol override.... std ( follow standard ) [#] [b] BCC override........ std ( follow standard ) [#] [2] CL2 override........ std ( follow standard ) [#] [3] CL3 override........ std ( follow standard ) [#] [r] RATS override....... std ( follow standard ) [#] Transfer Speed [#] Sending packets to client... [#] Time elapsed................... 500ms [#] Bytes transferred.............. 286720 [#] Transfer Speed PM3 -> Client... 573440 bytes/s [#] Various [#] Max stack usage......... 4088 / 8480 bytes [#] Debug log level......... 1 ( error ) [#] ToSendMax............... -1 [#] ToSend BUFFERSIZE....... 2308 [#] Slow clock.............. 29609 Hz [#] Installed StandAlone Mode [#] LF HID26 standalone - aka SamyRun (Samy Kamkar) [#] ```
data tune ``` [=] ---------- Reminder ------------------------ [=] `hw tune` doesn't actively tune your antennas, [=] it's only informative. [=] Measuring antenna characteristics, please wait... 🕛 9 [=] ---------- LF Antenna ---------- [+] LF antenna: 42.15 V - 125.00 kHz [+] LF antenna: 32.99 V - 134.83 kHz [+] LF optimal: 42.91 V - 126.32 kHz [+] Approx. Q factor (*): 7.3 by frequency bandwidth measurement [+] Approx. Q factor (*): 12.5 by peak voltage measurement [!] ⚠ Contradicting measures seem to indicate you're running a PM3GENERIC firmware on a RDV4 [!] ⚠ False positives is possible but please check your setup [+] LF antenna is OK [=] ---------- HF Antenna ---------- [+] HF antenna: 30.74 V - 13.56 MHz [+] Approx. Q factor (*): 8.9 by peak voltage measurement [+] HF antenna is OK (*) Q factor must be measured without tag on the antenna [+] Displaying LF tuning graph. Divisor 88 (blue) is 134.83 kHz, 95 (red) is 125.00 kHz. ```


Additional context

iceman1001 commented 1 year ago

hmm.. I see, pull latest and see if it works better again?

0none commented 1 year ago

Unfortunately the situation seems unchanged

0none commented 1 year ago

Reverting the changes made to armsrc/legicrfsim.c in commit c70e5beeac7229605690230985e029031ae37a59 seems to fix the issue for me, tough I am not exactly sure what exactly causes it. Sorry if this is vague, I'm not a programmer.

iceman1001 commented 1 year ago

hm.. pull latest and test again

0none commented 1 year ago

Sorry for the delay. Doesn't seem to have worked.

iceman1001 commented 1 year ago

Pull latest and it should work just fine again