mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-12 11:18:11 -07:00
[hf seos] Simulate support
This commit is contained in:
@@ -45,6 +45,7 @@ SRC_FELICA = felica.c
|
||||
SRC_CRAPTO1 = crypto1.c des.c desfire_crypto.c mifaredesfire.c aes.c platform_util.c
|
||||
SRC_CRC = crc.c crc16.c crc32.c
|
||||
SRC_ICLASS = iclass.c optimized_cipherutils.c optimized_ikeys.c optimized_elite.c optimized_cipher.c sam_picopass.c
|
||||
SRC_SEOS = seos.c sha1.c sha256.c
|
||||
SRC_LEGIC = legicrf.c legicrfsim.c legic_prng.c
|
||||
SRC_NFCBARCODE = thinfilm.c
|
||||
|
||||
@@ -137,6 +138,7 @@ THUMBSRC = start.c \
|
||||
$(SRC_ISO14443b) \
|
||||
$(SRC_CRAPTO1) \
|
||||
$(SRC_ICLASS) \
|
||||
$(SRC_SEOS) \
|
||||
$(SRC_EMV) \
|
||||
$(SRC_CRC) \
|
||||
$(SRC_FELICA) \
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "em4x50.h"
|
||||
#include "em4x70.h"
|
||||
#include "iclass.h"
|
||||
#include "seos.h"
|
||||
#include "legicrfsim.h"
|
||||
//#include "cryptorfsim.h"
|
||||
#include "epa.h"
|
||||
@@ -630,6 +631,11 @@ static void SendCapabilities(void) {
|
||||
#else
|
||||
capabilities.compiled_with_iclass = false;
|
||||
#endif
|
||||
#ifdef WITH_SEOS
|
||||
capabilities.compiled_with_seos = true;
|
||||
#else
|
||||
capabilities.compiled_with_seos = false;
|
||||
#endif
|
||||
#ifdef WITH_NFCBARCODE
|
||||
capabilities.compiled_with_nfcbarcode = true;
|
||||
#else
|
||||
@@ -2281,6 +2287,12 @@ static void PacketReceived(PacketCommandNG *packet) {
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef WITH_SEOS
|
||||
case CMD_HF_SEOS_SIMULATE: {
|
||||
SimulateSeos((seos_emulate_req_t *)packet->data.asBytes);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_HFSNIFF
|
||||
case CMD_HF_SNIFF: {
|
||||
|
||||
+837
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) Aaron Tulino - December 2025
|
||||
// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// See LICENSE.txt for the text of the license.
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifndef __SEOS_H
|
||||
#define __SEOS_H
|
||||
|
||||
#include "common.h"
|
||||
#include "seos_cmd.h"
|
||||
|
||||
void SimulateSeos(seos_emulate_req_t *msg);
|
||||
|
||||
#endif
|
||||
@@ -232,6 +232,9 @@ endif
|
||||
ifneq ($(SKIP_ICLASS),1)
|
||||
PLATFORM_DEFS += -DWITH_ICLASS
|
||||
endif
|
||||
ifneq ($(SKIP_SEOS),1)
|
||||
PLATFORM_DEFS += -DWITH_SEOS
|
||||
endif
|
||||
ifneq ($(SKIP_FELICA),1)
|
||||
PLATFORM_DEFS += -DWITH_FELICA
|
||||
endif
|
||||
|
||||
+4
-1
@@ -238,6 +238,7 @@ typedef struct {
|
||||
bool compiled_with_felica : 1;
|
||||
bool compiled_with_legicrf : 1;
|
||||
bool compiled_with_iclass : 1;
|
||||
bool compiled_with_seos : 1;
|
||||
bool compiled_with_nfcbarcode : 1;
|
||||
// misc
|
||||
bool compiled_with_lcd : 1;
|
||||
@@ -247,7 +248,7 @@ typedef struct {
|
||||
bool hw_available_smartcard : 1;
|
||||
bool is_rdv4 : 1;
|
||||
} PACKED capabilities_t;
|
||||
#define CAPABILITIES_VERSION 6
|
||||
#define CAPABILITIES_VERSION 7
|
||||
extern capabilities_t g_pm3_capabilities;
|
||||
|
||||
// For CMD_LF_T55XX_WRITEBL
|
||||
@@ -857,6 +858,8 @@ typedef struct {
|
||||
#define CMD_HF_SAM_SEOS 0x0901
|
||||
#define CMD_HF_SAM_MFC 0x0902
|
||||
|
||||
#define CMD_HF_SEOS_SIMULATE 0x0903
|
||||
|
||||
#define CMD_UNKNOWN 0xFFFF
|
||||
|
||||
//Mifare simulation flags
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// See LICENSE.txt for the text of the license.
|
||||
//-----------------------------------------------------------------------------
|
||||
// Seos type prototyping
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef _SEOS_CMD_H_
|
||||
#define _SEOS_CMD_H_
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#define SEOS_ENCRYPTION_2K3DES 0x02
|
||||
#define SEOS_ENCRYPTION_3K3DES 0x03
|
||||
#define SEOS_ENCRYPTION_AES 0x09
|
||||
|
||||
#define SEOS_HASHING_SHA1 0x06
|
||||
#define SEOS_HASHING_SHA256 0x07
|
||||
|
||||
// Seos emulate request data structure
|
||||
typedef struct {
|
||||
uint8_t encr_alg;
|
||||
uint8_t hash_alg;
|
||||
|
||||
uint8_t uid[10];
|
||||
uint8_t uid_len;
|
||||
|
||||
uint8_t privenc[16];
|
||||
uint8_t privmac[16];
|
||||
uint8_t authkey[16];
|
||||
|
||||
uint8_t diversifier_len;
|
||||
uint8_t diversifier[16];
|
||||
|
||||
uint8_t data_tag_len;
|
||||
uint8_t data_tag[8];
|
||||
|
||||
uint8_t data_len;
|
||||
uint8_t data[128];
|
||||
|
||||
uint8_t oid_len;
|
||||
uint8_t oid[32];
|
||||
} PACKED seos_emulate_req_t;
|
||||
|
||||
#endif // _SEOS_H_
|
||||
Reference in New Issue
Block a user