Chinese APTs Leverage Public AI Tools in Attacks

China-Aligned APTs Use Public AI Tools in Espionage Campaigns

HIGH
July 21, 2026
5m read
Threat ActorThreat IntelligenceCyberattack

Related Entities

Organizations

ChinaHunt.ioNSFOCUSThailandAfghanistanTaiwan

Products & Tech

Claude CodeDeepSeek

Other

Full Report

Executive Summary

State-sponsored threat actors linked to China are now actively incorporating publicly available Artificial Intelligence (AI) tools into their cyber-espionage operations. A report from Hunt.io reveals that China-aligned Advanced Persistent Threat (APT) groups have been using Anthropic's Claude Code and DeepSeek as integral parts of their attack chain. These AI services were used to automate intrusions, generate malicious scripts, and execute commands against government targets in Thailand and Afghanistan, and financial institutions in Taiwan. This represents a tactical shift towards using legitimate, commercially available AI platforms as offensive tools. By 'living off the trusted service,' these APTs can better evade detection, as traffic to these AI platforms may be considered benign within a target's network. This development makes sophisticated threats more stealthy and effective.


Threat Overview

The integration of public AI tools into state-sponsored attacks marks a significant evolution in APT methodology. Instead of relying solely on custom malware and infrastructure, these groups are now weaponizing dual-use technologies that may already be present and trusted within a target environment.

The observed workflow involved using the AI models for distinct purposes:

  • Claude Code: Used as an 'execution engine.' The operators fed it instructions for agentic tool use, and it would generate and issue the corresponding bash commands to be run on the compromised system.
  • DeepSeek: Used for 'offensive reasoning.' The operators tasked it with higher-level goals, such as generating malicious scripts (e.g., for credential harvesting) or devising exploit strategies.

This division of labor allows the APT group to accelerate its operations, adapt to target environments on the fly, and reduce the need for hands-on-keyboard activity by human operators, thereby increasing stealth and scalability.

Technical Analysis

The core technique at play is a form of 'Living off the Land' but extended to cloud services: 'Living off the Trusted Service.' By routing their command generation and execution logic through legitimate AI APIs, the attackers' activities can be difficult to distinguish from normal developer or user activity.

MITRE ATT&CK Techniques:

This tactic is particularly insidious because it abuses the trust that organizations place in popular AI services. Security teams may have allow-listed traffic to anthropic.com or other AI providers, inadvertently creating a covert channel for APT command and control.

This trend is consistent with a broader increase in APT activity. A separate report from NSFOCUS noted a continuous rise in global APT operations in 2025, with 42 new groups identified. The integration of AI is seen as a key factor making these groups more dangerous.

Impact Assessment

The use of public AI tools by APTs has several critical impacts:

  • Increased Stealth: It becomes much harder for defenders to identify malicious activity when it is masked as legitimate traffic to a trusted cloud service.
  • Accelerated Operations: AI allows attackers to automate reconnaissance, script generation, and command execution, enabling them to move through the OODA loop (Observe, Orient, Decide, Act) faster than defenders can respond.
  • Lowered Barrier to Entry: While this report focuses on state-sponsored actors, the same techniques could be adopted by less sophisticated groups to enhance their capabilities.
  • Espionage and Data Theft: The successful compromise of government and financial targets in Asia demonstrates the effectiveness of this new methodology for achieving strategic goals, such as intelligence gathering and theft of sensitive economic data.

IOCs — Directly from Articles

No specific Indicators of Compromise (IOCs) were provided in the source articles.

Detection & Response

Defending against this tactic requires a shift in mindset from blocking known-bad to detecting anomalous-good.

  • API-Level Monitoring: Organizations that use AI services should monitor API usage for anomalies. Look for an unusually high volume of requests, requests originating from unusual internal systems (e.g., servers instead of developer workstations), or queries that contain suspicious keywords or code snippets. (D3FEND: API Usage Analysis)
  • Egress Traffic Inspection: Even if traffic is destined for a trusted service like Anthropic, it should be inspected. Use a proxy or SSL/TLS inspection solution to analyze the content of API calls where possible, or at least monitor the volume and timing of data flows. (D3FEND: Outbound Traffic Filtering)
  • Endpoint Behavioral Analysis: Focus on what happens after the AI API call. An EDR should be able to detect a process making an API call to Claude and then immediately executing a suspicious bash script. The correlation of events is key. (D3FEND: Process Analysis)

