Commit Graph

229 Commits

Author SHA1 Message Date
taichunmin 06a873fca4 fix linter 2025-08-13 00:51:16 +08:00
taichunmin c396d06baa hf mf elog --decrypt skip records with found keys 2025-08-12 04:17:42 +08:00
Foxushka d95112f821 Bump NETDATA_MAX_DATA_LENGTH from 512 to 4096
USB + BLE are tested
Closes #272
2025-08-09 17:51:57 +03:00
TeCHiScy 098e0a914b feat: add lf HIDProx read, t55xx write, emulate function (#267)
* feat: add lf HIDProx read, t55xx write, emulate function

code quaility:
- consistance: simulation -> emulation, label -> tag
- machine translated unreadable comments are made native

logic:
- newly added cli command includes: `lf hid prox read`, `lf hid prox write`, `lf hid prox econfig`
- machester demodulator is simplified
- various wiegand formats of HIDProx are supported
- goertzel algorithm is used in  HIDProx FSK demod
- lf read is refactored using stream/feed pattern to boost scan speed
- t55xx write is refactored to share same logic between em410x & HIDProx
- lf emulating is refactored to use PWM peripheral, allowing more card type to be added

closes: #212, #210

* chore: remove not implemented wiegand format comments

* fix: build ci

* fix: build ci

* fix: build ci

* fix: build ci
2025-08-04 07:01:53 +02:00
Foxushka cf00761902 Key recovery via backdoor for static encrypted nonce cards (#263)
* Implement MF1_ENC_NESTED_ACQUIRE in firmware

* Implement MF1_ENC_NESTED_ACQUIRE in software + fix code formatter

* Remove xz and pthreads from sources, use CMake FetchContent

* Update changelog

* lzma.h

* Update CMakeLists.txt

* Update CMakeLists.txt

* Probably fix workflow taking wrong commit for building

* Fix CMake building tools into bin/Debug on Windows

* Added cmd for fetching all slots nicks (without 16 commands)

* Fix type and use temp directory instead cwd (https://github.com/RfidResearchGroup/ChameleonUltra/pull/261)

* Fix endian for mfu_read_emu_counter_data and mfu_write_emu_counter_data

* Fix  --key interpreted as list
2025-08-01 22:12:07 +02:00
AbyssAndromalius 303d2d31e1 Mifare Ultralight - Shadowmode (#251)
* Adding shadow mode to UltraLight

* Syncing with main repos

---------

Co-authored-by: AbyssAndromalius <abyss@barbed.fr>
2025-04-21 18:04:24 +02:00
zeusricote 2b0d02f12e complete hardnested attack implementation (#254)
* hardnested test fixed, increased timeout on mf1_hard_nested_acquire to fix cmd exec timeout on clone

* hardnested recovery(cli command not yet ready), based in noproto/HardnestedRecovery

* removed compiled binary

* Hardnested cli ready

* removed some unnecesary files

* removed unnecesary cached files

* cmake now builds hardnested too

* removed license.md

* added liblzma source(should fix checks not passing)

* i missed a line

* trimmed xz sources

* cmake now links local liblzma.a

* third try(warning solved)

* cmake now builds and links correcctly liblzma.a

* xz-5.8.1 vfolder renamed to xz

* fixed paths

* runner test

* removed wrong placed check

* disable landlock under windows

* missing files

* missing files

* windows strtok fix

* corrected lzma path under windows

* fix

* set release config for liblzma

* corrected path

* trailing_zeros

* msclock

* msclock integer issue

* msclock missing header

* fallback if not using msvc

* deleted include by accident

* revert clock change

* change custom target for custom command

* windows fmemopen implementation

* wrong path

* wrong name

* use fmemopen only when not using msvc

* use fmemopen.h when building on windows, non msvc

* re-add static link

* wrong filename

* pthread handling for mingw(proxspace)

* cleanup
2025-04-18 23:53:25 +02:00
Niel Nielsen 63bd0cb22e Update chameleon_cli_unit.py
Defined a working function load_key_file(import_key, keys) for command hf mf fchk  --key

function  load_dic_file(import_dic, keys) is empty for now, to prevent an error when executing hf mf fchk  --dic
2025-04-03 13:55:38 +02:00
dxl 3f6f5ac9c1 Hardnested nonces acquire implemented. 2025-04-02 12:32:27 +08:00
dxl a4b3adad48 Reuse the 'STATUS_PAR_ERR' & Add an interface
1. Added 'cmd_processor_mf0_ntag_get_emu_page_count' interface to get available page count of mf0.
2. We can reuse the 'STATUS_PAR_ERR', and we can delete repeated cmd 'STATUS_INVALID_PARAMS'.
2024-07-16 12:47:47 +08:00
dxl e98bb76926 Add 'MF0_NTAG_GET_PAGE_COUNT' for get available page count of mf0. 2024-07-16 12:43:16 +08:00
turbocool3r 25a1230865 Fix hf mfu econfig not working for NTAG 210/212. 2024-07-15 03:18:14 +03:00
turbocool3r d1c9b4b21b Fix hf mfu e(r|w)cnt commands switching device into reader mode. 2024-07-15 02:35:37 +03:00
turbocool3r f1e2250178 Add support for NTAG 210/212. 2024-07-15 02:34:45 +03:00
turbocool3r a428377878 Make hf mfu dump command properly detect card size. 2024-07-15 01:19:59 +03:00
turbocool3r 3fe0a5f79d Fix hf mfu rcnt command. 2024-07-09 21:30:52 +03:00
turbocool3r 607df41bca Add a command to reset MF0 / NTAG unsuccessful auth counter. 2024-07-09 21:30:27 +03:00
turbocool3r cf109f94b2 Detect NAKs in hf mfu wrpg command. 2024-07-09 21:09:16 +03:00
turbocool3r a52bb989e9 Fix hf mfu dump command not running without file. 2024-07-09 21:03:57 +03:00
turbocool3r 0ce920cfcc Add hf mfu ercnt/ewcnt commands for reading and writing emulator's counters. 2024-07-09 17:11:42 +03:00
turbocool3r ff58d97dd9 Add hf mfu esave command. 2024-07-09 00:58:07 +03:00
turbocool3r b5259c313a Add --type argument to eload and dump commands. 2024-07-09 00:57:43 +03:00
turbocool3r 103d51ce64 Properly detect auth failures in hf mfu subcommands. 2024-07-08 01:04:23 +03:00
turbocool3r 4aa6b3c0fc Fix file output in hf mfu dump command. 2024-07-08 00:52:39 +03:00
turbocool3r bdcf5d5851 Fix hf mfu rdpg not exiting when data is not properly aligned. 2024-07-08 00:34:08 +03:00
turbocool3r 37f2b0783c Add hf mfu eload command. 2024-07-08 00:33:33 +03:00
turbocool3r 1bf23cdf08 Make MFUAuthArgsUnit parse key and swap arguments automatically. 2024-07-07 20:09:25 +03:00
turbocool3r ddcffba26f Fix a bug in hf mfu signature command. 2024-07-07 01:14:43 +03:00
turbocool3r 297cb061cb Add support for custom version and signature data for MF0 / NTAG emulator. 2024-07-05 16:30:38 +03:00
turbocool3r 18d5da09dd Add hf mfu signature command. 2024-07-05 16:04:16 +03:00
turbocool3r eafa14e4e5 Add hf mfu eview command. 2024-07-05 03:32:23 +03:00
turbocool3r 9488127531 Add commands for reading and writing to/from MF0/NTAG emulator memory. 2024-07-05 02:58:15 +03:00
turbocool3r 2da6d35784 Improvements to MFU / NTAG cli commands.
Added `wrbl` and `rcnt` commands for writing blocks and reading counters. Added `-P` parameter to all commands that may need it to allow prior auth with a 4-byte password. `dump` command now dumps all pages until it fails rather than just the first 16 pages when no `-q` parameter is provided. Added `version` command to allow requesting version bytes.
2024-07-03 03:04:25 +03:00
turbocool3r 248f3b2839 Add support for Ultralight emulation.
This version only emulates MF0ICU1 properly.
2024-06-19 22:55:43 +03:00
simonemarfo 0bc01f565a Add CLI view commands to display memory content (#208)
* Add utility to print memory dump (xxd like)

* Add CLI eview. Dump emulation memory data

* Add CLI view. Display content from tag memory or dump file

---------

Co-authored-by: marfo <marfo@localhost.localdomain>
2024-04-24 10:51:11 +08:00
Peter-Simon Dieterich 22b7898f20 cli: Fix cmd_parameter generation for nested for python 3.9 (#205)
Signed-off-by: Peter-Simon Dieterich <peter-simon.dieterich@vaillant-group.com>
2024-03-13 18:22:17 +08:00
戴均民 c1eb213d4a Added command to check keys of multiple sectors at once (#199)
thx @taichunmin
2024-03-07 15:07:12 +08:00
Peter-Simon Dieterich 1608892140 cli: fix unused target key type parameter for nested (#204)
* cli: fix unused target key type parameter for nested
* Added entry to CHANGELOG.md
2024-03-07 14:57:11 +08:00
Pierre Lalet e3cbd598ec CLI: skip already used items in hf mf elog --decrypt
This (often largely) improves the speed of the decrypt process. On my
laptop, with the same logs (37 records for one block and 37 records
for another block), here are the performances, as measuerd using a
simple command:

```bash
time echo -e "hw connect\nhf mf elog --decrypt\nhw disconnect" | ./chameleon_cli_main.py
```

- Before parallelisation (#187): 14m59,277s
- With parallelisation (current main): 6m13,513s
- With item skipping (this PR): 2m42,491s
2023-12-20 22:37:47 +01:00
Pierre Lalet cc674f1669 CLI: fix mfkey32v2 call for Windows 2023-12-20 16:20:12 +01:00
Pierre Lalet 42317a7bc4 CLI: parallelize mfkey32v2 processes 2023-12-20 16:20:12 +01:00
Philippe Teuwen af91ddcda9 CLI: Do not execute a command if help is printed
Previously, for example `hf 14a raw -b 7 -d 26 -h` was printing help but it was also executing the command.
2023-11-15 09:44:37 +01:00
taichunmin e79568298f Added support for mifare classic value block operations 2023-11-13 23:38:56 +08:00
Philippe Teuwen 4d670f051a Be robust to some argparse string variants 2023-11-06 22:45:48 +01:00
Philippe Teuwen ecf3c06886 add regression tests 2023-10-25 00:32:31 +02:00
Philippe Teuwen 7d851d2a22 reorganize a bit cli to allow autotests 2023-10-24 23:46:34 +02:00
Philippe Teuwen d973ee6671 add hw disconnect (for autotests) 2023-10-24 23:45:42 +02:00
Philippe Teuwen ece5e79060 typechecking fixes 2023-10-24 23:44:56 +02:00
Philippe Teuwen d77e166249 pep287 2023-10-24 00:57:44 +02:00
Philippe Teuwen ff3df15278 misc lint 2023-10-23 23:57:23 +02:00