By NHI Mgmt Group Editorial TeamBased on Swarmnetics: “Russian Malware Takes a New Step Using Real-Time LLM Commands” (July 24, 2025)

TL;DR: Russian malware linked to Fancy Bear used an Alibaba chatbot in real time on compromised systems to vary commands, move through Windows directories, and exfiltrate files, according to Swarmnetics. Static command matching is no longer enough when attackers can generate actions dynamically inside the host.


At a glance

What this is: Swarmnetics says Russian malware is using an Alibaba chatbot in real time on compromised systems to vary commands and evade detection.

Why it matters: Detection teams need to account for malware that generates behaviour dynamically at runtime, because hardcoded command matching is less dependable when attackers can adapt inside the host.


Context

This article is about a detection gap: malware that no longer relies on fixed, easily matched command strings. Traditional content-based rules work best when malicious behaviour is repeatable, but they weaken when an attacker can generate instructions dynamically after compromise. The identity angle is indirect but real, because the malware still depends on initial access through impersonation, then turns runtime execution into the control problem.

The article also reflects a broader shift in attacker tradecraft rather than a fully mature technique. The interesting security question is not whether every sample will use an LLM, but whether defenders rely too heavily on static signatures for behaviour that can now be assembled on the fly.


Key questions

Q: What fails when malware can generate commands at runtime?

A: Static detections fail first, because the command text, sequence, and tool choice are no longer fixed enough to signature reliably. Security teams need to detect the underlying behaviour, such as directory traversal, process spawning, and exfiltration patterns, rather than the exact words used on the host.

Q: Why does LLM-guided malware increase detection risk after compromise?

A: Because the model gives the attacker a way to vary execution while keeping the same goal. That means traditional rules can miss the attack even when the host is actively enumerating files or sending data out, so defenders need layered telemetry and correlation.

Q: How can security teams detect malware that rewrites its own commands?

A: Use host and network behaviour signals that survive text variation, including process lineage, repeated directory access, unusual file collection, and outbound transfer destinations. The aim is to catch the operational effect of the malware, not the exact command string it used.

Q: What should teams do when phishing leads to adaptive malware execution?

A: Treat the phishing event as the start of a post-compromise execution problem, not a separate email issue. Containment should focus on the affected endpoint, credential exposure, suspicious child processes, and exfiltration paths that may have been opened after initial access.


Technical breakdown

How LLM-guided malware changes command execution

LLM-guided malware uses a model at runtime to decide what command to issue next instead of shipping a fixed sequence in the payload. That matters because many detection controls still look for known strings, scripts, or command chains. When the malware can ask a model to rewrite or vary its actions, the observable pattern becomes less stable even if the underlying goal stays the same. In this case, the model call happens on the compromised host, so the attacker can adapt execution without delivering a new binary for every step. The key technical change is not the LLM itself, but the move from static instructions to generated instructions.

Practical implication: build detections around behaviour, process relationships, and post-execution outcomes, not just command text.

Why static command matching degrades under dynamic generation

Static command matching assumes malicious activity will repeat often enough to be signatured. That assumption breaks when the malware can vary wording, sequence, or tool choice while keeping the same operational intent. In practice, this pushes defenders toward telemetry that survives content rewriting, such as process ancestry, unusual child processes, directory traversal patterns, archive or exfiltration behaviour, and network destinations used immediately after execution. The problem is similar to polymorphic malware in one respect, but the LLM adds a higher-level reasoning layer that can produce many more variants than a simple obfuscator. The control gap is overreliance on fixed indicators where the attacker controls generation at runtime.

Practical implication: treat fixed command rules as a narrow layer and add host and network behaviour analytics above them.

What the compromise chain suggests about agentic malware use

The article does not describe autonomous malware in the full sense. It describes malware that queries an LLM to support command generation after compromise, which is more limited but still operationally important. The attack chain begins with impersonation-based access, then shifts to runtime generation for directory discovery, file targeting, and exfiltration. That pattern matters because it shows how AI can be inserted into an existing intrusion rather than used as a separate threat category. Defenders should read this as an evolution in execution and evasion, not as a replacement for established intrusion techniques.

Practical implication: update playbooks to assume attackers may use models to vary post-compromise actions while the intrusion path remains conventional.


Threat narrative

Attacker objective: The attacker wanted to use runtime-generated commands to evade static detection and exfiltrate targeted files from compromised Windows systems.

  1. Initial access came from phishing messages impersonating Ukraine Cabinet of Ministers officials, giving the malware a path onto compromised systems.
  2. After execution, the malware queried an Alibaba chatbot in real time to generate or vary commands on the host.
  3. The malware then traversed Windows directories, targeted document file types, and sent data out through SFTP or HTTP POST requests.
  4. The attacker objective was to improve stealth and exfiltrate files while making static command-based detection less effective.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Static command matching is losing durability as a primary malware control. The article shows why signature logic struggles once the attacker can generate or vary commands at runtime. That does not make signatures useless, but it does reduce their value as the decisive layer for post-compromise detection. Practitioners should treat this as a push toward behaviour-first detection and away from dependence on fixed command strings.

