One Sms To Root Them All
One Sms To Root Them All
FW extraction FW security
analysis
3
3
I. Introduction
II. FW extraction
V. Conclusions
Our Team
Alexander Kozlov
@madprogrammer
Areas of application
Previous Research
What a modem is about?
Application types Code privileges
• Firmware (FW)
• Application (App) • Manufacturer
• Java Remote Control (JRC) • User signed / unsigned
• Service LWM2M Agent (SLAE)
Security Assumptions:MIDlets
Confidentiality Integrity
• it is impossible to determine
the path to where MIDlets are • digital signature
stored
• it is impossible to bypass the
restrictions preventing reading
of files with .jar extension
Security Assumptions: FW
Confidentiality Integrity
I. Introduction
II. FW extraction
V. Conclusions
HW Analysis
HW Analysis
DO NOT USE?
REALLY?
Our own PCB
• LGA re-soldering
• AT console
JTAG
• IDCODE: 0x101E3083
• No information about
architecture
• No crypto
• Linear structure
UFS Reconstruction
• Only few blocks have data
• Found blocks with UFS
and modem FW
FS Reconstruction
22
22
I. Introduction
II. FW extraction
V. Conclusions
MIDlets and Modem FS
• Java ME (Micro Edition) Files from UFS:
• JAR file with Java code • Deleted after installation
• JAD file with settings • Copied to hidden place
MIDlets and Modem FS
Hidden FS: 4 files
• .ss – MIDlet permissions
• .ii - service information
• .ap - JAD
• .jar – MIDlet Java code
Hidden FS: 4 files
• .ss – MIDlet permissions
• .ii - service information
• .ap - JAD
• .jar – MIDlet Java code
• Connector.open("file:///root:/PATH")
I. Introduction
II. FW extraction
V. Conclusions
AT Commands
AT Commands
• User console is enough • Vendor AT-commands
• …and a descriptor
AT Commands
Vendor-specific AT Commands
• In release FW!
Vendor-specific AT Commands
• And waited…
AT command heap overflow
• Static buffer size
• No checks about
coherence
150 Mb/s
1,5 Mb/s
0,88 b/s
Read Primitive
SUPL Heap Overflow: write primitive
• Heap structure is too
primitive
• ….write memory
• So much unmapped
physical memory!
Modem OTAP
• Not activated by default
I. Introduction
II. FW extraction
V. Conclusions
Mitigation guidelines
• Need FW cryptography
• No flat memory model
• OTAP needs verification
• Only telecommunication
operator can help with a working
mitigation
Resulting CVE list
CVE ID CVSS Score Description
CVE-2023-47610 8.1 (High) CWE-120: Buffer Copy without Checking Size of Input
CVE-2023-47611 7.8 (High) CWE-269: Improper Privilege Management
CVE-2023-47612 6.8 (Medium) CWE-552: Files or Directories Accessible to External Parties
CVE-2023-47613 4.4 (Medium) CWE-23: Relative Path Traversal
CVE-2023-47614 3.3 (Low) CWE-200: Exposure of Sensitive Information to an
Unauthorized Actor
CVE-2023-47615 3.3 (Low) CWE-526: Exposure of Sensitive Information Through
Environmental Variables
Questions?
Sergey Anufrienko
[email protected]