Files
football/archive-docs/AGENTS.md
Charles N Wyble b98a20cae8 feat: Archive all documentation and remove project files
- Move all .md files to archive-docs/ directory
- Remove all project files and directories
- Retain git history while starting fresh

💘 Generated with Crush

Assisted-by: GLM-4.6 via Crush <crush@charm.land>
2026-01-21 08:54:17 -05:00

806 lines
21 KiB
Markdown

# AGENTS.md - Football Secure Access System
## Project Orientation
**Last Orientation**: 2025-01-20
### Related Documentation
For comprehensive functional requirements and artifact properties, see:
- `docs/FUNCTIONAL-REQUIREMENTS.md` - Complete functional requirements specification
- `docs/BUILD-DOCUMENTATION.md` - Build system documentation
- `docs/SECURITY-BASELINES.md` - Security hardening guide
- `COMMIT_CONVENTIONS.md` - Git commit message format and conventions
### Project Overview
Football is a minimal, hardened Debian 13 (trixie) system for secure remote access to privileged infrastructure. It enforces strict network controls where ALL traffic must pass through a WireGuard VPN tunnel, with direct network access completely blocked.
### Build Methodology
The project uses an **ISO-based installer approach**:
1. **Create Preseed**: Generate Debian installer automation file
2. **Download ISO**: Get Debian netinst ISO
3. **Inject Preseed**: Embed preseed configuration into ISO
4. **Build ISO**: Create custom football-installer.iso
5. **Deploy**: Boot ISO on bare metal or VM
6. **Automate Installer**: Preseed answers all questions except:
- Username/password creation
- Root password setting
- Target disk selection
The output is a **bootable ISO with embedded preseed configuration** that automates most of the Debian installation process.
### Key Design Decisions
- **ISO-based installer**: Uses standard Debian installer with preseed automation
- **Docker-based ISO build**: All ISO creation work done in containers
- **Preseed automation**: Automates all installation steps except user/disk selection
- **Minimal post-install configuration**: Security configs applied via late_command in preseed
- **Zero remote administration**: SSH, telnet, etc. completely disabled
- **WireGuard-only networking**: Direct network access blocked, all traffic through VPN
---
## Current Project Status
**Last Updated**: 2025-01-20
**Status**: ✅ READY TO BUILD
**Build Method**: ISO-based installer with preseed configuration
**Artifacts**:
1. `football-installer.iso` - Bootable ISO with embedded preseed (for bare metal and VM)
2. ISO boots in QEMU for automated testing
---
## Executive Summary
The Football Secure Access System is a minimal, hardened Debian 13 (trixie) system designed for Tier0 infrastructure protection. It provides secure remote access to privileged workstations via WireGuard VPN, with all direct network access blocked.
### Current Status
| Component | Status | Notes |
|-----------|--------|--------|
| Preseed Configuration | ✅ COMPLETE | config/preseed.cfg ready |
| ISO Build Script | ✅ COMPLETE | scripts/build-iso.sh operational |
| Security Scripts | ✅ COMPLETE | All security configs in place |
| Build System | ✅ COMPLETE | Docker-based ISO build working |
| First Boot Verification | ✅ COMPLETE | verify-system.sh ready |
| Documentation | ✅ COMPLETE | All documentation updated |
### Migration Summary
**Previous Approach**: Debootstrap-based build (manual image creation)
**Current Approach**: ISO-based installer with preseed automation
**Migration Date**: 2025-01-20
**Migration Reason**: More reliable, uses standard Debian installer
All obsolete debootstrap-related files and documentation have been removed.
---
## Project Architecture
### Purpose
**Football** is a minimal Debian system for secure remote access to high-security physical infrastructure (Tier0 protection).
### Deployment Targets
1. **Physical Hardware**: Dell laptops deployed in server rooms
2. **Virtual Machines**: QEMU-based VMs for testing and deployment
### Use Cases
- Secure remote RDP access to privileged workstations
- Controlled environment for system administration
- Tier0 infrastructure protection (CMMC Level 3, FedRAMP Moderate)
- Air-gapped system (WireGuard tunneling required)
---
## Security Model
### Core Principles
1. **Zero Direct Network Access**: All traffic routed through WireGuard VPN
2. **No Remote Administration**: SSH, telnet, etc. completely disabled
3. **Secure Boot Enforced**: UEFI with secure boot enabled
4. **Minimal Attack Surface**: Only IceWM and Remmina installed
5. **Local Console Only**: No remote administration capabilities
### Network Topology
```
┌─────────────────────────────────────────────────────────┐
│ Football System │
│ │
│ ┌─────────────────────────────────────────┐ │
│ │ Physical Interface (eth0) │ │
│ │ ├─ DHCP: Allowed (IP acquire)│ │
│ │ └─ WireGuard: ONLY (VPN) │ │
│ └─────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────┐ │
│ │ WireGuard Interface (wg0) │ │
│ │ └─ ALL outbound traffic │ │
│ └─────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────┐ │
│ │ VPN Endpoint (Server) │ │
│ │ → PAW Workstation │ │
│ └─────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
```
### Firewall Rules
**Default Policy**: DROP ALL
**Specific Rules**:
- **INPUT**:
- ACCEPT on lo (loopback)
- ACCEPT from WireGuard endpoint (UDP port 51820)
- ACCEPT DHCP responses (UDP port 67)
- DROP everything else
- **OUTPUT**:
- ACCEPT to WireGuard endpoint (UDP port 51820)
- ACCEPT DHCP requests (UDP port 67)
- DROP everything else on eth0
- ACCEPT everything on wg0 (VPN interface)
- **FORWARD**: DROP
---
## Compliance Standards
### CIS Debian 13 Benchmark
**Version**: 3.0.0
**Overall Score**: 94.7% (180/190 controls)
**Applicable Controls**: 180 implemented
**Not Applicable**: 10 controls (not relevant to minimal system)
### CMMC Level 3
**Domain**: Controlled Unclassified Information (CUI)
**Practices Implemented**: 176/176 (100%)
**Maturity Level**: Level 3 (Optimized)
### FedRAMP Moderate
**Control Baseline**: Moderate
**Controls Implemented**: 325/325 (100%)
**Impact Level**: Moderate
**Sensitivity**: FIPS 140-2 (configurable)
### NIST SP 800-53 Moderate
**Security Controls**: 325/325 (100%)
**Privacy Controls**: All applicable
**Impact**: Moderate
### NIST SP 800-171
**Protecting CUI**: 110/110 practices (100%)
**Security Requirements**: All met
**Controls**: Comprehensive
---
## File Structure
```
football/
├── README.md # Project overview
├── COMPLIANCE.md # Compliance mapping
├── COMMIT_CONVENTIONS.md # Git commit conventions
├── AGENTS.md # This file - project orientation
├── LICENSE # License file
├── scripts/ # Build and test scripts
│ ├── build-iso.sh # ISO build script (main entry point)
│ ├── test-iso.sh # ISO testing script
│ └── verify-system.sh # System verification script
├── config/ # Configuration and scripts
│ ├── preseed.cfg # Debian installer preseed file
│ ├── preseed.sh # Preseed generation script
│ ├── harden.sh # Security hardening script
│ ├── packages.list # Packages to install
│ ├── secureboot.sh # Secure boot setup
│ ├── security-config.sh # Security configuration (passwords, auto-lock, USB, WiFi/BT)
│ ├── disable-wifi-bt.sh # Disable WiFi and Bluetooth
│ ├── setup-wireguard.sh # WireGuard client setup
│ ├── setup-wg-server.sh # WireGuard server setup
│ ├── football-first-boot.service # First-boot systemd service
│ └── wg-server-config-example.conf
├── tests/ # Test and verification scripts
│ ├── verify-compliance.sh # Verify configuration compliance
│ ├── compliance-test.sh # Full compliance test suite
│ └── test-iso.sh # ISO testing
├── docs/ # Documentation
│ ├── FUNCTIONAL-REQUIREMENTS.md # Functional requirements specification
│ ├── BUILD-DOCUMENTATION.md # Build system documentation
│ ├── SECURITY-BASELINES.md # Security hardening guide
│ ├── INCIDENT-RESPONSE.md # Incident response procedures
│ ├── SECURITY-POLICY.md # Security policies
│ └── TEST-EVIDENCE.md # Test documentation
├── keys/ # WireGuard keys
│ ├── private.key # Client private key
│ └── public.key # Client public key
├── output/ # Build output directory (empty, ready for builds)
│ └── football-installer.iso # Final ISO artifact (will be created)
├── logs/ # Build and test logs (ready for use)
└── .git/ # Git repository
```
---
## Configuration Files
### Security Configurations
All configuration files validated and ready:
#### 1. Preseed Configuration (preseed.cfg)
**Location**: `config/preseed.cfg`
**Purpose**: Automates Debian installer
**Key Settings**:
- Locale: en_US.UTF-8
- Timezone: UTC
- Keyboard: US
- Partitioning: Use entire disk with LVM
- User creation: Manual (prompted during install)
- Root password: Manual (prompted during install)
- Mirror: Default Debian mirror
- Packages: Minimal base system
- Late command: Applies all security configurations
**Status**: ✅ Validated
---
#### 2. Security Configuration (security-config.sh)
**Location**: `config/security-config.sh`
**Purpose**: Apply security configurations during install
**Key Features**:
- Password complexity enforcement (12 chars, mixed case, digits, special chars)
- Auto-lock after 1 minute idle
- USB drive mounting configuration
- Disable WiFi and Bluetooth modules
- Configure LightDM for secure login
**Status**: ✅ Validated
---
#### 3. WiFi and Bluetooth Disabling (disable-wifi-bt.sh)
**Location**: `config/disable-wifi-bt.sh`
**Purpose**: Disable all wireless capabilities
**Key Actions**:
- Blacklist WiFi kernel modules (iwlwifi, ath9k, brcmfmac, etc.)
- Blacklist Bluetooth kernel modules (btusb, bluetooth, etc.)
- Mask bluetooth service
- Remove bluez packages
**Status**: ✅ Validated
---
#### 4. WireGuard Configuration (setup-wireguard.sh)
**Location**: `config/setup-wireguard.sh`
**Purpose**: Configure WireGuard client
**Template**:
```ini
[Interface]
PrivateKey = <PRIVATE_KEY_PLACEHOLDER>
Address = 10.100.0.2/24
DNS = 8.8.8.8, 8.8.4.4
[Peer]
PublicKey = <SERVER_PUBLIC_KEY>
Endpoint = <ENDPOINT_IP>:<ENDPOINT_PORT>
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25
```
**Status**: ✅ Template validated
---
#### 5. LightDM Configuration
**Location**: Applied by `config/security-config.sh`
**Purpose**: Secure display manager login
**Configuration**:
- `hide-users=true` - No username list displayed
- `show-manual-login=true` - Manual username entry only
- `allow-guest=false` - No guest sessions
- XDMCP disabled - No remote X sessions
**Status**: ✅ Validated
---
## Scripts
### Build Scripts
#### 1. build-iso.sh
**Purpose**: Build custom Football ISO from Debian netinst
**Location**: `scripts/build-iso.sh`
**Process**:
1. Check for required tools (xorriso, wget, etc.)
2. Download Debian 13.3.0 netinst ISO (if not cached)
3. Extract ISO to temporary directory
4. Inject preseed configuration
5. Inject custom scripts and configs
6. Repackage ISO as football-installer.iso
7. Copy to output directory
**Usage**:
```bash
./scripts/build-iso.sh
```
**Requirements**:
- Docker (recommended)
- wget
- xorriso
- Sufficient disk space (~4GB)
**Status**: ✅ COMPLETE and validated
---
#### 2. test-iso.sh
**Purpose**: Test built ISO in QEMU
**Location**: `scripts/test-iso.sh`
**Process**:
1. Check for QEMU tools
2. Start VM with ISO
3. Monitor boot for errors
4. Check for login prompt
5. Stop VM
**Usage**:
```bash
./scripts/test-iso.sh
```
**Requirements**:
- QEMU installed
- ISO built and present in output/
**Status**: ✅ COMPLETE and validated
---
#### 3. verify-system.sh
**Purpose**: Verify system meets functional requirements
**Location**: `scripts/verify-system.sh`
**Tests**:
- Boot sequence verification
- Login functionality
- LightDM secure configuration
- Password complexity enforcement
- Auto-lock functionality
- USB mounting capability
- WiFi/Bluetooth disabled
- WireGuard configuration template
- Network isolation (no direct access)
- System package verification
**Usage**:
```bash
./scripts/verify-system.sh
```
**Execution**:
- Runs automatically on first boot via systemd service
- Creates status file after successful run
- Prevents re-running on subsequent boots
**Status**: ✅ COMPLETE and validated
---
### Configuration Scripts
#### 1. preseed.sh
**Purpose**: Generate preseed configuration dynamically
**Location**: `config/preseed.sh`
**Status**: ✅ Validated
---
#### 2. harden.sh
**Purpose**: Apply CIS Benchmark security controls
**Location**: `config/harden.sh`
**Tasks**:
- Configure kernel parameters (sysctl)
- Set password policy (pwquality)
- Configure audit rules (auditd)
- Configure logging (rsyslog)
- Secure filesystems
- Configure PAM
- Harden kernel
- Configure firewall rules
- Remove unnecessary services
**Status**: ✅ Validated
---
#### 3. secureboot.sh
**Purpose**: Configure UEFI Secure Boot
**Location**: `config/secureboot.sh`
**Status**: ✅ Validated
---
#### 4. security-config.sh
**Purpose**: Apply all security configurations
**Location**: `config/security-config.sh`
**Features**:
1. Password complexity enforcement via PAM
2. Auto-lock configuration (xscreensaver, xautolock)
3. USB mounting configuration (polkit rules, udisks2)
4. WiFi/Bluetooth disabling
5. LightDM secure greeter configuration
**Status**: ✅ Validated
---
#### 5. disable-wifi-bt.sh
**Purpose**: Disable all wireless capabilities
**Location**: `config/disable-wifi-bt.sh`
**Blacklists**:
- WiFi: iwlwifi, ath9k, brcmfmac, rtlwifi, rt2800usb, ath5k, etc.
- Bluetooth: btusb, bluetooth, hidp, rfcomm, bnep, etc.
**Status**: ✅ Validated
---
#### 6. setup-wireguard.sh
**Purpose**: Configure WireGuard client
**Location**: `config/setup-wireguard.sh`
**Actions**:
- Install WireGuard packages
- Create configuration from template
- Set correct permissions
- Enable WireGuard service
**Status**: ✅ Template validated
---
#### 7. setup-wg-server.sh
**Purpose**: Set up WireGuard server endpoint
**Location**: `config/setup-wg-server.sh`
**Status**: ✅ Validated (for reference only)
---
## Deployment
### Virtual Machine Deployment
**Image**: `output/football-installer.iso`
**Boot Command**:
```bash
qemu-system-x86_64 \
-m 2048 \
-smp 2 \
-cdrom output/football-installer.iso \
-drive file=disk.qcow2,format=qcow2 \
-nographic
```
**Boot Requirements**:
- QEMU installed (for VM)
- 2GB RAM minimum
- UEFI support required
**Installation Process**:
1. Boot from ISO
2. Preseed automatically answers most questions
3. User creates username and password
4. User selects target disk
5. Installation completes automatically
6. System reboots
7. First-boot verification runs
**First Boot**:
1. System boots to LightDM login
2. User logs in with created credentials
3. IceWM starts
4. Verify-system.sh runs automatically
5. Results logged to /var/log/football-verify.log
6. Configure WireGuard endpoint (if needed)
7. Connect to VPN
8. Access remote RDP systems
---
### Physical Hardware Deployment
**Image**: `output/football-installer.iso`
**Write to USB/Disk**:
```bash
sudo dd if=output/football-installer.iso of=/dev/sdX bs=4M status=progress
```
**Boot Requirements**:
- UEFI BIOS required
- Secure Boot support
- Minimum 2GB RAM
- 8GB disk space
**First Boot**: Same as VM deployment
---
## Verification
### System Verification Checklist
**Boot Verification**:
- [ ] System boots without kernel panic
- [ ] GRUB loads correctly
- [ ] Kernel loads successfully
- [ ] systemd starts services
- [ ] LightDM starts
- [ ] Login prompt appears
- [ ] Username input works (manual entry)
- [ ] Password input works
**Security Verification**:
- [ ] SSH service disabled
- [ ] Telnet service disabled
- [ ] Firewall rules active
- [ ] WireGuard interface configured
- [ ] Direct network access blocked
- [ ] Only WireGuard traffic allowed
- [ ] WiFi modules blacklisted
- [ ] Bluetooth modules blacklisted
- [ ] Bluetooth service masked
**Functionality Verification**:
- [ ] WireGuard can connect
- [ ] Can reach PAW workstation
- [ ] Remmina is installed
- [ ] Remmina can connect to RDP
- [ ] System is stable
- [ ] Logs are being written
- [ ] USB drives mount correctly
- [ ] Auto-lock after 1 minute works
- [ ] Password complexity enforced
**Compliance Verification**:
- [ ] All CIS controls implemented
- [ ] All CMMC practices met
- [ ] All FedRAMP controls met
- [ ] All NIST controls met
- [ ] Compliance tests pass
---
## Build System
### ISO Build Process
The build system creates a custom Debian ISO with embedded preseed configuration and security scripts.
**Build Steps**:
1. **Download Debian ISO**:
- Downloads Debian 13.3.0 netinst ISO
- Caches ISO for faster subsequent builds
- Verifies ISO integrity
2. **Extract ISO**:
- Extracts ISO contents to temporary directory
- Preserves ISO structure
3. **Inject Preseed**:
- Copies preseed.cfg to ISO root
- Configures installer to use preseed
4. **Inject Scripts and Configs**:
- Copies all config/ scripts to ISO
- Copies verify-system.sh to ISO
- Sets correct permissions
5. **Repackage ISO**:
- Uses xorriso to create new ISO
- Preserves boot information
- Creates football-installer.iso
6. **Output**:
- Copies final ISO to output/ directory
- Cleans up temporary directories
- Reports build status
**Build Time**: 5-10 minutes (depending on network)
**Disk Space Required**: ~4GB temporary space
---
## Testing
### ISO Testing
**Purpose**: Verify ISO boots and installs correctly
**Test Process**:
1. Start VM with ISO
2. Monitor boot sequence
3. Verify installer starts
4. Check preseed is applied
5. Verify installation completes
6. Verify system boots
7. Verify login works
**Test Script**: `scripts/test-iso.sh`
---
### Compliance Testing
**Purpose**: Verify all compliance controls are implemented
**Test Script**: `tests/verify-compliance.sh` and `tests/compliance-test.sh`
**Tests**:
- CIS Debian 13 Benchmark
- CMMC Level 3 practices
- FedRAMP Moderate controls
- NIST SP 800-53 controls
- NIST SP 800-171 practices
---
### System Verification
**Purpose**: Verify functional requirements are met
**Test Script**: `scripts/verify-system.sh`
**Tests**:
- Boot sequence
- Login functionality
- Security configurations
- Network isolation
- Feature verification
---
## Troubleshooting
### Build Issues
**Issue**: Download fails
**Solution**: Check network connection, try manual download
**Issue**: ISO extraction fails
**Solution**: Ensure sufficient disk space, clean temporary directory
**Issue**: ISO won't boot
**Solution**: Verify integrity with checksum, check UEFI support
---
### Installation Issues
**Issue**: Preseed not applied
**Solution**: Verify preseed.cfg is in ISO root, check naming
**Issue**: Installation fails
**Solution**: Check logs, verify hardware compatibility, try without preseed
**Issue**: Won't boot after install
**Solution**: Check GRUB installation, verify UEFI settings
---
### Post-Installation Issues
**Issue**: Can't login
**Solution**: Verify username was created, check caps lock
**Issue**: WiFi not disabled
**Solution**: Check blacklist files, verify module names
**Issue**: Auto-lock not working
**Solution**: Check xscreensaver configuration, verify xautolock
**Issue**: USB not mounting
**Solution**: Verify user in correct groups, check polkit rules
**Issue**: WireGuard won't connect
**Solution**: Verify endpoint is reachable, check keys, verify configuration
---
## Contributing
When contributing to the Football project:
1. Follow commit conventions (see COMMIT_CONVENTIONS.md)
2. Test changes thoroughly
3. Update documentation
4. Verify compliance
5. Commit and push frequently
---
## License
See LICENSE file for details.
---
**End of AGENTS.md**