Skip to main content
Mallory
Malware3 associated actors1 associated CVE

Shlayer

Tracked since Nov 25, 2025 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
Vulns1Associated
Actors3Associated
ATT&CK34Techniques
IOCs33Tracked
Type
Downloader
Capabilities
Initial accessDefense evasionReconnaissancePersistence
Delivery
MalvertisingFake updateLanding pageLureCracked software
Platforms
macOS

Shlayer is a macOS trojan downloader first identified in February 2018. It primarily provides first-stage infection by downloading, unpacking, and executing additional payloads, especially adware families including Bundlore, Cimpli, Pirrit, and AdLoad. Shlayer has also delivered Tarmac. Its campaigns are predominantly associated with advertising fraud; downstream adware injects advertisements, manipulates browser searches, and redirects traffic.

Distribution relies heavily on malvertising, malicious websites, hijacked or expired domains, and fraudulent software-update pages, historically impersonating Adobe Flash Player. Affiliate networks distribute malicious links through websites, video descriptions, and references on legitimate services. Entertainment-themed lures and cracked-software sites also facilitate distribution. VeryMal and Yosec are established malvertising operators associated with Shlayer delivery. Infections affect macOS users broadly, including U.S. K–12 educational institutions.

Variants use Bash, Zsh, Python, or Mach-O executables, commonly packaged in disk images. Shlayer collects system identifiers and the operating-system version, retrieves secondary payloads, makes them executable, and launches them using native macOS utilities. Observed implementations obscure scripts and configuration through encryption and layered obfuscation; the Shlayer.F variant conceals AES-encrypted configuration within a modified disk-image structure. Some variants remove downloaded archives and staging artifacts after execution. Shlayer has used Launch Item persistence and techniques that bypass macOS execution protections, including exploitation of the Gatekeeper bypass CVE-2021-30657. Malicious Shlayer code also obtained Apple notarization in 2020, enabling execution under default Gatekeeper settings.

Is this in your environment?See whether this family's indicators match your telemetry and which of your assets are exposed to the CVEs associated with it.
Check your exposure
Associated CVEs

Associated vulnerabilities

1 CVE Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.

CVE-2021-30657via the record mediaExploited in the wildmacOS Gatekeeper Bypass in syspolicydCVE-2021-30657 April 26 macOS Gatekeeper bypass abused by Shlayer malwareView vulnerability →Source ↗
Threat actors

Associated threat actors

3 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.

View more details →
Lazarus

Feb 2020 Campaign: 모래종이(Sandpaper) ... Observed commodity malware: Shlayer and Mirai bot.

via cyfirma blogcyfirma.com
VeryMal

The bad actor is known for running large scale fake Flash update campaigns that are hosted on .icu domains by way of display ad auto-redirects: VeryMal Fake Flash Update — Shlayer Trojan

via confiant blogblog.confiant.com
YoSec

Yosec — ... They are a major source of distribution for the notorious Shlayer trojan: OSX/Shlayer ...

via confiant blogblog.confiant.com
MITRE ATT&CK

Techniques & procedures

34 distinct techniques documented for this family, organized by ATT&CK tactic.

Resource Development

2 techniques
T1583Acquire InfrastructureEvidence5

In March 2022, Malvertisement accounted for the greatest number of alerts. Malvertisement remains the top initial infection vector due to Shlayer activity.

T1587.001MalwareEvidence1

By leveraging on commodity malware, they are attempting to operate under the cloak of anonymity to avoid being identified as state-sponsored hacker groups.

Initial Access

2 techniques
T1189Drive-by CompromiseEvidence6

It is primarily distributed through malicious websites, hijacked domains, and malicious advertising posing as a fake Adobe Flash updater.

T1566.002Spearphishing LinkEvidence2

Instructs the recipient to visit a website that is compromised by the cyber actor

Execution

6 techniques
T1059Command and Scripting InterpreterEvidence2

Note the decrypted string that corresponds to commands, OSX/Shlayer.F executes them via popen() function.

T1059.004Unix ShellEvidence2

The malicious shell scripts used by Shlayer and Bundlore are usually malvertising-focused adware bundlers using shell scripts in the kill chain to download and install an adware payload.

T1059.006PythonEvidence2

The most recent Shlayer variant is Trojan-Downloader.OSX.Shlayer.e... written in Python rather than Bash... the seemingly standard installer turns out to be a Python script.

T1106Native APIEvidence1

After unpacking the archive, the main Python script uses the chmod tool to assign the file 84cd5bba3870 permission to run in the system. After that, the trojan runs the downloaded and unpacked application package using the built-in open tool.

T1204User ExecutionEvidence7

Shlayer is a downloader and dropper for MacOS malware. It is primarily distributed through malicious websites, hijacked domains, and malvertizing posing as a fake Adobe Flash updater.

T1204.002Malicious FileEvidence1

В терминологии MITRE ATT&CK задействованы User Execution: Malicious File (T1204.002, Execution ...).

Privilege Escalation

1 technique
T1548.002Bypass User Account ControlEvidence1

CVE-2021-30657 April 26 macOS Gatekeeper bypass abused by Shlayer malware

Stealth

9 techniques
T1027Obfuscated Files or InformationEvidence5

