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
How it happened
Read the flow as text & sources
A catalog reconstruction of the supplied source account. Proof of concept / experimental; not reported as active campaign.
- 01 · PoC starts in a research setting
This entry is a ransomware proof of concept, not a confirmed victim campaign.
Source for step 1 - 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 - 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 - 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.
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.
What you can do
Protection & prevention
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.
Detection queries
Draft query starters grouped by the attack stages where they apply.
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
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
// 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 descSPL
sourcetype="openattacks:audit"
EventType IN ("model.connection", "model.invoke")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _timeInvestigation steps
- Join the network connection to the process tree and the actions before and after the response.
- 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
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
// 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 descSPL
sourcetype="openattacks:audit"
EventType IN ("agent.tool.call", "agent.tool.definition.change")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _timeInvestigation steps
- Join input provenance, tool descriptions and calls by session ID and compare the action to the approved task.
- 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
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
// 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 descSPL
sourcetype="openattacks:audit"
EventType IN ("file.bulk.modify", "data.export")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _timeInvestigation steps
- Correlate file bursts, extension changes and outbound transfer to the same process and identity.
- 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.
The ransomware proof of concept generates Lua scripts at runtime. Source
Sources & research credit
2 sourcesResearch by Google GTIG; ESET · Google GTIG / ESET
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