Rysc Corp will be closed for the holidays from December 13 - 27. All orders placed during this time will be shipped on or after December 28.

Rysc Corp will be closed for the holidays from December 13 - 27. All orders placed during this time will be shipped on or after December 28.

Getting Started with MagSpoof using Arduino IDE

March 27, 2017

This guide covers the process of uploading code to the MagSpoof with Arduino IDE.

You will need the following items for this guide:

1. Install Arduino IDE

2. Open Arduino IDE as root/administrator.

Linux:

  • Open a terminal application and navigate to the Arduino IDE folder. Run the following commands inside the Arduino folder.
  • sudo ./arduino
  • Enter your root password.
  • Arduino IDE should now open.

Windows:

  • Navigate to the Arduino IDE folder.
  • Right click and click run as administrator.

3. Download Samy's code from GitHub.

git clone https://github.com/samyk/magspoof.git

4. Copy the contents of magspoof.c into a new sketch. Save the new sketch. 

5. Inside Arduino IDE click file –> preferences. In the settings tab at the very bottom you will see an option called "Additional Boards Manager URLs". Enter the following URL.

https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json
  • Click OK

Arduino IDE Preferences

6. Click Tools –> Board –> Board Manager. Navigate to the bottom and click on the new entry called "attiny by David A. Mellis", select version 1.0.1 and click install. Then close Board Manager.

Board - Arduino IDE

Board Manager - Arduino IDE

7. Configure the board settings.

  • Click Tools –> Board and select ATtiny.

Arduino IDE - Board Select MagSpoof

  • Click Tools –> Processor select ATtiny85.

Arduino IDE - Process Select MagSpoof

  • Click Tools –> Clock select 8 MHz (internal).

Arduino IDE - Clock Select MagSpoof

8. Click Tools -> Programmer and select your programmer from the list shown. In this example we are using the Sparkfun AVR Pocket Programmer, and set the programmer to USBtinyISP.

Arduino IDE - Programmer

9. Place the battery inside your MagSpoof and turn it on.

10. Verify the software by clicking the check mark in the top left hand corner.

Arduino IDE - Verify

11. Upload the code by clicking on the arrow. If it completes successfully your MagSpoof is now programmed. 

Arduino IDE - Upload

12. Change the track information highlighted below as follows.

Arduino IDE - Code Change MagSpoof

  • Track 1
"%B4444444444444444^ABE/LINCOLN^291110100000931?\0", // Track 1
  • Track2
";4444444444444444=29111010000093100000?\0" // Track 2

Your code should now look something like this.

Arduino IDE - Track change MagSpoof

Upload the new code to the MagSpoof.

13. Open up a new text document and connect your MagStripe Reader. MagStripe readers pretend to be USB keyboards and will enter text in the document after completing a successful read. Try it by swiping a real credit card.

With your MagSpoof touching the reader, press the button. You should see output similar to the string shown below. Play around with the angle if you are getting different results. 

%4444444444444444=29111010000093100000?+4444444444444444=29111010000093100000?

14. There is a variable in the code called CLOCK_US that controls the speed at which the card data is transmitted. At the current CLOCK_US you only get the second track, if you change the CLOCK_US to 120 you should get the first track. This is due to the variable bit densities of track data. 

%B4444444444444444^ABE/LINCOLN^291110100000931?#B4444444444444444^ABE/LINCOLN^291110100000931?

15. Change the following code and add your credit card information below. We recommended swiping your card with the MagStripe Reader and copying and pasting the output.

Arduino IDE - Your Credit Card MagSpoof

If you have any questions related to this blog please email us at support@ryscc.com.






Also in Blog

Getting Started with Version 3.0.1 of the Proxmark3
Getting Started with Version 3.0.1 of the Proxmark3

November 06, 2017

This guide covers how to get started with the Proxmark3 firmware V3.0.1 on Windows, Linux and macOS.

View full article →

Getting Started with ChameleonMini Rev.G
Getting Started with ChameleonMini Rev.G

October 23, 2017

Follow this guide to get started with your new ChameleonMini Rev.G using macOS, Windows and Linux.

View full article →

How to Install a Proxmark3 Driver on Windows 10
How to Install a Proxmark3 Driver on Windows 10

October 18, 2017

Follow the instructions below to install the Proxmark3 CDC drivers on a computer running Windows 10.

View full article →