From 1234b081329096cb6f9ade265beae429fc2c2c24 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 28 Sep 2023 08:46:04 +0200 Subject: [PATCH] adapt to new sim module firmware version --- Makefile | 2 +- client/src/cmdsmartcard.c | 6 +-- doc/cheatsheet.md | 2 +- .../Troubleshooting.md | 6 +-- .../2_Configuration-and-Verification.md | 54 ++++++++++++++----- doc/path_notes.md | 2 +- tools/pm3_online_check.py | 2 +- tools/pm3_tests.sh | 2 +- 8 files changed, 52 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 64b0aa6ab..c86e765a6 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ all clean install uninstall check: %: client/% bootrom/% armsrc/% recovery/% mfk #all clean install uninstall check: %: hitag2crack/% INSTALLTOOLS=pm3_eml2lower.sh pm3_eml2upper.sh pm3_mfdread.py pm3_mfd2eml.py pm3_eml2mfd.py pm3_amii_bin2eml.pl pm3_reblay-emulating.py pm3_reblay-reading.py -INSTALLSIMFW=sim011.bin sim011.sha512.txt sim013.bin sim013.sha512.txt +INSTALLSIMFW=sim011.bin sim011.sha512.txt sim013.bin sim013.sha512.txt sim014.bin sim014.sha512.txt INSTALLSCRIPTS=pm3 pm3-flash pm3-flash-all pm3-flash-bootrom pm3-flash-fullimage INSTALLSHARES=tools/jtag_openocd traces INSTALLDOCS=doc/*.md doc/md diff --git a/client/src/cmdsmartcard.c b/client/src/cmdsmartcard.c index cf6cbe67d..da11873e9 100644 --- a/client/src/cmdsmartcard.c +++ b/client/src/cmdsmartcard.c @@ -523,16 +523,16 @@ out: } static int CmdSmartUpgrade(const char *Cmd) { - PrintAndLogEx(INFO, "-------------------------------------------------------------------"); + PrintAndLogEx(INFO, "--------------------------------------------------------------------"); PrintAndLogEx(WARNING, _RED_("WARNING") " - sim module firmware upgrade"); PrintAndLogEx(WARNING, _RED_("A dangerous command, do wrong and you could brick the sim module")); - PrintAndLogEx(INFO, "-------------------------------------------------------------------"); + PrintAndLogEx(INFO, "--------------------------------------------------------------------"); PrintAndLogEx(NORMAL, ""); CLIParserContext *ctx; CLIParserInit(&ctx, "smart upgrade", "Upgrade RDV4 sim module firmware", - "smart upgrade -f sim013.bin" + "smart upgrade -f sim014.bin" ); void *argtable[] = { diff --git a/doc/cheatsheet.md b/doc/cheatsheet.md index a859f4392..c25b7f486 100644 --- a/doc/cheatsheet.md +++ b/doc/cheatsheet.md @@ -712,7 +712,7 @@ pm3 --> mem load -f iclass_default_keys --iclass Upgrade Sim Module firmware ``` -pm3 --> smart upgrade -f sim013.bin +pm3 --> smart upgrade -f sim014.bin ``` ## Smart Card diff --git a/doc/md/Installation_Instructions/Troubleshooting.md b/doc/md/Installation_Instructions/Troubleshooting.md index d63e49b75..a0982a3c0 100644 --- a/doc/md/Installation_Instructions/Troubleshooting.md +++ b/doc/md/Installation_Instructions/Troubleshooting.md @@ -163,9 +163,9 @@ proxmark3 --flash --image /usr/local/share/proxmark3/firmware/f proxmark3 --flash --image /usr/share/proxmark3/firmware/fullimage.elf using the script: -pm3 --> smart upgrade -f /usr/local/share/proxmark3/firmware/sim013.bin +pm3 --> smart upgrade -f /usr/local/share/proxmark3/firmware/sim014.bin <> -pm3 --> smart upgrade -f /usr/share/proxmark3/firmware/sim013.bin +pm3 --> smart upgrade -f /usr/share/proxmark3/firmware/sim014.bin ``` If you didn't install the Proxmark but you're working from the sources directory and depending how you launch the client, your working directory might be the root of the repository: @@ -188,7 +188,7 @@ client/proxmark3 --flash --image armsrc/obj/fullimage.elf <> ./proxmark3 --flash --image ../armsrc/obj/fullimage.elf -pm3 --> smart upgrade -f sim013.bin +pm3 --> smart upgrade -f sim014.bin ``` etc. diff --git a/doc/md/Use_of_Proxmark/2_Configuration-and-Verification.md b/doc/md/Use_of_Proxmark/2_Configuration-and-Verification.md index 791605f17..d40dc50ff 100644 --- a/doc/md/Use_of_Proxmark/2_Configuration-and-Verification.md +++ b/doc/md/Use_of_Proxmark/2_Configuration-and-Verification.md @@ -40,7 +40,7 @@ Set all t55xx settings to defaults (will set all 4 at once) To make sure you got the latest sim module firmware. -_Latest version is v4.12_ +_Latest version is v4.42_ ``` [usb] pm3 --> hw status @@ -57,44 +57,50 @@ or #db# Smart card module (ISO 7816) #db# version.................v3.11 +or + +#db# Smart card module (ISO 7816) +#db# version.................v4.13 + + ``` These versions is obsolete. -If you didn't download sim013.bin from the RRG Repo be aware that it might be corrupted or faulty. +If you didn't download sim014.bin from the RRG Repo be aware that it might be corrupted or faulty. You find a hash text file in this folder. It was generated with the following linux command. ``` -sha512sum -b sim013.bin > sim013.sha512.txt +sha512sum -b sim014.bin > sim014.sha512.txt ``` -You should validate the sim013.bin file against this hash file in order to be sure the file is not corrupted or faulty. +You should validate the sim014.bin file against this hash file in order to be sure the file is not corrupted or faulty. The following command upgrades your device sim module firmware. Don't not turn off your device during the execution of this command!! Even its a quite fast command you should be warned. You may brick it if you interrupt it. ``` -[usb] pm3 --> smart upgrade -f /usr/local/share/proxmark3/firmware/sim013.bin +[usb] pm3 --> smart upgrade -f /usr/local/share/proxmark3/firmware/sim014.bin # or if from local repo -[usb] pm3 --> smart upgrade -f sim013.bin +[usb] pm3 --> smart upgrade -f sim014.bin ``` You get the following output if the execution was successful: ``` -[=] ------------------------------------------------------------------- +[=] -------------------------------------------------------------------- [!] ⚠️ WARNING - sim module firmware upgrade [!] ⚠️ A dangerous command, do wrong and you could brick the sim module -[=] ------------------------------------------------------------------- +[=] -------------------------------------------------------------------- -[=] firmware file sim013.bin -[=] Checking integrity sim013.sha512.txt -[+] loaded 866 bytes from binary file sim013.bin -[+] loaded 141 bytes from binary file sim013.sha512.txt +[=] firmware file sim014.bin +[=] Checking integrity sim014.sha512.txt +[+] loaded 3658 bytes from binary file sim014.bin +[+] loaded 158 bytes from binary file sim014.sha512.txt [=] Don't turn off your PM3! [+] Sim module firmware uploading to PM3... - 🕑 864 bytes sent + 🕑 3658 bytes sent [+] Sim module firmware updating... [#] FW 0000 [#] FW 0080 @@ -103,6 +109,28 @@ You get the following output if the execution was successful: [#] FW 0200 [#] FW 0280 [#] FW 0300 +[#] FW 0380 +[#] FW 0400 +[#] FW 0480 +[#] FW 0500 +[#] FW 0580 +[#] FW 0600 +[#] FW 0680 +[#] FW 0700 +[#] FW 0780 +[#] FW 0800 +[#] FW 0880 +[#] FW 0900 +[#] FW 0980 +[#] FW 0A00 +[#] FW 0A80 +[#] FW 0B00 +[#] FW 0B80 +[#] FW 0C00 +[#] FW 0C80 +[#] FW 0D00 +[#] FW 0D80 +[#] FW 0E00 [+] Sim module firmware upgrade successful ``` diff --git a/doc/path_notes.md b/doc/path_notes.md index a111e8cd1..1225f7a33 100644 --- a/doc/path_notes.md +++ b/doc/path_notes.md @@ -64,7 +64,7 @@ The recovery / firmware files will be copied to ``` * Proxmark3 firmware: `bootrom.elf`, `fullimage.elf`, `proxmark3_recovery.bin` (used for JTAG) -* SIM firmware: `sim013.bin`, `sim013.sha512.txt` +* SIM firmware: `sim014.bin`, `sim014.sha512.txt` ## Traces diff --git a/tools/pm3_online_check.py b/tools/pm3_online_check.py index a7961d319..4db9a2c9f 100755 --- a/tools/pm3_online_check.py +++ b/tools/pm3_online_check.py @@ -122,7 +122,7 @@ def pm3_lf_t55xx(child): def pm3_flash_sm(child): try: print("[+] Updating smart card fw") - child.sendline('smart upgrade -f sim013.bin') + child.sendline('smart upgrade -f sim014.bin') i = child.expect('pm3 --> ') msg = escape_ansi(str(child.before)) print("================") diff --git a/tools/pm3_tests.sh b/tools/pm3_tests.sh index 479861b6d..0615a1447 100755 --- a/tools/pm3_tests.sh +++ b/tools/pm3_tests.sh @@ -249,7 +249,7 @@ while true; do if $TESTALL || $TESTCOMMON; then echo -e "\n${C_BLUE}Testing common:${C_NC}" if ! CheckFileExist "hardnested tables exists" "$RESOURCEPATH/hardnested_tables/bitflip_0_001_states.bin.lz4"; then break; fi - if ! CheckFileExist "simmodule fw file exists" "$RESOURCEPATH/sim013.bin"; then break; fi + if ! CheckFileExist "simmodule fw file exists" "$RESOURCEPATH/sim014.bin"; then break; fi if ! CheckFileExist "iCLASS dictionary exists" "$DICPATH/iclass_default_keys.dic"; then break; fi if ! CheckFileExist "MFC dictionary exists" "$DICPATH/mfc_default_keys.dic"; then break; fi if ! CheckFileExist "MFDES dictionary exists" "$DICPATH/mfdes_default_keys.dic"; then break; fi