LogOcean

Threat Detectionv1.0.0

Self-hosted, agentless SIEM: 29 vendor parsers, 90 detection + 10 correlation rules, and a MITRE ATT&CK coverage scoreboard over PostgreSQL.

29
Parsers
90
Detection Rules
82
ATT&CK Techniques
303
Unit Tests
LogOcean — how it works infographic
How LogOcean works

01Overview

LogOcean is a self-hosted, agentless SIEM that ingests network, endpoint, cloud, identity, and OT/ICS logs from 29 vendors, auto-detects each format, normalizes every record to one common schema, and retains everything in PostgreSQL for three years or more. It takes logs through three front doors — a web upload page, an HTTP ingest API with API-key auth, and a syslog receiver (UDP/TCP/TLS) fronted by a bounded async queue — so a burst of live traffic never blocks the receiver. There are no agents to deploy: you point collectors, forwarders, and other tools at it.

Ingested events are matched inline against a Sigma-compatible detection engine (90 detection rules) while a background scheduler runs 10 correlation/threshold rules over the event store, raising alerts you triage at /alerts and group into cases. On top of the detection core sit the pieces a SOC actually needs: threat-intel IOC enrichment, webhook/email notifications, agentless response playbooks with time-boxed auto-revert, UEBA entity-risk scoring, kill-chain reconstruction that stitches related alerts into multi-tactic attack stories, and a detection-engineering workbench that maps coverage and flags noisy or dead rules.

What sets LogOcean apart is that its detection posture is measured, not asserted: a /coverage scoreboard computes MITRE ATT&CK (Enterprise + ICS) and MITRE ATLAS coverage directly from the rules, exports ATT&CK Navigator layers, and is enforced by a CI rule-linter. A community SigmaHQ importer translates the open rule corpus into the engine, and an optional Claude-powered SOC copilot explains alerts, summarizes cases, and drafts Sigma rules from plain English. Passive OT/ICS monitoring ingests Zeek + ICSNPP telemetry (Modbus/DNP3/S7comm/CIP) with an ATT&CK-for-ICS rule pack and IEC 62443 / NERC CIP mapping — without ever touching a device.

It is built for security engineers and small-to-mid SOC teams who want a real, auditable SIEM they fully control — no per-GB licensing, no cloud lock-in, no JavaScript build step. The whole stack is Python + FastAPI + PostgreSQL 16, server-rendered, and tested unit + integration against a real database in CI across Python 3.11–3.13.

LogOcean — overview diagram

02Key Capabilities

29 auto-detected vendor parsers

Ingests network, endpoint, cloud/identity, private-cloud (Nutanix), OT/ICS, and generic CEF/LEEF/syslog/JSON logs, auto-detecting the format on upload and normalizing every one to a single schema.

Three agentless ingest paths

Web upload, an HTTP ingest API with API-key auth and gzip/bomb-guarded bodies, and a UDP/TCP/TLS syslog receiver fronted by a bounded async queue so a burst never blocks intake.

Sigma-based detection & correlation engine

Ships 90 per-event detection rules plus 10 threshold/cardinality correlation rules, supporting the common Sigma modifiers (contains/cidr/base64offset/windash/fieldref) so many community rules load unmodified.

MITRE ATT&CK + ATLAS coverage scoreboard

A /coverage page computes Enterprise + ICS + ATLAS coverage from the rules themselves, rolled up by tactic, fidelity, and data source, with ATT&CK Navigator layer export and a CI rule-linter.

Community SigmaHQ importer

Translates thousands of open ATT&CK-tagged SigmaHQ rules into the engine by mapping Sigma logsource to a gate over normalized fields, honestly skipping anything it cannot faithfully run.

Triage, cases & saved searches

Acknowledge/assign/annotate alerts, build suppression/allowlist rules to cut noise, group related alerts into cases with severity roll-up, and save per-user queries as one-click chips.

Notifications & agentless response

Delivers new alerts to webhook/email channels and runs response playbooks that POST containment intents to your SOAR/firewall/IAM, with time-boxed auto-revert that fires the inverse action on expiry.

