log-analysis
БесплатноБез исполняемых скриптовНе проверенCorrelate auth.log, syslog, journald, application, and web logs to detect brute force, privilege escalation, and lateral movement.
от jmagly★ 233 звезды на GitHubОб этом скилле
log-analysis
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.
Triggers
Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):
- "auth.log" / "syslog" → specific log file analysis
- "lateral movement" → log-based lateral movement detection
- "brute force" → authentication attack detection in logs
Purpose
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.
Behavior
When triggered, this skill:
Discover available log sources:
- Check for journald:
journalctl --disk-usage 2>/dev/null - Check for traditional syslog files:
/var/log/syslog,/var/log/messages - Check for auth logs:
/var/log/auth.log(Debian) or/var/log/secure(RHEL) - Check for web server logs:
/var/log/nginx/,/var/log/apache2/,/var/log/httpd/ - Check for application-specific logs:
/var/log/subdirectories - Record which sources are available and which are absent (absence is itself evidence)
- Check for journald:
Authentication log analysis:
- Extract all SSH authentication events:
grep -E 'sshd.*(Failed|Accepted|Invalid|Disconnected)' /var/log/auth.log - Count failed logins per source IP to detect brute force:
grep 'Failed password' /var/log/auth.log | awk '{print $(NF-3)}' | sort | uniq -c | sort -rn | head -20 - Extract successful logins after prior failures (credential stuffing success indicator)
- Parse sudo and su events: privilege escalation timing, escalating users, target users
- Extract all SSH authentication events:
Brute force pattern detection:
- Identify source IPs with > threshold failed attempts within a rolling time window
- Flag distributed brute force: multiple IPs, same username targets, compressed time window
- Check for password spraying: many usernames, few attempts each, from one or few IPs
- Flag successful login from an IP that previously generated failures (compromise indicator)
Privilege escalation analysis:
- Sudo usage:
grep sudo /var/log/auth.log | grep -v 'pam_unix\|session' - PAM events for su, sudo, and other elevation mechanisms
- setuid binary execution via process accounting if available:
lastcomm 2>/dev/null - Journal entries for systemd service unit changes by non-root users
- Sudo usage:
Lateral movement indicators:
- Internal SSH connections (source IP is RFC1918): logins from one internal host to another
- Service accounts authenticating interactively
- Accounts logging in from multiple source IPs within a short window
- Use of credential forwarding (SSH agent forwarding):
grep 'agent' /var/log/auth.log
Web access log analysis:
- Parse combined log format for common web attack patterns:
grep -E '\.(php|asp|aspx|jsp|cgi).*\?(.*=.*)(union|select|exec|eval|base64)' access.log - Detect directory traversal:
grep '\.\.\/' access.log - Detect webshell access patterns: repeated POST requests to static file paths
- Identify scanning activity: high request rate from single IP, 404 storms, UA strings matching known scanners
- Flag HTTP 200 responses to paths that should not exist
- Parse combined log format for common web attack patterns:
Syslog and journal correlation:
- Extract cron job execution events around suspicious times
- Find process start events correlating with authentication events
- Kernel OOM kills, segfaults, or coredumps near the incident window
- Network interface up/down events (potential persistence via network scripts)
Application log review:
- Database logs: failed authentication, unusual query patterns, bulk SELECT/export activity
- Mail server logs: outbound relay abuse, unusual recipient domains
- VPN/remote access logs: off-hours connections, unusual source geographies
- Custom application logs: error bursts, API authentication failures
SSH key fingerprint and session duration analysis:
- Extract accepted public key fingerprints:
grep "Accepted publickey" /var/log/auth.log | awk '{print $NF}' - Correlate session open/close events to compute session durations; flag sessions that never close (potential persistent shell)
- Distinguish opportunistic scanning (broad invalid-user lists) from targeted attacks (specific, plausible usernames) using invalid user enumeration counts
- Extract accepted public key fingerprints:
PAM tampering detection:
- Compare installed
/etc/pam.d/files against package manager originals usingdebsums(Debian) or `rp
- Compare installed
Установить log-analysis в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteGlobGrepFAQ
Что делает скилл log-analysis?
Correlate auth.log, syslog, journald, application, and web logs to detect brute force, privilege escalation, and lateral movement.
Как установить скилл log-analysis?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл log-analysis запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic