PM3 Commands Reference (Iceman Firmware):

Updated: January 2025

Main Help


Up One Level


Current command:
hf mfdes setconfig --help


Set card configuration. 
WARNING! Danger zone!
Needs to provide card's master key and works if not blocked by config.

usage:
    hf mfdes setconfig [--kdf <none|AN10922|gallagher>]

options:
    -h, --help                     This help
    -a, --apdu                     Show APDU requests and responses
    -v, --verbose                  Verbose output
    -n, --keyno <dec>              Key number
    -t, --algo <DES|2TDEA|3TDEA|AES> Crypt algo
    -k, --key <hex>                Key for authenticate (HEX 8(DES), 16(2TDEA or AES) or 24(3TDEA) bytes)
    --kdf <none|AN10922|gallagher> Key Derivation Function (KDF)
    -i, --kdfi <hex>               KDF input (1-31 hex bytes)
    -m, --cmode <plain|mac|encrypt> Communicaton mode
    -c, --ccset <native|niso|iso>  Communicaton command set
    --schann <d40|ev1|ev2|lrp>     Secure channel
    --aid <hex>                    Application ID of application for some parameters (3 hex bytes, big endian)
    --isoid <hex>                  Application ISO ID (ISO DF ID) (2 hex bytes, big endian).
    -p, --param <hex>              Parameter id (1 hex byte)
    -d, --data <hex>               Data for parameter (1..30 hex bytes)

examples/notes:
    More about options MF2DLHX0.pdf.
    Options list:
    00h PICC configuration.
    02h ATS update.
    03h SAK update
    04h Secure Messaging Configuration.
    05h Capability data. (here change for LRP in the Desfire Light [enable 00000000010000000000])
    06h DF Name renaming (one-time)
    08h File renaming (one-time)
    09h Value file configuration (one-time)
    0Ah Failed authentication counter setting [disable 00ffffffff]
    0Bh HW configuration
    
    hf mfdes setconfig --param 03 --data 0428                   -> set SAK
    hf mfdes setconfig --param 02 --data 0875778102637264       -> set ATS (first byte - length)
    hf mfdes setconfig --isoid df01 -t aes --schann ev2 --param 05 --data 00000000020000000000     -> set LRP mode enable for Desfire Light
    hf mfdes setconfig --isoid df01 -t aes --schann ev2 --param 0a --data 00ffffffff               -> Disable failed auth counters for Desfire Light
    hf mfdes setconfig --isoid df01 -t aes --schann lrp --param 0a --data 00ffffffff               -> Disable failed auth counters for Desfire Light via lrp