Skillpedia
التحليل وجداول البيانات35k · #8258

performing-log-analysis-for-forensic-investigation

ما الذي تفعله

تساعد هذه المهارة في التحقيق في الحوادث الأمنية، عبر جمع السجلات من أنظمة مختلفة وتحليلها. تتيح لك إعادة بناء ما حدث خطوة بخطوة لفهم كيفية وقوع الهجوم.

متى تستخدمها

  • ✓عندما تشك في أن نظامًا تعرض للاختراق.
  • ✓عندما تريد معرفة كيف بدأ الهجوم وكيف انتشر.
  • ✓عندما تُعدّ تقريرًا مفصلًا عن حادث أمني.

رابط المهارة

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

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-log-analysis-for-forensic-investigation/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“حلل سجلات الخادم الخاص بي لمعرفة متى وكيف حدث الوصول غير المصرح به.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تجمع المهارة البيانات من مصادر مختلفة، مثل سجلات الأمان وسجلات التطبيقات. ثم تنظمها وتقارن بعضها ببعض لبناء خط زمني واضح للأحداث.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

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


…
الأسئلة الشائعة

ما هي «السجلات»؟

هي أشبه بيوميات رقمية تحتفظ بها الأجهزة والبرامج، فتسجل ما يحدث. وهي ضرورية لفهم الأحداث الماضية.

لماذا يهم تزامن «الطوابع الزمنية» (timestamps)؟

الطوابع الزمنية هي الأوقات المسجلة في السجلات. وإذا لم تكن متزامنة بين الأنظمة، يصبح ترتيب الأحداث مربكًا، فيصعب التحقيق.

هل أحتاج إلى أن أكون خبيرًا في الحاسوب لاستخدام هذه المهارة؟

رغم أن المهارة تساعد على تحليل بيانات معقدة، فهدفها تبسيط العملية. لكن فهمًا أساسيًا لطريقة عمل الحواسيب يفيد.

التفاصيل

الوصف الأصلي من المؤلف

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

repo: mukul975/Anthropic-Cybersecurity-Skills

الشعبية

نجوم GitHub
35k
الترتيب
#8258
الترخيص
Apache-2.0
آخر تحديث
31‏/8‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة