This commit is contained in:
iceman1001 2021-06-24 18:47:11 +02:00
commit e2ca0a4abd
15 changed files with 193 additions and 172 deletions

View file

@ -137,7 +137,8 @@ static bool TestAuth(void) {
uint8_t authparams[16 + 16 + 6] = {0}; uint8_t authparams[16 + 16 + 6] = {0};
CipurseCAuthenticateHost(&ctx, authparams); CipurseCAuthenticateHost(&ctx, authparams);
uint8_t aparamstest[] = {0x12, 0xAA, 0x79, 0xA9, 0x03, 0xC5, 0xB4, 0x6A, 0x27, 0x1B, 0x13, 0xAE, 0x02, 0x50, 0x1C, 0x99, 0x10, 0x10, 0x10, 0x10, 0x10, uint8_t aparamstest[] = {0x12, 0xAA, 0x79, 0xA9, 0x03, 0xC5, 0xB4, 0x6A, 0x27, 0x1B, 0x13, 0xAE, 0x02, 0x50, 0x1C, 0x99, 0x10, 0x10, 0x10, 0x10, 0x10,
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20}; 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
};
res = res && (memcmp(authparams, aparamstest, sizeof(authparams)) == 0); res = res && (memcmp(authparams, aparamstest, sizeof(authparams)) == 0);
uint8_t ct[] = {0xBE, 0x10, 0x6B, 0xB9, 0xAD, 0x84, 0xBC, 0xE1, 0x9F, 0xAE, 0x0C, 0x62, 0xCC, 0xC7, 0x0D, 0x41}; uint8_t ct[] = {0xBE, 0x10, 0x6B, 0xB9, 0xAD, 0x84, 0xBC, 0xE1, 0x9F, 0xAE, 0x0C, 0x62, 0xCC, 0xC7, 0x0D, 0x41};
@ -237,12 +238,14 @@ static bool TestEncDec(void) {
CipurseCChannelEncrypt(&ctx, TestData, 16, dstdata, &dstdatalen); CipurseCChannelEncrypt(&ctx, TestData, 16, dstdata, &dstdatalen);
uint8_t tested3[32] = {0x1E, 0x0C, 0xD1, 0xF5, 0x8E, 0x0B, 0xAE, 0xF0, 0x06, 0xC6, 0xED, 0x73, 0x3F, 0x8A, 0x87, 0xCF, uint8_t tested3[32] = {0x1E, 0x0C, 0xD1, 0xF5, 0x8E, 0x0B, 0xAE, 0xF0, 0x06, 0xC6, 0xED, 0x73, 0x3F, 0x8A, 0x87, 0xCF,
0x36, 0xCC, 0xF2, 0xF4, 0x7D, 0x33, 0x50, 0xF1, 0x8E, 0xFF, 0xD1, 0x7D, 0x42, 0x88, 0xD5, 0xEE}; 0x36, 0xCC, 0xF2, 0xF4, 0x7D, 0x33, 0x50, 0xF1, 0x8E, 0xFF, 0xD1, 0x7D, 0x42, 0x88, 0xD5, 0xEE
};
res = res && (dstdatalen == 32); res = res && (dstdatalen == 32);
res = res && (memcmp(dstdata, tested3, 32) == 0); res = res && (memcmp(dstdata, tested3, 32) == 0);
uint8_t tested4[32] = {0xC0, 0x42, 0xDB, 0xD9, 0x53, 0xFF, 0x01, 0xE5, 0xCC, 0x49, 0x8C, 0x9C, 0xDA, 0x60, 0x73, 0xA7, uint8_t tested4[32] = {0xC0, 0x42, 0xDB, 0xD9, 0x53, 0xFF, 0x01, 0xE5, 0xCC, 0x49, 0x8C, 0x9C, 0xDA, 0x60, 0x73, 0xA7,
0xE1, 0xEB, 0x14, 0x69, 0xF6, 0x39, 0xF3, 0xE1, 0x07, 0x03, 0x32, 0xF4, 0x27, 0xF9, 0x48, 0x3D}; 0xE1, 0xEB, 0x14, 0x69, 0xF6, 0x39, 0xF3, 0xE1, 0x07, 0x03, 0x32, 0xF4, 0x27, 0xF9, 0x48, 0x3D
};
CipurseCChannelDecrypt(&ctx, tested4, 32, dstdata, &dstdatalen); CipurseCChannelDecrypt(&ctx, tested4, 32, dstdata, &dstdatalen);
res = res && (dstdatalen == 16); res = res && (dstdatalen == 16);
res = res && (memcmp(dstdata, TestData, 16) == 0); res = res && (memcmp(dstdata, TestData, 16) == 0);

View file

@ -700,7 +700,6 @@ bool CheckCardCipurse(void) {
static int CmdHFCipurseTest(const char *Cmd) { static int CmdHFCipurseTest(const char *Cmd) {
CIPURSETest(true); CIPURSETest(true);
return PM3_SUCCESS; return PM3_SUCCESS;
} }

View file

@ -247,7 +247,7 @@ static void print_config_cards(void) {
static void print_config_card(const iclass_config_card_item_t *o) { static void print_config_card(const iclass_config_card_item_t *o) {
if (check_config_card(o)) { if (check_config_card(o)) {
PrintAndLogEx(INFO, "description... " _YELLOW_("%s") , o->desc); PrintAndLogEx(INFO, "description... " _YELLOW_("%s"), o->desc);
PrintAndLogEx(INFO, "data.......... " _YELLOW_("%s"), sprint_hex_inrow(o->data, sizeof(o->data))); PrintAndLogEx(INFO, "data.......... " _YELLOW_("%s"), sprint_hex_inrow(o->data, sizeof(o->data)));
} }
} }

View file

@ -984,7 +984,7 @@ static int handler_desfire_auth(mfdes_authinput_t *payload, mfdes_auth_res_t *rp
// Part 4 // Part 4
// tag->session_key = &default_key; // tag->session_key = &default_key;
struct desfire_key *p = realloc (tag->session_key,sizeof(struct desfire_key)); struct desfire_key *p = realloc(tag->session_key, sizeof(struct desfire_key));
if (!p) { if (!p) {
PrintAndLogEx(FAILED, "Cannot allocate memory for session keys"); PrintAndLogEx(FAILED, "Cannot allocate memory for session keys");
free(tag->session_key); free(tag->session_key);
@ -992,7 +992,7 @@ static int handler_desfire_auth(mfdes_authinput_t *payload, mfdes_auth_res_t *rp
} }
tag->session_key = p; tag->session_key = p;
memset (tag->session_key, 0x00, sizeof(struct desfire_key)); memset(tag->session_key, 0x00, sizeof(struct desfire_key));
Desfire_session_key_new(RndA, RndB, key, tag->session_key); Desfire_session_key_new(RndA, RndB, key, tag->session_key);
@ -1030,7 +1030,7 @@ static int handler_desfire_auth(mfdes_authinput_t *payload, mfdes_auth_res_t *rp
// If the 3Des key first 8 bytes = 2nd 8 Bytes then we are really using Singe Des // If the 3Des key first 8 bytes = 2nd 8 Bytes then we are really using Singe Des
// As such we need to set the session key such that the 2nd 8 bytes = 1st 8 Bytes // As such we need to set the session key such that the 2nd 8 bytes = 1st 8 Bytes
if (payload->algo == MFDES_ALGO_3DES) { if (payload->algo == MFDES_ALGO_3DES) {
if (memcmp(key->data,&key->data[8],8) == 0) if (memcmp(key->data, &key->data[8], 8) == 0)
memcpy(&tag->session_key->data[8], tag->session_key->data, 8); memcpy(&tag->session_key->data[8], tag->session_key->data, 8);
} }
@ -1285,7 +1285,7 @@ static int mifare_desfire_change_key(uint8_t key_no, uint8_t *new_key, uint8_t n
} else if (new_algo == MFDES_ALGO_3K3DES) { } else if (new_algo == MFDES_ALGO_3K3DES) {
// 3K3Des checksum must cover : C4 <KeyNo> <PrevKey XOR NewKey> // 3K3Des checksum must cover : C4 <KeyNo> <PrevKey XOR NewKey>
csPkt[0] = MFDES_CHANGE_KEY; csPkt[0] = MFDES_CHANGE_KEY;
memcpy (&csPkt[1], data, 25); memcpy(&csPkt[1], data, 25);
desfire_crc32(csPkt, 26, data + 1 + cmdcnt); desfire_crc32(csPkt, 26, data + 1 + cmdcnt);
} else { } else {
desfire_crc32_append(data + 1, cmdcnt); desfire_crc32_append(data + 1, cmdcnt);
@ -1312,7 +1312,7 @@ static int mifare_desfire_change_key(uint8_t key_no, uint8_t *new_key, uint8_t n
} else if (new_algo == MFDES_ALGO_3K3DES) { } else if (new_algo == MFDES_ALGO_3K3DES) {
// 3K3Des checksum must cover : C4 <KeyNo> <Newkey Data> // 3K3Des checksum must cover : C4 <KeyNo> <Newkey Data>
csPkt[0] = MFDES_CHANGE_KEY; csPkt[0] = MFDES_CHANGE_KEY;
memcpy (&csPkt[1], data, 25); memcpy(&csPkt[1], data, 25);
desfire_crc32(csPkt, 26, data + 1 + cmdcnt); desfire_crc32(csPkt, 26, data + 1 + cmdcnt);
} else { } else {
desfire_crc32_append(data + 1, cmdcnt); desfire_crc32_append(data + 1, cmdcnt);
@ -1348,8 +1348,7 @@ static int mifare_desfire_change_key(uint8_t key_no, uint8_t *new_key, uint8_t n
size_t sn = recv_len; size_t sn = recv_len;
if ((new_algo == MFDES_ALGO_AES) || (new_algo == MFDES_ALGO_3K3DES)) if ((new_algo == MFDES_ALGO_AES) || (new_algo == MFDES_ALGO_3K3DES)) {
{
// AES expects us to Calculate CMAC for status byte : OK 0x00 (0x91 00) // AES expects us to Calculate CMAC for status byte : OK 0x00 (0x91 00)
// As such if we get this far without an error, we should be good // As such if we get this far without an error, we should be good
// Since we are dropping the field, we dont need to maintain the CMAC etc. // Since we are dropping the field, we dont need to maintain the CMAC etc.

View file

@ -1059,7 +1059,7 @@ int mfG3GetBlock(uint8_t blockno, uint8_t *data) {
payload.blockno = blockno; payload.blockno = blockno;
clearCommandBuffer(); clearCommandBuffer();
SendCommandNG(CMD_HF_MIFARE_G3_RDBL, (uint8_t*)&payload, sizeof(payload)); SendCommandNG(CMD_HF_MIFARE_G3_RDBL, (uint8_t *)&payload, sizeof(payload));
PacketResponseNG resp; PacketResponseNG resp;
if (WaitForResponseTimeout(CMD_HF_MIFARE_G3_RDBL, &resp, 1500)) { if (WaitForResponseTimeout(CMD_HF_MIFARE_G3_RDBL, &resp, 1500)) {
if (resp.status != PM3_SUCCESS) if (resp.status != PM3_SUCCESS)

View file

@ -518,7 +518,7 @@ static int ndefDecodeMime_vcard(NDEFHeader_t *ndef) {
} }
static int ndefDecodeMime_bt(NDEFHeader_t *ndef) { static int ndefDecodeMime_bt(NDEFHeader_t *ndef) {
PrintAndLogEx(INFO, "Type............ " _YELLOW_("%.*s"), (int)ndef->TypeLen, ndef->Type ); PrintAndLogEx(INFO, "Type............ " _YELLOW_("%.*s"), (int)ndef->TypeLen, ndef->Type);
if (ndef->PayloadLen > 1) { if (ndef->PayloadLen > 1) {
uint16_t ooblen = (ndef->Payload[1] << 8 | ndef->Payload[0]); uint16_t ooblen = (ndef->Payload[1] << 8 | ndef->Payload[0]);
PrintAndLogEx(INFO, "OOB data len.... %u", ooblen); PrintAndLogEx(INFO, "OOB data len.... %u", ooblen);
@ -548,9 +548,9 @@ static int ndefDecodeMime_bt(NDEFHeader_t *ndef) {
break; break;
} }
// Let's check payload[9]. If 0x08 then SHORT_NAME or if 0x09 then COMPLETE_NAME // Let's check payload[9]. If 0x08 then SHORT_NAME or if 0x09 then COMPLETE_NAME
if (ndef->Payload[9] == 0x08 ) { if (ndef->Payload[9] == 0x08) {
PrintAndLogEx(INFO, "Short name...... " _YELLOW_("%.*s"), (int)(ndef->PayloadLen - 10), ndef->Payload + 10); PrintAndLogEx(INFO, "Short name...... " _YELLOW_("%.*s"), (int)(ndef->PayloadLen - 10), ndef->Payload + 10);
} else if (ndef->Payload[9] == 0x09 ) { } else if (ndef->Payload[9] == 0x09) {
PrintAndLogEx(INFO, "Complete name... " _YELLOW_("%.*s"), (int)(ndef->PayloadLen - 10), ndef->Payload + 10); PrintAndLogEx(INFO, "Complete name... " _YELLOW_("%.*s"), (int)(ndef->PayloadLen - 10), ndef->Payload + 10);
} else { } else {
PrintAndLogEx(INFO, "[ %02x ]", ndef->Payload[9]); PrintAndLogEx(INFO, "[ %02x ]", ndef->Payload[9]);

View file

@ -973,7 +973,7 @@
}, },
"help": { "help": {
"command": "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_20210618.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 /home/osboxes/.proxmark3/logs/log_20210624.txt --------------------------------------------------------------------------------------- auto available offline: no run lf search / hf search / data plot / data save",
"notes": [ "notes": [
"auto" "auto"
], ],
@ -1684,67 +1684,67 @@
}, },
"hf cipurse aread": { "hf cipurse aread": {
"command": "hf cipurse aread", "command": "hf cipurse aread",
"description": "read file attributes by file id with key id and key", "description": "read file attributes by file id with key id and key. if no key is supplied, default key of 737373...7373 will be used",
"notes": [ "notes": [
"hf cipurse aread -f 2ff7 -> authenticate with keyid=1 and key = 7373...7373 and read file attributes with id 2ff7", "hf cipurse aread --fid 2ff7 -> authenticate with keyid 1, read file attributes with id 2ff7",
"hf cipurse aread -n 2 -k 65656565656565656565656565656565 -f 2ff7 -> authenticate with specified key and read file attributes" "hf cipurse aread -n 2 -k 65656565656565656565656565656565 --fid 2ff7 -> authenticate keyid 2, read file attributes"
], ],
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-a, --apdu show apdu requests and responses", "-a, --apdu show apdu requests and responses",
"-v, --verbose show technical data", "-v, --verbose show technical data",
"-n, --keyid <dec> key id", "-n <dec> key id",
"-k, --key <hex> key for authenticate", "-k, --key <hex> auth key",
"-f, --file <hex> file id", "--fid <hex> file id",
"--noauth read file attributes without authentication", "--noauth read file attributes without authentication",
"--sreq <plain|mac(default)|encode> communication reader-picc security level", "--sreq <plain|mac(default)|encode> communication reader-picc security level",
"--sresp <plain|mac(default)|encode> communication picc-reader security level", "--sresp <plain|mac(default)|encode> communication picc-reader security level",
"--sel-adf show info about adf itself", "--sel-adf show info about adf itself",
"--sel-mf show info about master file" "--sel-mf show info about master file"
], ],
"usage": "hf cipurse aread [-hav] [-n <dec>] [-k <hex>] [-f <hex>] [--noauth] [--sreq <plain|mac(default)|encode>] [--sresp <plain|mac(default)|encode>] [--sel-adf] [--sel-mf]" "usage": "hf cipurse aread [-hav] [-n <dec>] [-k <hex>] [--fid <hex>] [--noauth] [--sreq <plain|mac(default)|encode>] [--sresp <plain|mac(default)|encode>] [--sel-adf] [--sel-mf]"
}, },
"hf cipurse auth": { "hf cipurse auth": {
"command": "hf cipurse auth", "command": "hf cipurse auth",
"description": "authenticate with key id and key", "description": "authenticate with key id and key. if no key is supplied, default key of 737373...7373 will be used",
"notes": [ "notes": [
"hf cipurse auth -> authenticate with keyid=1 and key = 7373...7373", "hf cipurse auth -> authenticate with keyid 1, default key",
"hf cipurse auth -n 2 -k 65656565656565656565656565656565 -> authenticate with key" "hf cipurse auth -n 2 -k 65656565656565656565656565656565 -> authenticate keyid 2 with key"
], ],
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-a, --apdu show apdu requests and responses", "-a, --apdu show apdu requests and responses",
"-v, --verbose show technical data", "-v, --verbose show technical data",
"-n, --keyid <dec> key id", "-n <dec> key id",
"-k, --key <hex> key for authenticate" "-k, --key <hex> auth key"
], ],
"usage": "hf cipurse auth [-hav] [-n <dec>] [-k <hex>]" "usage": "hf cipurse auth [-hav] [-n <dec>] [-k <hex>]"
}, },
"hf cipurse delete": { "hf cipurse delete": {
"command": "hf cipurse delete", "command": "hf cipurse delete",
"description": "read file by file id with key id and key", "description": "read file by file id with key id and key. if no key is supplied, default key of 737373...7373 will be used",
"notes": [ "notes": [
"hf cipurse delete -f 2ff7 -> authenticate with keyid=1 and key = 7373...7373 and delete file with id 2ff7", "hf cipurse delete --fid 2ff7 -> authenticate with keyid 1, delete file with id 2ff7",
"hf cipurse delete -n 2 -k 65656565656565656565656565656565 -f 2ff7 -> authenticate with specified key and delete file" "hf cipurse delete -n 2 -k 65656565656565656565656565656565 --fid 2ff7 -> authenticate keyid 2 and delete file"
], ],
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-a, --apdu show apdu requests and responses", "-a, --apdu show apdu requests and responses",
"-v, --verbose show technical data", "-v, --verbose show technical data",
"-n, --keyid <dec> key id", "-n <dec> key id",
"-k, --key <hex> key for authenticate", "-k, --key <hex> auth key",
"-f, --file <hex> file id", "--fid <hex> file id",
"--sreq <plain|mac(default)|encode> communication reader-picc security level", "--sreq <plain|mac(default)|encode> communication reader-picc security level",
"--sresp <plain|mac(default)|encode> communication picc-reader security level" "--sresp <plain|mac(default)|encode> communication picc-reader security level"
], ],
"usage": "hf cipurse delete [-hav] [-n <dec>] [-k <hex>] [-f <hex>] [--sreq <plain|mac(default)|encode>] [--sresp <plain|mac(default)|encode>]" "usage": "hf cipurse delete [-hav] [-n <dec>] [-k <hex>] [--fid <hex>] [--sreq <plain|mac(default)|encode>] [--sresp <plain|mac(default)|encode>]"
}, },
"hf cipurse help": { "hf cipurse help": {
"command": "hf cipurse help", "command": "hf cipurse help",
"description": "help this help. --------------------------------------------------------------------------------------- hf cipurse info available offline: no get info from cipurse tags", "description": "help this help. test tests --------------------------------------------------------------------------------------- hf cipurse info available offline: no get info from cipurse tags",
"notes": [ "notes": [
"hf cipurse info" "hf cipurse info"
], ],
@ -1756,48 +1756,63 @@
}, },
"hf cipurse read": { "hf cipurse read": {
"command": "hf cipurse read", "command": "hf cipurse read",
"description": "read file by file id with key id and key", "description": "read file by file id with key id and key. if no key is supplied, default key of 737373...7373 will be used",
"notes": [ "notes": [
"hf cipurse read -f 2ff7 -> authenticate with keyid=1 and key = 7373...7373 and read file with id 2ff7", "hf cipurse read --fid 2ff7 -> authenticate with keyid 1, read file with id 2ff7",
"hf cipurse read -n 2 -k 65656565656565656565656565656565 -f 2ff7 -> authenticate with specified key and read file" "hf cipurse read -n 2 -k 65656565656565656565656565656565 --fid 2ff7 -> authenticate keyid 2 and read file"
], ],
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-a, --apdu show apdu requests and responses", "-a, --apdu show apdu requests and responses",
"-v, --verbose show technical data", "-v, --verbose show technical data",
"-n, --keyid <dec> key id", "-n <dec> key id",
"-k, --key <hex> key for authenticate", "-k, --key <hex> auth key",
"-f, --file <hex> file id", "--fid <hex> file id",
"-o, --offset <dec> offset for reading data from file", "-o, --offset <dec> offset for reading data from file",
"--noauth read file without authentication", "--noauth read file without authentication",
"--sreq <plain|mac(default)|encode> communication reader-picc security level", "--sreq <plain|mac(default)|encode> communication reader-picc security level",
"--sresp <plain|mac(default)|encode> communication picc-reader security level" "--sresp <plain|mac(default)|encode> communication picc-reader security level"
], ],
"usage": "hf cipurse read [-hav] [-n <dec>] [-k <hex>] [-f <hex>] [-o <dec>] [--noauth] [--sreq <plain|mac(default)|encode>] [--sresp <plain|mac(default)|encode>]" "usage": "hf cipurse read [-hav] [-n <dec>] [-k <hex>] [--fid <hex>] [-o <dec>] [--noauth] [--sreq <plain|mac(default)|encode>] [--sresp <plain|mac(default)|encode>]"
},
"hf cipurse test": {
"command": "hf cipurse test",
"description": "[=] ------ cipurse tests ------ [=] kvv.............. passed [=] iso9797m2........ passed [=] smi.............. passed [=] mic.............. passed [=] auth............. passed [=] channel mac...... passed [=] channel encdec... passed [=] apdu............. passed [=] --------------------------- [+] tests [ ok ] ======================================================================================= hf epa { german identification card... } --------------------------------------------------------------------------------------- hf epa help available offline: yes help this help --------------------------------------------------------------------------------------- hf epa cnonces available offline: no tries to collect nonces when doing part of pace protocol.",
"notes": [
"hf epa cnonces --size 4 --num 4 --delay 1"
],
"offline": true,
"options": [
"-h, --help this help",
"--size <dec> nonce size",
"--num <dec> number of nonces to collect",
"-d, --delay <dec> delay between attempts"
],
"usage": "hf epa cnonces [-h] --size <dec> --num <dec> -d <dec>"
}, },
"hf cipurse write": { "hf cipurse write": {
"command": "hf cipurse write", "command": "hf cipurse write",
"description": "write file by file id with key id and key", "description": "write file by file id with key id and key. if no key is supplied, default key of 737373...7373 will be used",
"notes": [ "notes": [
"hf cipurse write -f 2ff7 -> authenticate with keyid=1 and key = 7373...7373 and write file with id 2ff7", "hf cipurse write --fid 2ff7 -> authenticate with keyid 1, write file with id 2ff7",
"hf cipurse write -n 2 -k 65656565656565656565656565656565 -f 2ff7 -> authenticate with specified key and write file" "hf cipurse write -n 2 -k 65656565656565656565656565656565 --fid 2ff7 -> authenticate keyid 2 and write file"
], ],
"offline": false, "offline": false,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-a, --apdu show apdu requests and responses", "-a, --apdu show apdu requests and responses",
"-v, --verbose show technical data", "-v, --verbose show technical data",
"-n, --keyid <dec> key id", "-n <dec> key id",
"-k, --key <hex> key for authenticate", "-k, --key <hex> auth key",
"-f, --file <hex> file id", "--fid <hex> file id",
"-o, --offset <dec> offset for reading data from file", "-o, --offset <dec> offset for reading data from file",
"--noauth read file without authentication", "--noauth read file without authentication",
"--sreq <plain|mac(default)|encode> communication reader-picc security level", "--sreq <plain|mac(default)|encode> communication reader-picc security level",
"--sresp <plain|mac(default)|encode> communication picc-reader security level", "--sresp <plain|mac(default)|encode> communication picc-reader security level",
"-c, --content <hex> new file content" "-d, --data <hex> hex data to write to new file"
], ],
"usage": "hf cipurse write [-hav] [-n <dec>] [-k <hex>] [-f <hex>] [-o <dec>] [--noauth] [--sreq <plain|mac(default)|encode>] [--sresp <plain|mac(default)|encode>] [-c <hex>]" "usage": "hf cipurse write [-hav] [-n <dec>] [-k <hex>] [--fid <hex>] [-o <dec>] [--noauth] [--sreq <plain|mac(default)|encode>] [--sresp <plain|mac(default)|encode>] [-d <hex>]"
}, },
"hf emrtd help": { "hf emrtd help": {
"command": "hf emrtd help", "command": "hf emrtd help",
@ -1854,21 +1869,6 @@
], ],
"usage": "hf emrtd list [-h1fcrux] [--dict <file>]..." "usage": "hf emrtd list [-h1fcrux] [--dict <file>]..."
}, },
"hf epa help": {
"command": "hf epa help",
"description": "help this help --------------------------------------------------------------------------------------- hf epa cnonces available offline: no tries to collect nonces when doing part of pace protocol.",
"notes": [
"hf epa cnonces --size 4 --num 4 --delay 1"
],
"offline": true,
"options": [
"-h, --help this help",
"--size <dec> nonce size",
"--num <dec> number of nonces to collect",
"-d, --delay <dec> delay between attempts"
],
"usage": "hf epa cnonces [-h] --size <dec> --num <dec> -d <dec>"
},
"hf epa preplay": { "hf epa preplay": {
"command": "hf epa preplay", "command": "hf epa preplay",
"description": "perform pace protocol by replaying given apdus", "description": "perform pace protocol by replaying given apdus",
@ -3491,9 +3491,9 @@
"hf mf fchk --2k -k ffffffffffff -> key recovery against mifare 2k", "hf mf fchk --2k -k ffffffffffff -> key recovery against mifare 2k",
"hf mf fchk --4k -k ffffffffffff -> key recovery against mifare 4k", "hf mf fchk --4k -k ffffffffffff -> key recovery against mifare 4k",
"hf mf fchk --1k -f mfc_default_keys.dic -> target 1k using default dictionary file", "hf mf fchk --1k -f mfc_default_keys.dic -> target 1k using default dictionary file",
"hf mf fchk --1k --emu -> target 1k, write to emulator memory", "hf mf fchk --1k --emu -> target 1k, write keys to emulator memory",
"hf mf fchk --1k --dump -> target 1k, write to file", "hf mf fchk --1k --dump -> target 1k, write keys to file",
"hf mf fchk --1k --mem -> target 1k, use dictionary from flashmemory" "hf mf fchk --1k --mem -> target 1k, use dictionary from flash memory"
], ],
"offline": false, "offline": false,
"options": [ "options": [
@ -3553,6 +3553,23 @@
], ],
"usage": "hf mf gen3uid [-h] [-u <hex>]" "usage": "hf mf gen3uid [-h] [-u <hex>]"
}, },
"hf mf gview": {
"command": "hf mf gview",
"description": "view `magic gen3 gtu` card memory",
"notes": [
"hf mf gview",
"hf mf gview --4k"
],
"offline": false,
"options": [
"-h, --help this help",
"--mini mifare classic mini / s20",
"--1k mifare classic 1k / s50 (def)",
"--2k mifare classic/plus 2k",
"--4k mifare classic 4k / s70"
],
"usage": "hf mf gview [-h] [--mini] [--1k] [--2k] [--4k]"
},
"hf mf hardnested": { "hf mf hardnested": {
"command": "hf mf hardnested", "command": "hf mf hardnested",
"description": "nested attack for hardened mifare classic cards. `--i<x>` set type of simd instructions. without this flag programs autodetect it. or hf mf hardnested -r --tk [known target key] add the known target key to check if it is present in the remaining key space hf mf hardnested --blk 0 -a -k a0a1a2a3a4a5 --tblk 4 --ta --tk ffffffffffff", "description": "nested attack for hardened mifare classic cards. `--i<x>` set type of simd instructions. without this flag programs autodetect it. or hf mf hardnested -r --tk [known target key] add the known target key to check if it is present in the remaining key space hf mf hardnested --blk 0 -a -k a0a1a2a3a4a5 --tblk 4 --ta --tk ffffffffffff",
@ -4219,12 +4236,12 @@
], ],
"usage": "hf mfdes list [-h1fcrux] [--dict <file>]..." "usage": "hf mfdes list [-h1fcrux] [--dict <file>]..."
}, },
"hf mfdes readdata": { "hf mfdes read": {
"command": "hf mfdes readdata", "command": "hf mfdes read",
"description": "read data from file make sure to select aid or authenticate aid before running this command.", "description": "read data from file make sure to select aid or authenticate aid before running this command.",
"notes": [ "notes": [
"hf mfdes readdata -n 01 -t 0 -o 000000 -l 000000 -a 123456", "hf mfdes read -n 1 -t 0 -o 000000 -l 000000 -a 123456",
"hf mfdes readdata -n 01 -t 0 -> read all data from standard file, fileno 01" "hf mfdes read -n 1 -t 0 -> read all data from standard file, fileno 1"
], ],
"offline": false, "offline": false,
"options": [ "options": [
@ -4235,7 +4252,7 @@
"-t, --type <dec> file type (0 = standard / backup, 1 = record)", "-t, --type <dec> file type (0 = standard / backup, 1 = record)",
"-a, --aid <hex> app id to select (3 hex bytes, big endian)" "-a, --aid <hex> app id to select (3 hex bytes, big endian)"
], ],
"usage": "hf mfdes readdata [-h] [-n <dec>] [-o <hex>]... [-l <hex>]... [-t <dec>] [-a <hex>]..." "usage": "hf mfdes read [-h] [-n <dec>] [-o <hex>]... [-l <hex>]... [-t <dec>] [-a <hex>]..."
}, },
"hf mfdes selectaid": { "hf mfdes selectaid": {
"command": "hf mfdes selectaid", "command": "hf mfdes selectaid",
@ -4250,11 +4267,11 @@
], ],
"usage": "hf mfdes selectaid [-h] [-a <hex>]..." "usage": "hf mfdes selectaid [-h] [-a <hex>]..."
}, },
"hf mfdes writedata": { "hf mfdes write": {
"command": "hf mfdes writedata", "command": "hf mfdes write",
"description": "write data to file make sure to select aid or authenticate aid before running this command.", "description": "write data to file make sure to select aid or authenticate aid before running this command.",
"notes": [ "notes": [
"hf mfdes writedata -n 01 -t 0 -o 000000 -d 3132333435363738" "hf mfdes write -n 01 -t 0 -o 000000 -d 3132333435363738"
], ],
"offline": false, "offline": false,
"options": [ "options": [
@ -4265,7 +4282,7 @@
"-t, --type <dec> file type (0 = standard / backup, 1 = record)", "-t, --type <dec> file type (0 = standard / backup, 1 = record)",
"-a, --aid <hex> app id to select as hex bytes (3 bytes, big endian)" "-a, --aid <hex> app id to select as hex bytes (3 bytes, big endian)"
], ],
"usage": "hf mfdes writedata [-h] [-n <dec>] [-o <hex>]... [-d <hex>]... [-t <dec>] [-a <hex>]..." "usage": "hf mfdes write [-h] [-n <dec>] [-o <hex>]... [-d <hex>]... [-t <dec>] [-a <hex>]..."
}, },
"hf mfp auth": { "hf mfp auth": {
"command": "hf mfp auth", "command": "hf mfp auth",
@ -5061,8 +5078,8 @@
"command": "hw connect", "command": "hw connect",
"description": "connects to a proxmark3 device via specified serial port. baudrate here is only for physical uart or uart-bt, not for usb-cdc or blue shark add-on", "description": "connects to a proxmark3 device via specified serial port. baudrate here is only for physical uart or uart-bt, not for usb-cdc or blue shark add-on",
"notes": [ "notes": [
"hw connect -p com3", "hw connect -p /dev/ttyacm0",
"hw connect -p com3 -b 115200" "hw connect -p /dev/ttyacm0 -b 115200"
], ],
"offline": true, "offline": true,
"options": [ "options": [
@ -6441,17 +6458,18 @@
"command": "lf hitag help", "command": "lf hitag help",
"description": "help this help list list hitag trace history --------------------------------------------------------------------------------------- lf hitag eload available offline: no loads hitag tag dump into emulator memory on device", "description": "help this help list list hitag trace history --------------------------------------------------------------------------------------- lf hitag eload available offline: no loads hitag tag dump into emulator memory on device",
"notes": [ "notes": [
"lf hitag eload -f lf-hitag-11223344-dump.bin" "lf hitag eload -2 -f lf-hitag-11223344-dump.bin"
], ],
"offline": true, "offline": true,
"options": [ "options": [
"-h, --help this help", "-h, --help this help",
"-f, --file <filename> filename of dump", "-f, --file <filename> filename of dump",
"-1 simulate hitag1", "-1 card type hitag1",
"-2 simulate hitag2", "-2 card type hitag2",
"-s simulate hitags" "-s card type hitags",
"-m card type hitagm"
], ],
"usage": "lf hitag eload [-h12s] -f <filename>" "usage": "lf hitag eload [-h12sm] -f <filename>"
}, },
"lf hitag info": { "lf hitag info": {
"command": "lf hitag info", "command": "lf hitag info",
@ -7586,7 +7604,7 @@
}, },
"lf sniff": { "lf sniff": {
"command": "lf sniff", "command": "lf sniff",
"description": "sniff low frequency signal. - use `lf config` to set parameters. - use `data plot` to look at it", "description": "sniff low frequency signal. you need to configure the lf part on the proxmark3 device manually. usually a trigger and skip samples is a good thing to set before doing a low frequency sniff. - use `lf config` to set parameters. - use `data plot` to look at sniff signal. - use `lf search -1` to see if signal can be automatic decoded",
"notes": [ "notes": [
"lf sniff -v", "lf sniff -v",
"lf sniff -s 3000 -@ -> oscilloscope style" "lf sniff -s 3000 -@ -> oscilloscope style"
@ -9179,8 +9197,8 @@
} }
}, },
"metadata": { "metadata": {
"commands_extracted": 570, "commands_extracted": 571,
"extracted_by": "PM3Help2JSON v1.00", "extracted_by": "PM3Help2JSON v1.00",
"extracted_on": "2021-06-18T09:04:45" "extracted_on": "2021-06-24T16:45:08"
} }
} }

