Malicious Use of AI and LLMs for Evasion and C2 in Cyberattacks
Emerging Technology Risk · 2 sources · Updated 5mo ago · First seen Dec 2, 2025

Cybercriminals are increasingly leveraging large language models (LLMs) and AI-driven techniques to enhance their attack capabilities and evade detection. Recent research highlights the operationalization of LLM-in-the-loop tradecraft, where malware dynamically generates host-specific PowerShell commands for reconnaissance and data collection, frequently rewriting itself to bypass static and machine learning-based security detections. Attackers are also exploiting stolen API keys and enterprise AI connectors to establish covert command-and-control (C2) channels, disguising malicious activity as legitimate AI traffic. These tactics are being used to target critical infrastructure, with a focus on IT systems that can impact operational technology environments through identity abuse, weak segmentation, and ransomware attacks.
In parallel, threat actors are attempting to manipulate AI-based security tools directly. A malicious npm package, eslint-plugin-unicorn-ts-2, was discovered embedding a prompt intended to influence the decision-making of AI-driven scanners, while also exfiltrating sensitive environment variables via a post-install script. This approach signals a new trend where attackers not only evade traditional detection but also actively seek to undermine the effectiveness of AI-powered defenses. The emergence of underground markets for malicious LLMs further underscores the growing sophistication and commercialization of AI-enabled cybercrime.
Why it matters
Impact assessment
AI-enabled tradecraft increases risk for organizations using developer ecosystems, AI services, and hybrid IT/OT environments. The immediate exposure is highest for teams consuming npm packages, storing secrets in build environments, or allowing enterprise AI connectors and API access without tight controls; downstream impact includes credential theft, covert command-and-control, ransomware enablement, and potential operational disruption where IT compromise can affect OT.
This story describes both broad ecosystem exposure and targeted follow-on abuse. There is evidence of a live malicious package in the npm ecosystem and reported attacker interest in abusing AI traffic and AI-based security tooling, but the reporting does not identify a named intrusion set or confirmed large-scale destructive campaign tied to these techniques.
Supporting details
- Affected populations:
- Software developers and CI/CD environments consuming npm packages
- Enterprises using LLM APIs, AI connectors, and AI-assisted security tooling
- Critical infrastructure operators with weak IT/OT segmentation and identity controls
- Severity drivers:
- Theft of environment variables can expose API keys, credentials, and tokens
- Abuse of stolen AI credentials can blend malicious traffic into legitimate AI service usage
- Host-specific command generation and self-rewriting malware can reduce detection efficacy
- Identity abuse and ransomware can create operational and reputational damage
- Scope:
- npm package exposure is potentially widespread due to public package availability and nearly 19,000 reported downloads
- AI-as-C2 and LLM-in-the-loop tradecraft appears more targeted and operationally mature
- Known in-the-wild indicators from reporting:
- Malicious npm package
eslint-plugin-unicorn-ts-2remained available at the time of reporting - No victim count, named breached organizations, or confirmed OT-impact incidents were provided in the references
- Malicious npm package


