Detection queries Research demonstrationWindows · Linux

PROMPTLOCK LLM-generated Lua ransomware (PoC)

A Go ransomware proof of concept uses an LLM to generate Lua scripts for recon, data theft and encryption on Windows and Linux. It has not been reported as an active campaign.

What happened

Cross-platform Go ransomware PoC that uses an LLM to dynamically generate and execute malicious Lua for filesystem recon, exfil, and encryption on Windows and Linux. ESET described related research as first known AI-written ransomware using local gpt-oss:20b.

Experimental ransomware using local/remote LLM to generate Lua scripts at runtime

Read the original sourceAdditional source: eset.com

How it happened

Select a stage to explore its defenses
Detect this stage
Detect this stage
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. Proof of concept / experimental; not reported as active campaign.

  1. 01 · PoC starts in a research setting

    This entry is a ransomware proof of concept, not a confirmed victim campaign.

    Source for step 1
  2. 02 · LLM generates Lua at runtime

    A Go program requests filesystem-related malicious scripts.

    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 · Generated Lua is executed

    The research describes reconnaissance, exfiltration and encryption logic.

    Hunt: Untrusted content or a changed tool definition precedes a file read, command, or remote call outside the user's intended task.

    Process logs cannot recover model intent. Remote connectors and in-process interpreters may produce no local child process. Prompt content alone is not a reliable signature.

    Source for step 3
  4. 04 · Research demonstrates ransomware behavior

    The PoC demonstrates potential Windows and Linux impact.

    Hunt: A process rapidly enumerates or modifies sensitive files and is followed by encryption, export or a ransom-related artifact.

    A file-write burst is not proof of ransomware; in-process interpreters may not spawn a separate executable.

    Source for step 4

Why it matters

Reported impact: The PoC demonstrates potential Windows and Linux impact.

Check these source-linked conditions against your setup.

WindowsLinux

The PoC demonstrates LLM-generated Lua executing on Windows or Linux.

Conditions to check
  • This is experimental research, not a reported active ransomware campaign.

Source-linked applicability guidance. Confirm current scope in the original report.

Read the original report

What you can do

Protection & prevention

Start here

Review interpreter execution and access to files that an untrusted program could encrypt.

Treat unexpected local LLM + script generation as high signal; ransomware fundamentals unchanged

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

Review the original guidance Additional source 2
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.

02LLM generates Lua at runtimeUnexpected process → model serviceCustom schema · Draft

A Go program requests filesystem-related malicious scripts.

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.
03Generated Lua is executedUnexpected agent tool useCustom schema · Draft

The research describes reconnaissance, exfiltration and encryption logic.

What to look for

Untrusted content or a changed tool definition precedes a file read, command, or remote call outside the user's intended task.

The Go process embeds a Lua execution path; child-process hunts alone will miss in-process Lua.

Visibility: Defender-side logs where collected

Required logs

  • Agent tool-call audit records with session / tool / destination
  • Tool-definition and approval changes
  • Endpoint process, file-access and network evidence where available

Coverage limit. Process logs cannot recover model intent. Remote connectors and in-process interpreters may produce no local child process. Prompt content alone is not a reliable signature.

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 agent tool use
id: c709e384-0e11-479e-ab4d-3a06e2431e4b
status: experimental
description: Untrusted content or a changed tool definition precedes a file
  read, command, or remote call outside the user's intended task.
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:
      - agent.tool.call
      - agent.tool.definition.change
  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 ("agent.tool.call", "agent.tool.definition.change")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated desc
SPL
Draft SPLDownload SPL
sourcetype="openattacks:audit"
EventType IN ("agent.tool.call", "agent.tool.definition.change")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _time
Investigation steps
  1. Join input provenance, tool descriptions and calls by session ID and compare the action to the approved task.
  2. Inspect child processes and destinations; record whether execution was in-process, local, or through a remote SaaS connector.
04Research demonstrates ransomware behaviorCollection / encryption behaviorCustom schema · Draft

The PoC demonstrates potential Windows and Linux impact.

What to look for

A process rapidly enumerates or modifies sensitive files and is followed by encryption, export or a ransom-related artifact.

Visibility: Defender-side logs where collected

Required logs

  • File-operation rates and process attribution
  • Ransomware / DLP behavior alerts
  • Canary files and recovery / backup audit

Coverage limit. A file-write burst is not proof of ransomware; in-process interpreters may not spawn a separate executable.

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 - Collection / encryption behavior
id: 0b1098da-0957-4f77-a2a4-e89a5a2e1a36
status: experimental
description: A process rapidly enumerates or modifies sensitive files and is
  followed by encryption, export or a ransom-related artifact.
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:
      - file.bulk.modify
      - data.export
  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 ("file.bulk.modify", "data.export")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated desc
SPL
Draft SPLDownload SPL
sourcetype="openattacks:audit"
EventType IN ("file.bulk.modify", "data.export")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _time
Investigation steps
  1. Correlate file bursts, extension changes and outbound transfer to the same process and identity.
  2. Validate against bulk backup / archiving activity and preserve the research-only qualification of a PoC.
Technical detailsTooling, impact & MITRE ATLAS

Attack context

AI's role
LLM-generated malware

Tooling as reported

AI products, models and artifacts

  • LLM at runtime
  • Lua script generation
  • gpt-oss:20b (ESET write-up)

Other tooling

Detection rules

  • Review attack-specific indicatorsGUIDANCE

    Monitor for the techniques described in PROMPTLOCK LLM-generated Lua ransomware PoC. Refer to sources for specific IOCs and TTPs.

Source defensive notes

Treat unexpected local LLM + script generation as high signal; ransomware fundamentals unchanged

MITRE ATLAS

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

AML.T0102Generate Malicious Commands

The ransomware proof of concept generates Lua scripts at runtime. Source

Sources & research credit

2 sources

Research by Google GTIG; ESET · Google GTIG / ESET

  1. cloud.google.com
  2. eset.com
Record & downloads
Source record name
PROMPTLOCK LLM-generated Lua ransomware PoC
Entry ID
promptlock-gtig-eset-2025
Catalog review
October 20, 2026
Category
adversary-use-of-ai
AI involvement confidence
unverified