Enabling Ciphering Indicator in Android
Enabling Ciphering Indicator in Android
eu
Abstract: This paper exemplifies the use of AT commands to retrieve (and eventually override) the ciphering
indicator status on Android by directly communicating with the phone modem. Curiously, his indicator is disabled
by default both at operating system level and SIM card settings. By turning it on, the mobile handset will inform
the user each time the communication becomes unencrypted, so a proper decision could be made just in time.
Key-Words: GSM encryption, IMSI catcher, A5, Ciphering Indicator, SIM, AT Commands.
52
Journal of Mobile, Embedded and Distributed Systems, vol. VI, no. 2, 2014
ISSN 2067 – 4074
53
www.jmeds.eu
The fake tower is placing itself between intercepted waiting for the phone to
the mobile device and the real base authenticate itself. The only issue for such
stations, so the entire incoming and an approach is to simulate the original
outgoing traffic will flow through it (Figure network, actually the user will presume
3). something is wrong if the GSM network
In Romania, the IMSI catchers are used reported on the device screen is suddenly
by the police from 2013 by accessing an changing. So the false tower should
OLAF Hercules2 European funded project identify itself as being a real service
[11] and intelligence agencies to track provider tower which is not very
and intercept mobile communications. complicated since the GSM mobile
IMSI catchers were first introduced by networks are identified by the MCC
Rohde & Schwarz, an electronics company (Mobile Country Code)/MNC (Mobile
having the headquarters in Munich, Network Code) tuples freely available on
Germany. The patent was issued in 1993 the Internet [5]. Table 1 presents the
and invalidated in 2012 because it was MCC/MNC tuples currently available in
considered as being evident. Romania. Since the mobile phones are
trying to connect to the tower providing
5. Spoofing a GSM Network the best signal, the IMSI catcher will
always be preferred and the device will
Usually the mobile catcher is placed wrongly presume the network trying to
nearby the location of the phone to be connect to, is a trusted one.
54
Journal of Mobile, Embedded and Distributed Systems, vol. VI, no. 2, 2014
ISSN 2067 – 4074
Now all the traffic (voice, messages, data, Ciphering itself is unaffected by this
etc.) is flowing through the false tower feature, and the user can choose how to
but in an encrypted way, so there is not proceed.”
possible to determine the real meaning of Mobile phones are supposed to include a
the bits without spending some ciphering indicator, as exemplified in [9].
supplementary work. Unfortunately, only a few mobile phones
are giving such indications to the users.
6. Turning off the GSM For Android, such an issue is opened from
2009 [1] and it is still unresolved, being
Encryption labeled as an enhancement. Also, for
Windows Phone devices this is a feature
After a successfully connection to a GSM
request as seen in [10].
tower, since the phone always assumes
According to the GSM11.11 (Specifications
the network is trusted, the base station is
of the SIM-ME Interface) [18], the SIM
actually dictating the settings to the
content is stored in a special file
mobile device, thus the encryption could
hierarchy, as presented in Figure 4.
simply be turned off by telling the phone
Each file (called EF – Elementary File) is
to disable the GSM encryption. Basically,
identified by a number. For the one we
the false base station can instruct the
are interested in (AD), the number is
mobile device to use A5/0 as encryption
0x6FAD. Currently, the EFAD file has only
algorithm meaning no encryption at all
3 bytes defined, as the following [18]:
will take place during the voice and data
1st – operation mode, like normal,
transfer between the mobile handset and
specific activities, maintenance
the base station (real or fake).
(offline), etc.
In such cases, according to the GSM
00 – normal operation;
specifications, the phone normally should
80 – type approval operations;
warn about using an unencrypted
01 – normal operation + specific
connection but the GSM providers
facilities;
consider such a warning as being
81 – type approval operations +
confusing for the users, so the ciphering
specific facilities;
indication is usually disabled directly from
02 – maintenance (off line);
the SIM card settings.
04 – cell test operation;
So it turns easier to force the phone to
2nd – additional information, like
use an unencrypted connection rather
manufacturer specific data;
than spending some processing
3rd – additional information, including
capabilities to decrypt the A5 algorithm.
the Ciphering Indicator on the bit
Finally it seems there is no need to crack
number one (the right side one).
the code since the encryption can be just
The Ciphering Indicator feature is enabled
turned off without the user being noticed
when bit1 of byte1 is set to 1 (meaning
about.
special facilities are on) and the bit1 of
According to the GSM standard ([2]), “[…]
byte3 is also on (the ciphering indicator is
whenever a connection is in place, which
on).
is, or becomes unenciphered, an
indication shall be given to the user.
55
www.jmeds.eu
Master File
(3F00)
Telecom DF
GSM DF (7F20)
(7F10)
EF Administrative
EF SMS (6F3C)
(6FAD)
... ...
56
Journal of Mobile, Embedded and Distributed Systems, vol. VI, no. 2, 2014
ISSN 2067 – 4074
Android restricts the possibility of any be not a very easy task that can only be
application to directly discuss via AT achieved by using a direct connection to
commands with the phone modem: the phone modem that is able to access
“Applications also cannot access AT any SIM card data.
commands, as these are managed When a phone is connected to a Windows
exclusively by the Radio Interface Layer PC, the phone’s modem appears under
(RIL). The RIL provides no high level APIs Device Manager, as pictured in Figure 5.
for these commands.” [15]. To check the modem is working properly,
Without the existence of any API for SIM the Query Modem button of the Properties
card data access (directly or via AT window can be used, as illustrated in
commands), checking and eventually Figure 6.
enabling the ciphering indicator seems to
57
www.jmeds.eu
58
Journal of Mobile, Embedded and Distributed Systems, vol. VI, no. 2, 2014
ISSN 2067 – 4074
References
[1] Android Ciphering Issue, available at:
https://code.google.com/p/android/issues/de
tail?id=5353
[2] The GSM Standard, available at:
http://www.sans.org/reading-
room/whitepapers/telephone/gsm-standard-
an-overview-security-317
[3] K. Paget, Practical Cellphone Spying,
available at:
Figure 9. AT+CRSM command used to override http://www.tombom.co.uk/blog/?p=262
settings [4] Forcing 3G only on Android, available at:
http://siliconstation.com/how-to-force-
Now, since we know how to enable the android-only-3g/
ciphering indicator at the SIM card level, [5] Mobile Country Code, available at:
http://en.wikipedia.org/wiki/Mobile_country_
the next step could be to push Google
code).
(and Microsoft, etc.) to fix the issue in the
[6] U. Meyer, S. Wetze, On the Impact of GSM
next operating system versions. Encryption and Man-In-The-Middle Attacks
on the Security Of Interoperating
8. Conclusions and future work GSM/UMTS Networks, 15th IEEE
International Symposium on Personal,
Turning off the GSM encryption is very possible Indoor and Mobile Radio Communications,
today. In the most cases, such a situation 2004. PIMRC 2004. (Volume: 4), pp. 2876 –
appears without the user being informed about, 2883
simply because such a message is considered [7] C. Toma, Future Developments in Non-
as being too confusing. Repudiation in GSM WAP Applications,
Even if the risks of directly using the AT Journal of Mobile, Embedded and
commands are quite high because wrong Distributed Systems, vol. 1, no. 1, pp. 20-31,
inputs may wipe or brick the phone or the jun. 2009, available at:
SIM card, enabling the ciphering indicator http://www.jmeds.eu/index.php/jmeds/article
has the remarkable advantage of /view/Future-Developments-in-Non-
informing the user each time the Repudiation-in-GSM-WAP-Applications
communication becomes unencrypted, so [8] I. Bosoanca, A. Vargatu, An Overview of
Vertical Handoff Decision Algorithms in
he can take the proper decision about
NGWNs and a new Scheme for Providing
It is not necessary the phone to be rooted
Optimized Performance in Heterogeneous
to be able to use the AT commands to Wireless Networks, Informatica Economică,
directly communicate with the phone vol. 15, no. 1/2011, pp 5-21
modem in order to enable the ciphering [9] I. Androulidakis, D. Pylarinos, G. Kandus,
indicator. Of course a rooted handset Ciphering Indicator approaches and user
allows the direct execution of the AT awareness, Maejo International Journal of
commands from a dedicated application Science and Technology, 2012, 6(03), pp.
running on the phone, so there is no need 514-527
for the PC connection and terminal [10] Ciphering Indicator – Feature Suggestions
application to discuss with the modem. for Windows Phone, available at:
Future work includes deeper researches and the http://windowsphone.uservoice.com/forums/
use and development of dedicated tools in order 101801-feature-
to validate the results. suggestions/suggestions/5825108-
ciphering-indicator
Acknowledgment [11] Centrul de presă Politia Romana –
Comunicat, available at:
Parts of this research have been published
http://www.politiaromana.ro/relatii_publice/d
in the Proceedings of the 7th International
etalii.aspx?id=16556
Conference on Security for Information [12] Security consequences following the
Technology and Communications, SECITC GSM encryption algorithm crack - What is
2014 [17]. the real-world risk from the cracking of the
GSM encryption algorithm?, available at:
59
www.jmeds.eu
60