Difference between revisions of "Proxmark3: Installation"

From Embedded Lab Vienna for IoT & Security
Jump to navigation Jump to search
Line 1: Line 1:
== Summary ==  
== Summary ==  
Installation of Proxmark3 Linux client for RFID and NFC sniffing.
Installation of Proxmark3 on macOS and Linux client for RFID and NFC sniffing.


== Requirements ==
== MacOS installation ==
 
=== Requirements ===
Xcode (AppStore) is a must.
In addition to make the installation easier have either HomeBrew or MacPorts ready.
A Tutorial for installing:
A) HomeBrew: https://docs.brew.sh/Installation
B) MacPorts: https://www.macports.org/install.php
 
Because of their different architecture (HomeBrew/MacPorts), some parts of this tutorial are split into:
A) Installation with HomeBrew
B) Installation with MacPorts
Just choose the tutorial that suits your current setup.
 
=== Installation with HomeBrew ===
1. Download ("tap") the proxmark repository:
  brew tap proxmark/proxmark3
2. Install proxmark3:
  brew install proxmark3
 
=== Manual Installation ===
Download the drivers and install them.
If you have MacPorts:
  sudo port install p7zip readline libusb libusb-compat perl5 wget qt5\\ arm-none-eabi-gcc pkgconfig
 
If you have HomeBrew:
  brew tap nitsky/stm32
  brew install readline libusb p7zip libusb-compat wget qt5 pkgconfig\\ arm-none-eabi-gcc
Now you will need to add QT to the PKG_CONFIG_PATH so it find QT5 (replace YOUR_VERSION with your version number:
  export\\ PKG_CONFIG_PATH=/usr/local/Cellar/qt5/<<YOUR_VERSION>>/lib/pkgconfig/
3. And add moc_location in Qt5Core.pc file:
  export QT_PKG_CONFIG_QT5CORE=$(find /usr -name Qt5Core.pc 2>/dev/null)
  chmod 666 $QT_PKG_CONFIG_QT5CORE
  echo "moc_location=\${prefix}/bin/moc" >> $QT_PKG_CONFIG_QT5CORE
  chmod 444 $QT_PKG_CONFIG_QT5CORE
4. For link creation to avoid any errors of "readline" (may happen):
  brew link --force readline
5. Now either git clone or manually download the Proxmark project. Git clone:
  git clone https://github.com/Proxmark/proxmark3.git
6. "cd" to the proxmark3 folder
 
7. Now jump to the section "Connecting your Proxmark"
 
=== Connecting your Proxmark ===
1. Insert your Proxmark and run
  system_profiler SPUSBDataType
2.
 
a) If your Proxmark is CDC you should somewhere see in the output:
  Product ID: 0x504d
  Vendor ID: 0x2d2d
b) If your Proxmark is an HID device you should see:
  Product ID: 0x4b8f
  Vendor ID: 0x9ac4
If it is an HID Device you will need to upgrade it, then go to "Upgrading my Proxmark HID->CDC"
If you have an CDC Proxmark you can jump to "Finish Line"
 
=== Upgrading my Proxmark HID->CDC ===
1. Compile the bootrom, OS and software:
  make clean; make
2. Also compile the HID compatible flash program:
  cd client/hid-flasher;make
3. Disconnect Apple's HID driver, by installing a dummy kernel driver:
  sudo make install_kext
  sudo kextcache -system-caches
4. Keep the Proxmark button pressed while reconnecting it to USB. Its yellow and red lights should light up (you can release the button after 5-ish seconds).
 
5. Now upgrade the bootrom:
  ./flasher -b ../../bootrom/obj/bootrom.elf
6. cd ../..
 
7. Disconnect your proxmark and keep the button pressed while reconnecting to USB.
 
8. While keeping the button pressed run to get the device name:
  ls /dev/cu*
