Skip to content

Commit 79ce963

Browse files
author
vsilent
committed
Audit, analyze syslog, new detectors, sniff command enriched
1 parent 1a6ed9b commit 79ce963

14 files changed

Lines changed: 2409 additions & 16 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ bollard = "0.16"
4949

5050
# HTTP client (for LLM API)
5151
reqwest = { version = "0.12", default-features = false, features = ["json", "blocking", "rustls-tls"] }
52+
sha2 = "0.10"
5253

5354
# Compression
5455
zstd = "0.13"

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
- **📊 Real-time Monitoring** — eBPF-based syscall monitoring with minimal overhead (<5% CPU)
2121
- **🔍 Log Sniffing** — Discover, read, and AI-summarize logs from containers and system files
22+
- **🧭 Detector Framework** — Rust-native detector registry for web attack heuristics and outbound exfiltration indicators
2223
- **🤖 AI/ML Detection** — Candle-powered anomaly detection + OpenAI/Ollama log analysis
2324
- **🚨 Alert System** — Multi-channel notifications (Slack, email, webhook)
2425
- **🔒 Automated Response** — nftables/iptables firewall, container quarantine
@@ -179,6 +180,14 @@ cargo run -- sniff --consume --output ./log-archive
179180
cargo run -- sniff --sources "/var/log/myapp.log,/opt/service/logs"
180181
```
181182

183+
The built-in sniff pipeline now includes Rust-native detectors for:
184+
185+
- web attack indicators such as SQL injection probes, path traversal probes, login brute force, and webshell-style requests
186+
- exfiltration-style indicators such as suspicious SMTP/attachment activity and large outbound transfer hints in logs
187+
- reverse shell behavior, sensitive file access, cloud metadata / SSRF access, exfiltration chains, and secret leakage in logs
188+
- Wazuh-inspired file integrity monitoring for explicit paths configured with `STACKDOG_FIM_PATHS=/etc/ssh/sshd_config,/app/.env`
189+
- Wazuh-inspired configuration assessment via `STACKDOG_SCA_PATHS`, package inventory heuristics via `STACKDOG_PACKAGE_INVENTORY_PATHS`, Docker posture audits, and improved RFC3164/RFC5424 syslog parsing
190+
182191
### Use as Library
183192

184193
Add to your `Cargo.toml`:

src/database/connection.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,24 @@ pub fn init_database(pool: &DbPool) -> Result<()> {
188188
[],
189189
);
190190

191+
conn.execute(
192+
"CREATE TABLE IF NOT EXISTS file_integrity_baselines (
193+
path TEXT PRIMARY KEY,
194+
file_type TEXT NOT NULL,
195+
sha256 TEXT NOT NULL,
196+
size_bytes INTEGER NOT NULL,
197+
readonly INTEGER NOT NULL,
198+
modified_at INTEGER NOT NULL,
199+
updated_at TEXT NOT NULL
200+
)",
201+
[],
202+
)?;
203+
204+
let _ = conn.execute(
205+
"CREATE INDEX IF NOT EXISTS idx_file_integrity_updated_at ON file_integrity_baselines(updated_at)",
206+
[],
207+
);
208+
191209
conn.execute(
192210
"CREATE TABLE IF NOT EXISTS ip_offenses (
193211
id TEXT PRIMARY KEY,

0 commit comments

Comments
 (0)