You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Security: KeyspaceDecay/eville-soc
Security
docs/SECURITY.md
Security notes
Trust boundaries
Browser — authenticated by a local administrator password and session.
Web process (eville) — parses HTTP, renders templates, reads /proc,
/sys, logs and local files. It cannot kill arbitrary processes, run APK,
modify users, change networking or load firewall rules directly.
Root helper — small fixed operation set over a Unix socket. It validates
every argument and never invokes a shell.
Operating system — OpenRC, APK, iproute2, nftables and shadow tools remain
the source of truth. eville soc does not maintain a parallel database.
Sessions: random 256-bit ID, in-memory only, 30-minute idle and 12-hour absolute
limits, HttpOnly, SameSite=Strict browser-session cookie, Secure when TLS is
active. The cookie has no fixed 30-minute expiry; an in-page 5-minute heartbeat
keeps the session alive while the panel is open. Session fixation is avoided by
issuing a new session after login. Stale login/setup forms get a fresh form
rather than a dead-end CSRF error. Opaque Origin: null is accepted only with
a valid token and same-origin/none fetch metadata.
CSRF: per-session token checked on every unsafe method, plus Origin and
Sec-Fetch-Site checks.
Confirmation: dangerous actions also require a single-use nonce bound to the
session and canonical action arguments (two-minute lifetime). Passwords are
SHA-256-hashed inside the nonce state. SIGKILL/reboot/shutdown additionally
require a typed phrase.
Login limiter: five failures per IP+username per ten minutes.
Rendering: html/template auto-escaping; no innerHTML for server data in the
frontend. CSP has no inline scripts/styles and permits only same-origin assets.
Helper: SO_PEERCRED UID check; strict JSON decoding; allowlisted operations;
validated names/IPs/CIDRs/routes; fixed argv; bounded execution time and output.
Process control: PID 1, kernel threads, sshd, the helper and web process are
refused. Command lines are masked for common secret-bearing flags and URL
userinfo.
Network safety: loopback-only bind enforced by config validation; default route
and default-route interface changes refused; 120-second auto-rollback for
interface/address/route changes; no /etc/resolv.conf writes.
nftables: when nft is installed, only the isolated inet eville_soc table is
recreated idempotently at helper startup/change. No existing table is edited or
deleted. Strict TCP mode refuses activation unless detected SSH ports are
allowed; UDP is filtered by explicit blocked ports only, avoiding a stateful
default-deny that would break DNS. IPv4/IPv6 blocklist entries are validated; loopback,
unspecified and multicast addresses are refused.
Logs: only regular files under /var/log, symlink-resolved and revalidated on
each stream read. Bounded tail reads. Unreadable log files are read by the root
helper after the same path validation, never by the web process directly.
Backups: root-owned directory 0700, files 0600, fixed-path Go tar/gzip
streaming, SHA-256 sidecars, strict backup-name/scope and restore-path
validation. Web restore creates a pre-restore snapshot, restores only allowed
regular files and never starts/restarts/reboots services. No web download.
Archives contain secrets and must be protected.
Deliberate limitations
No MFA and no RBAC: one local administrator account.
Helper is powerful: compromise of the eville account or the authenticated
browser session gives the same fixed administrator operations. This is inherent
in a local admin panel; isolate the host and protect SSH.
No automatic response: failed logins and heuristic events do not trigger
blocking, killing or configuration changes.
Heuristics: new listeners and commands from /tmp or /dev/shm are flagged
as heuristic, not confirmed compromise.
Local logs only: if syslog is not running or logs are unreadable, the panel
reports that instead of inventing events.
No full filesystem integrity: the baseline covers a selected set of files,
listeners, runlevels and firewall rules by explicit admin action.
No journald/systemd: Alpine/OpenRC is the only supported init system.
Recommended deployment
Dedicated Alpine VM or VPS, SSH key-only access, firewall restricted to SSH.
Access the UI only through ssh -L 8787:127.0.0.1:8787.
Use a long unique administrator password; change it through Settings.
Back up /etc/eville-soc and /var/lib/eville-soc encrypted.
Keep Alpine and APK packages updated manually after reviewing the Packages page.
Capture a baseline after the system is in a known-good state.