Repository navigation
4. Examples
Warning
MagSpoof does not enable you to use credit cards that you are not legally authorized to use. The Chip-and-PIN and Amex information is not implemented, and using MagSpoof requires you to have/own the magstripes that you wish to emulate. Simply having a credit card number and expiration date is not enough to perform transactions. MagSpoof does allow you to perform research in other areas of magstripes, microcontrollers, and electromagnetism, as well as learn about and create your own devices similar to other existing, commercial technologies such as Samsung MST and Coin.
Important
The information in this guide is purely informative, and the card used is a dummy generated online. For the emulating test, we have used real card data that is not shared for security reasons; use YOUR OWN card data.
Use an external magnetic stripe card reader to obtain your card's data, or use a similar method. Card readers will act as a US language keyboard, so you will need to open a notes app to save the data.
Note
You can use a reader connected to the UART interface of the MagSpoof to read and save the track directly to the MagSpoof. If using this method, you can jump directly to step 3.
From now on we will use the dummy card below shown. As you can see, there are differences between the cards’ tracks, but in the end, any format is useful since there are a few differences that can be corrected manually.
The tracks obtained/generated are:
Note
Here you should have YOUR card data.
- Track 1: B4913989534473337^Doroteja/Marija/Goncalves^05301110000682000?\0
- Track 2: ;4913989534473337=05301110000000006820?\0
Let us identify the data, add missing information to meet the format, and compare it to the information printed on the bank card.
MagSpoof uses the magstripe Format B. The minimum cardholder account information needed to complete a transaction is present on both tracks. Track 1 has a higher bit density (210 bits per inch vs. 75), is the only track that may contain alphabetic text, and hence is the only track that contains the cardholder's name.
-
Track 1 structure:
- Start sentinel — one character (generally '%')
- Format code="B" — one character (alpha only)
- Primary account number (PAN) — up to 19 characters. Usually, but not always, matches the credit card number printed on the front of the card.
- Field Separator — one character (generally '^')
- Name — 2 to 26 characters, surnames separated by space if necessary, Surname separator: /
- Field Separator — one character (generally '^')
- Expiration date — four characters in the form YYMM.
- Service code — three characters
- Discretionary data — may include Pin Verification Key Indicator (PVKI, 1 character), PIN Verification Value (PVV, 4 characters), Card Verification Value or Card Verification Code (CVV or CVC, 3 characters)
- End sentinel — one character (generally '?')
- Longitudinal redundancy check (LRC) — it is one character and a validity character calculated from other data on the track.
-
Track 2 structure:
- Start sentinel — one character (generally ';')
- Primary account number (PAN) — up to 19 characters. Usually, but not always, matches the credit card number printed on the front of the card.
- Separator — one character (generally '=')
- Expiration date — four characters in the form YYMM.
- Service code — three digits. The first digit specifies the interchange rules, the second specifies authorization processing and the third specifies the range of services
- Discretionary data — as in track one
- End sentinel — one character (generally '?')
- Longitudinal redundancy check (LRC) — it is one character and a validity character calculated from other data on the track. Most reader devices do not make the LRC available for display but use it to verify the input internally to the device.
Learn more about the service code values here.
With this information, we can now section both tracks and add the missing data (only the start sentinel for track 1):
Track 1:
Track 2:
There are multiple ways to perform this depending on the version you are using. For MagSpoof standalone versions can be directly defined in the code, version 4 and above can use the command line interface (CLI) for easier use, and lastly, MagSpoff Add-On requires saving the data in a specific format file. Refer to its documentation.
In this case, we are using MagSpoof V5, so we used the CLI to perform this:
- Connect MagSpoof to a computer and turn it ON.
- Open a serial terminal you prefer to start a session. You can send the track data by simply copying and pasting it to the terminal. We can verify that the tracks are saved in the board’s RAM by sending the command “d”. We saved it in the EEPROM for future testing by sending the command “s”.
- Emulate the saved data by pressing the SW1 button or by sending the command “p” to the terminal.
Note
It is not necessary to insert the card into the slot where a traditional card would slide, just bringing the MagSpoof close enough to the reader.
Important
MagSpoof’s coil must be correctly centered on the magstripe reader, otherwise you may face reading errors.
- MagSpoof Overview
- Turning ON MagSpoof
- MagSpoof and its different modules
- Magnetic Stripes
- MagSpoof Versions
- Bootloader Mode
- Driver installation
- Upload the MagSpoof firmware
- Recover MagSpoof (Program CH5552 chip)
- It is possible to intercept data with my MagSpoof?
- What can I do if the coil desolders from the board?
- My board is not being detected by my PC
- I need a case
