Incident Response, OWASP Top 10 & SOC Triage
When an alert fires at 2:00 AM, panic wastes time. Use the PICERL playbook, spot OWASP Top 10 web attacks, and run fast Linux/Windows triage commands without destroying evidence.
Every incident feeds back into Preparation—turning today's breach into tomorrow's automated detection rule.
01 PICERL 6 Phases Breakdown
PICERL (SANS / NIST Incident Response model) gives SOC analysts a repeatable order of operations so you don't accidentally wipe evidence before containing the attacker.
| Phase | Plain-English Goal | Key Actions |
|---|---|---|
| 1. Preparation | Get ready before trouble hits | Build IR playbooks, test backups, centralize SIEM logs, prepare jump kits. |
| 2. Identification | Verify if an alert is a real incident | Check SIEM alerts, confirm IOCs, determine which hosts & accounts are affected. |
| 3. Containment | Stop the attacker from spreading | Network-isolate the host (EDR/VLAN), disable compromised accounts, capture RAM. |
| 4. Eradication | Remove the root cause completely | Delete malware/webshells, revoke stolen tokens, patch the entry vulnerability. |
| 5. Recovery | Safely bring systems back online | Rebuild from known-good images, restore clean backups, watch logs closely. |
| 6. Lessons Learned | Make sure it never happens again | Write blameless post-mortem, tune SIEM rules, train staff within 1–2 weeks. |
Remember: "Please Isolate Compromised Endpoints, Restore Later" — Preparation, Identification, Containment, Eradication, Recovery, Lessons Learned.
02 OWASP Top 10 Quick Reference
The OWASP Top 10 lists the most dangerous web application flaws. Here are the top risks SOC analysts and developers see in real-world SIEM and WAF logs every day:
| Vulnerability | What It Means (Plain English) | How to Spot & Fix |
|---|---|---|
| Broken Access Control | User changes ?id=101 to ?id=102 (IDOR) and reads someone else's data. |
Enforce server-side ownership checks on every API endpoint; deny by default. |
| Cryptographic Failures | Sensitive data sent over HTTP or passwords stored with weak MD5/SHA-1. | Enforce TLS 1.3 everywhere; hash passwords with Argon2id or bcrypt. |
| Injection (SQLi / Cmd) | Attacker types ' OR 1=1-- into a form to trick the database or shell. |
Use parameterized queries (prepared statements)—never string-concat SQL. |
| XSS (Cross-Site Scripting) | Malicious <script> runs inside a victim's browser to steal session cookies. |
HTML-encode output, use Content-Security-Policy (CSP), set HttpOnly cookies. |
| SSRF (Server-Side Request Forgery) | Attacker tricks your server into fetching internal URLs like 169.254.169.254 (cloud metadata). |
Allowlist outbound domains/IPs; block private/metadata IP ranges at the server. |
| Security Misconfiguration | Default admin passwords, open S3 buckets, or verbose stack traces in prod. | Harden configs, disable debug mode, remove unused services and sample apps. |
03 SOC Live Triage Commands (Linux & Windows)
When you suspect a host is compromised, run these read-only commands first to see who is logged in, what processes are running, and what network connections are open.
last -a | head -n 20
who
w to see what command each user is running.ps auxf
nginx or apache2 spawning /bin/sh or curl.sudo ss -tulpn
ss -antp for active outbound C2 connections.sudo find / -mtime -1 -type f 2>/dev/null
/var/www or /tmp for faster results.Get-WinEvent -FilterHashtable @{LogName='Security'; ID=4625} -MaxEvents 20
4625 for 4624 (success), 4720 (new user), or 7045 (System log: new service).04 IOCs & MITRE ATT&CK Flow
IOCs (Indicators of Compromise) are the digital fingerprints attackers leave behind—like malicious file hashes, C2 IP addresses, or domains. Share IOCs with your SIEM/EDR to block them everywhere.
sha256sum /tmp/suspicious.bin
Get-FileHash C:\Temp\suspect.exe -Algorithm SHA256
MITRE ATT&CK Tactic Flow (How Attacks Progress)
Instead of memorizing 200+ techniques, follow the attacker's story from left to right:
| Stage | ATT&CK Tactic | Common Example |
|---|---|---|
| 1. Entry | Initial Access | Phishing link, exposed RDP/SSH, or OWASP exploit |
| 2. Run | Execution & Persistence | PowerShell payload, cron job, or Windows Scheduled Task |
| 3. Hide | Privilege Escalation & Defense Evasion | sudo abuse, clearing event logs, disabling Defender |
| 4. Spread | Credential Access & Lateral Movement | Dumping LSASS//etc/shadow, SMB/WinRM/SSH hopping |
| 5. Goal | Exfiltration / Impact | Stealing databases over DNS/HTTPS or deploying ransomware |
05 Danger Zone & Quick-Copy Triage
In Incident Response, your first instinct ("just reboot it!") can destroy the exact evidence you need to prove what happened:
Fileless malware, encryption keys, active network sockets, and running processes live in RAM. A reboot wipes them forever. Isolate the network first, capture memory/triage output, then remediate.
Resetting one user's password or deleting one webshell while the attacker still has a second backdoor alerts them to burn logs or trigger ransomware early. Map the full scope first, then contain all access at once.
If you delete the malware binary without taking its SHA-256 hash or backing up logs, you can't hunt for it on other servers or determine if customer data was stolen.
who # 1. Active sessions right now last -a | head -n 15 # 2. Recent logins with source IPs sudo ss -tulpn # 3. All listening ports + owning PIDs ps auxf | head -n 40 # 4. Process tree for suspicious children