Detection queries Malware analysis

PROMPTFLUX Gemini-powered self-modifying VBScript dropper

An experimental VBScript dropper queries Gemini for antivirus-evasion rewrites. The analyzed self-update function was commented out, so active self-rewriting is not established.

What happened

VBScript dropper with decoy installer; 'Thinking Robot' module POSTs to Gemini API (gemini-1.5-flash-latest) with hard-coded key asking for VBScript AV-evasion rewrites; intends Startup persistence and removable-drive spread. Self-update function commented out in analyzed samples.

Experimental LLM-augmented malware (self-obfuscation via Gemini API)

Read the original source

How it happened

Select a stage to explore its defenses MagicSword policy opportunity
Detect this stage
MagicSword Detect this stage
Select a stage · Drag to explore · + / − to zoom · Dashed edges are loopsSelect a stage · Arrows show reported connectionsResearch / qualified account
Read the flow as text & sources

A catalog reconstruction of the supplied source account. GTIG classifies as experimental/dev; incomplete features; no demonstrated ability to compromise victims.

  1. 01 · Initial delivery is not established

    The analyzed VBScript includes a decoy installer, but the initial route is unknown.

    Source for step 1
  2. 02 · Thinking Robot queries Gemini

    A hard-coded key supports requests for VBScript evasion rewrites.

    Hunt: An unexpected script, implant or local model client communicates with a model service near command execution, collection or file modification.

    Connecting to a legitimate model domain does not establish malicious use or reveal returned code. Local / in-process models can evade network-only hunts.

    Source for step 2
  3. 03 · Dropper contains a rewrite workflow

    The analyzed sample contains code for self-modification.

    Hunt: A script host or shell runs encoded content, a remote URL, or inline script syntax, then downloads or launches a payload.

    Encoded commands and remote administration can be legitimate. This does not cover every script host, in-process execution, or non-Windows branch.

    MagicSword policy opportunity · Windows VBScript execution. The analyzed sample's self-update function was commented out; blocking it is not proof of stopping an active self-rewrite chain.

    Source for step 3
  4. 04 · Self-update is commented out

    Startup persistence and removable-drive spread are intended behavior; the analyzed rewrite function was not active.

    Source for step 4

Why it matters

Reported impact: Experimental; Google disabled associated assets; using the named AI products does not by itself establish exposure.

Read the original report

What you can do

Protection & prevention

Monitor Gemini API keys embedded in scripts; block unexpected generative API from endpoints

Catalog defensive guidance based on the reported behavior. Confirm scope and current mitigations in the original source.

Review the original guidance
Explore scoped MagicSword policy options

Requires an enforced Windows policy covering the actual executable. Audit mode records events without blocking.

Restrict script / execution utilities

Use MagicSword to review and enforce a policy restricting unneeded Windows script hosts, shells or installer utilities identified in this branch.

Applies to: Windows VBScript execution. The analyzed sample's self-update function was commented out; blocking it is not proof of stopping an active self-rewrite chain.

Policy opportunity, not tested incident coverage. Requires enrolled Windows devices, a policy covering the actual executable, and enforcement. Audit mode records decisions without blocking; allowed tools and in-process / cloud actions can remain reachable.

Explore the policy control View mapped attack stage
Investigate each phase

Detection queries

Draft query starters grouped by the attack stages where they apply.

Download stage pack

Start with the logs you collect. Each hunt identifies its required visibility, field mapping and limits. Queries are catalog-authored drafts using reusable behavior profiles; test with known activity and your normal baseline before alerting.

02Thinking Robot queries GeminiUnexpected process → model serviceCustom schema · Draft

A hard-coded key supports requests for VBScript evasion rewrites.

What to look for

An unexpected script, implant or local model client communicates with a model service near command execution, collection or file modification.

Visibility: Defender-side logs where collected

Required logs

  • Per-process network / DNS records
  • AI-service request logs where available
  • Process and file behavior on the calling host

Coverage limit. Connecting to a legitimate model domain does not establish malicious use or reveal returned code. Local / in-process models can evade network-only hunts.

Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.

Sigma
Draft SigmaDownload Sigma
title: Hunt - Unexpected process → model service
id: 8560daf7-ecd1-4f2b-ad09-b794bb56a394
status: experimental
description: An unexpected script, implant or local model client communicates
  with a model service near command execution, collection or file modification.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
  - Authorized activity matching this broad hunt; baseline and investigate
    before alerting.
level: low
logsource:
  category: application
  product: openattacks_audit
  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
    Target and CorrelationId from the required source logs first.
