From: Martin Holst Swende Date: Tue, 13 Oct 2015 07:39:04 +0000 (+0200) Subject: Merge pull request #140 from marshmellow42/iclass X-Git-Tag: v2.3.0~22 X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/be6250d31b5cc1ebb9ab0bece84c6691220a8e0d?hp=-c Merge pull request #140 from marshmellow42/iclass iClass major updates --- be6250d31b5cc1ebb9ab0bece84c6691220a8e0d diff --combined client/cmdhfmf.c index ed26c1bd,304e9c9c..48e78b1c --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@@ -58,8 -58,7 +58,8 @@@ start case -1 : PrintAndLog("Button pressed. Aborted.\n"); break; case -2 : PrintAndLog("Card is not vulnerable to Darkside attack (doesn't send NACK on authentication requests).\n"); break; case -3 : PrintAndLog("Card is not vulnerable to Darkside attack (its random number generator is not predictable).\n"); break; - case -4 : PrintAndLog("The card's random number generator is vulnerable but behaves somewhat weird (Mifare clone?). This needs to be fixed.\n"); break; + case -4 : PrintAndLog("Card is not vulnerable to Darkside attack (its random number generator seems to be based on the wellknown"); + PrintAndLog("generating polynomial with 16 effective bits only, but shows unexpected behaviour.\n"); break; default: ; } break; @@@ -1951,6 -1950,13 +1951,13 @@@ int CmdHF14AMfSniff(const char *Cmd) return 0; } + //needs nt, ar, at, Data to decrypt + int CmdDecryptTraceCmds(const char *Cmd){ + uint8_t data[50]; + int len = 0; + param_gethex_ex(Cmd,3,data,&len); + return tryDecryptWord(param_get32ex(Cmd,0,0,16),param_get32ex(Cmd,1,0,16),param_get32ex(Cmd,2,0,16),data,len/2); + } static command_t CommandTable[] = { @@@ -1979,6 -1985,7 +1986,7 @@@ {"cgetsc", CmdHF14AMfCGetSc, 0, "Read sector - Magic Chinese card"}, {"cload", CmdHF14AMfCLoad, 0, "Load dump into magic Chinese card"}, {"csave", CmdHF14AMfCSave, 0, "Save dump from magic Chinese card into file or emulator"}, + {"decrypt", CmdDecryptTraceCmds,1, "[nt] [ar_enc] [at_enc] [data] - to decrypt snoop or trace"}, {NULL, NULL, 0, NULL} };