Skip to content

Commit b097e10

Browse files
committed
this commit refactors the signature checks. First we introduce a common pm3 generic private / public key pair in order to allow for users to self sign their own modded device. The verification checks now looks at both hard coded public keys. If a vendor wants to add their own public key thus allowing for a simple way for us to identify their devices they can now do so. The downside is that the firmware mismatch detection becomes a bit dodgy. mem info; mem info -v; mem info -s -p <filename.pem>; mem info -s -p <filename.pem> -w contains the changes. OBS! when -w be careful to not overwrite your genuine RDV4 signature. As always, with great power comes great responsibility
1 parent 1412b68 commit b097e10

File tree

11 files changed

+332
-170
lines changed

11 files changed

+332
-170
lines changed

CHANGELOG.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,25 @@ All notable changes to this project will be documented in this file.
33
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
44

55
## [unreleased][unreleased]
6+
- Changed `mem info` and how the signature handling is done (@iceman1001)
7+
- Added `client/resources/pm3_generic_private_key.pem` in order to self-sign a modded device (@iceman1001)
68
- Fix `hf mfdes value --op clear` commands for clearing more than 0x80000000 values and getfilesettings mac mode (@merlokk)
79
- Added ATR fingerprinting to `hf 14a/14b info` (@doegox)
810

911
## [Phrack.4.20728][2025-09-11]
10-
- Change `lf t55xx restore` - now skips writing block0 if its all zeros (@iceman1001)
12+
- Changed `lf t55xx restore` - now skips writing block0 if its all zeros (@iceman1001)
1113
- Added `HID Simplex Grinnell 36-bit` - Improved Simplex decoder (@datafx, @henrygab)
12-
- Change `lf search` - also test for chipset even if there was just signal noice (@iceman1001)
14+
- Changed `lf search` - also test for chipset even if there was just signal noice (@iceman1001)
1315
- Added detection of PCF 7961 , thanks progman (@iceman1001)
14-
- Change `reveng -g` - now correctly take 1024 hexstring as input (@iceman1001)
16+
- Changed `reveng -g` - now correctly take 1024 hexstring as input (@iceman1001)
1517
- Added `--override` parameter to NDEF read for overriding MAD CRC check (@iceman1001)
1618
- Added `hf saflok` commands (@stiebeljoshua)
1719
- Added `ntag_clean.lua` script for easier NTAG memory wipe (@trigat)
1820
- Changed from Bigbuf malloc to Bigbuf calloc calls on device side (@iceman1001)
1921
- Added `lf t55xx view` - now viewing of T55XX dump files is possible (@iceman1001)
2022
- Fixed `lf indala cone` - now writing the right bits when using `--fc` and `--cn`
2123
- Changed readline hack logic for async dbg msg to be ready for readline 8.3 (@doegox)
22-
- Improved To avoid conflicts with ModemManager on Linux, is recommended to masking the service (@grugnoymeme)
24+
- Changed documentation to avoid conflicts with ModemManager on Linux, is recommended to masking the service (@grugnoymeme)
2325
- Changed `data crypto` - now also handles AES-256 (@iceman1001)
2426
- Changed `hf mfdes info` - add recognition of Swissbit iShield Key Mifare (@ah01)
2527
- Changed `hf mf info` - add detection for unknown backdoor keys and for some backdoor variants (@doegox)

armsrc/appmain.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2968,7 +2968,7 @@ static void PacketReceived(PacketCommandNG *packet) {
29682968
LED_B_OFF();
29692969
break;
29702970
}
2971-
case CMD_FLASHMEM_INFO: {
2971+
case CMD_FLASHMEM_GET_SIGNATURE: {
29722972

29732973
LED_B_ON();
29742974

@@ -2983,12 +2983,19 @@ static void PacketReceived(PacketCommandNG *packet) {
29832983
FlashStop();
29842984
}
29852985

2986-
reply_ng(CMD_FLASHMEM_INFO, (isok) ? PM3_SUCCESS : PM3_EFLASH, (uint8_t *)info, sizeof(rdv40_validation_t));
2986+
reply_ng(CMD_FLASHMEM_GET_SIGNATURE, (isok) ? PM3_SUCCESS : PM3_EFLASH, (uint8_t *)info, sizeof(rdv40_validation_t));
29872987
BigBuf_free();
29882988

29892989
LED_B_OFF();
29902990
break;
29912991
}
2992+
case CMD_FLASHMEM_GET_INFO: {
2993+
LED_B_ON();
2994+
spi_flash_t *spi = flash_get_info();
2995+
reply_ng(CMD_FLASHMEM_GET_INFO, PM3_SUCCESS, (uint8_t *)spi, sizeof(spi_flash_t));
2996+
LED_B_OFF();
2997+
break;
2998+
}
29922999
case CMD_FLASHMEM_PAGES64K: {
29933000

29943001
LED_B_ON();
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
-----BEGIN PRIVATE KEY-----
2+
MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAPrs5grcEJNNgoTl
3+
KgYSHfAYeGqUVyy7DzGNzpQryLBN3eVIj2+2oQB/BfW4wGpfg35s/R0ohCZOjJ81
4+
oLK1gFx+mvFMmzUP9MzNDxMs/3TumiSQqEQSPQYi8BQWLXbd73pfJP6p40+mCK61
5+
i3wQtL/H85xL/G5GNQOg3bubdz4BAgMBAAECgYB8QTVFKWZX2ykHsAdYTD5g920h
6+
seVdNCA49LTYMLpHe7em44CL3E7r1PrZjCxUQIn33/aTKs4NvhXqfP7fn/s4V0CZ
7+
mjZSvWQ3ts5CYOGa8LWgaU7qYREPJKVDRgmMFiRntbP9woNLOhnQkZEs75KCKgnT
8+
kDndVTtxlxbn2evKVQJBAP8M7RNI1JuiE/gTq9dL9q4ZKo7NpATanFKwgd7gCooN
9+
anlfpMxhN7FgQRcfjHpndmpMQXhe5UE6C+XcziZj2TcCQQD73AqHNjU6hI0/rgiQ
10+
MXiiC+Oe5G7QPxRwvbjTuLghC/lWCDd96LkKSZLZR0pmSj5nldB0/dDXiZUNF/Q+
11+
Ht6HAkEAxGMQnXvD8b6gP7Ht7I6aeD36jhD8DZzDJ8yvg4zhsKFZ7fFedN0axCLI
12+
m+R4B7xo6rqi4uu2/T2T8b/OoLLbiwJAOzSYzPwzOxRZ1/RjUvIuN3mwAnQUkKOj
13+
fHU885hiwHH+JPk9gj2o8gAloyodFTqyvMr8++OGqoRPI4rUAZ5kFQJBANQCGq2g
14+
Qh2cFU6pmgoSDExnzOLWWeeCs1buw1XyVULHGv+n6zFowNmkmjJCTF1lvGehcnyW
15+
MNgnxt2QK7Q+RnI=
16+
-----END PRIVATE KEY-----
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d99cb37ec1ea04790746a97b439fd3a3dbe5b0eb3de439cdfbf6e7e82ff871d278f11923049fd19e945d90135de112250103850305ed1eca0c82a51a6c5f1682 pm3_generic_private_key.pem

0 commit comments

Comments
 (0)