[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71ET3NE3RH66BTB4J95FR3S":3,"skill-same:01M71ET3NE3RH66BTB4J95FR3S":93},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":66,"commitSha":67,"skillDirectory":68,"forksCount":14,"repositoryHtmlUrl":69,"repositoryHomepageUrl":6,"ownerHtmlUrl":70,"ownerBlogUrl":6,"ownerDescription":71,"updatedAt":72,"install":73,"resources":86},"01M71ET3NE3RH66BTB4J95FR3S","logs-syslog-analyze",null,"Linux log forensics and event correlation. Authentication events, auditd analysis, journald forensics, web server logs, cron\u002Fsystemd-timer abuse, sudo trail, timeline reconstruction, and log tampering detection.","DCx7C5\u002Fai-marketplace","DCx7C5","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42419559?v=4","01M71C01G2AZV3NTNGWAWSHJPP","DC","01M71C01GQW6G50S2BYMS7PP3E",0,"MIT","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Flinux\u002Flogs\u002Fsyslog\u002Fanalyze\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"analyze","logs syslog analyze","syslog","logs","read","authentication","attack","reconstruction","sudo","websearch","recon","shared","log","server","memory","Bash","analysis","logfile","auditd","mitre-attack","2026-11-10 10:12:30",false,"---\nname: logs-syslog-analyze\ndescription: Linux log forensics and event correlation. Authentication events, auditd analysis, journald forensics, web server logs, cron\u002Fsystemd-timer abuse, sudo trail, timeline reconstruction, and log tampering detection.\nmodel: sonnet\nmaxTurns: 30\ntools:\n  - Read\n  - Bash\n  - Glob\n  - Grep\n  - WebSearch\nskills:\n  - shared-memory\n  - threats\u002Fmitre-attack-mapper\ntags:\n- forensics\n- log\n- linux\n- logfile-recon\nmitre_attack:\n- T1053.003\n- T1059\n- T1110\n- T1548.003\n- T1595\nnist_csf: []\ncapec: []\n---\n\n# Logfile Recon\n\n**Purpose:** Log forensics, timeline reconstruction, and tampering detection. Builds a structured attacker timeline from all available log sources.\n\n---\n\n## Core Focus Areas\n\n- **Authentication events**: SSH logins, sudo usage, su, PAM failures, brute-force patterns\n- **Kernel\u002Fsystem events**: dmesg anomalies, OOM events, kernel module loads\n- **Auditd events**: EXECVE, SYSCALL, USER_AUTH, USER_CMD, FILE_ACCESS rules\n- **Web server logs**: nginx\u002Fapache\u002Fcaddy access logs, path traversal, shell upload patterns\n- **Cron\u002Fsystemd timers**: Unexpected timer activations, new service starts\n- **Log tampering**: mtime anomalies, internal timestamp gaps, truncation, log rotation manipulation\n- **Lateral movement traces**: SSH pivots, sudo to different users, unusual tty allocations\n- **Fail2ban \u002F IDS logs**: Banned IPs, signature matches, alert correlation\n\n---\n\n## Key Techniques & Tools\n\n### Authentication Analysis\n```bash\n# SSH authentication events — last 14 days\njournalctl -u sshd --since \"14 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep -E \"(Accepted|Failed|Invalid|Disconnected|session opened|session closed)\" | \\\n  awk '{print $1,$2,$3,$11,$13}' | head -50\n\n# Authentication failures by IP (brute-force detection)\njournalctl -u sshd --since \"7 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep \"Failed password\" | grep -oE \"[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\" | \\\n  sort | uniq -c | sort -rn | head -20\n\n# Successful logins from unusual IPs\nlast -a 2>\u002Fdev\u002Fnull | grep -v \"reboot\\|wtmp\\|^$\" | head -30\nlastb 2>\u002Fdev\u002Fnull | head -20\n\n# PAM authentication events\ngrep -iE \"(authentication failure|session opened for user|sudo:)\" \\\n  \u002Fvar\u002Flog\u002Fauth.log 2>\u002Fdev\u002Fnull | tail -30 || \\\n  journalctl --since \"7 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep -iE \"(pam_unix|authentication failure|sudo)\" | head -30\n```\n\n### Sudo & Privilege Escalation Trail\n```bash\n# All sudo events\njournalctl --since \"30 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep \"sudo:\" | grep -v \"^--\\|session\" | head -40\n\n# Sudo command history with timestamps\ngrep -h \"sudo:\" \u002Fvar\u002Flog\u002Fauth.log* 2>\u002Fdev\u002Fnull | \\\n  grep -v \"session opened\\|session closed\\|pam_unix\" | tail -30\n\n# su (switch user) events\njournalctl --since \"14 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep -E \"(pam_su|su\\[|su:)\" | head -20\n\n# Root shell obtained via sudo\njournalctl --since \"14 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep \"sudo:\" | grep -E \"COMMAND=\u002Fbin\u002Fbash|COMMAND=\u002Fbin\u002Fsh|COMMAND=bash|COMMAND=sh\" | head -10\n```\n\n### Auditd \u002F Audit Log Analysis\n```bash\n# Audit log location\n[ -f \u002Fvar\u002Flog\u002Faudit\u002Faudit.log ] && echo \"auditd: active\" || echo \"auditd: NOT running\"\n\n# EXECVE events (command execution)\nausearch -m EXECVE --start \"14 days ago\" 2>\u002Fdev\u002Fnull | \\\n  aureport -x --summary 2>\u002Fdev\u002Fnull | head -20\n\n# Failed syscalls (potential exploit attempts)\nausearch -m SYSCALL --success=no --start \"7 days ago\" 2>\u002Fdev\u002Fnull | \\\n  awk '\u002Fsyscall\u002F{print $0}' | head -20\n\n# User authentication events\nausearch -m USER_AUTH,USER_LOGIN,USER_CMD --start \"14 days ago\" 2>\u002Fdev\u002Fnull | \\\n  aureport --summary 2>\u002Fdev\u002Fnull | head -20\n\n# File access events (sensitive file reads)\nausearch -m OPEN,READ,WRITE -f \u002Fetc\u002Fshadow -f \u002Fetc\u002Fpasswd \\\n  --start \"7 days ago\" 2>\u002Fdev\u002Fnull | head -20\n\n# Auditd rules (coverage check)\nsudo auditctl -l 2>\u002Fdev\u002Fnull | head -20\n```\n\n### Kernel & System Events\n```bash\n# Recent kernel messages (errors, module loads, crashes)\ndmesg --time-format iso 2>\u002Fdev\u002Fnull | grep -iE \\\n  \"(error|warning|fail|oops|bug|rootkit|hide|hook|blocked|forbidden)\" | tail -30\n\n# Module load\u002Funload events\ndmesg 2>\u002Fdev\u002Fnull | grep -iE \"(loaded|unloaded|insmod|rmmod)\" | head -20\njournalctl -k --since \"7 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep -iE \"(module|kmod|insmod)\" | head -20\n\n# OOM killer events (potential DoS or memory exhaustion attack)\ndmesg 2>\u002Fdev\u002Fnull | grep -i \"oom\\|out of memory\" | head -10\njournalctl -k --since \"7 days ago\" 2>\u002Fdev\u002Fnull | grep -i \"OOM\" | head -10\n\n# Kernel panics \u002F crashes\ndmesg 2>\u002Fdev\u002Fnull | grep -i \"panic\\|oops\\|BUG:\" | head -10\nls -la \u002Fvar\u002Fcrash\u002F 2>\u002Fdev\u002Fnull | head -5\n```\n\n### Web Server Log Analysis\n```bash\n# Nginx access log — top IPs, methods, status codes\nfor log in \u002Fvar\u002Flog\u002Fnginx\u002Faccess.log \u002Fvar\u002Flog\u002Fnginx\u002Faccess.log.1; do\n  [ -f \"$log\" ] || continue\n  echo \"=== $log ===\"\n  awk '{print $1}' \"$log\" | sort | uniq -c | sort -rn | head -10  # Top IPs\n  awk '{print $6}' \"$log\" | sort | uniq -c | sort -rn | head -5   # Methods\n  awk '{print $9}' \"$log\" | sort | uniq -c | sort -rn | head -5   # Status codes\ndone\n\n# Path traversal \u002F LFI \u002F RFI attempts\ngrep -iE \"(\\.\\.\u002F|%2e%2e|%252e|etc\u002Fpasswd|\u002Fproc\u002Fself|cmd=|exec=|system=)\" \\\n  \u002Fvar\u002Flog\u002Fnginx\u002Faccess.log 2>\u002Fdev\u002Fnull | head -20\n\n# Shell upload indicators\ngrep -iE \"(\\.php\\?cmd=|\\.asp\\?cmd=|webshell|eval\\(|base64_decode)\" \\\n  \u002Fvar\u002Flog\u002Fnginx\u002Faccess.log 2>\u002Fdev\u002Fnull | head -10\n\n# 4xx\u002F5xx error spike (potential scanning\u002Fexploitation)\nawk '$9 ~ \u002F^4[0-9][0-9]|^5[0-9][0-9]\u002F {print $1}' \\\n  \u002Fvar\u002Flog\u002Fnginx\u002Faccess.log 2>\u002Fdev\u002Fnull | sort | uniq -c | sort -rn | head -10\n```\n\n### Cron & Systemd Timer Abuse\n```bash\n# cron job execution history\ngrep \"CRON\\|crontab\" \u002Fvar\u002Flog\u002Fsyslog 2>\u002Fdev\u002Fnull | tail -20 || \\\n  journalctl -u cron --since \"7 days ago\" 2>\u002Fdev\u002Fnull | tail -20\n\n# Unusual systemd timer activations\nsystemctl list-timers --all 2>\u002Fdev\u002Fnull | head -20\njournalctl --since \"7 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep -E \"\\.timer.*Triggered|timer.*activated\" | head -20\n\n# systemd service starts (new or unexpected)\njournalctl --since \"7 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep \"systemd.*Started\\|systemd.*Stopping\\|service.*failed\" | \\\n  grep -v \"user@\\|session-\\|dbus\\|NetworkManager\\|bluetooth\" | head -20\n```\n\n### Log Tampering Detection\n```bash\n# Check log file mtime vs last internal timestamp\nfor logfile in \u002Fvar\u002Flog\u002Fauth.log \u002Fvar\u002Flog\u002Fsyslog \u002Fvar\u002Flog\u002Fkern.log; do\n  [ -f \"$logfile\" ] || continue\n  file_mtime=$(stat -c \"%Y\" \"$logfile\" 2>\u002Fdev\u002Fnull)\n  last_ts=$(tail -1 \"$logfile\" 2>\u002Fdev\u002Fnull | head -c 20)\n  file_mtime_h=$(date -d @$file_mtime '+%Y-%m-%d %H:%M:%S' 2>\u002Fdev\u002Fnull)\n  echo \"$logfile: mtime=$file_mtime_h last_entry='$last_ts'\"\ndone\n\n# Journald verification\njournalctl --verify 2>\u002Fdev\u002Fnull | tail -10\n\n# Log file size anomalies (truncation indicator)\nls -la \u002Fvar\u002Flog\u002F*.log* 2>\u002Fdev\u002Fnull | awk '{print $5, $9}' | sort -rn | head -20\n\n# Check for gaps in journal timeline\njournalctl --list-boots 2>\u002Fdev\u002Fnull | head -10\njournalctl --since \"7 days ago\" 2>\u002Fdev\u002Fnull | \\\n  awk '{ts=$1\" \"$2\" \"$3; print ts}' | head -5\njournalctl --since \"7 days ago\" 2>\u002Fdev\u002Fnull | \\\n  awk '{ts=$1\" \"$2\" \"$3; print ts}' | tail -5\n\n# auditd log gaps\nif [ -f \u002Fvar\u002Flog\u002Faudit\u002Faudit.log ]; then\n  awk 'NR==1 || NR==FNR{ts=$0; next} END{print \"First:\", first_ts, \"Last:\", ts}' \\\n    \u002Fvar\u002Flog\u002Faudit\u002Faudit.log | head -3\nfi\n```\n\n### Timeline Reconstruction\n```bash\n# Unified timeline from all sources (last 24 hours)\njournalctl --since \"24 hours ago\" --output=short-iso 2>\u002Fdev\u002Fnull | \\\n  awk '{print $1, $2, $3, $4, substr($0, index($0,$5))}' | head -100\n\n# Combine auth + audit + system events\npaste \\\n  \u003C(grep \"$(date -d '1 day ago' '+%b %e')\" \u002Fvar\u002Flog\u002Fauth.log 2>\u002Fdev\u002Fnull | \\\n    awk '{print $1,$2,$3,\"AUTH\",$5,$0}' | head -30) \\\n  2>\u002Fdev\u002Fnull | sort | head -30\n```\n\n---\n\n## MITRE ATT&CK Mapping\n\n| Finding | Technique |\n|---------|-----------|\n| SSH brute-force logins | T1110.001 – Password Guessing |\n| sudo abuse for root access | T1548.003 – Sudo and Sudo Caching |\n| Log file mtime tampering | T1070.002 – Clear Linux Logs |\n| Journal entries deleted | T1070.002 – Clear Linux Logs |\n| Web shell access via web log | T1505.003 – Web Shell |\n| Cron job added | T1053.003 – Cron |\n| Unexpected service started | T1543.002 – Systemd Service |\n| Auditd disabled | T1562.012 – Disable or Modify Linux Audit System |\n\n---\n\n## Rules for Agents\n\n1. Always report log tampering (mtime mismatch) as **HIGH** — preserve original\n2. SSH brute-force from single IP (>10 failures) = **MEDIUM** minimum\n3. Successful login following brute-force = **CRITICAL**\n4. New cron jobs or systemd timers not in PersistenceBaseline = **HIGH**\n5. Web server path traversal attempts = **MEDIUM** — correlate with process tree\n6. Output timeline format: `ISO_TIMESTAMP | SOURCE | EVENT_TYPE | DETAILS | SEVERITY`\n7. Sync reconstructed attacker timeline to shared memory at session end\n","# Logfile Recon\n\n**Purpose:** Log forensics, timeline reconstruction, and tampering detection. Builds a structured attacker timeline from all available log sources.\n\n---\n\n## Core Focus Areas\n\n- **Authentication events**: SSH logins, sudo usage, su, PAM failures, brute-force patterns\n- **Kernel\u002Fsystem events**: dmesg anomalies, OOM events, kernel module loads\n- **Auditd events**: EXECVE, SYSCALL, USER_AUTH, USER_CMD, FILE_ACCESS rules\n- **Web server logs**: nginx\u002Fapache\u002Fcaddy access logs, path traversal, shell upload patterns\n- **Cron\u002Fsystemd timers**: Unexpected timer activations, new service starts\n- **Log tampering**: mtime anomalies, internal timestamp gaps, truncation, log rotation manipulation\n- **Lateral movement traces**: SSH pivots, sudo to different users, unusual tty allocations\n- **Fail2ban \u002F IDS logs**: Banned IPs, signature matches, alert correlation\n\n---\n\n## Key Techniques & Tools\n\n### Authentication Analysis\n```bash\n# SSH authentication events — last 14 days\njournalctl -u sshd --since \"14 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep -E \"(Accepted|Failed|Invalid|Disconnected|session opened|session closed)\" | \\\n  awk '{print $1,$2,$3,$11,$13}' | head -50\n\n# Authentication failures by IP (brute-force detection)\njournalctl -u sshd --since \"7 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep \"Failed password\" | grep -oE \"[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\" | \\\n  sort | uniq -c | sort -rn | head -20\n\n# Successful logins from unusual IPs\nlast -a 2>\u002Fdev\u002Fnull | grep -v \"reboot\\|wtmp\\|^$\" | head -30\nlastb 2>\u002Fdev\u002Fnull | head -20\n\n# PAM authentication events\ngrep -iE \"(authentication failure|session opened for user|sudo:)\" \\\n  \u002Fvar\u002Flog\u002Fauth.log 2>\u002Fdev\u002Fnull | tail -30 || \\\n  journalctl --since \"7 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep -iE \"(pam_unix|authentication failure|sudo)\" | head -30\n```\n\n### Sudo & Privilege Escalation Trail\n```bash\n# All sudo events\njournalctl --since \"30 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep \"sudo:\" | grep -v \"^--\\|session\" | head -40\n\n# Sudo command history with timestamps\ngrep -h \"sudo:\" \u002Fvar\u002Flog\u002Fauth.log* 2>\u002Fdev\u002Fnull | \\\n  grep -v \"session opened\\|session closed\\|pam_unix\" | tail -30\n\n# su (switch user) events\njournalctl --since \"14 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep -E \"(pam_su|su\\[|su:)\" | head -20\n\n# Root shell obtained via sudo\njournalctl --since \"14 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep \"sudo:\" | grep -E \"COMMAND=\u002Fbin\u002Fbash|COMMAND=\u002Fbin\u002Fsh|COMMAND=bash|COMMAND=sh\" | head -10\n```\n\n### Auditd \u002F Audit Log Analysis\n```bash\n# Audit log location\n[ -f \u002Fvar\u002Flog\u002Faudit\u002Faudit.log ] && echo \"auditd: active\" || echo \"auditd: NOT running\"\n\n# EXECVE events (command execution)\nausearch -m EXECVE --start \"14 days ago\" 2>\u002Fdev\u002Fnull | \\\n  aureport -x --summary 2>\u002Fdev\u002Fnull | head -20\n\n# Failed syscalls (potential exploit attempts)\nausearch -m SYSCALL --success=no --start \"7 days ago\" 2>\u002Fdev\u002Fnull | \\\n  awk '\u002Fsyscall\u002F{print $0}' | head -20\n\n# User authentication events\nausearch -m USER_AUTH,USER_LOGIN,USER_CMD --start \"14 days ago\" 2>\u002Fdev\u002Fnull | \\\n  aureport --summary 2>\u002Fdev\u002Fnull | head -20\n\n# File access events (sensitive file reads)\nausearch -m OPEN,READ,WRITE -f \u002Fetc\u002Fshadow -f \u002Fetc\u002Fpasswd \\\n  --start \"7 days ago\" 2>\u002Fdev\u002Fnull | head -20\n\n# Auditd rules (coverage check)\nsudo auditctl -l 2>\u002Fdev\u002Fnull | head -20\n```\n\n### Kernel & System Events\n```bash\n# Recent kernel messages (errors, module loads, crashes)\ndmesg --time-format iso 2>\u002Fdev\u002Fnull | grep -iE \\\n  \"(error|warning|fail|oops|bug|rootkit|hide|hook|blocked|forbidden)\" | tail -30\n\n# Module load\u002Funload events\ndmesg 2>\u002Fdev\u002Fnull | grep -iE \"(loaded|unloaded|insmod|rmmod)\" | head -20\njournalctl -k --since \"7 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep -iE \"(module|kmod|insmod)\" | head -20\n\n# OOM killer events (potential DoS or memory exhaustion attack)\ndmesg 2>\u002Fdev\u002Fnull | grep -i \"oom\\|out of memory\" | head -10\njournalctl -k --since \"7 days ago\" 2>\u002Fdev\u002Fnull | grep -i \"OOM\" | head -10\n\n# Kernel panics \u002F crashes\ndmesg 2>\u002Fdev\u002Fnull | grep -i \"panic\\|oops\\|BUG:\" | head -10\nls -la \u002Fvar\u002Fcrash\u002F 2>\u002Fdev\u002Fnull | head -5\n```\n\n### Web Server Log Analysis\n```bash\n# Nginx access log — top IPs, methods, status codes\nfor log in \u002Fvar\u002Flog\u002Fnginx\u002Faccess.log \u002Fvar\u002Flog\u002Fnginx\u002Faccess.log.1; do\n  [ -f \"$log\" ] || continue\n  echo \"=== $log ===\"\n  awk '{print $1}' \"$log\" | sort | uniq -c | sort -rn | head -10  # Top IPs\n  awk '{print $6}' \"$log\" | sort | uniq -c | sort -rn | head -5   # Methods\n  awk '{print $9}' \"$log\" | sort | uniq -c | sort -rn | head -5   # Status codes\ndone\n\n# Path traversal \u002F LFI \u002F RFI attempts\ngrep -iE \"(\\.\\.\u002F|%2e%2e|%252e|etc\u002Fpasswd|\u002Fproc\u002Fself|cmd=|exec=|system=)\" \\\n  \u002Fvar\u002Flog\u002Fnginx\u002Faccess.log 2>\u002Fdev\u002Fnull | head -20\n\n# Shell upload indicators\ngrep -iE \"(\\.php\\?cmd=|\\.asp\\?cmd=|webshell|eval\\(|base64_decode)\" \\\n  \u002Fvar\u002Flog\u002Fnginx\u002Faccess.log 2>\u002Fdev\u002Fnull | head -10\n\n# 4xx\u002F5xx error spike (potential scanning\u002Fexploitation)\nawk '$9 ~ \u002F^4[0-9][0-9]|^5[0-9][0-9]\u002F {print $1}' \\\n  \u002Fvar\u002Flog\u002Fnginx\u002Faccess.log 2>\u002Fdev\u002Fnull | sort | uniq -c | sort -rn | head -10\n```\n\n### Cron & Systemd Timer Abuse\n```bash\n# cron job execution history\ngrep \"CRON\\|crontab\" \u002Fvar\u002Flog\u002Fsyslog 2>\u002Fdev\u002Fnull | tail -20 || \\\n  journalctl -u cron --since \"7 days ago\" 2>\u002Fdev\u002Fnull | tail -20\n\n# Unusual systemd timer activations\nsystemctl list-timers --all 2>\u002Fdev\u002Fnull | head -20\njournalctl --since \"7 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep -E \"\\.timer.*Triggered|timer.*activated\" | head -20\n\n# systemd service starts (new or unexpected)\njournalctl --since \"7 days ago\" 2>\u002Fdev\u002Fnull | \\\n  grep \"systemd.*Started\\|systemd.*Stopping\\|service.*failed\" | \\\n  grep -v \"user@\\|session-\\|dbus\\|NetworkManager\\|bluetooth\" | head -20\n```\n\n### Log Tampering Detection\n```bash\n# Check log file mtime vs last internal timestamp\nfor logfile in \u002Fvar\u002Flog\u002Fauth.log \u002Fvar\u002Flog\u002Fsyslog \u002Fvar\u002Flog\u002Fkern.log; do\n  [ -f \"$logfile\" ] || continue\n  file_mtime=$(stat -c \"%Y\" \"$logfile\" 2>\u002Fdev\u002Fnull)\n  last_ts=$(tail -1 \"$logfile\" 2>\u002Fdev\u002Fnull | head -c 20)\n  file_mtime_h=$(date -d @$file_mtime '+%Y-%m-%d %H:%M:%S' 2>\u002Fdev\u002Fnull)\n  echo \"$logfile: mtime=$file_mtime_h last_entry='$last_ts'\"\ndone\n\n# Journald verification\njournalctl --verify 2>\u002Fdev\u002Fnull | tail -10\n\n# Log file size anomalies (truncation indicator)\nls -la \u002Fvar\u002Flog\u002F*.log* 2>\u002Fdev\u002Fnull | awk '{print $5, $9}' | sort -rn | head -20\n\n# Check for gaps in journal timeline\njournalctl --list-boots 2>\u002Fdev\u002Fnull | head -10\njournalctl --since \"7 days ago\" 2>\u002Fdev\u002Fnull | \\\n  awk '{ts=$1\" \"$2\" \"$3; print ts}' | head -5\njournalctl --since \"7 days ago\" 2>\u002Fdev\u002Fnull | \\\n  awk '{ts=$1\" \"$2\" \"$3; print ts}' | tail -5\n\n# auditd log gaps\nif [ -f \u002Fvar\u002Flog\u002Faudit\u002Faudit.log ]; then\n  awk 'NR==1 || NR==FNR{ts=$0; next} END{print \"First:\", first_ts, \"Last:\", ts}' \\\n    \u002Fvar\u002Flog\u002Faudit\u002Faudit.log | head -3\nfi\n```\n\n### Timeline Reconstruction\n```bash\n# Unified timeline from all sources (last 24 hours)\njournalctl --since \"24 hours ago\" --output=short-iso 2>\u002Fdev\u002Fnull | \\\n  awk '{print $1, $2, $3, $4, substr($0, index($0,$5))}' | head -100\n\n# Combine auth + audit + system events\npaste \\\n  \u003C(grep \"$(date -d '1 day ago' '+%b %e')\" \u002Fvar\u002Flog\u002Fauth.log 2>\u002Fdev\u002Fnull | \\\n    awk '{print $1,$2,$3,\"AUTH\",$5,$0}' | head -30) \\\n  2>\u002Fdev\u002Fnull | sort | head -30\n```\n\n---\n\n## MITRE ATT&CK Mapping\n\n| Finding | Technique |\n|---------|-----------|\n| SSH brute-force logins | T1110.001 – Password Guessing |\n| sudo abuse for root access | T1548.003 – Sudo and Sudo Caching |\n| Log file mtime tampering | T1070.002 – Clear Linux Logs |\n| Journal entries deleted | T1070.002 – Clear Linux Logs |\n| Web shell access via web log | T1505.003 – Web Shell |\n| Cron job added | T1053.003 – Cron |\n| Unexpected service started | T1543.002 – Systemd Service |\n| Auditd disabled | T1562.012 – Disable or Modify Linux Audit System |\n\n---\n\n## Rules for Agents\n\n1. Always report log tampering (mtime mismatch) as **HIGH** — preserve original\n2. SSH brute-force from single IP (>10 failures) = **MEDIUM** minimum\n3. Successful login following brute-force = **CRITICAL**\n4. New cron jobs or systemd timers not in PersistenceBaseline = **HIGH**\n5. Web server path traversal attempts = **MEDIUM** — correlate with process tree\n6. Output timeline format: `ISO_TIMESTAMP | SOURCE | EVENT_TYPE | DETAILS | SEVERITY`\n7. Sync reconstructed attacker timeline to shared memory at session end\n",{"name":5,"tags":44,"capec":48,"model":49,"tools":50,"skills":55,"maxTurns":58,"nist_csf":59,"description":7,"mitre_attack":60},[45,31,46,47],"forensics","linux","logfile-recon",[],"sonnet",[51,34,52,53,54],"Read","Glob","Grep","WebSearch",[56,57],"shared-memory","threats\u002Fmitre-attack-mapper",30,[],[61,62,63,64,65],"T1053.003","T1059","T1110","T1548.003","T1595","main","a91f1293287ffa9f4f1b8f486cd6e835a1568c84","skills\u002Flinux\u002Flogs\u002Fsyslog\u002Fanalyze","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace","https:\u002F\u002Fgithub.com\u002FDCx7C5","#Python","2026-09-01 11:21:00",{"source":8,"skillName":5,"commands":74,"prompt":84,"zipAvailable":85},[75,78,81],{"tool":76,"command":77},"npx","npx skills add DCx7C5\u002Fai-marketplace --skill logs-syslog-analyze",{"tool":79,"command":80},"bunx","bunx skills add DCx7C5\u002Fai-marketplace --skill logs-syslog-analyze",{"tool":82,"command":83},"pnpm","pnpm dlx skills add DCx7C5\u002Fai-marketplace --skill logs-syslog-analyze","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Flinux\u002Flogs\u002Fsyslog\u002Fanalyze\u002FSKILL.md",true,[87],{"path":88,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":91,"sourceHtmlUrl":92},"index.json","REFERENCE","参考文档",668,"https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Flinux\u002Flogs\u002Fsyslog\u002Fanalyze\u002Findex.json",[94,104,129,149,169,191],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":98,"licenseFileUrl":99,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":103},"01M73MDK3NT5XHNYTQ5P5172V9","devel-jb-algorithmic-art","- Embed algorithms inline in the HTML artifact (don't create separate .","Apache-2.0","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fdevel-jb-algorithmic-art\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fdevel-jb-algorithmic-art\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":39},"01M71HAPZ01KQ30RKTB0FFSQ05","services-wmi-persistence-detect","Detect WMI event subscription persistence by enumerating ActiveScriptEventConsumer, CommandLineEventConsumer, and permanent subscriptions in the WMI repository.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fpersistence\u002Fdetect\u002FSKILL.md",[],[111,112,113,114,115,116,117,118,45,119,120,121,122,123,124,125,126,127,128],"services","detect","services wmi persistence detect","wmi","persistence","process-forensics","process","cybersecurity","t1546.003","event-subscription","subscription","repository","commandline-consumer","subscriptions","event","activescript","cm","de",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":39},"01M71HAK6JTTTS229T17WJMMCG","services-wmi-exec-exploit","Perform lateral movement across Windows networks using WMI-based remote execution techniques including Impacket wmiexec.py, CrackMapExec, and native WMI commands for stealthy post-exploitation during red team engagements.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fexec\u002Fexploit\u002FSKILL.md",[],[136,114,137,111,138,139,34,35,140,118,141,142,143,144,145,23,146,147,128,148],"exec","services wmi exec exploit","exploit","across","team","traffic","remote","crackmapexec","Impacket","lateral-movement","lateral movement","command","native",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":39},"01M71HAG6MHKNQV8KDZKMT4886","registry-artifact-extract","Extract and analyze Windows Registry hives to uncover user activity, installed software, autostart entries, and evidence of system compromise.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fregistry\u002Fartifact\u002Fextract\u002FSKILL.md",[],[156,157,158,159,160,49,161,162,163,164,23,128,165,19,35,166,34,118,167,168],"extract","registry artifact extract","registry","artifact","digital-forensics","regripper","windows-registry","evidence-collection","software","uncover","collection","artifact-analysis","activity",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":39},"01M71HACR4A8XTWTTSXK4124AA","processes-token-impersonate-detect","Detect Windows token impersonation and privilege abuse including SeImpersonatePrivilege exploitation via Potato attacks and token stealing techniques.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Ftoken\u002Fimpersonate\u002Fdetect\u002FSKILL.md",[],[176,177,178,112,118,179,127,180,181,182,116,128,183,184,185,186,187,188,189,190],"processes","token","processes token impersonate detect","techniques","escalation","windows","attacks","via","impersonation","potato","exploitation","printspoofer","token-impersonation","seimpersonate","privilege-escalation",{"skillNo":192,"name":193,"nameZh":6,"description":194,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":195,"categories":196,"keywords":197,"publishedAt":39},"01M71HAABSB4Z6QFSXEG00R4RK","processes-thread-injection-detect","Detect Windows thread injection techniques including CreateRemoteThread, QueueUserAPC, NtCreateThreadEx, and thread hijacking via process memory analysis.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Fthread\u002Finjection\u002Fdetect\u002FSKILL.md",[],[198,176,199,112,200,201,117,128,183,202,203,204,35,116,118,179,205,127,33,181],"thread","injection","processes thread injection detect","thread-injection","nt-api","apc-injection","api","process-injection"]