Merge pull request #1752 from kormax/mobile-aids

Improve ECP annotation, add mobile AIDs
This commit is contained in:
Iceman 2022-08-15 20:17:05 +02:00 committed by GitHub
commit 76fefacbc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 76 additions and 5 deletions

View file

@ -2206,5 +2206,61 @@
"Name": "SL Resekort",
"Description": "transport card",
"Type": "transport"
},
{
"AID": "4F53452E5641532E3031",
"Vendor": "Apple, Google",
"Country": "",
"Name": "Value-Added Services (OSE.VAS.01)",
"Description": "Used by Apple VAS and Google SmartTap",
"Type": "loyalty"
},
{
"AID": "A000000476D0000101",
"Vendor": "Google",
"Country": "",
"Name": "Google SmartTap 1.3 (Deprecated)",
"Description": "",
"Type": "loyalty"
},
{
"AID": "A000000476D0000111",
"Vendor": "Google",
"Country": "",
"Name": "Google SmartTap 2.0",
"Description": "",
"Type": "loyalty"
},
{
"AID": "A0000002480400",
"Vendor": "ISO/IEC JTC1/SC17",
"Country": "",
"Name": "Personal identification (mDL)",
"Description": "ISO/IEC 18013-5:2021 compliant Mobile driving licence (mDL) application.",
"Type": "identity"
},
{
"AID": "A000000676",
"Vendor": "Blackboard",
"Country": "United States",
"Name": "Student ID",
"Description": "Student ID cards",
"Type": "identity"
},
{
"AID": "A000000809434343444B467631",
"Vendor": "Car Connectivity Consortium (CCC)",
"Country": "",
"Name": "Digital Car Key",
"Description": "",
"Type": "access"
},
{
"AID": "A0000008580101",
"Vendor": "Apple",
"Country": "",
"Name": "Apple Home Key",
"Description": "NFC Home Key for select HomeKit-compatible locks",
"Type": "access"
}
]

View file

@ -182,14 +182,29 @@ int applyIso14443a(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize, bool i
}
if (cmdsize >= 7 && cmd[0] == ECP_HEADER) {
// Second byte of ECP frame indicates its version
// Version 0x01 payload is 7 bytes long (including crc)
// Version 0x02 payload is 15 bytes long (including crc)
// Byte 0 is a header
// Byte 1 indicates format version
// Version 0x01 format is 7 bytes long (including crc)
// Version 0x02 format is at least 7 bytes long (including crc). First 4 bits of byte 2 define extra payload length
if (cmd[1] == 0x01 && cmdsize == 7) {
snprintf(exp, size, "ECP1");
return PM3_SUCCESS;
} else if (cmd[1] == 0x02 && cmdsize == 15) {
snprintf(exp, size, "ECP2");
} else if (cmd[1] == 0x02 && cmdsize == (cmd[2] & 0x0f) + 7) {
// Byte 3 is the reader type
switch(cmd[3]) {
case 0x01:
snprintf(exp, size, "ECP2 (Transit)");
break;
case 0x02:
snprintf(exp, size, "ECP2 (Access)");
break;
case 0x03:
snprintf(exp, size, "ECP2 (Identity)");
break;
default:
snprintf(exp, size, "ECP2");
break;
}
return PM3_SUCCESS;
}
}