detection:
  selection:
    EventType:
      - model.connection
      - model.invoke
  condition: selection
KQL
Draft KQLDownload KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("model.connection", "model.invoke")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated desc
SPL
Draft SPLDownload SPL
sourcetype="openattacks:audit"
EventType IN ("model.connection", "model.invoke")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _time
Investigation steps
  1. Join the network connection to the process tree and the actions before and after the response.
  2. Compare with approved AI integrations; inspect local model listeners for PoCs that do not use a hosted API.
03Dropper contains a rewrite workflowSuspicious Windows script executionNative logs · Draft

The analyzed sample contains code for self-modification.

What to look for

A script host or shell runs encoded content, a remote URL, or inline script syntax, then downloads or launches a payload.

Visibility: Defender-side logs where collected

Required logs

  • Windows process creation: Sysmon Event 1 or Defender DeviceProcessEvents
  • PowerShell script-block logging when enabled
  • Download / network and installer events

Coverage limit. Encoded commands and remote administration can be legitimate. This does not cover every script host, in-process execution, or non-Windows branch.

Windows process candidates. Sigma uses normalized process_creation fields; KQL requires Defender for Endpoint; SPL requires the Sysmon XML sourcetype. Tune collectors, fields and baselines before use.

Sigma
Draft SigmaDownload Sigma
title: Hunt - Suspicious Windows script execution
id: 2bb88802-9f03-4d99-a192-fe44c9484e8b
status: experimental
description: A script host or shell runs encoded content, a remote URL, or
  inline script syntax, then downloads or launches a payload.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
  - Authorized activity matching this broad hunt; baseline and investigate
    before alerting.
level: low
logsource:
  category: process_creation
  product: windows
detection:
  selection:
    Image|endswith:
      - \powershell.exe
      - \pwsh.exe
      - \mshta.exe
      - \wscript.exe
      - \cscript.exe
    CommandLine|contains:
      - -enc
      - http
      - FromBase64String
      - "javascript:"
      - "vbscript:"
  condition: selection
KQL
Draft KQLDownload KQL
// Draft hunt; requires Defender for Endpoint process telemetry for this OS.
DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName in~ ("powershell.exe", "pwsh.exe", "mshta.exe", "wscript.exe", "cscript.exe")
| where ProcessCommandLine contains "-enc" or ProcessCommandLine contains "http" or ProcessCommandLine contains "FromBase64String" or ProcessCommandLine contains "javascript:" or ProcessCommandLine contains "vbscript:"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, SHA1
| order by Timestamp desc
SPL
Draft SPLDownload SPL
sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
Image IN ("*\\powershell.exe", "*\\pwsh.exe", "*\\mshta.exe", "*\\wscript.exe", "*\\cscript.exe")
CommandLine IN ("*-enc*", "*http*", "*FromBase64String*", "*javascript:*", "*vbscript:*")
| table _time host User Image CommandLine ParentImage ParentCommandLine
| sort - _time
Investigation steps
  1. Follow the parent and child process tree and recover the script or URL from logs without executing it.
  2. Correlate the payload's signer/hash, persistence, and network activity; baseline approved automation.
Technical detailsTooling, impact & MITRE ATLAS

Attack context

AI's role
LLM-generated malware

Tooling as reported

AI products, models and artifacts

Other tooling

  • VBScript
  • Startup folder persistence

Targets and reported impact

Reported scale / exposure
Experimental; Google disabled associated assets

Reported attribution

unattributed; financially motivated lure filenames suggested

Structured attribution

Actor
unattributed
Motivation
financially-motivated

Detection rules

  • Review attack-specific indicatorsGUIDANCE

    Monitor for the techniques described in PROMPTFLUX Gemini API self-modifying VBScript dropper. Refer to sources for specific IOCs and TTPs.

Source defensive notes

Monitor Gemini API keys embedded in scripts; block unexpected generative API from endpoints

MITRE ATLAS

AI-specific catalog annotations based on the reported behavior; these are not MITRE case-study assignments.

AML.T0102Generate Malicious Commands

A dropper requests generated VBScript rewrites; the analyzed self-update routine is commented out. Source

Sources & research credit

1 source

Research by Google Threat Intelligence Group · Google GTIG

  1. cloud.google.com
Record & downloads
Source record name
PROMPTFLUX Gemini API self-modifying VBScript dropper
Entry ID
promptflux-gtig-2025-06
Catalog review
October 20, 2026
Category
adversary-use-of-ai
AI involvement confidence
unverified