Skip to content

aniket2348823/vigilagent / .agents/skills/analyzing-linux-audit-logs-for-intrusion

analyzing-linux-audit-logs-for-intrusion

Flagged

Uses the Linux Audit framework (auditd) with ausearch and aureport utilities to detect intrusion attempts, unauthorized access, privilege escalation, and suspicious system activity. Covers audit rule configuration, log querying, timeline reconstruction, and integration with SIEM platforms. Activates for requests involving auditd analysis, Linux audit log investigation, ausearch queries, aureport summaries, or host-based intrusion detection on Linux.

FileKindSize
LICENSEother11.0 KB
SKILL.mdskill md9.5 KB
references/api-reference.mdmarkdown1.9 KB
scripts/agent.pyscript7.9 KB

references/api-reference.md

View on GitHub
# API Reference: Analyzing Linux Audit Logs for Intrusion

## Audit Log Location
```
/var/log/audit/audit.log
```

## ausearch CLI
```bash
# Search by key
ausearch -k file_access

# Search by message type
ausearch -m EXECVE

# Failed events only
ausearch --success no

# By user
ausearch -ua 1000

# CSV output for Python processing
ausearch --format csv > audit_events.csv

# By time range
ausearch --start today --end now
ausearch --start 01/15/2025 00:00:00 --end 01/16/2025 00:00:00
```

## aureport CLI
```bash
# Summary report
aureport --summary

# Authentication report
aureport -au

# Failed events
aureport --failed

# Executable report
aureport -x

# File access report
aureport -f

# Anomaly report
aureport --anomaly
```

## Audit Rules (auditctl)
```bash
# Monitor sensitive files
auditctl -w /etc/passwd -p rwxa -k passwd_access
auditctl -w /etc/shadow -p rwxa -k shadow_access
auditctl -w /etc/sudoers -p rwxa -k sudoers_access

# Monitor privilege escalation
auditctl -a always,exit -F arch=b64 -S execve -F euid=0 -F uid!=0 -k priv_esc

# Monitor module loading
auditctl -a always,exit -F arch=b64 -S init_module -S finit_module -k modules

# Monitor network connections
auditctl -a always,exit -F arch=b64 -S connect -k network_connect
```

## Audit Log Fields
| Field | Description |
|-------|------------|
| type | Event type (SYSCALL, PATH, EXECVE, USER_CMD) |
| msg | audit(timestamp:event_id) |
| syscall | System call number |
| uid/euid | User ID / Effective UID |
| comm | Command name |
| exe | Executable path |
| key | Audit rule key |
| success | yes/no |
| name | File path (in PATH records) |

## Suspicious Syscalls
| Syscall | Concern |
|---------|---------|
| execve | Program execution |
| ptrace | Process debugging/injection |
| init_module | Kernel rootkit loading |
| connect | Outbound connection |
| setuid | Privilege change |
| open_by_handle_at | Container escape |
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall