Hacking 4G USB modems and SIM Card via SMS


A group of experts managed to uncover USB modem vulnerabilities that allow a potential attacker to gain full control of the connected system.

A team of researchers at Positive Technologies conducted a study on how to compromise USB modems and attack SIM cards via SMS over 4G networks at the PacSec and Chaos Computer Club conferences in Tokyo and Hamburg.

The team consisting of Sergey Gordeychik, Alexander Zaitsev, Kirill Nesterov, Alexey Osipov, Timur Yunusov, Dmitry Sklyarov, Gleb Gritsai, Dmitry Kurbatov, Sergey Puzankov and Pavel Novikov.

The experts discovered that 4G USB modems are affected by vulnerabilities that could be exploited by threat actors to gain full control of the machines to which the devices are connected.

The researchers also demonstrated that exploiting the flaws they were able to access subscriber accounts on carrier portals, simply by sending a binary SMS, they are able to lock SIM cards and sniff and decrypt device traffic.

The researchers analyzed six USB modems running 30 separate firmware and discovered that just 10% of the software tested was resilient to the attacks.

“First, we identified the gear. The documentation and search engines helped us with that. In some cases Google was even more useful: it gave us the password for Telnet access. However, for external communications we need http, not Telnet. Just connect the modem to a computer and manage it as a separate network node with web applications. It gives you the opportunity to launch an attack via a browser (CSRF, XSS, RCE). This way you will force the modem to give out a lot of useful information about itself.” states the blog post published by the researchers.


The team used Google to find publicly available telnet access credentials via Google, but they needed http access in order to sniff communications.

The attack technique was very ingenious, once connected the 4g USB modems to their computers, the researchers were able to run several browser-based attacks, including cross-site request forgery, cross-site scripting and remote code execution attacks. The attacks allowed researchers to retrieve several information like the international mobile subscriber identities, the interface types, firmware versions, the universal integrated circuit cards, international mobile station equipment identities and software versions, device names, WI-Fi statuses and more.


In a more scaring attack scenario the researchers installed a bootkit on the targeted device, to do this they installed a USB keyboard driver, which causes the computer to identify the modem as an input device. At this point using a pseudo keyboard to issue the command the attacker were able to reboot the system from an external disk or the from the modem itself. Then they served and installed a bootkit that allows them to remotely control the device as showed in the following video PoC.

[an error occurred while processing this directive]

The experts highlighted the dangerous impact of the vulnerabilities in 4g USB modem on the industrial sector, for example, in all those processes that are using machine-to-machine (M2M) communications. SCADA and ATM are just a few samples of systems that use the technology.

M2M applications are very common in several critical infrastructure installations, including industrial control systems (ICS) and supervisory control and data acquisition (SCADA) systems.

” It is not only the matter of security for trendy smartphones that we use to read news feed in social networks. Multiple critical infrastructures including industrial control systems (SCADA) also implement digital mobile communication based on the GSM standard. Another example from everyday life is having your money stolen from bank accounts. No one would like to become a victim of that. Yet you might have seen small antenna on ATMs. Yes, it is also GSM.” continues the post.

The researchers also run SIM attacks that was slightly less effective, they succeeded to exploit nearly the 20 percent of the 100 SIM cards they used. The success rate depends on the capability to brute-force the data encryption standard (DES) keys protecting the SIMs.

“To brute-force DES keys, we use a set of field-programmable gate arrays (FPGA), which became trendy for Bitcoin mining a couple of years ago and got cheaper after the hype was over,” states the post. “The speed of our 8 modules *ZTEX 1.15y board with the price tag of 2,000 Euro is 245.760 Mcrypt/sec. It is enough to obtain the key within 3 days.”


To run brute-force attack on partially known 3DES key they spent nearly 10 days, once the DES or 3DES is broken, the experts were able to issue commands to toolkit applications (TAR).

“Then we may easily issue commands to well-known TARs and manage them; e.g. Card Manager allows installing a Java application to the SIM.

Another curious TAR is a file system that stores TMSI (Temporary Mobile Subscriber Identity) and Kc (Ciphering Key). We may perform the following actions via a binary SMS:

decrypt subscriber traffic without using brute force attacks on DES,
spoof a subscriber’s identity (receive his/her calls and SMS),
track a subscriber’s whereabouts, cause DOS by entering 3 wrong PIN codes and 10 wrong PUK codes in a row if PIN code is enabled for file system protection.