Lafine Systems Design · Technical Documentation

RoamSwitch Server Edition Architecture & Security Whitepaper

A headless, autonomous network security & integrity protection suite for cloud and on-premises Linux infrastructure. It uses no promotional wording; what is described is meant to be verifiable against the actual behavior of the official distribution packages and the self-check in §6.

Version v1.13.0 Scope RoamSwitch Server Edition 1.13.0 (DNS tunnel detection, honeytokens, forensic evidence capture, NIST CSF / CIS Controls mapping, signed kernel CVE map updates, SSH brute-force blocking, FIM intrusion context, SUID and log-clearing detection, AI-agent account restrictions and the detection coverage map) Requirements systemd + nftables Published 2026-10-20

§1Overview & Core Tenets

RoamSwitch Server Edition is a headless, resident, autonomous network security and integrity protection suite for Linux server infrastructure running on AWS, Google Cloud, Azure, and various VPS and bare-metal hosts.

Unlike the client edition, which centers on following Wi-Fi roaming, the server edition is built around "minimal exposure through Inbound Default Drop", "immediate detection of tampering with critical paths (Critical Path FIM)", "preventive blocking of the kernel privilege-escalation vulnerability (Frag Gap CVE-2026-53362)", "runtime threat monitoring with eBPF", and "autonomous Air-Gap isolation and emergency notification".

The Zero Telemetry principle — no external-communication library in the daemon itself — is enforced at the code level (by default the only thing that leaves the host is a receive of signed data (the kernel CVE data, the web rules, the KEV list, the EPSS scores, the Node.js vulnerability data and, on Ubuntu servers, the Ubuntu package CVE data used by the OS-package CVE check; the manifest is checked daily, the CVE data itself about once a week, the KEV and EPSS lists daily), which can also be turned off, and every other exception is something the operator explicitly opts into; see the core design principles in §1.2), and secrets (bot tokens and configuration) are protected with 0600 permissions.

1.1 Differences between the client and server editions

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 + a terminal UI (roamswitch-server-tui)
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: by default, nothing about the user or the environment is sent outside. The daemon itself has no HTTP/TLS communication library; only for notifications and forwarding the operator has configured does it run the system curl (Telegram / LINE / webhook; secrets such as tokens and URLs are passed in a config on standard input, never on the command line) and openssl (TLS syslog forwarding) as subprocesses. The only external communication enabled by default, apart from package-manager updates, is the following. (1) While cve_kernel_map_updates_enabled (default true) is on, roamswitch-updater receives signed data anonymously from lafine.net. This covers the kernel CVE data for container-isolation auditing, the web application detection rules (web rules), the KEV list (only the CVE numbers of vulnerabilities that CISA has confirmed as exploited), the EPSS list (the probability of exploitation assigned by FIRST), the Node.js vulnerability data used to check a Node.js itself installed outside package management and, on Ubuntu servers, the Ubuntu package CVE data used by the OS-package CVE check. The signed manifest and its signature are checked every day (two GETs); the kernel CVE data, the Node.js vulnerability data and the Ubuntu package CVE data are fetched only when about 7 days have passed since the last refresh (a server that has no Ubuntu data yet fetches it at the next daily check), and the web rules, the KEV list and the EPSS list only when the manifest has a newer version. The exception: an OS-package CVE map is fetched on the next daily check, without waiting for the 7 days, when the manifest has a newer version of it and the map on the device was built before the KEV list, so that a CVE newly listed in CISA's KEV is not left unflagged for days. It is a plain HTTPS GET with no query string and no cookies, whose only header that names the software is a fixed User-Agent: RoamSwitch-Updater; only data whose Ed25519 signature verifies is accepted, and nothing about this host is sent. The operator can turn it off with roamswitch server config set cve_kernel_map_updates_enabled false, the setup wizard or the server TUI; an explicit false in an existing server.conf is kept as it is, and the audit still runs from the embedded baseline when it is off. The OS-package CVE check on an Ubuntu server, however, then reports that no local CVE data is installed and returns no result. Every other exception is something the operator explicitly opts into. (2) Event forwarding (forward_enabled, default false) sends only to the syslog / JSON Lines file / signed webhook destinations the operator configured. (3) Only if npm_audit_signatures_enabled (default false) is enabled and the operator runs roamswitch audit-npm-signatures <DIR> --confirm does npm itself contact registry.npmjs.org. In addition, only if you write your own domains in domain_check_domains (empty by default) does dig ask the resolver, and curl the TLD registry's RDAP server (and, for a domain with MX records, that domain's own mta-sts host), about those names. (4) Only if sensor_pairing_enabled (default false) is enabled does it connect, and only to the Sensor address the operator enters (the Sensor is a separate product and is not covered by Zero Telemetry). (5) Fleet (Business tier) is device-side code only: a device that is not enrolled sends nothing and does not resolve any name; the management service is not deployed or released, and by design there is no remote-command path. (6) The LLM integration of the bundled separate tool accessscope (access-log security diagnosis) is off by default. Only when it is enabled (on the command line, when --llm is given) may a diagnosis summary, evidence log lines and environment information (for the log-finding feature) be sent to an external service through the LLM command the operator chose. The daemon (roamswitch-server) takes no part in this communication, AccessScope can run its LLM analysis as root (the LLM then runs with root's rights, so an unprivileged user is recommended), and it is outside Zero Telemetry. The bundled separate tool personalsoc (checks logs and defenses) works the same way: only when --llm is specified, a summary of the diagnosis may be sent to an external service through the LLM command the operator chose (outside Zero Telemetry). The pathscope command does not call an LLM. (7) Only if clamav_enabled (default false) is turned on does the daemon run freshclam to receive ClamAV signatures (once when no signature database exists yet, and, while clamav_scan_dirs is set, every clamav_freshclam_interval_secs, default 7200 seconds).
  • Inbound Default Drop discards, with nftables, new incoming (TCP) connections to any port other than the allowed ones, and does not even return an RST. A port scan sees only the allowed ports (loopback, established connections, ICMP and ICMPv6 pass).
  • Fail-closed & self-healing: the default-deny and isolation rules stay in the kernel and are kept even if the daemon stops. Rules that disappear are reinstalled every 60 seconds for Docker published-port protection, every 300 seconds for Egress and port-scan blocking, and every 15 seconds for DEGRADED isolation. If the default-deny rule itself is deleted from outside, it is not restored, so check with roamswitch server status.
  • Protection with 0600 permissions: the configuration file /etc/roamswitch/server.conf is automatically set to permission 0600 every time it is created or updated. Secrets such as tokens and webhook URLs are passed to curl through its standard-input configuration and are not put on the command line (/proc/<pid>/cmdline, which other users can see).

§2Threat Landscape & Adversary Model

The threats faced by a public server that is always exposed to the internet are modeled as follows.