UEBA entity risk & kill-chain reconstruction

Pure-PostgreSQL behavioural analytics baseline every user/host/IP for new-entity/new-association anomalies and stitch related alerts across ATT&CK tactics into narrated attack stories.

AI SOC copilot (Claude)

Optional, off-by-default assistant that explains alerts, summarizes cases in ATT&CK order, and drafts Sigma-subset rules from natural language, all RBAC-gated and audited.

Passive OT/ICS monitoring

Enriches Zeek + ICSNPP telemetry (Modbus/DNP3/S7comm/CIP) into a control-plane action + ot.* fields, with an ATT&CK-for-ICS rule pack, controller asset inventory, and master to controller baselining.

Partitioned PostgreSQL storage with 3-year retention

Events are RANGE-partitioned by month with GIN full-text + jsonb indexes; purge is an instant partition drop and re-ingesting the same file is idempotent via a dedup hash.

Auth, RBAC & audit trail

Built-in login with admin/analyst/viewer roles, pbkdf2 passwords, server-side sessions, security headers + CSRF, a last-admin lockout guard, and an audit log of every security-relevant action.

03Architecture

Three ingest inputs share one source-agnostic core pipeline: detect format, parse with a vendor parser, normalize to a common NormalizedEvent schema, and store in month-partitioned PostgreSQL. Live sources buffer in a bounded async queue drained by batching writer workers. Every event is evaluated inline against per-event detection + threat-intel rules and updates UEBA baselines as it is stored, while a background scheduler runs correlation SQL over the event store; both raise rows in the alerts table that fan out to notifications and agentless response.

