SysSpectogram is a self-hosted Linux host guard. This document is the operator-facing security policy: what we support, how to report issues, what we actually trust, and what we will never claim.
For the deeper model (assets, adversaries, residual risk) see docs/THREAT_MODEL.md. For signing and manifests see docs/SUPPLY_CHAIN.md.
- 1.6.0 — Rust metrics shadow metadata and event provenance; bounded incident evidence and wall-clock spectrogram labels; explicit permanent-ban handling and atomic timed-member refresh. See
CHANGELOG.md[1.6.0]and RELEASE_v1.6.0.md. - 1.5.0 — live guard-core RuleEngine/risk over Unix socket (Python fallback); ban6 migrate preserves IPv6 members; Telegram
/notifyfilters. SeeCHANGELOG.md[1.5.0]and RELEASE_v1.5.0.md. - 1.4.1 — HMAC-signed agent stop markers (do not trust signal
si_pidalone), verified pidfile identity, eBPF sendercomm/ppid, quieter setuid/openat, protect/prefix/flow/login hardening. SeeCHANGELOG.md[1.4.1].
| Version | Supported |
|---|---|
| 1.6.x | Full support (current) |
| 1.5.x | Security fixes |
| 1.4.x | Security fixes |
| 1.3.x | Security fixes |
| 1.2.x | Security fixes |
| 1.1.x | Security fixes only |
| 1.0.x | Best-effort; please upgrade |
| < 1.0 | Unsupported |
Prefer the latest tagged release from GitHub Releases. Friend installs should use the matching AppImage / .deb plus the signed wheel/agent for that same tag — not a random main checkout on a production VPS.
Do not open a public issue for an exploit that can harm live hosts (RCE, privilege escalation, unlock bypass, forged agent alerts, supply-chain forge, etc.).
Preferred channels:
- Private vulnerability reporting (GitHub Security Advisories — preferred).
- Or email the maintainer address listed on the GitHub profile / release notes.
Please include:
- Affected version / commit / package (AppImage, wheel, agent binary).
- Host OS and how you run the stack (systemd, Control Center child, dry-run, …).
- Clear reproduction steps or a minimal PoC.
- Impact (who can trigger it, what they gain).
- Whether you plan a public write-up and your preferred timeline.
Target response: triage acknowledgement within 72 hours. Fix timing depends on severity and whether a coordinated disclosure date is agreed.
We welcome responsible disclosure. We do not run a paid bug bounty.
In scope
- Guard / agent / helper / Control Center behavior on a machine the reporter controls (or has explicit permission to test).
- Bypass of Telegram / web / control-socket unlock.
- Forging critical agent alerts without a valid HMAC / PEERCRED path.
- Tampering with release artifacts that still verify under our documented checks.
- Logic bugs that auto-ban the operator despite a correct
never_banallowlist. - SSRF / private-IP reachability via configured alert sinks when defaults should block it.
Out of scope
- Attacks that already assume root on the same host and then stop units / delete state (see Same-host ceiling).
- Social engineering of BotFather tokens or leaked
.envfiles. - DoS by flooding a deliberately enabled public web UI without network controls.
- Issues only present in unreleased
mainunless they also affect a tagged release. - Third-party profile packs or models you installed without verifying signatures.
Defaults are intentionally cautious.
- Default
response.mode: observe— notify only, no auto-ban. - Soft / aggressive / isolate modes still honour
response.never_ban_cidrs(one or many IPs/CIDRs; bare IP normalises to/32or/128). Set your admin path before enabling auto-ban. kirk.auto_isolateis off by default and needs bothkirk.allow_ssh_cidrsand a valid agent HMAC on allowlisted critical rules.
- Agent Unix datagram socket: mode
0600, same-UIDPEERCRED, optional PID allowlist, HMAC-SHA256 on critical rules (kirk hide/drift/IMA,agent_unexpected_root, clean shutdown, agent/guard down, …). - Secret:
state/agent_hmac.secretorSYSSPECTOGRAM_AGENT_HMAC. - Binary exe seal rejects a swapped agent process that still holds the PID.
- Destructive actions require a console unlock code shown in Control Center /
state/unlock.code(never sent in the unlock Telegram notice itself). - Unlock language follows
ui.langonce per guard start (no dual EN+RU spam from one process). - Local SOAR uses
state/control.sockwith the same unlock gate as Telegram. - Multi-VPS fleet control uses SSH + device tokens (host pair code); see docs/FLEET.md. No public HTTPS control plane.
- Web read APIs (
/api/status,/api/snapshot,/api/stream) require a validss_sessioncookie or Bearer (state/web.token) — loopback alone is not enough./api/healthstays public (ok+unlock_code_lenonly). When control is LOCKED, authorized responses still redact bans/processes/allowlist. - Dashboard WEB LOGIN CODE (
state/web.login, POST/api/login) mints a read session; it does not unlock SOAR. Control unlock stays separate. - nft lockdown/quarantine/shield comments are quoted (colons broke rules on real nft). Lockdown SYN match is
flags syn / fin,syn,rst,ack(a baresyn / synnever installed on nft 1.1.x). A failed lockdown or syn-rate-limit rolls back only the rules that attempt added; it does not remove the other feature's rules. Lockdown state flips only after nft succeeds. home healthssh_source is false when the system journal is absent, including for root.journalctl --systemis run without-qso "No journal files were found" is visible.- Kirk isolate DNS uses
/etc/resolv.confand, when that file only has a systemd-resolved stub, upstreams fromresolvectl dns(IPv6 kept intact; DNS-over-TLS#namealso allows port 853). If neither lists a non-loopback resolver, public names do not resolve during isolate (oif loonly reaches the stub). - Repeating lockdown with a new admin CIDR inserts that allow before the SYN drop. A new syn-rate-limit allow is inserted before the drop; a different rate replaces the drop rule instead of reporting a rate that was not installed.
- Kirk isolate does not open DNS or TCP/443 to the internet. DNS goes to configured resolvers; HTTPS only to
kirk.egress_allow_cidrs(default: Telegram publish ranges). - POST bodies: Host checked before read;
Content-Lengthmust be a non-negative integer ≤ 64 KiB. home settings/ seed writes are flocked; schema type checks reject non-finite / out-of-range values (allow_nan=False).kirk_isolatedeadline is on disk (state/kirk_isolate.json0600); expired tables are cleared on backend start; failed SSH-allow install rolls the table back.- Helper: concurrent connection handlers (ban.* not blocked by silent peers); pkcheck bounded; ban IP rules match Python (no IPv4-mapped / broadcast /
240/4, no RFC1918/ULA/CGNAT unless overlayresponse.allow_private_bans;ban.addalso refuses Telegram CIDRs, resolvers from resolv.conf //run/systemd/resolve/resolv.conf, and v4+v6 default gateways). - SYN_RECV counts unique
(ip, port)once per window (not once per poll);SYN_SENTis a separate non-banflow_syn_sent_hangalert.flow_syn_burstis alert-only unlessflow.auto_ban: true.ban_iprefuses Telegram publish ranges, resolvers, IPv4 and IPv6 default gateways, and private/ULA/CGNAT (unlessallow_private_bans). IPv6 brute aggregation bans the/Nprefix (ban6interval), not a single/128. - Auth log: Failed/Invalid with more than one
from <ip> port→auth_log_injection. Only the sshd tail peer is counted as a fail (embeddedfromaddresses are not). One injection alert per peer per 10 minutes (suppressedcounts the rest); about 10 injection alerts per minute host-wide, then the overflow is digested. A single sshd tailfrom <ip> port …$is the peer. Accepted uses the firstfromafter the user. - Mini App
/api/auth/telegrammatches user id toTELEGRAM_ALLOWED_USER_IDS/telegram.allowed_user_idsand chat id exactly (nolstrip("-")). A negative groupchat_idwithoutallowed_user_idsis refused (chat alone never grants a session). Unlock and login have separate per-IP buckets. Wrong guesses do not rotate the login or unlock code, so a flood cannot invalidate the code the operator already has; a correct code still works during rate limiting. Codes still rotate on expiry and after a successful login or unlock. Behind an HTTPS tunnel every client looks like127.0.0.1, so per-IP rate limits do not isolate users./api/logoutdrops the session; SSE re-checks it and closes the connection. - Resolvers:
/etc/resolv.confplus fallback/run/systemd/resolve/resolv.confwhen the stub is127.0.0.53andresolvectlis unavailable. Local forwarders (dnsmasq/unbound) that are not listed there are not auto-protected — put them innever_ban_cidrs.
Same-UID ceiling for unlock (I-03): the unlock gate protects a stolen Telegram bot token / Mini App session — not malware running as the same Unix user as the guard. That process can already read state/unlock.code (mode 0600, owner-only) or the .env bot token. Persisted state/control.unlocked (only when unlock TTL is 0) accepts the exact marker 1 and refuses symlinks / arbitrary content; it is still same-UID writable by design. Treat same-UID compromise as full control of the guard process.
- Only one guard may hold
state/guard.lock. A second instance would unlink/rebind the agent socket, miss heartbeats, and flood falseagent_kirk_agent_downalerts. Control Center refuses to start a second guard when the pidfile is alive.
- First-run Install stack downloads the same-version GitHub Release assets (wheel + musl agent). SHA-256 is required (
SHA256SUMSfor wheel/agent stack only + agent.sha256). Desktop bundles use a separateSHA256SUMS.desktopso they cannot overwrite the stack sums file. If a.minisigis published for an asset, minisign must succeed (installminisign; soft-fail is not accepted). - No runtime
git clone/git pullas the friend install path (ADR 0005). - Runtime data lives under
~/.local/share/sysspectogramunlessSYSSPECTOGRAM_HOMEis set. - Details: RELEASE_v1.1.1.md, FRIEND.md, SUPPLY_CHAIN.md.
- Prefer ONNX / pickle-free artifacts.
cnn.ptloads withweights_only=Trueonly. - Legacy joblib needs
SYSSPECTOGRAM_ALLOW_JOBLIB=1and is refused when supply-chain enforce is on. - Profile packs: verify SHA-256 + minisign in production; local HMAC
.sigis compatibility only.
- Control Center never runs as root. System overlays / service control go through
sysspectogram-helper+ polkit when the helper is installed. - Home / Day-0 overlays can live in user-owned
state/user-settings.jsonwithout the helper. - Distro units for guard/monitor run as the dedicated
sysspectogramaccount; the packaged agent defaults to userspace and does not get eBPF capabilities unless an operator adds a reviewed drop-in.
On friend / headless installs the guard often runs without root. Auto-ban then uses the helper’s nft set path, authorized by Unix group membership (sysspectogram), not polkit — so a headless unit never blocks on a desktop pkcheck dialog.
Threat note: any local user in group sysspectogram (or any process running as that user) can ask the helper to add/remove ban-set members within the helper’s allowlist. Treat group membership like partial network admin: do not add untrusted accounts to sysspectogram; keep the helper binary and unit files root-owned; prefer a dedicated service user over sharing the group with human login accounts. Compromise of a group member can disrupt SSH reachability to your VPS (DoS), not remote code execution in the helper itself.
- Local JSONL is convenient, not WORM storage. Remote
alerts.sinks(HTTPS / syslog) can mirror events off-box; private/link-local sink hosts are blocked unless explicitly allowed. - Hybrid watchdog (Phoenix userspace; optional DKMS module, default off) aims to make agent death noisy, not immortal. See AGENT_PROTECT.md.
- Install from a tagged release; verify minisign /
SHA256SUMSwhen you download by hand. - Put your SSH / admin IP(s) in never-ban before enabling soft/full auto-ban.
- Keep Telegram unlock required (
telegram.require_console_unlock: true). - Keep the agent HMAC secret mode
0600and off shared disks. - Prefer
response.mode: observeuntil charts and alerts look sane. - Turn on remote alert sinks if you need evidence after a local wipe.
- Do not run multiple guards; use one Control Center Start protection.
- Treat imported ML weights as untrusted until you trained them yourself or verified the publisher.
If an attacker already has root on the monitored VPS, they can stop systemd units, kill processes, replace binaries under paths they own, and delete local logs. SysSpectogram tries to make that noisy (remote sinks, Dead-man, phoenix respawn, dual-process friction) — not impossible.
Do not market or assume “unkillable EDR”, “rootkit-proof”, or “survives hostile kernel”. Out-of-guest visibility (VMI) remains lab / opt-in and is not a production guarantee.
Full write-up: docs/THREAT_MODEL.md.
- Rootkit / malware samples “for tests”
- Claims of being rootkit-proof or unkillable
- Mandatory phone-home telemetry (see TRUST.md)
- Runtime
git pull/ clone as the supported friend install path - Process kill / isolate from Telegram without the unlock gate (helper
ban.*is group-gated for headless auto-ban; interactive SOAR stays unlock-gated in the guard)
| Doc | Topic |
|---|---|
| THREAT_MODEL.md | Assets, adversaries, residual risk |
| SUPPLY_CHAIN.md | Manifests, minisign, CI secrets |
| TRUST.md | Privacy / no phone-home |
| AGENT_PROTECT.md | HMAC, seal, phoenix |
| ROOT_WATCH.md | Unexpected root |
| KIRK.md | Integrity / isolate |
| CONTROL_CENTER.md | Helper + polkit surface |
| RELEASE_v1.6.0.md | Latest release notes |
| FRIEND.md | Friend install path |