You should find a name like "/dev/cu.usbmodem####" (#### represents a number).
 
9. While still KEEPING PRESSED the button update the FPGA and its OS:
  ./client/flasher /dev/cu.usbmodem#### armsrc/obj/fullimage.elf

10. Disconnect the proxmark and release the button.
11. Now reconnect your proxmark to USB and run it:
  cd proxmark3/client
  ./proxmark3 /dev/cu.usbmodem####
No need to go to "Finish Line", you are already finished with setting up the Proxmark Environment
 
 
=== Finish Line ===
1. Compile the bootrom and OS:
  make clean; make
2. Disconnect your Proxmark from USB. Then keep the button pressed while reconnecting it back to USB. You can release the button when you see yellow/orange and red lights on your proxmark. (If you have an Elechouse v2 Proxmark3 or Elechouse v3 Proxmark3 Easy you do not need to press the button)
 
3. Figure out your device name:
  ls /dev/cu*
It should be something with /dev/cu.usbmodem#### (#### represents a number).
 
4. After you have found your device run the program:
  cd proxmark3/client
  ./proxmark3 /dev/cu.usbmodem####
 
 
== Linux installation ==
 
=== Requirements ===


* Operating system: Ubuntu 16.04 trusty amd64
* Operating system: Ubuntu 16.04 trusty amd64
== Description ==


=== Step 1 Compile resources:===
=== Step 1 Compile resources:===

Revision as of 21:24, 29 April 2019

Summary

Installation of Proxmark3 on macOS and Linux client for RFID and NFC sniffing.

MacOS installation

Requirements

Xcode (AppStore) is a must. In addition to make the installation easier have either HomeBrew or MacPorts ready. A Tutorial for installing:

A) HomeBrew: https://docs.brew.sh/Installation
B) MacPorts: https://www.macports.org/install.php

Because of their different architecture (HomeBrew/MacPorts), some parts of this tutorial are split into:

A) Installation with HomeBrew
B) Installation with MacPorts

Just choose the tutorial that suits your current setup.

Installation with HomeBrew

1. Download ("tap") the proxmark repository:

  brew tap proxmark/proxmark3

2. Install proxmark3:

  brew install proxmark3

Manual Installation

Download the drivers and install them. If you have MacPorts:

  sudo port install p7zip readline libusb libusb-compat perl5 wget qt5\\ arm-none-eabi-gcc pkgconfig

If you have HomeBrew:

  brew tap nitsky/stm32
  brew install readline libusb p7zip libusb-compat wget qt5 pkgconfig\\ arm-none-eabi-gcc

Now you will need to add QT to the PKG_CONFIG_PATH so it find QT5 (replace YOUR_VERSION with your version number:

  export\\ PKG_CONFIG_PATH=/usr/local/Cellar/qt5/<<YOUR_VERSION>>/lib/pkgconfig/

3. And add moc_location in Qt5Core.pc file:

  export QT_PKG_CONFIG_QT5CORE=$(find /usr -name Qt5Core.pc 2>/dev/null)
  chmod 666 $QT_PKG_CONFIG_QT5CORE
  echo "moc_location=\${prefix}/bin/moc" >> $QT_PKG_CONFIG_QT5CORE
  chmod 444 $QT_PKG_CONFIG_QT5CORE

4. For link creation to avoid any errors of "readline" (may happen):

  brew link --force readline

5. Now either git clone or manually download the Proxmark project. Git clone:

  git clone https://github.com/Proxmark/proxmark3.git

6. "cd" to the proxmark3 folder

7. Now jump to the section "Connecting your Proxmark"

Connecting your Proxmark

1. Insert your Proxmark and run

  system_profiler SPUSBDataType

2.

a) If your Proxmark is CDC you should somewhere see in the output:

  Product ID: 0x504d
  Vendor ID: 0x2d2d

b) If your Proxmark is an HID device you should see:

  Product ID: 0x4b8f
  Vendor ID: 0x9ac4

If it is an HID Device you will need to upgrade it, then go to "Upgrading my Proxmark HID->CDC" If you have an CDC Proxmark you can jump to "Finish Line"

