# esmailalansi/windows-threat-hunting-scripts architecture

> Architecture diagram of the GitHub repository esmailalansi/windows-threat-hunting-scripts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/esmailalansi/windows-threat-hunting-scripts
- Repository: https://github.com/esmailalansi/windows-threat-hunting-scripts

## Overview

This repository is a set of independent PowerShell threat-hunting scripts, not a single chained pipeline. An analyst runs a selected script to inspect Windows process/thread state, established network connections and executable paths, or common startup locations; each script reports investigation leads and can export them to CSV. The README documents these purposes and invocation/export options, but no source excerpts were provided, so implementation-level calls and internal layers cannot be verified.

Main entry points: [`Process-Analysis/Find-SuspiciousThreadStartAddresses.ps1`](https://github.com/esmailalansi/windows-threat-hunting-scripts/blob/main/Process-Analysis/Find-SuspiciousThreadStartAddresses.ps1) (Thread Address Hunt), [`Network-Threat-Hunting/Find-NetworkedProcessesInUserWritablePaths.ps1`](https://github.com/esmailalansi/windows-threat-hunting-scripts/blob/main/Network-Threat-Hunting/Find-NetworkedProcessesInUserWritablePaths.ps1) (Networked Process Hunt), [`Persistence-Detection/Get-WindowsStartupPersistence.ps1`](https://github.com/esmailalansi/windows-threat-hunting-scripts/blob/main/Persistence-Detection/Get-WindowsStartupPersistence.ps1) (Startup Inventory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_process["Process Analysis"]
  node_thread_script["Thread Address Hunt"]
end

subgraph group_network["Network Hunting"]
  node_network_script["Networked Process Hunt"]
end

subgraph group_persistence["Persistence Detection"]
  node_persistence_script["Startup Inventory"]
end

node_analyst(("Analyst"))
node_thread_data[("Threads and Modules")]
node_network_data[("TCP and Process Data")]
node_startup_data[("Registry and Startup Entries")]
node_csv["CSV Output"]

node_analyst -->|"runs"| node_thread_script
node_thread_script -->|"inspects"| node_thread_data
node_thread_script -->|"exports findings"| node_csv
node_analyst -->|"runs"| node_network_script
node_network_script -->|"checks connections"| node_network_data
node_network_script -->|"exports findings"| node_csv
node_analyst -->|"runs"| node_persistence_script
node_persistence_script -->|"inventories"| node_startup_data
node_persistence_script -->|"exports inventory"| node_csv

click node_thread_script "https://github.com/esmailalansi/windows-threat-hunting-scripts/blob/main/Process-Analysis/Find-SuspiciousThreadStartAddresses.ps1"
click node_network_script "https://github.com/esmailalansi/windows-threat-hunting-scripts/blob/main/Network-Threat-Hunting/Find-NetworkedProcessesInUserWritablePaths.ps1"
click node_persistence_script "https://github.com/esmailalansi/windows-threat-hunting-scripts/blob/main/Persistence-Detection/Get-WindowsStartupPersistence.ps1"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_thread_script toneBlue
class node_network_script,node_thread_data,node_network_data,node_startup_data toneAmber
class node_persistence_script toneMint
class node_analyst,node_csv toneIndigo
```

## Components

### Process Analysis

- [Thread Address Hunt](https://github.com/esmailalansi/windows-threat-hunting-scripts/blob/main/Process-Analysis/Find-SuspiciousThreadStartAddresses.ps1): `Process-Analysis/Find-SuspiciousThreadStartAddresses.ps1`

### Network Hunting

- [Networked Process Hunt](https://github.com/esmailalansi/windows-threat-hunting-scripts/blob/main/Network-Threat-Hunting/Find-NetworkedProcessesInUserWritablePaths.ps1): `Network-Threat-Hunting/Find-NetworkedProcessesInUserWritablePaths.ps1`

### Persistence Detection

- [Startup Inventory](https://github.com/esmailalansi/windows-threat-hunting-scripts/blob/main/Persistence-Detection/Get-WindowsStartupPersistence.ps1): `Persistence-Detection/Get-WindowsStartupPersistence.ps1`

### Other components

- **Analyst**
- **Threads and Modules**
- **TCP and Process Data**
- **Registry and Startup Entries**
- **CSV Output**

## Connections

- Analyst → Thread Address Hunt: runs (evidence: `README.md`)
- Thread Address Hunt → Threads and Modules: inspects (evidence: `README.md`)
- Thread Address Hunt → CSV Output: exports findings (evidence: `README.md`)
- Analyst → Networked Process Hunt: runs (evidence: `README.md`)
- Networked Process Hunt → TCP and Process Data: checks connections (evidence: `README.md`)
- Networked Process Hunt → CSV Output: exports findings (evidence: `README.md`)
- Analyst → Startup Inventory: runs (evidence: `README.md`)
- Startup Inventory → Registry and Startup Entries: inventories (evidence: `README.md`)
- Startup Inventory → CSV Output: exports inventory (evidence: `README.md`)
