# govolution/avet architecture

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

- Interactive diagram: https://gitdiagram.com/govolution/avet
- Repository: https://github.com/govolution/avet

## Overview

AVET is a Windows executable payload-evasion toolbox. Its principal workflow selects evasion checks, obtains payload/key/metadata, decodes the payload, and executes it using a chosen method; README documents flexible retrieval, encoding, injection, and process hollowing options. A separate workflow generates adversarial PE examples using a MalConv detector and practical byte manipulations. Edges follow the sampled C/Python references or README; unsampled implementation details are not inferred.

Main entry points: [`source/implementations/gen_adversarial_exe/genetic_optimizer.py`](https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/genetic_optimizer.py) (Genetic optimizer), [`source/avet.c`](https://github.com/govolution/avet/blob/master/source/avet.c) (AVET executable), [`source/avetsvc.c`](https://github.com/govolution/avet/blob/master/source/avetsvc.c) (Service runtime), [`source/implementations/payload_execution_method`](https://github.com/govolution/avet/tree/master/source/implementations/payload_execution_method) (Payload execution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Payload runtime"]
  node_avet["AVET executable<br/>[avet.c]"]
  node_service["Service runtime<br/>[avetsvc.c]"]
end

subgraph group_impl["Runtime techniques"]
  node_evasion["Sandbox checks"]
  node_retrieval["Payload retrieval"]
  node_encoding["Payload decoding"]
  node_command["Command execution"]
  node_execute["Payload execution"]
  node_hollow32["32-bit hollowing<br/>[hollowing32.h]"]
  node_helper64["64-bit PE helpers"]
  node_debug["Debug output<br/>[debug_print.h]"]
end

subgraph group_adversarial["Adversarial examples"]
  node_optimizer["Genetic optimizer"]
  node_malconv["MalConv detector<br/>[malconv.py]"]
  node_extend["PE extension<br/>[extend.py]"]
  node_dos["DOS manipulations<br/>[full_dos.py]"]
  node_padding["PE padding<br/>[padding.py]"]
  node_partialdos["Partial DOS edits<br/>[partial_dos.py]"]
  node_section["Section injection"]
  node_shift["PE shifting<br/>[shift.py]"]
end

subgraph group_utilities["Data utilities"]
  node_datautil["Byte-file utilities<br/>[data_utility.h]"]
  node_keygen["Key generator<br/>[generate_key.c]"]
  node_rawtoc["Raw-to-C converter<br/>[data_raw_to_c.c]"]
end

node_operator(("Tool user"))

node_operator -->|"runs"| node_avet
node_avet -->|"runs checks"| node_evasion
node_avet -->|"gets payload"| node_retrieval
node_avet -->|"decodes payload"| node_encoding
node_avet -->|"executes payload"| node_execute
node_avet -->|"runs command"| node_command
node_service -->|"runs checks"| node_evasion
node_service -->|"gets payload"| node_retrieval
node_service -->|"decodes payload"| node_encoding
node_service -->|"executes payload"| node_execute
node_execute -.->|"supports hollowing"| node_hollow32
node_hollow32 -.->|"uses helpers"| node_helper64
node_avet -->|"logs through"| node_debug
node_service -->|"logs through"| node_debug
node_optimizer -->|"scores candidates"| node_malconv
node_optimizer -->|"applies manipulation"| node_extend
node_optimizer -->|"applies manipulation"| node_dos
node_optimizer -->|"applies manipulation"| node_padding
node_optimizer -->|"applies manipulation"| node_partialdos
node_optimizer -->|"applies manipulation"| node_section
node_optimizer -->|"applies manipulation"| node_shift
node_keygen -->|"writes key"| node_datautil
node_rawtoc -->|"reads and writes"| node_datautil

click node_avet "https://github.com/govolution/avet/blob/master/source/avet.c"
click node_service "https://github.com/govolution/avet/blob/master/source/avetsvc.c"
click node_evasion "https://github.com/govolution/avet/tree/master/source/implementations/evasion"
click node_retrieval "https://github.com/govolution/avet/tree/master/source/implementations/retrieve_data"
click node_encoding "https://github.com/govolution/avet/tree/master/source/implementations/encoding"
click node_command "https://github.com/govolution/avet/tree/master/source/implementations/command_exec"
click node_execute "https://github.com/govolution/avet/tree/master/source/implementations/payload_execution_method"
click node_hollow32 "https://github.com/govolution/avet/blob/master/source/implementations/payload_execution_method/hollowing32.h"
click node_helper64 "https://github.com/govolution/avet/blob/master/source/implementations/payload_execution_method/helper_functions/helper_functions64.h"
click node_debug "https://github.com/govolution/avet/blob/master/source/implementations/debug_print/debug_print.h"
click node_optimizer "https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/genetic_optimizer.py"
click node_malconv "https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/malconv/malconv.py"
click node_extend "https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/practical_manipulations/extend.py"
click node_dos "https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/practical_manipulations/full_dos.py"
click node_padding "https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/practical_manipulations/padding.py"
click node_partialdos "https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/practical_manipulations/partial_dos.py"
click node_section "https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/practical_manipulations/section_injection.py"
click node_shift "https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/practical_manipulations/shift.py"
click node_datautil "https://github.com/govolution/avet/blob/master/source/data_utility.h"
click node_keygen "https://github.com/govolution/avet/blob/master/tools/generate_key/generate_key.c"
click node_rawtoc "https://github.com/govolution/avet/blob/master/tools/data_raw_to_c/data_raw_to_c.c"

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_avet,node_service,node_operator toneBlue
class node_evasion,node_retrieval,node_encoding,node_command,node_execute,node_hollow32,node_helper64,node_debug toneAmber
class node_optimizer,node_malconv,node_extend,node_dos,node_padding,node_partialdos,node_section,node_shift toneMint
class node_datautil,node_keygen,node_rawtoc toneRose
```

## Components

### Payload runtime

- [AVET executable](https://github.com/govolution/avet/blob/master/source/avet.c): `source/avet.c`
- [Service runtime](https://github.com/govolution/avet/blob/master/source/avetsvc.c): `source/avetsvc.c`

### Runtime techniques

- [Sandbox checks](https://github.com/govolution/avet/tree/master/source/implementations/evasion): `source/implementations/evasion`
- [Payload retrieval](https://github.com/govolution/avet/tree/master/source/implementations/retrieve_data): `source/implementations/retrieve_data`
- [Payload decoding](https://github.com/govolution/avet/tree/master/source/implementations/encoding): `source/implementations/encoding`
- [Command execution](https://github.com/govolution/avet/tree/master/source/implementations/command_exec): `source/implementations/command_exec`
- [Payload execution](https://github.com/govolution/avet/tree/master/source/implementations/payload_execution_method): `source/implementations/payload_execution_method`
- [32-bit hollowing](https://github.com/govolution/avet/blob/master/source/implementations/payload_execution_method/hollowing32.h): `source/implementations/payload_execution_method/hollowing32.h`
- [64-bit PE helpers](https://github.com/govolution/avet/blob/master/source/implementations/payload_execution_method/helper_functions/helper_functions64.h): `source/implementations/payload_execution_method/helper_functions/helper_functions64.h`
- [Debug output](https://github.com/govolution/avet/blob/master/source/implementations/debug_print/debug_print.h): `source/implementations/debug_print/debug_print.h`

### Adversarial examples

- [Genetic optimizer](https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/genetic_optimizer.py): `source/implementations/gen_adversarial_exe/genetic_optimizer.py`
- [MalConv detector](https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/malconv/malconv.py): `source/implementations/gen_adversarial_exe/malconv/malconv.py`
- [PE extension](https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/practical_manipulations/extend.py): `source/implementations/gen_adversarial_exe/practical_manipulations/extend.py`
- [DOS manipulations](https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/practical_manipulations/full_dos.py): `source/implementations/gen_adversarial_exe/practical_manipulations/full_dos.py`
- [PE padding](https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/practical_manipulations/padding.py): `source/implementations/gen_adversarial_exe/practical_manipulations/padding.py`
- [Partial DOS edits](https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/practical_manipulations/partial_dos.py): `source/implementations/gen_adversarial_exe/practical_manipulations/partial_dos.py`
- [Section injection](https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/practical_manipulations/section_injection.py): `source/implementations/gen_adversarial_exe/practical_manipulations/section_injection.py`
- [PE shifting](https://github.com/govolution/avet/blob/master/source/implementations/gen_adversarial_exe/practical_manipulations/shift.py): `source/implementations/gen_adversarial_exe/practical_manipulations/shift.py`

### Data utilities

- [Byte-file utilities](https://github.com/govolution/avet/blob/master/source/data_utility.h): `source/data_utility.h`
- [Key generator](https://github.com/govolution/avet/blob/master/tools/generate_key/generate_key.c): `tools/generate_key/generate_key.c`
- [Raw-to-C converter](https://github.com/govolution/avet/blob/master/tools/data_raw_to_c/data_raw_to_c.c): `tools/data_raw_to_c/data_raw_to_c.c`

### Other components

- **Tool user**

## Connections

- Tool user → AVET executable: runs
- AVET executable → Sandbox checks: runs checks (evidence: `source/avet.c`)
- AVET executable → Payload retrieval: gets payload (evidence: `source/avet.c`)
- AVET executable → Payload decoding: decodes payload (evidence: `source/avet.c`)
- AVET executable → Payload execution: executes payload (evidence: `source/avet.c`)
- AVET executable → Command execution: runs command (evidence: `source/avet.c`)
- Service runtime → Sandbox checks: runs checks (evidence: `source/avetsvc.c`)
- Service runtime → Payload retrieval: gets payload (evidence: `source/avetsvc.c`)
- Service runtime → Payload decoding: decodes payload (evidence: `source/avetsvc.c`)
- Service runtime → Payload execution: executes payload (evidence: `source/avetsvc.c`)
- Payload execution → 32-bit hollowing: supports hollowing (evidence: `source/implementations/payload_execution_method/hollowing32.h`)
- 32-bit hollowing → 64-bit PE helpers: uses helpers
- AVET executable → Debug output: logs through (evidence: `source/avet.c`)
- Service runtime → Debug output: logs through (evidence: `source/avetsvc.c`)
- Genetic optimizer → MalConv detector: scores candidates (evidence: `source/implementations/gen_adversarial_exe/genetic_optimizer.py`)
- Genetic optimizer → PE extension: applies manipulation (evidence: `source/implementations/gen_adversarial_exe/genetic_optimizer.py`)
- Genetic optimizer → DOS manipulations: applies manipulation (evidence: `source/implementations/gen_adversarial_exe/genetic_optimizer.py`)
- Genetic optimizer → PE padding: applies manipulation (evidence: `source/implementations/gen_adversarial_exe/genetic_optimizer.py`)
- Genetic optimizer → Partial DOS edits: applies manipulation (evidence: `source/implementations/gen_adversarial_exe/genetic_optimizer.py`)
- Genetic optimizer → Section injection: applies manipulation (evidence: `source/implementations/gen_adversarial_exe/genetic_optimizer.py`)
- Genetic optimizer → PE shifting: applies manipulation (evidence: `source/implementations/gen_adversarial_exe/genetic_optimizer.py`)
- Key generator → Byte-file utilities: writes key (evidence: `tools/generate_key/generate_key.c`)
- Raw-to-C converter → Byte-file utilities: reads and writes (evidence: `tools/data_raw_to_c/data_raw_to_c.c`)