View file

@ -241,12 +241,13 @@ Check column "offline" for their availability.
|command |offline |description |command |offline |description
|------- |------- |----------- |------- |------- |-----------
|`hf cipurse help `|Y |`This help.` |`hf cipurse help `|Y |`This help.`
|`hf cipurse info `|N |`Info about Cipurse tag.` |`hf cipurse info `|N |`Get info about CIPURSE tag`
|`hf cipurse auth `|N |`Authentication.` |`hf cipurse auth `|N |`Authenticate CIPURSE tag`
|`hf cipurse read `|N |`Read binary file.` |`hf cipurse read `|N |`Read binary file`
|`hf cipurse write `|N |`Write binary file.` |`hf cipurse write `|N |`Write binary file`
|`hf cipurse aread `|N |`Read file attributes.` |`hf cipurse aread `|N |`Read file attributes`
|`hf cipurse delete `|N |`Delete file.` |`hf cipurse delete `|N |`Delete file`
|`hf cipurse test `|Y |`Tests`
### hf epa ### hf epa
@ -445,6 +446,7 @@ Check column "offline" for their availability.
|`hf mf gen3uid `|N |`Set UID without changing manufacturer block` |`hf mf gen3uid `|N |`Set UID without changing manufacturer block`
|`hf mf gen3blk `|N |`Overwrite manufacturer block` |`hf mf gen3blk `|N |`Overwrite manufacturer block`
|`hf mf gen3freeze `|N |`Perma lock UID changes. irreversible` |`hf mf gen3freeze `|N |`Perma lock UID changes. irreversible`
|`hf mf gview `|N |`View card`
### hf mfp ### hf mfp
@ -518,8 +520,8 @@ Check column "offline" for their availability.
|`hf mfdes deletefile `|N |`Create Delete File` |`hf mfdes deletefile `|N |`Create Delete File`
|`hf mfdes dump `|N |`Dump all files` |`hf mfdes dump `|N |`Dump all files`
|`hf mfdes getvalue `|N |`Get value of file` |`hf mfdes getvalue `|N |`Get value of file`
|`hf mfdes readdata `|N |`Read data from standard/backup/record file` |`hf mfdes read `|N |`Read data from standard/backup/record file`
|`hf mfdes writedata `|N |`Write data to standard/backup/record file` |`hf mfdes write `|N |`Write data to standard/backup/record file`
### hf seos ### hf seos