# r0ttenbeef/vortex-stealer architecture

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

- Interactive diagram: https://gitdiagram.com/r0ttenbeef/vortex-stealer
- Repository: https://github.com/r0ttenbeef/vortex-stealer

## Overview

1. **Repository purpose and runtime**
   - This is a **Windows-focused Golang info-stealer / remote-control implant**.
   - It is built on **Linux using Go + mingw**, with Windows resource files (`.syso`) included for packaging.

2. **Top-level orchestration**
   - `main.go` is the entrypoint and appears to coordinate startup, configuration loading, environment checks, installation/persistence, and the main collection/exfiltration loop.
   - The README indicates the bot token and chat ID are stored **encrypted**, then decoded at runtime.

3. **Command-and-control channel**
   - `telehandler/` is the C2 layer.
   - It maps **Telegram bot commands** into actions on a target host: health checks, screenshots, file collection, upload toggles, download-and-execute, and upgrade behavior.
   - This is the main operator-facing control plane and the primary boundary between the implant and the outside world.

4. **Data exfiltration pipeline**
   - `datatransfer/` is the outbound delivery path for stolen artifacts.
   - The README suggests exfiltration is via **Telegram** and also includes a file-hosting style uploader (`gofile.go`), so the architecture supports more than one output path.
   - Collected data is likely packaged first, then transferred through this module.

5. **Host profiling and targeting**
   - `opsysinfo/` gathers endpoint metadata such as OS and system flags.
   - `hutil/` contains shared helpers for process inspection, counters, and archive/file handling.
   - Together these form the “victim fingerprinting” layer used to identify the host and steer later actions.

6. **Anti-analysis and AV evasion**
   - `antiav/` and `envtype/` implement defensive-evasion logic.
   - `envtype/` covers **VM, sandbox, and analysis-environment detection** using checks for platforms like VMware, VirtualBox, Xen, KVM, Hyper-V-like environments, and suspicious analytics/debug processes.
   - `antiav/` includes Windows security interference checks such as AV/Defender/UAC-related logic.

7. **Artifact collection modules**
   - `browser/` extracts browser data from Chromium and Gecko families, likely including profiles, cookies, and extension data.
   - `cryptowallets/` targets crypto wallet artifacts, especially **browser extension wallets**.
   - `messenger/` targets chat apps such as Discord, Telegram, Signal, Skype, Element, and WhatsApp.
   - `softwares/` targets common desktop tools like FileZilla, PuTTY, Steam, TeamViewer, Uplay, and WinSCP.
   - `vpn/` targets VPN client configs and data for NordVPN, OpenVPN, and ProtonVPN.
   - `wifi/` suggests local wireless credential collection.

8. **Packaging and encryption**
   - `encrypt/` is the crypto layer used to protect configuration and likely payloads or exfiltrated data.
   - `hutil/zipdir.go` indicates collected files are probably archived before transfer.
   - This forms a “collect → package → encrypt → send” data path.

9. **Installation and persistence**
   - `install/` likely handles deployment behavior such as copying the binary, setting startup/persistence, or renaming the implant.
   - The README’s `/upgrade` and `/drop` commands imply the implant can receive and run updated components or secondary payloads.

10. **Build and packaging boundary**
   - `Makefile` drives release builds for multiple Windows targets.
   - `rsrc_windows_*.syso` and the `images/` directory indicate embedded Windows resources/icons for the final binary.
   - The project is organized as a modular implant: **C2 + anti-analysis + collection plugins + exfiltration + installation**.

