# TEMP.Zagros / MuddyWater Gemini-assisted custom malware

- ID: temp-zagros-gemini-malware-dev-2025
- Reported: 2025-11-05
- Researcher: Google Threat Intelligence Group
- Organization: Google GTIG
- AI role: attacker_uses_ai_as_operator (AI as operator)
- Confidence in AI involvement: not assessed
- Research / borderline: false
- Last reviewed: 2026-10-20
- Entry page: https://openattacks.ai/attacks/temp-zagros-gemini-malware-dev-2025/
- Entry JSON: https://openattacks.ai/api/attacks/temp-zagros-gemini-malware-dev-2025.json
- Browse title: TEMP.Zagros / MuddyWater use Gemini for custom malware
- Editorial summary: Iranian MuddyWater used 'student project' pretexts to get Gemini's help with web shells and C2. Pasting in a C2 domain and key exposed their infrastructure and aided disruption.
- Evidence class (catalog annotation): Provider report
- Source-stated target environments: Provider-side
- Stage hunts and conditional defenses: https://openattacks.ai/api/defenses/temp-zagros-gemini-malware-dev-2025.json

## Technique
Iranian TEMP.Zagros (MuddyWater) used Gemini with 'student project' pretexts to develop custom malware (web shells, Python C2). OPSEC failure: pasted script with hard-coded C2 domain and encryption key into Gemini, aiding disruption.

## Stack relevance (editorial)
Assessment: attacker\_tool\_only. Editorial applicability reviewed against the catalog source account; not a scan or independent incident verification.
The named AI product is used by the attacker. No reviewed mapping from owning that product to the reported victim conditions is available.
A product mention alone is not a victim-side applicability mapping. Selection does not verify affected versions, permissions or compromise.

## Initial access
Phishing from compromised corporate mailboxes (group TTP)

