ANONYMITY PART 3 — ADVANCED PRIVACY LAB

Advanced Privacy & OPSEC

Tails OS, Whonix VM isolation, MAC address randomization, DNS privacy, and a capstone OPSEC threat-model assessment. Build the complete anonymity stack from hardware to protocol.

Part 1: Tor & Onion Routing Part 2: VPNs & Proxies Part 3: Advanced Privacy
Lab Exercises
1
Tails OS — The Amnesic Incognito Live System
INTERMEDIATE ✓ Done
Scenario: A colleague needs to work from a shared computer at a conference hotel. The machine is untrusted — potentially keylogged or monitored. They ask you which OS to use. You recommend Tails. Walk through its architecture and configure a persistent storage volume so they can carry their session across reboots without touching the host disk.

Tails Architecture — Boot Flow:

Physical Hardware (untrusted host) USB Drive (Tails ISO) ← boots before the host OS ever loads Linux Kernel (RAM-loaded) Tor Daemon ← ALL network traffic forced through Tor ├── Tor Browser (pre-configured) ← safe browsing ├── Thunderbird + Enigmail ← encrypted email ├── KeePassXC ← password manager └── OnionShare, MAT2, etc. ← hardened toolkit Host Hard Drive ← NEVER mounted, NEVER written to by default On shutdown → ALL RAM wiped (amnesic = no forensic artifacts)
WHY AMNESIC COMPUTING MATTERS

When Tails shuts down, it overwrites RAM with random data. The host disk is never touched. An adversary who seizes the machine after you leave finds zero evidence of your session. This is why journalists, whistleblowers, and human rights activists rely on it: even a compromised machine cannot betray you after the fact. Tails vs a hardened regular OS: regular OSes accumulate swap files, browser caches, shell history, thumbnails, and crash dumps — all persistent artifacts. Tails produces none of these.

Configuring Persistent Storage — for when you need files to survive reboots (keys, documents) while keeping the amnesic core intact:

tails-persistence-setup (simulated)
# Tails is booted. The USB drive has a second partition for persistence. # Launch the persistence wizard: amnesia@amnesia:~$
amnesia@amnesia:~$
Hint: start the wizard with tails-persistence-setup, then enable the features you want. Try also: ls /live/persistence/TailsData_unlocked/ after setup to verify.
WHEN TO USE TAILS VS A REGULAR OS

Use Tails when: the physical machine is untrusted, you need zero forensic footprint, or you are doing high-risk work on a borrowed device. Use your regular OS when: you need performance, software compatibility, or persistence is the priority. Tails intentionally sacrifices convenience for deniability.

2
Whonix — Dual-VM Isolation Architecture
ADVANCED ✓ Done
Scenario: You need persistent Tor-based work across sessions (Tails is impractical long-term) and you want protection even if your workstation is compromised by malware. Whonix's two-VM model provides that guarantee: the Workstation VM is isolated from the network entirely and has no knowledge of the real IP — even a root compromise cannot leak it.
HOST MACHINE (KVM / VirtualBox / Qubes) ├── Whonix-Gateway VM │ ├── Runs Tor daemon exclusively │ ├── One NIC → Internet (NAT / physical) │ └── One NIC → Internal-only network (192.168.0.0/18) └── Whonix-Workstation VM ├── ONLY interface: Internal network to Gateway ├── NO direct internet route exists at kernel level ├── Applications run here (browser, office, tools) └── Even root malware cannot discover real IP ← network-level guarantee Traffic flow: Workstation app → Gateway:9040 (TransPort) → Tor → Internet DNS: Workstation DNS → Gateway:5300 (DNSPort) → Tor DNS

Key diagnostic commands run from inside the Workstation VM:

whonix-workstation terminal
# Inside the Whonix Workstation VM. # Try: whonixcheck, tor-ctrl-observer, sdwdate user@host:~$
user@host:~$
Try these commands:
1. whonixcheck — full health check of both VMs and Tor
2. tor-ctrl-observer — watch Tor circuit builds in real time
3. sdwdate — check Tor-based secure time synchronization

Architecture comparison:

Property Tails Whonix
Persistence Optional (encrypted partition) Full (normal VM disk)
Amnesic by default Yes No — writes to disk
VM isolation None (single machine) Dual VM, kernel-level separation
IP leak if workstation rooted Possible via kernel exploits Impossible (no route exists)
Host machine required No (boots from USB) Yes (needs hypervisor)
Best use case Untrusted / borrowed hardware Persistent, high-security workstation
WHY VM ISOLATION DEFEATS MALWARE IP LEAKS

In a standard OS with Tor Browser, sophisticated malware can call the OS's raw socket API, bypassing the browser's proxy settings entirely, and connect directly to an attacker-controlled server — revealing the real IP. In Whonix, the Workstation VM has no route to the internet at the hypervisor network layer. There is physically no path for a raw socket to take. The kernel itself cannot reach the internet without traversing the Gateway VM's Tor daemon. This is a network-layer guarantee, not a software policy that malware can bypass.

3
MAC Address Randomization — Network Identity Spoofing
ADVANCED ✓ Done
Scenario: You connect to public Wi-Fi regularly. Venue operators, ISPs, and passive sniffers on the local segment can log your MAC address — a hardware identifier that is globally unique to your NIC. Over time, MAC logs correlate your physical location history. You will randomize the MAC before connecting and configure NetworkManager to do it automatically on every new network.
WHY MAC ADDRESSES ARE TRACEABLE

Your MAC address is broadcast in every Wi-Fi probe request and ethernet frame on the local segment. It does NOT leave your local network (routers strip it at layer 3), but local operators, DHCP servers, and passive monitors log it. The first 24 bits (OUI) identify your hardware vendor; the last 24 bits uniquely identify your device. An attacker with logs from multiple venues can track your physical movements even without knowing your IP address.

Bring down the interface, randomize, bring it back up:

macchanger lab
# Current MAC address visible to local network: # eth0: 00:1A:2B:3C:4D:5E (Intel Corporation — your real hardware OUI) # Goal: randomize before connecting to untrusted networks. student@hexworth:~$
student@hexworth:~$
Commands to try:
1. sudo macchanger -r eth0 — random MAC
2. sudo macchanger -m AA:BB:CC:DD:EE:FF eth0 — specific MAC
3. sudo ip link set eth0 down && sudo macchanger -r eth0 && sudo ip link set eth0 up — full workflow
4. sudo macchanger --show eth0 — verify

Automate with NetworkManager — random MAC on every new network:

# /etc/NetworkManager/NetworkManager.conf [device] wifi.scan-rand-mac-address=yes ; random MAC for probe requests [connection] wifi.cloned-mac-address=random ; new random MAC per Wi-Fi network ethernet.cloned-mac-address=random # After editing, restart NetworkManager: # sudo systemctl restart NetworkManager
OUI LOOKUP AND EVASION

Even randomized MACs can be fingerprinted if your randomization algorithm is predictable, or if the locally-administered bit (bit 1 of byte 0) is not set. macchanger -r sets a proper locally-administered, unicast random address. You can verify: macchanger --show eth0. The OUI lookup databases (Wireshark, IEEE) will show "Unknown" for a proper random MAC rather than your hardware vendor, which is exactly what you want.

4
DNS Privacy — DoH, DoT, and Encrypted Resolution
ADVANCED ✓ Done
Scenario: Your colleague is using HTTPS for all sites and believes their browsing is private. But their ISP still sees every DNS query in plaintext — effectively a complete log of every domain they visit. You will configure systemd-resolved for DNS-over-TLS, examine a packet capture showing the difference, and verify the setup.
THE DNS SURVEILLANCE PROBLEM

DNS was designed in 1983 with no encryption. Every lookup — google.com, nytimes.com, yourbank.com — travels in plaintext UDP to your ISP's resolver. Your ISP logs and often sells this data. HTTPS only encrypts the content of the page, not the domain name lookup that precedes it. Without encrypted DNS, HTTPS gives you privacy against coffee-shop sniffers but not against your ISP or network operator.

Packet capture comparison — same DNS query, two configurations:

PLAIN DNS (port 53) — EXPOSED
Frame: UDP 192.168.1.5 → 8.8.8.8:53 Protocol: DNS (CLEARTEXT) Query: A nytimes.com A accounts.google.com A api.yourbank.com Visible to: ✗ ISP resolver ✗ Network operator ✗ Anyone on LAN ✗ Passive wiretap
Frame: TCP 192.168.1.5 → 1.1.1.1:853 Protocol: TLSv1.3 (Application Data) Payload: Encrypted application data Encrypted application data Encrypted application data Visible to: ✓ Only the DoT resolver ✓ ISP sees: TCP to 1.1.1.1:853 ✓ No domain names exposed ✓ SNI encrypted (TLS 1.3+ECH)