Main entry points: [`telehandler/cmdhandler.go`](https://github.com/r0ttenbeef/vortex-stealer/blob/main/telehandler/cmdhandler.go) (Cmd dispatch), [`main.go`](https://github.com/r0ttenbeef/vortex-stealer/blob/main/main.go) (Main), [`hutil/hutil.go`](https://github.com/r0ttenbeef/vortex-stealer/blob/main/hutil/hutil.go) (Helpers), [`telehandler/dataexfil.go`](https://github.com/r0ttenbeef/vortex-stealer/blob/main/telehandler/dataexfil.go) (Exfil pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Core runtime"]
  node_main["Main<br/>entrypoint<br/>[main.go]"]
  node_install["Install<br/>persistence<br/>[install.go]"]
  node_opsysinfo["Host info<br/>profiling<br/>[opsysinfo.go]"]
  node_hutil["Helpers<br/>shared utils<br/>[hutil.go]"]
end

subgraph group_c2["C2 control"]
  node_telehandler["Telegram C2<br/>command channel<br/>[telehandler.go]"]
  node_cmdhandler["Cmd dispatch<br/>command router<br/>[cmdhandler.go]"]
  node_cmdcaps["Capabilities<br/>command catalog<br/>[cmdcaps.go]"]
end

subgraph group_evasion["Evasion"]
  node_envtype["Env checks<br/>sandbox/VM detection<br/>[vmtype.go]"]
  node_antiav["AV checks<br/>defense evasion<br/>[avproc.go]"]
end

subgraph group_collectors["Collection plugins"]
  node_browser["Browser data<br/>collector<br/>[browserdump.go]"]
  node_wallets["Wallets<br/>collector<br/>[crypto.go]"]
  node_messenger["Messengers<br/>collector<br/>[telegram.go]"]
  node_softwares["Desktop tools<br/>collector<br/>[filezilla.go]"]
  node_vpn["VPN data<br/>collector<br/>[openvpn.go]"]
  node_wifi["Wi‑Fi data<br/>collector<br/>[wifi.go]"]
end

subgraph group_exfil["Exfiltration"]
  node_encrypt{{"Crypto<br/>encryption<br/>[encrypt.go]"}}
  node_dataexfil["Exfil pipeline<br/>transfer coordinator<br/>[dataexfil.go]"]
  node_datatransfer["Transfer<br/>delivery<br/>[datatransfer.go]"]
  node_gofile["File host<br/>uploader<br/>[gofile.go]"]
end

node_main -->|"profile host"| node_opsysinfo
node_main -->|"detect analysis"| node_envtype
node_main -->|"check defenses"| node_antiav
node_main -->|"deploy"| node_install
node_main -->|"start C2"| node_telehandler
node_main -->|"run pipeline"| node_dataexfil
node_main -->|"load crypto"| node_encrypt
node_telehandler -->|"dispatch"| node_cmdhandler
node_telehandler -->|"expose actions"| node_cmdcaps
node_cmdhandler -->|"collect browser"| node_browser
node_cmdhandler -->|"collect wallets"| node_wallets
node_cmdhandler -->|"collect chats"| node_messenger
node_cmdhandler -->|"collect tools"| node_softwares
node_cmdhandler -->|"collect vpn"| node_vpn
node_cmdhandler -->|"collect wifi"| node_wifi
node_cmdhandler -->|"exfiltrate"| node_dataexfil
node_dataexfil -->|"archive data"| node_hutil
node_dataexfil -->|"protect data"| node_encrypt
node_dataexfil -->|"send"| node_datatransfer
node_datatransfer -->|"alternate upload"| node_gofile
node_browser -->|"use helpers"| node_hutil
node_wallets -->|"use helpers"| node_hutil
node_messenger -->|"use helpers"| node_hutil
node_softwares -->|"use helpers"| node_hutil
node_vpn -->|"use helpers"| node_hutil
node_wifi -->|"use helpers"| node_hutil
node_envtype -->|"gate execution"| node_antiav

click node_main "https://github.com/r0ttenbeef/vortex-stealer/blob/main/main.go"
click node_install "https://github.com/r0ttenbeef/vortex-stealer/blob/main/install/install.go"
click node_opsysinfo "https://github.com/r0ttenbeef/vortex-stealer/blob/main/opsysinfo/opsysinfo.go"
click node_hutil "https://github.com/r0ttenbeef/vortex-stealer/blob/main/hutil/hutil.go"
click node_encrypt "https://github.com/r0ttenbeef/vortex-stealer/blob/main/encrypt/encrypt.go"
click node_telehandler "https://github.com/r0ttenbeef/vortex-stealer/blob/main/telehandler/telehandler.go"
click node_cmdhandler "https://github.com/r0ttenbeef/vortex-stealer/blob/main/telehandler/cmdhandler.go"
click node_cmdcaps "https://github.com/r0ttenbeef/vortex-stealer/blob/main/telehandler/cmdcaps.go"
click node_dataexfil "https://github.com/r0ttenbeef/vortex-stealer/blob/main/telehandler/dataexfil.go"
click node_datatransfer "https://github.com/r0ttenbeef/vortex-stealer/blob/main/datatransfer/datatransfer.go"
click node_gofile "https://github.com/r0ttenbeef/vortex-stealer/blob/main/datatransfer/gofile.go"
click node_browser "https://github.com/r0ttenbeef/vortex-stealer/blob/main/browser/browserdump.go"
click node_wallets "https://github.com/r0ttenbeef/vortex-stealer/blob/main/cryptowallets/crypto.go"
click node_messenger "https://github.com/r0ttenbeef/vortex-stealer/blob/main/messenger/telegram.go"
click node_softwares "https://github.com/r0ttenbeef/vortex-stealer/blob/main/softwares/filezilla.go"
click node_vpn "https://github.com/r0ttenbeef/vortex-stealer/blob/main/vpn/openvpn.go"
click node_wifi "https://github.com/r0ttenbeef/vortex-stealer/blob/main/wifi/wifi.go"
click node_envtype "https://github.com/r0ttenbeef/vortex-stealer/blob/main/envtype/vmtype.go"
click node_antiav "https://github.com/r0ttenbeef/vortex-stealer/blob/main/antiav/avproc.go"

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_main,node_install,node_opsysinfo,node_hutil toneBlue
class node_telehandler,node_cmdhandler,node_cmdcaps toneAmber
class node_envtype,node_antiav toneMint
class node_browser,node_wallets,node_messenger,node_softwares,node_vpn,node_wifi toneRose
class node_encrypt,node_dataexfil,node_datatransfer,node_gofile toneIndigo
```

## Components

### Core runtime

Startup, coordination, install, and shared helpers

- [Main](https://github.com/r0ttenbeef/vortex-stealer/blob/main/main.go): entrypoint · Bootstraps config, checks host state, and starts the implant loop · `main.go`
- [Install](https://github.com/r0ttenbeef/vortex-stealer/blob/main/install/install.go): persistence · Deploys the implant and handles installation-style behavior · `install/install.go`
- [Host info](https://github.com/r0ttenbeef/vortex-stealer/blob/main/opsysinfo/opsysinfo.go): profiling · Gathers OS and system metadata used for targeting and branching · `opsysinfo/opsysinfo.go`
- [Helpers](https://github.com/r0ttenbeef/vortex-stealer/blob/main/hutil/hutil.go): shared utils · Common process, counter, and archive/file helpers · `hutil/hutil.go`

### C2 control

Operator command handling and action dispatch

- [Telegram C2](https://github.com/r0ttenbeef/vortex-stealer/blob/main/telehandler/telehandler.go): command channel · Maps Telegram commands into host actions and operator control · `telehandler/telehandler.go`
- [Cmd dispatch](https://github.com/r0ttenbeef/vortex-stealer/blob/main/telehandler/cmdhandler.go): command router · Interprets operator commands and routes them to actions · `telehandler/cmdhandler.go`
- [Capabilities](https://github.com/r0ttenbeef/vortex-stealer/blob/main/telehandler/cmdcaps.go): command catalog · Defines available command features and command coverage · `telehandler/cmdcaps.go`

### Evasion

Environment and security checks used before/during execution

- [Env checks](https://github.com/r0ttenbeef/vortex-stealer/blob/main/envtype/vmtype.go): sandbox/VM detection · Detects virtual machines, sandboxes, and analysis environments · `envtype/vmtype.go`
- [AV checks](https://github.com/r0ttenbeef/vortex-stealer/blob/main/antiav/avproc.go): defense evasion · Checks for Defender, AV, and UAC-related interference · `antiav/avproc.go`

### Collection plugins

Modules that harvest host artifacts

- [Browser data](https://github.com/r0ttenbeef/vortex-stealer/blob/main/browser/browserdump.go): collector · Harvests Chromium and Gecko browser profiles and secrets · `browser/browserdump.go`
- [Wallets](https://github.com/r0ttenbeef/vortex-stealer/blob/main/cryptowallets/crypto.go): collector · Targets crypto wallet artifacts and extension wallets · `cryptowallets/crypto.go`
- [Messengers](https://github.com/r0ttenbeef/vortex-stealer/blob/main/messenger/telegram.go): collector · Extracts data from chat and messaging apps · `messenger/telegram.go`
- [Desktop tools](https://github.com/r0ttenbeef/vortex-stealer/blob/main/softwares/filezilla.go): collector · Collects data from file transfer, remote access, and game clients · `softwares/filezilla.go`
- [VPN data](https://github.com/r0ttenbeef/vortex-stealer/blob/main/vpn/openvpn.go): collector · Targets VPN client configuration and credentials · `vpn/openvpn.go`
- [Wi‑Fi data](https://github.com/r0ttenbeef/vortex-stealer/blob/main/wifi/wifi.go): collector · Collects local wireless credential material · `wifi/wifi.go`

### Exfiltration

Packaging and outbound transfer of collected data

- [Crypto](https://github.com/r0ttenbeef/vortex-stealer/blob/main/encrypt/encrypt.go): encryption · Protects configuration and likely packaged payloads or output · `encrypt/encrypt.go`
- [Exfil pipeline](https://github.com/r0ttenbeef/vortex-stealer/blob/main/telehandler/dataexfil.go): transfer coordinator · Packages collected data and sends it through the chosen outbound path · `telehandler/dataexfil.go`
- [Transfer](https://github.com/r0ttenbeef/vortex-stealer/blob/main/datatransfer/datatransfer.go): delivery · Outbound delivery layer for stolen artifacts · `datatransfer/datatransfer.go`
- [File host](https://github.com/r0ttenbeef/vortex-stealer/blob/main/datatransfer/gofile.go): uploader · Alternate upload path for moving files off the host · `datatransfer/gofile.go`

## Connections

- Main → Host info: profile host · Collect system metadata before doing other work
- Main → Env checks: detect analysis · Avoid suspicious virtualized or sandboxed environments
- Main → AV checks: check defenses · Assess security software and elevation constraints
- Main → Install: deploy · Handle setup, copying, or persistence behavior
- Main → Telegram C2: start C2 · Bring up the operator command channel
- Main → Exfil pipeline: run pipeline · Start packaging and outbound transfer of harvested data
- Main → Crypto: load crypto · Decode protected configuration and protect data at runtime
- Telegram C2 → Cmd dispatch: dispatch · Route incoming Telegram commands to local actions
- Telegram C2 → Capabilities: expose actions · Define available operator capabilities
- Cmd dispatch → Browser data: collect browser · Trigger browser artifact harvesting
- Cmd dispatch → Wallets: collect wallets · Trigger wallet artifact harvesting
- Cmd dispatch → Messengers: collect chats · Trigger messenger data harvesting
- Cmd dispatch → Desktop tools: collect tools · Trigger desktop tool artifact harvesting
- Cmd dispatch → VPN data: collect vpn · Trigger VPN artifact harvesting
- Cmd dispatch → Wi‑Fi data: collect wifi · Trigger wireless credential collection
- Cmd dispatch → Exfil pipeline: exfiltrate · Send collected artifacts onward for packaging and transfer
- Exfil pipeline → Helpers: archive data · Use shared archive and file helpers to package output
- Exfil pipeline → Crypto: protect data · Encrypt configuration or collected payloads before sending
- Exfil pipeline → Transfer: send · Hand off to outbound delivery layer
- Transfer → File host: alternate upload · Use file-hosting style upload when configured
- Browser data → Helpers: use helpers · Reuse shared file, process, and archive utilities
- Wallets → Helpers: use helpers · Reuse shared file and archive utilities
- Messengers → Helpers: use helpers · Reuse shared file and process utilities
- Desktop tools → Helpers: use helpers · Reuse shared collection and file helpers
- VPN data → Helpers: use helpers · Reuse shared file and config helpers
- Wi‑Fi data → Helpers: use helpers · Reuse shared host and file helpers
- Env checks → AV checks: gate execution · Suspicious environments feed defensive-evasion decisions