The five assumed threat scenarios
  1. Indiscriminate port scanning & exposed internal DBs: attacks on MySQL (3306) or Redis (6379) listening on 0.0.0.0.
  2. Tampering with critical paths (persistent backdoors): modification of /bin/login or /etc/pam.d/*.
  3. Kernel privilege escalation (Frag Gap CVE-2026-53362, etc.): taking root from an unprivileged User Namespace.
  4. Container breakout: host takeover through docker.sock or a privileged container.
  5. Theft of secrets from process memory: extracting private keys with ptrace.

§3System Architecture

RoamSwitch Server Edition consists of a set of lightweight, Rust-native binaries for headless environments.

┌─────────────────────────────────────────────────────────────┐
│  User & administrator space                                 │
│                                                             │
│   roamswitch (CLI)             roamswitch-mcp (AI Agent)    │
│   · server status (42-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.db                  │
└─────────────────────────────────────────────────────────────┘

§4Core Defense Mechanisms

4.1 Boundary Security (Inbound Default Drop)

nftables applies policy drop to the input chain of the inet roamswitch_server table, permitting established connections, loopback, ICMP/ICMPv6, and new inbound TCP connections only to the configured ssh_ports and allowed_ports.

Even during Air-Gap (emergency isolation), the management path (new and established) of the maintenance SSH ports (ssh_ports) and maintenance source IPs (whitelist_ips) is kept (preserve_ssh_on_isolation, default true). Other established connections, such as C2, are cut. If the maintenance sources are empty, the maintenance SSH ports accept new connections from all sources even during isolation, so a warning is shown at startup. Setting it to false cuts SSH as well.

4.2 Critical Path File Integrity Monitoring (FIM)

Monitors the SHA-256 hash integrity of the files most critical to boot, authentication, networking and system administration. The scope is 27 fixed paths (/etc/shadow, /etc/passwd, /etc/sudoers, /etc/ssh/sshd_config, /bin/login, /usr/bin/sudo, /usr/sbin/sshd, /usr/lib/systemd/systemd and others); every file directly inside 19 directories (except known_hosts and known_hosts.old in /root/.ssh, which are rewritten on every SSH connection) (/etc/pam.d, /etc/sudoers.d, /etc/ssh/sshd_config.d, /etc/cron.d and /etc/cron.{hourly,daily,weekly,monthly}, /etc/systemd/system, /etc/ld.so.conf.d, /etc/profile.d, /etc/apache2/conf-enabled, /etc/apache2/sites-enabled, /etc/apache2/mods-enabled, /etc/nginx/conf.d, /etc/nginx/sites-enabled, /etc/httpd/conf.d, /etc/httpd/conf.modules.d, /root/.ssh), where the appearance of new files is also detected; RoamSwitch’s own binaries; each login-capable user’s authorized_keys; and /etc/ld.so.preload, which must not exist (its appearance is detected). After a package update, only the files of the updated packages whose content matches the package's own record are taken into the baseline: on Debian-based systems by the /etc/apt/apt.conf.d/99roamswitch-fim hook (apt upgrade and so on), and on RHEL-based systems and openSUSE by a systemd.path unit watching /var/lib/rpm (roamswitch-fim-update.path); both run roamswitch fim package-end. A system account that a package added during an apt or pacman update is taken into passwd, group, shadow and gshadow only when lines were only added, the UID and GID are below 1000, the account cannot log in and has no password, and it was written by an account tool such as useradd under a package manager in a system path. Any other change is not taken in and is reported with its writer and the reason. While a package is being installed or updated (while dpkg/apt holds an fcntl record lock), verification is postponed, and the daemon also waits up to 120 seconds before building the first baseline (1.11.18 and later; before that, if the daemon started during an apt install, the baseline could include half-written files and cause a false tamper alert right afterward). Tamper notifications are not repeated when the daemon restarts, because the record of what was already notified is kept in /var/lib/roamswitch (in 1.12.1 and earlier the same notification came out after every restart; fixed in 1.12.2).

Identifying the intrusion path (who made the change, and through which SSH login)

File-change notifications (critical-path FIM and lock-file FIM) include the process that made the change (account, executable, command) and the SSH login (source IP and port, time, authentication method, key fingerprint) (enabled by default; fim_intrusion_context_enabled). To cope with short-lived processes, it takes a snapshot of /proc/<pid> right when the event is read, and falls back on the execution recorder when that fails. It works even when the SSH guard is disabled, and sends nothing externally.

Only values reported by the kernel are used for the decision (/proc/<pid>/exe, loginuid, and the cgroup's session-N.scope). Values a process can change, such as comm, are only displayed; claiming to be sshd is not enough to count as an SSH login. The notification distinguishes found, “No SSH login was found”, and “The login path could not be determined”, and it is always sent even if retrieval fails.

/etc/ssh/sshd_config: modified
  Process: root (logged in as admin) / /usr/bin/tee / command: tee /etc/ssh/sshd_config (pid 4121)
  SSH login: the session admin opened from 203.0.113.25:51544 at 2026-10-17 03:12:08 (authentication: publickey, key SHA256:AbCdEf0123456789)

/etc/sudoers: modified
  The login path could not be determined (the change was found by the periodic scan, so the process that made it is not known)

Edits that put a new file in place under the same name, such as install, sed -i, and cp or mv within the same directory, are also detected, using a mark set on the directory. Limitation: a file brought in with mv from another directory is not noticed until the periodic scan (fim_check_interval_secs), and the process that wrote it is not known.

Measurements were taken on an Ubuntu 24.04 VM with the connection source placed in a separate netns. With sudo tee, a process detached with nohup (even after logout), a chain of sudo -i, or a short-lived cat, the IP, user, and authentication method all appeared in the notification. A local login was reported as "no SSH login found", and a disguise with exec -a "sshd: …" was not treated as SSH.

Besides the notification, the record is kept in the timeline (type fim) and in /var/lib/roamswitch/fim_intrusions.json (root only, latest 100 entries), and MCP's verify_fim shows it in recentIntrusionContext (only when running as root). The tamper verdict does not change. Limitation: it is not attached to persistence_watch notifications. What it tells you is the modifying process and the login; the entry point of the intrusion (such as the vulnerability exploited) is not known. Set fim_intrusion_context_enabled=false to turn it off.

SUID/SGID file inventory (suid_watch)

Finds new SUID files in places outside FIM's fixed list, and SUID bits added later. Every suid_watch_interval_secs (default 600 seconds) it walks the local filesystems and records the mode, owner, size, and SHA-256 of SUID and SGID executables (enabled by default; suid_watch_enabled). It compares them with the initial list in /var/lib/roamswitch/suid_baseline.json and notifies once, at Critical, about a new file, a SUID grant, or a change in mode, owner, or content (ATT&CK T1548.001).

What it cannot see: inside image layers, bits set and removed between scans, and changes while the package manager is running (up to 3 scans are deferred). It does not isolate. sudo roamswitch fim verify shows SUID differences (exit code 1 if there are any), and sudo roamswitch fim update takes the current state as the baseline. Changes that a package update explains are added to the baseline without a notification.

Detecting cleared logs (log_tamper_watch)

Watches for log clearing (ATT&CK T1070.002). Every 30 seconds it remembers the inode and size of auth.log, syslog, wtmp, and similar files, and notifies at Critical when one has shrunk (from 1024 bytes or more), disappeared, or been replaced (enabled by default; log_tamper_watch_enabled). For the journal, it notifies when the archive total drops to less than one fifth from 4 MiB or more (for example journalctl --vacuum-time=1s).

What it cannot see: operations that rewrite wtmp, btmp and lastlog without changing their size, operations that empty them and write them back to the original size, changes while the daemon is stopped, and disguise through alias files. Changes caused by log rotation within the last 120 seconds are not reported. One notification is sent per change, and it is recorded in the timeline (ATT&CK T1070.002).

4.3 Kernel & Container Hardening

As a Frag Gap (CVE-2026-53362) countermeasure, user.max_user_namespaces = 0 forbids unprivileged namespaces, and kernel.yama.ptrace_scope = 2 rejects ptrace attach. Exposure of docker.sock to containers is also always audited. The namespace prohibition (harden_userns_enabled) is enabled by default in the server edition. If you use rootless Podman or similar, set it to false.

Docker published ports (-p) bypass the host firewall. So with protect_docker_ports=true (default), traffic from outside to anything other than the allowed ports (ssh_ports, allowed_ports) is blocked (return traffic, loopback, and container-to-container traffic are excluded). The rules go in the DOCKER-USER chain with iptables-based setups, or in the inet roamswitch_docker_guard table (priority -10) with nftables, such as Docker 29 and later, and are reinstalled if they disappear. Launching with --privileged or mounting /var/run/docker.sock is notified immediately through docker events (it is not blocked). The optional File Scan Guard (YARA and optional ClamAV) performs periodic scans and automatic quarantine.

External access to a published port is forwarded after DNAT, so the forward chain also lets through new connections whose original destination is an allowed port (TCP); ports that are not allowed are still dropped by policy drop. In 1.12.2 and earlier, the forward chain dropped even ports listed in allowed_ports, so a container published with -p was unreachable from outside (fixed in 1.12.3).

Container exec guard (container_exec_guard_enabled, default true). It sets fanotify FAN_OPEN_EXEC (notification class) on running Docker containers, scans executed files with YARA, and notifies. Containers that were already running before the daemon started are covered too, and files that deleted themselves right after execution can also be scanned. It is notify-only and does not stop execution. If the subscription fails repeatedly, the reconnect interval doubles from 5 seconds up to 5 minutes.

Detecting connections to the cloud metadata service (metadata_watch)

With metadata_watch_enabled (enabled by default), when a non-root program or container newly connects to a cloud metadata address (such as 169.254.169.254), inet roamswitch_metadata_watch records it in the kernel log, and the daemon notifies once per day per account. It does not block the traffic. A technique that uses a 302 redirect to point inward is not visible in access logs, and is caught by this outbound traffic. Legitimate use can be excluded with metadata_watch_allow_users (not possible for containers).

4.4 eBPF Runtime Threat Telemetry & Anti-Bloat Tuning

With Modern eBPF (CO-RE / BTF) probes, signs of privilege escalation and container breakout are detected in milliseconds. For the "log bloat, disk exhaustion, and CPU load" that tend to be problems when deploying Falco, RoamSwitch installs the following optimized configuration (/etc/falco/config.d/99-roamswitch-optimized.yaml) by default.

  • Severity filtering (priority: warning): excludes 95% of the noise from normal operations (Info/Notice) and extracts only threats.
  • Kernel pre-drop (drop_failed_exit: true): failed system calls are discarded in the kernel driver, halving CPU load.
  • 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 /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 keeps Falco log growth in check.

Falco's built-in web server, which it opens by default (plain HTTP on 0.0.0.0:8765), is not used, so it is disabled (webserver.enabled: false). proc.pid is added to the output of the standard rules so that processes can be frozen or isolated. Detections where the container ID becomes a systemd unit name (such as *.slice; for example docker build) are only logged and notified, and do not proceed to automatic blocking or Air-Gap.

Accuracy and speed of eBPF containment (not left to Falco's rules)

How accurate and how fast eBPF containment is depends on the rules of the sensor (Falco or Tetragon). In fact, the standard rules of Falco 0.45.0 (29 of them) include none that detects a reverse shell on the host: the reverse-shell rules are for containers only, and some of them are dropped by RoamSwitch's priority: warning condition. RoamSwitch does not assume the rules are good; it makes up for that in three ways: it measures how long containment takes, it checks regularly that the alert path is alive, and it detects reverse shells by itself.

Measuring isolation latency: for each eBPF incident, detect_to_receive_ms (detection to receipt), receive_to_action_ms (receipt to action), and detect_to_action_ms (total) are recorded in ebpf_incidents.json and in MCP's get_ebpf_incidents, and the process isolation notification also states “N milliseconds from detection to action”. Measured on an Ubuntu 24.04 VM (Falco 0.45.0, modern eBPF), the total was 42 to 64 milliseconds (1 to 2 up to receipt, 41 to 62 up to isolation and SIGKILL), and host Air-Gap was 109 milliseconds, within the 150 millisecond target. Tetragon has no detect_to_receive_ms.

The heartbeat (ebpf_heartbeat_interval_secs; default 600 seconds, 0 disables, 60 to 86400 when enabled) opens a throwaway path that only root can use and measures the time until the alert of the bundled rule 96-roamswitch-heartbeat.yaml comes back from Falco. Only when it fails to come back twice in a row (the recheck is 1 minute later) does it warn, at most once per 24 hours. Heartbeat lines are discarded without passing through isolation or notification, and nothing is sent outside. The measured round trip was 2 to 6 milliseconds; with the rule removed it warned after about 164 seconds, and after the rule was restored it returned to normal in about 75 seconds.

The state is kept in /var/lib/roamswitch/ebpf_heartbeat.json and is read by the heartbeat field of the MCP tool get_ebpf_incidents and by the diagnostic K-04 (the eBPF runtime agent; the number of diagnostic items stays at 42). Even when Falco is running, K-04 fails if the heartbeat does not come back. Limits: it checks one round trip of one rule (the open-family system calls) and cannot tell that another rule is broken on its own. Something that breaks between two checks (10 minutes by default) is not seen until the next one. It is not done for Tetragon. On a host where Falco is not running, or where the rule file is missing, it checks nothing and warns about nothing (the existing "guard stopped" notification covers that). Falco writes one warning line to syslog per check (144 lines a day at the default).

Reverse-shell detection (RoamSwitch's own)

Separately from Falco's rules, every 2 seconds it reads /proc and looks for shells and interpreters (bash, python, and so on) whose standard input and output are connected to a single outbound TCP connection. Something seen twice in a row is reported once per process. Destinations at private addresses are counted only when reverse_shell_watch_include_private=true; loopback and accepted connections are not examined.

On an Ubuntu 24.04 VM it detected bash's /dev/tcp, python, perl, nc -e, and socat exec: in about 2.4 seconds, and did not detect ssh, ssh with ProxyCommand, git over ssh, or an nc client.

A detection enters the same path as Falco's alerts (allowlist, guard.yaml, and so on) as the Critical eBPF event RoamSwitch Reverse Shell, and by default isolates and kills the process. A reverse shell owned by root fails per-process isolation, so it proceeds to a host-wide Air-Gap. Handle false positives with reverse_shell_watch_notify_only=true (default false; Warning notification only) or sudo roamswitch server allowlist add "RoamSwitch Reverse Shell" <process name>. reverse_shell_watch_enabled defaults to true and reverse_shell_watch_include_private to false.

Limits: it narrows by name (process name and executable name), so a home-made binary under a name other than a shell or interpreter that ties its standard input and output to a socket is not found. Connections through loopback (such as the turn-back of ssh -R) and connections shorter than 2 seconds are not seen, and neither are processes that cannot be seen from the host's process space. The Linux Client Edition has the same detection and only notifies.

Two cases where standard I/O is not connected to a connection are also checked. The first is an outbound connection from an interpreter, openssl s_client, nc or similar, joined bidirectionally to an interactive shell without -c by a pipe, FIFO or pty. This only notifies and records as a Warning (no isolation and no kill, regardless of guard.yaml; processes that also listen are excluded). The second is a connected UDP socket, which is Critical, the same as TCP.

Processes automatic containment never touches

Automatic freezing (SIGSTOP) and termination (SIGKILL) exclude processes whose stopping would hang the system (systemd, dockerd, sshd, RoamSwitch itself, etc.). Impostors with the same name not under /usr, /bin, /opt, etc. are not excluded. Add more with protected_processes in server.conf. sudo roamswitch server allowlist test <rule> <process> shows whether a process is protected, changing nothing.

State files that serve as a root of trust (the agent-setup baseline, the allow-list, the Sensor state, the FIM and lockfile baselines) are rejected unread when the same key appears twice.

4.5 Emergency Air-Gap Isolation with Pre-Severance Alerts

When serious tampering or an incident is detected, just before cutting the external network, it waits synchronously for up to 3 seconds to make sure the notification packets are sent out to Telegram / LINE / Webhook, and then deploys the Air-Gap isolation rules.

Example emergency notification message (hostname and main IP addresses are added automatically)
🚨 [RoamSwitch IMMINENT AIR-GAP] [URGENT WARNING] Full network isolation (Air-Gap) is being executed immediately (cve_2026_53362_lpe)
Host: production-app-01 (IP: 192.168.1.10)
Target process: exploit_payload (PID: 4921)
Emergency action: Immediately after this notification is sent, the host's network is fully cut off (Air-Gap), except the SSH management port.
Time: 2026-09-06 18:00:00

The release condition depends on the confidence of the trigger. For low confidence (eBPF Error or lower, etc.), full recovery happens after server_safeguards.safety_timer_secs (default 300 seconds). For high confidence (eBPF Critical or higher, isolation from repetition, canary tampering, etc.), it notifies and releases only when it has confirmed that the cause is gone. If it cannot confirm this, has no ACK, and reaches isolation_hard_cap_secs (default 3600 seconds, 0 = no limit), it goes to DEGRADED. DEGRADED keeps only the maintenance SSH and maintenance source IP paths, and never opens automatically, however much time passes. Release happens by one of: confirmation that the cause is gone, roamswitch server ack, or roamswitch emergency-restore. An ACKed isolation (FULL) continues until emergency-restore.

Process-execution recorder & event forwarding

A local-only recorder that logs exec through the netlink process connector runs enabled by default (shared with the Client Edition). It stores the executable path, the command-line arguments (length-capped, control characters escaped), the parent-process lineage, the uid, the container ID, the executable’s SHA-256 and similar fields in /var/lib/roamswitch/exec_log as JSON Lines with a hash chain (0600; 200 MB / 14 days by default). The hash chain makes tampering detectable but not preventable (an attacker who gains root can rewrite the whole chain). The notify-only correlation rules EXR-001 to EXR-015 (a shell spawned by a web service, execution from /tmp or memfd, attack-tool chains, and so on) never isolate on their own. Only if an operator explicitly enables exec_rules_isolation_optin (default false) is a high-severity rule treated as a high-confidence trigger for host isolation. EXR-011 to EXR-015 are never used for isolation, even with the opt-in. The open segment is protected too: while records are arriving, a checkpoint line holding the hash of every byte so far is inserted every 10 seconds, and roamswitch events verify detects edits, deletions and swaps of records before the checkpoint (1.12.7 and later). Records after the latest checkpoint (up to about 10 seconds) cannot be verified, and verify prints how many. Deleting a whole file returns "nothing to verify". Once a minute the checkpoint hash is sent to event forwarding as EXEC-CHECKPOINT, so with a destination configured an anchor also exists outside the host. Before 1.12.0, kernel process events were not read at all: the log stayed at zero records and EXR-001 to 010 never ran (fixed in 1.12.0).

Importing Sigma rules: Rules placed in /etc/roamswitch/sigma.d (a subset of process_creation) are matched against the records. A match only notifies; it does not stop or isolate, and is not used in automatic isolation decisions. There is no feed; only the files you place are read. Rules written in unsupported ways are rejected with a reason. You can check with roamswitch sigma-check, and tags: attack.tNNNN becomes the ATT&CK identifier in the notification.

Event forwarding (forward_enabled, default false) sends only to the destinations you configure. The destinations are syslog (RFC 5424 or CEF; UDP / TCP / TLS), a JSON Lines file, and a webhook signed with HMAC-SHA256. TLS is sent with openssl s_client and the webhook with curl (secrets are not put in arguments); the daemon has no TLS / HTTP crates. What is sent is only the hostname, event ID, time, type, severity, rule, action, PID, process name and summary of detection events and enforcement-rule notifications, plus the segment seal hash; raw logs of the execution record are not sent. The default file permission is 0600, and specifying forward_file_group makes it 0640. They cannot be specified from config.json or from Fleet policy.

DNS Tunneling / Exfiltration Detection

With dns_tunnel_detect_enabled (default true), DNS queries this device sends (UDP / TCP port 53 only) are watched through NFQUEUE. A question with a label longer than 40 bytes and entropy above 3.8, or with qtype TXT / NULL, counts as a “suspicious shape” (TXT to clamav.net is excluded), and 10 or more in 60 seconds triggers a notification (the same domain waits 300 seconds, and if it continues the wait extends to 600, 1200, up to 1800 seconds). It is notify-only. The nft rule has bypass, so DNS still passes even if monitoring stops. roamswitch server restart is needed for changes to take effect.

Known limitation: long, hyphen-separated hostnames (for example, prod-us-east-1-web-server-node-0042-internal-service) and legitimate activity that is especially realistic on a server — such as a mail server verifying SPF/DKIM TXT records for many different sender domains in a short window — were previously measured to trigger false positives here, because bursts of suspiciously shaped queries (TXT/NULL and so on) were counted with a single global counter that did not distinguish destination domains. Both were fixed on 2026-09-23. The fix is a configurable entropy allowlist plus keying the burst counter per apex domain (a simple approximation using the last two labels of the QNAME, not a strict Public Suffix List implementation). The allowlist ships with 16 major CDN/cloud/PaaS suffixes by default (cloudfront.net, akamaiedge.net, akamaized.net, edgekey.net, edgesuite.net, fastly.net, azureedge.net, googleusercontent.com, amazonaws.com, r2.dev, workers.dev, vercel.app, netlify.app, supabase.co, firebaseapp.com, web.app), and operators can add their own internal domains via ServerConfig.dns_tunnel_entropy_allowlist (a comma-separated key in server.conf, also editable from the TUI). The allowlist only suppresses the label-length-plus-entropy check; TXT/NULL qtype detection applies regardless of the allowlist, which prevents an attacker from disguising a tunnel under an allowlisted domain (the one exception is TXT to clamav.net, used by ClamAV signature updates, which is not counted because a third party cannot create subdomains under it). The burst counter is now keyed per apex domain, which eliminates the false positives caused by a single global counter that ignored the destination domain (the 60-second sliding window and 10-query threshold are unchanged by this fix; the re-notification interval was later changed to grow from 300 seconds up to 1800 seconds while a burst continues). Real malicious traffic from tools such as iodine or dnscat2 always rotates labels and qtypes under a single attacker-controlled domain, so narrowing to per-apex-domain counting does not reduce detection effectiveness.

Subdomain brute-forcing is also watched. A notification is sent when 40 or more distinct names under the same domain all return NXDOMAIN within 60 seconds (once per hour per domain, with up to 5 example names; ATT&CK T1590.002). For this reason, UDP DNS responses (source port 53) are also received through NFQUEUE, but with bypass, nothing is sent, and name resolution is not stopped.

Reverse lookups, internal names such as .local, and domains in dns_tunnel_entropy_allowlist are not counted. The switch is dns_tunnel_detect_enabled. TCP responses, DoH and DoT, containers in other namespaces, and IPv6 with extension headers are not visible. It is notification-only and does not block.

SSH brute-force detection and blocking (ssh_guard)

A brute-force defence that runs when ssh_guard_enabled is true (default). It reads sshd logs with journalctl -f (or auth.log/secure if absent) and counts failures per source. By default, 6 failures within 600 seconds make the inet roamswitch_sshguard table drop only new SSH connections (ct state new) and also cut established ones. It does not ban authenticated sessions, public-key successes, or exempt sources. A ban starts at 1 hour, grows 4× on each repeat offence, and is capped at 7 days. It does not start Air-Gap and does not communicate externally. If fail2ban or CrowdSec already protects sshd, it only detects and notifies.

The source is read only from the trailing from <IP> port <N> at the end of the line, so a fake source placed in a username does not get a third party banned. In journald, only sshd lines from root (_UID, _COMM) are read, not lines from logger -t sshd. Tailing the forgeable auth.log is not the default. The gateway, whitelist_ips, ssh_guard_allow, and sources with a public-key success within the last 30 days, among others, are not banned. Private addresses are not exempted, and Failed publickey is not counted.

On an Ubuntu 24.04 VM, a ban followed the 6th failure in about 0.2 seconds (0.17 to 0.24 seconds). A real hydra (4 parallel) stopped after 6 attempts, and neither the operator nor a third party whose address was spoofed was banned. Restoration after reboot, unban, and notify-only behaviour alongside fail2ban were also confirmed. Adding connection cutting reduced failures that got through after the ban from 16–24 to 0–4.

Web application rules (web shells and injected code)

It watches document roots found from the web server (Apache, nginx, Caddy) configuration with notification-only fanotify (other processes are not stopped). Right after a file such as PHP or JavaScript is written, it is inspected with the rules that find web shells and the like, and a periodic scan every 6 hours backs this up.

The rules come in 3 layers: bundled, signed delivery by the daily updater, and your own rules in /etc/roamswitch/rules.d/*.json. The 20 bundled and delivered rules describe only publicly known techniques and contain no signatures from samples. It also inspects the mounts of running Docker containers (those whose published ports include 80, 443, 8080 and so on) and PHP session files (sess_).

Automatic quarantine applies only to critical by default; high is reported without touching the file. Notifications are available in 10 languages. Rules are fetched together with the daily updater, and nothing is fetched if you disable cve_kernel_map_updates_enabled. On a real machine, a written web shell was quarantined within 2 seconds.

Place an executable at /etc/roamswitch/hooks/post-detection and the detection details (JSON) are passed to it on standard input (only files owned by root and not writable by others are run, with a 30-second timeout). Account action (off by default) disables the login shell of the owner of the quarantined file. It does nothing for root, UIDs below 1000 (default), or logged-in users, and can be reverted with roamswitch web-rules unlock-account.

False positives were 0 in WordPress core (2,409 files), phpMyAdmin (3,356 files) and npm dependencies (14,743 files). Only the first 256 KB (on write) and 4 MB (scan) are read, and splits such as 'ev'.'al' are not followed. Custom rules can be checked with roamswitch web-rules validate <file>.

Honeytokens (Credential Decoys)

At startup, the daemon places fake credentials containing ROAMSWITCH_HONEYTOKEN at the real paths that stealer tools scan (/root/.aws/credentials, /root/.ssh/id_rsa, /root/.docker/config.json, /root/.pypirc, /root/.env.backup). This is enabled by default; disable it with honeytokens_enabled and change the location with honeytokens_home. Existing real files are never overwritten.

When a decoy is read, additional decoys are placed, up to a limit. RoamSwitch's own docker sets DOCKER_CONFIG to an empty directory, so it does not trigger the decoys. Decoys can also be placed in the home of agent_users.

A monitoring process (roamswitch-honeytokens) watches reads of the decoys with fanotify, which blocks nothing, and identifies the accessor from the PID (inotify and fuser when unavailable). Access other than by RoamSwitch itself and, for the SSH decoy, OpenSSH clients (ssh, scp, ssh-agent, etc.; ssh-keygen excluded) is notified as reconnaissance (MITRE ATT&CK T1552). Access that cannot be identified is also detected. It does not freeze or block.

Known limitation. The decoy at /root/.ssh/id_rsa is in an invalid format as a private key. Many scanners decide only from the -----BEGIN ... PRIVATE KEY----- header, so we consider the impact small. In inotify environments, a very short-lived process may not be identified with fuser, but detection still occurs.

Forensic Evidence Capture Bundles

Evidence collection starts without delaying blocking when an eBPF event successfully isolates a process, on Air-Gap (escalation/execution), and when a canary detects tampering. If the PID is unknown, /proc is not collected.

roamswitch-incident-capture saves to <state-dir>/incident-evidence/<timestamp>-<short-id>/. The contents are 30 seconds of packets via tshark and a snapshot of /proc/<pid> (values in environ that look secret are [REDACTED]; file contents are not collected). If one capture fails, the rest continue.

manifest.json records the SHA-256 of every artifact. A bundle is deleted only when you run sudo roamswitch-incident-capture prune [--keep-days N] (default 30 days). Manual capture: sudo roamswitch-incident-capture snapshot [--pid PID] [--reason TEXT] [--json]. For isolation that force-terminates, the state is saved before termination (up to 3 seconds; 123 to 130 ms until the action). With snapshot --pid too, state comes first and packets (up to 30 seconds, skipped with --no-packets) come after.

Detections that saved an evidence bundle are linked in the timeline. roamswitch timeline shows the saved line under the detection with └─, adding the bundle name and the manifest's SHA-256. --json and MCP's get_incident_timeline include evidence_refs (up to 8 entries; only names and SHA-256, never the contents) and more. It links only when the triggering ID is known and never joins by closeness in time. For a manual snapshot, pass it with --trigger-event-id ID.

Captured evidence is not verified at capture time. To check for tampering afterward, run sudo roamswitch-incident-capture verify <bundle directory> [--json]. It re-hashes every file currently in the bundle and compares the result against the values recorded in manifest.json, reporting each discrepancy individually as modified, missing, or untracked (a file present that the manifest never recorded).

Known limitation. The SHA-256 in manifest.json is checked against an append-only chain of records (evidence_anchor.log) and the system log (tag roamswitch-evidence); rewriting manifest.json or the records makes verify fail. A root attacker who rewrites both cannot be stopped, so forwarding logs is recommended. There is no signature, and old bundles are reported as “no record”.

Accounts that run AI agents (agent_users)

A feature for running AI agents (Claude Code, Codex CLI, etc.) under a dedicated account (Linux 1.12.7 and later). It corresponds to the items that can be implemented on a single server among the 10 practices in the guidance on AI agent incident response issued by NIST, NSA and CISA on October 16, 2026. With a dedicated account, the agent cannot rewrite root's files or firewall rules.

Three keys in server.conf control it. A restart applies them (sudo roamswitch server restart).

Outbound allowlist: the nftables inet roamswitch_agent_egress table (output hook, priority -145) passes only loopback, established connections and the listed destinations (with a port, both TCP and UDP) from the target account's traffic, and drops the rest with a log entry rs_agent_egress_drop: (up to 10 per minute). Dropped traffic is collected every 60 seconds and notified once per hour per account and destination. The list is matched by address and cannot be narrowed by name. Use it either to allow just one proxy (agent_egress_allow=10.0.0.5:3128) or with network ranges.

Baseline held by root: the verified state of instruction files (CLAUDE.md, AGENTS.md, etc.), skills and MCP server definitions is stored as SHA-256 only in /var/lib/roamswitch/agent_setup/<account>.json (owned by root, 0600). The account can neither rewrite nor delete it. Create and update it with the following command as root, and add --accept-with-findings when findings remain.

sudo roamswitch audit-agent-setup --user NAME --accept

The daemon detects changes to configuration files with inotify within about 1 second, and picks up anything missed with a check every agent_setup_watch_secs. It compares the home folder and the working copies directly under it (folders containing any of .git, .mcp.json, CLAUDE.md or AGENTS.md, up to 50) with the baseline, notifies a change or addition only once, and records it in the incident timeline. For an account with no baseline, it checks at startup and every 5 minutes, and notifies with the command to create one (at most once per 24 hours per account).

Decoy credentials: the honeytoken decoys are also placed in the home directories of agent_users, and one watcher is started per account. A decoy under /root cannot be opened by an agent running as another account.

What it cannot do: the allowlist looks only at the sockets of the listed accounts, so an agent that can become root, or that has a root-owned service connect on its behalf, is not held. UDP does not wait for an answer, so the sender does not notice a drop. The Mac edition and the Linux Client Edition do not have this feature.

Measured (2026-10-18, a disposable Ubuntu 24.04 VM): the agent account reached the allowed destination, its TCP and UDP to anything else were dropped, and root traffic was not restricted. Writing or deleting the baseline from the agent account failed with Permission denied, and the 2 changed files were reported on the next sweep. A reverse shell was cut about 3.4 seconds after connecting, and with the allowlist added the same operation never established a connection. These figures are from that VM.

§542-Check Security Diagnostic Suite

The Server Edition executes 42 specialized security health audits:

# Category Check Title Standard & Logic
1Auth & AccessSSH Root Login & Password AuthVerifies PermitRootLogin no. Reports key-only access when password authentication is also disabled, and still passes when password authentication is enabled as long as direct root login is prohibited
2Auth & AccessEmpty Password AccountsCheck that no account has an empty password in /etc/shadow
3Auth & AccessSudoers Privilege HygieneVerifies that /etc/sudoers and /etc/sudoers.d contain no passwordless full-privilege NOPASSWD: ALL rule
4NetworkInbound Default DenyAudits nftables for default inbound drop policy
5Kernel & IntegrityUnprivileged User Namespaces (Frag Gap)Ensures user.max_user_namespaces = 0 (or kernel.unprivileged_userns_clone = 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
8NetworkXDP Boot-Time GateFills the boot-time window before the Link Guard nftables table is installed with an XDP default-deny gate (experimental, opt-in and not loaded by default). Checks for the pinned link; not being loaded is not a failure
9Kernel & IntegrityeBPF Runtime Security AgentChecks that an agent such as Falco or Tetragon is running. While Falco runs, it also checks that the alert of RoamSwitch's own rule comes back (the heartbeat), and fails if it does not (naming any missing RoamSwitch Falco file)
10Kernel & IntegrityUnified Incident TimelineChecks that the unified timeline merging Link Guard, Canary, eBPF Guard and Resource Guard incidents chronologically can record (existing events, or a writable store), and shows the latest containment time
11ContainerDocker Socket Mount AuditCheck that /var/run/docker.sock is not mounted in any container
12ContainerDocker Privileged ContainersCheck that there are no high-risk containers running with --privileged
13ContainerContainer Runtime Isolation (runc/gVisor/Kata)Checks the default container runtime. A runc-based runtime (shares the host kernel) fails; gVisor (runsc) or Kata Containers (per-container VM isolation) passes. Not applicable if Docker/containerd is not detected
14ContainerDocker Firewall Bypass Protection (DOCKER-USER)Verifies that RoamSwitch's own rules are actually present in the DOCKER-USER chain (always evaluated first) or in its dedicated Docker-guard nftables table, so published container ports cannot bypass the firewall's default deny through Docker's own rules. Evaluated only when protect_docker_ports is enabled in server.conf
15Kernel & IntegrityClamAV Live Detection Test (EICAR)Two minutes after start and every 6 hours thereafter, the daemon scans a harmless EICAR test file from its own environment (for example inside a systemd sandbox) to confirm that ClamAV really detects it. Evaluated only when clamav_enabled is on in server.conf
16Kernel & Integrityfanotify Missed Events (Queue Overflow)Checks whether the kernel has discarded FIM and container-execution watch events because the fanotify event queue overflowed. File writes and executions during an overflow escape real-time monitoring; if it happens often, raise fs.fanotify.max_queued_events
17Kernel & IntegrityKnown Kernel CVE ExposureMatches the running kernel version against the local known-CVE map (the embedded baseline, or a signature-verified update). The check itself makes no network requests; map updates are fetched under cve_kernel_map_updates_enabled (default true, can be turned off). An undeterminable result is reported as inconclusive, not as a failure
18IntegrityCritical Path File Integrity (FIM)SHA-256 integrity verification of 27 fixed critical files, every file directly inside 19 directories, and more
19Kernel & IntegrityYama Process ProtectionVerifies kernel.yama.ptrace_scope is 2 or 3
20NetworkIP Forwarding DisabledVerifies net.ipv4.ip_forward = 0
21NetworkTCP SYN Cookie ProtectionVerifies net.ipv4.tcp_syncookies = 1
22NetworkReverse Path Filtering (rp_filter)Verifies reverse path filtering is on (net.ipv4.conf.all.rp_filter = 1 strict, or 2 loose for multihomed hosts)
23Kernel & IntegrityCore Dump RestrictionPrevents process memory leaks via fs.suid_dumpable = 0
24OperationsAutomatic Security UpdatesValidates automatic patch application via unattended-upgrades (Debian/Ubuntu), dnf-automatic (RHEL/Fedora) and similar
25OperationsNTP Time SynchronizationChecks synchronization via chrony or systemd-timesyncd
26OperationsSSH Brute-force ProtectionCheck that RoamSwitch's own SSH guard (ssh_guard) is running with blocking enabled, and that fail2ban / crowdsec is running continuously
27Kernel & IntegrityUnprivileged eBPF DisabledChecks kernel.unprivileged_bpf_disabled is 1 or 2
28NetworkICMP Redirects IgnoredPrevents route poisoning via accept_redirects = 0
29NetworkICMP Echo Broadcasts IgnoredMitigates Smurf amplifier DoS attacks
30Kernel & IntegrityShared Memory HardeningChecks that /dev/shm is mounted with at least one of the nodev, nosuid or noexec options
31Auth & AccessLegacy Insecure Protocols AbsentVerifies that no cleartext listening services (telnetd, rshd, tftpd, …) and no cleartext clients (telnet, rsh, tftp, …) are installed (services and clients are reported separately)
32Kernel & IntegritySUID Process Core Dumps RestrictedPrevents credential leaks on SUID binary crashes
33Kernel & IntegrityHelper Programs (Decoys and Evidence Capture) InstalledThe daemon launches the credential decoys (honey tokens) and the evidence-bundle executables by name. If an executable is missing, it fails silently. This checks that both are installed.
34NetworkSensitive Files Exposed on the Web ServerChecks, with requests to the host itself, whether .git, .env, .DS_Store, phpinfo, SQL dumps, backups and private keys in the document roots of Apache, nginx and Caddy can be read over the web. A file counts as exposed only when the response matches the start of the file, so sites that return 200 for everything do not cause false positives. Contents are not reported, only paths. If this cannot be confirmed, the result is “undetermined” and no points are deducted.
35Kernel & IntegrityDocker Daemon Configuration (daemon.json)
(Docker Daemon Configuration)
Reads the Docker daemon's settings file and checks for user-namespace remapping (userns-remap), restricted container-to-container traffic (icc), live-restore, no-new-privileges, and a TCP listener without TLS verification. The file is only read, never changed.
36Kernel & IntegrityBackup Recency
(Backup Recency)
Looks for the last run of restic, borg, Timeshift, snapper, rsnapshot, systemd timers and cron jobs and checks that it was within the past 7 days. It does not check that a backup can be restored: a restore test writes the user's files, so it is never run automatically.
37NetworkTLS Certificate Expiry
(TLS Certificate Expiry)
Connects from this server to its own web servers (nginx, Apache, Caddy) and reads the expiry date of the certificate each one actually serves over TLS. A renewed file that the web server never reloaded shows up too. Nothing outside this host is contacted and the certificate itself is not stored.
38NetworkWeb Server Security Headers and Cookies
(Web Server Security Headers and Cookies)
Requests the top page (/) of TLS sites on nginx, Apache and Caddy from the host itself and looks only at the headers. It checks HSTS (30 days or more), nosniff, frame-embedding protection, Secure on cookies, and HttpOnly on session cookies; CSP and Referrer-Policy are not judged. It makes no external connections and does not record the body or cookie values.
39NetworkSPF, DMARC, MTA-STS and Expiry of Your Own Domains
(SPF, DMARC, MTA-STS and Expiry of Your Own Domains)
Optional. Only when you list your own domains (up to 5) in domain_check_domains, it checks whether SPF and DMARC exist, whether SPF allows anyone to send, whether at least 30 days remain until registration expiry, and MTA-STS if an MX exists. It fails when the policy file cannot be fetched, the format is invalid, or mx does not cover the MX records; mode: testing, mode: none and a max_age under 1 day are notes. CAA and DNSSEC are shown for reference. This is the only time it communicates externally: dig queries the resolver, and curl reads the public IANA list and the registry's RDAP server (the domain name is sent) and, if an MX exists, the domain's mta-sts host (the certificate is verified; redirects and cookies are not used). Results are cached for 6 hours.
40NetworkName resolution responders exposed (LLMNR, NBNS, mDNS)
(Name Resolution Responders Exposed)
Reads /proc/net/udp and /proc/net/udp6 and checks whether this host answers LLMNR (UDP 5355) or NBNS (UDP 137). If it does, another device on the same network can hijack its traffic with forged replies (LLMNR / NBT-NS poisoning), so the check fails. mDNS (UDP 5353) is shown only. It runs no commands and needs no administrator privileges. The forged replies on the network themselves are not seen.
41OperationsExploited or Likely-Exploited Vulnerabilities (Installed Software)
(Exploited or Likely-Exploited Vulnerabilities)
Matches installed software against local vulnerability data and looks for unfixed vulnerabilities that are in KEV (exploitation confirmed by CISA) or have EPSS 0.9 or higher. In addition to OS packages, PHP and GitLab are judged by reading their versions directly. It does not communicate. Other software not managed by packages, and vulnerabilities not in the data, are not seen. In the hourly check, one alert with the hostname and IP is sent when a new failure appears, when a new KEV mark appears, and when the state stays the same for 24 hours.

Each of the 42 items is tagged, where applicable, with a NIST CSF 2.0 function/category identifier (e.g. PR.DS-01, DE.CM-09), and, only where a confident mapping exists, a CIS Controls v8 control number (e.g. 10.1, 4.1) as well. Ambiguous items are left unmapped rather than forced. This mapping is included in both the CLI (roamswitch server status) and MCP (get_security_report) output, letting operators and auditors who need compliance-framework coverage map RoamSwitch's checks onto existing frameworks mechanically.

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

We attack the official APT package roamswitch-server from a separate container on Docker to verify it. On 2026-09-07, v1.3.2 passed all 18 items; on 2026-09-25, the 1.10 series (arm64) passed 19 checks. The 6 product defects found in the re-run (such as locking out administrative SSH during isolation) were fixed in 1.10.5. You can reproduce this on your own machine (see “How to reproduce it yourself” below).

# Scenario Attack Technique Result
PENT-S1 Nmap SYN Stealth Scan Probe across ports 22, 80, 443, 3306, 8080 The nftables default drop discards traffic to unpermitted ports such as 3306 (MySQL) and 8080 without any response (Filtered). 100% blocked.
PENT-S2 Unallowed Port Probing curl direct connections to port 3306 and 8080 With inbound default deny, only the permitted port 80 answers normally; all other ports are dropped and time out.
PENT-S3 Egress / C2 blocklist Outbound connection attempt to an address registered in the malicious-IP feed Only the registered address is blocked by egress_ip_blocklist_enabled (default true, nftables); traffic to a non-blocklisted host is unaffected (not a blanket block)
PENT-S4 FIM Tampering Attack Inject backdoor payload into /bin/login SHA-256 Critical Path FIM detects the tampering immediately. After a legitimate restore, the baseline resynchronizes correctly.
PENT-S5 guard.yaml severity-based containment Injected a Falco Critical event referencing a real process With on_critical: isolate_process + kill_process, the offending process is network-isolated and then sent SIGKILL.
PENT-S6 Protected-process safety rail Injected the same kind of event referencing the real sshd PID The protected-process list (sshd, systemd, container runtimes and so on) keeps sshd running. Only a refusal is logged, as a false positive.
PENT-S7 Safety timer Left an Air-Gap incident unacknowledged (no operator ACK) With safety_timer_secs, the host restores itself automatically when nobody responds. Once ACKed, isolation continues until emergency-restore.
PENT-S8 Kernel LPE Frag Gap Execute unshare -U -r as unprivileged user (checked on a real VM) Refused after start, although it is allowed without the product. user.max_user_namespaces and kernel.unprivileged_userns_clone were 0, Yama ptrace_scope was 2 and unprivileged eBPF was disabled (2026-09-25, Ubuntu 24.04 VM, checked on both the published v1.10.4 and the fixed build)

Note: the PENT-S7 measurement dates from v1.3.2. In the current version an isolation from a high-confidence trigger is released once its cause is verified gone, and an isolation the operator acknowledged (ack) is held until the operator releases it (an ack that was ignored was found and fixed in the 2026-09-25 re-run). Low-confidence triggers recover with the same timer. See §4.

Note: In 1.11.3 and earlier, because of a rule error, outbound blocking of malicious IPs (egress_ip_blocklist_enabled; PENT-S3) and blocking of port-scan sources dropped only the first 5 packets per minute, and 25 of 30 packets got through. This was fixed in 1.11.4, and 0 packets passing was confirmed with nft. The state at the time of the v1.3.2 measurement was not checked.

Kinds of verification: PENT-S8 confirms that a kernel feature (blocking user namespaces) is in effect. PENT-S1 and S2 confirm the nftables rules that RoamSwitch set, and it is the kernel that actually drops the packets. The items that tested RoamSwitch's own logic are PENT-S3 (applying the feed), S4 (FIM), S5 and S6 (containment and protected processes), and S7 (safety timer).

SSH Lockout Prevention

preserve_ssh_on_isolation=true (default) is designed to keep administrative SSH available while Air-Gap (on_emergency) is active. However, the 2026-09-25 re-run showed that up to 1.10.4 the isolation rules dropped SSH responses, locking administrators out during isolation. The earlier check had succeeded only after isolation was released. Fixed in 1.10.5; we confirmed SSH passes during isolation under the condition that the cause of isolation persists.

Limits of the verification scope

What This Cannot Verify

Kernel hardening (disabling unprivileged User Namespaces, raising Yama ptrace_scope) cannot be verified in a container, because writing with --privileged changes the machine under test itself. Here we verify only that it degrades correctly where writing is not possible; applying the values was confirmed once on an Ubuntu 24.04 VM on 2026-09-25 (PENT-S8).

Reproduce It Yourself

All of the above can be reproduced 100% on your own machine with the Docker test suite published in the official support repository (roamswitch-support), using only the official distribution packages (no access to the source code and no trust in 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

Three disposable containers (Target, Attacker, C2 decoy) automatically verify 18 items. The v1.3.2 results are in RESULTS-PENTEST-SERVER-2026-09-07.ja.md; the 2026-09-25 re-run is in RESULTS-PENTEST-2026-09-25.ja.md.

§7Operations, Deployment & Lifecycle

7.1 Headless CUI Tooling & Setup Wizard

For headless operation, every administrative operation can be completed from the CLI.

  • roamswitch server status: Full 42-check diagnostic output (10 languages, following the invoking user's setting or the OS locale).
  • 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.
  • roamswitch server config set language <ja|en|zh-Hans|zh-Hant|ko|de|fr|es|it|pt|system>: the language of the hourly diagnostic report and push notifications (one language per host). system follows the OS locale, and falls back to ja if it cannot be determined. roamswitch server status follows the running user's setting or the OS locale.
  • roamswitch server bans [--json] / sudo roamswitch server unban <IP|IPv6 /64|--all>: the state of the SSH brute-force guard, and listing and lifting its bans. The MCP tool get_ssh_guard_incidents is read-only and cannot lift a ban.

MCP (an interface for AI agents)

roamswitch-mcp gives AI agents 45 tools over JSON-RPC on standard input/output and sends no telemetry. No tool changes settings, defenses, ports or devices; the only writes are three tools updating their own records. Strings that come from outside get an “untrusted external data” notice and a length limit. Text written like instructions to an AI (6 types such as role-hijack, in English and Japanese) gets a WARNING, and only the type and count are written. Nothing is deleted or stopped. Replacement with look-alike characters and other languages are not detected.

get_detection_coverage (on the CLI, roamswitch detection-coverage --server [--json]) returns, per ATT&CK technique, whether RoamSwitch can detect it (detects / partial / none), what it cannot see, and whether the guard responsible is running now (liveState). Server Edition covers 38 techniques: 25 partial and 13 none (no technique is claimed as fully detected). "Partial" is written only where the backing code was checked, and "none" means there is no mechanism to detect it, not that no attack took place. liveState is derived from the settings and from a record of whether input could be read, and is not proof that the guard is actually working. It does not try or reproduce any evasion technique.

Annotations are attached to every MCP tool. readOnlyHint is false only for run_active_vuln_scan, audit_security_logs, and run_npm_audit_signatures, which update their own record files; openWorldHint is true only for run_npm_audit_signatures, which is disabled by default. DNS and RDAP queries for domains happen only for what you write in domain_check_domains, which is empty by default. get_vulnerability_scan_history returns what the probes leave on the target (sideEffects), and run_active_vuln_scan returns evidenceKind, which shows whether a finding is confirmed or only a version match.

Record of inputs that could not be read: It counts how many times, and of what kind, inputs such as SSH logs, journal and Falco could not be read, and writes this to /run/roamswitch/collectors.json every 30 seconds. get_guard_status and liveState read it, so a guard that cannot read its input is not shown as “running”. It notifies when the unreadable state lasts 2 minutes and when a range was left unobserved (at most once a day per kind). The number of lost lines is not known.

Server TUI (roamswitch server tui)

A terminal UI that handles all Server Edition features over SSH, at 80x24, using only the keyboard (roamswitch server tui). It has 11 screens. The config editor validates values, shows whether a restart is needed and the diff, makes a backup and saves atomically (secret values are masked). High-impact operations show a confirmation screen, and especially large ones require typing yes (typed confirmation). Unless you are root, it is read-only. A restart is needed for changes to take effect, and the display is available in 10 languages.

7.2 Packaging

Provided as .deb for Debian / Ubuntu and .rpm for RHEL / Fedora and openSUSE.

§8Conclusion

RoamSwitch Server Edition provides, in a single package for cloud and enterprise Linux infrastructure, “zero telemetry (the only default external communication is receiving signed data, which can be disabled)”, “strong perimeter defence with inbound deny by default”, “immediate detection of critical-path tampering”, and “preventive blocking of kernel privilege escalation”.

A security suite for Linux servers that combines layered detection with autonomous containment (Air-Gap) for each main attack stage (initial reconnaissance, intrusion, privilege escalation, persistence).

This document is based on the implementation as of RoamSwitch Server Edition v1.13.0. The measured values of the self-check in §6 are from v1.3.2 (2026-09-07) and a build from the 1.10 series source (2026-09-25). The change history is in the CHANGELOG of roamswitch-support, and the latest information is at roamswitch.com/linux.