adapt to new sim module firmware version

This commit is contained in:
iceman1001 2023-09-28 08:46:04 +02:00
commit 1234b08132
8 changed files with 52 additions and 24 deletions

View file

@ -34,7 +34,7 @@ all clean install uninstall check: %: client/% bootrom/% armsrc/% recovery/% mfk
#all clean install uninstall check: %: hitag2crack/% #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 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 INSTALLSCRIPTS=pm3 pm3-flash pm3-flash-all pm3-flash-bootrom pm3-flash-fullimage
INSTALLSHARES=tools/jtag_openocd traces INSTALLSHARES=tools/jtag_openocd traces
INSTALLDOCS=doc/*.md doc/md INSTALLDOCS=doc/*.md doc/md

View file

@ -523,16 +523,16 @@ out:
} }
static int CmdSmartUpgrade(const char *Cmd) { static int CmdSmartUpgrade(const char *Cmd) {
PrintAndLogEx(INFO, "-------------------------------------------------------------------"); PrintAndLogEx(INFO, "--------------------------------------------------------------------");
PrintAndLogEx(WARNING, _RED_("WARNING") " - sim module firmware upgrade"); PrintAndLogEx(WARNING, _RED_("WARNING") " - sim module firmware upgrade");
PrintAndLogEx(WARNING, _RED_("A dangerous command, do wrong and you could brick the sim module")); PrintAndLogEx(WARNING, _RED_("A dangerous command, do wrong and you could brick the sim module"));
PrintAndLogEx(INFO, "-------------------------------------------------------------------"); PrintAndLogEx(INFO, "--------------------------------------------------------------------");
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
CLIParserContext *ctx; CLIParserContext *ctx;
CLIParserInit(&ctx, "smart upgrade", CLIParserInit(&ctx, "smart upgrade",
"Upgrade RDV4 sim module firmware", "Upgrade RDV4 sim module firmware",
"smart upgrade -f sim013.bin" "smart upgrade -f sim014.bin"
); );
void *argtable[] = { void *argtable[] = {

View file

@ -712,7 +712,7 @@ pm3 --> mem load -f iclass_default_keys --iclass
Upgrade Sim Module firmware Upgrade Sim Module firmware
``` ```
pm3 --> smart upgrade -f sim013.bin pm3 --> smart upgrade -f sim014.bin
``` ```
## Smart Card ## Smart Card

View file

@ -163,9 +163,9 @@ proxmark3 <YOUR_PORT_HERE> --flash --image /usr/local/share/proxmark3/firmware/f
proxmark3 <YOUR_PORT_HERE> --flash --image /usr/share/proxmark3/firmware/fullimage.elf proxmark3 <YOUR_PORT_HERE> --flash --image /usr/share/proxmark3/firmware/fullimage.elf
using the script: 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: 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 <YOUR_PORT_HERE> --flash --image armsrc/obj/fullimage.elf
<> <>
./proxmark3 <YOUR_PORT_HERE> --flash --image ../armsrc/obj/fullimage.elf ./proxmark3 <YOUR_PORT_HERE> --flash --image ../armsrc/obj/fullimage.elf
pm3 --> smart upgrade -f sim013.bin pm3 --> smart upgrade -f sim014.bin
``` ```
etc. etc.

View file

@ -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. To make sure you got the latest sim module firmware.
_Latest version is v4.12_ _Latest version is v4.42_
``` ```
[usb] pm3 --> hw status [usb] pm3 --> hw status
@ -57,44 +57,50 @@ or
#db# Smart card module (ISO 7816) #db# Smart card module (ISO 7816)
#db# version.................v3.11 #db# version.................v3.11
or
#db# Smart card module (ISO 7816)
#db# version.................v4.13
``` ```
These versions is obsolete. 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. 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. The following command upgrades your device sim module firmware.
Don't not turn off your device during the execution of this command!! 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. 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 # 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: You get the following output if the execution was successful:
``` ```
[=] ------------------------------------------------------------------- [=] --------------------------------------------------------------------
[!] ⚠️ WARNING - sim module firmware upgrade [!] ⚠️ WARNING - sim module firmware upgrade
[!] ⚠️ A dangerous command, do wrong and you could brick the sim module [!] ⚠️ A dangerous command, do wrong and you could brick the sim module
[=] ------------------------------------------------------------------- [=] --------------------------------------------------------------------
[=] firmware file sim013.bin [=] firmware file sim014.bin
[=] Checking integrity sim013.sha512.txt [=] Checking integrity sim014.sha512.txt
[+] loaded 866 bytes from binary file sim013.bin [+] loaded 3658 bytes from binary file sim014.bin
[+] loaded 141 bytes from binary file sim013.sha512.txt [+] loaded 158 bytes from binary file sim014.sha512.txt
[=] Don't turn off your PM3! [=] Don't turn off your PM3!
[+] Sim module firmware uploading to PM3... [+] Sim module firmware uploading to PM3...
🕑 864 bytes sent 🕑 3658 bytes sent
[+] Sim module firmware updating... [+] Sim module firmware updating...
[#] FW 0000 [#] FW 0000
[#] FW 0080 [#] FW 0080
@ -103,6 +109,28 @@ You get the following output if the execution was successful:
[#] FW 0200 [#] FW 0200
[#] FW 0280 [#] FW 0280
[#] FW 0300 [#] 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 [+] Sim module firmware upgrade successful
``` ```

View file

@ -64,7 +64,7 @@ The recovery / firmware files will be copied to
``` ```
* Proxmark3 firmware: `bootrom.elf`, `fullimage.elf`, `proxmark3_recovery.bin` (used for JTAG) * 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 ## Traces

View file

@ -122,7 +122,7 @@ def pm3_lf_t55xx(child):
def pm3_flash_sm(child): def pm3_flash_sm(child):
try: try:
print("[+] Updating smart card fw") print("[+] Updating smart card fw")
child.sendline('smart upgrade -f sim013.bin') child.sendline('smart upgrade -f sim014.bin')
i = child.expect('pm3 --> ') i = child.expect('pm3 --> ')
msg = escape_ansi(str(child.before)) msg = escape_ansi(str(child.before))
print("================") print("================")

View file

@ -249,7 +249,7 @@ while true; do
if $TESTALL || $TESTCOMMON; then if $TESTALL || $TESTCOMMON; then
echo -e "\n${C_BLUE}Testing common:${C_NC}" 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 "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 "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 "MFC dictionary exists" "$DICPATH/mfc_default_keys.dic"; then break; fi
if ! CheckFileExist "MFDES dictionary exists" "$DICPATH/mfdes_default_keys.dic"; then break; fi if ! CheckFileExist "MFDES dictionary exists" "$DICPATH/mfdes_default_keys.dic"; then break; fi