Upgrading my Proxmark HID->CDC

1. Compile the bootrom, OS and software:

  make clean; make

2. Also compile the HID compatible flash program:

  cd client/hid-flasher;make

3. Disconnect Apple's HID driver, by installing a dummy kernel driver:

  sudo make install_kext
  sudo kextcache -system-caches

4. Keep the Proxmark button pressed while reconnecting it to USB. Its yellow and red lights should light up (you can release the button after 5-ish seconds).

5. Now upgrade the bootrom:

  ./flasher -b ../../bootrom/obj/bootrom.elf

6. cd ../..

7. Disconnect your proxmark and keep the button pressed while reconnecting to USB.

8. While keeping the button pressed run to get the device name:

  ls /dev/cu*

You should find a name like "/dev/cu.usbmodem####" (#### represents a number).

9. While still KEEPING PRESSED the button update the FPGA and its OS:

  ./client/flasher /dev/cu.usbmodem#### armsrc/obj/fullimage.elf


10. Disconnect the proxmark and release the button. 11. Now reconnect your proxmark to USB and run it:

  cd proxmark3/client
  ./proxmark3 /dev/cu.usbmodem####

No need to go to "Finish Line", you are already finished with setting up the Proxmark Environment


Finish Line

1. Compile the bootrom and OS:

  make clean; make

2. Disconnect your Proxmark from USB. Then keep the button pressed while reconnecting it back to USB. You can release the button when you see yellow/orange and red lights on your proxmark. (If you have an Elechouse v2 Proxmark3 or Elechouse v3 Proxmark3 Easy you do not need to press the button)

3. Figure out your device name:

  ls /dev/cu*

It should be something with /dev/cu.usbmodem#### (#### represents a number).

4. After you have found your device run the program:

  cd proxmark3/client
  ./proxmark3 /dev/cu.usbmodem####


Linux installation

Requirements

  • Operating system: Ubuntu 16.04 trusty amd64

Step 1 Compile resources:

1. download and install some needed packages and libs

  sudo apt-get install p7zip git build-essential libreadline5 libreadline-dev libusb-0.1-4 libusb-dev libqt4-dev perl pkg-config wget libncurses5-dev gcc-arm-none-eabi libstdc++-arm-none-eabi-newlib

2. clone proxmark3 git repository

  git clone https://github.com/proxmark/proxmark3.git

3. enter repo

  cd proxmark3

4. get newest version

  git pull
  git checkout v3.1.0      # important git checkout latest stable version!! 

5. Install the blacklist rules

  sudo cp -rf driver/77-mm-usb-device-blacklist.rules /etc/udev/rules.d/77-mm-usb-device-blacklist.rules
  sudo udevadm control --reload-rules

6. add current user to group

  sudo adduser $USER dialout

7. compile proxmark3

  make clean && make all


Step 2 Identify proxmark3 device

  dmesg | grep -i usb
  [ 9704.503904] usb 1-3: Manufacturer: proxmark.org
  [ 9704.539638] cdc_acm 1-3:1.0: ttyACM0: USB ACM device

Step 3 Flash the firmware of the proxmark

  client/flasher /dev/ttyACM0 -b bootrom/obj/bootrom.elf armsrc/obj/fullimage.elf

if it does not succeed at first glance log out your user and log in again, this worked for me!!


Usage

1. Start client

  cd client
  ./proxmark3 /dev/ttyACM0 
  proxmark3>hw status
  proxmark3>hw version
  proxmark3>hw tune
  proxmark3>quit

2. Read some data with high frequency antenna

  hf mf rdbl 0 a ffffffffffff
  --block no:0, key type:A, key:ff ff ff ff ff ff            
  #db# READ BLOCK FINISHED          
  isOk:01 data:b5 5c c3 b0 9a 08 04 00 01 11 fa dc 17 46 6a 1d   

Resources and Tutorials


Used Hardware

Proxmark 3

Courses

References