diff --git a/client/src/cmdhflist.c b/client/src/cmdhflist.c index aaecb3e52..2765363fd 100644 --- a/client/src/cmdhflist.c +++ b/client/src/cmdhflist.c @@ -1685,10 +1685,39 @@ void annotateSeos(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) { // it's basically a ISO14443a tag, so try annotation from there if (applyIso14443a(exp, size, cmd, cmdsize, false) != PM3_SUCCESS) { -// switch (cmd[0]) { -// default: -// break; -// }; + int pos = 0; + switch (cmd[0]) { + case 2: + case 3: + pos = 2; + break; + case 0: + pos = 1; + break; + default: + pos = 2; + break; + } + + if (memcmp(cmd + pos, "\x00\xa4\x04\x00\x0a", 5) == 0) { + snprintf(exp, size, "SELECT AID"); + } + + if (memcmp(cmd + pos, "\x80\xA5\x04\x00", 4) == 0) { + snprintf(exp, size, "SELECT ADF / OID"); + } + + if (memcmp(cmd + pos, "\x00\x87\x00\x01\x04\x7c\x02\x81\x00", 9) == 0) { + snprintf(exp, size, "GET CHALLENGE"); + } + + if (memcmp(cmd + pos, "\x00\x87\x00\x01\x2c", 5) == 0) { + snprintf(exp, size, "MUTUAL AUTHENTICATION"); + } + + if (memcmp(cmd + pos, "\x0c\xcb\x3f\xff", 4) == 0) { + snprintf(exp, size, "GET DATA"); + } // apply ISO7816 annotations? // if (annotateIso7816(exp, size, cmd, cmdsize) == 0) { diff --git a/client/src/cmdhfseos.c b/client/src/cmdhfseos.c index 896157be4..4ab7c1b15 100644 --- a/client/src/cmdhfseos.c +++ b/client/src/cmdhfseos.c @@ -112,7 +112,7 @@ static int CmdHfSeosInfo(const char *Cmd) { } static int CmdHfSeosList(const char *Cmd) { - return CmdTraceListAlias(Cmd, "hf seos", "7816"); + return CmdTraceListAlias(Cmd, "hf seos", "seos -c"); } static command_t CommandTable[] = { diff --git a/traces/hf_seos_sniff_fc60_cn640001.trace b/traces/hf_seos_sniff_fc60_cn640001.trace new file mode 100644 index 000000000..78c6d6056 Binary files /dev/null and b/traces/hf_seos_sniff_fc60_cn640001.trace differ