1
Ingest front doors
Web upload, HTTP ingest API (app/api.py, API-key auth, gzip-aware), and the UDP/TCP/TLS syslog receiver (app/receivers/syslog.py) feeding a bounded async queue (app/streaming.py).
2
Parse & normalize core
app/detect.py auto-detects format, app/parsers/ (29 parsers) parse to NormalizedEvent, and app/pipeline.py runs the source-agnostic parse to normalize to insert path with dedup + full-text blob (app/normalize.py).
3
Storage layer
app/db.py + schema.sql manage the RANGE-partitioned events table (monthly partitions, GIN full-text + jsonb, btree indexes) with idempotent ON CONFLICT ingest and instant partition-drop retention.
4
Detection & correlation engines
app/detection/engine.py is the per-event Sigma-subset evaluator; correlation.py runs threshold/cardinality rules over SQL on a scheduler; runtime.py loads and syncs the rule registry from rules/*.yml.
5
Alerting & response
app/alert_actions.py fans newly-raised alerts to app/notify/ (webhook/email) and app/response/ (agentless playbooks + stateful auto-revert), all on background threads.
6
Analytics & coverage
Pure, DB-light modules: risk.py (UEBA), killchain.py (attack stories), workbench.py (rule tuning), coverage.py (ATT&CK/ATLAS scoreboard), navigator.py (layer export), ot.py (ICS analytics).
7
Enrichment & collectors
app/threatintel/ (IOC matcher + feed loader) and app/collectors/ (agentless pull connectors for Okta/GitHub/GitLab/AWS/Entra/M365/GCP with SigV4, OAuth, and signed-JWT auth).
8
Web UI & API
app/main.py serves FastAPI routes and server-rendered Jinja2 pages (dashboard, search, alerts, cases, killchain, risk, workbench, coverage, compliance, ot, admin) with no JS build step.
LogOcean — architecture diagram
LogOcean — architecture diagram

04Project Structure

app/main.pyFastAPI routes, server-rendered Jinja2 UI, and application lifespan wiring.
app/pipeline.pySource-agnostic parse to normalize to insert core, with inline detection, threat-intel, and UEBA baselining.
app/parsers/29 vendor/format parsers plus the zeek_ics OT/ICS enrichment helper.
app/detection/Sigma-subset per-event engine, correlation/threshold engine, and the rule-registry runtime.
app/coverage.pyPure ATT&CK (Enterprise + ICS) + ATLAS detection-coverage scoreboard computed from the rules.
app/collectors/Agentless pull connectors (Okta/GitHub/GitLab/AWS/Entra/M365/GCP) plus the polling scheduler.
rules/90 detection + 10 correlation Sigma-subset YAML rules, plus imported/ for generated SigmaHQ imports.
playbooks/Agentless response playbooks (match + action YAML) including block-brute-force and log-high-severity.
schema.sqlPartitioned events table, FTS/jsonb/btree indexes, and all supporting tables (alerts, cases, iocs, users...).
scripts/import_sigma.pyCLI that translates a SigmaHQ clone into rules/imported/*.yml for the engine.
tests/Unit (DB-free) and integration (real Postgres) tiers — 303 test functions across 32 files.
docs/DETECTION_COVERAGE_ROADMAP.mdLiving, phased detection-coverage programme plan.

05Security Controls

Sigma-subset detection engine
90 per-event rules with full modifier support (contains/startswith/endswith/re, cidr, numeric lt/gt, exists, fieldref, base64/base64offset/windash) and the and/or/not + N-of condition grammar, each exception-isolated so one bad rule can't sink the rest.
Correlation & cardinality rules
10 threshold rules over the event store — brute-force/connection-flood bursts plus distinct-count behaviours: password spray (one source to many accounts), distributed brute force, port scan, host sweep, and OT-protocol enumeration.
Windows/Sysmon high-fidelity endpoint pack
LSASS memory access & credential-dumper tools, NTDS/SAM extraction, remote-thread injection, BYOVD driver load, UAC hijack, LSA/AppInit persistence, WDigest, Defender/AMSI/ETW tamper, PsExec/msiexec/BITS, and Cobalt Strike named pipes — each fidelity-tagged and IOC-verified.
Cloud & identity pack
AWS (CloudTrail logging/GuardDuty/Config disabled, admin-policy attach, public S3, access-key/root login), GCP (privileged IAM grant, SA key, logging-sink delete), Azure (RBAC assignment, diagnostic-settings/Key Vault tamper), Okta/M365/GitHub/GitLab identity abuse — API operation names adversarially verified.
Web-exploitation & Linux TTPs
Request-line detections for SQLi, path traversal/LFI, OS command injection, XSS, web-shell access, and scanner UAs firing across Apache/Nginx + Zeek + Suricata HTTP; Suricata IDS passthrough; and auditd rules for reverse shells, setuid backdoors, sudoers/SSH/cron persistence, and /etc/shadow access.
OT/ICS detection (ATT&CK for ICS)
Modbus write/diagnostic, S7comm program-download/PLC-stop, DNP3 restart/disable-unsolicited, CIP set-attribute write, an IT-to-OT conduit-violation rule enforcing the Purdue/IEC 62443 zone model via cidr selections, and an OT-enumeration correlation — all tagged with T0NNN techniques.
Threat-intelligence enrichment
Matches every event's src/dst IPs (exact + CIDR), domains, hashes, and URLs — pulled from normalized fields, raw, and free-text message — against in-memory IOC feeds (file or http, line/CSV/JSON), raising a Threat Intelligence Match alert at the highest matched severity.
Coverage measurement & rule quality
A /coverage scoreboard measures ATT&CK Enterprise (~82 techniques), ICS (11), and ATLAS coverage by tactic/fidelity/data-source, with Navigator export and a CI rule-linter enforcing unique ids, valid level/fidelity, and an attack.*/atlas.* tag per rule.
Input hardening
Size-capped streamed uploads/API bodies, a version-stable JSON deep-nesting depth guard (rejected before json.loads), a decompression-bomb cap on gzip, CSV formula-injection neutralization, and fully parameterized whitelisted-column search/correlation SQL.
Auth, RBAC & audit
Built-in login with admin/analyst/viewer roles, pbkdf2 passwords, revocable server-side sessions, always-on security headers (X-Frame-Options DENY, nosniff, CSP frame-ancestors none), CSRF same-origin checks, a last-admin lockout guard, and an audit log of every sensitive action.

