Attack Surface and Security Implications of eSIM Technology

Markus Vervier (X41 D-Sec)

BruCON 0x0F · Day 1

Overview

In an increasingly interconnected world, embedded SIM (eSIM) technology has rapidly become a standard feature in modern mobile devices, wearables, and IoT gadgets. This talk, delivered by Markus Vervier at BruCON, delves into the often-overlooked security implications and burgeoning attack surface presented by eSIMs. Vervier, a seasoned security generalist, provides a comprehensive analysis, moving beyond the traditional understanding of SIM card security to explore how the remote provisioning and management capabilities of eSIMs introduce novel vectors for offensive operations and present unique challenges for defenders.

Watch on YouTube

Visual summary for Attack Surface and Security Implications of eSIM Technology by Markus Vervier
Visual summary for Attack Surface and Security Implications of eSIM Technology by Markus Vervier

Key moments

  1. 0:45 Motivation: eSIM for offensive operations
  2. 4:00 eSIM basics: Profiles, provisioning, security concerns
  3. 10:00 Windows Mobile Plans app webview vulnerability
  4. 18:15 Deploying custom test eSIM profiles for research
  5. 28:30 eSIM apps bypass mobile OS security controls
  6. 34:20 Live demo: eSIM phishing dialog on iOS
  7. 36:00 SMS Shell: Practical out-of-band C2 via eSIM
  8. 39:00 Advanced eSIM implants: Undumpable C2 logic, forensics challenges

Attack Surface and Security Implications of eSIM Technology

Speakers: Markus Vervier, Offensive (Belgium), X41 (Germany)

Conference: BruCON

YouTube: https://www.youtube.com/watch?v=O3OIT1efNRY

Overview

In an increasingly interconnected world, embedded SIM (eSIM) technology has rapidly become a standard feature in modern mobile devices, wearables, and IoT gadgets. This talk, delivered by Markus Vervier at BruCON, delves into the often-overlooked security implications and burgeoning attack surface presented by eSIMs. Vervier, a seasoned security generalist, provides a comprehensive analysis, moving beyond the traditional understanding of SIM card security to explore how the remote provisioning and management capabilities of eSIMs introduce novel vectors for offensive operations and present unique challenges for defenders.

The presentation originates from an internal discussion about red team tooling and the perpetual quest for out-of-band command and control (C2) channels. Recognizing the inherent standalone communication capabilities of eSIMs – leveraging SMS and mobile data connections independent of the primary device's network – Vervier embarked on a deep dive into the technology. His research uncovers not only design complexities but also practical vulnerabilities in implementations and highlights how adversaries could exploit eSIMs for covert communication, persistent access, and sophisticated phishing attacks, fundamentally altering the threat landscape for mobile and connected devices.

This article dissects Vervier's findings, exploring the technical underpinnings of eSIMs, the specific vulnerabilities identified, the proof-of-concept demonstrations, and the critical defensive measures necessary to mitigate these emerging threats. The talk serves as a vital call to action for security researchers and practitioners to expand their focus to this rapidly evolving and largely unexamined facet of modern communication infrastructure.

Background

▶ Watch: Motivation: eSIM for offensive operations (0:45)

For the past three decades, the Subscriber Identity Module (SIM) card has been a ubiquitous piece of hardware in mobile phones, serving as a tamper-resistant module holding secret keys essential for mobile network authentication and data integrity. The advent of the eUICC (embedded Universal Integrated Circuit Card), commonly known as eSIM, represents a significant evolution of this technology. Unlike its physical predecessor, an eSIM is typically soldered directly onto the device's mainboard, capable of holding multiple SIM profiles. Each profile acts as a virtualized version of a classic SIM, allowing users to dynamically switch network carriers without physically swapping cards. This flexibility extends to smaller devices like watches and IoT sensors, where physical SIM slots are impractical.

While eSIMs address many logistical challenges, they introduce new security concerns, augmenting the traditional needs to prevent fraud, cloning, and unauthorized access, with the critical requirement to secure the provisioning of these virtual SIM cards. The complexity of this remote provisioning process forms the crux of the new attack surface. Vervier distinguishes between consumer versions, which allow users to sign up with different carriers, and machine-to-machine (M2M) or IoT versions, which are more tightly controlled by a single entity.

Vervier's interest in virtualized SIM technology is not new; he previously presented "Shadow SIM" at BruCON 2015, a project that involved patching a baseband to virtualize a SIM card and proxy it over a network connection. This prior experience provided a foundational understanding of SIM internals, which proved invaluable in his current research into eSIMs. The motivation for this research was driven by the desire for advanced red team tooling, specifically an out-of-band C2 channel that could bypass traditional network monitoring and endpoint detection and response (EDR) solutions. The ease of eSIM deployment – often a simple QR code scan – immediately struck Vervier as a potentially useful mechanism for offensive operations, prompting his deep dive into its permissions, implementation, and overall attack surface.

