Project

General

Profile

Actions

Bug #5254

closed

Error in programmin Ki with PySim-prog

Added by abouillot about 2 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Target version:
-
Start date:
10/11/2021
Due date:
% Done:

100%

Spec Reference:

Description

When using pySim-prog, the value of the Ki written on the card is shifted by on hex digit to the left and an extra 0xFF is written at the end. pySim-prog display the values as passed as parameters, but not the actual written values.

./pySim-prog.py -p 0 --iccid=8988211910000000987 --pin-adm=11111111 --mcc=214 --mnc=03 --imsi=214030123456789  -k 00ffeeddccbbaa998877665544332211@

Using PC/SC reader interface
Ready for Programming: Insert card now (or CTRL-C to cancel)
Autodetected card type: sysmoISIM-SJA2

Generated card parameters :
 > Name     : Magic
 > SMSP     : e1ffffffffffffffffffffffff0581005155f5ffffffffffff000000
 > ICCID    : 8988211910000000987
 > MCC/MNC  : 214/03
 > IMSI     : 214030123456789
 > Ki       : 00ffeeddccbbaa998877665544332211
 > OPC      : 8d772bbc604afa494ebc8ff6a71c14df
 > ACC      : None
 > ADM1(hex): 3131313131313131
 > OPMODE   : None
Programming ...
Warning: Programming of the ICCID is not implemented for this type of card.
Programming successful: Remove card from reader

I haven't found a way to read the Ki value using pySim-shell or pySim-read, so I used simso-isim-tool.sja2.py to verify the card content.

./sysmo-isim-tool.sja2.py -a 11111111 -k

sysmoISIM-SJA2 parameterization tool
Copyright (c)2019 Sysmocom s.f.m.c. GmbH

Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 30 34 05 4B A9
Initializing smartcard terminal...
 * Card not detected!
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 75 31 33 02 51 B2
Initializing smartcard terminal...
 * Card not detected!
Trying to find card with ATR: 3B 9F 96 80 1F 87 80 31 E0 73 FE 21 1B 67 4A 4C 52 75 31 04 51 D5
Initializing smartcard terminal...
 * Detected Card IMSI:  214030123456789
   USIM Application installed

Authenticating...
 * Remaining attempts: 3
 * Authenticating...
 * Authentication successful
 * Remaining attempts: 3

Reading KI value...
 * Initalizing...
 * Reading...
 * Current KI setting:
   KI: ffeeddccbbaa998877665544332211ff

Done!

The value recognized by the network is indeed the key as read by sysmo-isim-tool.sja2.py

Both tools are used in their most recent version, retrieved last week.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)