Project

General

Profile

Actions

SoftSIM » History » Revision 12

« Previous | Revision 12/15 (diff) | Next »
fixeria, 01/21/2019 03:16 AM


softSIM

softSIM is a collection of tools to play with the SIM applications (in the SIM card or elsewhere).

It uses bluetooth profile SIM Access Profile as abstraction layer to access the SIM (but no Bluetooth is required).

Possible use cases:

  • virtual SIM, simulated in software
  • remote SIM access, using PC/SC interface
  • remote SIM access, using a Bluetooth enabled phone as reader

Requirements

All the scripts are written in Ruby:

$ sudo apt-get install ruby

To use all tools, additional libraries and gems are required (you might want to use "sudo gem install" if you have ruby smartcard package loading problems):

$ sudo apt-get install rubygems ruby-dev libdbus-ruby pcscd ruby-serialport libpcsclite1 libpcsclite-dev libruby libxml-ruby
$ gem install --user-install smartcard

detailed information is in README.

Source code

$ git clone git://git.osmocom.org/softsim.git

Tools

General description

At the moment, the following tools are available:

  • demo_server.rb - (BT)SAP Server implementation. Can either talk to a PC/SC reader, or use a stored dump. Clients can connect either via UNIX socket, or using TCP/IP.
  • demo_client.rb - (BT)SAP Client demo. Can connect to our demo_server.rb either via UNIX socket, or using TCP/IP. Alternatively can connect to a regular phone (that does support this profile) using Bluetooth. Basically executes a sequence of common APDUs.
  • apdu_forward.rb - forwards APDUs from a UNIX socket to a (BT)SAP server using TCP/IP.

SIM copy

./demo_client.rb -t copy

This file can then be used by the SIMOS server to do softSIM.

There are limitations to the copy. Only the body of the files with access condition ALWAYS or CHV1 can be read, otherwise only the header is saved. Ki (the secret key used for authentication and encryption) can not be extracted (SIM cards can not be cloned). Only some A38 triplets are saved.

Copying a card takes > 5min. Sometimes the copy hangs (the APDU traffic is blocked).
I don't know the origin of this problem (smartcard gem, pcscd, reader, card, ???).
Just wait ~30s and it will continue.

Bugs & more

Please contact the author if any bug is discovered.

Files (0)

Updated by fixeria about 5 years ago · 12 revisions

Add picture from clipboard (Maximum size: 48.8 MB)