macOS.Gaslight is a Rust backdoor and information stealer, not a legitimate Apple system service. If XProtect reports MACOS_BONZAI_COBUCH, or you find the exact LaunchAgent label com.apple.system.services.activity pointing to an unfamiliar executable, disconnect the Mac from the network and preserve the evidence before removing it. Do not change passwords on that Mac. Use a separate trusted device because the analyzed implant can collect browser data, terminal history, and a copy of the login Keychain database.
The family name, label, or hash can support a diagnosis, but each clue has limits. The researchers did not identify the analyzed sample’s initial delivery method, and a com.apple.* name alone does not prove that every matching file is malicious. Verify the plist’s target, the target’s signature, and its SHA-256 before deleting anything.
What Is macOS.Gaslight?
SentinelLABS described macOS.Gaslight in June 2026 after an Apple XProtect update surfaced a Mach-O sample. The sample is an ad hoc-signed Rust implant that communicates through a Telegram Bot API polling loop, encrypts command traffic with AES-GCM over pinned TLS, and gives an operator an interactive shell. It can run commands, stop processes, upload files, and prevent the Mac from sleeping while the connection remains active. [1]
A configurable Python collection module can gather Chrome, Brave, Firefox, and Safari data; terminal command histories; installed-app and running-process lists; a system profile; and a raw copy of login.keychain-db. The collection is archived and can be sent to the operator. The sample also contains a separate installer capable of staging a standalone Python runtime, but the researchers could not recover every runtime branch. Treat these as documented capabilities in the sample, not proof that every Gaslight infection used every module.
The same boundary applies to attribution. SentinelOne assessed the implant as part of a DPRK-aligned macOS activity cluster, but a home user should make the cleanup decision from local evidence—not from a geopolitical label.
Which Evidence Matters?
| Evidence | What it means and what to do |
|---|---|
XProtect reports MACOS_BONZAI_COBUCH |
Apple recognized a known malicious file. Record the alert and path. Determine whether the file was blocked before execution or whether persistence and activity are also present. |
SHA-256 6328567511d88fdc2ae0939c5ef17b7a63d2a833881900de018a4f12f4982525 |
This exact hash matches the analyzed Gaslight Mach-O sample. Isolate the Mac and preserve the file details for an incident responder before removal. |
LaunchAgent label com.apple.system.services.activity |
The analyzed implant used this Apple-looking label. Open the plist and inspect ProgramArguments; the label alone is not enough to delete a file safely. |
Signing identifier endpoint-macos-aarch64-5555494492fc075f441637fb9d894913dde3a2ea |
This ad hoc identifier supports the match when it belongs to the executable referenced by the suspicious plist. |
Only Telegram, Rust, Python, or a generic com.apple.* item is present |
None of these proves Gaslight. Verify the exact path, label, signature, hash, XProtect result, and behavior before assigning the family name. |
Contain the Mac Before Removing Files
- Disconnect Wi-Fi, Ethernet, and VPN access. Gaslight can provide an interactive shell and upload files. On a managed Mac, contact the security or IT team before changing artifacts.
- Do not sign in to important accounts. A still-running stealer could capture new sessions or credentials. Use a separate trusted phone or computer for recovery.
- Record what triggered the investigation. Save the XProtect rule, detected path, alert time, plist path, executable path, code-signing output, and hash. Do not upload a work sample or private file to a public scanner without authorization.
- Do not delete by label alone. An attacker deliberately chose an Apple-looking namespace. The correct decision comes from the plist target and the target’s properties.
If the Mac only received an XProtect alert and Apple moved the file to Trash before it ran, the response may be limited to updating macOS, emptying Trash after evidence is recorded, restarting, and checking for persistence. If the LaunchAgent, matching binary, unexplained network activity, or other execution evidence is present, treat the Mac as compromised.
Verify the LaunchAgent and Its Target
Start with a read-only search for the exact label in the user and system LaunchAgent folders:
grep -RIl "com.apple.system.services.activity" \
"$HOME/Library/LaunchAgents" /Library/LaunchAgents 2>/dev/null
If the search returns a plist, inspect it instead of assuming the filename matches the label:
plutil -p "/exact/path/to/suspicious.plist"
Copy the absolute executable path from ProgramArguments. Then inspect its signature and calculate its hash:
codesign -dv --verbose=4 "/exact/path/to/suspicious-binary"
shasum -a 256 "/exact/path/to/suspicious-binary"
A strong match combines the exact label with an unfamiliar target, the documented ad hoc signing identifier or hash, an XProtect alert, or behavior consistent with the backdoor. If the target belongs to a known application and the hash does not match, stop and have the file reviewed rather than forcing the Gaslight diagnosis.
How to Remove Confirmed Gaslight Persistence
- Preserve the plist and target details. On a work Mac, let the incident-response team collect them. For a personal Mac, keep screenshots and hashes before cleanup.
- Unload the confirmed user LaunchAgent. Replace the example path only with the plist you verified:
launchctl bootout "gui/$(id -u)" "/exact/path/to/suspicious.plist"
- Move the confirmed malicious plist and executable to Trash. Do not reuse a downloaded installer or restore the same files from backup. Empty Trash only after you no longer need the evidence.
- Update macOS and security data. XProtect signatures update independently, and Apple uses XProtect to block and remediate known malware. Restart the Mac after updates; XProtect’s remediation process does not restart it automatically. [2]
- Check again after restart. Repeat the exact-label search, confirm the target no longer exists, review System Settings → General → Login Items & Extensions, and watch for another XProtect alert or unexpected network activity.
Do not combine artifact lists from unrelated families. CrashStealer, ClickLock Stealer, FlutterShell, and Odyssey Stealer are separate Mac threats with different delivery and persistence evidence.
When a Clean Erase and Reinstall Is Safer
Manual removal can be reasonable when XProtect blocked the known file before execution and no persistence or follow-on activity exists. A clean erase and reinstall is safer when the matching LaunchAgent and binary ran, an interactive shell may have been active, the operator could have changed unknown files, the alert returns after cleanup, or you cannot identify every executable referenced by the persistence item.
Back up personal documents, not unknown applications, scripts, LaunchAgents, browser profiles, shell startup files, or the whole Library folder. Reinstall applications from their official sources. On a managed Mac, follow the organization’s reimage and credential-rotation process rather than improvising a personal cleanup.
Recover Accounts and Secrets From a Clean Device
Gaslight’s collection scope makes deletion only the first half of recovery. The raw Keychain copy does not prove every stored secret was decrypted, but it is sensitive enough to treat the exposed Mac as untrusted.
- Secure the primary email account first. Change its password, sign out other sessions, review forwarding rules and recovery methods, and confirm multi-factor authentication.
- Secure the Apple Account. Change the password, remove unknown trusted devices, verify account details, and review services signed in with that account. Apple recommends using account recovery if the password can no longer be reset normally. [3]
- Revoke browser sessions. Sign out other sessions for important work, financial, social, cloud, and shopping accounts. A password change does not always invalidate an already stolen cookie.
- Review Keychain-backed and password-manager credentials. Rotate the highest-value credentials first, especially email, work SSO, cloud consoles, and remote-access accounts.
- Audit terminal history exposure. Rotate API keys, GitHub or GitLab tokens, cloud credentials, SSH keys, database passwords, and other secrets that may have appeared in commands or environment setup.
- Review files that were accessible. Because the operator had an upload command, assume a specifically accessed sensitive file may have left the Mac. Scope that decision from logs and business context rather than declaring every document stolen.
For a broader recovery order, use the account takeover checklist after the Mac is isolated.
What Does the Prompt-Injection Feature Change?
The implant contains 38 fabricated “system” messages designed to confuse an LLM-assisted malware-analysis pipeline. This is an analyst-evasion experiment embedded in hostile sample data. It does not mean Gaslight can take over a consumer AI account, and it does not replace the backdoor’s conventional risks: command execution, persistence, data collection, and file upload.
For defenders, the lesson is to treat strings extracted from malware as untrusted data rather than instructions. For an affected Mac user, the practical response remains isolation, evidence verification, cleanup or reinstallation, and clean-device account recovery.
FAQ
Is com.apple.system.services.activity a legitimate Apple service?
The analyzed Gaslight sample used that exact LaunchAgent label to look legitimate. The label is suspicious, but it is not enough by itself. Inspect the plist’s ProgramArguments, target signature, hash, and XProtect evidence before deleting anything.
Does an XProtect Gaslight alert mean the malware ran?
Not necessarily. XProtect may block a known file before execution or remediate a file that reached the Mac. Check whether the suspicious LaunchAgent, matching executable, or other execution evidence exists.
Does using Telegram, Rust, or Python mean a Mac has Gaslight?
No. All three have legitimate uses. Gaslight identification requires family-specific evidence such as the exact hash, XProtect rule, LaunchAgent target, signing identifier, and compatible behavior.
Should I change passwords on the affected Mac?
No. Isolate it first and use a separate trusted device. A still-compromised Mac could expose the new password or session again.
Can deleting the LaunchAgent prove the Mac is clean?
No. It can stop one persistence path, but a confirmed interactive backdoor may have made other changes. Reinstall macOS when you cannot restore trust in the system.
References
- Stokes, Phil. “macOS.Gaslight: Rust Backdoor Turns Prompt Injection on the Analyst, Not the Sandbox.” SentinelLABS, June 23, 2026; accessed July 30, 2026. sentinelone.com.
- Apple. “Protecting Against Malware in macOS.” Apple Platform Security, accessed July 30, 2026. support.apple.com.
- Apple. “If You Think Your Apple Account Has Been Compromised.” Apple Support, updated December 16, 2025; accessed July 30, 2026. support.apple.com.