The bash script in these variants decrypt the next stage encrypted blobs containing the next stage bash scripts using openssl with base64, Advanced Encryption Standard (AES), CBC (Cipher Block Chaining) to thwart security scanners.

T1027.003SteganographyEvidence1

That’s exactly what we saw with VeryMal’s offensive steganography and what we’re continuing to see with this use of harmless looking Firestore code.

T1036MasqueradingEvidence5

Shlayer is a trojan downloader, which spreads via fake applications that hide its malicious code... Cimpli masquerades as a useful Mac utility (i.e., “Any Search”).

T1070Indicator RemovalEvidence1

“Performs a killall Terminal to kill the running script’s terminal window”

T1070.004File DeletionEvidence1

After that, the Trojan runs the downloaded and unpacked application package using the built-in open tool, and deletes the downloaded archive and its unpacked contents.

T1218System Binary Proxy ExecutionEvidence1

Most variants of them are known to commonly leverage at least 3 of the 5 built-in macOS commands and utilities: openssl, curl, sqlite3, killall and funzip.

T1497Virtualization/Sandbox EvasionEvidence3

Use mdls to validate payload download sources and timestamps to guard against sandbox executions. mdls -name "kMDItemWhereFroms" -name "kMDItemDownloadedDate"

T1497.001System ChecksEvidence2

I could also see this used as an anti-sandbox check, since sandbox analysis systems won’t have such entry in the LSQuarantineEvent table when submitting a sample for analysis.

T1564.001Hidden Files and DirectoriesEvidence1

“a .command script is executed from a hidden directory in the mounted volume… (e.g. /Volumes/Player/.hidden)”

Defense Impairment

4 techniques
T1222File and Directory Permissions ModificationEvidence1

After unpacking the archive, the main python script uses the chmod tool to assign the file 84cd5bba3870 permission to run in the system.

T1222.002Linux and Mac PermissionsEvidence1

“Makes the binary within the unzipped .app executable using chmod +x”

T1553.001Gatekeeper BypassEvidence1

В терминологии MITRE ATT&CK задействованы ... Gatekeeper Bypass (T1553.001, Defense Evasion ...).

T1553.002Code SigningEvidence1

“Many of the initial DMGs are signed with a legitimate Apple developer ID… payloads… signed with a valid developer ID… Gatekeeper will allow this software to run without prompt.”

Credential Access

1 technique
T1555.001KeychainEvidence1

“MITRE ATT&CK TIDs… T1142 Credential Access Keychain access”

Discovery

6 techniques
T1012Query RegistryEvidence1

encrypted string ref in function 0x100020a50 decoded to : defaults read /System/Library/CoreServices/SystemVersion.plist ProductVersion

T1082System Information DiscoveryEvidence5

Next, the main script generates a unique user and system ID, and also collects information about the version of macOS in use.

T1083File and Directory DiscoveryEvidence2

Use mdls to print file paths and sizes when enumerating host resources. xargs -0 mdls -n kMDItemPath -n kMDItemFSSize

T1497Virtualization/Sandbox EvasionEvidence3

Use mdls to validate payload download sources and timestamps to guard against sandbox executions. mdls -name "kMDItemWhereFroms" -name "kMDItemDownloadedDate"

T1497.001System ChecksEvidence2

I could also see this used as an anti-sandbox check, since sandbox analysis systems won’t have such entry in the LSQuarantineEvent table when submitting a sample for analysis.

T1518Software DiscoveryEvidence1

As mentioned above, this variant OSX/Shlayer.F queries QuarantineEventsV2 as follows: sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* ‘select LSQuarantineDataURLString from LSQuarantineEvent where LSQuarantineDataURLString like “%s3.amazonaws.com%” order by LSQuarantineTimeStamp desc limit 5’

Collection

1 technique
T1560Archive Collected DataEvidence4

The ZIP archive downloaded to the /tmp/%(sessionID) directory is unpacked to the /tmp/tmp directory using the unzip function.

Command and Control

3 techniques
T1071Application Layer ProtocolEvidence1

I wanted to revisit the OSX/Shlayer.F variant of the Shlayer malware to report on a technique that has not previously been seen in other macOS malware for hiding Command and Control (C2) information. This variant encrypts its configuration using AES within the DMG file header structure, resulting in a modified DMG file.

T1071.001Web ProtocolsEvidence1

A majority of binaries in our intelligence systems downloaded the Bundlore payload to the tmp directory using curl request to the C2.

T1105Ingress Tool TransferEvidence7

Shlayer is a Trojan downloader and dropper for MacOS malware.

Impact

1 technique
T1486Data Encrypted for ImpactEvidence1

This variant encrypts its configuration using AES within the DMG file header structure, resulting in a modified DMG file.

Indicators of compromise

Observables

33 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.

View all in app →
Indicator values are available in Mallory. Pivot on every hash, domain, URL, and IP, or pipe them straight into your SIEM.View all in Mallory
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets match these IOCs, which detections are missing, which campaigns to expect next, and what to do in the next 30 minutes.
IOC matching33Match every observed IP, domain, and hash against your live telemetry.
Associated threat actors3Groups linked to this family, with evidence pinned to each claim.
Associated vulnerabilities1CVEs linked to this family, with the reporting behind each link.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
MITRE ATT&CK mapping34Every documented technique, ranked by evidence weight.
Researcher chatterReddit, Mastodon, and CTI community discussion around this family.