Key Findings

▶ Watch: Windows Mobile Plans app webview vulnerability (10:00)

Markus Vervier's research into eSIM technology unveiled several critical findings that collectively highlight a significant, under-researched attack surface, despite the robust design of the eUICC itself.

Firstly, a notable vulnerability was identified not within the core eSIM specification, but in its implementation on common platforms. Specifically, the Windows Mobile Plans app (or "One Connect" previously), pre-installed on Windows 10 and 11, facilitates eSIM management. This application, leveraging a web view to render content from predefined, allowed operator websites, was found to be susceptible to attacks. As it loads content directly from these operator sites, any vulnerability on one of these 20+ partner sites could lead to cross-site scripting (XSS), phishing, or even remote code execution (RCE). Critically, a user interacting with this app perceives it as a trusted system component, making it an ideal target for sophisticated phishing attacks, where an attacker could inject content or present a reverse proxy to steal credentials.

Secondly, despite the impressive security architecture of eSIM provisioning, which includes end-to-end encrypted communication between the SM-DP+ (Subscription Manager Data Preparation) server and the eUICC, Vervier discovered a critical bypass for researchers and attackers: the ability to deploy test profiles. While deploying a production eSIM profile with custom applications is costly and requires GSMA certification, acquiring a test profile is significantly cheaper and more accessible. The crucial aspect of these test profiles is that their OTA (Over-The-Air) management keys and admin keys are known (e.g., often simple default values like 112233 or 0001). This knowledge fundamentally alters the threat model, enabling an attacker to install custom Java applets onto a production eUICC, even on devices like iPhones or Android phones.

This capability led to a third major finding: the potent phishing potential of SIM Toolkit (STK) applets. By deploying a custom applet via a test profile, Vervier demonstrated how the SIM card could issue commands to the mobile device. This was showcased on an iOS 16.1.3 iPhone, where a SIM applet presented a dialogue box overlaying the lock screen, prompting the user to "enter your passcode." This dialogue, appearing to be a system prompt, actually captured user input directly to the SIM card. The critical aspect is that these SIM-generated dialogues have priority over all other system dialogues, making them exceptionally effective for credential harvesting and difficult for users to distinguish as malicious.

Fourthly, the research demonstrated the feasibility of using eSIM as an out-of-band C2 channel. Vervier and his colleague, Nicholas, developed a tool called SMS Shell, a proof-of-concept that uses the eSIM's mobile connectivity to send and receive commands encoded over SMS. This allows an attacker with temporary code execution on a target system (e.g., in a red team scenario where the network might be pulled) to maintain persistent communication even without standard internet access. The slow but reliable nature of SMS-based C2 provides a resilient communication channel that bypasses traditional network monitoring and EDRs.

Finally, Vervier hinted at the potential for forensically resistant implants resident on the eUICC itself. Since the eUICC functions as a type of Hardware Security Module (HSM), applications installed on it are extremely difficult to dump or analyze without the vendor's specific card management keys. By deploying malicious business logic as an encrypted applet on an eSIM profile, an attacker could create an implant that performs AES encryption on the card, making observed host-system traffic undecipherable and rendering forensic analysis significantly harder. This represents a significant challenge for incident response teams.

Technical Deep Dive

▶ Watch: eSIM apps bypass mobile OS security controls (28:30)

The technical foundation of eSIM lies in the eUICC, which is essentially a specialized smart card. Its internal architecture comprises an operating system and several trust domains or security domains. Crucially, individual SIM profiles are housed within ISDPs (Issuer Security Domain Profiles), which are designed to be isolated from each other. Additionally, there are specialized security domains responsible for holding the secret keys used to provision the eUICC itself, capable of secure, end-to-end encrypted communication with external backends.

The provisioning of eSIMs is a complex, multi-faceted process governed by hundreds of pages of GSMA specifications. Multiple methods exist for provisioning:

  1. Operator Download Server: The device can pull profiles from an operator's server.
  2. Auto-deployment: Based on the EID (eUICC ID), a unique identifier for the eUICC hardware.
  3. User Activation: Users can receive an activation code or scan a QR code (which contains an activation code pointing to the profile location).
  4. Programmatic Installation: Applications, such as the Windows Mobile Plans app, can install or manage eSIM profiles.

A central component of this provisioning architecture is the SM-DP+ (Subscription Manager Data Preparation) server. This server, certified by the GSMA, is responsible for remotely managing SIM profiles on the local eUICC. Communication between the SM-DP+ and the eUICC is secured via end-to-end encrypted MTLS (Mutual Transport Layer Security), leveraging GSMA-signed certificates. Beyond TLS, an additional layer of encryption protects the actual payload, meaning profiles remain encrypted even if the TLS channel is compromised. This dual-layer security, employing proper algorithms like AES and Triple DES (replacing older DES for OTA keys), makes direct interception and decryption of production profiles extremely challenging for researchers and attackers.

