Skip to content

Server security · in-house models · 2026

Wardvale — Linux Servers That Defend Themselves

A Linux server agent that reads SSH and web server logs, watches processes and files, recognises attacks with rules and small models of its own, and bans attackers through nftables — plus an antivirus, a vulnerability audit and a fleet panel on your own network. Detection runs on the server itself, with no LLM.

In focus

  1. 01Detection and response on the server itself — no LLM
  2. 02Rules R1–R13 for the obvious, models M1–M5 for the rest
  3. 03Risk points and a ban ladder: 10 min → 1 h → 24 h → 7 days
  4. 04A login right after password guessing: the session is killed at once
  5. 05A web shell is found: everyone who accessed it is banned
  6. 06Every decision explained — in the log, the panel and Telegram
Web attacks detected
90.4%of 2,550 on our bench, request by request
False positives
0.056%of ordinary site traffic
Real CVE exploits
91.8%of 85 detected
Our production proxy
297bans in about 55 h, at most 3 doubtful

01 — Overview

The server notices an attack and answers it on its own — no language models, and no traffic sent anywhere to be judged.

One Go binary ships as a signed .deb package and joins a panel on your own network with a confirmation code. Rules catch the obvious; small models catch what rules cannot describe. Every decision is explained by feature contributions, and a ban lives in the kernel with a timeout, so it expires on time even if the agent is stopped.

Role
The whole product: the Go agent, detection rules and models, antivirus and vulnerability audit, a fleet panel with signed commands, signed packages with automatic updates, and an attack lab
Timeline · 2026
  1. SSH, nginx, rules and models M1–M3
  2. Antivirus, package audit, fleet panel
  3. Users audit and fleet learning
  4. Signed packages and auto-updates
  5. Processes, web shells, team and licences
Problem

A server with a public address gets password guessing, scanners and injections within minutes of going online. Regex rules catch only what was described in advance, and cloud services want the traffic and logs sent out.

Solution

An agent on the server itself: rules for the obvious, models for the rest, risk points with a ban ladder and bans in nftables, plus a panel on your own network for the whole fleet. A login right after password guessing gets its session killed at once; a found web shell gets everyone who used it banned.

Outcome

On our bench the agent caught 90.4% of 2,550 web attacks request by request with 0.056% false positives on ordinary traffic; on our own proxy it made 297 bans in about 55 hours, at most 3 of them doubtful. It installs from a signed package and joins the panel with one code.

02 — Pipeline

How it works, step by step.

  1. 01Log lineSSH from journald or a file; access logs of nginx, Apache, Caddy, HAProxy and Traefik; new sites are picked up on their own.journald · access logs
  2. 02Event parsingAddress, user, path and status — including the real visitor behind Cloudflare.X-Forwarded-For
  3. 03RulesBrute force, scanners, injections, Log4Shell, floods, downloaded code, reverse shells, web shells — a confident rule acts at once.R1–R13
  4. 04Request model28 features of every HTTP request, about 400 trees; retrained on the fleet in the panel.M1 · gradient boosting
  5. 05Address behaviour12 features of an address’s activity window; retrains on the server every day.M2 · Isolation Forest
  6. 06Login profileSubnet, country, key, method and hour — for each user.M3
  7. 07Processes and filesNormal parent → program pairs for each server; a file model for PHP and JSP web shells.M4 · M5
  8. 08Risk pointsPoints per address decay with a 10-minute half-life; 100 with a rule involved means a ban.≥ 100
  9. 09Ban and killA ban with a kernel timeout, the sshd session or the process tree killed, a file sent to quarantine.nftables · SIGTERM

03 — What we built

Key systems, built end to end.

Detection without a cloud

Rules and models run on the server’s ordinary CPU. Outbound requests go only to threat databases, to signed releases and — while the owner keeps it on — anonymised feature vectors that improve the request model.

In-house models instead of an LLM

Gradient boosting over 28 request features, an Isolation Forest over address behaviour, a login profile for every user, normal process pairs for each server and a file model for web shells.

Decisions you can explain

