mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
hf mf info: fix backdoor detection when using non-default key
Some checks failed
MacOS Build and Test / macos-cmake (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
MacOS Build and Test / macos-make (push) Has been cancelled
MacOS Build and Test / macos-make-btaddon (push) Has been cancelled
Ubuntu Build and Test / ubuntu-make (push) Has been cancelled
Ubuntu Build and Test / ubuntu-make-btaddon (push) Has been cancelled
Ubuntu Build and Test / ubuntu-cmake (push) Has been cancelled
Windows Build and Test / proxspace (push) Has been cancelled
Windows Build and Test / wsl (push) Has been cancelled
Some checks failed
MacOS Build and Test / macos-cmake (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
MacOS Build and Test / macos-make (push) Has been cancelled
MacOS Build and Test / macos-make-btaddon (push) Has been cancelled
Ubuntu Build and Test / ubuntu-make (push) Has been cancelled
Ubuntu Build and Test / ubuntu-make-btaddon (push) Has been cancelled
Ubuntu Build and Test / ubuntu-cmake (push) Has been cancelled
Windows Build and Test / proxspace (push) Has been cancelled
Windows Build and Test / wsl (push) Has been cancelled
This commit is contained in:
parent
7c187b0ad5
commit
d933e329c4
1 changed files with 3 additions and 2 deletions
|
@ -10393,13 +10393,14 @@ static int CmdHF14AMfInfo(const char *Cmd) {
|
||||||
if ((fKeyType == MF_KEY_A) || (fKeyType == MF_KEY_B)) {
|
if ((fKeyType == MF_KEY_A) || (fKeyType == MF_KEY_B)) {
|
||||||
// we've a key but not a backdoor key
|
// we've a key but not a backdoor key
|
||||||
uint8_t blockdata2[MFBLOCK_SIZE] = {0};
|
uint8_t blockdata2[MFBLOCK_SIZE] = {0};
|
||||||
if (mf_read_block(0, fKeyType + 4, key, blockdata2) == PM3_SUCCESS) {
|
if (mf_read_block(0, fKeyType + 4, fkey, blockdata2) == PM3_SUCCESS) {
|
||||||
PrintAndLogEx(SUCCESS, "Backdoor key..... " _GREEN_("same as key A/B"));
|
PrintAndLogEx(SUCCESS, "Backdoor key..... " _GREEN_("same as key A/B"));
|
||||||
} else if (detect_classic_auth(MF_KEY_BD)) {
|
} else if (detect_classic_auth(MF_KEY_BD)) {
|
||||||
PrintAndLogEx(SUCCESS, "Backdoor key..... " _RED_("detected but unknown!"));
|
PrintAndLogEx(SUCCESS, "Backdoor key..... " _RED_("detected but unknown!"));
|
||||||
PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf mf nested --blk 0 -%s -k %s --tblk 0 --tc 4") "`"
|
PrintAndLogEx(HINT, "Hint: Try `" _YELLOW_("hf mf nested --blk 0 -%s -k %s --tblk 0 --tc %i") "`"
|
||||||
, (fKeyType == MF_KEY_A) ? "a" : "b"
|
, (fKeyType == MF_KEY_A) ? "a" : "b"
|
||||||
, sprint_hex_inrow(fkey, MIFARE_KEY_SIZE)
|
, sprint_hex_inrow(fkey, MIFARE_KEY_SIZE)
|
||||||
|
, fKeyType + 4
|
||||||
);
|
);
|
||||||
fKeyType = MF_KEY_BD;
|
fKeyType = MF_KEY_BD;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue