Project

General

Profile

SoftSIM » History » Version 9

Anonymous, 02/19/2016 10:49 PM
add example

1 1 tsaitgaist
2 9 tsaitgaist
h2. presentation
3
4
5 1 tsaitgaist
softSIM is a collection of tools to play with the SIM application (in the SIM card or elsewhere).
6
7 9 tsaitgaist
It uses "bluetooth":http://bluetooth.org/ "profile":https://www.bluetooth.org/Technical/Specifications/adopted.htm "SIM Access Profile":https://www.bluetooth.org/DocMan/handlers/DownloadDoc.ashx?doc_id=158740 as abstraction layer to access the SIM (but no bluetooth is required).
8 1 tsaitgaist
9
The final purpose is to provide a virtual SIM, simulated in software.
10
11
12 9 tsaitgaist
h2. requirements
13
14
15 1 tsaitgaist
All the scripts are written in ruby :
16 9 tsaitgaist
<pre>
17 7 tsaitgaist
sudo apt-get install ruby
18 9 tsaitgaist
</pre>
19 1 tsaitgaist
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):
20 9 tsaitgaist
<pre>
21 1 tsaitgaist
sudo apt-get install rubygems ruby-dev libdbus-ruby pcscd ruby-serialport libpcsclite1 libpcsclite-dev libruby libxml-ruby
22
gem install --user-install smartcard
23 9 tsaitgaist
</pre>
24 1 tsaitgaist
detailed information is in README
25
26
to get the code :
27 9 tsaitgaist
<pre>
28 1 tsaitgaist
git clone git://git.osmocom.org/softsim.git
29 9 tsaitgaist
</pre>
30 1 tsaitgaist
31
32 9 tsaitgaist
h2. tools
33 1 tsaitgaist
34 9 tsaitgaist
35
36
h3. SAP
37
38
39 1 tsaitgaist
SAP is useful as it provides a easy common way to talk to the SIM, not restricted to any device (as PCSC is).
40
41 9 tsaitgaist
<pre>
42
<pre>
43 1 tsaitgaist
A tool to connect to BTSAP servers is also provided (some phones offer this profile).
44
45
You have to tell the Server how to communicate with the SIM.
46 9 tsaitgaist
<pre>
47 1 tsaitgaist
48 9 tsaitgaist
<pre>
49 1 tsaitgaist
50
51 9 tsaitgaist
h3. SIM information
52 2 tsaitgaist
53
54 9 tsaitgaist
<pre>
55 1 tsaitgaist
56 9 tsaitgaist
<pre>
57
58
59
h3. SIM copy
60
61
62
<pre>
63
<pre>
64 8 tsaitgaist
./demo_client.rb -t copy
65 9 tsaitgaist
</pre>
66 8 tsaitgaist
This file can then be used by the SIMOS server to do softSIM.
67 3 tsaitgaist
68
There are limitations to the copy.
69
Only the body of the files with access condition ALWAYS or CHV1 can be read, otherwise only the header is saved.
70
Ki (the secret key used for authentication and encryption) can not be extracted (SIM cards can not be cloned).
71
Only some A38 triplets are saved.
72
73
Copying a card takes > 5min.
74
Sometimes the copy hangs (the APDU traffic is blocked).
75
I don't know the origin of this problem (smartcard gem, pcscd, reader, card, ???).
76
Just wait ~30s and it will continue.
77
78 9 tsaitgaist
79
h2. bugs & more
80
81 1 tsaitgaist
82
Please contact the author if any bug is discovered.
Add picture from clipboard (Maximum size: 48.8 MB)