This commit is contained in:
iceman1001 2023-10-12 14:53:26 +02:00
parent ef348a2aa0
commit 0ff41fa652
10 changed files with 41 additions and 41 deletions

View file

@ -304,15 +304,15 @@ void RunMod(void) {
LED_C_OFF();
LED_B_ON();
// add loop visa
// for (int i = 0; i < ARRAYLEN(AIDlist); i ++) {
// add loop visa
// for (int i = 0; i < ARRAYLEN(AIDlist); i ++) {
// hexstr_to_byte_array("a0da02631a440a44000000a012ad10a00e800200048108", sam_apdu, &sam_len);
uint8_t apdulen = iso14_apdu(apdus[i], (uint16_t) apduslen[i], false, apdubuffer, NULL);
if (apdulen > 0) {
DbpString("[ " _YELLOW_("Proxmark command") " ]");
Dbhexdump(apduslen[i], apdus[i], false);
DbpString("[ " _GREEN_( "Card answer") " ]");
DbpString("[ " _GREEN_("Card answer") " ]");
Dbhexdump(apdulen - 2, apdubuffer, false);
DbpString("-------------------------------");
@ -447,7 +447,7 @@ void RunMod(void) {
p_response = &responses[RESP_INDEX_RATS];
} else {
if (g_dbglevel == DBG_DEBUG ) {
if (g_dbglevel == DBG_DEBUG) {
DbpString("[ "_YELLOW_("Card reader command") " ]");
Dbhexdump(len, receivedCmd, false);
}
@ -459,14 +459,14 @@ void RunMod(void) {
// depending on card reader commands, the Proxmark will answer to fool the reader
// respond with PPSE
if (receivedCmd[2] == 0xA4 && receivedCmd[6] == 0x32 && prevCmd == 0) {
// need to adapt lengths..
// need to adapt lengths..
uint8_t ppsea[39] = {
// 0x23 = 35, skip two first bytes then the message - SW 2 is 35 = 0x23
// 0x23 = 35, skip two first bytes then the message - SW 2 is 35 = 0x23
0x6F, 0x23, 0x84, 0x0E, 0x32, 0x50, 0x41, 0x59,
0x2E, 0x53, 0x59, 0x53, 0x2E, 0x44, 0x44, 0x46,
0x30, 0x31, 0xA5, 0x11, 0xBF, 0x0C, 0x0E, 0x61,
0x0C, 0x4F,
// len aid0 aid1 aid2...
0x0C, 0x4F,
// len aid0 aid1 aid2...
0x07, 0xA0, 0x00, 0x00, 0x00, 0x03, 0x10, 0x10,
0x87, 0x01, 0x01, 0x90, 0x00
};
@ -477,13 +477,13 @@ void RunMod(void) {
// respond Visa AID
} else if (receivedCmd[2] == 0xA4 && receivedCmd[10] == 0x03 && receivedCmd[11] == 0x10 && prevCmd == 1) {
uint8_t visauid_long[34] = {
// 0x1E = 30, skip two first bytes then the message - SW 2 is 30 = 0x1E
0x6F, 0x1E, 0x84,
// len aid0 aid1 aid2....
0x07, 0xA0, 0x00, 0x00, 0x00, 0x03, 0x10, 0x10,
0xA5, 0x13, 0x50,
// len V I S A C R E D I T
0x0B, 0x56, 0x49, 0x53, 0x41, 0x20, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54,
// 0x1E = 30, skip two first bytes then the message - SW 2 is 30 = 0x1E
0x6F, 0x1E, 0x84,
// len aid0 aid1 aid2....
0x07, 0xA0, 0x00, 0x00, 0x00, 0x03, 0x10, 0x10,
0xA5, 0x13, 0x50,
// len V I S A C R E D I T
0x0B, 0x56, 0x49, 0x53, 0x41, 0x20, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54,
0x9F, 0x38, 0x03, 0x9F, 0x66, 0x02,
0x90, 0x00
};
@ -503,7 +503,7 @@ void RunMod(void) {
uint8_t card[25] = {
0x70, 0x15, 0x57, 0x13, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x90, 0x00
};
// add token array == Track 2 found before

View file

@ -73,7 +73,7 @@ void ModInfo(void) {
void RunMod() {
StandAloneMode();
DbpString("");
DbpString("");
Dbprintf(_YELLOW_(">>> ") " Relaying ISO/14443A data over Bluetooth a.k.a. reblay Started " _YELLOW_("<<<"));
DbpString("");
FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
@ -286,7 +286,7 @@ void RunMod() {
int retval = PM3_SUCCESS;
// Bluetooth response
uint8_t resp = 0;
uint8_t resp = 0;
lenpacket = 0;
// Keep track of last terminal type command
@ -357,7 +357,7 @@ void RunMod() {
DbpString(_YELLOW_("!!") " Avoiding request - Bluetooth data already in memory!!");
}
} else {
if (g_dbglevel == DBG_DEBUG ) {
if (g_dbglevel == DBG_DEBUG) {
DbpString("[ "_YELLOW_("Card reader command") " ]");
Dbhexdump(len - 2, &receivedCmd[1], false);
}

View file

@ -1021,7 +1021,7 @@ bool prepare_allocated_tag_modulation(tag_response_info_t *response_info, uint8_
}
}
bool SimulateIso14443aInit(uint8_t tagType, uint16_t flags, uint8_t *data, tag_response_info_t **responses,
bool SimulateIso14443aInit(uint8_t tagType, uint16_t flags, uint8_t *data, tag_response_info_t **responses,
uint32_t *cuid, uint32_t counters[3], uint8_t tearings[3], uint8_t *pages) {
uint8_t sak = 0;
// The first response contains the ATQA (note: bytes are transmitted in reverse order).
@ -1042,7 +1042,7 @@ bool SimulateIso14443aInit(uint8_t tagType, uint16_t flags, uint8_t *data, tag_r
// Format byte = 0x58: FSCI=0x08 (FSC=256), TA(1) and TC(1) present,
// TA(1) = 0x80: different divisors not supported, DR = 1, DS = 1
// TB(1) = not present. Defaults: FWI = 4 (FWT = 256 * 16 * 2^4 * 1/fc = 4833us), SFGI = 0 (SFG = 256 * 16 * 2^0 * 1/fc = 302us)
// TC(1) = 0x02: CID supported, NAD not supported
// TC(1) = 0x02: CID supported, NAD not supported
// static uint8_t rRATS[] = { 0x04, 0x58, 0x80, 0x02, 0x00, 0x00 };
static uint8_t rRATS[40] = { 0x05, 0x75, 0x80, 0x60, 0x02, 0x00, 0x00, 0x00 };
uint8_t rRATS_len = 8;
@ -1314,10 +1314,10 @@ bool SimulateIso14443aInit(uint8_t tagType, uint16_t flags, uint8_t *data, tag_r
// since rats len is variable now.
responses_init[RESP_INDEX_RATS].response_n = rRATS_len;
// "precompiled" responses.
// "precompiled" responses.
// These exist for speed reasons. There are no time in the anti collision phase to calculate responses.
// There are 12 predefined responses with a total of 84 bytes data to transmit.
//
//
// Coded responses need one byte per bit to transfer (data, parity, start, stop, correction)
// 85 * 8 data bits, 85 * 1 parity bits, 12 start bits, 12 stop bits, 12 correction bits
// 85 * 8 + 85 + 12 + 12 + 12 == 801

View file

@ -2772,7 +2772,7 @@ static void detect_credential(uint8_t *iclass_dump, size_t dump_len, bool *is_le
picopass_hdr_t *hdr = (picopass_hdr_t *)iclass_dump;
if (!memcmp(hdr->app_issuer_area, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF", PICOPASS_BLOCK_SIZE)) {
// Legacy AIA
// Legacy AIA
*is_legacy = true;
if (dump_len < 11 * PICOPASS_BLOCK_SIZE) {

View file

@ -53,7 +53,7 @@ static void ParamLoadDefaults(struct tlvdb *tlvRoot) {
TLV_ADD(0x5F2A, "\x090\x78");
// 9A:(Transaction Date) len:3
TLV_ADD(0x9A, "\x00\x00\x00");
// 9C:(Transaction Type) len:1
// 9C:(Transaction Type) len:1
// | 00 => Goods and Service
// | 01 => Cash
TLV_ADD(0x9C, "\x00");
@ -544,7 +544,7 @@ static int emv_parse_card_details(uint8_t *response, size_t reslen, bool verbose
// Track 3 Data
// to be impl.
// Unpredicable Number (UN)
struct tlvdb *un1_full = tlvdb_find_full(root, 0x9f37);
if (un1_full != NULL) {
@ -2018,7 +2018,7 @@ static int CmdEMVScan(const char *Cmd) {
bool paramLoadJSON = arg_get_lit(ctx, 4);
enum TransactionType TrType = TT_MSD;
if (arg_get_lit(ctx, 6)){
if (arg_get_lit(ctx, 6)) {
TrType = TT_QVSDCMCHIP;
}
if (arg_get_lit(ctx, 7)) {

View file

@ -205,14 +205,14 @@ int Iso7816Select(Iso7816CommandChannel channel, bool activate_field, bool leave
uint8_t *result, size_t max_result_len, size_t *result_len, uint16_t *sw) {
return Iso7816ExchangeEx(channel
, activate_field
, leave_field_on
, (sAPDU_t) {0x00, 0xa4, 0x04, 0x00, aid_len, aid}
, (channel == CC_CONTACTLESS)
, 0
, result
, max_result_len
, result_len
, sw
);
, activate_field
, leave_field_on
, (sAPDU_t) {0x00, 0xa4, 0x04, 0x00, aid_len, aid}
, (channel == CC_CONTACTLESS)
, 0
, result
, max_result_len
, result_len
, sw
);
}

View file

@ -285,7 +285,7 @@ const static vocabulary_t vocabulary[] = {
{ 0, "hf iclass esave" },
{ 0, "hf iclass esetblk" },
{ 0, "hf iclass eview" },
{ 1, "hf iclass configcard" },
{ 0, "hf iclass configcard" },
{ 1, "hf iclass calcnewkey" },
{ 1, "hf iclass encode" },
{ 1, "hf iclass encrypt" },

View file

@ -11857,6 +11857,6 @@
"metadata": {
"commands_extracted": 687,
"extracted_by": "PM3Help2JSON v1.00",
"extracted_on": "2023-10-03T15:10:12"
"extracted_on": "2023-10-12T12:53:10"
}
}

View file

@ -424,7 +424,7 @@ Check column "offline" for their availability.
|`hf iclass esave `|N |`Save emulator memory to file`
|`hf iclass esetblk `|N |`Set emulator memory block data`
|`hf iclass eview `|N |`View emulator memory`
|`hf iclass configcard `|Y |`Reader configuration card`
|`hf iclass configcard `|N |`Reader configuration card`
|`hf iclass calcnewkey `|Y |`Calc diversified keys (blocks 3 & 4) to write new keys`
|`hf iclass encode `|Y |`Encode binary wiegand to block 7`
|`hf iclass encrypt `|Y |`Encrypt given block data`

View file

@ -444,7 +444,7 @@ ISO 7816-4 Basic interindustry commands. For command APDU's.
// Picopass Pagemode fuses
#define PICOPASS_SECURE_PAGEMODE_AUTH_DISABLED 0x00
#define PICOPASS_NON_SECURE_PAGEMODE 0x01
#define PICOPASS_SECURE_PAGEMODE_KEYS_LOCKED 0x02
#define PICOPASS_SECURE_PAGEMODE_KEYS_LOCKED 0x02
#define PICOPASS_SECURE_PAGEMODE_KEYS_MODIFIABLE 0x03
// ISO 7816-4 Basic interindustry commands. For command APDU's.