agentic/code/frameworks/forensics-complete/skills/log-analysis/SKILL.md
Correlate auth.log, syslog, journald, application, and web logs to detect brute force, privilege escalation, and lateral movement.
npx skillsauth add jmagly/aiwg log-analysisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Correlates log data from multiple sources to identify attacker activity patterns including brute force login attempts, credential stuffing, privilege escalation, lateral movement, and data exfiltration. Adapts to log availability on the target system and produces a structured timeline of suspicious events.
Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):
Individual log sources tell fragments of a story. Correlating authentication logs, process accounting, web access logs, and application logs reveals the full attack chain: initial access method, persistence establishment, privilege escalation path, and lateral movement targets. This skill assembles those fragments into a coherent timeline.
When triggered, this skill:
Discover available log sources:
journalctl --disk-usage 2>/dev/null/var/log/syslog, /var/log/messages/var/log/auth.log (Debian) or /var/log/secure (RHEL)/var/log/nginx/, /var/log/apache2/, /var/log/httpd//var/log/ subdirectoriesAuthentication log analysis:
grep -E 'sshd.*(Failed|Accepted|Invalid|Disconnected)' /var/log/auth.log
grep 'Failed password' /var/log/auth.log | awk '{print $(NF-3)}' | sort | uniq -c | sort -rn | head -20
Brute force pattern detection:
Privilege escalation analysis:
grep sudo /var/log/auth.log | grep -v 'pam_unix\|session'lastcomm 2>/dev/nullLateral movement indicators:
grep 'agent' /var/log/auth.logWeb access log analysis:
grep -E '\.(php|asp|aspx|jsp|cgi).*\?(.*=.*)(union|select|exec|eval|base64)' access.log
grep '\.\.\/' access.logSyslog and journal correlation:
Application log review:
SSH key fingerprint and session duration analysis:
grep "Accepted publickey" /var/log/auth.log | awk '{print $NF}'PAM tampering detection:
/etc/pam.d/ files against package manager originals using debsums (Debian) or rpm -V pam (RHEL); modifications are a persistence indicatorpam_exec entries or module paths outside /lib/security/ or /lib64/security/.so files not owned by any package to surface injected modulesBtmp and lastb failed login analysis:
lastb to enumerate IPs and accounts targetedcomm -12 to identify IPs that eventually succeeded — the strongest brute force confirmation patternWindows Event Log correlation:
LogonType values: Type 3 (network) and Type 10 (RDP) from unexpected sources indicate lateral movementTargetUserName and IpAddress; distinguish SubStatus 0xC000006A (wrong password) from 0xC0000064 (non-existent account)Cloud log parsing:
eventName, sourceIPAddress, and userIdentity; flag DeleteTrail, StopLogging, and AssumeRole with unusual session namesoperationName, caller, and correlationId; flag Microsoft.Authorization/roleAssignments/write and bulk permission changesmethodName, principalEmail, and resourceName; flag SetIamPolicy, CreateServiceAccount, and CreateServiceAccountKey eventsTimeline construction:
.aiwg/forensics/findings/<hostname>-log-analysis.mdanalyze logs
auth log analysis /var/log/auth.log
log forensics --from "2026-02-01 00:00:00" --to "2026-02-15 23:59:59"
.aiwg/forensics/findings/<hostname>-log-analysis.md.aiwg/forensics/timelines/<hostname>-log-timeline.md.aiwg/forensics/iocs/<hostname>-log-iocs.txtlog_analysis:
brute_force_threshold: 10
brute_force_window_minutes: 5
spray_threshold_users: 5
web_log_paths:
- /var/log/nginx/access.log
- /var/log/apache2/access.log
- /var/log/httpd/access_log
timeline_timezone: UTC
severity_levels:
- INFO
- SUSPICIOUS
- MALICIOUS
data-ai
Report which research-corpus radar sidecars are overdue for refresh. Computes staleness (days since last refresh vs the cadence window) for every radar, sorted most-overdue-first. Runs via `aiwg corpus radar-status`.
data-ai
Aggregate research-corpus radar sidecars into a corpus or per-cluster freshness report — totals, overdue count, per-cluster / per-GRADE / per-trajectory breakdowns, an overdue table, and per-radar rationale snippets. Runs via `aiwg corpus radar-report`.
testing
Scaffold radar/freshness sidecars for research-corpus REFs. Pulls title/authors from the citation sidecar and GRADE from the analysis doc, defaults the refresh cadence from GRADE and the cluster from a corpus-local map, and stamps documentation/radar/REF-XXX-radar.md. Runs via `aiwg corpus radar-init`.
data-ai
Compute an entity's publication trajectory — per-year paper counts, topic drift, hot-streak detection (≥3 consecutive A-grade years), and career phase. Runs via `aiwg corpus profile-temporal`.