Every ban carries the rules that fired and the model’s feature contributions — in the log, the panel and Telegram.

Antivirus for web servers

Web shells — including ones hidden in images and ones no signature knows — miners, reverse shells and persistence. Everyone who accessed a found web shell is banned.

What to update first

Vulnerabilities in system packages and in sites’ lock files — composer, npm, yarn, pnpm, pip, Poetry, Go, Bundler — ranked by CISA KEV and EPSS.

A fleet panel inside your network

Servers join with a confirmation code, every command is signed with Ed25519 and expires in 10 minutes, root actions go through a separate helper, and the team works with owner, admin, operator and viewer roles.

04 — Challenges

Technical challenges.

The hard parts — and the solutions that made the system stable.

Never ban the server’s owner
Problem

An agent that bans on its own can lock out the admin — or, behind Cloudflare, ban a proxy node and cut off every visitor who comes through it.

Solution

Local networks and VPN ranges are never banned by default, allowlisted addresses are never banned or disconnected, and behind Cloudflare the agent takes the visitor’s real address from X-Forwarded-For and never bans Cloudflare itself.

Attackers must not be able to train the model
Problem

Models that learn on the client’s server could be taught to treat an attacker as normal — a single successful login would be enough.

Solution

For the first 7 days M2, M3 and M4 only watch, and they learn only from addresses that triggered no rules. A new login location becomes familiar only after logins on 3 different days. Models on their own give a 10-minute ban and a notification, never a week.

On-site learning that cannot break detection
Problem

Fine-tuning the request model on each server’s own traffic helps — until a bad stretch of data quietly makes it worse.

Solution

The local correction M1L is capped at ±4 on M1’s logit, switches on only after 20 attacks and 200 normal requests, and tests itself on every fifth example. If it does worse than M1 alone, it turns itself off; a reset is one command.

New models without new risk
Problem

A request model retrained on fresh fleet data could quietly start flagging ordinary visitors.

Solution

A new model first runs in shadow mode: it scores real traffic in parallel without acting, and replaces the live model only after that check. If it does worse, it rolls back on its own. Agents feed learning only numeric feature vectors — no addresses or URLs.

A ban that outlives the agent
Problem

If the agent crashes in the middle of the day, its bans must neither stick forever nor vanish.

Solution

Bans live in a separate nftables table with timeouts kept by the kernel, so they expire on time with or without the agent. The table hooks prerouting, so it also sees traffic going into Docker containers.

Protection that is not a new hole
Problem

A security agent runs next to everything valuable on the server — its own bugs and dependencies are attack surface too.

Solution

Only the Go standard library, an agent user with a random name, and everything that needs root done by a helper that checks each command’s signature again.

05 — Results

What it delivered.

  • On our bench (17 November 2026, held-out data, our own attack generator): 90.4% of 2,550 content web attacks detected request by request, and 91.8% of an independent set of 85 real CVE exploits
  • False positives on ordinary site traffic: 0.056% of requests (7 of 12,559); an attacker is noticed on the 1st–4th request
  • Antivirus: 8 of 8 malicious test files found, 0 of 4 clean files flagged
  • On our own production proxy over about 55 hours: 73,935 requests, 297 bans of 223 addresses, at most 3 of them doubtful

06 — Where it runs

  • Debian 12 · 13signed .deb packages, amd64 and arm64Shipped
  • Ubuntu 22.04 · 24.04signed .deb packages, amd64 and arm64Shipped
  • Sites behind Cloudflarethe real visitor address from X-Forwarded-ForShipped
  • RHEL · AlmaLinux · RockyRPM packagesPlanned
  • Cloud consolenextPlanned

07 — Stack

Agent
Go · standard library only · amd64 · arm64 · signed .deb
Models
LightGBM · Isolation Forest · per-user login profiles · process pairs · Saabas feature contributions
Response
nftables · SIGTERM sshd · cn_proc · inotify · quarantine
Panel
HTTPS + SSE · Ed25519 · PBKDF2 · discovery over UDP
Threat data
OSV · CISA KEV · EPSS · MalwareBazaar · ClamAV