How ntu-ssl/rr-artifact works
Project Type and Purpose
• This is not a typical web app but a research artifact for reproducing side‐channel attacks (Reload+Reload) on AMD SEV‐SNP. It integrates host‐side and guest‐side components, automation scripts, custom kernel modules, and cryptographic workloads to demonstrate AES and Spectre attacks.
Key Top-Level Directories (Architectural Clues)
• setup/ – environment‐creation scripts, VM image builder, kernel patch
• host-module/ – hyperattacker.ko (host kernel module for side‐channel probing)
• guest-module/ – guest kernel modules loaded inside the VM
• aes-attack/, spectre/ – attacker binaries and victim binaries for AES and Spectre attacks
• aes-profile/ – profiling and analysis utilities for AES traces
• scripts/ – orchestration (evaluate–aes.sh, evaluate–spectre.sh)
• openssl-1.1.0l/ – OpenSSL source build used inside the guest VM
• host-utils/, guest-utils/ – helper libraries (e.g., cJSON, user-utils)
Main Components
a. Hardware Layer
• AMD EPYC SEV-SNP server (CPU, DRAM)
b. Virtualization Layer on Host
• Host OS kernel (Linux 22.04) with KVM
• QEMU + OVMF firmware for SEV-SNP VM
• Host kernel module “hyperattacker.ko” (host-module/)
c. Host Attack Orchestration
• setup/*.sh, launch-and-setup-vm.exp scripts (setup/)
• Attack driver binaries (aes-attack/attacker/attacker.c, spectre/attacker/attacker.c)
• Analysis utilities (aes-profile/analysis-utils/)
• Automation scripts (scripts/evaluate-*.sh)
• Data store: results/, gpas/, keys/, ciphertexts/
d. Guest VM Environment
• Guest OS (Ubuntu 20.04) with custom kernel & guest‐module/ inserted on boot
• Victim binaries (aes-attack/victim/victim.c, spectre/victim/victim.c)
• OpenSSL library (openssl-1.1.0l/) for cryptographic workloads
• Victim side-channel targets: AES encryption loops, Spectre gadget
Relationships and Data Flows
• Host setup scripts → build and load host kernel module → launch SEV-SNP VM (via QEMU/OVMF).
• Guest boot → loads guest module → victim code runs periodically (AES or Spectre victim)
• Host attacker binary communicates with hyperattacker.ko via ioctl/traps → issues reload probes on guest page-table addresses
• Timing/memory contention data flows back to host attacker → stores raw traces in host workspace
• Post-processing with aes-profile tools generates statistical profiles and recovers keys/secrets → writes into result/
Architectural Patterns & Design Principles
• Strong separation between Host (attacker) and Guest (victim) domains
• Layered approach: Hardware → Hypervisor → Host kernel module → Guest kernel module → Userland apps
• Automation pipeline: setup → build → launch → attack → analysis
• Data‐centric storage: organize raw traces, ciphertexts/plaintexts, GPAS models, recovered secrets, accuracy metrics
Essential Elements
• Clear component names (e.g., “hyperattacker.ko”, “guest-module/victim.c”)
• Data stores (ciphertexts/, plaintexts/, gpas/, result/) as persistent volumes