Chinese APTs Leverage Public AI Tools in Attacks

China-Aligned APTs Use Public AI Tools in Espionage Campaigns

HIGH
July 21, 2026
July 25, 2026
m read
Threat ActorThreat IntelligenceCyberattack

Related Entities(initial)

Organizations

AfghanistanChinaHunt.ioNSFOCUSTaiwanThailand

Products & Tech

Claude CodeDeepSeek

Other

Anthropic

Full Report(when first published)

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

Article Updates

July 25, 2026

Severity increased

Update reveals specific AI roles, TencShell backdoor, detailed data exfiltration, and staging of infrastructure for U.S. government targets by China-linked APTs.

The campaign's dual-AI setup is further detailed: DeepSeek-v4-pro handles strategic reasoning, vulnerability identification, and exploit generation (including SQL injection and Laravel deserialization), while Claude Code manages tactical execution, persistence, and session management. The operation was uncovered via an exposed directory linked to the TencShell Go-based backdoor. Attackers successfully exfiltrated cloud tokens from Taiwan, national ID records from Thailand, and citizen complaint databases with encryption keys from Afghanistan. Significantly, infrastructure was staged to target U.S. government entities, including NASA subdomains, indicating an expanded scope. New cyber observables for hunting are also provided.

Update Sources:
securityboulevard.comTop 10 Breaches of the Week

Sources & References(when first published)

20th July – Threat Intelligence Report
research.checkpoint.comJuly 20, 2026
Weekly Cyber Roundup: July 13–19, 2026
cybelangel.comJuly 20, 2026
NSFOCUS Releases 2025 APT Group Research Annual Report
securityboulevard.comJuly 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

AIAPTChinaClaude CodeCyber EspionageDeepSeekThreat 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.