14

I understand that a SIM card has memory, and that some or maybe all of them also include microprocessors.

They act as peripherals that are more than just flash memory.

I would like to be able to read the contents and extract my contacts and messages, for backup, so I bought an el-cheapo "SIM Card Reader" that plugs into a USB port. But when I plug it in it is as if it isn't even there.

So how can I get access to the data?

Secondly, I understand that they can affect the baseband portion of the cellphone, including frequency of operation and whatever codes are necessary to identify itself (IMEI) and to access a particular network (T-Mobile, AT&T, Verizen). Again, it is clearly more than just flash memory.

So my question is, how exactly do they work, and how can I read the data from my phone's card?

14

SIMs card are a type of Universal Integrated Circuit Card (UICC).

how exactly do they work

According to Karsten Nohl's presentation "Mobile Network Attack Evolution", SIM cards contain an embedded real-time operating system, a filesystem and a Java VM:

Presentation slide 1

Here is the technical specification for UICCs, which describes exactly how they work:

ETSI TS 102 221 V8.2.0 (2009-06) Technical Specification for smart cards, the UICC-Terminal interface and physical and logical characteristics.

how can I get access to the data? how can I get into my own card?

This DefCon presentation "DEF CON 21 - Karl Koscher and Eric Butler - The Secret Life of SIM Cards" video explains quite a bit about SIM cards and how to interface with them.

From the presentation slides:

Interfacing with SIM Cards 1

They also had trouble:

Interfacing with SIM Cards 2

They found SIM Alliance Loader software...

Interfacing with SIM Cards 3

...but decided to use GlobalPlatform instead, which is far more complicated. In order to use GlobalPlatform to interface with the SIM card, the presenters drew on techniques presented in Karsten Nohl's research.

  • 1
    Thank you, @SYS_V - I really appreciate you explaining this. It isn't nearly as easy as reading a regular SD card at all. (btw, cool handle - I was trained on ATT System V also) – SDsolar Mar 27 '17 at 20:58
  • @SDsolar opensecuritytraining.info/SmartCards.html – julian Apr 5 '17 at 22:02
0

Found some good answers in this article:

What Is A SIM Card (And What Comes Next)? (howtogeek.com)

EXCERPT:

What’s Stored On A SIM Card?

A SIM card stores the 15-digit International Mobile Subscriber Identity (IMSI) identifying the card on carrier’s mobile network. The IMSI is an important part of the lookup process and determines the network to which a mobile device connects.

Along with the IMSI, a 128-bit value authentication key (Ki) is sent to verify your SIM with the GSM cellular network. The Ki is assigned by the operator and stored in a database on their network.

A SIM card is also capable of storing SMS messages and the names and phone numbers of up to 500 contacts, depending on the memory size of the SIM card you have. If you have to change phones for whatever reason, you’re able to transfer your contacts via the SIM card painlessly.

Most SIM cards contain between 64-128 KB of storage.

> How Does A SIM Work?

Essentially, a SIM card serves as your phone’s credentials to access the carrier network. Because the SIM holds this information, you’re able to pop it into any phone with the same carrier, or an unlocked phone, to access the network.

Here’s how it works:

When you boot up your device, it obtains the IMSI from the SIM, and then relays the IMSI to the network in order to request access.

The operator network searches the database for your IMSI and the associated Ki.

Assuming your IMSI and Ki are verified, the operator then generates a random number, signs it with your Ki using the GSM cryptography algorithm for computing SRES_2, and creates a new unique number.

The network then sends that unique number back to the device, which then passes it to the SIM to use in the same algorithm, creating a third number.

This number is then relayed back to the network.

If both numbers match, the SIM card is deemed legitimate and is granted access to the network.

So if you break the screen on your phone, while it’s getting fixed you can take your SIM out and put it in a replacement phone and still access phone calls, texts, and data from your network.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.