06Technology Stack

Language
Python 3.11–3.13
Web framework
FastAPI + Uvicorn, Jinja2 server-rendered UI (no JS build step, no chart library)
Database
PostgreSQL 16 via psycopg 3 (+ psycopg_pool), RANGE-partitioned with GIN full-text/jsonb indexes
Key dependencies
pyyaml (rules), python-dateutil (time parsing), python-multipart (uploads); anthropic optional for the AI copilot
Testing
pytest — 303 test functions across a DB-free unit tier and a real-Postgres integration tier
CI
GitHub Actions (.github/workflows/tests.yml): unit matrix on Python 3.11/3.12/3.13 + integration job against a Postgres 16 service container
Deployment
docker compose (Postgres + app) or local uvicorn; schema auto-created on startup
Auth/crypto
Stdlib-only pbkdf2 password hashing; AWS SigV4, OAuth2 client-credentials, and RS256 signed-JWT auth for collectors without SDKs

07Quick Start

$ docker compose up --build   # starts Postgres + the app, then open http://localhost:8000 and upload a file from samples/
$ export DB_DSN=postgresql://logocean:logocean@localhost:5432/logocean && uvicorn app.main:app --reload   # local run; schema auto-creates on startup
$ curl -X POST 'http://localhost:8000/api/v1/ingest?format=auto&filename=fw.log' -H 'X-API-Key: lo_...' --data-binary @fw.log   # HTTP ingest API
$ SYSLOG_ENABLED=true   # listen on UDP+TCP 5514, then point a collector/device at the syslog receiver
$ git clone https://github.com/SigmaHQ/sigma && python scripts/import_sigma.py --src sigma/rules --write   # import community rules, then restart to load
$ PYTHONPATH=. python -m pytest tests/ -m 'not integration' -q   # run the DB-free unit tier

08Compliance & Frameworks

MITRE ATT&CK (Enterprise + ICS)
Rules are ATT&CK-tagged; a /coverage scoreboard measures Enterprise (~82 techniques) and ICS (11) coverage with Navigator layer export.
MITRE ATLAS
Adversarial-AI matrix is scaffolded in the coverage scoreboard (0% until AI/LLM telemetry lands) as a forward-looking track.
NIST 800-53 & CIS v8
Each enterprise technique maps to NIST 800-53 and CIS Controls v8 on the /compliance page.
ISO 27001 / SOC 2 / PCI DSS / HIPAA
Technique-to-control mappings for ISO 27001 (2022 Annex A), SOC 2 TSC, PCI DSS v4, and HIPAA drive the compliance report.
IEC 62443-3-3
OT rule coverage maps to IEC 62443-3-3 System Requirements for the ICS technique set.
NERC CIP
OT/ICS detections map to NERC CIP standards (plus NIST 800-53) on the /compliance view.

09Integrations & Outputs

Ingest sources: Palo Alto, Fortinet, Cisco ASA/IOS/Meraki, Zeek, CrowdStrike, Windows/Sysmon, Linux auditd, Apache/Nginx, Suricata, AWS/GCP/Azure/M365/Entra/Okta/GitHub/GitLab, Nutanix, CEF/LEEF/syslog/JSONAgentless pull collectors: Okta, GitHub, GitLab, AWS CloudTrail, Microsoft Entra ID, Microsoft 365, GCP Cloud Audit LogsOT/ICS telemetry: Zeek + ICSNPP (Modbus/DNP3/S7comm/CIP/EtherNet-IP/BACnet)Notifications: Slack/Teams/Discord/generic webhook and SMTP emailResponse: webhook intents to SOAR/firewall/IAM endpoints with time-boxed auto-revertExports: MITRE ATT&CK Navigator layer JSON (Enterprise + ICS) and alerts CSV (formula-injection safe)Threat-intel feeds: local files or http(s) URLs in line/CSV/JSON formPush clients: clients/logocean_push.py (tool findings) and clients/logocean_import.py (bulk historical import)

Explore LogOcean

Full source, documentation, and deployment guides live on GitHub.