eSIM profiles themselves are defined using ASN.1 (Abstract Syntax Notation One), encompassing a header, a body, and the potential to contain Java applets and secret keys. The eUICC's Java runtime environment allows for the execution of these applets, which are packaged as instances within the card. These applets can interact with the mobile device via APIs such as SIM Toolkit (STK) and USAT (Universal Subscriber Identity Module Application Toolkit). Commands issued by these applets can include display text, refresh, profile download complete, and historically, launch browser (though this functionality is often restricted on modern mobile OS versions for security reasons).

The communication between the SIM applet and the mobile device is not a push model; the SIM card cannot arbitrarily send commands to the device. Instead, the mobile device must "pull" commands from the SIM. The SIM responds to device queries with special responses indicating that further commands are available, making the communication inherently slower and more fragmented. This mechanism, while designed for security, can be exploited for fuzzing mobile device implementations by sending random commands.

Applet provisioning on the card can occur through several standards: GSMA Remote Provisioning, Global Platform, proprietary messages from cloud vendors, or via SMS (SMS PP). The Global Platform standard defines specific keys – key, key MAC, key DEC – used for applet management. The ability to install custom applets relies on having control over these keys, which is precisely what the "test profile" approach enables. By using a test profile with known default keys (e.g., 0001 or 112233), an attacker can bypass the complex certification and encryption requirements of production profiles and deploy custom Java applets onto the eUICC. These applets, once installed, run in a segregated environment, outside the direct control of the device's operating system (e.g., Android or iOS), presenting a new avenue for persistent and covert operations.

Demo / Proof of Concept

▶ Watch: Live demo: eSIM phishing dialog on iOS (34:20)

Vervier's presentation included several compelling demonstrations that illustrated the practical implications of his findings.

The first demo showcased the vulnerability in the Windows Mobile Plans app on Windows 10/11. He navigated to the cellular settings, opened the pre-installed "Mobile plans" app, and clicked "get connectivity." This action launched a web view that loaded content from an operator's website. Vervier explained that if an attacker could compromise one of the allowed operator sites or perform a Man-in-the-Middle (MITM) attack, they could inject malicious content. He simulated a phishing scenario, demonstrating how an attacker could present a fake login page or even attempt to launch arbitrary applications, leveraging the user's inherent trust in a "system" application. This highlights an attack surface not directly on eSIM but on its integrated management tools.

The core of his offensive capabilities demonstration revolved around deploying a custom test profile. Vervier explained how he paid a backend provider to gain the ability to generate a test profile with a specific activation code. This code, when entered into the Windows network settings, allowed the device to contact an SM-DP+ server and install the custom profile. The critical aspect here is that these test profiles come with known OTA management keys (e.g., 112233 or 0001).

With a test profile installed and its keys known, Vervier then demonstrated deploying custom Java applets to the eUICC. He used a proprietary tool from SIM Alliance (which he noted seems to be deliberately harder to find nowadays) to directly communicate with the SIM card via its known keys. He showcased the deployment of a simple "hello world" applet, emphasizing that this process could also occur over SMS if the attacker could send messages to the victim's device. This capability is significant because it allows an attacker to run custom code on the secure element of the phone, independent of the main operating system.

A particularly impactful demo involved an iPhone running iOS 16.1.3 and a SIM Toolkit phishing dialogue. Vervier showed a locked iPhone screen where a dialogue box abruptly appeared, prompting the user to "enter your passcode." This was not a standard iOS system dialogue but an overlay generated by a malicious SIM applet. The dialogue had priority over all other UI elements, making it highly effective for tricking users into revealing sensitive information. Vervier even mentioned that such a malicious profile could render a phone unusable by continuously displaying these inescapable dialogues.

Finally, Vervier presented the SMS Shell proof-of-concept, developed with his colleague Nicholas. This tool exemplifies the use of eSIM as an out-of-band C2 channel. In a scenario where a target machine (e.g., in a red team engagement or ransomware attack) has compromised code execution but its internet connection is severed, an agent running on the system can leverage the eSIM's mobile data or SMS capabilities. The demo showed a machine without internet access receiving commands (e.g., whoami) encoded as SMS messages from a C2 controller, and sending back responses, also via SMS. While slow, this method provides a robust and stealthy communication channel, as evidenced by Mobile Vikings detecting unusual SMS traffic patterns from their test SIM cards. This POC highlights the potential for creating implants that are resilient to network isolation and difficult for EDRs to monitor.

Defensive Implications

