# eladshamir/internal-monologue architecture

> Architecture diagram of the GitHub repository eladshamir/internal-monologue, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eladshamir/internal-monologue
- Repository: https://github.com/eladshamir/internal-monologue

## Overview

Internal Monologue is a C# proof of concept for eliciting NetNTLM challenge-response material through the local Windows authentication stack, with options to downgrade settings and impersonate users. The executable parses options and invokes the engine; the engine performs the attack and accumulates response data for display. The README also describes restoration, Credential Guard compatibility behavior, and subsequent hash cracking, but the excerpt does not expose all corresponding implementation paths, so those links are documented rather than asserted as inspected calls.

Main entry points: [`InternalMonologue/InternalMonologue.cs`](https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/InternalMonologue.cs) (Attack orchestration), [`InternalMonologue/InternalMonologueConsole.cs`](https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/InternalMonologueConsole.cs) (Output collector), [`InternalMonologueExe/Program.cs`](https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologueExe/Program.cs) (CLI runner), [`InternalMonologue/InternalMonologueResponse.cs`](https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/InternalMonologueResponse.cs) (Response record)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entrypoints["Entry Points"]
  node_cli["CLI runner<br/>[Program.cs]"]
  node_dllentry["DLL entry<br/>[Class1.cs]"]
end

subgraph group_engine["Attack Engine"]
  node_core["Attack orchestration"]
  node_registry["NTLM settings"]
  node_token["Token impersonation"]
  node_sspi["Local NTLM exchange"]
end

subgraph group_results["Response Output"]
  node_collector["Output collector"]
  node_response["Response record"]
  node_formatter["String helpers"]
end

node_operator(("Operator"))
node_windows["Windows security APIs"]
node_cracking["Hash cracking"]

node_operator -->|"supplies options"| node_cli
node_cli -->|"invokes"| node_core
node_dllentry -->|"invokes"| node_core
node_core -.->|"changes and restores"| node_registry
node_core -.->|"enumerates and impersonates"| node_token
node_core -.->|"elicits response"| node_sspi
node_registry -.->|"updates registry"| node_windows
node_token -->|"uses process tokens"| node_windows
node_sspi -.->|"uses SSPI"| node_windows
node_core -->|"adds output"| node_collector
node_core -->|"creates responses"| node_response
node_collector -->|"stores responses"| node_response
node_collector -->|"uses whitespace checks"| node_formatter
node_cli -->|"prints output"| node_collector
node_response -.->|"can be cracked downstream"| node_cracking

click node_cli "https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologueExe/Program.cs"
click node_dllentry "https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologueDll/Class1.cs"
click node_core "https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/InternalMonologue.cs"
click node_registry "https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/InternalMonologue.cs"
click node_token "https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/InternalMonologue.cs"
click node_sspi "https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/InternalMonologue.cs"
click node_collector "https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/InternalMonologueConsole.cs"
click node_response "https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/InternalMonologueResponse.cs"
click node_formatter "https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/StringExtensions.cs"

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_cli,node_dllentry toneBlue
class node_core,node_registry,node_token,node_sspi toneAmber
class node_collector,node_response,node_formatter,node_windows toneMint
class node_operator,node_cracking toneIndigo
```

## Components

### Entry Points

- [CLI runner](https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologueExe/Program.cs): `InternalMonologueExe/Program.cs`
- [DLL entry](https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologueDll/Class1.cs): `InternalMonologueDll/Class1.cs`

### Attack Engine

- [Attack orchestration](https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/InternalMonologue.cs): `InternalMonologue/InternalMonologue.cs`
- [NTLM settings](https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/InternalMonologue.cs): `InternalMonologue/InternalMonologue.cs`
- [Token impersonation](https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/InternalMonologue.cs): `InternalMonologue/InternalMonologue.cs`
- [Local NTLM exchange](https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/InternalMonologue.cs): `InternalMonologue/InternalMonologue.cs`

### Response Output

- [Output collector](https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/InternalMonologueConsole.cs): `InternalMonologue/InternalMonologueConsole.cs`
- [Response record](https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/InternalMonologueResponse.cs): `InternalMonologue/InternalMonologueResponse.cs`
- [String helpers](https://github.com/eladshamir/internal-monologue/blob/master/InternalMonologue/StringExtensions.cs): `InternalMonologue/StringExtensions.cs`

### Other components

- **Operator**
- **Windows security APIs**
- **Hash cracking**

## Connections

- Operator → CLI runner: supplies options (evidence: `InternalMonologueExe/Program.cs`)
- CLI runner → Attack orchestration: invokes (evidence: `InternalMonologueExe/Program.cs`)
- DLL entry → Attack orchestration: invokes (evidence: `InternalMonologueDll/Class1.cs`)
- Attack orchestration → NTLM settings: changes and restores (evidence: `README.md`)
- Attack orchestration → Token impersonation: enumerates and impersonates (evidence: `README.md`)
- Attack orchestration → Local NTLM exchange: elicits response (evidence: `README.md`)
- NTLM settings → Windows security APIs: updates registry (evidence: `README.md`)
- Token impersonation → Windows security APIs: uses process tokens (evidence: `InternalMonologue/InternalMonologue.cs`)
- Local NTLM exchange → Windows security APIs: uses SSPI (evidence: `README.md`)
- Attack orchestration → Output collector: adds output (evidence: `InternalMonologue/InternalMonologue.cs`)
- Attack orchestration → Response record: creates responses (evidence: `InternalMonologue/InternalMonologue.cs`)
- Output collector → Response record: stores responses (evidence: `InternalMonologue/InternalMonologueConsole.cs`)
- Output collector → String helpers: uses whitespace checks (evidence: `InternalMonologue/InternalMonologueConsole.cs`)
- CLI runner → Output collector: prints output (evidence: `InternalMonologueExe/Program.cs`)
- Response record → Hash cracking: can be cracked downstream (evidence: `README.md`)
