Back to Proxmark3

4. Advanced compilation parameters

doc/md/Use_of_Proxmark/4_Advanced-compilation-parameters.md

4.92378.9 KB
Original Source

<a id="Top"></a>

4. Advanced compilation parameters

Table of Contents

The client and the Proxmark3 firmware should always be in sync. Nevertheless, the firmware can be tuned depending on the Proxmark3 platform and options.

Indeed, the Iceman fork can be used on other Proxmark3 hardware platforms as well.

Via some definitions, you can adjust the firmware for a given platform, but also to add features like the support of the Blue Shark add-on or to select which standalone mode to embed.

Client

^Top

The client doesn't depend on the capabilities of the Proxmark3 it's connected to. So you can use the same client for different Proxmark3 platforms, given that everything is running the same version.

It's possible to explicitly skip the Qt support in the compilation even if Qt is present on the host, with:

make clean
make SKIPQT=1

or to force a fallback to Qt5 even when Qt6 is installed

make clean
make SKIPQT6=1

On Linux hosts, if the Bluez headers and library are present, the client will be compiled with native Bluetooth support. It's possible to explicitly skip Bluetooth support with:

make clean
make SKIPBT=1

Firmware

^Top

By default, the firmware is of course tuned for the Proxmark3 RDV4 device, which has built-in support for 256KB onboard flash SPI memory, Sim module (smart card support), FPC connector. These features make it very different from all other Proxmark3 devices, there is non other like this one.

Recommendation: if you don't have a RDV4, we strongly recommend your device to have at least a 512KB arm chip, since this repo is crossing 256KB limit. There is still a way to skip parts to make it fit on a 256KB device, see below.

If you need to tune things and save the configuration, create a file Makefile.platform in the root directory of the repository, see Makefile.platform.sample. For an up-to-date exhaustive list of options, you can run make PLATFORM=.

PLATFORM

^Top

Here are the supported values you can assign to PLATFORM in Makefile.platform:

PLATFORMDESCRIPTION
PM3RDV4 (def)Proxmark3 RDV4
PM3GENERICProxmark3 generic target
PM3ICOPYXiCopy-X with XC3S100E
PM3ULTIMATEProxmark3 Ultimate with XC2S50

By default PLATFORM=PM3RDV4.

The MCU version (256 or 512) will be detected automatically during flashing.

Known issues:

  • 256KB Arm chip devices: The compiled firmware image from this repo may/will be too large for your device.
  • PM3 Evo: it has a different led/button pin assignment. It tends to be messed up.
  • Proxmark Pro: it has different fpga and unknown pin assignments. Unsupported.

PLATFORM_EXTRAS

^Top

Here are the supported values you can assign to PLATFORM_EXTRAS in Makefile.platform:

PLATFORM_EXTRASDESCRIPTION
BTADDONProxmark3 rdv4 BT add-on
FLASHFlash modding for generic Proxmark3
SMARTCARDSmartcard modding for generic Proxmark3

By default PLATFORM_EXTRAS=.

If you have installed a Blue Shark add-on on your RDV4, define PLATFORM_EXTRAS=BTADDON in your Makefile.platform to enable it.

If you did some modding on the PM3GENERIC platform, you can define FLASH and SMARTCARD to enable these features, like PLATFORM_EXTRAS=FLASH

You can also define multiple options like PLATFORM_EXTRAS=FLASH SMARTCARD

STANDALONE

^Top

The Iceman repository gives you to easily choose which standalone mode to embed in the firmware. Documentation for each standalone mode can be found in the Standalone Modes Index. Here are the supported values you can assign to STANDALONE in Makefile.platform:

