added a check for static encrypted nonces when collecting encrypted nonces for hardnested to run. Will abort the collection if detected.
This commit is contained in:
1 parent
dca3c6184c
commit
6c163fa262
5 files changed
+36
-5
No files matched your search
@@ -2054,6 +2054,9 @@ static int CmdHF14AMfNestedHard(const char *Cmd) {
|
||||
case PM3_EOPABORTED:
|
||||
PrintAndLogEx(WARNING, "Button pressed. Aborted.\n");
|
||||
break;
|
||||
case PM3_ESTATIC_NONCE:
|
||||
PrintAndLogEx(ERR, "Error: Static encrypted nonce detected. Aborted.\n");
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
}
|
||||
@@ -2744,6 +2747,10 @@ tryHardnested: // If the nested attack fails then we try the hardnested attack
|
||||
PrintAndLogEx(NORMAL, "\nButton pressed, user aborted");
|
||||
break;
|
||||
}
|
||||
case PM3_ESTATIC_NONCE: {
|
||||
PrintAndLogEx(ERR, "\nError: Static encrypted nonce detected. Aborted.\n");
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -437,7 +437,7 @@ int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo,
|
||||
clearCommandBuffer();
|
||||
SendCommandNG(CMD_HF_MIFARE_NESTED, (uint8_t *)&payload, sizeof(payload));
|
||||
|
||||
if (!WaitForResponseTimeout(CMD_HF_MIFARE_NESTED, &resp, 2000)) {
|
||||
if (WaitForResponseTimeout(CMD_HF_MIFARE_NESTED, &resp, 2000) == false) {
|
||||
SendCommandNG(CMD_BREAK_LOOP, NULL, 0);
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user