Turn Any Phone into a IC Card

Recently I moved to a new office which requires a IC card as access control. Wherever I go, I need to bring it, otherwise I can't enter the office. It's really inconvenient.

So I was thinking if I could simulate the IC card using my phone. I did some search on the Internet. It turned out to be possible for some specific Android phones, such as some Xiaomi phones. But mine is iPhone, although Apple released some NFC related API, it's still not enough.

Using my iPhone as a IC card seems impossible. Is there any alternative? The answer is YES. I found there is a kind of NFC tag which is small and could stick to the phone. Most importantly the data it contains could be customized. So the new solution is to copy the data from the original card to the tiny NFC sticker. You can have a distinct comparison about their sizes from the image below.

Original IC card, Tiny NFC Tag and my iPhone 7

Hardwares

There are three things which are necessary in this project.

  • The original IC card
  • An Android phone with NFC
  • The tiny NFC sticker (you can buy it later after you confirm your original IC card is not encrypted)

Software

There is only one app you need to install on your Android phone, which is MIFARE Classic Tool.

MIFARE Classic Tool App Icon

Detect your original IC card

After your install the app, open it and put your original IC card near the NFC sensor on your Android phone. It will detect it automatically. If you feel the vibration and see a popup message displaying something like New tag found (UID: DED358AA). Congratulations. Your IC card is possible to copy. You can also learn some basic information about it by clicking TOOLS -> Display Tag Info.

Tag Info

Read data from your original IC card

By clicking READ TAG and select all the key files, it's time to read your tag. Also put your card near the NFC sensor and click START MAPPING AND READ TAG. If everything goes well, you should see a Dump Editor which is divided into 16 sections. Each section contains the corresponding data. Please confirm all data from the 16 sections are read successfully. If any of them can't be read, it's probably encrypted, which means it's impossible to copy it. After that, you can save the file for later use.

Tag Info

In my case, except sector 0, there is no data in other sectors. So I guess it is the UID in sector 0 which is used by the access control system.

Write data into the tiny NFC sticker

After you buy the tiny NFC sticker, you can write the data from your original IC card into it. In the app, click WRITE TAG and choose Write Dump (Clone). Check Show Options and then check Advanced: Enable writing to manufacturer block. And then click SELECT DUMP, choose the dump file you saved before and click SELECT DUMP button. In the popup window, select all the sectors. Finally click OK button. Don't forget to put your tiny NFC sticker near the NFC sensor on your Android phone. If everything goes well, after a while, a success message will be displayed.

Write Tag

Congratulations! You just copied your original NFC card.

Compare Dumps

There is also a very useful tool called Diff Tool (Compare Dumps) under TOOLS* section in the app. Basically what it does is comparing the data between two NFC tags. You can use it to confirm the data in the NFC sticker is the same as that in your original IC card.

Compare Dumps

Finally, the most exciting moment comes. It's time to test your NFC sticker. Hopefully it will work for you. If so, you no longer need to bring your original NFC card. Life becomes much easier.