# arj141/process-hider architecture

> Architecture diagram of the GitHub repository arj141/process-hider, 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/arj141/process-hider
- Repository: https://github.com/arj141/process-hider

## Overview

Process Hider is a Windows executable with two runtime modes: external launch locates Task Manager and injects a manually mapped image; execution inside Task Manager installs a system-information hook that filters process entries. The graph also captures the custom no-CRT support layer. The branch and injection relationships are supported by the entry-point and external excerpts; the README documents the filtering behavior. Several implementation details are unsampled, so their internal connections are not expanded.

Main entry points: [`Process-Hider/process_hider/external/external.cpp`](https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/external/external.cpp) (External injector), [`Process-Hider/entry_point.cpp`](https://github.com/arj141/process-hider/blob/main/Process-Hider/entry_point.cpp) (Mode entry), [`Process-Hider/process_hider/internal/internal.cpp`](https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/internal/internal.cpp) (Process filtering), [`Process-Hider/sdk/source/handler.cpp`](https://github.com/arj141/process-hider/blob/main/Process-Hider/sdk/source/handler.cpp) (Heap management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime Modes"]
  node_entry["Mode entry<br/>[entry_point.cpp]"]
end

subgraph group_inject["External Mapping"]
  node_external["External injector<br/>[external.cpp]"]
  node_target(("Task Manager"))
  node_discovery["Process discovery<br/>[external.cpp]"]
  node_image["PE image mapping<br/>[external.cpp]"]
  node_parameters["Loader parameters<br/>[external.cpp]"]
  node_remote["Remote execution<br/>[external.cpp]"]
end

subgraph group_hook["Process Filtering"]
  node_hook["Hook lifecycle<br/>[internal.cpp]"]
  node_patch["Trampoline patching<br/>[internal.cpp]"]
  node_filter["Process filtering<br/>[internal.cpp]"]
end

subgraph group_sdk["Custom SDK"]
  node_win["Windows API wrappers<br/>[windows.cpp]"]
  node_heap["Heap management<br/>[handler.cpp]"]
  node_memory["Memory primitives<br/>[memory.cpp]"]
  node_strings["String utilities<br/>[string.cpp]"]
  node_wide["Wide strings<br/>[wstring.cpp]"]
  node_sdktypes["SDK types<br/>[sdk.hpp]"]
  node_xor["Literal obfuscation<br/>[xorstr.hpp]"]
end

node_user(("Program launch"))
node_system{{"Windows native APIs"}}

node_user -->|"starts"| node_entry
node_entry -->|"runs external mode"| node_external
node_entry -->|"runs internal mode"| node_hook
node_external -->|"finds target"| node_discovery
node_discovery -->|"locates process"| node_target
node_external -->|"maps image"| node_image
node_external -->|"prepares parameters"| node_parameters
node_external -->|"starts remote thread"| node_remote
node_remote -->|"executes in"| node_target
node_entry -.->|"passes loader"| node_parameters
node_hook -->|"installs or restores"| node_patch
node_patch -.->|"patches native query"| node_system
node_system -->|"invokes callback"| node_filter
node_filter -->|"calls original trampoline"| node_system
node_filter -->|"reads hidden names"| node_parameters
node_external -->|"uses API wrappers"| node_win
node_hook -->|"uses API wrappers"| node_win
node_win -->|"resolves native APIs"| node_system
node_heap -->|"resolves heap routines"| node_win
node_heap -->|"clears fallback"| node_memory
node_strings -->|"allocates buffers"| node_heap
node_wide -.->|"allocates buffers"| node_heap
node_filter -->|"matches names"| node_wide
node_sdktypes -->|"includes utility"| node_xor

click node_entry "https://github.com/arj141/process-hider/blob/main/Process-Hider/entry_point.cpp"
click node_external "https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/external/external.cpp"
click node_discovery "https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/external/external.cpp"
click node_image "https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/external/external.cpp"
click node_parameters "https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/external/external.cpp"
click node_remote "https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/external/external.cpp"
click node_hook "https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/internal/internal.cpp"
click node_patch "https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/internal/internal.cpp"
click node_filter "https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/internal/internal.cpp"
click node_win "https://github.com/arj141/process-hider/blob/main/Process-Hider/sdk/source/windows.cpp"
click node_heap "https://github.com/arj141/process-hider/blob/main/Process-Hider/sdk/source/handler.cpp"
click node_memory "https://github.com/arj141/process-hider/blob/main/Process-Hider/sdk/source/memory.cpp"
click node_strings "https://github.com/arj141/process-hider/blob/main/Process-Hider/sdk/source/string.cpp"
click node_wide "https://github.com/arj141/process-hider/blob/main/Process-Hider/sdk/source/wstring.cpp"
click node_sdktypes "https://github.com/arj141/process-hider/blob/main/Process-Hider/sdk/sdk.hpp"
click node_xor "https://github.com/arj141/process-hider/blob/main/Process-Hider/sdk/util/xorstr.hpp"

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_entry toneBlue
class node_external,node_target,node_discovery,node_image,node_parameters,node_remote toneAmber
class node_hook,node_patch,node_filter,node_system toneMint
class node_win,node_heap,node_memory,node_strings,node_wide,node_sdktypes,node_xor toneRose
class node_user toneIndigo
```

## Components

### Runtime Modes

- [Mode entry](https://github.com/arj141/process-hider/blob/main/Process-Hider/entry_point.cpp): `Process-Hider/entry_point.cpp`

### External Mapping

- [External injector](https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/external/external.cpp): `Process-Hider/process_hider/external/external.cpp`
- **Task Manager**
- [Process discovery](https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/external/external.cpp): `Process-Hider/process_hider/external/external.cpp`
- [PE image mapping](https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/external/external.cpp): `Process-Hider/process_hider/external/external.cpp`
- [Loader parameters](https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/external/external.cpp): `Process-Hider/process_hider/external/external.cpp`
- [Remote execution](https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/external/external.cpp): `Process-Hider/process_hider/external/external.cpp`

### Process Filtering

- [Hook lifecycle](https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/internal/internal.cpp): `Process-Hider/process_hider/internal/internal.cpp`
- [Trampoline patching](https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/internal/internal.cpp): `Process-Hider/process_hider/internal/internal.cpp`
- [Process filtering](https://github.com/arj141/process-hider/blob/main/Process-Hider/process_hider/internal/internal.cpp): `Process-Hider/process_hider/internal/internal.cpp`

### Custom SDK

- [Windows API wrappers](https://github.com/arj141/process-hider/blob/main/Process-Hider/sdk/source/windows.cpp): `Process-Hider/sdk/source/windows.cpp`
- [Heap management](https://github.com/arj141/process-hider/blob/main/Process-Hider/sdk/source/handler.cpp): `Process-Hider/sdk/source/handler.cpp`
- [Memory primitives](https://github.com/arj141/process-hider/blob/main/Process-Hider/sdk/source/memory.cpp): `Process-Hider/sdk/source/memory.cpp`
- [String utilities](https://github.com/arj141/process-hider/blob/main/Process-Hider/sdk/source/string.cpp): `Process-Hider/sdk/source/string.cpp`
- [Wide strings](https://github.com/arj141/process-hider/blob/main/Process-Hider/sdk/source/wstring.cpp): `Process-Hider/sdk/source/wstring.cpp`
- [SDK types](https://github.com/arj141/process-hider/blob/main/Process-Hider/sdk/sdk.hpp): `Process-Hider/sdk/sdk.hpp`
- [Literal obfuscation](https://github.com/arj141/process-hider/blob/main/Process-Hider/sdk/util/xorstr.hpp): `Process-Hider/sdk/util/xorstr.hpp`

### Other components

- **Program launch**
- **Windows native APIs**

## Connections

- Program launch → Mode entry: starts (evidence: `Process-Hider/entry_point.cpp`)
- Mode entry → External injector: runs external mode (evidence: `Process-Hider/entry_point.cpp`)
- Mode entry → Hook lifecycle: runs internal mode (evidence: `Process-Hider/entry_point.cpp`)
- External injector → Process discovery: finds target (evidence: `Process-Hider/process_hider/external/external.cpp`)
- Process discovery → Task Manager: locates process (evidence: `Process-Hider/process_hider/external/external.cpp`)
- External injector → PE image mapping: maps image (evidence: `Process-Hider/process_hider/external/external.cpp`)
- External injector → Loader parameters: prepares parameters (evidence: `Process-Hider/process_hider/external/external.cpp`)
- External injector → Remote execution: starts remote thread (evidence: `Process-Hider/process_hider/external/external.cpp`)
- Remote execution → Task Manager: executes in (evidence: `Process-Hider/process_hider/external/external.cpp`)
- Mode entry → Loader parameters: passes loader (evidence: `README.md`)
- Hook lifecycle → Trampoline patching: installs or restores (evidence: `Process-Hider/process_hider/internal/internal.cpp`)
- Trampoline patching → Windows native APIs: patches native query (evidence: `README.md`)
- Windows native APIs → Process filtering: invokes callback (evidence: `Process-Hider/process_hider/internal/internal.cpp`)
- Process filtering → Windows native APIs: calls original trampoline (evidence: `Process-Hider/process_hider/internal/internal.cpp`)
- Process filtering → Loader parameters: reads hidden names (evidence: `Process-Hider/process_hider/internal/internal.cpp`)
- External injector → Windows API wrappers: uses API wrappers (evidence: `Process-Hider/process_hider/external/external.cpp`)
- Hook lifecycle → Windows API wrappers: uses API wrappers (evidence: `Process-Hider/process_hider/internal/internal.cpp`)
- Windows API wrappers → Windows native APIs: resolves native APIs (evidence: `Process-Hider/sdk/source/windows.cpp`)
- Heap management → Windows API wrappers: resolves heap routines (evidence: `Process-Hider/sdk/source/handler.cpp`)
- Heap management → Memory primitives: clears fallback (evidence: `Process-Hider/sdk/source/handler.cpp`)
- String utilities → Heap management: allocates buffers (evidence: `Process-Hider/sdk/source/string.cpp`)
- Wide strings → Heap management: allocates buffers
- Process filtering → Wide strings: matches names (evidence: `Process-Hider/process_hider/internal/internal.cpp`)
- SDK types → Literal obfuscation: includes utility (evidence: `Process-Hider/sdk/sdk.hpp`)
