Browse / Tool and Agent Misuse / AML.CS0070
Threat Actor Uses a DeepSeek-Powered Hermes Agent in Langflow and n8n Exploitation Attempts
- Technique
- Generate Malicious Commands
- Also involves
- AI Framework and Platform Flaws
- Target
- Publicly exposed Langflow and n8n systems, primarily in China (Incident)
How it worked
- Resource Development · Obtain Capabilities: Generative AI
The actor obtained access to several generative-AI models and services while evaluating an operational toolset. DeepSeek was selected as the primary reasoning engine for the autonomous attack activity.
- Resource Development · Obtain Capabilities: Software Tools
The actor obtained and configured Hermes Agent as the offensive framework, together with scripts and conventional scanning and exploitation utilities. Hermes provided terminal access, Telegram-based operator control, and a skills system.
- Resource Development · Obtain Capabilities: AI Agent Tools
The actor obtained agent-specific capabilities, including Hermes's framework-bundled godmode skill, which integrated G0DM0D3 and L1B3RT4S jailbreak materials, and the open-source FofaMap MCP server. The MCP server exposed FOFA asset search, natural-language query translation, and Nuclei scan generation to DeepSeek. Unit 42 does not establish that the godmode skill or either prompt package was invoked during the recovered session.
- Resource Development · Develop Capabilities: AI Agent Tools
The actor created two Hermes skills. web-terminal-exploitation encoded a procedure for unauthenticated WebSocket exploitation, while fofa-cyberspace-search instructed DeepSeek to use the actor's fofoapi.py script for internet asset enumeration. The observed FOFA workflow is consistent with the latter skill; the report does not attribute an action in the recovered session to web-terminal-exploitation.
- AI Model Access · AI Model Inference API Access
Hermes accessed DeepSeek through its native API and used the model for vulnerability assessment, target selection, command generation, and operational decisions.
- AI Attack Adaptation · Autonomous Attack-Path Adaptation
After receiving an initial task, DeepSeek sequenced reconnaissance and exploitation actions, evaluated failed prerequisites, abandoned Langflow, compared alternative products and vulnerabilities, and selected n8n. Unit 42 recovered no additional operator input during the session.
- AI Attack Adaptation · Generate Malicious Commands
DeepSeek generated FOFA queries, shell commands, scanner invocations, and direct HTTP probes based on the results returned during the session.
- Reconnaissance · Autonomous Reconnaissance
DeepSeek investigated Langflow, determined what information and prerequisites were needed, and selected follow-on reconnaissance based on returned results.
- Reconnaissance · Search Open Technical Databases: Scan Databases
DeepSeek queried FOFA and obtained records for 84 exposed Langflow instances. These were exposure records, not confirmed vulnerable targets.
- Resource Development · Obtain Capabilities: Exploits
DeepSeek downloaded a public PoC for Langflow CVE-2026-33017. The report does not establish material modification.
- Reconnaissance · Active Scanning
DeepSeek ran the public Langflow scanner and identified a target running Langflow 1.3.4.
- Initial Access · Exploit Public-Facing Application
DeepSeek attempted exploitation, but no target exposed either required prerequisite. No access was obtained.
- Reconnaissance · Autonomous Reconnaissance
DeepSeek assessed Langflow as low value, surveyed exposure across 10 product families, compared vulnerability severity, deployment footprint, PoC availability, and prerequisites, and selected n8n.
- Reconnaissance · Search Open Websites/Domains: Code Repositories
DeepSeek searched GitHub for trending 2026 CVE PoC repositories sorted by stars.
- Resource Development · Obtain Capabilities: Exploits
DeepSeek downloaded the public n8n PoC chaining CVE-2026-21858 and CVE-2025-68613 and inspected its affected versions and prerequisites.
- Reconnaissance · Search Open Technical Databases
DeepSeek queried FOFA for n8n deployments. FOFA reported 647,017 global results and 25,209 in China; these were not confirmed vulnerable systems.
- Reconnaissance · Active Scanning
DeepSeek sampled approximately 100 Chinese addresses, probed roughly 40 unique systems, identified three running affected versions, inspected form endpoints, and launched parallel scanning against more than 50 remaining targets.
- Initial Access · Exploit Public-Facing Application
DeepSeek attempted to find and exploit a system meeting the PoC prerequisites. All discovered forms required authentication, and no attempt produced file read, code execution, or initial access.
Summary
A Chinese-speaking threat actor operating as knaithe or KnYuan configured Hermes Agent to use DeepSeek as its reasoning engine. Hermes supplied terminal access, Telegram-based operator control, and a skills system containing both bundled and actor-created red-team skills. The actor also integrated an MCP server that exposed FOFA search, query translation, and Nuclei scan-generation capabilities.
Unit 42 recovered a detailed Hermes Agent session dated May 7, 2026. The actor supplied an initial task through Telegram, but Unit 42 recovered no additional operator input during the session. The DeepSeek-powered Hermes Agent then autonomously searched for targets, obtained public exploits, ran scans, evaluated the results, and revised its approach.
The agent initially targeted Langflow using a public exploit for CVE-2026-33017. After determining that available targets lacked the exploit's prerequisites, it abandoned that path, compared vulnerabilities across 10 product families, and selected n8n based on apparent severity, exposure, and exploitability. It then obtained a public exploit chain for CVE-2026-21858 and CVE-2025-68613 and probed candidate systems identified through FOFA. Although several systems appeared to run affected versions, the agent found that they lacked the required unauthenticated file-upload functionality. None of the autonomous exploitation attempts obtained access.
Separate workspace evidence documented manual actor activity involving Citrix NetScaler data extraction, Marimo command execution, and reverse-shell attempts against Tomcat and IKE VPN systems.
Unit 42 obtained this visibility after Hermes Agent responded to a Telegram command by starting an HTTP file server from the actor's home directory, /home/worker, instead of an isolated staging directory. This unintentionally exposed the actor's workspace, including AI tool configurations, API keys, exploit scripts, target lists, Bash history, and autonomous exploitation session logs.
References
Source: MITRE ATLAS case studies, used under Apache 2.0.