## AI tooling and models
- [Gemini](https://gemini.google.com/)

## Other tooling
- Custom web shells
- [Python](https://github.com/python/cpython) C2

## Victims and sectors
unknown

## Target geography
- unknown

## Attribution
TEMP.Zagros / MUDDYCOAST / MuddyWater; Iranian state-sponsored

## Scale and metrics
unknown

## Attack flow
Catalog reconstruction of the supplied source account. Unknowns and research caveats are preserved.
### step-1: Actor seeks custom malware assistance [access]
Requests use student-project pretexts.
Evidence: https://cloud.google.com/blog/topics/threat-intelligence/threat-actor-usage-of-ai-tools/

### step-2: Gemini helps develop code [ai]
Reported tasks include web shells and a Python C2.
Evidence: https://cloud.google.com/blog/topics/threat-intelligence/threat-actor-usage-of-ai-tools/

### step-3: Actor pastes operational details [execution]
Submitted code contains a hard-coded C2 domain and encryption key.
Evidence: https://cloud.google.com/blog/topics/threat-intelligence/threat-actor-usage-of-ai-tools/

### step-4: Operational exposure aids disruption [impact]
The research describes an OPSEC failure, rather than disclosing a complete downstream victim chain.
Evidence: https://cloud.google.com/blog/topics/threat-intelligence/threat-actor-usage-of-ai-tools/

Connections:
- step-1 -> step-2
- step-2 -> step-3
- step-3 -> step-4

## Stage defense and hunting recommendations
Editorial recommendations, not validated coverage. Source-controlled query starters are drafts. Custom-schema examples require telemetry collection and field mapping; absence of a mapping means not assessed. MagicSword policy opportunities require managed Windows scope and enforcement.
### step-1: Provider-side abuse investigation
- Visibility: Provider / operator records
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/provider.sigma.yml
- KQL query download: /api/detections/provider.kql
- SPL query download: /api/detections/provider.spl
- Hunt hypothesis: A model-provider investigation correlates related accounts, repeated offensive requests and shared infrastructure or exposed operator sessions.
- Required telemetry: Provider-owned account / request audit; Abuse-review findings and linked-account context; Lawfully available exposed operator-session evidence
- Investigate: Correlate accounts, request rates, infrastructure and source-described behavior in provider-owned records.
- Investigate: For victim-side defense, pivot to the reported execution or access stage rather than trying to detect attacker-side prompts.
- Limitation: Attacker-side planning is generally absent from victim SIEM logs. These templates require provider-owned audit data and do not identify AI use from a victim process alone.
- Qualification: The described development requests require provider-side records; a student-project pretext is not a reliable standalone signature.
- No direct MagicSword prevention claim is recorded for this stage.

### step-2: Provider-side abuse investigation
- Visibility: Provider / operator records
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/provider.sigma.yml
- KQL query download: /api/detections/provider.kql
- SPL query download: /api/detections/provider.spl
- Hunt hypothesis: A model-provider investigation correlates related accounts, repeated offensive requests and shared infrastructure or exposed operator sessions.
- Required telemetry: Provider-owned account / request audit; Abuse-review findings and linked-account context; Lawfully available exposed operator-session evidence
- Investigate: Correlate accounts, request rates, infrastructure and source-described behavior in provider-owned records.
- Investigate: For victim-side defense, pivot to the reported execution or access stage rather than trying to detect attacker-side prompts.
- Limitation: Attacker-side planning is generally absent from victim SIEM logs. These templates require provider-owned audit data and do not identify AI use from a victim process alone.
- No direct MagicSword prevention claim is recorded for this stage.

### step-3: Provider-side abuse investigation
- Visibility: Provider / operator records
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/provider.sigma.yml
- KQL query download: /api/detections/provider.kql
- SPL query download: /api/detections/provider.spl
- Hunt hypothesis: A model-provider investigation correlates related accounts, repeated offensive requests and shared infrastructure or exposed operator sessions.
- Required telemetry: Provider-owned account / request audit; Abuse-review findings and linked-account context; Lawfully available exposed operator-session evidence
- Investigate: Correlate accounts, request rates, infrastructure and source-described behavior in provider-owned records.
- Investigate: For victim-side defense, pivot to the reported execution or access stage rather than trying to detect attacker-side prompts.
- Limitation: Attacker-side planning is generally absent from victim SIEM logs. These templates require provider-owned audit data and do not identify AI use from a victim process alone.
- No direct MagicSword prevention claim is recorded for this stage.

### step-4: Provider-side abuse investigation
- Visibility: Provider / operator records
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/provider.sigma.yml
- KQL query download: /api/detections/provider.kql
- SPL query download: /api/detections/provider.spl
- Hunt hypothesis: A model-provider investigation correlates related accounts, repeated offensive requests and shared infrastructure or exposed operator sessions.
- Required telemetry: Provider-owned account / request audit; Abuse-review findings and linked-account context; Lawfully available exposed operator-session evidence
- Investigate: Correlate accounts, request rates, infrastructure and source-described behavior in provider-owned records.
- Investigate: For victim-side defense, pivot to the reported execution or access stage rather than trying to detect attacker-side prompts.
- Limitation: Attacker-side planning is generally absent from victim SIEM logs. These templates require provider-owned audit data and do not identify AI use from a victim process alone.
- No direct MagicSword prevention claim is recorded for this stage.


## MITRE ATLAS
Mappings are catalog annotations based on described behavior, not assignments or endorsements by MITRE.
- AML.T0016.002: Generative AI — The supplied source explicitly describes generative-model tooling assisting the reported activity; this mapping does not establish additional autonomy or victim impact.
  Technique: https://atlas.mitre.org/techniques/AML.T0016.002
  Evidence: https://cloud.google.com/blog/topics/threat-intelligence/threat-actor-usage-of-ai-tools/

## Defensive notes
Phishing-resistant controls; detect new custom C2; model providers can disrupt via leaked infra

## Sources
- https://cloud.google.com/blog/topics/threat-intelligence/threat-actor-usage-of-ai-tools/
