Please enable JavaScript.
Coggle requires JavaScript to display documents.
π¨ 8οΈβ£ Incident Response - Live Response (Enterprise Linux) - Coggleβ¦
π¨ 8οΈβ£ Incident Response - Live Response (Enterprise Linux)
π’ 1οΈβ£ What is Live Response?
π Definition
Live Response is the process of collecting information from a running Linux system during a security incident.
π Main Goal
Identify attacker activity
Collect volatile evidence
Understand current system state
Stop ongoing damage
Support forensic investigation
π Why "Live"?
Because the system is powered on
Processes are running
Network connections are active
Memory contains temporary evidence
π Enterprise Usage
SOC Analyst
Incident Response Team
Digital Forensics Team
Linux Security Engineers
π’ 2οΈβ£ Live Response Preparation
π Before touching compromised server
Create Incident Ticket
Collect:
Incident ID
Date and Time
Affected Server
Analyst Name
Severity Level
Example:
Incident ID:
INC-2026-001
Server:
web-prod-01
IP:
10.10.20.15
π Prepare Investigation Tools
Trusted tools:
Sysinternals equivalent for Linux
SANS Linux IR Toolkit
Triage tools
Audit tools
Memory tools
π Preserve Evidence
Never immediately reboot
Never delete files
Never install unknown tools
Avoid changing timestamps
π’ 3οΈβ£ Initial Access To Compromised Linux Server
π Secure Connection
Use SSH
Command:
ssh
analyst@server-ip
Enterprise practice:
Use jump server
Example:
Analyst
|
|
Bastion Host
|
|
Production Server
π Record Session
Use script command
Start recording:
script incident_session.txt
Perform investigation
Stop recording:
exit
π’ 4οΈβ£ System Identification Collection
π Purpose
Understand compromised system
π Operating System Information
Command:
uname -a
Shows:
Kernel Version
Architecture
Host Information
Command:
cat /etc/os-release
Shows:
Linux Distribution
Version
π Hostname Information
Command:
hostnamectl
Shows:
Hostname
Operating System
Kernel
Virtualization
π Current Date and Time
Command:
date
Important because:
Timeline creation
π System Uptime
Command:
uptime
Shows:
System running duration
Load average
π’ 5οΈβ£ Process Investigation
π Purpose
Find malicious programs running in memory
π View Running Processes
Command:
ps aux
Explanation:
ps
Process Snapshot
a
All users
u
User format
x
Include background processes
π Process Tree
Command:
pstree -p
Shows:
Parent process
Child process
Example:
systemd
sshd
bash
malware.sh
π Find High CPU Processes
Command:
top
Enterprise alternative:
htop
π Check Process Details
Command:
ls -l /proc/PID
Example:
ls -l /proc/1234
Contains:
Memory
Open files
Network connections
Environment
π Check Process Executable
Command:
readlink /proc/PID/exe
Example:
readlink /proc/1234/exe
Output:
/tmp/.hidden/malware
Indicates:
Suspicious execution path
π’ 6οΈβ£ Memory Investigation
π Why Memory?
RAM contains:
Running malware
Encryption keys
Passwords
Active sessions
π Check Memory Usage
Command:
free -h
π Capture Memory Image
Enterprise Tools:
LiME
AVML
Example:
avml memory_dump.lime
π Memory Analysis
Tools:
Volatility 3
Example:
vol.py -f memory_dump.lime linux.pslist
Finds:
Hidden processes
Malware
Injected code
π’ 7οΈβ£ Network Investigation
π Purpose
Identify attacker communication
π Active Connections
Command:
ss -tunap
Explanation:
s
Socket
t
TCP
u
UDP
n
No DNS resolution
a
All connections
p
Process information
π Example Suspicious Connection
Output:
malware
PID 4444
Connection:
10.10.10.50:443
Investigation:
Check:
who owns IP
process path
logs
π Listening Services
Command:
ss -lntup
Finds:
Open ports
Running services
π Packet Capture
Command:
tcpdump -i eth0
Save traffic:
tcpdump -i eth0 -w capture.pcap
Analysis:
Wireshark
π’ 8οΈβ£ User Account Investigation
π Purpose
Detect unauthorized accounts
π List Users
Command:
cat /etc/passwd
π Check Recent Login
Command:
last
π Failed Login Attempts
Command:
lastb
π Current Logged Users
Command:
who
Command:
w
π Check SSH Authorized Keys
Path:
~/.ssh/authorized_keys
Command:
cat ~/.ssh/authorized_keys
Look for:
Unknown public keys
π’ 9οΈβ£ File System Investigation
π Find Recently Modified Files
Command:
find / -mtime -1
Finds:
Files changed in last 24 hours
π Suspicious Locations
Check:
/tmp
/var/tmp
/dev/shm
/etc/cron.*
/home
π File Metadata
Command:
stat filename
Shows:
Creation time
Modification time
Permissions
π Hash Evidence Files
Command:
sha256sum suspicious_file
Purpose:
Evidence integrity
π’ π Log Investigation
π Linux Log Locations
Authentication Logs
RHEL/CentOS:
/var/log/secure
Ubuntu:
/var/log/auth.log
System Logs:
/var/log/messages
/var/log/syslog
Audit Logs:
/var/log/audit/audit.log
π SSH Investigation
Command:
grep "Failed password" /var/log/auth.log
Finds:
Brute force attempts
π Journal Investigation
Command:
journalctl
Recent logs:
journalctl -xe
π’ 1οΈβ£1οΈβ£ Persistence Detection
π Attacker tries to survive reboot
π Cron Jobs
Check:
crontab -l
System cron:
ls -la /etc/cron.*
π Systemd Persistence
Check:
systemctl list-unit-files
Path:
/etc/systemd/system/
π SSH Persistence
Check:
~/.ssh/authorized_keys
π Startup Scripts
Check:
/etc/rc.local
π’ 1οΈβ£2οΈβ£ Evidence Collection
π Create Evidence Directory
Command:
mkdir /incident_IR_001
π Collect Important Data
System Information
uname -a > system.txt
Processes
ps aux > processes.txt
Network
ss -tunap > network.txt
Users
last > login_history.txt
Logs
cp /var/log/auth.log /incident_IR_001/
π Preserve Evidence
Use:
Read-only storage
Hash verification
Hash:
sha256sum evidence_file
π’ 1οΈβ£3οΈβ£ Live Response Best Practices
β Do
Collect volatile data first
Record commands
Preserve timestamps
Use trusted tools
Maintain chain of custody
β Do Not
Reboot immediately
Delete malware
Modify evidence
Run unknown scripts
π’ 1οΈβ£4οΈβ£ Enterprise Live Response Workflow
π¨ Alert Received
β
π Connect Through Jump Host
β
π Start Session Recording
β
π₯ Collect System Information
β
β Analyze Processes
β
π§ Capture Memory
β
π Analyze Network
β
π€ Check Users
β
π Collect Files
β
π Analyze Logs
β
π Preserve Evidence
β
π Send Findings To Incident Report
π’ 1οΈβ£5οΈβ£ Enterprise Tools Used
πΉ Velociraptor
Endpoint visibility
Live collection
πΉ GRR Rapid Response
Google incident response framework
πΉ osquery
SQL based endpoint investigation
πΉ Volatility
Memory analysis
πΉ Auditd
Linux auditing
πΉ Sysmon for Linux
Advanced monitoring
πΉ Elastic Agent
SIEM collection
πΉ Wazuh Agent
Security monitoring