본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트35k · #8257

performing-linux-log-forensics-investigation

하는 일

이 도구는 Linux 시스템의 로그 파일을 검사해 무슨 일이 있었는지에 대한 단서를 찾습니다. 누가, 언제, 어떻게 시스템에 접근했는지 밝혀내므로, 의심스러운 활동이나 공격을 조사하는 데 유용합니다.

사용하는 경우

  • ✓누군가 Linux 서버에 침입했다고 의심될 때.
  • ✓보안 사고를 조사하면서 누가 무엇을 했는지 알아야 할 때.
  • ✓시스템에서 접근 기록과 실행된 명령을 검토하는 경우.

스킬 링크

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-linux-log-forensics-investigation/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-linux-log-forensics-investigation/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“지난 24시간 동안의 무단 접근을 찾기 위해 내 Linux 서버 로그를 분석해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 auth.log와 systemd 저널 같은 중요한 로그 파일을 읽어 접근 패턴, 실행된 명령, 로그인 시도를 찾습니다. 이 정보를 정리해 사건의 순서를 이해할 수 있도록 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Performing Linux Log Forensics Investigation

Overview

Linux systems maintain extensive logs that serve as primary evidence sources in forensic investigations. Unlike Windows Event Logs, Linux logs are typically plain-text files stored in /var/log/ and binary journal files managed by systemd-journald. Key forensic logs include auth.log (authentication events, sudo usage, SSH sessions), syslog (system-wide messages), kern.log (kernel events), and application-specific logs. The Linux Audit framework (auditd) provides detailed security event logging comparable to Windows Security Event Logs. Forensic analysis of these logs enables investigators to reconstruct user sessions, identify unauthorized access, detect privilege escalation, trace lateral movement, and establish comprehensive event timelines.

When to Use

  • When conducting security assessments that involve performing linux log forensics investigation
  • When following incident response procedures for related security events
  • When performing scheduled security testing or auditing activities
  • When validating security controls through hands-on testing

Prerequisites

  • Familiarity with digital forensics concepts and tools
  • Access to a test or lab environment for safe execution
  • Python 3.8+ with required dependencies installed
  • Appropriate authorization for any testing activities

Key Log Files and Locations

Log File Path Contents
auth.log / secure /var/log/auth.log (Debian) or /var/log/secure (RHEL) Authentication, sudo, SSH, PAM
syslog / messages /var/log/syslog (Debian) or /var/log/messages (RHEL) General system messages
kern.log /var/log/kern.log Kernel messages, USB events, driver loads
lastlog /var/log/lastlog Last login per user (binary)
wtmp /var/log/wtmp Login/logout records (binary, read with last)
btmp /var/log/btmp Failed login attempts (binary, read with lastb)
faillog /var/log/faillog Failed login counter (binary)
cron.log /var/log/cron or /var/log/syslog Scheduled task execution
audit.log /var/log/audit/audit.log Linux Audit Framework events
journal /var/log/journal/ or /run/log/journal/ systemd binary journal
dpkg.log /var/log/dpkg.log Package installation/removal (Debian)
yum.log /var/log/yum.log Package installation/removal (RHEL)

Analysis Techniques

Authentication Log Analysis

# Find all successful SSH logins
grep "Accepted" /var/log/auth.log

# Find failed SSH login attempts
grep "Failed password" /var/log/auth.log

# Extract unique source IPs from failed logins
grep "Failed password" /var/log/auth.log | grep -oP '\d+\.\d+\.\d+\.\d+' | sort -u

# Find sudo command execution
grep "sudo:" /var/log/auth.log | grep "COMMAND"

# Detect brute force patterns (>10 failures from same IP)
grep "Failed password" /var/log/auth.log | awk '{print $(NF-3)}' | sort | uniq -c | sort -rn | head -20

# Find account creation events
grep "useradd\|adduser" /var/log/auth.log

# Detect SSH key authentication
grep "Accepted publickey" /var/log/auth.log

Systemd Journal Analysis

# Export journal in JSON format for forensic processing
journalctl --output=json --no-pager > journal_export.json

# Filter by time range
journalctl --since "2025-02-01" --until "2025-02-15" --output=json > timerange.json

# Filter by unit/service
journalctl -u sshd --output=json > sshd_journal.json

# Show kernel messages (USB events, module loads)
journalctl -k --output=json > kernel_journal.json

# Filter by priority (0=emerg to 7=debug)
journalctl -p err --output=json > errors.json

# Boot-specific logs
journalctl -b 0 --output=json > current_boot.json
journalctl --list-boots  # List all recorded boot sessions

Linux Audit Framework Analysis

# Search audit log for specific event types
ausearch -m USER_AUTH --start today

# Search for file access events
ausearch -f /etc/shadow

# Search for process execution
ausearch -m EXECVE --start "02/01/2025" --end "02/28/2025"

# Generate report of login events
aureport --login --start "02/01/2025"

# Generate summary of failed authentications
aureport --auth --failed

# Search for specific user activity
ausearch -ua 1001  # By UID
ausearch -ua username  # By username

Cron Job Investigation

# Check system-wide crontab
cat /etc/crontab

# Check user crontabs
ls -la /var/spool/cron/crontabs/

# Review cron execution logs

…
자주 묻는 질문

이 도구는 어떤 종류의 로그를 분석하나요?

인증 로그(auth.log), 시스템 메시지(syslog), 커널 로그(kern.log), 감사 로그(auditd), systemd 저널 등을 분석합니다.

이 맥락에서 ‘포렌식’은 무슨 뜻인가요?

시스템 로그 같은 디지털 증거를 이용해 과거의 사건을 조사하고 무슨 일이 있었는지 파악하는 것입니다. 경찰 수사와 비슷합니다.

이것을 사용하려면 Linux 전문가여야 하나요?

전문가일 필요는 없지만, Linux의 기본 작동 방식과 로그가 무엇인지 알고 있으면 결과를 해석하는 데 도움이 됩니다.

상세 정보

작성자의 원본 설명

Perform forensic investigation of Linux system logs including syslog, auth.log, systemd journal (via journalctl), kern.log, auditd, and application logs to reconstruct user sessions, identify unauthorized access and privilege escalation, trace lateral movement, and establish event timelines. Use when investigating a suspected compromise of a Linux system and needing to analyze SSH, sudo, cron, or

repo: mukul975/Anthropic-Cybersecurity-Skills

인기도

GitHub 스타
35k
순위
#8257
라이선스
Apache-2.0
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