# Sniffing your SIM

## Connecting your device

You will need to put your SIM into the SIMtrace hardware, connect one of the four flex cables to the SIMtrace hardware, put the other side into the SIM socket of your phone. Use USB to connect the SIMtrace hardware to the PC. On your PC you should be able to see the USB device now.

### Connecting the SIMtrace Hardware

SIMtrace being connected

## Launching SIMtrace

    $ ./simtrace
    simtrace - GSM SIM and smartcard tracing
    (C) 2010 by Harald Welte <laforge@gnumonks.org>

Launching the `simtrace` will try to find the SIMtrace hardware and then try to claim the USB device. The application will send the received data encapsulated in the GSMTAP format on localhost and the IANA assigned GSMTAP port.

## Launching Wireshark

The `wireshark` application will start a GUI and given the right permissions you should be able listen to the localhost interface and filter for the GSMTAP port on 4729. You should be able to see the decoded messages like in the figure below.

### GSMTAP in Wireshark

SIMtrace sending data

## Known Firmware Issues

The current firmware has two known bugs that limit the usage of the device. There is a problem with the enumeration on USB 3.0 controllers and the second is related to enumeration on OS X (Lion).

The firmware does not properly enumerate on systems with USB 3.0 controllers. The issue has not been analyzed and the workaround is to use a USB < 3.0 port or put a USB < 3.0 hub between.

The firmware sends a wrong Zero Length Packet as a response to a GET_DESCRIPTION request. OSX handles this by resetting the device.

## Other modes

The hardware is capable to be used as an ordinary card reader, provide Man-In-The-Middle (MITM) attacks, or operate as a SIM. The firmware currently does not have support for these modes.

The SIMtrace hardware supports ISO7816 Part 3 T=0/T=1 protocols, it basically can be used to intercept and analyze any traffic from (ISO7816) smart cards. This includes SIM cards, Pay TV cards (smart card for CAM), ATM cards, chip credit card, PKI smart cards, e-passport etc. etc. However watch out: You have to make your chip card fitting in the “SIM card size” ID-000 reader or build another adapter.