Mitigation

  1. Restrict Access to AI Services: Do not allow unfettered access to all AI services from all parts of the network. Access should be restricted to specific users and workstations that have a business need. Server environments should generally be blocked from accessing external AI APIs. (M1035 - Limit Access to Resource Over Network)
  2. Use Corporate AI Gateways: Funnel all AI service usage through a centralized, corporate-controlled gateway. This allows for unified logging, policy enforcement, and monitoring of all AI interactions. (M1020 - SSL/TLS Inspection)
  3. Endpoint Hardening: Implement application control and script execution policies on endpoints to prevent the execution of unauthorized, AI-generated scripts. (M1038 - Execution Prevention)
  4. Threat Intelligence: Stay informed about how APTs are evolving their TTPs. Understanding that trusted services can be weaponized is the first step toward building appropriate defenses.

Timeline of Events

1
July 21, 2026
This article was published

MITRE ATT&CK Mitigations

Filter and inspect egress traffic, even to trusted AI services, to detect anomalous API calls or data flows.

Mapped D3FEND Techniques:

Implement SSL/TLS inspection to gain visibility into the content of API calls to external web services.

Mapped D3FEND Techniques:

Use application control to prevent the execution of malicious scripts generated by AI tools.

Mapped D3FEND Techniques:

D3FEND Defensive Countermeasures

To counter APTs abusing trusted AI services, organizations must evolve their egress filtering strategy. It is no longer sufficient to simply allowlist traffic to domains like api.anthropic.com. Instead, a more granular policy is required. All outbound API calls to AI services should be routed through a dedicated, inspecting web proxy. Policies should be configured to only allow such traffic from specific, authorized sources (e.g., developer subnets) and deny it from server segments or general user networks. Furthermore, enabling SSL/TLS inspection on this traffic allows for deeper analysis of the API requests and responses, enabling detection of suspicious queries or payloads being sent to or received from the AI model. This turns a trusted channel into a monitored chokepoint.

Defenders should use EDR solutions to focus on the full chain of process events rather than a single indicator. In the context of this APT activity, a high-fidelity detection rule would correlate multiple events: 1) A process (e.g., curl or a Python script) makes an outbound network connection to a known AI API endpoint. 2) The same process or its child process then immediately executes a shell command (e.g., via bash -c) or writes a new script to disk. This sequence is highly indicative of an attacker using an AI service for command generation. By baselining normal developer workflows, security teams can tune these rules to identify when this pattern occurs outside of an expected context, such as on a production server or from a non-developer user account.

Sources & References

20th July – Threat Intelligence Report
Check Point Research (checkpoint.com) July 20, 2026
Weekly Cyber Roundup: July 13–19, 2026
CybelAngel (cybelangel.com) July 20, 2026
NSFOCUS Releases 2025 APT Group Research Annual Report
Security Boulevard (securityboulevard.com) July 20, 2026

Article Author

Jason Gomes

Jason Gomes

• Cybersecurity Practitioner

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.

Threat Intelligence & AnalysisSecurity Orchestration (SOAR/XSOAR)Incident Response & Digital ForensicsSecurity Operations Center (SOC)SIEM & Security AnalyticsCyber Fusion & Threat SharingSecurity Automation & IntegrationManaged Detection & Response (MDR)

Editorial Standards & Analyst Review

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.

Tags

APTChinaAIClaude CodeDeepSeekCyber EspionageThreat Intelligence

📢 Share This Article

Help others stay informed about cybersecurity threats

🎯 MITRE ATT&CK Mapped

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.

🧠 Enriched & Analyzed

Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.

🛡️ Actionable Guidance

Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.

🔗 STIX Visualizer

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 Generator

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.