This commit is contained in:
iceman1001 2024-02-16 21:59:45 +01:00
commit f5e976afa6
21 changed files with 231 additions and 225 deletions

View file

@ -20,7 +20,7 @@
#define HOOKKEY "_HKEY" #define HOOKKEY "_HKEY"
static void checkstack (lua_State *L, lua_State *L1, int n) { static void checkstack(lua_State *L, lua_State *L1, int n) {
if (L != L1 && !lua_checkstack(L1, n)) if (L != L1 && !lua_checkstack(L1, n))
luaL_error(L, "stack overflow"); luaL_error(L, "stack overflow");
} }

View file

@ -34,7 +34,7 @@
static const char *getfuncname(lua_State *L, CallInfo *ci, const char **name); static const char *getfuncname(lua_State *L, CallInfo *ci, const char **name);
static void swapextra (lua_State *L) { static void swapextra(lua_State *L) {
if (L->status == LUA_YIELD) { if (L->status == LUA_YIELD) {
CallInfo *ci = L->ci; /* get function that yielded */ CallInfo *ci = L->ci; /* get function that yielded */
StkId temp = ci->func; /* exchange its 'func' and 'extra' values */ StkId temp = ci->func; /* exchange its 'func' and 'extra' values */
@ -337,7 +337,7 @@ static void kname(Proto *p, int pc, int c, const char **name) {
*name = "?"; /* no reasonable name found */ *name = "?"; /* no reasonable name found */
} }
static int filterpc (int pc, int jmptarget) { static int filterpc(int pc, int jmptarget) {
if (pc < jmptarget) /* is code conditional (inside a jump)? */ if (pc < jmptarget) /* is code conditional (inside a jump)? */
return -1; /* cannot know who sets that register */ return -1; /* cannot know who sets that register */
else else

View file

@ -330,8 +330,7 @@ Cfunc:
if (!p->is_vararg) { if (!p->is_vararg) {
func = restorestack(L, funcr); func = restorestack(L, funcr);
base = func + 1; base = func + 1;
} } else {
else {
base = adjust_varargs(L, p, n); base = adjust_varargs(L, p, n);
func = restorestack(L, funcr); /* previous call can change stack */ func = restorestack(L, funcr); /* previous call can change stack */
} }

View file

@ -87,12 +87,12 @@ static int derive_app_key(uint8_t *uid, uint8_t *app_key) {
return PM3_EINVARG; return PM3_EINVARG;
} }
/* /*
c = b'\x88' + uid c = b'\x88' + uid
ch, cl = c[0:4], c[4:8] ch, cl = c[0:4], c[4:8]
payload = (ch + cl + cl + ch) * 2 payload = (ch + cl + cl + ch) * 2
AES.new(ICT_DESFIRE_MASTER_APPKEY, AES.MODE_CBC, iv=b'\0'*16).decrypt(payload)[16:] AES.new(ICT_DESFIRE_MASTER_APPKEY, AES.MODE_CBC, iv=b'\0'*16).decrypt(payload)[16:]
*/ */
uint8_t input[] = {0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; uint8_t input[] = {0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
memcpy(input + 1, uid, 7); memcpy(input + 1, uid, 7);
@ -133,7 +133,7 @@ static int diversify_mifare_key(uint8_t *uid, uint8_t *app_key) {
num_to_bytes(big, 4, input + 4); num_to_bytes(big, 4, input + 4);
uint8_t key[AES_KEY_LEN]; uint8_t key[AES_KEY_LEN];
memset(key, 0 , sizeof(key)); memset(key, 0, sizeof(key));
// memcpy(key, ICT_DESFIRE_FILEKEY, AES_KEY_LEN); // memcpy(key, ICT_DESFIRE_FILEKEY, AES_KEY_LEN);
uint8_t iv[16] = {0}; uint8_t iv[16] = {0};
@ -188,7 +188,7 @@ static int derive_mifare_key(uint8_t *uid, const uint8_t *base_key, uint8_t *app
uint8_t diverse[MIFARE_KEY_SIZE]; uint8_t diverse[MIFARE_KEY_SIZE];
diversify_mifare_key(uid, diverse); diversify_mifare_key(uid, diverse);
for (uint8_t i=0; i < MIFARE_KEY_SIZE; i++) { for (uint8_t i = 0; i < MIFARE_KEY_SIZE; i++) {
app_key[i] = base_key[i] ^ diverse[i]; app_key[i] = base_key[i] ^ diverse[i];
} }
@ -266,7 +266,7 @@ static void itc_decode_card_blob(uint8_t *data, uint8_t card_type) {
if (data == NULL) { if (data == NULL) {
return; return;
} }
/* /*
uint8_t block[16]; uint8_t block[16];
if (card_type == ICT_CT_NFC) if (card_type == ICT_CT_NFC)
memcpy(block, data+16, sizeof(block)); memcpy(block, data+16, sizeof(block));
@ -300,14 +300,14 @@ static void itc_decode_card_blob(uint8_t *data, uint8_t card_type) {
*/ */
} }
static void itc_encode_card_blob(uint8_t facility_code, uint16_t card_number, uint8_t bit_count) { static void itc_encode_card_blob(uint8_t facility_code, uint16_t card_number, uint8_t bit_count) {
/* /*
// encode wiegand .. // encode wiegand ..
uint8_t wiegand[] = {0,0,0,0,0}; uint8_t wiegand[] = {0,0,0,0,0};
if (bit_count == 26) { if (bit_count == 26) {
// wiegand_data = encode_wiegand_26(facility_code, card_number) // wiegand_data = encode_wiegand_26(facility_code, card_number)
} }
if (bit_count == 34) { if (bit_count == 34) {
// wiegand_data = encode_wiegand_34(facility_code, card_number) // wiegand_data = encode_wiegand_34(facility_code, card_number)
} }
// card binary blog // card binary blog
@ -463,7 +463,7 @@ static int CmdHfIctRead(const char *Cmd) {
return PM3_SUCCESS; return PM3_SUCCESS;
} }
static int CmdHfIctCredential(const char * Cmd) { static int CmdHfIctCredential(const char *Cmd) {
CLIParserContext *ctx; CLIParserContext *ctx;
CLIParserInit(&ctx, "hf ict credential", CLIParserInit(&ctx, "hf ict credential",
@ -491,7 +491,7 @@ static int CmdHfIctCredential(const char * Cmd) {
if ((card.sak & 0x24) == 0x24) { if ((card.sak & 0x24) == 0x24) {
isdesfire = true; isdesfire = true;
} else if ((card.sak & 0x20) == 0x20) { } else if ((card.sak & 0x20) == 0x20) {
if (card.atqa[0] == 0x003&& card.atqa[1] == 0x40) { if (card.atqa[0] == 0x003 && card.atqa[1] == 0x40) {
isdesfire = true; isdesfire = true;
} }
} }

View file

@ -336,7 +336,7 @@ static int ulaes_requestAuthentication(uint8_t *key, uint8_t keyno, bool switch_
memcpy(payload.key, key, sizeof(payload.key)); memcpy(payload.key, key, sizeof(payload.key));
clearCommandBuffer(); clearCommandBuffer();
SendCommandNG(CMD_HF_MIFAREULAES_AUTH, (uint8_t*)&payload, sizeof(payload)); SendCommandNG(CMD_HF_MIFAREULAES_AUTH, (uint8_t *)&payload, sizeof(payload));
PacketResponseNG resp; PacketResponseNG resp;
if (WaitForResponseTimeout(CMD_HF_MIFAREULAES_AUTH, &resp, 1500) == false) { if (WaitForResponseTimeout(CMD_HF_MIFAREULAES_AUTH, &resp, 1500) == false) {
return PM3_ETIMEOUT; return PM3_ETIMEOUT;
@ -481,7 +481,7 @@ static int try_default_aes_keys(bool override) {
if (ulaes_requestAuthentication(key, keyno, true) == PM3_SUCCESS) { if (ulaes_requestAuthentication(key, keyno, true) == PM3_SUCCESS) {
char keystr[20] = {0}; char keystr[20] = {0};
switch(keyno) { switch (keyno) {
case 0: case 0:
sprintf(keystr, "Data key"); sprintf(keystr, "Data key");
break; break;

View file

@ -99,13 +99,13 @@ static void print_st25ta_system_info(uint8_t *d, uint8_t n) {
if (d[2] == 0x80) { if (d[2] == 0x80) {
PrintAndLogEx(SUCCESS, " ....%02X.............................. - ST reserved", d[2]); PrintAndLogEx(SUCCESS, " ....%02X.............................. - ST reserved", d[2]);
} else { } else {
PrintAndLogEx(SUCCESS, " ....%02X.............................. - GPO config" , d[2]); PrintAndLogEx(SUCCESS, " ....%02X.............................. - GPO config", d[2]);
} }
PrintAndLogEx(SUCCESS, " ......%02X............................ - Event counter config", d[3]); PrintAndLogEx(SUCCESS, " ......%02X............................ - Event counter config", d[3]);
uint32_t counter = (d[4] << 16 | d[5] << 8 | d[6]); uint32_t counter = (d[4] << 16 | d[5] << 8 | d[6]);
PrintAndLogEx(SUCCESS, " ........%02X%02X%02X...................... - 20 bit counter ( %u )", d[4],d[5],d[6], (counter & 0xFFFFF)); PrintAndLogEx(SUCCESS, " ........%02X%02X%02X...................... - 20 bit counter ( %u )", d[4], d[5], d[6], (counter & 0xFFFFF));
PrintAndLogEx(SUCCESS, " ..............%02X.................... - Product version", d[7]); PrintAndLogEx(SUCCESS, " ..............%02X.................... - Product version", d[7]);
PrintAndLogEx(SUCCESS, " ................%s...... - UID", sprint_hex_inrow(d + 8, 7)); PrintAndLogEx(SUCCESS, " ................%s...... - UID", sprint_hex_inrow(d + 8, 7));

View file

@ -1305,7 +1305,7 @@ static int CmdPCSC(const char *Cmd) {
uint8_t atr[50] = {0}; uint8_t atr[50] = {0};
int atrLen = 0; int atrLen = 0;
switch(card_type) { switch (card_type) {
case CC_CONTACT: { case CC_CONTACT: {
memcpy(atr, card.atr, card.atr_len); memcpy(atr, card.atr, card.atr_len);
atrLen = card.atr_len; atrLen = card.atr_len;
@ -1335,7 +1335,7 @@ static int CmdPCSC(const char *Cmd) {
mbedtls_net_send(&netCtx, res, 2 + atrLen); mbedtls_net_send(&netCtx, res, 2 + atrLen);
} else if (cmdbuf[1] != 0x01) { // vpcd APDU } else if (cmdbuf[1] != 0x01) { // vpcd APDU
int apduLen = (cmdbuf[0] << 8)+ cmdbuf[1]; int apduLen = (cmdbuf[0] << 8) + cmdbuf[1];
uint8_t apduRes[APDU_RES_LEN] = {0}; uint8_t apduRes[APDU_RES_LEN] = {0};
int apduResLen = 0; int apduResLen = 0;

View file

@ -431,17 +431,17 @@ const static vocabulary_t vocabulary[] = {
{ 0, "hf mfu setuid" }, { 0, "hf mfu setuid" },
{ 0, "hf mfu amiibo" }, { 0, "hf mfu amiibo" },
{ 1, "hf mfdes help" }, { 1, "hf mfdes help" },
{ 0, "hf mfdes info" }, { 1, "hf mfdes list" },
{ 0, "hf mfdes getuid" },
{ 0, "hf mfdes default" },
{ 0, "hf mfdes auth" }, { 0, "hf mfdes auth" },
{ 0, "hf mfdes chk" }, { 0, "hf mfdes chk" },
{ 0, "hf mfdes default" },
{ 0, "hf mfdes detect" }, { 0, "hf mfdes detect" },
{ 0, "hf mfdes freemem" },
{ 0, "hf mfdes setconfig" },
{ 0, "hf mfdes formatpicc" }, { 0, "hf mfdes formatpicc" },
{ 1, "hf mfdes list" }, { 0, "hf mfdes freemem" },
{ 0, "hf mfdes getuid" },
{ 0, "hf mfdes info" },
{ 0, "hf mfdes mad" }, { 0, "hf mfdes mad" },
{ 0, "hf mfdes setconfig" },
{ 0, "hf mfdes lsapp" }, { 0, "hf mfdes lsapp" },
{ 0, "hf mfdes getaids" }, { 0, "hf mfdes getaids" },
{ 0, "hf mfdes getappnames" }, { 0, "hf mfdes getappnames" },
@ -814,13 +814,13 @@ const static vocabulary_t vocabulary[] = {
{ 1, "piv list" }, { 1, "piv list" },
{ 1, "smart help" }, { 1, "smart help" },
{ 1, "smart list" }, { 1, "smart list" },
{ 0, "smart brute" },
{ 0, "smart info" }, { 0, "smart info" },
{ 0, "smart relay" }, { 1, "smart pcsc" },
{ 0, "smart reader" }, { 0, "smart reader" },
{ 0, "smart raw" }, { 0, "smart raw" },
{ 1, "smart upgrade" }, { 1, "smart upgrade" },
{ 0, "smart setclock" }, { 0, "smart setclock" },
{ 0, "smart brute" },
{ 1, "script help" }, { 1, "script help" },
{ 1, "script list" }, { 1, "script list" },
{ 1, "script run" }, { 1, "script run" },

View file

@ -444,7 +444,7 @@
}, },
"data help": { "data help": {
"command": "data help", "command": "data help",
"description": "help This help ----------- ------------------------- Modulation------------------------- biphaserawdecode Biphase decode bin stream in DemodBuffer detectclock Detect ASK, FSK, NRZ, PSK clock rate of wave in GraphBuffer fsktonrz Convert fsk2 to nrz wave for alternate fsk demodulating (for weak fsk) manrawdecode Manchester decode binary stream in DemodBuffer modulation Identify LF signal for clock and modulation rawdemod Demodulate the data in the GraphBuffer and output binary ----------- ------------------------- Graph------------------------- askedgedetect Adjust Graph for manual ASK demod autocorr Autocorrelation over window dirthreshold Max rising higher up-thres/ Min falling lower down-thres decimate Decimate samples envelope Generate square envelope of samples undecimate Un-decimate samples hide Hide graph window hpf Remove DC offset from trace iir Apply IIR buttersworth filter on plot data grid overlay grid on graph window ltrim Trim samples from left of trace mtrim Trim out samples from the specified start to the specified stop norm Normalize max/min to +/-128 plot Show graph window cthreshold Average out all values between rtrim Trim samples from right of trace setgraphmarkers Set blue and orange marker in graph window shiftgraphzero Shift 0 for Graphed wave + or - shift value timescale Set cursor display timescale zerocrossings Count time between zero-crossings convertbitstream Convert GraphBuffer's 0/1 values to 127 / -127 getbitstream Convert GraphBuffer's >=1 values to 1 and <1 to 0 ----------- ------------------------- General------------------------- asn1 ASN1 decoder atr ATR lookup bin2hex Converts binary to hexadecimal bmap Convert hex value according a binary template clear Clears bigbuf on deviceside and graph window crypto Encrypt and decrypt data diff Diff of input files hex2bin Converts hexadecimal to binary load Load contents of file into graph window num Converts dec/hex/bin print Print the data in the DemodBuffer save Save signal trace data (from graph window) setdebugmode Set Debugging Level on client side --------------------------------------------------------------------------------------- data biphaserawdecode available offline: yes Biphase decode binary stream in DemodBuffer Converts 10 or 01 -> 1 and 11 or 00 -> 0 - must have binary sequence in DemodBuffer (run `data rawdemod --ar` before) - invert for Conditional Dephase Encoding (CDP) AKA Differential Manchester", "description": "----------- ------------------------- General------------------------- help This help ----------- ------------------------- Modulation------------------------- biphaserawdecode Biphase decode bin stream in DemodBuffer detectclock Detect ASK, FSK, NRZ, PSK clock rate of wave in GraphBuffer fsktonrz Convert fsk2 to nrz wave for alternate fsk demodulating (for weak fsk) manrawdecode Manchester decode binary stream in DemodBuffer modulation Identify LF signal for clock and modulation rawdemod Demodulate the data in the GraphBuffer and output binary ----------- ------------------------- Graph------------------------- askedgedetect Adjust Graph for manual ASK demod autocorr Autocorrelation over window dirthreshold Max rising higher up-thres/ Min falling lower down-thres decimate Decimate samples envelope Generate square envelope of samples undecimate Un-decimate samples hide Hide graph window hpf Remove DC offset from trace iir Apply IIR buttersworth filter on plot data grid overlay grid on graph window ltrim Trim samples from left of trace mtrim Trim out samples from the specified start to the specified stop norm Normalize max/min to +/-128 plot Show graph window cthreshold Average out all values between rtrim Trim samples from right of trace setgraphmarkers Set blue and orange marker in graph window shiftgraphzero Shift 0 for Graphed wave + or - shift value timescale Set cursor display timescale zerocrossings Count time between zero-crossings convertbitstream Convert GraphBuffer's 0/1 values to 127 / -127 getbitstream Convert GraphBuffer's >=1 values to 1 and <1 to 0 ----------- ------------------------- Operations------------------------- asn1 ASN1 decoder atr ATR lookup bin2hex Converts binary to hexadecimal bmap Convert hex value according a binary template clear Clears bigbuf on deviceside and graph window crypto Encrypt and decrypt data diff Diff of input files hex2bin Converts hexadecimal to binary load Load contents of file into graph window num Converts dec/hex/bin print Print the data in the DemodBuffer save Save signal trace data (from graph window) setdebugmode Set Debugging Level on client side --------------------------------------------------------------------------------------- data biphaserawdecode available offline: yes Biphase decode binary stream in DemodBuffer Converts 10 or 01 -> 1 and 11 or 00 -> 0 - must have binary sequence in DemodBuffer (run `data rawdemod --ar` before) - invert for Conditional Dephase Encoding (CDP) AKA Differential Manchester",
"notes": [ "notes": [
"data biphaserawdecode -> decode biphase bitstream from the DemodBuffer", "data biphaserawdecode -> decode biphase bitstream from the DemodBuffer",
"data biphaserawdecode -oi -> decode biphase bitstream from the DemodBuffer, adjust offset, and invert output" "data biphaserawdecode -oi -> decode biphase bitstream from the DemodBuffer, adjust offset, and invert output"
@ -903,7 +903,7 @@
}, },
"emv help": { "emv help": {
"command": "emv help", "command": "emv help",
"description": "----------- ----------------------- general ----------------------- help This help list List ISO7816 history test Crypto logic test --------------------------------------------------------------------------------------- emv list available offline: yes Alias of `trace list -t 7816` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol", "description": "----------- ----------------------- General ----------------------- help This help list List ISO7816 history test Crypto logic selftest --------------------------------------------------------------------------------------- emv list available offline: yes Alias of `trace list -t 7816` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
"notes": [ "notes": [
"emv list --frame -> show frame delay times", "emv list --frame -> show frame delay times",
"emv list -1 -> use trace buffer" "emv list -1 -> use trace buffer"
@ -1423,7 +1423,7 @@
}, },
"hf 14b help": { "hf 14b help": {
"command": "hf 14b help", "command": "hf 14b help",
"description": "help This help list List ISO-14443-B history --------- ----------------------- general ----------------------- view Display content from tag dump file valid SRIX4 checksum test --------------------------------------------------------------------------------------- hf 14b list available offline: yes Alias of `trace list -t 14b -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol", "description": "--------- ----------------------- General ----------------------- help This help list List ISO-14443-B history --------- ----------------------- Operations ----------------------- view Display content from tag dump file valid SRIX4 checksum test --------------------------------------------------------------------------------------- hf 14b list available offline: yes Alias of `trace list -t 14b -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
"notes": [ "notes": [
"hf 14b list --frame -> show frame delay times", "hf 14b list --frame -> show frame delay times",
"hf 14b list -1 -> use trace buffer" "hf 14b list -1 -> use trace buffer"
@ -1702,7 +1702,7 @@
}, },
"hf 15 help": { "hf 15 help": {
"command": "hf 15 help", "command": "hf 15 help",
"description": "help This help list List ISO-15693 history ----------- ----------------------- general ----------------------- demod Demodulate ISO-15693 from tag view Display content from tag dump file --------------------------------------------------------------------------------------- hf 15 list available offline: yes Alias of `trace list -t 15 -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol", "description": "----------- ----------------------- General ----------------------- help This help list List ISO-15693 history ----------- ----------------------- Operations ----------------------- demod Demodulate ISO-15693 from tag view Display content from tag dump file --------------------------------------------------------------------------------------- hf 15 list available offline: yes Alias of `trace list -t 15 -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
"notes": [ "notes": [
"hf 15 list --frame -> show frame delay times", "hf 15 list --frame -> show frame delay times",
"hf 15 list -1 -> use trace buffer" "hf 15 list -1 -> use trace buffer"
@ -2531,7 +2531,7 @@
}, },
"hf felica help": { "hf felica help": {
"command": "hf felica help", "command": "hf felica help",
"description": "help This help list List ISO 18092/FeliCa history ----------- ----------------------- General ----------------------- ----------- ----------------------- FeliCa Standard ----------------------- ----------- ----------------------- FeliCa Light ----------------------- --------------------------------------------------------------------------------------- hf felica list available offline: yes Alias of `trace list -t felica` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol", "description": "----------- ----------------------- General ----------------------- help This help list List ISO 18092/FeliCa history ----------- ----------------------- Operations ----------------------- ----------- ----------------------- FeliCa Standard ----------------------- ----------- ----------------------- FeliCa Light ----------------------- --------------------------------------------------------------------------------------- hf felica list available offline: yes Alias of `trace list -t felica` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
"notes": [ "notes": [
"hf felica list --frame -> show frame delay times", "hf felica list --frame -> show frame delay times",
"hf felica list -1 -> use trace buffer" "hf felica list -1 -> use trace buffer"
@ -3309,7 +3309,7 @@
}, },
"hf iclass help": { "hf iclass help": {
"command": "hf iclass help", "command": "hf iclass help",
"description": "help This help list List iclass history ----------- --------------------- general --------------------- view Display content from tag dump file ----------- --------------------- recovery -------------------- loclass Use loclass to perform bruteforce reader attack lookup Uses authentication trace to check for key in dictionary file ----------- ---------------------- utils ---------------------- calcnewkey Calc diversified keys (blocks 3 & 4) to write new keys encode Encode binary wiegand to block 7 encrypt Encrypt given block data decrypt Decrypt given block data or tag dump file managekeys Manage keys to use with iclass commands permutekey Permute function from 'heart of darkness' paper --------------------------------------------------------------------------------------- hf iclass list available offline: yes Alias of `trace list -t iclass -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol", "description": "----------- --------------------- General --------------------- help This help list List iclass history view Display content from tag dump file ----------- --------------------- Recovery -------------------- loclass Use loclass to perform bruteforce reader attack lookup Uses authentication trace to check for key in dictionary file ----------- ---------------------- Utils ---------------------- calcnewkey Calc diversified keys (blocks 3 & 4) to write new keys encode Encode binary wiegand to block 7 encrypt Encrypt given block data decrypt Decrypt given block data or tag dump file managekeys Manage keys to use with iclass commands permutekey Permute function from 'heart of darkness' paper --------------------------------------------------------------------------------------- hf iclass list available offline: yes Alias of `trace list -t iclass -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
"notes": [ "notes": [
"hf iclass list --frame -> show frame delay times", "hf iclass list --frame -> show frame delay times",
"hf iclass list -1 -> use trace buffer" "hf iclass list -1 -> use trace buffer"
@ -6087,19 +6087,7 @@
}, },
"hf mfdes help": { "hf mfdes help": {
"command": "hf mfdes help", "command": "hf mfdes help",
"description": "help This help list List DESFire (ISO 14443A) history test Regression crypto tests --------------------------------------------------------------------------------------- hf mfdes info available offline: no Get info from MIFARE DESfire tags", "description": "help This help list List DESFire (ISO 14443A) history test Regression crypto tests --------------------------------------------------------------------------------------- hf mfdes list available offline: yes Alias of `trace list -t des -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
"notes": [
"hf mfdes info"
],
"offline": true,
"options": [
"-h, --help This help"
],
"usage": "hf mfdes info [-h]"
},
"hf mfdes list": {
"command": "hf mfdes list",
"description": "Alias of `trace list -t des -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
"notes": [ "notes": [
"hf mfdes list --frame -> show frame delay times", "hf mfdes list --frame -> show frame delay times",
"hf mfdes list -1 -> use trace buffer" "hf mfdes list -1 -> use trace buffer"
@ -6118,6 +6106,18 @@
], ],
"usage": "hf mfdes list [-h1crux] [--frame] [-f <fn>]" "usage": "hf mfdes list [-h1crux] [--frame] [-f <fn>]"
}, },
"hf mfdes info": {
"command": "hf mfdes info",
"description": "Get info from MIFARE DESfire tags",
"notes": [
"hf mfdes info"
],
"offline": false,
"options": [
"-h, --help This help"
],
"usage": "hf mfdes info [-h]"
},
"hf mfdes lsapp": { "hf mfdes lsapp": {
"command": "hf mfdes lsapp", "command": "hf mfdes lsapp",
"description": "Show application list. Master key needs to be provided or flag --no-auth set (depend on cards settings).", "description": "Show application list. Master key needs to be provided or flag --no-auth set (depend on cards settings).",
@ -6839,7 +6839,7 @@
}, },
"hf mfu help": { "hf mfu help": {
"command": "hf mfu help", "command": "hf mfu help",
"description": "help This help list List MIFARE Ultralight / NTAG history keygen Generate 3DES MIFARE diversified keys pwdgen Generate pwd from known algos view Display content from tag dump file --------------------------------------------------------------------------------------- hf mfu list available offline: yes Alias of `trace list -t 14a -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol", "description": "help This help list List MIFARE Ultralight / NTAG history keygen Generate DES/3DES/AES MIFARE diversified keys pwdgen Generate pwd from known algos view Display content from tag dump file --------------------------------------------------------------------------------------- hf mfu list available offline: yes Alias of `trace list -t 14a -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
"notes": [ "notes": [
"hf 14a list --frame -> show frame delay times", "hf 14a list --frame -> show frame delay times",
"hf 14a list -1 -> use trace buffer" "hf 14a list -1 -> use trace buffer"
@ -6870,13 +6870,14 @@
"options": [ "options": [
"-h, --help This help", "-h, --help This help",
"-k, --key <hex> Authentication key (UL-C 16 bytes, EV1/NTAG 4 bytes)", "-k, --key <hex> Authentication key (UL-C 16 bytes, EV1/NTAG 4 bytes)",
"-l Swap entered key's endianness" "-l Swap entered key's endianness",
"--force override `hw dbg` settings"
], ],
"usage": "hf mfu info [-hl] [-k <hex>]" "usage": "hf mfu info [-hl] [-k <hex>] [--force]"
}, },
"hf mfu keygen": { "hf mfu keygen": {
"command": "hf mfu keygen", "command": "hf mfu keygen",
"description": "Set the 3DES key on MIFARE Ultralight-C tag.", "description": "Set the DES/3DES/AES key on MIFARE Ultralight-C tag.",
"notes": [ "notes": [
"hf mfu keygen -r", "hf mfu keygen -r",
"hf mfu keygen --uid 11223344556677" "hf mfu keygen --uid 11223344556677"
@ -6885,9 +6886,10 @@
"options": [ "options": [
"-h, --help This help", "-h, --help This help",
"-u, --uid <hex> <4|7> hex byte UID", "-u, --uid <hex> <4|7> hex byte UID",
"-r Read UID from tag" "-r Read UID from tag",
"-b, --blk <dec> Block number"
], ],
"usage": "hf mfu keygen [-hr] [-u <hex>]" "usage": "hf mfu keygen [-hr] [-u <hex>] [-b <dec>]"
}, },
"hf mfu ndefread": { "hf mfu ndefread": {
"command": "hf mfu ndefread", "command": "hf mfu ndefread",
@ -7743,7 +7745,7 @@
}, },
"hf xerox help": { "hf xerox help": {
"command": "hf xerox help", "command": "hf xerox help",
"description": "help This help list List ISO-14443B history -------- ----------------------- general ----------------------- view Display content from tag dump file --------------------------------------------------------------------------------------- hf xerox list available offline: yes Alias of `trace list -t 14b -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol", "description": "help This help list List ISO-14443B history -------- ----------------------- General ----------------------- view Display content from tag dump file --------------------------------------------------------------------------------------- hf xerox list available offline: yes Alias of `trace list -t 14b -c` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
"notes": [ "notes": [
"hf 14b list --frame -> show frame delay times", "hf 14b list --frame -> show frame delay times",
"hf 14b list -1 -> use trace buffer" "hf 14b list -1 -> use trace buffer"
@ -7882,13 +7884,14 @@
"command": "hw detectreader", "command": "hw detectreader",
"description": "Start to detect presences of reader field", "description": "Start to detect presences of reader field",
"notes": [ "notes": [
"hw detectreader",
"hw detectreader -L" "hw detectreader -L"
], ],
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help This help", "-h, --help This help",
"-L, --LF detect low frequency 125/134 kHz", "-L, --LF only detect low frequency 125/134 kHz",
"-H, --HF detect high frequency 13.56 MHZ" "-H, --HF only detect high frequency 13.56 MHZ"
], ],
"usage": "hw detectreader [-hLH]" "usage": "hw detectreader [-hLH]"
}, },
@ -8359,9 +8362,10 @@
"--clk <dec> <16|32|40|64> clock (default 64)", "--clk <dec> <16|32|40|64> clock (default 64)",
"--id <hex> EM Tag ID number (5 hex bytes)", "--id <hex> EM Tag ID number (5 hex bytes)",
"--q5 optional - specify writing to Q5/T5555 tag", "--q5 optional - specify writing to Q5/T5555 tag",
"--em optional - specify writing to EM4305/4469 tag" "--em optional - specify writing to EM4305/4469 tag",
"--electra optional - add Electra blocks to tag"
], ],
"usage": "lf em 410x clone [-h] [--clk <dec>] --id <hex> [--q5] [--em]" "usage": "lf em 410x clone [-h] [--clk <dec>] --id <hex> [--q5] [--em] [--electra]"
}, },
"lf em 410x reader": { "lf em 410x reader": {
"command": "lf em 410x reader", "command": "lf em 410x reader",
@ -8488,7 +8492,7 @@
}, },
"lf em 4x05 help": { "lf em 4x05 help": {
"command": "lf em 4x05 help", "command": "lf em 4x05 help",
"description": "help This help ----------- ----------------------- general ----------------------- config Create common configuration words demod Demodulate a EM4x05/EM4x69 tag from the GraphBuffer sniff Attempt to recover em4x05 commands from sample buffer view Display content from tag dump file --------------------------------------------------------------------------------------- lf em 4x05 brute available offline: no This command tries to bruteforce the password of a EM4205/4305/4469/4569 The loop is running on device side, press Proxmark3 button to abort", "description": "----------- ----------------------- General ----------------------- help This help ----------- ----------------------- Operations ----------------------- config Create common configuration words demod Demodulate a EM4x05/EM4x69 tag from the GraphBuffer sniff Attempt to recover em4x05 commands from sample buffer view Display content from tag dump file --------------------------------------------------------------------------------------- lf em 4x05 brute available offline: no This command tries to bruteforce the password of a EM4205/4305/4469/4569 The loop is running on device side, press Proxmark3 button to abort",
"notes": [ "notes": [
"Note: if you get many false positives, change position on the antennalf em 4x05 brute", "Note: if you get many false positives, change position on the antennalf em 4x05 brute",
"lf em 4x05 brute -n 1 -> stop after first candidate found", "lf em 4x05 brute -n 1 -> stop after first candidate found",
@ -12145,7 +12149,7 @@
}, },
"smart help": { "smart help": {
"command": "smart help", "command": "smart help",
"description": "help This help list List ISO 7816 history upgrade Upgrade sim module firmware --------------------------------------------------------------------------------------- smart list available offline: yes Alias of `trace list -t 7816` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol", "description": "help This help list List ISO 7816 history pcsc Turn pm3 into pcsc reader and relay to host OS via vpcd upgrade Upgrade sim module firmware --------------------------------------------------------------------------------------- smart list available offline: yes Alias of `trace list -t 7816` with selected protocol data to annotate trace buffer You can load a trace from file (see `trace load -h`) or it be downloaded from device by default It accepts all other arguments of `trace list`. Note that some might not be relevant for this specific protocol",
"notes": [ "notes": [
"smart list --frame -> show frame delay times", "smart list --frame -> show frame delay times",
"smart list -1 -> use trace buffer" "smart list -1 -> use trace buffer"
@ -12177,6 +12181,27 @@
], ],
"usage": "smart info [-hv]" "usage": "smart info [-hv]"
}, },
"smart pcsc": {
"command": "smart pcsc",
"description": "Make pm3 available to host OS smartcard driver via vpcd to enable use with other software such as GlobalPlatform Pro",
"notes": [
"Requires the virtual smartcard daemon to be installed and running",
"see https://frankmorgner.github.io/vsmartcard/virtualsmartcard/README.html",
"note:",
"`-v` shows APDU transactions between OS and card"
],
"offline": true,
"options": [
"-h, --help This help",
"--host <str> vpcd socket host (default: localhost)",
"-p, --port <int> vpcd socket port (default: 35963)",
"-v, --verbose display APDU transactions between OS and card",
"-a use ISO 14443A contactless interface",
"-b use ISO 14443B contactless interface",
"-c use ISO 7816 contact interface"
],
"usage": "smart pcsc [-hvabc] [--host <str>] [-p <int>]"
},
"smart raw": { "smart raw": {
"command": "smart raw", "command": "smart raw",
"description": "Sends raw bytes to card", "description": "Sends raw bytes to card",
@ -12212,24 +12237,6 @@
], ],
"usage": "smart reader [-hv]" "usage": "smart reader [-hv]"
}, },
"smart relay": {
"command": "smart relay",
"description": "Make pm3 available to host OS smartcard driver via vpcd to enable use with other software such as GlobalPlatform Pro",
"notes": [
"Requires the virtual smartcard daemon to be installed and running",
"see https://frankmorgner.github.io/vsmartcard/virtualsmartcard/README.html",
"note:",
"`-v` shows APDU transactions between OS and card"
],
"offline": false,
"options": [
"-h, --help This help",
"--host <str> VPCD socket host (default: localhost)",
"-p, --port <int> VPCD socket port (default: 35963)",
"-v, --verbose Verbose output"
],
"usage": "smart relay [-hv] [--host <str>] [-p <int>]"
},
"smart setclock": { "smart setclock": {
"command": "smart setclock", "command": "smart setclock",
"description": "Set clock speed for smart card interface.", "description": "Set clock speed for smart card interface.",
@ -12491,6 +12498,6 @@
"metadata": { "metadata": {
"commands_extracted": 721, "commands_extracted": 721,
"extracted_by": "PM3Help2JSON v1.00", "extracted_by": "PM3Help2JSON v1.00",
"extracted_on": "2024-02-03T15:03:29" "extracted_on": "2024-02-16T20:57:06"
} }
} }

View file

@ -149,7 +149,7 @@ Check column "offline" for their availability.
|------- |------- |----------- |------- |------- |-----------
|`emv help `|Y |`This help` |`emv help `|Y |`This help`
|`emv list `|Y |`List ISO7816 history` |`emv list `|Y |`List ISO7816 history`
|`emv test `|Y |`Crypto logic test` |`emv test `|Y |`Crypto logic selftest`
|`emv challenge `|N |`Generate challenge` |`emv challenge `|N |`Generate challenge`
|`emv exec `|N |`Executes EMV contactless transaction` |`emv exec `|N |`Executes EMV contactless transaction`
|`emv genac `|N |`Generate ApplicationCryptogram` |`emv genac `|N |`Generate ApplicationCryptogram`
@ -598,7 +598,7 @@ Check column "offline" for their availability.
|------- |------- |----------- |------- |------- |-----------
|`hf mfu help `|Y |`This help` |`hf mfu help `|Y |`This help`
|`hf mfu list `|Y |`List MIFARE Ultralight / NTAG history` |`hf mfu list `|Y |`List MIFARE Ultralight / NTAG history`
|`hf mfu keygen `|Y |`Generate 3DES MIFARE diversified keys` |`hf mfu keygen `|Y |`Generate DES/3DES/AES MIFARE diversified keys`
|`hf mfu pwdgen `|Y |`Generate pwd from known algos` |`hf mfu pwdgen `|Y |`Generate pwd from known algos`
|`hf mfu otptear `|N |`Tear-off test on OTP bits` |`hf mfu otptear `|N |`Tear-off test on OTP bits`
|`hf mfu cauth `|N |`Authentication - Ultralight-C` |`hf mfu cauth `|N |`Authentication - Ultralight-C`
@ -626,17 +626,17 @@ Check column "offline" for their availability.
|command |offline |description |command |offline |description
|------- |------- |----------- |------- |------- |-----------
|`hf mfdes help `|Y |`This help` |`hf mfdes help `|Y |`This help`
|`hf mfdes info `|N |`Tag information` |`hf mfdes list `|Y |`List DESFire (ISO 14443A) history`
|`hf mfdes getuid `|N |`Get uid from card`
|`hf mfdes default `|N |`Set defaults for all the commands`
|`hf mfdes auth `|N |`MIFARE DesFire Authentication` |`hf mfdes auth `|N |`MIFARE DesFire Authentication`
|`hf mfdes chk `|N |`Check keys` |`hf mfdes chk `|N |`Check keys`
|`hf mfdes default `|N |`Set defaults for all the commands`
|`hf mfdes detect `|N |`Detect key type and tries to find one from the list` |`hf mfdes detect `|N |`Detect key type and tries to find one from the list`
|`hf mfdes freemem `|N |`Get free memory size`
|`hf mfdes setconfig `|N |`Set card configuration`
|`hf mfdes formatpicc `|N |`Format PICC` |`hf mfdes formatpicc `|N |`Format PICC`
|`hf mfdes list `|Y |`List DESFire (ISO 14443A) history` |`hf mfdes freemem `|N |`Get free memory size`
|`hf mfdes getuid `|N |`Get uid from card`
|`hf mfdes info `|N |`Tag information`
|`hf mfdes mad `|N |`Prints MAD records / files from the card` |`hf mfdes mad `|N |`Prints MAD records / files from the card`
|`hf mfdes setconfig `|N |`Set card configuration`
|`hf mfdes lsapp `|N |`Show all applications with files list` |`hf mfdes lsapp `|N |`Show all applications with files list`
|`hf mfdes getaids `|N |`Get Application IDs list` |`hf mfdes getaids `|N |`Get Application IDs list`
|`hf mfdes getappnames `|N |`Get Applications list` |`hf mfdes getappnames `|N |`Get Applications list`
@ -1455,13 +1455,13 @@ Check column "offline" for their availability.
|------- |------- |----------- |------- |------- |-----------
|`smart help `|Y |`This help` |`smart help `|Y |`This help`
|`smart list `|Y |`List ISO 7816 history` |`smart list `|Y |`List ISO 7816 history`
|`smart brute `|N |`Bruteforce SFI`
|`smart info `|N |`Tag information` |`smart info `|N |`Tag information`
|`smart relay `|N |`Turn pm3 into pcsc reader and relay to host OS via vpcd` |`smart pcsc `|Y |`Turn pm3 into pcsc reader and relay to host OS via vpcd`
|`smart reader `|N |`Act like an IS07816 reader` |`smart reader `|N |`Act like an IS07816 reader`
|`smart raw `|N |`Send raw hex data to tag` |`smart raw `|N |`Send raw hex data to tag`
|`smart upgrade `|Y |`Upgrade sim module firmware` |`smart upgrade `|Y |`Upgrade sim module firmware`
|`smart setclock `|N |`Set clock speed` |`smart setclock `|N |`Set clock speed`
|`smart brute `|N |`Bruteforce SFI`
### script ### script