mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
make style
This commit is contained in:
parent
c0603c98be
commit
24665367ea
6 changed files with 141 additions and 78 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -973,7 +973,7 @@
|
|||
},
|
||||
"help": {
|
||||
"command": "help",
|
||||
"description": "help use `<command> 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 `<command> 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 <aid> use specific aid (3 hex bytes, big endian)",
|
||||
"--aid <aid> use specific aid (3 hex bytes, big endian)",
|
||||
"-k, --key <key> key for checking (hex 16 bytes)",
|
||||
"-d, --dict <file> file with keys dictionary",
|
||||
"--pattern1b check all 1-byte combinations of key (0000...0000, 0101...0101, 0202...0202, ...)",
|
||||
|
@ -4077,9 +4077,10 @@
|
|||
"-j, --json <file> json file to save keys",
|
||||
"-v, --verbose verbose mode.",
|
||||
"-f, --kdf <kdf> key derivation function (kdf) (0=none, 1=an10922, 2=gallagher)",
|
||||
"-i, --kdfi <kdfi> kdf input (hex 1-31 bytes)"
|
||||
"-i, --kdfi <kdfi> kdf input (hex 1-31 bytes)",
|
||||
"-a, --apdu show apdu requests and responses"
|
||||
],
|
||||
"usage": "hf mfdes chk [-hv] [-a <aid>]... [-k <key>] [-d <file>] [--pattern1b] [--pattern2b] [--startp2b <pattern>] [-j <file>] [-f <kdf>] [-i <kdfi>]"
|
||||
"usage": "hf mfdes chk [-hva] [--aid <aid>]... [-k <key>] [-d <file>] [--pattern1b] [--pattern2b] [--startp2b <pattern>] [-j <file>] [-f <kdf>] [-i <kdfi>]"
|
||||
},
|
||||
"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 <keyno>] [-t <des/2tdea/3tdea/aes>] [-k <key>] [-f <none/an10922/gallagher>] [-i <kdfi>] [-m <plain/mac/encrypt>] [-c <native/niso/iso>] [-s <d40/ev1/ev2>] [--aid <app id hex>] [--fid <file id hex>] [--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 <keyno> key number",
|
||||
"-t, --algo <des/2tdea/3tdea/aes> crypt algo: des, 2tdea, 3tdea, aes",
|
||||
"-k, --key <key> key for authenticate (hex 8(des), 16(2tdea or aes) or 24(3tdea) bytes)",
|
||||
"-f, --kdf <none/an10922/gallagher> key derivation function (kdf): none, an10922, gallagher",
|
||||
"-i, --kdfi <kdfi> kdf input (hex 1-31 bytes)",
|
||||
"-m, --cmode <plain/mac/encrypt> communicaton mode: plain/mac/encrypt",
|
||||
"-c, --ccset <native/niso/iso> communicaton command set: native/niso/iso",
|
||||
"-s, --schann <d40/ev1/ev2> secure channel: d40/ev1/ev2",
|
||||
"--aid <app id hex> application id (3 hex bytes, big endian)",
|
||||
"--dict <file> file with keys dictionary",
|
||||
"--save save found key and parameters to defaults"
|
||||
],
|
||||
"usage": "hf mfdes detect [-hav] [-n <keyno>] [-t <des/2tdea/3tdea/aes>] [-k <key>] [-f <none/an10922/gallagher>] [-i <kdfi>] [-m <plain/mac/encrypt>] [-c <native/niso/iso>] [-s <d40/ev1/ev2>] [--aid <app id hex>] [--dict <file>] [--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 <keyno>] [-t <des/2tdea/3tdea/aes>] [-k <key>] [-f <none/an10922/gallagher>] [-i <kdfi>] [-m <plain/mac/encrypt>] [-c <native/niso/iso>] [-s <d40/ev1/ev2>] [--aid <app id hex>] [--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 <keyno> key number",
|
||||
"-t, --algo <des/2tdea/3tdea/aes> crypt algo: des, 2tdea, 3tdea, aes",
|
||||
"-k, --key <key> key for authenticate (hex 8(des), 16(2tdea or aes) or 24(3tdea) bytes)",
|
||||
"-f, --kdf <none/an10922/gallagher> key derivation function (kdf): none, an10922, gallagher",
|
||||
"-i, --kdfi <kdfi> kdf input (hex 1-31 bytes)",
|
||||
"-m, --cmode <plain/mac/encrypt> communicaton mode: plain/mac/encrypt",
|
||||
"-c, --ccset <native/niso/iso> communicaton command set: native/niso/iso",
|
||||
"-s, --schann <d40/ev1/ev2> secure channel: d40/ev1/ev2",
|
||||
"--aid <app id hex> 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 <keyno>] [-t <des/2tdea/3tdea/aes>] [-k <key>] [-f <none/an10922/gallagher>] [-i <kdfi>] [-m <plain/mac/encrypt>] [-c <native/niso/iso>] [-s <d40/ev1/ev2>] [--aid <app id hex>] [--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 <d40/ev1/ev2> secure channel: d40/ev1/ev2",
|
||||
"--aid <app id hex> application id of application for some parameters (3 hex bytes, big endian)",
|
||||
"--dfname <df name str> application df name (string, max 16 chars). selects application via iso select command",
|
||||
"--mf select mf (master file) via iso channel",
|
||||
"--isoid <isoid hex> application iso id (iso df id) (2 hex bytes, big endian)",
|
||||
"--mf select mf (master file) via iso channel"
|
||||
"--fileisoid <isoid hex> select file inside application by iso id (iso df id) (2 hex bytes, big endian)."
|
||||
],
|
||||
"usage": "hf mfdes selectapp [-hav] [-n <keyno>] [-t <des/2tdea/3tdea/aes>] [-k <key>] [-f <none/an10922/gallagher>] [-i <kdfi>] [-m <plain/mac/encrypt>] [-c <native/niso/iso>] [-s <d40/ev1/ev2>] [--aid <app id hex>] [--dfname <df name str>] [--isoid <isoid hex>] [--mf]"
|
||||
"usage": "hf mfdes selectapp [-hav] [-n <keyno>] [-t <des/2tdea/3tdea/aes>] [-k <key>] [-f <none/an10922/gallagher>] [-i <kdfi>] [-m <plain/mac/encrypt>] [-c <native/niso/iso>] [-s <d40/ev1/ev2>] [--aid <app id hex>] [--dfname <df name str>] [--mf] [--isoid <isoid hex>] [--fileisoid <isoid hex>]"
|
||||
},
|
||||
"hf mfdes setconfig": {
|
||||
"command": "hf mfdes setconfig",
|
||||
|
@ -6187,7 +6248,7 @@
|
|||
"-h, --help this help",
|
||||
"--clk <dec> <32|64> clock (default 64)",
|
||||
"--delay <dec> pause delay in milliseconds between uids simulation (default 1000ms)",
|
||||
"-f, --file <hex> file with uids in hex format, one per line",
|
||||
"-f, --file <hex> file with em tag ids, one id per line",
|
||||
"--gap <dec> gap (0's) between id repeats (default 20)"
|
||||
],
|
||||
"usage": "lf em 410x brute [-h] [--clk <dec>] [--delay <dec>] -f <hex> [--gap <dec>]"
|
||||
|
@ -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 <dec> <16|32|40|64> clock (default 64)",
|
||||
"--id <hex> id number (5 hex bytes)",
|
||||
"--id <hex> em tag id number (5 hex bytes)",
|
||||
"--q5 specify writing to q5/t5555 tag"
|
||||
],
|
||||
"usage": "lf em 410x clone [-h] [--clk <dec>] --id <hex> [--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 <dec> <32|64> clock (default 64)",
|
||||
"--id <hex> id number (5 hex bytes)",
|
||||
"--id <hex> em tag id number (5 hex bytes)",
|
||||
"--gap <dec> gap (0's) between id repeats (default 20)"
|
||||
],
|
||||
"usage": "lf em 410x sim [-h] [--clk <dec>] --id <hex> [--gap <dec>]"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue