MacOS Zero-Day Vulnerability Allows Synthetic Mouse-Click Attacks

While the majority of people consider Apple a paradigm of online security, researchers are proving this wrong. Amidst all the exciting reports from the Black Hat USA and Def Con 2018 events, we also received some interesting news regarding Apple vulnerabilities. Initially, we came to know about MDM vulnerability that allowed hacking Macs right out the box. This time, we share another report about a zero-day MacOS vulnerability that allows hackers to infect Macs via ‘synthetic’ mouse-click attacks.

Zero-Day Flaw Allows Hackers Access With Simulated Mouse-Click Attacks

The researcher Patrick Wardle from Digita Security delivered a presentation at DEF CON 2018, revealing a zero-day Apple vulnerability. He explained how a Mac OS flaw lets hackers remotely infect a Mac via synthetic mouse-click attacks. This vulnerability could actually permit the attacker to click a security prompt virtually and load the payload to the infected system.

Wardle discovered this flaw while he was trying to copy and paste some code.

“I was just kind of goofing around with this feature. I copied and pasted the code for a synthetic mouse down twice accidentally – forgetting to change a value of a flag that would indicate a mouse “up” event. Without realizing my ‘mistake,’ I compiled and ran the code, and honestly was rather surprised when it generated an allowed synthetic click!”

After the possibility of synthetic mouse-click attacks was made known, Apple patched the flaw by adding security prompts in UI. Macs now ask permission from the users prior allowing any apps to run. This way, Macs prevent malware and malicious apps from running automatically on the system.

Synthetic clicks are allowed by Mac OS for some programs such as AppleScript, Wardle said that the Mac OS also allows synthetic clicks on prompts seeking permission to access calendar, contacts, location recording, and network identification. It is because of the vulnerability in Mac OS that reads two consecutive mouse “down” events as a manual approval with a “down” and “up”.

“For some unknown reason the two synthetic mouse ‘down’ events confuse the system and the OS sees it as a legitimate click. This fully breaks a foundational security mechanism of High Sierra.”

Mac OS Will Ditch Synthetic Clicks In ‘Mojave’

According to Wardle, the vulnerability (CVE-2017-7150) affected all latest Mac OS versions that allowed code interaction with UI components. Although Apple released a patch by introducing ‘User Assisted Kernel Extension Loading (Kext)’, Wardle calls it “incomplete”. The newly discovered zero-day vulnerability could easily bypass Kext owing to Mac’s incorrect interpretation of clicks.

“Armed with the bug, it was trivial to programmatically bypass Apple’s touted ‘User-Approved Kext’ security feature, dump all passwords from the keychain, bypass 3rd-party security tools, and much more! And as Apple’s patch was incomplete (surprise surprise) we’ll drop a 0day that (still) allows unprivileged code to post synthetic events and bypass various security mechanisms on a fully patched macOS box.”

Considering the dangers associated with this trivial yet harmful bug, Wardle states that Apple will entirely ditch the flawed feature. The upcoming version of Mac OS ‘Mojave’ will block all synthetic events. Although it will cause a problem for  legitimate apps, an added burden on the users with frequent security prompts. However, it may certainly help alleviate such vulnerabilities welcoming malware attacks.

Let us know your thoughts in the comments section.

Related posts

Invision Community Vulnerabilities Risk E-Commerce Websites

Microsoft April Patch Tuesday Fixes Dozens of RCE Flaws

Match Systems publishes report on the consequences of CBDC implementation, led by CEO Andrei Kutin