Whonix anonymity OS. Gateway/Workstation architecture, Tor stream isolation, leak protection, Onion services, and integration with Qubes or VirtualBox.
Whonix consists of two VMs that work together:
The critical security property: the Workstation does not know and cannot discover the real IP address. There is no network interface connected to the external network, so even malware with root access on the Workstation cannot leak the real IP.
| Property | Detail |
|---|---|
| Base OS | Debian |
| Tor enforcement | Architectural (not firewall-only) |
| IP leak protection | Complete - no external NIC on Workstation |
| DNS leak protection | All DNS goes through Tor |
| Supported hypervisors | VirtualBox, KVM/libvirt, Qubes OS |
| Stream isolation | Yes - per-application Tor circuits |
| License | Free and open source (GPLv3+) |
Tor Browser protects browser traffic only. Every other application on your system (terminal, email client, file manager network calls, OS telemetry) still uses your real IP. A single misconfigured app or DNS query outside Tor deanonymizes you.
Whonix eliminates this problem entirely - there is no route to the internet that does not pass through Tor. Even if you run curl without any proxy settings, it goes through Tor because the Gateway is the only network path.
Common leak vectors that Whonix blocks:
| Leak Vector | Regular Tor | Whonix |
|---|---|---|
| DNS outside Tor | Possible | Impossible |
| App bypasses proxy | Possible | Impossible |
| WebRTC IP leak | Possible | Impossible (no real IP to leak) |
| Malware phones home | Leaks real IP | Only sees Tor IP |
| Protocol leak (FTP, etc.) | Possible | Impossible |
+---------------------+
| Internet |
+----------+----------+
|
External NIC (NAT/Bridged)
|
+------------+-------------+
| Whonix-Gateway VM |
| |
| eth0: external (NAT) |
| eth1: 10.152.152.10 |
| |
| Runs: Tor daemon |
| Firewall: iptables |
| Only Tor traffic out |
+------------+-------------+
|
Internal Network Only
(Host-only / isolated)
10.152.152.0/18
|
+------------+-------------+
| Whonix-Workstation VM |
| |
| eth0: 10.152.152.11 |
| Gateway: 10.152.152.10 |
| |
| NO external NIC |
| CANNOT route around GW |
| All traffic -> Tor |
+------------+-------------+
|
User works here
Traffic flow: Workstation -> Internal Net -> Gateway -> Tor -> Internet
The Workstation's default gateway is the Gateway VM. The Gateway's iptables rules ensure that ONLY Tor traffic leaves the external interface. Non-Tor traffic is dropped.
# Download from whonix.org (verify signatures)
# Files: Whonix-Gateway.ova and Whonix-Workstation.ova
# Verify GPG signature
gpg --import patrick.asc
gpg --verify Whonix-Gateway.ova.asc Whonix-Gateway.ova
gpg --verify Whonix-Workstation.ova.asc Whonix-Workstation.ova
# Import into VirtualBox
VBoxManage import Whonix-Gateway.ova
VBoxManage import Whonix-Workstation.ova
# Or via GUI: File -> Import Appliance
Recommended system resources:
| VM | RAM | Disk | CPUs |
|---|---|---|---|
| Gateway | 1280 MB (min 768 MB) | 10 GB | 1 |
| Workstation | 2048 MB (min 1280 MB) | 50 GB | 2 |
The OVA import pre-configures networking, but verify it is correct:
Gateway VM - needs TWO network adapters:
Adapter 1: NAT (external - connects to internet)
Adapter 2: Internal Network
Name: "Whonix"
Promiscuous Mode: Deny
Workstation VM - needs ONE adapter:
Adapter 1: Internal Network
Name: "Whonix"
Promiscuous Mode: Deny
Critical: both VMs must use the same Internal Network name ("Whonix"). The Workstation must NOT have a NAT or Bridged adapter.
# Verify Gateway networking
VBoxManage showvminfo "Whonix-Gateway" | grep NIC
# Verify Workstation networking
VBoxManage showvminfo "Whonix-Workstation" | grep NIC
# Start VMs (Gateway first, then Workstation)
VBoxManage startvm "Whonix-Gateway"
VBoxManage startvm "Whonix-Workstation"
On first boot, both VMs run whonixsetup / setup-dist:
# On Gateway - connect to Tor
sudo setup-dist
# Accept Whonix license
# Choose: Connect to Tor directly
# (or configure bridges if censored)
# Verify Tor connection
whonixcheck
# Should show: Tor connection working
# On Workstation - verify connectivity
whonixcheck
# Should show: connected through Tor
# Check your Tor IP
curl https://check.torproject.org
Default credentials: user user, password changeme. Change immediately.
# Change passwords on both VMs
sudo passwd root
passwd # for user account
Qubes OS provides the strongest Whonix deployment. Each VM runs in a Xen hardware-isolated domain. Whonix is integrated as a default template.
# Whonix templates are pre-installed in Qubes
# If not, install from dom0:
sudo qubesctl state.sls qvm.anon-whonix
# Or manually install templates
sudo qubes-dom0-update qubes-template-whonix-gw-17
sudo qubes-dom0-update qubes-template-whonix-ws-17
Qubes-Whonix VM structure:
| Qube | Type | NetVM | Purpose |
|---|---|---|---|
| sys-whonix | GatewayVM | sys-firewall | Tor Gateway |
| anon-whonix | AppVM | sys-whonix | Default Workstation |
| whonix-gw-17 | TemplateVM | - | Gateway template |
| whonix-ws-17 | TemplateVM | - | Workstation template |
# Create new anonymous AppVM in dom0
qvm-create --template whonix-ws-17 \
--label red \
my-anon-vm
# Set networking through Whonix Gateway
qvm-prefs my-anon-vm netvm sys-whonix
# Create a disposable VM template
qvm-create --template whonix-ws-17 \
--label red \
--property template_for_dispvms=True \
whonix-ws-dvm
qvm-prefs whonix-ws-dvm netvm sys-whonix
# Launch disposable VM (destroyed on shutdown)
qvm-run --dispvm=whonix-ws-dvm firefox
Advantage: each Workstation qube is isolated from the others. Compromise of one does not affect the rest. Disposable VMs leave no trace after shutdown.
# Install dependencies
sudo apt install qemu-kvm libvirt-daemon-system \
virtinst bridge-utils virt-manager
# Add user to libvirt group
sudo usermod -aG libvirt $(whoami)
sudo usermod -aG kvm $(whoami)
# Download Whonix KVM images (libvirt .xml + .qcow2)
# From: whonix.org/wiki/KVM
# Verify signatures
gpg --verify Whonix-Gateway.libvirt.xz.asc \
Whonix-Gateway.libvirt.xz
gpg --verify Whonix-Workstation.libvirt.xz.asc \
Whonix-Workstation.libvirt.xz
# Extract
tar -xvf Whonix-Gateway.libvirt.xz
tar -xvf Whonix-Workstation.libvirt.xz
# Create the isolated internal network
sudo virsh net-define Whonix_internal.xml
sudo virsh net-start Whonix_internal
sudo virsh net-autostart Whonix_internal
# Create the external NAT network
sudo virsh net-define Whonix_external.xml
sudo virsh net-start Whonix_external
sudo virsh net-autostart Whonix_external
# Import VMs
sudo virsh define Whonix-Gateway.xml
sudo virsh define Whonix-Workstation.xml
# Move disk images to libvirt pool
sudo mv Whonix-Gateway.qcow2 /var/lib/libvirt/images/
sudo mv Whonix-Workstation.qcow2 /var/lib/libvirt/images/
# Start VMs
sudo virsh start Whonix-Gateway
sudo virsh start Whonix-Workstation
Verify network isolation:
# List networks
sudo virsh net-list --all
# Confirm Workstation only has internal network
sudo virsh domiflist Whonix-Workstation
# Should show: Whonix_internal ONLY
# Confirm Gateway has both
sudo virsh domiflist Whonix-Gateway
# Should show: Whonix_external + Whonix_internal
The Gateway runs Tor and enforces routing. Main config file: /etc/tor/torrc
# /usr/local/etc/torrc.d/50_user.conf
# (Whonix uses drop-in config files)
# SOCKS ports for stream isolation
SocksPort 10.152.152.10:9100 IsolateDestAddr IsolateDestPort
SocksPort 10.152.152.10:9101 IsolateDestAddr
SocksPort 10.152.152.10:9102 IsolateDestAddr
SocksPort 10.152.152.10:9103 IsolateDestAddr IsolateDestPort
SocksPort 10.152.152.10:9104 IsolateDestAddr IsolateDestPort
SocksPort 10.152.152.10:9105 IsolateDestAddr
# TransPort for transparent proxying
TransPort 10.152.152.10:9040
DnsPort 10.152.152.10:5300
# Entry guard pinning (default behavior)
NumEntryGuards 1
# Bandwidth limiting (optional)
RelayBandwidthRate 1 MB
RelayBandwidthBurst 2 MB
# Reload Tor after changes
sudo systemctl reload tor@default
# Check Tor status
sudo systemctl status tor@default
nyx # Tor monitor (ncurses)
# View Tor circuit info
sudo -u debian-tor nyx
Use bridges when your ISP blocks direct Tor connections or when you want to hide the fact that you are using Tor.
# /usr/local/etc/torrc.d/50_user.conf
UseBridges 1
ClientTransportPlugin obfs4 exec /usr/bin/obfs4proxy
# obfs4 bridges (get from bridges.torproject.org)
Bridge obfs4 IP:PORT FINGERPRINT \
cert=BASE64CERT iat-mode=0
Bridge obfs4 IP:PORT FINGERPRINT \
cert=BASE64CERT iat-mode=0
# Install obfs4proxy if not present
sudo apt install obfs4proxy
# Request bridges via email
# Send email to [email protected]
# Subject: (empty)
# Body: get transport obfs4
# Or use Whonix Bridge GUI
sudo setup-dist
# Select: Configure bridges
Available pluggable transports:
| Transport | Purpose | Detection Resistance |
|---|---|---|
| obfs4 | Obfuscation | High - looks like random bytes |
| meek-azure | Domain fronting via Azure | High - looks like Azure traffic |
| Snowflake | WebRTC proxies | High - uses volunteer proxies |
| webtunnel | HTTPS camouflage | High - mimics HTTPS |
The Gateway's iptables configuration is the core of Whonix's security. It ensures only Tor traffic leaves the external interface.
# View current rules
sudo iptables -L -n -v
sudo ip6tables -L -n -v
# Key rules (simplified):
# - ACCEPT connections from Workstation to Tor ports
# - ACCEPT Tor daemon output to internet
# - REJECT/DROP everything else
# - IPv6 fully blocked by default
# Whonix firewall script location:
# /usr/bin/whonix-gateway-firewall
# Reload firewall
sudo whonix-gateway-firewall
# Verify no non-Tor leaks from Gateway
sudo iptables -L -n | grep -i drop
The Workstation comes pre-configured with privacy-oriented tools. All network traffic is transparently routed through Tor via the Gateway.
# Tor Browser (pre-installed)
torbrowser
# Update Tor Browser
update-torbrowser
# Terminal - all commands go through Tor
curl https://check.torproject.org/api/ip
# Returns Tor exit node IP
# APT through Tor (automatic)
sudo apt update
sudo apt install <package>
# All package downloads go through Tor
# Verify Tor connectivity
whonixcheck
Whonix uses sdwdate (Secure Distributed Web Date) instead of NTP. NTP is unencrypted and can be used for fingerprinting. sdwdate fetches time from random Tor onion services over HTTPS.
# Check sdwdate status
sudo systemctl status sdwdate
# Restart sdwdate
sudo systemctl restart sdwdate
# View sdwdate log
journalctl -u sdwdate
# sdwdate adds random time offset to prevent
# time-based correlation attacks
Controls which Tor control port commands the Workstation can send to the Gateway. Prevents Workstation from fingerprinting the Tor connection.
# onion-grater runs on Gateway
# Config: /usr/share/onion-grater-merger/examples/
# Check status (on Gateway)
sudo systemctl status onion-grater
# View allowed commands
cat /etc/onion-grater.d/*.yml
# Workstation uses filtered control port
# 10.152.152.10:9051 (filtered by onion-grater)
Stream isolation ensures that different applications use different Tor circuits. Without it, an adversary who controls a Tor exit node could correlate traffic from your browser and your IRC client as coming from the same user.
Whonix pre-configures separate SOCKS ports on the Gateway:
| Application | SOCKS Port | Isolation |
|---|---|---|
| Tor Browser | 9150 | Built-in (Tor Browser own circuit) |
| General web (curl, wget) | 9100 | IsolateDestAddr + IsolateDestPort |
| apt / package manager | 9104 | IsolateDestAddr + IsolateDestPort |
| gpg / key servers | 9105 | IsolateDestAddr |
| IRC clients | 9101 | IsolateDestAddr |
| SSH | 9102 | IsolateDestAddr |
| BitTorrent (risky) | 9103 | IsolateDestAddr + IsolateDestPort |
| Misc / custom apps | 9106-9109 | Various |
# Workstation applications are pre-configured via
# uwt (Unix domain socket wrapper for Tor)
# Check uwt wrappers
ls /usr/lib/uwt/
# Manual SOCKS configuration for custom apps
# Example: route a custom tool through isolated port
export ALL_PROXY=socks5h://10.152.152.10:9100
# torsocks with specific port
torsocks -P 9102 ssh [email protected]
# curl with specific SOCKS port
curl --socks5-hostname 10.152.152.10:9101 \
https://example.com
# Verify different circuits
curl --socks5-hostname 10.152.152.10:9100 \
https://api.ipify.org
curl --socks5-hostname 10.152.152.10:9101 \
https://api.ipify.org
# Should show different Tor exit IPs
How stream isolation prevents correlation:
Without isolation:
Browser ----+
IRC ----+--> Same Tor circuit --> Same exit IP
SSH ----+
Exit node operator sees all three streams
from the same circuit = same user
With isolation:
Browser ----> Circuit A ----> Exit 1
IRC ----> Circuit B ----> Exit 2
SSH ----> Circuit C ----> Exit 3
Each application uses a different circuit
and exits from a different Tor node
Host a hidden service from the Workstation, accessible only via Tor. The server's real IP is hidden behind the Gateway's Tor routing.
On the Gateway, configure the hidden service:
# /usr/local/etc/torrc.d/50_user.conf (Gateway)
HiddenServiceDir /var/lib/tor/mysite/
HiddenServicePort 80 10.152.152.11:80
HiddenServiceVersion 3
# For multiple services:
HiddenServiceDir /var/lib/tor/ssh_service/
HiddenServicePort 22 10.152.152.11:22
# Restart Tor on Gateway
sudo systemctl restart tor@default
# Get your .onion address
sudo cat /var/lib/tor/mysite/hostname
# Output: abc123...xyz.onion
On the Workstation, run the actual service:
# Install web server on Workstation
sudo apt install nginx
# Configure nginx to listen on Workstation IP
# /etc/nginx/sites-available/default
# listen 10.152.152.11:80;
sudo systemctl start nginx
# Test from another Tor-connected machine
torsocks curl http://abc123...xyz.onion
# Backup private key (critical!)
sudo cp /var/lib/tor/mysite/hs_ed25519_secret_key \
/secure/backup/
# Set restrictive permissions
sudo chmod 700 /var/lib/tor/mysite/
sudo chown debian-tor:debian-tor /var/lib/tor/mysite/
# Onion authentication (client auth)
# Gateway - generate keys
sudo mkdir -p /var/lib/tor/mysite/authorized_clients/
# Client authorization key file
# /var/lib/tor/mysite/authorized_clients/alice.auth
# Format: descriptor:x25519:<base32-public-key>
Security considerations:
| Risk | Mitigation |
|---|---|
| Server header leaks | Remove version info from nginx/apache |
| Error pages reveal software | Custom error pages |
| Clock skew fingerprinting | sdwdate handles this |
| Application-layer leaks | Sandbox the service, minimize installed software |
| DDoS on .onion | Use OnionBalance for load balancing |
Run separate Workstation VMs for different identities or activities. Each connects through the same Gateway but uses isolated circuits.
# Clone the Workstation VM
# VirtualBox
VBoxManage clonevm "Whonix-Workstation" \
--name "Whonix-WS-Identity2" \
--register
# Set different internal IP for the clone
# Inside the cloned VM:
sudo nano /etc/network/interfaces.d/30_non-qubes-whonix
# Change: address 10.152.152.12
# Qubes - just create another AppVM
qvm-create --template whonix-ws-17 \
--label orange identity2-ws
qvm-prefs identity2-ws netvm sys-whonix
Identity separation matrix:
Gateway (shared Tor daemon)
|
+-- Workstation-1 (10.152.152.11) -> Research identity
| Port 9100 -> Circuit A
|
+-- Workstation-2 (10.152.152.12) -> Operational identity
| Port 9100 -> Circuit B
|
+-- Workstation-3 (10.152.152.13) -> Comms identity
Port 9100 -> Circuit C
Traffic exits Tor at an exit node, then enters a VPN. The destination sees the VPN IP instead of a Tor exit node IP. Useful when targets block Tor exit nodes.
# On Workstation, set up VPN client
sudo apt install openvpn
# VPN config must use TCP (Tor only supports TCP)
# Modify .ovpn file:
# proto tcp
# remote vpn-server.com 443
# Start VPN inside Workstation
sudo openvpn --config vpn.ovpn
# Traffic flow:
# Workstation -> Tor (via Gateway) -> VPN -> Internet
# Destination sees: VPN IP
# VPN provider sees: Tor exit IP (anonymous)
Your ISP sees VPN traffic, not Tor. Hides Tor usage from your ISP. Configure the VPN on the HOST machine, before the Gateway.
# On the HOST (not Gateway, not Workstation)
sudo openvpn --config vpn.ovpn
# Gateway's NAT adapter routes through
# the host's VPN tunnel
# Traffic flow:
# Workstation -> Gateway -> Tor -> Host VPN -> ISP
# ISP sees: VPN traffic only
# VPN provider sees: Tor traffic (knows you use Tor)
# On Workstation
sudo apt install i2pd
# Configure i2pd to use Tor as outproxy
# /etc/i2pd/i2pd.conf
# outproxy.enabled = true
# outproxy.address = 127.0.0.1
# outproxy.port = 4444
sudo systemctl start i2pd
# Access I2P console
# http://127.0.0.1:7070
# I2P traffic is tunneled through Tor
# Provides additional anonymity layer
| Configuration | Flow | Use Case |
|---|---|---|
| Standard | User -> Tor -> Internet | Default anonymous browsing |
| Tor -> VPN | User -> Tor -> VPN -> Internet | Bypass Tor blocks at destination |
| VPN -> Tor | User -> VPN -> Tor -> Internet | Hide Tor usage from ISP |
| Tor -> Tor | User -> Tor -> Tor -> Internet | Extra hops (slow, not recommended) |
| Tor -> I2P | User -> Tor -> I2P -> Eepsites | Access I2P network anonymously |
# Whonix includes security-misc package
# Applies kernel hardening automatically
# Key sysctl hardening (pre-configured):
# /etc/sysctl.d/30_security-misc.conf
# Disable TCP timestamps (prevents uptime fingerprint)
net.ipv4.tcp_timestamps = 0
# Disable ICMP redirects
net.ipv4.conf.all.accept_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
# Disable source routing
net.ipv4.conf.all.accept_source_route = 0
# Enable ASLR
kernel.randomize_va_space = 2
# Restrict kernel pointers
kernel.kptr_restrict = 2
# Restrict dmesg
kernel.dmesg_restrict = 1
# Restrict ptrace
kernel.yama.ptrace_scope = 2
# tirdad - TCP ISN (Initial Sequence Number) randomization
# Prevents TCP ISN-based OS fingerprinting through Tor
# Pre-installed on Whonix
# Verify tirdad is loaded
lsmod | grep tirdad
# If not loaded:
sudo modprobe tirdad
# Whonix ships with AppArmor profiles for key apps
sudo aa-status
# Profiles cover:
# - Tor Browser
# - sdwdate
# - onion-grater
# - Tor daemon
# Enforce a profile
sudo aa-enforce /etc/apparmor.d/usr.bin.torbrowser
# Check profile status
sudo aa-status | grep -A5 "enforce"
# Custom profile for a service
sudo aa-genprof /usr/bin/myapp
# Follow the wizard, then enforce
# Disable swap (prevents sensitive data on disk)
sudo swapoff -a
# Remove swap entries from /etc/fstab
# Secure shared memory
# /etc/fstab:
# tmpfs /run/shm tmpfs defaults,noexec,nosuid 0 0
# Install LKRG (Linux Kernel Runtime Guard)
# Detects kernel exploits at runtime
sudo apt install lkrg
# Verify LKRG is loaded
sudo systemctl status lkrg
# Entropy - ensure strong randomness
sudo apt install haveged jitterentropy-rngd
sudo systemctl enable haveged
# Disable Thunderbolt/Firewire DMA attacks
# Whonix security-misc handles this:
# Blacklists thunderbolt and firewire modules
Hardening checklist:
| Item | Status | Package |
|---|---|---|
| TCP timestamps disabled | Default | security-misc |
| TCP ISN randomized | Default | tirdad |
| AppArmor enforced | Default | apparmor |
| Kernel hardened (sysctl) | Default | security-misc |
| ASLR enabled | Default | kernel |
| sdwdate (no NTP) | Default | sdwdate |
| Swap disabled | Manual | - |
| LKRG installed | Manual | lkrg |
| Firewire/Thunderbolt blocked | Default | security-misc |
| Feature | Whonix | Tails |
|---|---|---|
| Architecture | Two VMs (Gateway + Workstation) | Single live OS from USB |
| Persistence | Full disk persistence by default | Amnesic by default, optional encrypted persistence |
| Boot method | Runs inside hypervisor on host OS | Boots directly from USB, replaces host OS |
| IP leak protection | Architectural - separate VM with no external NIC | Firewall-based - iptables rules on same OS |
| Compromise impact | Root on Workstation still cannot leak IP | Root on Tails can potentially reconfigure firewall |
| Use model | Always-on, daily driver for anonymous work | Boot-when-needed, leave-no-trace |
| RAM forensics | Host RAM may contain VM data after shutdown | RAM wiped on shutdown (memory erasure) |
| Disk forensics | VM files exist on host disk | No trace on host disk (USB only) |
| Multiple identities | Multiple Workstation VMs, isolated | One identity per session |
| Tor circuit control | Stream isolation per app (different circuits) | Limited - most apps share circuits |
| Best for | Long-term anonymous identity, infrastructure, development | One-off operations, physical security, leave no trace |
| Qubes integration | Native (strongest deployment) | Not supported |
| Offline capability | Workstation can work offline (Gateway disconnected) | Limited without Tor connection |
| Scenario | Use Whonix | Use Tails |
|---|---|---|
| Persistent anonymous identity | Yes - full disk persistence | No - amnesic by design |
| Long-term infrastructure (onion services, C2) | Yes - always-on VMs | No - session-based |
| Development in anonymous environment | Yes - install tools, keep state | No - tools lost on reboot |
| Maximum IP leak protection | Yes - architectural isolation | Partial - firewall-based |
| Fixed location with trusted host | Yes - ideal setup | Overkill |
| Physical OPSEC (on-site engagement) | No - leaves VM files on host | Yes - boot from USB, no trace |
| Zero forensic trace on machine | No - host disk has VM images | Yes - nothing written to disk |
| Quick session from untrusted hardware | No - requires hypervisor install | Yes - boot any machine from USB |
| Travel operations | No - needs full workstation | Yes - pocket USB |
| Post-operation evidence destruction | Harder - must wipe host disk | Easy - destroy USB |
Whonix is the preferred platform for maintaining long-term anonymous identities because it provides persistent storage with guaranteed Tor routing.
Identity compartmentalization with Whonix:
Workstation-A: "Researcher" identity
- Dedicated browser profile
- ProtonMail over Tor
- Research forums, paste sites
- Git repos under pseudonym
Workstation-B: "Operator" identity
- C2 panel access
- Infrastructure management
- Separate email, separate keys
Workstation-C: "Comms" identity
- Encrypted messaging (Session, Briar)
- Dead drops
- Coordination only
Rule: NEVER cross identities between Workstations
OPSEC rules for Whonix operations:
| Rule | Reason |
|---|---|
| Never login to real accounts from Workstation | Links anonymous session to real identity |
| Never use same Workstation for multiple identities | Filesystem artifacts cross-contaminate |
| Never copy files between Workstations unsanitized | Metadata leaks identity |
| Keep Gateway updated | Tor vulnerabilities affect all Workstations |
| Snapshot before risky operations | Roll back if compromised |
| Use fullscreen carefully | Screen resolution can fingerprint |
Run command-and-control infrastructure behind Whonix for maximum anonymity.
# On Gateway - create hidden service for C2
# /usr/local/etc/torrc.d/50_user.conf
HiddenServiceDir /var/lib/tor/c2/
HiddenServicePort 443 10.152.152.11:8443
HiddenServiceVersion 3
# Restart Tor
sudo systemctl restart tor@default
# Get .onion address
sudo cat /var/lib/tor/c2/hostname
# On Workstation - run C2 listener
# Example: simple HTTPS listener
sudo apt install nginx
# Configure reverse proxy to C2 framework
# listening on 10.152.152.11:8443
# Implant callback:
# Target -> Tor -> .onion:443 -> Gateway -> Workstation C2
# Benefits:
# - C2 server IP is hidden (.onion only)
# - No hosting provider to subpoena
# - Traffic blends with Tor network
# - Takedown resistant (no IP to block)
Infrastructure topology:
Implant on target
|
v
Tor network (3 hops)
|
v
C2 .onion address
|
v
Whonix-Gateway (routes to Workstation)
|
v
Whonix-Workstation (C2 framework running here)
No single point reveals the operator:
- Target sees .onion address only
- Tor relays see encrypted traffic
- ISP sees Tor traffic (or VPN if chained)
- Host machine IP never touches C2 traffic
# VirtualBox - take snapshot before operations
VBoxManage snapshot "Whonix-Workstation" take \
"pre-operation" --description "Clean state"
# Restore to clean state after operation
VBoxManage snapshot "Whonix-Workstation" restore \
"pre-operation"
# KVM snapshots
sudo virsh snapshot-create-as Whonix-Workstation \
--name "pre-operation" --description "Clean state"
# Restore
sudo virsh snapshot-revert Whonix-Workstation \
--snapshotname "pre-operation"
# Qubes - use disposable VMs instead
# They are destroyed automatically on shutdown
| Criteria | Whonix | Tails | Qubes OS |
|---|---|---|---|
| Primary goal | Anonymous networking | Leave no trace | Compartmentalization |
| Tor enforcement | Architectural (VM isolation) | Firewall-based | Depends on NetVM config |
| Persistence | Full disk by default | Amnesic, optional encrypted | Full disk per qube |
| IP leak resistance | Strongest - no external NIC | Strong - iptables rules | Depends on setup |
| Forensic resistance | Low - VMs on host disk | Highest - RAM only | Low - disk-based qubes |
| Multiple identities | Separate Workstation VMs | One per session | Separate AppVMs |
| Hardware requirements | Moderate (host + 2 VMs) | Low (any USB-bootable PC) | High (VT-x, VT-d, 16 GB+ RAM) |
| Portable | No - tied to host | Yes - USB stick | No - tied to hardware |
| Best combination | Qubes-Whonix | Standalone | Qubes + Whonix templates |
| Journalist | Yes - persistent research | Yes - field work, source meetings | Yes - if stationary |
| Red team | Yes - C2, infrastructure | Yes - on-site ops | Yes - lab isolation |
| Activist | Yes - long-term comms | Yes - protest, travel | Yes - if technical |
| Researcher | Yes - anonymous data collection | Partial - no persistence | Yes - isolated analysis |
| Threat | Explanation |
|---|---|
| Tor-level attacks | Global passive adversary correlating entry/exit traffic can deanonymize Tor users. Whonix cannot fix Tor protocol weaknesses. |
| Host OS compromise | If the host machine running VirtualBox/KVM is compromised, the attacker can inspect VM memory, capture keystrokes, and see all traffic before Tor encryption. |
| Hardware keyloggers | Physical access to the keyboard bypasses all software protections. |
| Behavioral fingerprinting | Writing style, browsing patterns, login times, and language can identify users regardless of IP anonymity. |
| Tor Browser fingerprinting | Advanced browser fingerprinting (canvas, WebGL, font enumeration) can correlate sessions even across different Tor circuits. |
| VM escape exploits | A hypervisor vulnerability allowing escape from the Workstation VM to the host breaks the entire isolation model. |
| Shared Gateway correlation | Multiple Workstations sharing one Gateway enter Tor through the same entry guard. A compromised guard sees traffic from all Workstations. |
| Side-channel attacks | CPU-level attacks (Spectre, Meltdown) can leak data between VMs on the same host. Qubes-Whonix with Xen mitigates this better than VirtualBox. |
| Weakness | Mitigation |
|---|---|
| Host compromise | Use Qubes OS (Xen isolation) instead of VirtualBox. Full disk encryption on host. |
| Entry guard correlation | Use separate Gateway VMs per identity (advanced). Or use Qubes with separate sys-whonix instances. |
| Behavioral fingerprinting | Strict identity separation. Never mix real and anonymous behaviors. |
| Browser fingerprinting | Use Tor Browser only (uniform fingerprint). Avoid resizing windows. |
| VM escape | Keep hypervisor updated. Prefer Xen (Qubes) over VirtualBox for high-threat models. |
| Side-channel | Disable SMT/hyperthreading in BIOS for maximum isolation. |