From 24665367ea0c5fdc44af60a39ac8c4732374fe41 Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Thu, 12 Aug 2021 16:04:46 +0300 Subject: [PATCH] make style --- client/src/cmdhf14a.c | 2 +- client/src/cmdhfmfdes.c | 84 ++++++++++++------------ client/src/mifare/desfirecore.c | 18 +++--- client/src/mifare/desfirecrypto.c | 2 +- doc/commands.json | 103 ++++++++++++++++++++++++------ doc/commands.md | 10 +-- 6 files changed, 141 insertions(+), 78 deletions(-) diff --git a/client/src/cmdhf14a.c b/client/src/cmdhf14a.c index 68593a983..6e97b2815 100644 --- a/client/src/cmdhf14a.c +++ b/client/src/cmdhf14a.c @@ -403,7 +403,7 @@ int Hf14443_4aGetCardData(iso14a_card_select_t *card) { PrintAndLogEx(INFO, "E-> Error ATS length(%d) : %s", card->ats_len, sprint_hex(card->ats, card->ats_len)); return 1; } - + if (card->ats_len == card->ats[0] + 2) PrintAndLogEx(SUCCESS, " ATS: [%d] %s", card->ats[0], sprint_hex(card->ats, card->ats[0])); else diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index 8ee3ae52a..9933cf880 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -161,7 +161,7 @@ static int CLIGetUint32Hex(CLIParserContext *ctx, uint8_t paramnum, uint32_t def *value = defaultValue; if (valuePresent != NULL) *valuePresent = false; - + int res = arg_get_u32_hexstr_def_nlen(ctx, paramnum, defaultValue, value, nlen, true); if (valuePresent != NULL) @@ -755,7 +755,7 @@ static int AuthCheckDesfire(DesfireContext *dctx, uint8_t aeskeyList[MAX_KEYS_LIST_LEN][16], uint32_t aeskeyListLen, uint8_t k3kkeyList[MAX_KEYS_LIST_LEN][24], uint32_t k3kkeyListLen, uint8_t cmdKdfAlgo, uint8_t kdfInputLen, uint8_t *kdfInput, - uint8_t foundKeys[4][0xE][24 + 1], + uint8_t foundKeys[4][0xE][24 + 1], bool *result, bool verbose) { @@ -776,7 +776,7 @@ static int AuthCheckDesfire(DesfireContext *dctx, uint8_t data[250] = {0}; size_t datalen = 0; - + res = DesfireGetKeySettings(dctx, data, &datalen); if (res != PM3_SUCCESS && datalen < 2) { PrintAndLogEx(ERR, "Could not get key settings"); @@ -797,10 +797,10 @@ static int AuthCheckDesfire(DesfireContext *dctx, default: break; } - + // always check master key usedkeys[0] = 1; - + if (curaid != 0) { FileListS fileList = {0}; size_t filescount = 0; @@ -827,7 +827,7 @@ static int AuthCheckDesfire(DesfireContext *dctx, usedkeys[i] = 1; } } - + if (verbose) { PrintAndLogEx(INFO, "Check: %s %s %s %s " NOLF, (des) ? "DES" : "", (tdes) ? "2TDEA" : "", (k3kdes) ? "3TDEA" : "", (aes) ? "AES" : ""); PrintAndLogEx(NORMAL, "keys: " NOLF); @@ -1162,7 +1162,7 @@ static int CmdHF14aDesChk(const char *Cmd) { DesfireSetCommandSet(&dctx, DCCNativeISO); DesfireSetCommMode(&dctx, DCMPlain); DesfireSecureChannel secureChannel = DACEV1; - + // save card UID to dctx DesfireGetCardUID(&dctx); @@ -1273,7 +1273,7 @@ static int CmdHF14ADesList(const char *Cmd) { static int DesfireAuthCheck(DesfireContext *dctx, uint32_t appid, DesfireSecureChannel secureChannel, uint8_t *key) { DesfireSetKeyNoClear(dctx, dctx->keyNum, dctx->keyType, key); - + int res = DesfireAuthenticate(dctx, secureChannel, false); if (res == PM3_SUCCESS) { memcpy(dctx->key, key, desfire_get_key_length(dctx->keyType)); @@ -1350,9 +1350,9 @@ static int CmdHF14aDesDetect(const char *Cmd) { PrintAndLogEx(FAILED, "Select AID 0x%06x " _RED_("failed") ". Result: %d", appid, res); return res; } - + bool keytypes[4] = {0}; - + uint8_t data[250] = {0}; size_t datalen = 0; res = DesfireGetKeySettings(&dctx, data, &datalen); @@ -1399,20 +1399,20 @@ static int CmdHF14aDesDetect(const char *Cmd) { return res; } } - + if (verbose) { if (appid == 0) PrintAndLogEx(INFO, "Check PICC key num: %d (0x%02x)", dctx.keyNum, dctx.keyNum); else PrintAndLogEx(INFO, "Check app: %06x key num: %d (0x%02x)", appid, dctx.keyNum, dctx.keyNum); - PrintAndLogEx(INFO, "keys: DES: %s 2TDEA: %s 3TDEA: %s AES: %s", - keytypes[T_DES] ? _GREEN_("YES") : _RED_("NO"), - keytypes[T_3DES] ? _GREEN_("YES") : _RED_("NO"), - keytypes[T_3K3DES] ? _GREEN_("YES") : _RED_("NO"), - keytypes[T_AES] ? _GREEN_("YES") : _RED_("NO") - ); + PrintAndLogEx(INFO, "keys: DES: %s 2TDEA: %s 3TDEA: %s AES: %s", + keytypes[T_DES] ? _GREEN_("YES") : _RED_("NO"), + keytypes[T_3DES] ? _GREEN_("YES") : _RED_("NO"), + keytypes[T_3K3DES] ? _GREEN_("YES") : _RED_("NO"), + keytypes[T_AES] ? _GREEN_("YES") : _RED_("NO") + ); } - + // for key types bool found = false; size_t errcount = 0; @@ -1422,7 +1422,7 @@ static int CmdHF14aDesDetect(const char *Cmd) { dctx.keyType = ktype; if (verbose) PrintAndLogEx(INFO, "Scan key type: %s", CLIGetOptionListStr(DesfireAlgoOpts, dctx.keyType)); - + if (dict_filenamelen == 0) { // keys from mifaredefault.h for (int i = 0; i < g_mifare_plus_default_keys_len; i++) { @@ -1431,7 +1431,7 @@ static int CmdHF14aDesDetect(const char *Cmd) { continue; if (ktype == T_3K3DES) memcpy(&key[16], key, 8); - + res = DesfireAuthCheck(&dctx, appid, securechann, key); if (res == PM3_SUCCESS) { found = true; @@ -1440,7 +1440,7 @@ static int CmdHF14aDesDetect(const char *Cmd) { if (res == -10) { if (verbose) PrintAndLogEx(ERR, "Can't select AID. There is no connection with card."); - + found = false; break; // we can't select app after invalid 1st auth stages } @@ -1448,7 +1448,7 @@ static int CmdHF14aDesDetect(const char *Cmd) { if (errcount > 10) { if (verbose) PrintAndLogEx(ERR, "Too much errors (%zu) from card", errcount); - break; + break; } errcount++; } else @@ -1460,12 +1460,12 @@ static int CmdHF14aDesDetect(const char *Cmd) { uint32_t keyListLen = 0; size_t keylen = desfire_get_key_length(dctx.keyType); size_t endFilePosition = 0; - + while (!found) { res = loadFileDICTIONARYEx((char *)dict_filename, keyList, sizeof(keyList), NULL, keylen, &keyListLen, endFilePosition, &endFilePosition, verbose); if (res != 1 && res != PM3_SUCCESS) break; - + for (int i = 0; i < keyListLen; i++) { res = DesfireAuthCheck(&dctx, appid, securechann, &keyList[i * keylen]); if (res == PM3_SUCCESS) { @@ -1475,7 +1475,7 @@ static int CmdHF14aDesDetect(const char *Cmd) { if (res == -10) { if (verbose) PrintAndLogEx(ERR, "Can't select AID. There is no connection with card."); - + found = false; break; // we can't select app after invalid 1st auth stages } @@ -1483,17 +1483,17 @@ static int CmdHF14aDesDetect(const char *Cmd) { if (errcount > 10) { if (verbose) PrintAndLogEx(ERR, "Too much errors (%zu) from card", errcount); - break; + break; } errcount++; } else errcount = 0; } - + if (endFilePosition == 0) break; } - + } if (found) break; @@ -1504,18 +1504,18 @@ static int CmdHF14aDesDetect(const char *Cmd) { PrintAndLogEx(INFO, _GREEN_("Found") " key num: %d (0x%02x)", dctx.keyNum, dctx.keyNum); else PrintAndLogEx(INFO, "Found key for app: %06x key num: %d (0x%02x)", appid, dctx.keyNum, dctx.keyNum); - - PrintAndLogEx(INFO, "key " _GREEN_("%s") " [%d]: " _GREEN_("%s"), - CLIGetOptionListStr(DesfireAlgoOpts, dctx.keyType), - desfire_get_key_length(dctx.keyType), - sprint_hex(dctx.key, desfire_get_key_length(dctx.keyType))); + + PrintAndLogEx(INFO, "key " _GREEN_("%s") " [%d]: " _GREEN_("%s"), + CLIGetOptionListStr(DesfireAlgoOpts, dctx.keyType), + desfire_get_key_length(dctx.keyType), + sprint_hex(dctx.key, desfire_get_key_length(dctx.keyType))); } else { PrintAndLogEx(INFO, "Key " _RED_("not found")); } DropField(); - + if (found && save) { defaultKeyNum = dctx.keyNum; defaultAlgoId = dctx.keyType; @@ -1537,7 +1537,7 @@ static int CmdHF14aDesDetect(const char *Cmd) { PrintAndLogEx(INFO, "Command set : %s", CLIGetOptionListStr(DesfireCommandSetOpts, defaultCommSet)); PrintAndLogEx(INFO, _GREEN_("Saved")); } - + return PM3_SUCCESS; } @@ -1617,7 +1617,7 @@ static int CmdHF14aDesMAD(const char *Cmd) { break; } } - + if (foundFFFFFF) { res = DesfireSelectAIDHexNoFieldOn(&dctx, 0xffffff); if (res == PM3_SUCCESS) { @@ -1631,7 +1631,7 @@ static int CmdHF14aDesMAD(const char *Cmd) { else PrintAndLogEx(WARNING, "MAD version : " _YELLOW_("%d"), madver); } - + uint8_t data[250] = {0}; size_t datalen = 0; @@ -1670,7 +1670,7 @@ static int CmdHF14aDesMAD(const char *Cmd) { } else { PrintAndLogEx(WARNING, "Issuer information " _RED_("not found") " on the card."); } - + size_t madappcount = 0; PrintAndLogEx(SUCCESS, "Applications : "); for (int i = 0; i < PICCInfo.appCount; i++) { @@ -1679,7 +1679,7 @@ static int CmdHF14aDesMAD(const char *Cmd) { madappcount++; } } - + if (madappcount == 0) PrintAndLogEx(SUCCESS, "There is no MAD applications on the card"); @@ -1742,7 +1742,7 @@ static int CmdHF14ADesSelectApp(const char *Cmd) { CLIParserFree(ctx); return PM3_EINVARG; } - + uint32_t fileisoid = 0x0000; bool fileisoidpresent = false; if (CLIGetUint32Hex(ctx, 15, 0x0000, &fileisoid, &fileisoidpresent, 2, "ISO ID for EF or DF must have 2 bytes length")) { @@ -1810,7 +1810,7 @@ static int CmdHF14ADesSelectApp(const char *Cmd) { PrintAndLogEx(SUCCESS, "Application 0x%06x selected " _GREEN_("succesfully") " ", appid); } - + if (fileisoidpresent) { res = DesfireSelectEx(&dctx, false, ISWIsoID, fileisoid, NULL); if (res != PM3_SUCCESS) { @@ -1818,7 +1818,7 @@ static int CmdHF14ADesSelectApp(const char *Cmd) { PrintAndLogEx(FAILED, "Select file 0x%04x " _RED_("failed") " ", fileisoid); return res; } - + PrintAndLogEx(SUCCESS, "File 0x%04x selected " _GREEN_("succesfully") " ", fileisoid); } diff --git a/client/src/mifare/desfirecore.c b/client/src/mifare/desfirecore.c index 09e52948b..07f85170d 100644 --- a/client/src/mifare/desfirecore.c +++ b/client/src/mifare/desfirecore.c @@ -842,16 +842,16 @@ void DesfirePrintMADAID(uint32_t appid, bool verbose) { DesfireAIDUintToByte(appid, aid); if ((aid[2] >> 4) != 0xF) return; - + uint16_t short_aid = ((aid[2] & 0xF) << 12) | (aid[1] << 4) | (aid[0] >> 4); - - PrintAndLogEx(SUCCESS, "MIFARE Classic ID (MAD): " _YELLOW_("%04X") " ver: " _YELLOW_("%01X") " AID: " _YELLOW_("%06x") " MAD AID Cluster[0x%02X]: " _YELLOW_("%s"), - short_aid, - appid & 0x0f, - appid, - short_aid >> 8, - nxp_cluster_to_text(short_aid >> 8)); - if (verbose) { + + PrintAndLogEx(SUCCESS, "MIFARE Classic ID (MAD): " _YELLOW_("%04X") " ver: " _YELLOW_("%01X") " AID: " _YELLOW_("%06x") " MAD AID Cluster[0x%02X]: " _YELLOW_("%s"), + short_aid, + appid & 0x0f, + appid, + short_aid >> 8, + nxp_cluster_to_text(short_aid >> 8)); + if (verbose) { if (appid == 0xffffff) PrintAndLogEx(SUCCESS, " Card issuer information application"); else diff --git a/client/src/mifare/desfirecrypto.c b/client/src/mifare/desfirecrypto.c index 287e6313c..7746ff4d3 100644 --- a/client/src/mifare/desfirecrypto.c +++ b/client/src/mifare/desfirecrypto.c @@ -353,7 +353,7 @@ void MifareKdfAn10922(DesfireContext *ctx, DesfireCryptoOpKeyType key_type, cons return; int kbs = desfire_get_key_block_length(ctx->keyType); // 8 or 16 - if (kbs == 0) + if (kbs == 0) return; uint8_t cmac[DESFIRE_MAX_CRYPTO_BLOCK_SIZE * 3] = {0}; diff --git a/doc/commands.json b/doc/commands.json index c6779527c..eb165f824 100644 --- a/doc/commands.json +++ b/doc/commands.json @@ -973,7 +973,7 @@ }, "help": { "command": "help", - "description": "help use ` help` for details of a command prefs { edit client/device preferences... } -------- ----------------------- technology ----------------------- analyse { analyse utils... } data { plot window / data buffer manipulation... } emv { emv iso-14443 / iso-7816... } hf { high frequency commands... } hw { hardware commands... } lf { low frequency commands... } nfc { nfc commands... } reveng { crc calculations from reveng software... } smart { smart card iso-7816 commands... } script { scripting commands... } trace { trace manipulation... } wiegand { wiegand format manipulation... } -------- ----------------------- general ----------------------- clear clear screen hints turn hints on / off msleep add a pause in milliseconds rem add a text line in log file quit exit exit program [=] session log e:\\proxspace\\pm3/.proxmark3/logs/log_20210808.txt --------------------------------------------------------------------------------------- auto available offline: no run lf search / hf search / data plot / data save", + "description": "help use ` help` for details of a command prefs { edit client/device preferences... } -------- ----------------------- technology ----------------------- analyse { analyse utils... } data { plot window / data buffer manipulation... } emv { emv iso-14443 / iso-7816... } hf { high frequency commands... } hw { hardware commands... } lf { low frequency commands... } nfc { nfc commands... } reveng { crc calculations from reveng software... } smart { smart card iso-7816 commands... } script { scripting commands... } trace { trace manipulation... } wiegand { wiegand format manipulation... } -------- ----------------------- general ----------------------- clear clear screen hints turn hints on / off msleep add a pause in milliseconds rem add a text line in log file quit exit exit program [=] session log e:\\proxspace\\pm3/.proxmark3/logs/log_20210812.txt --------------------------------------------------------------------------------------- auto available offline: no run lf search / hf search / data plot / data save", "notes": [ "auto" ], @@ -3834,7 +3834,7 @@ "hf mf sim --1k -> mifare classic 1k (default)", "hf mf sim --1k -u 0a0a0a0a -> mifare classic 1k with 4b uid", "hf mf sim --1k -u 11223344556677 -> mifare classic 1k with 7b uid", - "hf mf sim --1k -u 11223344 -i --crack -> perform reader attack in interactive mode", + "hf mf sim --1k -u 11223344 -i -x -> perform reader attack in interactive mode", "hf mf sim --2k -> mifare 2k", "hf mf sim --4k -> mifare 4k" ], @@ -4068,7 +4068,7 @@ "offline": false, "options": [ "-h, --help this help", - "-a, --aid use specific aid (3 hex bytes, big endian)", + "--aid use specific aid (3 hex bytes, big endian)", "-k, --key key for checking (hex 16 bytes)", "-d, --dict file with keys dictionary", "--pattern1b check all 1-byte combinations of key (0000...0000, 0101...0101, 0202...0202, ...)", @@ -4077,9 +4077,10 @@ "-j, --json json file to save keys", "-v, --verbose verbose mode.", "-f, --kdf key derivation function (kdf) (0=none, 1=an10922, 2=gallagher)", - "-i, --kdfi kdf input (hex 1-31 bytes)" + "-i, --kdfi kdf input (hex 1-31 bytes)", + "-a, --apdu show apdu requests and responses" ], - "usage": "hf mfdes chk [-hv] [-a ]... [-k ] [-d ] [--pattern1b] [--pattern2b] [--startp2b ] [-j ] [-f ] [-i ]" + "usage": "hf mfdes chk [-hva] [--aid ]... [-k ] [-d ] [--pattern1b] [--pattern2b] [--startp2b ] [-j ] [-f ] [-i ]" }, "hf mfdes chkeysettings": { "command": "hf mfdes chkeysettings", @@ -4199,6 +4200,7 @@ "--rawtype/--rawdata have priority over the other settings. and with these parameters you can create any file. file id comes from parameters, all the rest data must be in the --rawdata parameter", "--rawrights have priority over the separate rights settings.", "key/mode/etc of the authentication depends on application settings", + "hf mfdes createfile --aid 123456 --fid 01 --isofid 0001 --size 000010 -> create file with iso id. authentication with defaults from `default` command", "hf mfdes createfile --aid 123456 --fid 01 --rawtype 01 --rawdata 000100eeee000100 -> create file via sending rawdata to the card. can be used to create any type of file. authentication with defaults from `default` command", "hf mfdes createfile --aid 123456 --fid 01 --amode plain --rrights free --wrights free --rwrights free --chrights key0 -> create file app=123456, file=01 and mentioned rights with defaults from `default` command", "hf mfdes createfile -n 0 -t des -k 0000000000000000 -f none --aid 123456 --fid 01 --rawtype 00 --rawdata 00eeee000100 -> execute with default factory setup" @@ -4416,6 +4418,34 @@ ], "usage": "hf mfdes deletefile [-hav] [-n ] [-t ] [-k ] [-f ] [-i ] [-m ] [-c ] [-s ] [--aid ] [--fid ] [--no-auth]" }, + "hf mfdes detect": { + "command": "hf mfdes detect", + "description": "detect key type and tries to find one from the list.", + "notes": [ + "hf mfdes detect -> detect key 0 from picc level", + "hf mfdes detect -s d40 -> detect key 0 from picc level via secure channel d40", + "hf mfdes detect --dict mfdes_default_keys -> detect key 0 from picc level with help of the standard dictionary", + "hf mfdes detect --aid 123456 -n 2 --save -> detect key 2 from app 123456 and if succeed - save params to defaults (`default` command)" + ], + "offline": false, + "options": [ + "-h, --help this help", + "-a, --apdu show apdu requests and responses", + "-v, --verbose show technical data", + "-n, --keyno key number", + "-t, --algo crypt algo: des, 2tdea, 3tdea, aes", + "-k, --key key for authenticate (hex 8(des), 16(2tdea or aes) or 24(3tdea) bytes)", + "-f, --kdf key derivation function (kdf): none, an10922, gallagher", + "-i, --kdfi kdf input (hex 1-31 bytes)", + "-m, --cmode communicaton mode: plain/mac/encrypt", + "-c, --ccset communicaton command set: native/niso/iso", + "-s, --schann secure channel: d40/ev1/ev2", + "--aid application id (3 hex bytes, big endian)", + "--dict file with keys dictionary", + "--save save found key and parameters to defaults" + ], + "usage": "hf mfdes detect [-hav] [-n ] [-t ] [-k ] [-f ] [-i ] [-m ] [-c ] [-s ] [--aid ] [--dict ] [--save]" + }, "hf mfdes dump": { "command": "hf mfdes dump", "description": "for each application show fil list and then file content. key needs to be provided for authentication or flag --no-auth set (depend on cards settings).", @@ -4764,6 +4794,35 @@ ], "usage": "hf mfdes lsfiles [-hav] [-n ] [-t ] [-k ] [-f ] [-i ] [-m ] [-c ] [-s ] [--aid ] [--no-auth]" }, + "hf mfdes mad": { + "command": "hf mfdes mad", + "description": "reads and prints mifare application directory (mad).", + "notes": [ + "mad consists of one file with issuer info (aid ffffff) and several files with aid in the special format `faaaav` (a - mad id, v - multiple aid over one mad id)", + "the mifare desfire card master key settings have to allow the mifare desfire command getapplicationids without authentication (from datasheet)", + "", + "hf mfdes mad -> shows mad data", + "hf mfdes mad -v -> shows mad parsed and raw data", + "hf mfdes mad -a e103 -k d3f7d3f7d3f7d3f7d3f7d3f7d3f7d3f7 -> shows mad data with custom aid and key" + ], + "offline": false, + "options": [ + "-h, --help this help", + "-a, --apdu show apdu requests and responses", + "-v, --verbose show technical data", + "-n, --keyno key number", + "-t, --algo crypt algo: des, 2tdea, 3tdea, aes", + "-k, --key key for authenticate (hex 8(des), 16(2tdea or aes) or 24(3tdea) bytes)", + "-f, --kdf key derivation function (kdf): none, an10922, gallagher", + "-i, --kdfi kdf input (hex 1-31 bytes)", + "-m, --cmode communicaton mode: plain/mac/encrypt", + "-c, --ccset communicaton command set: native/niso/iso", + "-s, --schann secure channel: d40/ev1/ev2", + "--aid application id of issuer info file, (non-standard feature!) (3 hex bytes, big endian)", + "--auth authenticate to get info from getapplicationids command (non-standard feature!)" + ], + "usage": "hf mfdes mad [-hav] [-n ] [-t ] [-k ] [-f ] [-i ] [-m ] [-c ] [-s ] [--aid ] [--auth]" + }, "hf mfdes read": { "command": "hf mfdes read", "description": "read data from file. key needs to be provided or flag --no-auth set (depend on file settings).", @@ -4811,7 +4870,8 @@ "hf mfdes selectapp --aid 123456 -> select application 123456", "hf mfdes selectapp --mf -> select master file (picc level)", "hf mfdes selectapp --dfname aid123456 -> select application aid123456 by df name", - "hf mfdes selectapp --isoid 1111 -> select application 1111 by iso id" + "hf mfdes selectapp --isoid 1111 -> select application 1111 by iso id", + "hf mfdes selectapp --isoid 1111 --fileisoid 2222 -> select application 1111 file 2222 by iso id" ], "offline": false, "options": [ @@ -4828,10 +4888,11 @@ "-s, --schann secure channel: d40/ev1/ev2", "--aid application id of application for some parameters (3 hex bytes, big endian)", "--dfname application df name (string, max 16 chars). selects application via iso select command", + "--mf select mf (master file) via iso channel", "--isoid application iso id (iso df id) (2 hex bytes, big endian)", - "--mf select mf (master file) via iso channel" + "--fileisoid select file inside application by iso id (iso df id) (2 hex bytes, big endian)." ], - "usage": "hf mfdes selectapp [-hav] [-n ] [-t ] [-k ] [-f ] [-i ] [-m ] [-c ] [-s ] [--aid ] [--dfname ] [--isoid ] [--mf]" + "usage": "hf mfdes selectapp [-hav] [-n ] [-t ] [-k ] [-f ] [-i ] [-m ] [-c ] [-s ] [--aid ] [--dfname ] [--mf] [--isoid ] [--fileisoid ]" }, "hf mfdes setconfig": { "command": "hf mfdes setconfig", @@ -6187,7 +6248,7 @@ "-h, --help this help", "--clk <32|64> clock (default 64)", "--delay pause delay in milliseconds between uids simulation (default 1000ms)", - "-f, --file file with uids in hex format, one per line", + "-f, --file file with em tag ids, one id per line", "--gap gap (0's) between id repeats (default 20)" ], "usage": "lf em 410x brute [-h] [--clk ] [--delay ] -f [--gap ]" @@ -6196,14 +6257,14 @@ "command": "lf em 410x clone", "description": "writes em410x id to a t55x7 or q5/t5555 tag", "notes": [ - "lf em 410x clone --id 0f0368568b -> write id to t55x7 tag", - "lf em 410x clone --id 0f0368568b --q5 -> write id to q5/t5555 tag" + "lf em 410x clone --id 0f0368568b -> write t55x7 tag", + "lf em 410x clone --id 0f0368568b --q5 -> write q5/t5555 tag" ], "offline": false, "options": [ "-h, --help this help", "--clk <16|32|40|64> clock (default 64)", - "--id id number (5 hex bytes)", + "--id em tag id number (5 hex bytes)", "--q5 specify writing to q5/t5555 tag" ], "usage": "lf em 410x clone [-h] [--clk ] --id [--q5]" @@ -6212,12 +6273,12 @@ "command": "lf em 410x reader", "description": "read em 410x tag", "notes": [ - "lf em 410x reader -> reader", + "lf em 410x reader", "lf em 410x reader -@ -> continuous reader mode", - "lf em 410x reader --clk 32 -> reader using a clock of rf/32", - "lf em 410x reader --clk 32 -i -> reader using a clock of rf/32 and inverting data", - "lf em 410x reader -i -> reader while inverting data", - "lf em 410x reader --clk 64 -i --err 0 -> reader using a clock of rf/64 and inverting data and allowing 0 demod errors" + "lf em 410x reader --clk 32 -> using a clock of rf/32", + "lf em 410x reader --clk 32 -i -> using a clock of rf/32 and inverting data", + "lf em 410x reader -i -> inverting data", + "lf em 410x reader --clk 64 -i --err 0 -> using a clock of rf/64 and inverting data and allowing 0 demod errors" ], "offline": false, "options": [ @@ -6245,14 +6306,14 @@ "options": [ "-h, --help this help", "--clk <32|64> clock (default 64)", - "--id id number (5 hex bytes)", + "--id em tag id number (5 hex bytes)", "--gap gap (0's) between id repeats (default 20)" ], "usage": "lf em 410x sim [-h] [--clk ] --id [--gap ]" }, "lf em 410x spoof": { "command": "lf em 410x spoof", - "description": "watch 'nd spoof, activates reader waits until a em 410x tag gets presented then proxmark3 starts simulating the found uid", + "description": "watch 'nd spoof, activates reader waits until a em 410x tag gets presented then proxmark3 starts simulating the found em tag id", "notes": [ "lf em 410x spoof" ], @@ -9889,8 +9950,8 @@ } }, "metadata": { - "commands_extracted": 587, + "commands_extracted": 589, "extracted_by": "PM3Help2JSON v1.00", - "extracted_on": "2021-08-08T21:11:10" + "extracted_on": "2021-08-12T13:03:40" } } \ No newline at end of file diff --git a/doc/commands.md b/doc/commands.md index a5dbcfb3e..e33f9a3de 100644 --- a/doc/commands.md +++ b/doc/commands.md @@ -507,11 +507,13 @@ Check column "offline" for their availability. |`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 chk `|N |`[old]Check keys` +|`hf mfdes chk `|N |`Check keys` +|`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 list `|Y |`List DESFire (ISO 14443A) history` +|`hf mfdes mad `|N |`Prints MAD records / files from the card` |`hf mfdes lsapp `|N |`Show all applications with files list` |`hf mfdes getaids `|N |`Get Application IDs list` |`hf mfdes getappnames `|N |`Get Applications list` @@ -710,9 +712,9 @@ Check column "offline" for their availability. |`lf em 410x reader `|N |`attempt to read and extract tag data` |`lf em 410x sim `|N |`simulate EM410x tag` |`lf em 410x brute `|N |`reader bruteforce attack by simulating EM410x tags` -|`lf em 410x watch `|N |`watches for EM410x 125/134 kHz tags (option 'h' for 134)` -|`lf em 410x spoof `|N |`watches for EM410x 125/134 kHz tags, and replays them. (option 'h' for 134)` -|`lf em 410x clone `|N |`write EM410x UID to T55x7 or Q5/T5555 tag` +|`lf em 410x watch `|N |`watches for EM410x 125/134 kHz tags` +|`lf em 410x spoof `|N |`watches for EM410x 125/134 kHz tags, and replays them` +|`lf em 410x clone `|N |`write EM410x Tag ID to T55x7 or Q5/T5555 tag` ### lf em 4x05