STANDALONEDESCRIPTION
No standalone mode
LF_EM4100EMULLF EM4100 simulator standalone mode - temskiy
LF_EM4100RSWBLF EM4100 read/write/clone/brute mode - Monster1024
LF_EM4100RSWWLF EM4100 read/write/clone/validate/wipe mode - Łukasz "zabszk" Jurczyk
LF_EM4100RWCLF EM4100 read/write/clone mode - temskiy
LF_HIDBRUTEHID corporate 1000 bruteforce - Federico dotta & Maurizio Agazzini
LF_HIDFCBRUTELF HID facility code bruteforce - ss23
LF_ICEHIDLF HID collector to flashmem - Iceman1001
LF_MULTIHIDLF HID 26 Bit (H1031) multi simulator - Shain Lakin
LF_NEDAP_SIMLF Nedap ID simulator
LF_NEXIDNexwatch credentials detection mode - jrjgjk & Zolorah
LF_PROXBRUTEHID ProxII bruteforce - Brad Antoniewicz
LF_PROX2BRUTEHID ProxII bruteforce v2 - Yann Gascuel
LF_SAMYRUN (def)HID26 read/clone/sim - Samy Kamkar
LF_SKELETONstandalone mode skeleton - Iceman1001
LF_THAREXDELF EM4x50 simulator/read standalone mode - tharexde
HF_14ASNIFF14a sniff storing to flashmem - Micolous
HF_14BSNIFF14b sniff - jacopo-j
HF_15SNIFF15693 sniff storing to flashmem - Glaser
HF_15SIM15693 simulator - lnv42
HF_AVEFULMIFARE Ultralight read/simulation - Ave Ozkal
HF_BOG14a sniff with ULC/ULEV1/NTAG auth storing in flashmem - Bogito
HF_CARDHOPPERLong distance (over IP) relay of 14a protocols - Sam Haskins
HF_COLINMifare ultra fast sniff/sim/clone - Colin Brigato
HF_CRAFTBYTEUID stealer - Emulates scanned 14a UID - Anze Jensterle
HF_DOEGOX_AUTH0UL-C / UL-AES unlocker - Philippe Teuwen (doegox)
HF_ICECLASSiCLASS 4-1 mode sim/read & dump/loclass/glitch & config to flashmem - Iceman1001
HF_LEGICHF Legic Prime Read/Store/Sim standalone - uhei
HF_LEGICSIMHF Legic Prime Simulate standalone - uhei
HF_MATTYRUNMifare sniff/clone - Matías A. Ré Medina
HF_MFCSIMSimulate Mifare Classic 1k card storing in flashmem - Ray Lee
HF_MSDSALEMV Read and emulation - Salvador Mendoza
HF_REBLAY14A relay over BT - Salvador Mendoza
HF_ST25_TEAROFFStore/restore ST25TB tags with tear-off for counters - SecLabz
HF_TCPRSTIKEA Rothult ST25TA, Standalone Master Key Dump/Emulation - Nick Draffen
HF_TMUDFORDRead and emulate ISO15693 card UID - Tim Mudford
HF_UNISNIFFCombined 14a/14b/15 sniffer with runtime selection & extra save options
HF_YOUNGMifare sniff/simulation - Craig Young
HF_EMVPNGEMV Read and emulation - Davi Mikael (Penegui)
DANKARMULTIStandalone mode that bakes together multiple other standalone modes. - dankar

By default STANDALONE=LF_SAMYRUN.

256KB versions

^Top

If you own a Proxmark3 Easy with only 256KB, you can use a few definitions to help you getting a smaller firmware.

First thing is of course to use the PLATFORM=PM3GENERIC. Adding PLATFORM_SIZE=256 will provoke an error during compilation of the recovery image if your image is too big, so you can detect the problem before trying to flash the Proxmark3, e.g.

[=] GEN proxmark3_recovery.bin
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Firmware image too large for your platform! 262768 > 262144
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

You can skip the standalone support by indicating STANDALONE= and a series of SKIP_* allow to skip some of the functionalities and to get a smaller image.

DefinitionsRough estimation of the saved space
STANDALONE=3.6KB
SKIP_LF=125.8KB
SKIP_HITAG=124.2KB
SKIP_EM4x50=12.9KB
SKIP_ISO15693=13.2KB
SKIP_LEGICRF=13.9KB
SKIP_ISO14443b=13.7KB
SKIP_ISO14443a=163.0KB
SKIP_ICLASS=110.5KB
SKIP_FELICA=14.0KB
SKIP_NFCBARCODE=11.4KB
SKIP_HFSNIFF=10.5KB
SKIP_HFPLOT=10.3KB
SKIP_ZX8211=10.3KB

So for example, at the time of writing, this is a valid Makefile.platform compiling an image for 256KB:

PLATFORM=PM3GENERIC
PLATFORM_SIZE=256
STANDALONE=
SKIP_HITAG=1
SKIP_FELICA=1

Situation might change when the firmware is growing of course, requiring to skip more elements.

Last note: if you skip a tech, be careful not to use a standalone mode which requires that same tech, else the firmware size reduction won't be much.

Next step

^Top

See Compilation instructions