Apfell
- Type
- RAT
- Capabilities
- Credential theftReconnaissance
- Platforms
- macOS
Apfell is an open-source macOS command-and-control agent in the Mythic framework, implemented in JavaScript for Automation (JXA) and executed through the macOS automation runtime. It supports operator-directed post-exploitation activity on macOS, including host reconnaissance, screenshot capture, browser-data theft, and credential capture through fake password prompts. Apfell has been deployed through malicious software supply-chain campaigns targeting macOS development systems, where installation-time package scripts retrieve and execute JXA payloads. It has also been incorporated into Office-macro execution chains that invoke macOS scripting utilities to retrieve and run the agent. Apfell is associated with the Mythic C2 ecosystem and is distinct from Mythic's Poseidon macOS agent and Apollo Windows agent.
Techniques & procedures
20 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
1 technique
Initial Access
"Cybersecurity researchers have discovered four malicious NuGet packages... designed to target ASP.NET web application developers..." and "a malicious npm package named ambar-src..."
Execution
5 techniques
Execution
This script generates an Office macro which uses osascript to download and execute the Mythic JXA .js payload.
Рабочее решение — apfell-агент, который работает через osascript (AppleScript, T1059.002, Execution) и не зависит от архитектуры процессора. Callback через osascript проходит на arm64 без проблем.
This script generates an Office macro which uses osascript to download and execute the Mythic JXA .js payload.
Set up Mythic C2 server and generate an "apfell" jxa payload... Host that payload... uses osascript to download and execute the Mythic JXA .js payload.
Copy and paste that macro into an MS Office doc.
Persistence
2 techniques
Persistence
The macOS infection sequence executes Apfell... to conduct extensive data collection and create a new macOS user with admin privileges.
Mythic does have the ability to add Login Item persistence even from the App Sandbox.
Privilege Escalation
1 technique
Privilege Escalation
Mythic does have the ability to add Login Item persistence even from the App Sandbox.
Stealth
2 techniques
Stealth
Remove the first line of the Mythic JXA .js launcher... Some static A/V signatures have been known to check for this static string.
This script generates an Office macro which uses osascript to download and execute the Mythic JXA .js payload.
Defense Impairment
1 technique
Defense Impairment
Обход Gatekeeper (T1553.001, Defense Evasion)… Gatekeeper проверяет атрибут com.apple.quarantine у скачанных файлов и блокирует неподписанный или ненотаризованный код. А вот при доставке через curl, scp или rsync — не ставится, и Gatekeeper молчит.
Credential Access
2 techniques
Credential Access
The malicious code embedded into the packages comes with capabilities to siphon system information, access tokens, environment secrets, and API keys from developer environments... It also harvests API keys for nine large language models (LLM) providers.
The entire attack chain unfolds over two stages: a first-stage component that captures credentials and cryptocurrency keys and then loads a secondary stage that subsequently performs deeper harvesting of credentials from password managers.
Discovery
1 technique
Discovery
The malicious code embedded into the packages comes with capabilities to siphon system information... Some of the data stolen by the agent are as follows - System information
Collection
2 techniques
Collection
Some of the data stolen by the agent are as follows - ... Screenshots
Some of the data stolen by the agent are as follows - ... Clipboard contents
Command and Control
3 techniques
Command and Control
The same is true for installing C2 Profiles: sudo ./mythic-cli install github https://github.com/MythicC2Profiles/http | Installing Agents and C2 Profiles The Mythic repository itself does not host any Payload Types or any C2 Profiles... sudo ./mythic-cli install github https://github.com/MythicC2Profiles/http
"...relays traffic... to the attacker's external C2 server" and "exfiltrated... to a Yandex Cloud domain"
This script generates an Office macro which uses osascript to download and execute the Mythic JXA .js payload... Host that payload... use python -m SimpleHTTPServer to host
Exfiltration
1 technique
Exfiltration
"...begin transmitting the ASP.NET Identity data through the local proxy to the external infrastructure." and "Once the data is collected, it's exfiltrated..."
Recent activity
7 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.