Skip to main content
Mallory
← Back to News
ai-enabled-threat-activitycommand-and-control-methodpayload-delivery-evasionpackage-repository-poisoning

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

Malicious Use of AI and LLMs for Evasion and C2 in Cyberattacks

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-2 remained available at the time of reporting
    • No victim count, named breached organizations, or confirmed OT-impact incidents were provided in the references
New surface, new adversariesTrack how attackers are adapting to this technology.
Track this risk
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

4 events · Feb 1, 2024 – Dec 2, 2025
  1. Dec 2, 20251y ago

    Malicious package remains available on npm at version 1.2.1

    As of the reporting date, the malicious package was still available on the npm registry, with the latest version listed as 1.2.1. This indicated the threat had not yet been removed despite public reporting.

  2. Dec 2, 20251y ago

    Researchers identify AI-evasion behavior in the npm package

    Researchers reported that eslint-plugin-unicorn-ts-2 used both conventional malware techniques and a concealed prompt designed to manipulate AI-based security scanners. The finding highlighted a new attacker tactic focused on deceiving defensive AI tooling rather than only evading traditional analysis.

  3. Feb 1, 20243y ago

    Malicious code introduced in package version 1.1.3

    At some point after the package was published, version 1.1.3 introduced malicious functionality including a post-install hook and exfiltration of environment variables to a Pipedream webhook. The package also embedded hidden prompt text aimed at influencing AI-driven security analysis tools.

  4. Feb 1, 20243y ago

    Malicious npm package uploaded to npm registry

    The npm package eslint-plugin-unicorn-ts-2 was uploaded by the user 'hamburgerisland' in February 2024. It was presented as a typosquatted package and later became the basis for a supply-chain malware case.

Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

Open in app →

Malware

2 linked
Do you run this?Follow how adversaries are adapting to this technology, and where it touches your stack today.
Track This Risk
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.