docs: bring README, docs, screenshots and changelog up to 1.6.0
Release / Plan (reuse the published image?) (push) Successful in 6s
Release / ci (push) Skipped
Release / Build image (amd64) (push) Skipped
Release / Build image (arm64) (push) Skipped
Release / Publish tags (push) Successful in 17s
Release / Gitea release (push) Skipped
Release / Plan (reuse the published image?) (push) Successful in 6s
Release / ci (push) Skipped
Release / Build image (amd64) (push) Skipped
Release / Build image (arm64) (push) Skipped
Release / Publish tags (push) Successful in 17s
Release / Gitea release (push) Skipped
Rewritten README and interface/configuration/CLI/Docker/support/architecture docs (EN and pt-BR) from the 1.6.0 code; all 80 screenshots regenerated, incidents pages added; changelog audited against the tags (1.4.0 date, 1.4.6/1.4.7 items, 1.5.0 details, 1.5.8 shipped inside 1.6.0, compare links); compose and .env.example expose the enforce, egress, probe and Tor settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
22ccde539b
commit
6941106172
103 files changed
+1255
-344
No files matched your search
@@ -16,37 +16,53 @@
|
||||
|
||||
<p align="center"><img src="docs/img/defense-dark.png" width="900" alt="Urutau defense page with the second firewall section"><br><sub>Defense: the second firewall in observe mode, next to the host fail2ban.</sub></p>
|
||||
|
||||
<p align="center"><img src="docs/img/egress-dark.png" width="900" alt="Egress"><br><sub>Egress: scan bursts, beacons and mining from containers.</sub></p>
|
||||
<p align="center"><img src="docs/img/egress-dark.png" width="900" alt="Urutau outbound traffic page: verdict, beacons, scan bursts and mining from containers"><br><sub>Outbound traffic: scan bursts, beacons and mining from containers.</sub></p>
|
||||
|
||||
**Status: stable, v1.0.0.** See [CHANGELOG.md](CHANGELOG.md) for exactly what shipped.
|
||||
<p align="center"><img src="docs/img/incidents-dark.png" width="900" alt="Urutau incidents page: tickets for outbound-traffic findings"><br><sub>Incidents: every outbound finding becomes a ticket you triage.</sub></p>
|
||||
|
||||
Urutau is a small panel that runs on each of your servers (as a container), reads the logs the server already writes, and answers one question: who is attacking me right now? It classifies hostile activity, scores every source IP, keeps a rolling window on disk and serves an embedded dashboard, a JSON API and an exportable blocklist.
|
||||
<p align="center"><img src="docs/img/overview-mobile.png" height="420" alt="Urutau overview on a phone"> <img src="docs/img/defense-mobile.png" height="420" alt="Urutau defense page on a phone"><br><sub>The phone layout: a tab bar replaces the side rail and tables become cards.</sub></p>
|
||||
|
||||
- **Reads what already exists:** the Traefik JSON access log, `/var/log/auth.log` (sshd) and `/var/log/fail2ban.log`. No agent on the network path, no packet capture, no telemetry.
|
||||
- **Classifies:** `scanner`, `exploit`, `bruteforce`, `ssh-fail`, `ssh-probe`, `ban`, plus the benign `ok`, `notfound` and `ssh-ok`.
|
||||
- **Scores IPs:** every event adds weight to its source IP. A score of 10 or more is **suspicious**; **hostile** needs 50 or more **and** a strong signal (an attack tool, two or more attack categories, a ban, or a clear exploit attempt that was refused). Scanner and exploit probes that got a 2xx or 3xx answer weigh only 0.5. An IP with a successful SSH login is never hostile and never reaches the blocklist.
|
||||
**Status: stable, v1.6.0.** See [CHANGELOG.md](CHANGELOG.md) for exactly what shipped.
|
||||
|
||||
Urutau is a small panel that runs on each of your servers (as a container), reads the logs the server already writes, and answers one question: who is attacking me right now? It classifies hostile activity, scores every source IP, keeps 30 days on disk, serves an embedded dashboard, a JSON API and an exportable blocklist, and can decide which attackers to block (a second firewall), watch what your own containers send out (outbound traffic analysis) and turn what it finds into tickets and an HTML report.
|
||||
|
||||
- **Reads what already exists:** the Traefik access log (JSON, or the default text format with fewer fields), `/var/log/auth.log` (sshd) and `/var/log/fail2ban.log`. Two optional sources come from the host kit in `deploy/host`: the network probe log (new inbound connections to ports nobody listens on, each a `port-scan` event) and the outbound connection log. No agent on the network path, no packet capture, no telemetry.
|
||||
- **Classifies:** `scanner`, `exploit`, `bruteforce`, `ssh-fail`, `ssh-probe`, `ban`, `port-scan`, plus the benign `ok`, `notfound` and `ssh-ok`. Browsing a public code forge (`/owner/repo/src/commit/<sha>/...`, `raw`, `blame`, `blob`, `tree` paths) is not an attack; real probes such as `/.env` or `/.git/config` still are.
|
||||
- **Scores IPs:** every event adds weight to its source IP. A score of 10 or more is **suspicious**; **hostile** needs 50 or more **and** a strong signal (an attack tool, two or more attack categories, a ban, or a clear exploit attempt that was refused). Scanner and exploit probes that got a 2xx or 3xx answer weigh only 0.5. An IP with a successful SSH login is never hostile and never reaches the blocklist. Bans of the `urutau` jail (Urutau's own decisions) and of `recidive` do not count as evidence, so the system does not feed itself.
|
||||
- **Second firewall (optional):** `URUTAU_ENFORCE=off|observe|on`. Urutau decides which attacking addresses to block and writes the decisions to a file; the host fail2ban (jail `urutau`) applies them, so Urutau needs no privileges. `observe` shows what would be blocked. See [Second firewall](#second-firewall).
|
||||
- **Outbound traffic analysis (optional):** new outbound connections of the host and containers are checked for beaconing, mining, IRC and SMTP ports, contact with attackers or Tor relays, DNS outside the allowed resolvers, unauthorised scans and new countries. See [Outbound traffic and incidents](#outbound-traffic-and-incidents).
|
||||
- **Incident management:** every outbound finding becomes a ticket (`INC-<n>`) with status, severity, assignee, tags, verdict, comments and history.
|
||||
- **HTML report:** a printable A4 report (`/api/v1/report?format=html`): cover, executive summary in plain language, rule-based recommendations, threats, geography, errors and health, visitors, defense, second firewall and outbound traffic. The Reports page previews, downloads or prints it.
|
||||
- **Tor:** the official exit and relay lists are downloaded every 6 hours (`URUTAU_TOR_AUTO`, on by default); requests from Tor exits are marked `tor`, and a workload talking to a Tor relay is a high outbound finding. `--tor-exits` adds your own file.
|
||||
- **Geolocation, offline:** country, city and ASN for every IP from the free DB-IP Lite databases, downloaded and refreshed by Urutau itself, read by a built-in MMDB reader with no dependency. Nothing is looked up online.
|
||||
- **Understands User-Agents:** browser, operating system, device, bots and attack tools.
|
||||
- **Understands User-Agents:** browser, operating system, device, bots and attack tools. Googlebot, Bingbot and Applebot are recognized by forward-confirmed reverse DNS whatever the User-Agent says.
|
||||
- **Web analytics for legitimate traffic:** unique visitors, pages, referrers, countries, browsers, devices, latency (p50 and p95) and bytes, with a world map, replacing your proxy's analytics. Separate **Threats** and **Traffic** pages.
|
||||
- **Lightweight:** Go standard library only, one static binary, a soft memory limit of 256 MiB, state in a single snapshot file. No database.
|
||||
- **Live dashboard:** embedded vanilla UI (English and Portuguese, light and dark), updated through Server-Sent Events, with nine pages (see below).
|
||||
- **Live dashboard:** embedded vanilla UI (English and Portuguese, light and dark, with a phone layout), updated through Server-Sent Events, with 23 pages in five groups (see [Interface](#interface)).
|
||||
- **Blocklist:** hostile, globally routable IPs as plain text or JSON, ready for fail2ban, ipset, nginx or a firewall. IPv6 is aggregated by /64 and exported as `x:x:x:x::/64`.
|
||||
- **Federation:** one instance (the hub) aggregates others with `--peer name=url`, pulling `/api/v1/peer/export` and relaying their live events through `/api/v1/peer/stream`.
|
||||
- **Federation:** one instance (the hub) aggregates others with `--peer name=url`, pulling `/api/v1/peer/export` and relaying their live events through `/api/v1/peer/stream`. Outbound reports and, when `URUTAU_ENFORCE_SHARE` is on, second firewall decisions and unbans travel the same way, each side applying its own exclusions.
|
||||
|
||||
## How it works
|
||||
|
||||
```
|
||||
Traefik access.log auth.log (sshd) fail2ban.log
|
||||
│ │ │
|
||||
└─────────┬───────────┴────────────────────┘
|
||||
▼
|
||||
tail + parse (rotation aware, bounded lines)
|
||||
▼
|
||||
classify ──► score per IP ──► state in memory ──► snapshot (/data)
|
||||
│
|
||||
┌─────────────────────────┼─────────────────────┐
|
||||
▼ ▼ ▼
|
||||
dashboard (SSE) /api/v1/* JSON blocklist.txt / .json
|
||||
Traefik access.log auth.log (sshd) fail2ban.log probe.log* egress.log*
|
||||
│ │ │ │ │
|
||||
└────────┬─────────┴─────────────────┴─────────────┘ │
|
||||
▼ │
|
||||
tail + parse (rotation aware, bounded lines) │
|
||||
▼ ▼
|
||||
classify ──► score per IP ──► state in memory ──► snapshot outbound analysis
|
||||
│ │ (/data) │
|
||||
▼ │ ▼
|
||||
second firewall* │ incident tickets
|
||||
(decisions.log ──► host │ (incidents.json)
|
||||
fail2ban, jail urutau) │
|
||||
┌────────────────────────┼─────────────────────┐
|
||||
▼ ▼ ▼
|
||||
dashboard (SSE) /api/v1/* JSON blocklist.txt / .json
|
||||
HTML report
|
||||
|
||||
* optional, fed by the host kit in deploy/host
|
||||
|
||||
hub ── GET /api/v1/peer/export (peer token) ──► peer A
|
||||
│ ── GET /api/v1/peer/stream (live events) ──► peer A
|
||||
@@ -59,17 +75,36 @@ Urutau is a small panel that runs on each of your servers (as a container), read
|
||||
|
||||
Beyond live numbers, Urutau remembers and explains. It keeps 30 days of state and an event registry on disk (`<data-dir>/events/`, capped by `--events-max`, 512 MB by default), so you can pick any period (twelve named ranges or a custom `from`/`to`), replay it, and open an IP analysis page with a verdict and its reasons, attack families, MITRE ATT&CK techniques, network type, cadence, sessions, campaigns and recommended actions, with a STIX 2.1 export. The registry holds attackers only: never the address of a legitimate visitor. See [docs/architecture.md](docs/architecture.md).
|
||||
|
||||
## Second firewall
|
||||
|
||||
Optional (`URUTAU_ENFORCE`, default `off`; `observe` decides in memory only, `on` also writes the decisions to `--enforce-log`). The host kit in `deploy/host` (`install.sh --enforce`) installs the fail2ban filter, action and jail `urutau`, which apply the decisions; the ban only drops connections the address starts, so replies to the server's own connections keep flowing. A decision has a reason, among them:
|
||||
|
||||
- a burst of attack events in 10 minutes (`--enforce-threshold`, default 5);
|
||||
- `known-attacker`: an address already hostile (or suspicious with score 100 or more) is banned on its first new malicious event;
|
||||
- slow attackers: 10 SSH failures (`ssh-probe` counts half) or 10 to 20 web scan/exploit events in 24 h or 7 days without a legitimate visit;
|
||||
- `port-scan`: 10 distinct unserved ports in 10 minutes;
|
||||
- `neighbor-campaign`: 3 or more distinct addresses of a /24 (IPv4) or /64 (IPv6) banned in the last 24 h make one attack event of another address of the prefix enough;
|
||||
- a sweep every 10 minutes bans addresses active in the last 24 h that nothing blocks yet, at most `--enforce-max-per-min` (default 60) decisions per minute.
|
||||
|
||||
It never blocks trusted addresses, private ranges, CDN (Cloudflare) and public resolver ranges, peers, the server itself, legitimate visitors, crawlers verified by forward-confirmed reverse DNS (Googlebot, Bingbot, Applebot) or addresses you released. The Defense page shows mode, recent decisions, coverage and releases; the **Unban** button (IPs, IP analysis and Defense) asks the host, through `unban.log` next to `--enforce-log`, to lift the block and can keep the address from being banned again for 1 h, 24 h or 7 days. With `URUTAU_ENFORCE_SHARE=on` a hub and its peers exchange decisions, applied only when the receiving server also saw the address attack. Coverage counts an attacker as protected when it is listed or banned by any jail.
|
||||
|
||||
## Outbound traffic and incidents
|
||||
|
||||
Optional (`URUTAU_EGRESS=auto|on|off`; `auto` turns it on when the outbound log exists). The host kit logs only new TCP connection attempts through nftables, and a container map names the workloads. Urutau checks them for beaconing (regular conversations with one destination), mining, IRC and SMTP ports, contact with addresses that attacked the server or with Tor relays, DNS outside the allowed resolvers (`URUTAU_EGRESS_RESOLVERS`), unauthorised outbound scans and new countries. Workloads are defined by network or container name (`URUTAU_EGRESS_WORKLOADS`); a `scanner` workload (an authorised surface scanner) has only its scan-shaped traffic summarised, everything else is judged like any other workload. The servers themselves, peers and the host's own provider never raise findings, cloud metadata services polled by the host are `infra`, and regular connections to large CDNs and clouds are low severity.
|
||||
|
||||
Every finding above info severity becomes a ticket `INC-<n>` (list, ticket page, manual tickets, CSV export, `/api/v1/incidents`). A ticket marked `false_positive` or `benign` can suppress findings with exactly its key; a resolved ticket reopens if the finding comes back.
|
||||
|
||||
## Interface
|
||||
|
||||
Pages are grouped in a side rail, with the view kept in the URL hash. A "?" button next to metrics and categories explains what they mean and what to do.
|
||||
Pages are grouped in a side rail (a tab bar on phones), with the view kept in the URL hash. A "?" button next to metrics and categories explains what they mean and what to do.
|
||||
|
||||
- **Monitor:** Overview (headline numbers, timeline, top IPs; a period selector applies everywhere), Live (attacks as animated arcs on a flat map or a 3D globe, including your peers; `--location` sets where this server sits on the map), Services (SLO, error budget and Apdex per service).
|
||||
- **Investigate:** IPs (the scored table and the IP analysis page, `#/ip/<ip>`), Sessions, Campaigns, Replay (a period played back on the map) and Event search.
|
||||
- **Analyze:** Threats, MITRE ATT&CK, Geography (country, state, city, `#/geo/BR/Pernambuco/Recife`), Evolution, Concentration, Survival (time to ban), Traffic (privacy-friendly analytics for legitimate visitors), Where errors come from (app, proxy, blocked, attack, bot, client) and Protocols and TLS.
|
||||
- **Operate:** Defense, Sources and hosts (log sources, peers and the blocklist) and Integrity.
|
||||
- **Reports.**
|
||||
- **Monitor:** Overview (headline numbers, timeline, top IPs; a period selector applies everywhere), Live (attacks as animated arcs on a flat map or a 3D globe, including your peers; `--location` sets where this server sits on the map), Services (SLO, error budget, burn rate and Apdex per service).
|
||||
- **Investigate:** IPs (the scored table and the IP analysis page, `#/ip/<ip>`), Sessions, Campaigns, Replay (a period played back on the map), Event search, Incidents (tickets for outbound findings) and Outbound traffic.
|
||||
- **Analyze:** Threats, MITRE ATT&CK, Geography (country, state, city, `#/geo/BR/Pernambuco/Recife`), Evolution, Concentration, Survival (time to ban), Traffic (privacy-friendly analytics for legitimate visitors), Where errors come from (app, proxy, blocked, attack, bot, client, unknown) and Protocols and TLS.
|
||||
- **Operate:** Defense (ban and blocklist coverage, second firewall, Unban), Sources and hosts (log sources, peers and the blocklist) and Integrity (health of sources, registry and snapshot).
|
||||
- **Reports:** the HTML report of a period.
|
||||
|
||||
See [docs/interface.md](docs/interface.md).
|
||||
On phones, plain data tables become stacked cards, so nothing scrolls sideways. See [docs/interface.md](docs/interface.md) for every page with screenshots and the HTTP routes.
|
||||
|
||||
## Install
|
||||
|
||||
@@ -188,10 +223,11 @@ See **[CONTRIBUTING.md](CONTRIBUTING.md)** and **[docs/architecture.md](docs/arc
|
||||
|
||||
## Known limits
|
||||
|
||||
- Only three sources: Traefik JSON access log, sshd lines from `auth.log` (ISO timestamps) and `fail2ban.log`.
|
||||
- State is kept for 30 days at most (`--retention`), with up to 20,000 tracked IPs; the event registry is capped by `--events-max`.
|
||||
- The dashboard login is a single shared token; there are no user accounts.
|
||||
- Scores are heuristics, not proof of malicious intent.
|
||||
- Sources: Traefik access log (JSON or default text format), sshd lines from `auth.log` (ISO timestamps), `fail2ban.log`, and the optional probe and outbound connection logs written by the host kit.
|
||||
- State is kept for 30 days at most (`--retention`), with up to 20,000 tracked IPs; the event registry is capped by `--events-max`; incidents hold up to 5000 tickets.
|
||||
- The dashboard login is a single shared token; there are no user accounts, and a ticket author is a free-text name.
|
||||
- Scores and second firewall decisions are heuristics, not proof of malicious intent. Start with `observe`.
|
||||
- Outbound analysis and the second firewall need the host kit (nftables, rsyslog, fail2ban); without it those pages stay empty.
|
||||
|
||||
## Where it's going
|
||||
|
||||
@@ -201,6 +237,7 @@ Summary of the [ROADMAP](ROADMAP.md):
|
||||
|---|---|
|
||||
| **Done (1.0.0)** | Log collection, classification and scoring, offline geolocation, User-Agent parsing, privacy-friendly web analytics, snapshot persistence, dashboard with SSE, token login, blocklist, federation, Docker image and CI/CD |
|
||||
| **Done (1.2.0)** | 30-day retention, any period, on-disk event registry, replay, IP analysis with verdict, MITRE ATT&CK, campaigns, STIX 2.1 and stable metrics |
|
||||
| **Done (1.4.0 to 1.6.0)** | Second firewall with Unban and decision sharing, outbound traffic analysis, incident management, HTML report, Tor lists, network probes, text-format Traefik logs, verified crawlers and forge browsing recognized, phone layout |
|
||||
| **Next** | More log sources, webhook alerts, Prometheus metrics |
|
||||
| **Later** | IP reputation enrichment |
|
||||
| **Not planned** | Active scanning or counterattack, mandatory cloud services, telemetry |
|
||||
|
||||
Reference in new issue
Block a user