Chuyển đến nội dung
Skillpedia
Phân tích và bảng tính35k · #8258

performing-log-analysis-for-forensic-investigation

Skill này làm gì

Công cụ này giúp điều tra các sự cố bảo mật bằng cách thu thập và phân tích thông tin từ nhiều nhật ký hệ thống. Nó cho phép bạn dựng lại từng bước những gì đã xảy ra, để hiểu một cuộc tấn công diễn ra như thế nào.

Khi nào nên dùng

  • ✓Khi bạn nghi ngờ một hệ thống đã bị xâm phạm.
  • ✓Khi cần tìm ra cuộc tấn công bắt đầu và lan rộng như thế nào.
  • ✓Khi viết báo cáo chi tiết về một sự cố bảo mật.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-log-analysis-for-forensic-investigation/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-log-analysis-for-forensic-investigation/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Phân tích nhật ký máy chủ của tôi để tìm thời điểm và cách thức truy cập trái phép đã xảy ra.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ thu thập dữ liệu từ các nguồn khác nhau, như nhật ký bảo mật và nhật ký ứng dụng. Sau đó nó sắp xếp và đối chiếu thông tin này để tạo dòng thời gian rõ ràng về các sự kiện.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Performing Log Analysis for Forensic Investigation

When to Use

  • When reconstructing the timeline of a security incident from available log sources
  • During post-breach investigation to identify initial access, lateral movement, and exfiltration
  • When correlating events across multiple systems and log sources
  • For establishing evidence of unauthorized access or policy violations
  • When preparing forensic reports requiring detailed event chronology

Prerequisites

  • Access to collected log files (Windows Event Logs, syslog, application logs)
  • Log parsing tools (LogParser, jq, awk, or ELK stack)
  • Understanding of log formats (EVTX, syslog, JSON, CSV)
  • NTP-synchronized timestamps across all log sources for correlation
  • Sufficient storage for log aggregation and indexing
  • Timeline analysis tools (log2timeline, Plaso)

Workflow

Step 1: Collect and Preserve Log Sources

# Create case log directory structure
mkdir -p /cases/case-2024-001/logs/{windows,linux,network,application,web}

# Extract Windows Event Logs from forensic image
cp /mnt/evidence/Windows/System32/winevt/Logs/*.evtx /cases/case-2024-001/logs/windows/

# Key Windows Event Logs to collect
# Security.evtx - Authentication, access control, policy changes
# System.evtx - Service starts/stops, driver loads, system errors
# Application.evtx - Application errors and events
# Microsoft-Windows-PowerShell%4Operational.evtx - PowerShell execution
# Microsoft-Windows-Sysmon%4Operational.evtx - Sysmon detailed events
# Microsoft-Windows-TaskScheduler%4Operational.evtx - Scheduled tasks
# Microsoft-Windows-TerminalServices-LocalSessionManager%4Operational.evtx - RDP

# Collect Linux logs
cp /mnt/evidence/var/log/auth.log* /cases/case-2024-001/logs/linux/
cp /mnt/evidence/var/log/syslog* /cases/case-2024-001/logs/linux/
cp /mnt/evidence/var/log/kern.log* /cases/case-2024-001/logs/linux/
cp /mnt/evidence/var/log/secure* /cases/case-2024-001/logs/linux/
cp /mnt/evidence/var/log/audit/audit.log* /cases/case-2024-001/logs/linux/

# Collect web server logs
cp /mnt/evidence/var/log/apache2/access.log* /cases/case-2024-001/logs/web/
cp /mnt/evidence/var/log/nginx/access.log* /cases/case-2024-001/logs/web/

# Hash all collected logs for integrity
find /cases/case-2024-001/logs/ -type f -exec sha256sum {} \; > /cases/case-2024-001/logs/log_hashes.txt

Step 2: Parse Windows Event Logs

# Install python-evtx for EVTX parsing
pip install python-evtx

# Convert EVTX to XML/JSON for analysis
python3 -c "
import Evtx.Evtx as evtx
import json, xml.etree.ElementTree as ET

with evtx.Evtx('/cases/case-2024-001/logs/windows/Security.evtx') as log:
    for record in log.records():
        print(record.xml())
" > /cases/case-2024-001/logs/windows/Security_parsed.xml

# Using evtxexport (libevtx-utils)
sudo apt-get install libevtx-utils
evtxexport /cases/case-2024-001/logs/windows/Security.evtx \
   > /cases/case-2024-001/logs/windows/Security_exported.txt

# Key Security Event IDs to investigate
# 4624 - Successful logon
# 4625 - Failed logon
# 4648 - Logon using explicit credentials (runas, lateral movement)
# 4672 - Special privileges assigned (admin logon)
# 4688 - Process creation (with command line if auditing enabled)
# 4697 - Service installed
# 4698/4702 - Scheduled task created/updated
# 4720 - User account created
# 4732 - Member added to security-enabled local group
# 1102 - Audit log cleared

# Extract specific events with python-evtx
python3 << 'PYEOF'
import Evtx.Evtx as evtx
import xml.etree.ElementTree as ET

target_events = ['4624', '4625', '4648', '4672', '4688', '4697', '1102']

with evtx.Evtx('/cases/case-2024-001/logs/windows/Security.evtx') as log:
    for record in log.records():
        root = ET.fromstring(record.xml())
        ns = {'ns': 'http://schemas.microsoft.com/win/2004/08/events/event'}
        event_id = root.find('.//ns:EventID', ns).text
        if event_id in target_events:
            time = root.find('.//ns:TimeCreated', ns).get('SystemTime')
            print(f"[{time}] EventID: {event_id}")
            for data in root.findall('.//ns:Data', ns):
                print(f"  {data.get('Name')}: {data.text}")
            print()
PYEOF

Step 3: Parse and Analyze Linux/Syslog Entries

# Parse auth.log for SSH and sudo events
grep -E '(sshd|sudo|su\[|passwd|useradd|usermod)' \
   /cases/case-2024-001/logs/linux/auth.log* | \
   sort > /cases/case-2024-001/analysis/auth_events.txt


…
Câu hỏi thường gặp

Nhật ký (log) là gì?

Nhật ký giống như cuốn nhật ký số mà máy tính và chương trình ghi lại những gì đã xảy ra. Chúng rất cần thiết để hiểu các sự kiện trong quá khứ.

Vì sao các “timestamp” cần được đồng bộ?

Timestamp là thời điểm được ghi trong nhật ký. Nếu chúng không được đồng bộ giữa các hệ thống, thứ tự các sự kiện sẽ bị rối, khiến việc điều tra khó khăn.

Tôi có cần là chuyên gia máy tính để dùng không?

Công cụ giúp phân tích dữ liệu phức tạp và mục tiêu là đơn giản hóa quy trình. Tuy vậy, hiểu cơ bản về cách máy tính hoạt động vẫn rất hữu ích.

Chi tiết

Mô tả gốc của tác giả

Collect, parse, and correlate system, application, and security logs to reconstruct events and establish timelines during forensic investigations.

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#8258
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự