Linux Log Analysis & Attack Detection
Overview
Learning Workflow
Phase 1: Linux Log Foundations
Critical Log Locations
Authentication & Access Logs
Log File
Distribution
Content
System Logs
Log File
Content
Application Logs
Log File
Content
Security & Audit Logs
Log File
Content
Container & Cloud Logs
Log File
Content
Essential Log Analysis Commands
Basic Parsing
Journalctl (systemd)
Binary Log Analysis
Auditd Analysis
Phase 2: SSH Brute-Force Detection
Attack Overview
Log Indicators
Failed Authentication Patterns
Successful Attack Indicators
Detection Commands
Basic Brute-Force Detection
Successful Login Analysis
Advanced Detection
Geolocation & Enrichment
Investigation Workflow
Real-Time Detection Script
Defensive Recommendations
Phase 3: Web Server Attack Detection
Attack Types
Category
Examples
Log Locations
Detection Patterns
SQL Injection
Cross-Site Scripting (XSS)
Path Traversal & LFI/RFI
Command Injection
Web Shell Detection
Scanner & Bot Detection
Response Code Analysis
Comprehensive Analysis Commands
Investigation Workflow
Modsecurity/WAF Log Analysis
Defensive Recommendations
Phase 4: Cryptocurrency Miner Detection
Attack Overview
Detection Indicators
Process-Based Detection
Network-Based Detection
System Log Detection
File System Analysis
Container-Based Mining
Comprehensive Detection Script
Known Mining Pool Indicators
Pool Type
Domains/IPs
Defensive Recommendations
Phase 5: Privilege Escalation Detection
Attack Categories
Category
Examples
Log Locations
Sudo Abuse Detection
SUID/SGID Detection
Kernel Exploit Detection
User/Group Modification Detection
File Permission Changes
Cron/Service Hijacking
Environment Hijacking
Auditd Rules for Privilege Escalation
Privilege Escalation Investigation Workflow
Phase 6: Rootkit & Kernel Attack Detection
Attack Types
Type
Description
Detection Techniques
Process Hiding Detection
File Hiding Detection
Kernel Module Detection
Syscall Hooking Detection
Library Preload Detection
Binary Integrity Verification
Network Hiding Detection
Rootkit Scanning Tools
Memory Analysis
Rootkit Detection Workflow
Phase 7: Data Exfiltration Detection
Exfiltration Methods
Method
Description
Network-Based Exfiltration
Outbound Traffic Analysis
DNS Exfiltration
HTTP/HTTPS Exfiltration
Encrypted Channel Detection
File System Exfiltration
Sensitive File Access
USB/Removable Media
Email Exfiltration
Exfiltration Investigation Workflow
Phase 8: Network Attack & Firewall Detection
Attack Types
Attack
Description
Log Locations
Port Scanning Detection
Firewall Log Analysis
UFW
iptables Logging
Netfilter Connection Tracking
DDoS Detection
ARP/MITM Detection
Lateral Movement Detection
Network Attack Investigation
Phase 9: Container Escape Detection
Attack Vectors
Vector
Description
Log Locations
Container Security Analysis
Privileged Container Detection
Sensitive Mount Detection
Container Process Monitoring
Kubernetes Security
Container Escape Indicators
Runtime Security Logs
Container Security Script
Phase 10: Supply Chain Attack Detection
Attack Vectors
Vector
Description
Detection Techniques
Package Manager Monitoring
Python/Pip Monitoring
Node.js/NPM Monitoring
Build Pipeline Security
Container Image Verification
Integrity Monitoring
Supply Chain Attack Script
Additional Attack Detection
Backdoor Detection
Webshell Detection
Log Tampering Detection
Quick Reference Card
Essential Commands
Task
Command
Log Locations Summary
Category
Debian/Ubuntu
RHEL/CentOS
Critical Detection Patterns
Attack
Key Indicator
Defensive Baseline
Last updated