Project

General

Profile

GrcardSIM » History » Version 10

laforge, 10/17/2016 03:51 PM
fix conversion errors when importing from trac

1 9 tsaitgaist
{{>toc}}
2 1 laforge
3 9 tsaitgaist
h1. GRcard SIM
4 9 tsaitgaist
5 9 tsaitgaist
6 1 laforge
The GRcard SIM is a programmable GSM SIM card.
7 1 laforge
8 1 laforge
It uses a mixture of TS11.11 / ISO7816-4 and proprietary commands for programming
9 3 laforge
10 1 laforge
There is limited card programming support both in http://cgit.osmocom.org/cgit/pysim/ as well as the more interactive http://cgit.osmocom.org/cgit/cyberflex-shell/
11 1 laforge
12 1 laforge
13 9 tsaitgaist
h2. Command reference
14 9 tsaitgaist
15 9 tsaitgaist
16 1 laforge
To understand this reference, it is assumed that you are familiar with basic knowledge on smartcard
17 1 laforge
technologies, such as standard ISO 7816-3/-4 APDUs and GSM TS 11.11.
18 1 laforge
19 1 laforge
20 9 tsaitgaist
h3. Setting the ICCID
21 9 tsaitgaist
22 9 tsaitgaist
23 1 laforge
Uses a standard UPDATE BINARY (D6) command on the EF.ICCID (2FE2)
24 1 laforge
25 1 laforge
Security: ADM2
26 1 laforge
27 1 laforge
28 9 tsaitgaist
h3. Setting the IMSI
29 9 tsaitgaist
30 9 tsaitgaist
31 1 laforge
Uses a standard UPDATE BINARY (D6) command on the EF.IMSI (7F20/6F07)
32 1 laforge
33 1 laforge
Security: ADM2
34 1 laforge
35 1 laforge
36 9 tsaitgaist
h3. Setting the Access Class
37 9 tsaitgaist
38 9 tsaitgaist
39 1 laforge
Uses a standard UPDATE BINARY (D6) command on the EF.ACC (7F20/6F78)
40 1 laforge
41 1 laforge
Security: ADM2
42 1 laforge
43 1 laforge
44 9 tsaitgaist
h3. Setting the SMS Parameters
45 9 tsaitgaist
46 9 tsaitgaist
47 1 laforge
Uses a standard UPDATE RECORD (DC) command on the EF.SMS (7F10/6F42)
48 1 laforge
49 1 laforge
Security: ADM2
50 1 laforge
51 1 laforge
52 9 tsaitgaist
h3. Setting the A3/A8 algorithm
53 9 tsaitgaist
54 9 tsaitgaist
55 1 laforge
Uses a standard UPDATE BINARY (D6) command on the non-standard (2700/6F70) EF
56 1 laforge
57 1 laforge
The record has a size of 1 byte and is defined as follows:
58 9 tsaitgaist
* 01 - COMP128v1
59 9 tsaitgaist
* 02 - COMP128v2
60 9 tsaitgaist
* 03 - COMP128v3
61 1 laforge
62 1 laforge
Security: ADM2
63 1 laforge
64 1 laforge
65 9 tsaitgaist
h3. Setting the Ki
66 1 laforge
67 10 laforge
Uses a non-standard APDU @80 D4 02 00 10@, followed by 16 bytes of Ki
68 9 tsaitgaist
69 1 laforge
Security: none
70 6 tsaitgaist
71 1 laforge
72 1 laforge
h3. Setting the PIN1 and PUK1
73 9 tsaitgaist
74 10 laforge
Uses a non-standard APDU @80 D4 00 01 10@ followed by 8 bytes of PIN1 and 8 bytes of PUK1
75 9 tsaitgaist
76 9 tsaitgaist
77 1 laforge
Security: none
78 1 laforge
79 1 laforge
80 1 laforge
h3. Setting the PIN2 and PUK2
81 1 laforge
82 9 tsaitgaist
83 10 laforge
Uses a non-standard APDU @80 D4 00 02 10@ followed by 8 bytes of PIN2 and 8 bytes of PUK2
84 9 tsaitgaist
85 1 laforge
Security: none
86 1 laforge
87 1 laforge
88 9 tsaitgaist
h3. Setting the ADM1 + AUK1
89 1 laforge
90 9 tsaitgaist
91 10 laforge
Uses a non-standard APDU @80 D4 01 04 12 03 00@ followed by 8 bytes of ADM1 and 8 bytes of AUK1
92 9 tsaitgaist
93 1 laforge
Security: none
94 1 laforge
95 9 tsaitgaist
96 1 laforge
h3. Setting the ADM2 + AUK2
97 9 tsaitgaist
98 10 laforge
Uses a non-standard APDU @80 D4 01 05 12 03 00@ followed by 8 bytes of ADM2 and 8 bytes of AUK2
99 9 tsaitgaist
100 9 tsaitgaist
Security: none
101 1 laforge
102 9 tsaitgaist
103 1 laforge
h3. Create File
104 1 laforge
105 10 laforge
Uses a non-standard APDU @80 CF 00 P2 LEN FID SIZE OPT1 ACC OPT2@, specified as follows:
106 9 tsaitgaist
107 1 laforge
* Parameter P2:
108 9 tsaitgaist
** 00: Create DF
109 9 tsaitgaist
** 01: Create linear record EF
110 1 laforge
** 02: Create transparent EF
111 9 tsaitgaist
** 03: Create cyclic record EF
112 10 laforge
** 04: used to create EF.0001 with size {{{0A20}}}
113 9 tsaitgaist
* FID: The 2 byte File ID
114 9 tsaitgaist
* SIZE: 2 bytes for the transparent EF size; or 1 byte for the number of records, and 1 byte for the record size for linear or cyclic EF
115 10 laforge
* OPT: Always @0100@
116 9 tsaitgaist
* ACC: Access conditions (3 bytes), According to TS 11.11, Section 9.3 
117 10 laforge
* OPT2: Always @FF@
118 9 tsaitgaist
119 4 tsaitgaist
Security: ADM0
120 4 tsaitgaist
121 5 tsaitgaist
122 9 tsaitgaist
h3. Erase Card
123 9 tsaitgaist
124 10 laforge
Uses a non-standard APDU @80FE000014 31323334353600001301FF0000000000000000EA@
125 5 tsaitgaist
126 1 laforge
Security: none
127 1 laforge
128 9 tsaitgaist
129 9 tsaitgaist
h3. Authenticate as ADM0
130 9 tsaitgaist
131 10 laforge
Uses a non-standard APDU @80 F6 00 00 08 PIN@, where per default PIN is @0000000000000000@
Add picture from clipboard (Maximum size: 48.8 MB)