Sim Card Security PDF
Sim Card Security PDF
Sim Card Security PDF
Sheng He
108005239797
Seminar Work
at
12.07.2007
Ruhr-University of Bochum
Contents
1 Overview ................................................................................................................................3
2 SIM Card Introduction ......................................................................................................4
2.1 Structure and type ...............................................................................................4
2.2 Cryptographic algorithm and secret key in SIM card.............................5
2.3 SIM File System ....................................................................................................6
2.4 Data and Parameter ............................................................................................7
2.5 The files on the SIM-card ................................................................................10
3 Threats to SIM Data ........................................................................................................11
3.1 Attacks to the COMP128 ..................................................................................11
3.2 SIM cloning ...........................................................................................................11
4 Security features...............................................................................................................12
4.1 Algorithms and subscriber authentication key........................................12
4.2 Authentication......................................................................................................13
4.3 Encryption..............................................................................................................13
4.4 Key Generation....................................................................................................14
4.5 Subscriber data stored in ME.........................................................................15
5 Future Evolution................................................................................................................15
5.1 UMTS .......................................................................................................................15
5.2 WCDMA ...................................................................................................................16
5.3 USIM Card .............................................................................................................17
6 Conclusion ...........................................................................................................................17
References..................................................................................................................................18
2
1 Overview
Since the GSM communication system has been designed by the Standardization
Committee composed of the European leading telecommunication operators and
manufacturers, this system concentrates much more on the interests of consumers
and operators. Thus, it made great effort to improve its functions including security,
convenience etc.
As the introduction of the SIM card technology into the GSM communication, the
wireless communication has been no long restricted by encryption. As long as the
customers bring a card, they could travel all around the world.
3
Feature 2, communications are secure. The SIM card has a permanent memory
storage and capacity of calculation. Therefore, it belongs to smart cards. When the
cell phone is switched on, customer should enter personal identification numbers
(PIN), this code is composed by 4 ~ 8 figures and accessed by keyboard typing. If
import three incorrect PIN code, PIN codes are locked, communications terminated,
this is one way against the misappropriation pseudo-client communication. If
customers forget the code or import by mistake three times, the 0 ~ 9-digit personal
unlocking key (PUK) stored in the SIM card can be used to unlock PIN codes,
recover it back to normal. However, we should also pay special attention to the
importation of 10 PUK wrong, the entire SIM cards abandoned. Only Through the
purchase of a new SIM cards can we recover our communication. In the process of
calling, if we import the correct PIN code, the Internet start a customer identity
authentication, using A3, A8 algorithm stored in the SIM card to compare the
results of mobile and Internet calculation and same authentication success. This is
the second line of defence to prevent misappropriation Communication. After
successful Authentication, in order to protect the confidentiality of client
information been transmitted to the other the other side of transmission. Another set
of encryption methods also been introduced - the use of the A5 algorithm to
prevent the illegal customer theft. In addition, in the process of Authentication and
decryption, parameters of key (Kc) and authentication key (Ki) on the interface will
not be transmitted. Only the International Mobile customer identification code
(IMSI) will be transmitted once. After that, the changing temporary code (TMSI)
instead, therefore GSM communications are securer than the analog mobile
communications.
Feature 3, low cost. Their costs are lower than telephone cards. Furthermore, they
are solid and durable and easily to be promoted.
4
--- CPU
These five modules must be integrated into an Integrated Circuit (IC), otherwise
their safety would be threatened. This is because the chip connections may become
illegal access and misappropriation of SIM cards important clues.
In practice, there are two different forms of SIM cards with the same functions:
(A) Full-size SIM card (commonly known as big card), this form of SIM cards
with the IC cards of the ISO 7816 Standard [ISO7816], similar to IC card. The card
has since been shrunk to the standard size of 25mm × 15mm.
(B) Embedded SIM card (commonly known as small card), the size of only 25 mm
× 15 mm, is a semi-permanent packed to the cards in the mobile station equipment.
Two cards have installed waterproof, wear-resistant, anti-static contact with high
accuracy and reliability characteristics.
5
PIN and PUK:
Let’s have a look at the Figure 2-1, the file system of a SIM is organized in a
hierarchical tree structure, it consists of the following three types of elements:
• Master File (MF) - the root of the file system that contains dedicated and
elementary files.
• Dedicated File (DF) - a subordinate directory to the master file that contains
dedicated and elementary files.
• Elementary File (EF) - a file that contains various types of formatted data,
structures as either a sequence of data bytes, a sequence of fixed size records, or
a fixed set of fixed size records used cyclically.
In the other side, the GSM standards define several important dedicated files
immediately under the MF: DFGSM, DFDCS1800, and DFTELECOM. For the
MF and these DFs, several EFs are defined, including many that are mandatory.
The EFs under DFGSM and DFDCS1800 contain mainly network related
information respectively for GSM 900 MHz and DCS (Digital Cellular System)
1800 MHz band operation. EFs for U.S. 850 MHz and 1900 MHz bands are found
respectively under those DFs as well.
6
Figure 2-1 SIM File System
In spite of SIM file systems are highly standardized, the standards allow flexibility
such that their content can vary among network operators and service providers.
For example, a network operator might not use an optional file system element,
might create an additional element on the SIM for use in its operations, or might
install a built-in function to provide a specialized service.
The following data are stored in the SIM card: ISDN, Ki, PIN, PUK, TMSI, LAI
and ICCID (SIM card number): 898600 9F SS YY G xxxxxX Chk
898600 fixed
9 the last digit of Mobile Access No.
F functional spaces, tentatively 0
SS the province’s No.
YY the year (last 2 digits) of ICCID establishment
G SIM card vendor’s No.
XXXXXX random definition by operator
Chk Parity
7
The following tables describe the two Phases of SIM card in GSM:
(1) Phase 1
(2) Phase 2
8
① GSM system parameters
Service 9: MSISDN
Service 10: Extension 1 file
Service 12: SMS parameters
Service 13: Last Number Dialled
Service 14: cell Broadcasting Message Identifier file
Identifier Name
6F3A Abbreviated Dialling
6F3C Short Message Storage
6F3D Capability Configuration
6F40 MSISDN
6F42 SMS Paramters
6F43 SMS Status
6F44 Last Number Dialled
6F4A Extension 1 file
9
2.5 The files on the SIM-card
The evidence on the SIM card is stored in the following files: [FGM03]
All of the stored data can potentially have evidential value. However, most of the
files refer to network internals that the user never see, and therefore does not
represent evidence on the usage of the telephone as such. We therefore limit the
10
discussion here to the files that typical represent relevant evidence on phone usage
[GSM1111].
–This does not utilise any hardware or software property of the SIM.
–attack against just one card, not against the system itself.
11
the cloned SIM [SIMCLO]. In the early several years, because of poor security
features, cloning was more common than it is today. People can fake the SIM card
with the SIM cloning technique. Cloning has now been rendered more challenging
technically, it is as physical approach to the SIM card is required as opposed to
simply being within radio reach.
SIM cloning is nowadays more difficult to perform, as copying the contents of the
SIM does not enable a duplicate SIM to operate, as the SIM itself performs security
operations on the data contained inside to avoid such copying. In order to function,
the cloned SIM needs to perform security operations on the data comprised, just
like the old one. SIM cloning is also a great concern of security services because of
its GSM location-based service undependable if more than one handset is using the
same SIM card.
Cloning SIM data for illicit use–Two key pieces of data: IMSI, Data Encryption
Key (Ki). IMSI can be obtained:
–From SIM using scanning software
–Eaves-dropping on networks for unencrypted transmission of the IMSI
Ki can not normally be obtained directly as it is derived from encryption algorithm
stored on SIM.
4 Security features
This clause defines the security attributes to be supported by the SIM, which are:
- authentication algorithm (A3);
- subscriber authentication key (Ki);
- cipher key generation algorithm (A8);
- cipher key (Kc);
- control of access to data stored, and functions performed, in the SIM.
An algorithm A38 may perform the combined functions of A3 and A8.
All reasonable steps shall be taken to ensure that the algorithms (A3 and A8) and
subscriber authentication key (Ki) cannot be read, altered, manipulated or bypassed
in such a way as to reveal secret information.
12
All MS processes that require the use of the subscriber authentication key shall be
performed internally by the SIM.
4.2 Authentication
Each subscriber has a secret key, one copy of which is stored in the SIM card and
the other is stored in the AC. During authentication, AC generates a random
number that sends to the mobile. Both mobile and AC use the random number, in
conjunction with subscriber's secret key and a ciphering algorithm called A3, to
generate a number that is sent back to the AC. If number sent by mobile matches
number calculated by AC, then subscriber is authenticated. A list of IMEIs in the
network is stored in the Equipment Identity Register (EIR).
The status returned in response to an IMEI query to the EIR is one of the following:
–White-listed: Terminal is allowed to connect to the network
–Grey-listed: Under observation from the network, possible problems
– Black-listed: Terminal has either been reported as stolen, or it is not type
approved (the correct type of terminal for a GSM network). The terminal is not
allowed to connect to the network.
4.3 Encryption
A stream cipher known as the A5 algorithm. Multiple versions with various levels
of encryption.
–A5/0: no encryption.
–A5/1: original A5 algorithm used in Europe.
–A5/2: weaker encryption algorithm created for export, in removal.
– A5/3: strong encryption algorithm created as part of the 3rd Generation
Partnership Project (3GPP).
Stream cipher is initialised with the Session Key (Kc) and the number of each
frame. The same Kc is used throughout the call, but the 22-bit frame number
changes during the call, thus generating a unique key stream for every frame. The
13
same Session Key (Kc) is used as long as the Mobile Services Switching Center
(MSC) does not authenticate the Mobile Station again. The same Session Key (Kc)
may be in use for days. Authentication is an optional procedure in the beginning of
a call, but it is usually not performed. The A5 algorithm is implemented in the
Mobile Station (MS).
PIN locks the SIM card until correct code is entered. Each phone network sets the
PIN of SIM to a standard default number.
–Can be changed via handset
–Protects account, even if SIM is inserted into another phone
If PIN protection enabled, PIN will need to be entered each time phone is switched
on. If PIN entered incorrectly 3 times in a row, SIM will be blocked requiring a
PUK from network/service provider.
PIN code 2 included with new SIM cards (GSM phase 2). Code controls access to
advanced features of phone, i.e. fixed dialling list. A restricted list of numbers the
phone can call. Default code is set by Service Provider, but editable. PIN entered
incorrectly3 times-SIM blocked. Unable to make and receive calls/texts. PUK
needed from network provider, or possibly GSM cell phone manual. Caution: if
PUK entered 10 times incorrectly, SIM is permanently disabled and the SIM must
be exchanged. Performs same function as the PUK, but for PIN Code 2. Service
Provider has this code when needed.
A8 algorithm generates 64-bit Session Key (Kc). From 128-bit random challenge
(RAND) received from Mobile Services Switching Center (MSC) and from 128-bit
Individual Subscriber Authentication Key (Ki) from Mobile Station's SIM or Home
Location Register (HLR).
One Session Key (Kc) is used until the MSC decides to authenticate the MS again.
This might take days. A8 actually generates 128 bits of output. The last 54 bits of
those 128 bits form the Session Key (Kc). Ten zero-bits are appended to this key
before it is given as input to the A5 algorithm. The A8 algorithm is implemented in
the Subscriber Identity Module (SIM).
14
4.5 Subscriber data stored in ME
All subscribers related information conveyed into the ME during GSM network
operations should be deleted from the ME after removal of the SIM, deactivation of
the MS, or following an electrical reset of the SIM. This includes any data that was
transferred to the ME by SIM Application Toolkit commands [SIMME].
The Subscriber related security codes might be kept inside the ME during the
enforcement of the appropriate SIM/ME interface procedure. They should be
deleted from the ME immediately after completion of the procedure. But in fact, an
ME may retain some less security critical data at SIM removal or MS switch-off.
Such data are SMS, LND etc. These data, when stored in the ME, shall only be
readable or retrievable if the same SIM card is reactivated as determined by the
IMSI.
If the IMSI is retained in the ME for this purpose it shall be stored securely and
shall not be able to be read out. Storage for other data such as SMS, LND etc.,
storage may also exist in the ME. These data stored in the ME, which have not
been transferred from a SIM during a card session, are not subject to the above
security restriction.
5 Future Evolution
5.1 UMTS
The speed is one of the main benefits of UMTS. Current rates of transfer for
broadband information are 2 Mbits a second. This speed makes possible the kind of
streaming video that can support movie downloads and video conferencing. In a
sense, UMTS makes it possible for the cell phone owner to enjoy all of the
functionality of his home computer while he is roaming. By combining wireless
15
and satellite cellular technologies, UMTS takes advantage of all existing options to
result in the Holy Grail of 3G presentation: seamless transitions between WiFi and
satellite.
It was in Japan in 2001, UMTS went live as a network for the first time. Austria
had its own network two years later (2003). A handful of other European countries
joined the UMTS bandwagon in the next two years, with South Africa and a few
other African countries soon following suit. The U.S. has employed UMTS
networks in several large cities, and the number is steadily growing. UMTS is
based on the Global System for Mobile (GSM) standard, which is the gold standard
in Europe and more than 120 countries worldwide.
In fact, UMTS is sometimes referred to as 3GSM. The two systems are not
compatible, however. UMTS is incompatible with GSM. Some phones are dual
GSM/UMTS phones, but unless that exciting new mobile phone or handset that you
can't wait to get your hands on has that kind of duality built in, you will only be
able to utilize one mode, the one that came with the device.
5.2 WCDMA
WCDMA stands for “Wideband Code Division Multiple Access". It is a worldwide
communications standard offering a superior ability to handle multimedia
communication, including high-speed data, voice, moving and still image
transmission.
16
5.3 USIM Card
The Universal Subscriber Identity Module or named USIM card is the logical
extension of the SIM card into the 3G environment. The USIM card is an evolution
of the SIM card still under the control of the ETSI. The USIM card is also the heart
of the mobile phone that enables people to communicate with ease. The computer
chip inside stores people’s phone number, address book (up to 50 entries) and other
information.
Compare with the SIM card: Simply put, this is the world standard. GSM mobile
phones used mainly in Europe utilize SIM card. The USIM card is a more
sophisticated type that allows you to send and receive calls using your regular
phone number in Japan and other major countries around the world.
6 Conclusion
In this seminar work, we have presented the basic information and structure of the
SIM card, also several attacks on the SIM card, e.g. the attack against COMP128
algorithm. So this means, SIM card have been broken?
The answer is: No. The SIM card has successfully stood the test of time and we
have shown that SIM card security is susceptible to certain attacks. We also have
two most important security parts to protect it. However, with high costs involved
to patch SIM cards globally, providers ignore the threats.
Meanwhile, we are looking forward to the future evolution, the UMTS and USIM
card. The new mobile system will be much faster and safer than the system GSM
nowadays. We think, UMTS will be used commonly instead of GSM in the very
near future.
17
References
[FGM03] Willassen, S., 2003, Forensics and the GSM Mobile Telephone System,
International Journal of Digital Evidence, Volume 2, Issue 1.
18