mukul975/anthropic-cybersecurity-skills/analyzing-linux-audit-logs-for-intrusion
Claude Code and agent skill by mukul975/anthropic-cybersecurity-skills
- community
Checking that the SKILL.md file is still in the repository.
'Uses the Linux Audit framework (auditd) with ausearch and aureport utilities
Install
npx vskill@latest install mukul975/anthropic-cybersecurity-skills/analyzing-linux-audit-logs-for-intrusionSKILL.md
The same SKILL.md was published earlier as mukul975/anthropic-cybersecurity-skills/analyzing-linux-audit-logs-for-intrusion.
Analyzing Linux Audit Logs for Intrusion
When to Use
- Investigating suspected unauthorized access or privilege escalation on Linux hosts
- Hunting for evidence of exploitation, backdoor installation, or persistence mechanisms
- Auditing compliance with security baselines (CIS, STIG, PCI-DSS) that require system call monitoring
- Reconstructing a timeline of attacker actions during incident response
- Detecting file tampering on critical system files such as
/etc/passwd,/etc/shadow, or SSH keys
Do not use for network-level intrusion detection; use Suricata or Zeek for network traffic analysis. Auditd operates at the kernel level on individual hosts.
Prerequisites
- Linux system with
auditdpackage installed and the audit daemon running (systemctl status auditd) - Root or sudo access to configure audit rules and query logs
- Audit rules deployed via
/etc/audit/rules.d/*.rulesor loaded withauditctl - Recommended: Neo23x0/auditd ruleset from GitHub for comprehensive baseline coverage
- Familiarity with Linux syscalls (
execve,open,connect,ptrace, etc.) - Log storage with sufficient retention (default location:
/var/log/audit/audit.log)
Workflow
Step 1: Verify Audit Daemon Status and Configuration
Confirm the audit system is running and check the current rule set:
If the backlog limit is being reached, increase it:
Step 2: Deploy Intrusion-Focused Audit Rules
Add rules that target common intrusion indicators. Place these in /etc/audit/rules.d/intrusion.rules:
Reload rules after editing:
Step 3: Search for Intrusion Indicators with ausearch
Use ausearch to query the audit log for specific events:
Step 4: Generate Summary Reports with aureport
Use aureport to produce aggregate summaries for triage:
Step 5: Reconstruct the Attack Timeline
Combine ausearch queries to build a chronological narrative:
Step 6: Forward Audit Logs to SIEM
Configure audisp-remote or auditbeat to ship logs to a central SIEM for correlation:
Key Concepts
| Term | Definition | |
|---|---|---|
| auditd | The Linux Audit daemon that receives audit events from the kernel and writes them to /var/log/audit/audit.log | |
| auditctl | Command-line utility to control the audit system: add/remove rules, check status, set backlog size | |
| ausearch | Query tool that searches audit logs by message type, user, file, key, time range, or event ID | |
| aureport | Reporting tool that generates aggregate summaries of audit events for triage and compliance | |
| audit rule key (-k) | A user-defined label attached to an audit rule, enabling fast filtering of related events with ausearch and aureport | |
| syscall auditing | Kernel-level monitoring of system calls (execve, open, connect, ptrace) that captures process and file activity | |
| augenrules | Utility that merges all files in /etc/audit/rules.d/ into /etc/audit/audit.rules and loads them into the kernel |
Verification
- [ ] auditd is running and rules are loaded (
auditctl -lreturns expected rule count) - [ ] No audit backlog overflow (
auditctl -sshowsbacklog: 0or low value, lost: 0) - [ ] ausearch returns events for each custom key (
ausearch -k <key> -ts todayreturns results) - [ ] aureport generates non-empty summaries for authentication, executable, and file events
- [ ] Timeline reconstruction produces a coherent chronological sequence of attacker actions
- [ ] Critical file watches trigger alerts on test modifications (
touch /etc/shadowgenerates an event) - [ ] Logs are forwarding to central SIEM (verify with a test event and confirm receipt)
- [ ] Audit rules persist across reboot (rules in
/etc/audit/rules.d/, not only viaauditctl)
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/analyzing-linux-audit-logs-for-intrusion/SKILL.md
Popularity
- Repository stars
- 33,550
- Repository forks
- 4,069
- 7-day trend score
- 52
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mukul975/anthropic-cybersecurity-skills/analyzing-linux-audit-logs-for-intrusion)