Lafine Systems Design · Technical Documentation

RoamSwitch Server Edition Technical Whitepaper

Autonomous Network Security & Integrity Defense Suite for Cloud & Headless Linux Server Infrastructures

Version v1.1.0 Scope RoamSwitch Server Edition 1.3.2 Requirements systemd + nftables Published 2026-09-07

§1Overview & Core Tenets

RoamSwitch Server Edition is a headless, resident autonomous network security and integrity protection suite purpose-built for Linux server infrastructures across cloud providers (AWS, GCP, Azure, bare-metal VPS) and on-premises data centers.

Unlike client workstation editions focused on mobility and Wi-Fi perimeter adaptation, the Server Edition is founded on five uncompromising tenets: Inbound Default Drop, Critical Path File Integrity Monitoring (FIM), Preemptive Kernel LPE & Privilege Escalation Hardening, eBPF Runtime Threat Telemetry, and Autonomous Air-Gap Host Isolation with Pre-severance Emergency Alerts.

Built with a strict Zero Telemetry guarantee, the software contains zero external HTTP/TLS analytics or tracking libraries. All administrative secrets and tokens are cryptographically secured under strict 0600 permissions.

1.1 Comparison: Client Edition vs. Server Edition

Dimension Client Edition (Desktop/Mobile) Server Edition (Headless/Infrastructure)
Deployment Laptops, mobile developer workstations Cloud VMs, bare-metal nodes, container hosts
Network Behavior Dynamic profile switching based on Wi-Fi SSID / Gateway MAC Static Inbound Default Drop. Only explicitly allowed ports are exposed
User Interface GTK3 Desktop GUI + Tray indicator Pure Headless CUI. CLI commands + Interactive wizard
Incident Notifications Desktop notifications (libnotify) Direct push to Telegram Bot, LINE Messaging API, and Webhooks (Slack/Discord)
Primary Defenses Public Wi-Fi ARP spoofing, BadUSB, ransomware document encryption External reconnaissance drop, FIM tampering detection, container escapes, kernel LPE (CVE-2026-53362)

1.2 Core Architectural Principles

  • Zero Telemetry: The software never transmits telemetry, metrics, or telemetry to external servers. External network calls occur strictly for user-configured incident alerts via subprocess curl execution. By default it carries no external communication library. The one exception: only if the operator explicitly opts in to cve_kernel_map_updates_enabled (default false) does roamswitch-updater anonymously fetch the container-isolation kernel CVE database from lafine.net once a day.
  • Inbound Default Drop: Inbound packets not destined for an explicitly declared service port or the administrative SSH maintenance port are discarded at the nftables kernel level without generating ICMP RST packets.
  • Fail-Closed Autonomous Containment: Emergency Air-Gap rules survive daemon restarts and process crashes. If external actors attempt to flush nftables tables, the daemon detects the drift and restores isolation within seconds.
  • 0600 Cryptographic Secret Protection: /etc/roamswitch/server.conf enforces strict 0600 permissions (readable only by root) upon creation and every update.

§2Threat Landscape & Adversary Model

Modern internet-facing servers confront relentless automated scanning, container breakout vectors, and zero-day kernel privilege escalations.

