Security experts at Carbon Black have recently discovered a new strain of the Shlayer malware that targets macOS versions.

Security experts at Carbon Black have recently spotted a new strain of the Shlayer malware that targets MacOS versions from 10.10.5 up to 10.14.3.

The malware poses as an Adobe Flash update it was distributed through a large number of websites, fake or compromised legitimate domains.

“AU has obtained new samples of this malware and observed downloads of the malware from multiple sites, primarily disguised as an Adobe Flash software update.” reads the analysis published by Carbon Black.

“Many of the sites that we have found to redirect to these fake updates have been those masquerading as legitimate sites, or hijacked domains formerly hosting legitimate sites, and some appear to be redirected from malvertisements on legitimate sites.”

This variant of the Shlayer malware employs multiple levels of obfuscation, experts discovered that many of the initial DMGs are signed with a legitimate Apple developer ID.

The malware uses legitimate system applications via bash to conduct all installation activity.

Once the installer is launched, a . command script is executed from a hidden directory in the mounted volume. The script in base64 is decoded and AES decrypted revealing a second script that contains another encoded script that is subsequently executed.



The first stage malware gathers system information, including macOS version and UUID, generates a “Session GUID” using uuidgen , creates a custom URL using the harvested data, and then downloads the second stage payload.

The malicious script attempts to download the password-protected ZIP file using curl, and creates a directory in / tmp to store the ZIP file and unzip it.

The script also makes the binary within the unzipped .app executable using chmod +x, then it runs the payload using specific arguments, and then performs a killall Terminal to kill the running script’s terminal window.

The second stage malware attempts to escalate privileges with sudo using a technique invoking / usr / libexec /security_authtrampoline.

“After the second stage payload is downloaded and executed, it attempts to escalate privileges with sudo using a technique invoking / usr / libexec /security_authtrampoline as discussed in Patrick Wardle’s DEFCON 2017 talk “Death by 1000 Installers”.” continues the analysis.

“Once the malware has elevated to root privileges, it attempts to download additional software (observed to be adware in the analyzed samples) and disables Gatekeeper for the downloaded software using spctl .”

With this technique it is possible to run whitelisted software without user intervention even if the system is set to disallow unknown applications downloaded from the internet.

Carbon Black’s analysis includes Indicators of Compromise.

Pierluigi Paganini