Masque Attack – every iOS app could be compromised

Researchers at FireEye identified a new attack dubbed the Masque, which allows attackers to replace a genuine app with a malicious one.

In these days Apple the community has discovered that is vulnerable to WireLurker, a new strain of malware that is able to infect Apple iPhone and iPad syphoning user’data.

The malware was discovered for the first time by experts at Palo Alto Networks that revealed it exhibited behavior that had never been seen before malware targeting Apple mobile devices, unfortunately, it has yet to be patched.

Meanwhile the security experts analyze the WireLurker case, the disclosure of a new attack in the wild exploiting a vulnerability dubbed the Masque is attracting the interest of the experts. Practically the exploitation of the Masque flaw allows bad actors to replace enterprise-signed apps, overwriting them with trojanized apps.

The Masque  vulnerability allows an attacker to swap out a legitimate iOS app with a malicious one, the attack scheme is effective against jailbroken and non-jailbroken devices.

Masque affects iOS 7.1.1, 7.1.2, 8.0, 8.1, and 8.1.1 beta, its attack schema is quite different from WireLurker that infects Apple mobile devices once connected via USB, but it can also be run remotely via an SMS or email message pointing a victim toward a malicious app.

Also in this case the problem seems to be caused by a poor implementation of an authentication process, the expert Tao Wei, a senior staff research scientist at FireEye, explained that Apple’s enterprise provisioning feature does not analyze digital certificates for apps given identical bundle identifiers.

The Enterprise provisioning service implemented by Apple allows enterprise iOS developers to develop and distribute iOS apps without having to upload the app to Apple.

“FireEye mobile security researchers have discovered that an iOS app installed using enterprise/ad-hoc provisioning could replace another genuine app installed through the App Store, as long as both apps used the same bundle identifier.”

“This vulnerability exists because iOS doesn’t enforce matching certificates for apps with the same bundle identifier,” Tao Wei said on the company’s blog post. “An attacker can leverage this vulnerability both through wireless networks and USB.” “iOS doesn’t check certificates during updating,” “Attackers can replace the old app with a fake app.” “Currently there is not MDM API to get the certificate information for each app,” Wei said. “Thus, it is difficult for the MDM to detect such attacks.”

Wei speaking about the WireLurker, explained that it is the unique case of attack up until now observed that is exploiting the Masque vulnerability. Let’s remind that the WireLurker malware in a first stage infects a host (desktop or laptop), which downloaded the malicious software from the web, then it waits for an Apple device (i.e. iPhone or iPad) to be connected via USB.

Once the Apple device is connected to the infected PC, WireLurker scans it analyzing the installed applications, then if a target app is present, it copies the app from the mobile device to the host, infects it and then install it again on the mobile unit.

The blog post published by FireEye also includes a demonstration of an attack, the experts have exploited the Masque replacing a valid Gmail app downloaded from the Apple App Store with a malicious version of the same app that is able to syphon the user’ messages. The attack starts with an SMS sent to the victims that invite it to download a new version of a legitimate app New Flappy Bird.

“In one of our experiments, we used an in-house app with a bundle identifier “com.google.Gmail” with a title “New Flappy Bird”. We signed this app using an enterprise certificate. When we installed this app from a website, it replaced the original Gmail app on the phone.” states the post. “By using the Masque attack, attackers can get all your existing sensitive data on your iPhone,” Wei added.

 

 

The attack is very dangerous, a bad actor would be able to mimic the original app to steal user’s credentials, the risk is serious if we think the possibility to compromise also signed banking apps. Experts at FireEye also explained that user’s data stored in the legitimate app’s directory, including local data caches, could be accessed by the malware.

“Masque Attacks can replace authentic apps,such as banking and email apps, using attacker’s malware through the Internet. That means the attacker can steal user’s banking credentials by replacing an authentic banking app with an malware that has identical UI. Surprisingly, the malware can even access the original app’s local data, which wasn’t removed when the original app was replaced. These data may contain cached emails, or even login-tokens which the malware can use to log into the user’s account directly.”

The principal problem for the security community is related to the simplicity in the exploitation of the Masque vulnerability.

 “It is a very powerful [vulnerability], but at the same time, it is very easy to exploit,” Wei said. “It can make the enterprise provisioning attack more powerful and more coverage over the victim. It’s easy to exploit and that’s why we are so concerned and why we think users should be warned.”

In order to avoid falling victim of a Masque Attack, it is suggested to adopt simply practices:
  • Do not download mobile apps clicking on a link received via email, text messages, or present on a web page.
  • Don’t install apps offered on pop-ups from third-party websites.
  • If the mobile device displays an alert about an “Untrusted App Developer,” click “Don’t Trust” on the alert and uninstall the application.

Pierluigi Paganini

(Security Affairs –  Masque, mobile)

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

Cryptocurrencies and cybercrime: A critical intermingling

As cryptocurrencies have grown in popularity, there has also been growing concern about cybercrime involvement…

22 mins ago

Kaiser Permanente data breach may have impacted 13.4 million patients

Healthcare service provider Kaiser Permanente disclosed a security breach that may impact 13.4 million individuals…

43 mins ago

Over 1,400 CrushFTP internet-facing servers vulnerable to CVE-2024-4040 bug

Over 1,400 CrushFTP internet-facing servers are vulnerable to attacks exploiting recently disclosed CVE-2024-4040 vulnerability. Over…

3 hours ago

Sweden’s liquor supply severely impacted by ransomware attack on logistics company

A ransomware attack on a Swedish logistics company Skanlog severely impacted the country's liquor supply. …

5 hours ago

CISA adds Cisco ASA and FTD and CrushFTP VFS flaws to its Known Exploited Vulnerabilities catalog

CISA adds Cisco ASA and FTD and CrushFTP VFS vulnerabilities to its Known Exploited Vulnerabilities…

16 hours ago

CISA adds Microsoft Windows Print Spooler flaw to its Known Exploited Vulnerabilities catalog

U.S. CISA added the Windows Print Spooler flaw CVE-2022-38028 to its Known Exploited Vulnerabilities catalog.…

23 hours ago

This website uses cookies.