Key Threat Vectors Addressed
  1. Automated Reconnaissance & DB Exposure: Internet-wide scanners locating unintentionally exposed internal database ports (MySQL 3306, Redis 6379, Postgres 5432).
  2. Critical Path Tampering & Backdoor Insertion: Intruders establishing persistence by modifying core authentication binaries (/bin/login, /usr/bin/sudo, /etc/pam.d/*, /etc/shadow).
  3. Kernel Privilege Escalation (CVE-2026-53362 Frag Gap): Unprivileged attackers weaponizing user namespaces (unshare -U -r) to trigger kernel memory corruption and escalate to root.
  4. Container Socket Breakout: Misconfigured containers with mounted /var/run/docker.sock or --privileged flags executing root actions on the host OS.
  5. Process Memory Snooping: Attackers attaching ptrace or reading /proc/$pid/mem across processes to extract private keys or credentials.

§3System Architecture

RoamSwitch Server Edition operates as native Rust binaries designed for minimal memory and zero CPU overhead.

┌─────────────────────────────────────────────────────────────┐
│  User & administrator space                                 │
│                                                             │
│   roamswitch (CLI)             roamswitch-mcp (AI Agent)    │
│   · server status (30-item)   · security audit tool suite   │
│   · server config / setup      · stdio JSON-RPC             │
│   · fim verify / update                                     │
│        │                               │                    │
└───────┼───────────────────────────────────┼─────────────────┘
         │ (CLI commands & config apply) │ (stdio)
┌───────▼───────────────────────────────────▼─────────────────┐
│  System foundation (systemd + root privilege)               │
│                                                             │
│   roamswitch-server-daemon                                  │
│   ├── CriticalPathFim (SHA-256 background sweep)            │
│   ├── eBPF / Falco integration module                       │
│   ├── Notifier (instant Telegram / LINE / Webhook alerts)   │
│   └── Air-Gap Controller (deploys nftables emergency rules) │
│                                                             │
│   Config: /etc/roamswitch/server.conf (permission 0600)     │
│   Integrity DB: /var/lib/roamswitch/fim_baseline.db         │
└─────────────────────────────────────────────────────────────┘

§4Core Defense Mechanisms

4.1 Boundary Security (Inbound Default Drop)

nftables applies policy drop on inbound traffic, permitting established connections, loopback, and explicitly configured ssh_ports and allowed_ports.

Preservation of SSH management ports prevents accidental operator lockout during emergency Air-Gap states.

4.2 Critical Path File Integrity Monitoring (FIM)

Monitors 150+ critical OS authentication and administrative files (/bin/login, /usr/sbin/sshd, /etc/pam.d/*, etc.). Calculates SHA-256 hashes against /var/lib/roamswitch/fim_baseline.db. Package manager hook /etc/apt/apt.conf.d/99roamswitch-fim automatically updates the baseline following authorized apt upgrade operations.

4.3 Kernel & Container Hardening

Frag Gap (CVE-2026-53362) Mitigation: Enforces user.max_user_namespaces = 0 via sysctl, neutralizing LPE vectors. Yama LSM Protection enforces kernel.yama.ptrace_scope = 2, preventing unauthorized memory inspection. Container workloads are audited for docker.sock exposure.

Docker's published ports (-p) are known to bypass the host's standard firewall, so protect_docker_ports=true (default) permanently inserts inspection rules into the DOCKER-USER chain, blocking any external traffic that isn't explicitly permitted. In addition, an always-on guard watches docker events in real time and immediately notifies you when a --privileged container starts or /var/run/docker.sock is bind-mounted — a container-escape risk (no configuration needed; notify-only, no automatic blocking). For hosts that handle files for others — a mail relay, a shared folder — an optional File Scan Guard (embedded YARA plus optional ClamAV) provides periodic scanning and automatic quarantine.

4.4 eBPF Runtime Threat Telemetry & Anti-Bloat Tuning

Utilizes Modern eBPF (CO-RE / BTF) probes to intercept privilege escalation and container breakout attempts in milliseconds. To eliminate the standard pain points of Falco—log bloat, disk exhaustion, and CPU overhead—RoamSwitch standardizes an optimized profile (/etc/falco/config.d/99-roamswitch-optimized.yaml):

  • Severity Filtering (priority: warning): Suppresses noisy operational telemetry (Info/Notice) by 95%, surfacing strictly actionable security incidents.
  • Kernel-Level Pre-Drop (drop_failed_exit: true): Discards failed syscall exits directly in the kernel probe, cutting CPU context switches by over 50%.
  • Memory Footprint Optimization (cpus_for_each_buffer: 2): Compresses ring buffers from 8MB down to 2MB, strictly limiting memory usage to 30–50MB.
  • Direct UNIX Domain Socket IPC: Direct streaming to /var/run/roamswitch/events.sock completely eliminates disk I/O thrashing.
  • Automated Log Cap (/etc/logrotate.d/roamswitch-falco): Daily rotation with maxsize 50M and 7 compressed cycles permanently prevents disk capacity exhaustion.

4.5 Emergency Air-Gap Isolation with Pre-Severance Alerts

Immediately prior to cutting network interfaces upon critical tampering, the daemon synchronously dispatches emergency alerts to Telegram, LINE, and Webhooks. Alerts automatically append the server Hostname and Primary IP Address.

Emergency Alert Format (JA/EN)
🚨 [RoamSwitch IMMINENT AIR-GAP] CRITICAL: IMMINENT AIR-GAP HOST ISOLATION (cve_2026_53362_lpe)
🚨 CRITICAL SECURITY INCIDENT DETECTED: cve_2026_53362_lpe
Host: production-node-01 (IP: 192.168.1.10)
Process: exploit_payload (PID: 4921)
ACTION: Initiating host Air-Gap network isolation (SSH preservation active).
WARNING: Outbound internet connectivity will be cut immediately after this message.
Timestamp: 2026-09-06 18:00:00

§530-Check Security Diagnostic Suite

The Server Edition executes 30 specialized security health audits:

# Category Check Title Standard & Logic
1Auth & AccessSSH Root Login & Password AuthVerifies PermitRootLogin no & password auth disabled
2Auth & AccessEmpty Password AccountsEnsures no user has blank password hash in /etc/shadow
3Auth & AccessSudoers Privilege HygieneVerifies no unauthorized NOPASSWD directives exist
4NetworkInbound Default DenyAudits nftables for default inbound drop policy
5Kernel & IntegrityUnprivileged User Namespaces (Frag Gap)Ensures user.max_user_namespaces = 0 (CVE-2026-53362)
6Kernel & IntegrityeBPF BTF SupportValidates kernel BTF type information via /sys/kernel/btf/vmlinux
7Kernel & IntegrityeBPF LSM ActiveChecks for bpf in kernel lsm= boot parameter
8Kernel & IntegrityeBPF Runtime Security AgentValidates telemetry link to Falco / Tetragon agents
9ContainerDocker Socket Mount AuditDetects container mounts of /var/run/docker.sock
10ContainerDocker Privileged ContainersAudits for high-risk --privileged container workloads
11IntegrityCritical Path File Integrity (FIM)Validates SHA-256 hashes of 150+ core OS binaries
12Kernel & IntegrityYama Process ProtectionVerifies kernel.yama.ptrace_scope = 2
13NetworkIP Forwarding DisabledVerifies net.ipv4.ip_forward = 0
14NetworkTCP SYN Cookie ProtectionVerifies net.ipv4.tcp_syncookies = 1
15NetworkReverse Path Filtering (rp_filter)Verifies strict reverse path filtering (rp_filter = 1)
16Kernel & IntegrityCore Dump RestrictionPrevents process memory leaks via fs.suid_dumpable = 0
17OperationsAutomatic Security UpdatesValidates configuration of unattended-upgrades
18OperationsNTP Time SynchronizationChecks synchronization via chrony or systemd-timesyncd
19OperationsSSH Brute-force ProtectionVerifies active monitoring via fail2ban or crowdsec
20Kernel & IntegrityUnprivileged eBPF DisabledChecks kernel.unprivileged_bpf_disabled = 1
21NetworkICMP Redirects IgnoredPrevents route poisoning via accept_redirects = 0
22NetworkICMP Echo Broadcasts IgnoredMitigates Smurf amplifier DoS attacks
23Kernel & IntegrityShared Memory HardeningEnsures /dev/shm has nodev,nosuid mount options
24Auth & AccessLegacy Insecure Protocols AbsentVerifies absence of cleartext daemons (telnet, rsh, tftp)
25Kernel & IntegritySUID Process Core Dumps RestrictedPrevents credential leaks on SUID binary crashes

§6Self-Check (Reproducible Verification in a Docker Environment)

RoamSwitch Server Edition's defense mechanisms (Inbound Default Drop, Critical Path FIM, guard.yaml severity-based containment, the protected-process safety rail, the safety timer, kernel LPE hardening, and more) can be fully reproduced and verified on your own machine by running a separate Docker container as the external attacker against the real roamswitch-server v1.3.2 package installed from the official APT repository (not a locally built binary). Below are the eight verification scenarios and the behavior (pass criteria) each one should exhibit. See 6.3 below for the exact steps and scripts.

# Scenario Attack Technique Pass Criterion
PENT-S1 Nmap SYN Stealth Scan Probe across ports 22, 80, 443, 3306, 8080 PASS (100% Stealth)
PENT-S2 Unallowed Port Probing curl direct connections to port 3306 and 8080 PASS
PENT-S3 Egress / C2 blocklist Outbound connection attempt to an address registered in the malicious-IP feed PASS
Only the registered address is blocked; traffic to a non-blocklisted host is unaffected (not a blanket block)
PENT-S4 FIM Tampering Attack Inject backdoor payload into /bin/login PASS (Instant Detection)
PENT-S5 guard.yaml severity-based containment Injected a Falco Critical event referencing a real process PASS
The offending process is network-isolated, then SIGKILLed
PENT-S6 Protected-process safety rail Injected the same kind of event referencing the real sshd PID PASS
sshd keeps running; only a refusal is logged as a false positive
PENT-S7 Safety timer Left an Air-Gap incident unacknowledged (no operator ACK) PASS
Auto-restores when unacknowledged; stays isolated until emergency-restore once ACKed
PENT-S8 Kernel LPE Frag Gap Execute unshare -U -r as unprivileged user PASS (Rejected)

SSH Lockout Prevention

While a host-wide Air-Gap (on_emergency) is engaged, the administrator's SSH session is not cut off, thanks to preserve_ssh_on_isolation=true (the default). This design structurally prevents the scenario where a false positive isolates a server completely, leaving it unreachable without physical or console access. You can verify this behavior yourself with the PENT-S7 step in the Docker test suite above.

Scope Limits (an Honest Disclosure)

What This Cannot Verify

Kernel hardening (disabling unprivileged user namespaces, raising Yama's ptrace_scope) cannot be verified end-to-end from inside a container. Those sysctls are not namespaced per-container, so a privileged (--privileged) container's writes to them land on the real machine running the test, not a sandbox. This verification therefore only confirms that the sysctl write degrades gracefully (no crash) against a read-only filesystem; confirming the value actually lands requires a real machine or VM, which is how the product is meant to run anyway.

Reproduce It Yourself

Every result above can be reproduced 100% on your own machine, using nothing but the official distribution package, via the Docker test suite published in the official support repository (roamswitch-support) — no source-code access, and no need to trust us, required.

# Fetch and reproduce the verification suite (automatically installs roamswitch-server from the official APT repository)
git clone https://github.com/lafine1211/roamswitch-support.git
cd roamswitch-support/test/docker/server
./run.sh

Builds three disposable containers (Target, Attacker, and a C2 decoy) on Docker's default bridge network and automatically verifies all 18 items, printing a report. The full run output is published at RESULTS-PENTEST-SERVER-2026-09-07.md (including, for transparency, the test-harness issues found and fixed while building it).

§7Operations, Deployment & Lifecycle

7.1 Headless CUI Tooling & Setup Wizard

Complete remote management via CLI:

  • roamswitch server status: Full 30-check diagnostic output (JA/EN).
  • roamswitch server setup: Interactive terminal wizard for ports and notifications.
  • roamswitch server config show / set <key> <val>: Scriptable automation for Ansible/Terraform.
  • roamswitch server test-notify [all|telegram|line|webhook]: End-to-end notification probe.

7.2 Packaging

Distributed via official Debian/Ubuntu .deb repositories, RHEL/Fedora .rpm repositories, and Arch Linux AUR (roamswitch-server-bin).

§8Conclusion

RoamSwitch Server Edition delivers an uncompromised defensive perimeter for Linux server infrastructures: Zero Telemetry privacy, Inbound Default Drop, Critical Path FIM, and proactive kernel privilege escalation mitigation, delivering unified autonomous defense for modern cloud nodes.

It is a next-generation Linux server security standard that delivers layered defense and autonomous containment (Air-Gap) across every stage of the attack vector a cyber attacker targets — initial reconnaissance, intrusion, privilege escalation, and persistence.

This document reflects the implementation as of RoamSwitch Server Edition v1.3.2 (Inbound Default Drop, Critical Path FIM, guard.yaml policy engine, kernel LPE hardening, eBPF runtime monitoring, Air-Gap safety timer). See the roamswitch-support CHANGELOG for a line-by-line change history. For the latest information, see lafine.net/linux.