SIM Reader

This project details how to build a Smart/SIM card reader/writer for experimentation and investigation of SIM & Smart cards.Once the reader design is built, the open source software can be used to read from and write to the card. Together they can be used to backup/restore stored SIM card data, recover deleted SMS's and phone contacts, examine the last phone numbers dialed, etc.
Inserting SIM cards
Inserting the SIM card is fairly straight-forward. First verify that any cables and/or batteries are disconnected. This is the safest way to insert and remove cards.


Slide the holder away from the power LED (look for the OPEN-> indication on the card holder), the holder will pop open.


Slide the SIM card in so that the contacts face up and the notched corner is on the bottom. The holder is designed so that cards can't be placed backwards.

To remove a SIM card, disconnect all power and cables, then reverse the steps.
Connecting to a serial port
If you're using a serial port or a USB-to-serial converter with a DB9 connector, the board needs to be powered with a 9V battery.


The green LED should be lit indicating power good.



Then connect the DB9 cable to the side. That's it!
Connecting with an FTDI cable


An FTDI cable (5V or 3.3V version) can also be used. What's nice about these is that they provide a regulated 5V supply so a 9V battery is not needed!




Simply connect the cable to the header. Make sure the black (ground wire) is on the left as shown. The green LED should light up.
Running the pySim software
In order to send and receive data from the SIM card, we will use the free and open source software pySIM. This software does pretty much everything the expensive, proprietary, 'forensics' software out there does! It can back up and recover deleted SMS messages & phone book entries, determine the last numbers dialed, and extract serial number information.


For Windows, theres a package with a built executable. For Mac and Linux, the source code is easily run by intalling python & a few libraries. Check the download page for more information.

To run the software, double-click on pySimReader.exe (Windows)


Connect


First thing is to connect to the reader. Plug a serial cable from the reader to the computer's serial port




If your computer doesn't come with a serial port (say, a Mac or some newer PCs and laptops), a USB-serial converter will work just fine

Now its time to figure out what COM/serial port you are using. By default almost all Windows computers have only COM1 but if you are using a USB adaptor or have a different configuration, you will have a different COM port. Open up the Device Manager (under the System control panel) and look under Ports



For Linux, it will probably be something like /dev/ttyS0 (check your distribution docs) and for a converter, /dev/ttyUSB is popular. I suggest using dmesg to figure it out


If you're using a USB-serial converter such as on a Mac, the serial port will be in the /dev directory, and the name will start with cu. probably cu.usbserial or similar
 
Open up the Terminal and type in ls /dev/cu.* to see all of the serial ports available.



Click on Connect Reader and select the serial port

Click OK to connect to the reader. The debug window should pop up and display information send and received from the SIM card.

As long as some data was exchanged, the communication is working fine

Reading and writing data to the SIM
Now its easy to get the SMS and phonebook data. Use the menu commands to read, write, import and export data






When you're done. Click on Disconnect, remove the serial cable, disconnect the 9V battery and then remove the SIM.

No comments:

Post a Comment