# nidusvespae/liao-ioc-timeline architecture

> Architecture diagram of the GitHub repository nidusvespae/liao-ioc-timeline, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nidusvespae/liao-ioc-timeline
- Repository: https://github.com/nidusvespae/liao-ioc-timeline

## Overview

Liao is a self-checking Linux host-inspection toolkit, scheduled every six hours. Its main workflow collects host telemetry and baseline comparisons into a case folder, then assembles events—including off-host DNS findings—into a correlated timeline. A phone-side verifier independently checks case-reported toolkit hashes against an off-host trust anchor; review scripts summarize the resulting case. The README documents pipeline wiring, while sampled source confirms timeline feeder calls and review-file reads. Collector-to-analyzer details and several integration points are therefore represented only where documented.

Main entry points: [`liao/collect_case.sh`](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/collect_case.sh) (Case collector), [`liao/ioc_timeline.py`](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/ioc_timeline.py) (IOC timeline), [`liao/assemble_case.sh`](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/assemble_case.sh) (Case assembler), [`systemd/liao-collect.service`](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/systemd/liao-collect.service) (Collector service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_schedule["Scheduling"]
  node_timer["Six-hour timer"]
  node_collect_service["Collector service"]
  node_assemble_service["Assembler service"]
end

subgraph group_collection["Host collection"]
  node_collector["Case collector<br/>[collect_case.sh]"]
  node_case[("Case folder")]
  node_baselines[("Host baselines")]
  node_fim["File integrity<br/>[fim.py]"]
  node_persistence["Persistence audit"]
  node_accounts["Account audit<br/>[account_audit.py]"]
  node_log_integrity["Log integrity<br/>[log_integrity.py]"]
  node_log_parser["Auth log analysis<br/>[log_parser.py]"]
  node_proc["Process inventory<br/>[proc_inventory.py]"]
  node_connections["Socket inventory<br/>[conn_inventory.py]"]
end

subgraph group_analysis["Analysis and timeline"]
  node_dns_log["Off-host DNS log"]
  node_assembler["Case assembler<br/>[assemble_case.sh]"]
  node_dns["DNS analysis<br/>[dns_parser.py]"]
  node_timeline["IOC timeline<br/>[ioc_timeline.py]"]
  node_rep["Reputation lookup<br/>[rep_lookup.py]"]
end

subgraph group_trust["Trust verification"]
  node_verifier["Phone verifier<br/>[verify_case.py]"]
  node_anchor_verifier["Anchor verifier"]
  node_anchor["Off-host anchor"]
end

subgraph group_review["Case review"]
  node_case_summary["Case summary<br/>[review_case.py]"]
  node_detail_review["Detail review<br/>[review_detail.py]"]
end

node_phone(("Phone operator"))
node_reviewer(("Case reviewer"))

node_timer -->|"triggers"| node_collect_service
node_collect_service -->|"runs"| node_collector
node_collector -->|"collects hashes"| node_fim
node_collector -->|"collects and diffs"| node_persistence
node_collector -->|"collects and diffs"| node_accounts
node_collector -->|"collects and diffs"| node_log_integrity
node_collector -->|"collects auth log"| node_log_parser
node_collector -->|"collects processes"| node_proc
node_collector -->|"collects sockets"| node_connections
node_baselines -->|"provides references"| node_collector
node_collector -->|"writes findings"| node_case
node_collect_service -->|"on success"| node_assemble_service
node_assemble_service -->|"runs"| node_assembler
node_dns_log -->|"provides logs"| node_assembler
node_assembler -->|"assembles in"| node_case
node_timeline -->|"calls audit"| node_persistence
node_timeline -->|"calls analysis"| node_dns
node_assembler -->|"runs assembler"| node_timeline
node_timeline -->|"writes timeline"| node_case
node_dns -.->|"optional lookup"| node_rep
node_phone -->|"runs"| node_verifier
node_case -->|"supplies hashes"| node_verifier
node_anchor -->|"supplies manifest"| node_verifier
node_phone -->|"checks anchor"| node_anchor_verifier
node_anchor -->|"is verified"| node_anchor_verifier
node_reviewer -->|"runs"| node_case_summary
node_reviewer -->|"runs"| node_detail_review
node_case -->|"reads case files"| node_case_summary
node_case -->|"reads findings"| node_detail_review

click node_timer "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/systemd/liao-timeline.timer"
click node_collect_service "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/systemd/liao-collect.service"
click node_assemble_service "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/systemd/liao-assemble.service"
click node_collector "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/collect_case.sh"
click node_fim "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/fim.py"
click node_persistence "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/persistence_audit.py"
click node_accounts "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/account_audit.py"
click node_log_integrity "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/log_integrity.py"
click node_log_parser "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/log_parser.py"
click node_proc "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/proc_inventory.py"
click node_connections "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/conn_inventory.py"
click node_assembler "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/assemble_case.sh"
click node_dns "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/dns_parser.py"
click node_timeline "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/ioc_timeline.py"
click node_rep "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/rep_lookup.py"
click node_verifier "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/phone/verify_case.py"
click node_anchor_verifier "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/phone/verify_anchor_tar.py"
click node_case_summary "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/tools/review_case.py"
click node_detail_review "https://github.com/nidusvespae/liao-ioc-timeline/blob/main/tools/review_detail.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_timer,node_collect_service,node_assemble_service,node_reviewer toneBlue
class node_collector,node_case,node_baselines,node_fim,node_persistence,node_accounts,node_log_integrity,node_log_parser,node_proc,node_connections toneAmber
class node_dns_log,node_assembler,node_dns,node_timeline,node_rep toneMint
class node_verifier,node_anchor_verifier,node_anchor toneRose
class node_case_summary,node_detail_review,node_phone toneIndigo
```

## Components

### Scheduling

- [Six-hour timer](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/systemd/liao-timeline.timer): `systemd/liao-timeline.timer`
- [Collector service](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/systemd/liao-collect.service): `systemd/liao-collect.service`
- [Assembler service](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/systemd/liao-assemble.service): `systemd/liao-assemble.service`

### Host collection

- [Case collector](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/collect_case.sh): `liao/collect_case.sh`
- **Case folder**
- **Host baselines**
- [File integrity](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/fim.py): `liao/fim.py`
- [Persistence audit](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/persistence_audit.py): `liao/persistence_audit.py`
- [Account audit](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/account_audit.py): `liao/account_audit.py`
- [Log integrity](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/log_integrity.py): `liao/log_integrity.py`
- [Auth log analysis](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/log_parser.py): `liao/log_parser.py`
- [Process inventory](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/proc_inventory.py): `liao/proc_inventory.py`
- [Socket inventory](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/conn_inventory.py): `liao/conn_inventory.py`

### Analysis and timeline

- **Off-host DNS log**
- [Case assembler](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/assemble_case.sh): `liao/assemble_case.sh`
- [DNS analysis](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/dns_parser.py): `liao/dns_parser.py`
- [IOC timeline](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/ioc_timeline.py): `liao/ioc_timeline.py`
- [Reputation lookup](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/liao/rep_lookup.py): `liao/rep_lookup.py`

### Trust verification

- [Phone verifier](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/phone/verify_case.py): `phone/verify_case.py`
- [Anchor verifier](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/phone/verify_anchor_tar.py): `phone/verify_anchor_tar.py`
- **Off-host anchor**

### Case review

- [Case summary](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/tools/review_case.py): `tools/review_case.py`
- [Detail review](https://github.com/nidusvespae/liao-ioc-timeline/blob/main/tools/review_detail.py): `tools/review_detail.py`

### Other components

- **Phone operator**
- **Case reviewer**

## Connections

- Six-hour timer → Collector service: triggers (evidence: `README.md`)
- Collector service → Case collector: runs (evidence: `README.md`)
- Case collector → File integrity: collects hashes (evidence: `README.md`)
- Case collector → Persistence audit: collects and diffs (evidence: `README.md`)
- Case collector → Account audit: collects and diffs (evidence: `README.md`)
- Case collector → Log integrity: collects and diffs (evidence: `README.md`)
- Case collector → Auth log analysis: collects auth log (evidence: `README.md`)
- Case collector → Process inventory: collects processes (evidence: `README.md`)
- Case collector → Socket inventory: collects sockets (evidence: `README.md`)
- Host baselines → Case collector: provides references (evidence: `README.md`)
- Case collector → Case folder: writes findings (evidence: `README.md`)
- Collector service → Assembler service: on success (evidence: `README.md`)
- Assembler service → Case assembler: runs (evidence: `README.md`)
- Off-host DNS log → Case assembler: provides logs (evidence: `README.md`)
- Case assembler → Case folder: assembles in (evidence: `README.md`)
- IOC timeline → Persistence audit: calls audit (evidence: `liao/ioc_timeline.py`)
- IOC timeline → DNS analysis: calls analysis (evidence: `liao/ioc_timeline.py`)
- Case assembler → IOC timeline: runs assembler (evidence: `README.md`)
- IOC timeline → Case folder: writes timeline (evidence: `README.md`)
- DNS analysis → Reputation lookup: optional lookup (evidence: `README.md`)
- Phone operator → Phone verifier: runs (evidence: `README.md`)
- Case folder → Phone verifier: supplies hashes (evidence: `phone/verify_case.py`)
- Off-host anchor → Phone verifier: supplies manifest (evidence: `phone/verify_case.py`)
- Phone operator → Anchor verifier: checks anchor (evidence: `README.md`)
- Off-host anchor → Anchor verifier: is verified (evidence: `phone/verify_anchor_tar.py`)
- Case reviewer → Case summary: runs (evidence: `tools/review_case.py`)
- Case reviewer → Detail review: runs (evidence: `tools/review_detail.py`)
- Case folder → Case summary: reads case files (evidence: `tools/review_case.py`)
- Case folder → Detail review: reads findings (evidence: `tools/review_detail.py`)