LLM-assisted malware is still an execution problem before it is an AI problem. The most important security signal is not the model call itself, but the fact that the malware can use a model to assemble actions on demand after initial access. That means standard intrusion stages remain relevant, especially entry, discovery, collection, and exfiltration. The governance lesson for detection teams is to anchor controls in observed behaviour, not in whether the malware looks novel.

AI governance and malware detection are now intersecting at the runtime layer. Even when the malware is not an AI agent in the governance sense, it is using AI to modify how it behaves during an intrusion. That creates a new detection blind spot for teams that separate model risk from endpoint risk too cleanly. Practitioners should align AI risk review with host telemetry, because model-mediated execution changes what defenders can reliably see.

Detecting LLM-guided malware requires thinking in terms of generated intent, not generated text. The named concept here is runtime command variability, where the attacker preserves intent while changing the visible command surface. That concept matters because security tooling built around exact pattern matching will miss a growing class of adaptive malware. Teams should shift toward controls that evaluate the effect of the command chain rather than the syntax used to express it.

The identity angle is indirect but important. The malware still depends on access acquisition, impersonation, and controlled execution on the target host, which means identity and endpoint controls remain the first barrier. Where identity checks are weak, AI-assisted post-compromise behaviour simply gets more room to operate. Practitioners should see this as a reminder that access governance and detection engineering have to work together, not as separate disciplines.

From our research library:

What this signals

Runtime command variability is the right way to think about this shift: the attacker keeps the same goal while changing the command surface on each execution. That means fixed signatures will increasingly lag behind malware that uses models to rephrase intent at the point of execution, so detection engineering has to move closer to effect-based telemetry.

For practitioners, the operational question is whether your controls still depend on exact command content. If they do, AI-mediated execution creates a gap between what the malware does and what the tool can recognise, which is why host process lineage and exfiltration behaviour need more weight in the detection stack.


For practitioners

  • Hunt for runtime command variation Look for malware that spawns inconsistent command lines, switches tools, or changes sequence while keeping the same objective across hosts.
  • Prioritise behaviour-based detections Correlate process ancestry, directory traversal, archive creation, and outbound transfer patterns instead of depending on hardcoded command strings.
  • Tighten phishing-driven entry controls Strengthen user and mailbox protections against impersonation campaigns that create the initial foothold for post-compromise model use.
  • Review exfiltration telemetry for adaptive malware Flag SFTP and HTTP POST traffic that follows unusual file discovery activity, especially when the host shows repeated directory sweeps.

Key takeaways

  • LLM-guided malware weakens the value of static command rules because the attacker can generate varying instructions at runtime.
  • The article shows a post-compromise execution shift, not an AI apocalypse, but it still expands the defender's blind spot.
  • Behavioural telemetry around process chains, directory access, and exfiltration is more resilient than exact command matching.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK addresses the attack and risk surface, while NIST CSF 2.0 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
MITRE ATT&CKTA0001; TA0007; TA0010 — Initial Access; Discovery; ExfiltrationThe article describes phishing entry, directory discovery, and file exfiltration.
TA0005 — StealthVarying commands to evade static detection is a stealth technique.
Recommendation — Map runtime malware activity to ATT&CK tactics and tune detections for discovery and exfiltration behaviour. Hunt for evasive command variation as a stealth indicator in your intrusion detections.
NIST CSF 2.0DE.CM-01 — Networks and systems are monitored to detect potential cybersecurity eventsBehaviour-based monitoring is central when commands are dynamically generated.
Recommendation — Expand monitoring to detect behavioural drift instead of relying on static malware strings.
CIS Controls v8CIS-8 — Audit Log ManagementLogging and correlation are needed to spot adaptive execution patterns.
Recommendation — Correlate endpoint and network logs so adaptive command generation still leaves a detection trail.

Key terms

  • Runtime Command Variability: Runtime command variability is the practice of changing malicious commands at execution time instead of relying on fixed payload text. It matters because defenders lose the stability needed for exact signatures, so they must detect the behaviour and outcome of the action chain instead.
  • Behaviour-driven Detection: Behaviour-driven detection focuses on what an adversary does rather than only on where a signal comes from. It improves correlation and precision because the control is anchored to technique patterns that can appear across multiple tools and log sources.
  • Static Command Matching: Static command matching is a detection approach that looks for known command lines, terms, or sequence patterns associated with malware. It is efficient but brittle when attackers can alter syntax, insert noise, or generate commands dynamically at runtime.
  • Post-Compromise Execution: Post-compromise execution is the stage after initial access when malware runs commands, discovers assets, and moves data or control. It is often where defenders can still contain the incident if they have telemetry strong enough to see the attack's behaviour rather than just its entry point.

Deepen your knowledge

NHI Mgmt Group covers identity security, NHI governance, and agentic AI through independent research, practitioner guides, and the NHI Foundation Level course. It is designed for security practitioners who need to connect identity controls to emerging AI and machine identity risk.
NHIMG Editorial Note
Published by the NHIMG editorial team on July 14, 2026.
Updated on October 13, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org