Protocol comparison:

Protocol Port Transport Encrypted Notes
Plain DNS 53 UDP/TCP No Legacy default; fully visible
DoT (DNS-over-TLS) 853 TCP + TLS Yes Identifiable by port 853
DoH (DNS-over-HTTPS) 443 HTTPS Yes Looks like regular web traffic
DNSCrypt 443/5443 UDP/TCP Yes Open protocol, server auth
Tor DNS N/A Onion Yes Resolves at exit node; strongest

Configure systemd-resolved for DNS-over-TLS:

DNS privacy configuration
# Check current DNS resolver: $ dig +short myip.opendns.com @resolver1.opendns.com 203.0.113.55 # That's your exit IP. Now let's check what your DNS resolver sees... # Try: cat /etc/systemd/resolved.conf or sudo resolvectl status student@hexworth:~$
student@hexworth:~$
Commands to explore:
1. cat /etc/systemd/resolved.conf — view current config
2. sudo resolvectl status — check active DNS settings
3. dig +short myip.opendns.com @resolver1.opendns.com — check exit IP
4. apply dot — apply the DoT configuration shown below
5. sudo resolvectl statistics — verify encrypted queries

The configuration to apply:

# /etc/systemd/resolved.conf [Resolve] DNS=1.1.1.1#cloudflare-dns.com 9.9.9.9#dns.quad9.net FallbackDNS=1.0.0.1#cloudflare-dns.com 149.112.112.112#dns.quad9.net DNSOverTLS=yes ; enforce TLS — fail if server doesn't support it DNSSEC=yes ; validate cryptographic signatures DNSStubListener=yes ; keeps 127.0.0.53 as the local resolver # Apply: sudo systemctl restart systemd-resolved # Verify: sudo resolvectl statistics | grep -i encrypted
DoH VS DoT — WHICH IS BETTER?

DoT (port 853) is identifiable by network operators even without seeing content, which lets them block it. DoH (port 443) is indistinguishable from HTTPS web traffic, making it harder to block or discriminate against. However, DoH centralizes DNS into CDN-scale resolvers (Cloudflare, Google), raising different privacy concerns. For the strongest setup: Tor DNS resolution (Whonix/Tails does this automatically) or self-hosted DNSCrypt.

5
OPSEC Assessment — Threat Model Capstone
EXPERT ✓ Done
Scenario: Three subjects need privacy tooling. Each has a different threat model, different risk profile, and different practical constraints. For each subject, select the appropriate combination of tools from all three Anonymity labs. Your choices will be scored and explained. There are no trick answers — context is everything in OPSEC.

Step 1: Select a threat model to assess

Subject A: Investigative Journalist
Files stories from unsafe regions. Sources must remain confidential. Uses borrowed laptops. ISP is state-controlled. Threat actor: nation-state intelligence agency. Risk: physical detention, device seizure.
Subject B: Corporate IT Administrator
Manages cloud infrastructure. Works from home and coffee shops. Needs privacy for competitive research and to prevent vendor tracking. Threat actor: commercial data brokers, passive Wi-Fi sniffers. No legal risk.
Subject C: Human Rights Activist
Coordinates protests in an authoritarian country. Needs persistent encrypted storage for documents and contact lists. Threat actor: local law enforcement, device confiscation. Risk: criminal prosecution based on device contents.
OPSEC SCORE
0 / 10
PERSONALIZED RECOMMENDATIONS

OPSEC PRINCIPLE: PROPORTIONAL RESPONSE

Using maximum anonymity tools for every situation is not always correct OPSEC. Tor is slow; Tails is inconvenient; Whonix requires significant setup. A well-calibrated threat model uses the minimum necessary tool for the actual risk. Over-engineering your privacy stack can itself attract attention or introduce operational friction that causes mistakes. Match your tools to your adversary, not to an abstract ideal.

Lab Complete

0 / 5 exercises

Complete all five exercises to unlock lab completion credit.

Lab marked complete. Advanced privacy stack mastered.