▶ Watch: Advanced eSIM implants: Undumpable C2 logic, forensics challenges (39:00)

The insights gleaned from Markus Vervier's research into eSIM technology necessitate a re-evaluation of current defensive strategies. The expanded attack surface and novel offensive capabilities demand proactive measures from security teams.

Firstly, monitoring of eSIM activity must become a priority. Traditional EDR solutions are primarily focused on host-based processes and network traffic originating from the main operating system. eSIM-based communication, especially SMS or specialized mobile data channels, can bypass these controls. Defenders should look for unusual spikes in SMS traffic from corporate devices, unexpected eSIM profile activations, or connections to unknown mobile networks. Network operators also have a role in identifying anomalous traffic patterns, as demonstrated by Mobile Vikings detecting the SMS Shell activity.

Secondly, organizations, particularly those managing large fleets of mobile devices, should strive for greater control over eSIM provisioning. While individual consumers may have limited options, large enterprises should engage with mobile carriers and device vendors to understand and potentially manage the security domains of their eUICC fleet. This could involve ensuring that only trusted SM-DP+ servers are allowed to provision profiles or restricting the types of profiles that can be installed on corporate devices.

Thirdly, the vulnerability identified in the Windows Mobile Plans app underscores the importance of securing all components of the eSIM ecosystem, not just the eUICC itself. Organizations must ensure that all associated applications and operator websites are regularly patched and rigorously audited for vulnerabilities like XSS. Implementing strong network defenses, such as DNS filtering and web proxies, can help mitigate the risk of users inadvertently accessing compromised operator sites or falling victim to MITM attacks. User education is also paramount, teaching users to be wary of unexpected prompts within what appear to be system applications.

Fourthly, the potent phishing capabilities of SIM Toolkit applets demand enhanced user awareness. Users need to be educated that dialogues, even those appearing as high-priority system prompts (like "enter your passcode"), can originate from the SIM card. They should be trained to verify the legitimacy of such prompts, potentially by attempting to cancel them or by force-restarting their device if a dialogue cannot be dismissed. Device manufacturers should also consider implementing clearer visual cues to distinguish SIM-originated dialogues from genuine system prompts, or restricting their ability to override critical system UI elements.

Finally, the concept of eSIM as a platform for forensically resistant implants presents a significant challenge for incident response. If malicious code resides on the eUICC, traditional forensic techniques may be insufficient to analyze its capabilities or extract crucial evidence. Defenders need to recognize that the eUICC functions as a type of Hardware Security Module (HSM), making its contents difficult to dump without specialized tools or vendor cooperation. This implies a need for deeper collaboration with device manufacturers and mobile operators in the event of a compromise to gain access to relevant logging or diagnostic capabilities. The dual-use nature of eSIM – capable of robust security (e.g., on-card encryption) but also powerful offensive capabilities – means defenders must understand both its strengths and weaknesses to mount effective defenses.

Key Takeaways

  • eSIM introduces a vast, under-researched attack surface: Beyond the physical SIM, the remote provisioning and complex software stack of eSIMs present new vectors for exploitation in modern devices.
  • Test profiles with known keys are a critical enabler for attackers: Despite robust eUICC security design, the accessibility and known default keys of test profiles fundamentally change the threat model, allowing custom applet deployment.
  • SIM Toolkit applets enable potent phishing attacks: eSIMs can generate high-priority dialogues that overlay and mimic system prompts (e.g., "enter your passcode"), making them highly effective for credential harvesting and device disruption.
  • eSIMs provide a resilient out-of-band C2 channel: Leveraging SMS or mobile data, eSIMs can facilitate covert command and control, bypassing traditional network monitoring and EDRs, even when primary network connectivity is severed.
  • Implementations around eSIMs introduce vulnerabilities: The Windows Mobile Plans app, using web views from operator sites, exemplifies how peripheral software can create significant attack surfaces, even if the core eSIM technology is secure.
  • Defenders must adapt monitoring and user education: Organizations need to expand their security monitoring to include eSIM activity and educate users about new phishing vectors originating from the SIM card to counter these emerging threats.

About the Speaker(s)

Markus Vervier describes himself as a security generalist, possessing a broad interest in various security topics ranging from high-level architectural concerns to low-level exploitation. He is responsible for managing two security companies: Offensive, based in Belgium, and X41, located in Germany. While his primary roles involve management and code review, he remains actively engaged in security research, which led to this presentation on eSIM technology. Vervier is no stranger to the BruCON stage, having delivered his first talk at the conference eight years prior (in 2015), where he presented on "Shadow SIM," a project involving the virtualization of SIM cards.

Reviews

  • Heather Calloway (CISO) — MUST SEE ★★★★★

→ Top-rated talks at BruCON 0x0F

All talks from BruCON 0x0F