mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-11-10 09:32:41 +08:00
text
This commit is contained in:
parent
cfaf719b91
commit
30b217be65
4 changed files with 57 additions and 39 deletions
|
@ -543,13 +543,21 @@
|
|||
"Name": "Reserved for future use",
|
||||
"Description": "used by AT HOP, Nol, ORCA",
|
||||
"Type": "transport"
|
||||
}
|
||||
},
|
||||
{
|
||||
"AID": "F52310",
|
||||
"Vendor": "ICT Access credential",
|
||||
"Vendor": "Integrated Control Technology Limited (ICT)",
|
||||
"Country": "NZ",
|
||||
"Name": "ICT Access credential",
|
||||
"Description": "",
|
||||
"Type": "pacs"
|
||||
},
|
||||
]
|
||||
{
|
||||
"AID": "F48EF1",
|
||||
"Vendor": "SALTO Access credential",
|
||||
"Country": "ES",
|
||||
"Name": "SALTO Access credential",
|
||||
"Description": "",
|
||||
"Type": "pacs"
|
||||
},
|
||||
]
|
|
@ -8186,10 +8186,10 @@
|
|||
},
|
||||
{
|
||||
"application": "Security and Access Control",
|
||||
"company": "Integrated Control Technology Limited",
|
||||
"company": "Integrated Control Technology Limited (ICT)",
|
||||
"mad": "0x5231",
|
||||
"service_provider": "Integrated Control Technology Limited",
|
||||
"system_integrator": "Integrated Control Technology Limited"
|
||||
"service_provider": "Integrated Control Technology Limited (ICT)",
|
||||
"system_integrator": "Integrated Control Technology Limited (ICT)"
|
||||
},
|
||||
{
|
||||
"application": "Centralized access control system",
|
||||
|
|
|
@ -1755,13 +1755,17 @@ static int CmdHF14aDesMAD(const char *Cmd) {
|
|||
AppListS AppList = {{0}};
|
||||
DesfireFillAppList(&dctx, &PICCInfo, AppList, false, false, false); // no deep scan, no scan files
|
||||
|
||||
if (PICCInfo.freemem == 0xffffffff)
|
||||
PrintAndLogEx(SUCCESS, "Applications count: " _GREEN_("%zu") " free memory " _YELLOW_("n/a"), PICCInfo.appCount);
|
||||
else
|
||||
PrintAndLogEx(SUCCESS, "Applications count: " _GREEN_("%zu") " free memory " _GREEN_("%d") " bytes", PICCInfo.appCount, PICCInfo.freemem);
|
||||
PrintAndLogEx(SUCCESS, "# Applications... " _GREEN_("%zu"), PICCInfo.appCount);
|
||||
if (PICCInfo.freemem == 0xffffffff) {
|
||||
PrintAndLogEx(SUCCESS, "Free memory...... " _YELLOW_("n/a"));
|
||||
} else {
|
||||
PrintAndLogEx(SUCCESS, "Free memory...... " _GREEN_("%d") " bytes", PICCInfo.freemem);
|
||||
}
|
||||
|
||||
if ((PICCInfo.keySettings & (1 << 1)) == 0)
|
||||
PrintAndLogEx(WARNING, "Directory list access with CMK : " _RED_("Enabled") ". Try to read mad with Card Master Key(");
|
||||
if ((PICCInfo.keySettings & (1 << 1)) == 0) {
|
||||
PrintAndLogEx(WARNING, "Directory list access with CMK... ( " _RED_("Enabled") " )");
|
||||
PrintAndLogEx(HINT, "Try to read MAD with Card Master Key (CMK)");
|
||||
}
|
||||
|
||||
PrintAndLogEx(SUCCESS, "----------------------------------------- " _CYAN_("MAD") " ------------------------------------------");
|
||||
bool foundFFFFFF = false;
|
||||
|
|
|
@ -232,9 +232,9 @@ static int get_plus_signature(uint8_t *signature, int *signature_len) {
|
|||
|
||||
// GET VERSION
|
||||
static int plus_print_version(uint8_t *version) {
|
||||
PrintAndLogEx(SUCCESS, " UID: " _GREEN_("%s"), sprint_hex(version + 14, 7));
|
||||
PrintAndLogEx(SUCCESS, " Batch number: " _GREEN_("%s"), sprint_hex(version + 21, 5));
|
||||
PrintAndLogEx(SUCCESS, " Production date: week " _GREEN_("%02x") " / " _GREEN_("20%02x"), version[7 + 7 + 7 + 5], version[7 + 7 + 7 + 5 + 1]);
|
||||
PrintAndLogEx(SUCCESS, "UID: " _GREEN_("%s"), sprint_hex(version + 14, 7));
|
||||
PrintAndLogEx(SUCCESS, "Batch number: " _GREEN_("%s"), sprint_hex(version + 21, 5));
|
||||
PrintAndLogEx(SUCCESS, "Production date: week " _GREEN_("%02x") " / " _GREEN_("20%02x"), version[7 + 7 + 7 + 5], version[7 + 7 + 7 + 5 + 1]);
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(INFO, "--- " _CYAN_("Hardware Information"));
|
||||
PrintAndLogEx(INFO, " Raw : %s", sprint_hex(version, 7));
|
||||
|
@ -294,7 +294,6 @@ static int CmdHFMFPInfo(const char *Cmd) {
|
|||
|
||||
uint64_t select_status = resp.oldarg[0]; // 0: couldn't read, 1: OK, with ATS, 2: OK, no ATS, 3: proprietary Anticollision
|
||||
|
||||
|
||||
bool supportVersion = false;
|
||||
bool supportSignature = false;
|
||||
|
||||
|
@ -305,14 +304,10 @@ static int CmdHFMFPInfo(const char *Cmd) {
|
|||
plus_print_version(version);
|
||||
supportVersion = true;
|
||||
} else {
|
||||
// info about 14a part
|
||||
// info about 14a part, historical bytes.
|
||||
infoHF14A(false, false, false);
|
||||
|
||||
// Historical bytes.
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Signature originality check
|
||||
uint8_t signature[56] = {0};
|
||||
int signature_len = sizeof(signature);
|
||||
|
@ -333,13 +328,13 @@ static int CmdHFMFPInfo(const char *Cmd) {
|
|||
|
||||
if (cardtype == 6) {
|
||||
if (supportSignature) {
|
||||
PrintAndLogEx(INFO, " Tech: " _GREEN_("MIFARE Plus EV1"));
|
||||
PrintAndLogEx(INFO, " Tech...... " _GREEN_("MIFARE Plus EV1"));
|
||||
} else {
|
||||
PrintAndLogEx(INFO, " Tech: " _YELLOW_("MIFARE Plus SE/X"));
|
||||
PrintAndLogEx(INFO, " Tech...... " _YELLOW_("MIFARE Plus SE/X"));
|
||||
}
|
||||
isPlus = true;
|
||||
} else {
|
||||
|
||||
PrintAndLogEx(INFO, " Tech...... Unknown ( " _YELLOW_("%u") " )", cardtype);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -348,40 +343,40 @@ static int CmdHFMFPInfo(const char *Cmd) {
|
|||
uint16_t ATQA = card.atqa[0] + (card.atqa[1] << 8);
|
||||
|
||||
if (ATQA & 0x0004) {
|
||||
PrintAndLogEx(INFO, " SIZE: " _GREEN_("2K") " (%s UID)", (ATQA & 0x0040) ? "7" : "4");
|
||||
PrintAndLogEx(INFO, " Size...... " _GREEN_("2K") " (%s UID)", (ATQA & 0x0040) ? "7" : "4");
|
||||
isPlus = true;
|
||||
}
|
||||
if (ATQA & 0x0002) {
|
||||
PrintAndLogEx(INFO, " SIZE: " _GREEN_("4K") " (%s UID)", (ATQA & 0x0040) ? "7" : "4");
|
||||
PrintAndLogEx(INFO, " Size...... " _GREEN_("4K") " (%s UID)", (ATQA & 0x0040) ? "7" : "4");
|
||||
isPlus = true;
|
||||
}
|
||||
|
||||
uint8_t SLmode = 0xFF;
|
||||
if (isPlus) {
|
||||
if (card.sak == 0x08) {
|
||||
PrintAndLogEx(INFO, " SAK: " _GREEN_("2K 7b UID"));
|
||||
PrintAndLogEx(INFO, " SAK....... " _GREEN_("2K 7b UID"));
|
||||
if (select_status == 2) SLmode = 1;
|
||||
}
|
||||
if (card.sak == 0x18) {
|
||||
PrintAndLogEx(INFO, " SAK: " _GREEN_("4K 7b UID"));
|
||||
PrintAndLogEx(INFO, " SAK....... " _GREEN_("4K 7b UID"));
|
||||
if (select_status == 2) SLmode = 1;
|
||||
}
|
||||
if (card.sak == 0x10) {
|
||||
PrintAndLogEx(INFO, " SAK: " _GREEN_("2K"));
|
||||
PrintAndLogEx(INFO, " SAK....... " _GREEN_("2K"));
|
||||
if (select_status == 2) SLmode = 2;
|
||||
}
|
||||
if (card.sak == 0x11) {
|
||||
PrintAndLogEx(INFO, " SAK: " _GREEN_("4K"));
|
||||
PrintAndLogEx(INFO, " SAK....... " _GREEN_("4K"));
|
||||
if (select_status == 2) SLmode = 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (card.sak == 0x20) {
|
||||
if (card.ats_len > 0) {
|
||||
PrintAndLogEx(INFO, " SAK: " _GREEN_("MIFARE Plus SL0/SL3") " or " _GREEN_("MIFARE DESFire"));
|
||||
PrintAndLogEx(INFO, " SAK....... " _GREEN_("MIFARE Plus SL0/SL3") " or " _GREEN_("MIFARE DESFire"));
|
||||
SLmode = 3;
|
||||
// check SL0
|
||||
uint8_t data[250] = {0};
|
||||
uint8_t data[128] = {0};
|
||||
int datalen = 0;
|
||||
// https://github.com/Proxmark/proxmark3/blob/master/client/luascripts/mifarePlus.lua#L161
|
||||
uint8_t cmd[3 + 16] = {0xa8, 0x90, 0x90, 0x00};
|
||||
|
@ -390,22 +385,32 @@ static int CmdHFMFPInfo(const char *Cmd) {
|
|||
// DESFire answers 0x1C or 67 00
|
||||
// Plus answers 0x0B, 0x09, 0x06
|
||||
// 6D00 is "INS code not supported" in APDU
|
||||
if (data[0] != 0x0b && data[0] != 0x09 && data[0] != 0x1C && data[0] != 0x67 && data[0] != 0x6d) {
|
||||
if (
|
||||
data[0] != 0x0B &&
|
||||
data[0] != 0x09 &&
|
||||
data[0] != 0x1C &&
|
||||
data[0] != 0x67 &&
|
||||
data[0] != 0x6D &&
|
||||
data[0] != 0x6E) {
|
||||
|
||||
PrintAndLogEx(INFO, _RED_("Send copy to iceman of this command output!"));
|
||||
PrintAndLogEx(INFO, "data: %s", sprint_hex(data, datalen));
|
||||
}
|
||||
|
||||
if ((memcmp(data, "\x67\x00", 2) == 0) ||
|
||||
(memcmp(data, "\x1C\x83\x0C", 3) == 0)
|
||||
if ((memcmp(data, "\x67\x00", 2) == 0) || // wrong length
|
||||
(memcmp(data, "\x1C\x83\x0C", 3) == 0) // desfire answers
|
||||
) {
|
||||
PrintAndLogEx(INFO, " result: " _RED_("MIFARE DESFire"));
|
||||
PrintAndLogEx(INFO, " result.... " _RED_("MIFARE DESFire"));
|
||||
PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`hf mfdes info`"));
|
||||
DropField();
|
||||
return PM3_SUCCESS;
|
||||
|
||||
// } else if (memcmp(data, "\x68\x82", 2) == 0) { // Secure message not supported
|
||||
} else if (memcmp(data, "\x6D\x00", 2) == 0) {
|
||||
// } else if (memcmp(data, "\x6E\x00", 2) == 0) { // Class not supported
|
||||
isPlus = false;
|
||||
} else {
|
||||
PrintAndLogEx(INFO, " result: " _GREEN_("MIFARE Plus SL0/SL3"));
|
||||
PrintAndLogEx(INFO, " result.... " _GREEN_("MIFARE Plus SL0/SL3"));
|
||||
}
|
||||
|
||||
if (!res && datalen > 1 && data[0] == 0x09) {
|
||||
|
@ -419,9 +424,10 @@ static int CmdHFMFPInfo(const char *Cmd) {
|
|||
PrintAndLogEx(INFO, "--- " _CYAN_("Security Level (SL)"));
|
||||
|
||||
if (SLmode != 0xFF)
|
||||
PrintAndLogEx(SUCCESS, " SL mode: " _YELLOW_("SL%d"), SLmode);
|
||||
PrintAndLogEx(SUCCESS, " SL mode... " _YELLOW_("SL%d"), SLmode);
|
||||
else
|
||||
PrintAndLogEx(WARNING, " SL mode: " _YELLOW_("unknown"));
|
||||
PrintAndLogEx(WARNING, " SL mode... " _YELLOW_("unknown"));
|
||||
|
||||
switch (SLmode) {
|
||||
case 0:
|
||||
PrintAndLogEx(INFO, " SL 0: initial delivery configuration, used for card personalization");
|
||||
|
|
Loading…
Reference in a new issue