The CLI (Command Line Interface) is the official way to control your Chameleon.
It requires at least Python 3.9 version.
There are multiple ways to install the CLI, depending on your OS.
Windows users have the choice of 4 options:
Using ProxSpace to build the CLI is the easiest and most comfortable way to get started.
Download ProxSpace from the official GitHub
Download 7zip to extract the archive
Install 7zip by double clicking the Installer and clicking Install
Right-click on the downloaded archive and select 7zip -> Unpack to "ProxSpace"
Open a terminal in the proxspace folder. If you are on a new Windows install, you should be able to just right-click and select Open in Terminal
. If that option is not visible and the ProxSpace folder is still in your downloads folder, press win+r
and type powershell
followed by enter. In Powershell now type cd ~/Downloads/ProxSpace
Run the command .\runme64.bat
. After successful completion, you should be dropped to the pm3 ~ $
shell.
Clone the Repository by typing git clone https://github.com/RfidResearchGroup/ChameleonUltra.git
Now go into the newly created folder with cd ChameleonUltra/software/src
Prepare for package installation with pacman-key --init; pacman-key --populate; pacman -S msys2-keyring --noconfirm; pacman-key --refresh
Proceed by installing Ninja with pacman -S ninja --noconfirm
Build the required config by running cmake .
And the binaries with cmake --build .
Go into the script folder with cd ~/ChameleonUltra/software/script/
Install python requirements with pip install -r requirements.txt
Finally run the CLI with python chameleon_cli_main.py
To use after installing, just do the following:
Run runme64.bat
Go into the script folder with cd ~/ChameleonUltra/software/script/
Run the CLI with python chameleon_cli_main.py
Coming Soon
Coming Soon
Building natively is a bit more advanced and not recommended for beginners
Download and install Visual Studio Community
On the workload selection screen, choose the Desktop development with C++
workload. Click Download and Install
Download and install git. When asked, add to your path
Download and install cmake. Again, when asked, add to your path
Download and install python. When asked, add to your path (small checkbox in the bottom left). Python 3.9 or above is required.
Choose a suitable location and open a terminal. Clone the repository with git clone https://github.com/RfidResearchGroup/ChameleonUltra.git
Change into the binaries folder with cd ChameleonUltra/software/src
Build the required config by running cmake .
And the binaries with cmake --build .
Copy the binaries by running cp -r ../bin/Debug/* ../script/
Go into the script folder with cd ../script/
Create a python virtual environment with python -m venv venv
Activate it by running .\venv\Scripts\Activate.ps1
Install python requirements with pip install -r requirements.txt
Finally run the CLI with python chameleon_cli_main.py
To run again after installing, just do the following:
Activate venv by running .\venv\Scripts\Activate.ps1
Run the CLI with python chameleon_cli_main.py
Requires Homebrew to be installed.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
See Linux/Macos instructions below for the rest.
Install the dependencies
sudo apt install git cmake build-essential python3-venv
sudo pacman -S git cmake base-devel python3
brew install git cmake python3
Python 3.9 or above is required.
Run the following script to clone the Repository, compile the tools and install Python dependencies in a virtual environment.
#!/bin/bash
git clone https://github.com/RfidResearchGroup/ChameleonUltra.git
(
cd ChameleonUltra/software/src
mkdir -p out
(
cd out
cmake ..
cmake --build . --config Release
)
)
(
cd ChameleonUltra/software/script
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
deactivate
)
To run the client after installing, do the following:
cd ChameleonUltra/software/script
source venv/bin/activate
python3 chameleon_cli_main.py
deactivate
When in the CLI, plug in your Chameleon and connect with hw connect
. If autodetection fails, get the Serial Port used by your Chameleon and run hw connect -p COM11
(Replace COM11
with your serial port, on Linux it may be /dev/ttyACM0
)
Make sure to be in the software/
directory and run the Python CLI from there.
# Connect to the CLI
hw connect
# Check which slot can be used
hw slot list
# Change the slot type, here using slot 8 for a MFC 1k emulation
hw slot type -s 8 -t MIFARE_1024
# Init the slot content
hw slot init -s 8 -t MIFARE_1024
# or load an existing dump and set UID and anticollision data,
# cf 'hf mf eload' and 'hf mf econfig'
# Enable the slot
hw slot enable -s 8 --hf
# Change to the new slot
hw slot change -s 8
# Activate the authentication logs
hf mf econfig --enable-log
Now disconnect, go to a reader and swipe it a few times
Come back
# connect to the CLI
hw connect
# See if nonces were collected. We need 2 nonces per key to recover
hf mf elog
# Recover the key(s) based on the collected nonces
hf mf elog --decrypt
# Clean the logged detection nonces
hf mf econfig --disable-log
Output example:
- MF1 detection log count = 6, start download.
- Download done (144bytes), start parse and decrypt
- Detection log for uid [DEADBEEF]
> Block 0 detect log decrypting...
> Block 1 detect log decrypting...
> Result ---------------------------
> Block 0, A key result: ['a0a1a2a3a4a5', 'aabbccddeeff']
> Block 1, A key result: ['010203040506']
More examples coming soon