Unit 42 has uncovered a novel cyberattack campaign where a Chinese-speaking threat actor, identified by the aliases knaithe and KnYuan, employed Large Language Models (LLMs) to conduct autonomous hacking operations. The actor leveraged the Hermes Agent framework, primarily with the DeepSeek AI model as its reasoning engine, to autonomously enumerate vulnerabilities, download public exploit code, and attempt exploitation against targeted systems. The campaign, orchestrated via Telegram, targeted seven vulnerabilities across multiple product families, including a critical flaw in Langflow (CVE-2026-33017) and two vulnerabilities in n8n. An operational security mistake by the actor, which exposed their file server, provided researchers with unprecedented visibility into their toolset and methodology. While the immediate impact of this specific campaign was limited, it confirms the existence of a functional, end-to-end autonomous offensive capability, signaling a new frontier in cyber threats.
A Chinese-speaking threat actor has been observed weaponizing AI for autonomous cyberattacks. Operating as knaithe/KnYuan, the actor used a combination of autonomous AI-driven scanning and manual exploitation. The core of their operation was the Hermes Agent, an open-source framework customized for red-teaming, which was integrated with the DeepSeek LLM to act as an autonomous offensive operator. This setup allowed the actor to issue high-level commands via Telegram, which the AI agent would then execute.
The agent's tasks included:
The actor also experimented with a range of other LLMs, including Qwen, GLM, Kimi, MiniMax, Claude Code, and Codex, indicating a systematic evaluation of the AI market for offensive purposes. To evade detection, the actor routed traffic for Western AI tools through a proxy service and configured the tools to minimize logging and attribution. A misconfiguration by the actor exposed their entire operational environment, allowing researchers to analyze their tools, session logs, and targeting strategy in detail.
The threat actor's infrastructure was centered around the Hermes Agent framework, which provided orchestration, terminal access, and C2 via Telegram. The DeepSeek model served as the primary reasoning engine for decision-making.
The actor customized Hermes Agent with three red-teaming skills:
shell_exec: For executing shell commands.web_search: For conducting web searches.file_op: For file system operations.An observed session on May 7, 2026, revealed the agent's workflow:
auto_login and no public flow ID). The agent correctly assessed the target as low-value and abandoned the attempt.The actor used multiple AI tools, configuring them to reduce traceability. For Claude Code and Codex, traffic was proxied through code.newcli[.]com. They also enabled anti-attribution settings, such as CLAUDE_CODE_ATTRIBUTION_HEADER: "0" and disable_response_storage = true for Codex, to limit data retention by the service providers.
The actor's TTPs map to the following MITRE ATT&CK techniques:
T1595.002 - Vulnerability Scanning: The agent autonomously scanned for vulnerable instances of Langflow and n8n.T1592 - Gather Victim Host Information: Probing targets to identify running versions and service configurations.T1589.002 - Search Open Technical Databases: The agent searched GitHub for PoC exploit code.T1583.006 - Web Services: Leveraging various public AI API services for code generation and decision-making.T1588.002 - Tool: Acquiring the Hermes Agent framework and public exploits.T1190 - Exploit Public-Facing Application: The core of the campaign involved attempting to exploit vulnerabilities in internet-facing applications.T1059.007 - JavaScript: Implied use for developing or modifying exploit code.T1071.001 - Web Protocols: Using HTTPS for API calls to AI services and Telegram for C2.T1102.002 - Bidirectional Communication: Using Telegram, a legitimate service, for C2.While the observed campaign had limited direct impact due to target-side configurations preventing successful exploitation, its significance is profound. The operation validates a functional, end-to-end autonomous hacking capability. This represents a paradigm shift, moving from automated scripts to AI-driven agents that can reason, research, and adapt their attack path in real-time.
The potential business impact of such attacks is severe. An autonomous agent can operate 24/7, dramatically increasing the speed and scale of attacks. It can discover and exploit zero-day vulnerabilities or newly disclosed n-days far faster than human-led teams, shrinking the window for defenders to patch and respond. If a similar autonomous campaign were to succeed against a widely deployed, vulnerable application, it could lead to mass compromise across multiple organizations and industries within hours, resulting in widespread data breaches, ransomware events, or service disruptions.
The following indicator was explicitly mentioned in the source article:
code.newcli[.]comSecurity teams may want to hunt for the following patterns that could indicate related activity:
/api/v1/run/*api.deepseek.comcode.newcli[.]comWeb Application Firewall LogsCVE-2024-25443 and CVE-2024-25444.*--auto_login*FofaMap-Platinum-Full-Expertapi.telegram.orgDetecting autonomous AI-driven attacks requires a multi-layered approach focusing on behavior and anomalies rather than just static signatures.
API and Network Monitoring: Monitor and baseline outbound API calls from servers and critical assets, especially to known LLM providers (DeepSeek, Anthropic, OpenAI, etc.). Anomalous connections from non-developer systems should be investigated. Use Network Traffic Analysis (D3-NTA) to flag connections to suspicious proxies like code.newcli[.]com or C2 channels like Telegram.
Vulnerability Scanning and Patching: Aggressively scan for and patch the vulnerabilities targeted in this campaign, particularly CVE-2026-33017 (Langflow), CVE-2024-25443, and CVE-2024-25444 (n8n). An autonomous attacker thrives on n-day vulnerabilities, making patch velocity a critical defense.
Endpoint and Application Logging: Ensure comprehensive logging is enabled on public-facing applications. For Langflow, monitor for attempts to access flows or use the auto_login feature. For n8n, log and alert on access to form endpoints, especially those involving file uploads. Use File Analysis (D3-FA) on uploaded files to detect malicious payloads.
Behavioral Analytics: Deploy EDR and SIEM solutions with User and Entity Behavior Analytics (UEBA) capabilities. An autonomous agent's activity—rapidly pivoting from scanning to exploit download to execution—may generate a sequence of alerts that, when correlated, reveal the attack chain. Look for a single source IP performing vulnerability scanning, followed by connections to GitHub, and then exploit attempts.
Defending against AI-driven autonomous threats requires strengthening fundamental security controls and adopting new strategies.
Attack Surface Management: Continuously monitor and minimize the external attack surface. Disable or restrict access to unnecessary features on public-facing applications. In this case, ensuring Langflow's auto_login was disabled and n8n's forms were not publicly accessible were the key factors that prevented compromise. This aligns with D3FEND's Application Hardening (D3-AH).
Egress Traffic Filtering: Implement strict egress filtering policies to block outbound connections from servers to non-essential services. Block traffic to known anonymizing proxies, Tor, and unnecessary external APIs, including AI services and platforms like Telegram, unless explicitly required for business operations. This is a core principle of D3FEND's Outbound Traffic Filtering (D3-OTF).
Software Updates: Maintain a rigorous patch management program to apply security updates as soon as they become available. The actor's reliance on public PoCs for n-day vulnerabilities means that timely patching is one of the most effective defenses. This corresponds to D3FEND's Software Update (D3-SU).
API Security: For organizations using LLMs, implement robust API security controls. This includes monitoring usage for anomalous activity, enforcing strict access controls, and using API gateways to inspect and log all requests. Consider using dedicated, secured environments for interacting with external AI services.
Applying timely patches for vulnerabilities like those in n8n and Langflow removes the exploit vector for the autonomous agent.
Mapped D3FEND Techniques:
Implement strict egress filtering to block outbound connections from servers to unauthorized external services like AI APIs and Telegram.
Mapped D3FEND Techniques:
Filter and block traffic to known malicious or non-business-critical domains, such as the proxy service `code.newcli[.]com`.
Running web applications in isolated environments can limit the impact of a successful exploit, preventing lateral movement.
Mapped D3FEND Techniques:
Hardening application configurations, such as disabling Langflow's `auto_login` and restricting n8n's form access, was proven to be an effective defense in this campaign.
Mapped D3FEND Techniques:
The threat actor's methodology relies heavily on exploiting known, n-day vulnerabilities for which public PoCs are available. Implementing a rapid and comprehensive software update strategy is therefore a critical defense. Organizations must prioritize patching for internet-facing applications like n8n and Langflow. Establish a 24-48 hour patching SLA for critical vulnerabilities on external systems. Utilize automated patch management systems and vulnerability scanners to continuously identify and remediate outdated software. Since the autonomous agent actively searches for vulnerable versions, any delay in patching directly increases the window of opportunity for compromise. Verifying successful patch deployment across all assets is as important as the deployment itself. This technique directly counters the actor's TTP of leveraging publicly known flaws, rendering their downloaded exploits ineffective.
This campaign's failure was a direct result of strong application hardening. The target's Langflow instance had auto_login disabled, and the n8n instances did not expose unauthenticated forms. This demonstrates the power of secure configuration. Security teams must perform regular configuration reviews of all public-facing applications, guided by vendor best practices and security benchmarks like those from CIS. For applications like Langflow, disable any features that allow for unauthenticated access or automatic logins. For n8n, ensure that all forms, especially those with file upload capabilities, require strong authentication. This principle of least functionality—disabling all features and access points not strictly necessary for business operations—is a powerful countermeasure against both automated and manual attackers, as it removes the specific prerequisites their exploits depend on.
The actor's reliance on external AI APIs (DeepSeek, Claude, etc.) and a C2 channel (Telegram) creates detectable network signatures. Implementing strict outbound traffic filtering on servers is a highly effective mitigation. By default, servers should be denied all outbound internet access. An explicit allowlist should be created for only necessary destinations, such as package repositories or required business APIs. In this context, connections to api.deepseek.com, code.newcli[.]com, and api.telegram.org from a production server should be blocked and trigger a high-priority alert. This control not only disrupts the AI agent's ability to function (by cutting off its 'brain') but also blocks its C2 channel, preventing the human operator from issuing new tasks. This defense moves security from being reactive to proactive, by preventing the tool from communicating in the first place.
Unit 42 recovered a Hermes Agent session where the AI operator attempted to exploit Langflow (CVE-2026-33017), failed, and then pivoted to researching and targeting n8n vulnerabilities.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
CyberNetSec.io uses automation to assist source monitoring, deduplication, observable extraction, and structured intelligence generation. Published analysis follows human-defined editorial standards and adds defensive context including MITRE ATT&CK, D3FEND, STIX, and Sigma where applicable. Read our editorial policy.
Help others stay informed about cybersecurity threats
Every tactic, technique, and sub-technique used in this threat has been identified and mapped to the MITRE ATT&CK framework for consistent, actionable threat language.
Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.
Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.
Structured threat data is packaged as a STIX 2.1 bundle and can be visualized as an interactive graph — relationships between actors, malware, techniques, and indicators.
Sigma detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.