Skip to content

Commit 56be481

Browse files
dknaussclaude
andcommitted
Editorial pass: fix §10.3 structure, annotations, and add cross-references
P1 fixes: - Restore 6-heading alert playbook contract in §10.3 (merge Post-Mitigation Monitoring into Recovery Validation, remove Post-Incident block in favor of §10.6 reference) - Move incident declaration template before Diagnosis as first-action callout; renumber Diagnosis to 4 steps - Correct wp user session destroy annotation (built-in, not plugin-dependent) - Fix WP-CLI version requirement to 2.5+ in prerequisites and §10.3 Cross-references added: - §10.3 → Hardening Guide §12.3 (NIST incident lifecycle) - §6.3 → Benchmark §8.3 (patching SLA) - §5.5 → Benchmark §5.1 (2FA audit checklist) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 16a84a0 commit 56be481

1 file changed

Lines changed: 34 additions & 33 deletions

File tree

WP-Operations-Runbook.md

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,8 @@ awk '/wp-json/ {print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn
666666

667667
**Objective:** Require 2FA for all administrator-capable accounts and maintain a documented break-glass recovery path.
668668

669+
See [WordPress Security Benchmark](https://github.com/dknauss/wp-security-benchmark) §5.1 for the compliance audit checklist and configuration rationale.
670+
669671
**Choose and Standardize One 2FA Plugin:**
670672

671673
- `two-factor`.
@@ -860,6 +862,8 @@ Then verify admin login and critical user flows in browser.
860862
**Purpose:**
861863
Apply plugin and theme updates with controlled blast radius, rapid detection of regressions, and a clear rollback path.
862864

865+
The [WordPress Security Benchmark](https://github.com/dknauss/wp-security-benchmark) §8.3 defines the patching SLA: security updates within 72 hours, critical patches within 24 hours or virtual-patched immediately.
866+
863867
**Prerequisites:**
864868
- All updates tested on staging
865869
- Database backed up
@@ -1998,7 +2002,7 @@ Lifecycle metadata for incident response procedures is tracked in [Appendix E](#
19982002
19992003
**Prerequisites for all incident procedures below:**
20002004
- SSH access to the production host with `sudo` privileges
2001-
- WP-CLI installed and accessible in `$PATH`
2005+
- WP-CLI 2.5+ installed and accessible in `$PATH` (verify: `wp cli version`)
20022006
- Access to monitoring dashboards and log aggregation
20032007
- Contact list for on-call personnel (see [Section 10.4](#104-incident-roles-and-escalation-path))
20042008
@@ -2102,47 +2106,51 @@ Confirm admin login and at least one critical business workflow before closing i
21022106
21032107
> **CRITICAL:** If breach is suspected, act immediately. Data loss and reputation damage increase with every minute of delay.
21042108
2109+
This procedure implements the NIST SP 800-61r3 incident handling lifecycle described in the [WordPress Security Hardening Guide](https://github.com/dknauss/wp-security-hardening-guide) §12.3.
2110+
21052111
**Alert Meaning:**
21062112
Evidence suggests active compromise or unauthorized access (malicious files, account misuse, redirect behavior, or scanner-confirmed malware).
21072113
21082114
**Customer Impact:**
21092115
Confidentiality, integrity, and availability are all at risk. This can require service isolation, user-facing communications, and credential revocation.
21102116
2117+
**First action -- declare the incident:**
2118+
2119+
```text
2120+
Severity: CRITICAL
2121+
Issue: [Description of attack]
2122+
Time Detected: [Time]
2123+
Affected User Data: [If known]
2124+
Escalation: [Your contact details]
2125+
```
2126+
21112127
**Diagnosis:**
21122128
2113-
1. **Declare incident and notify security owner**
2114-
```
2115-
Severity: CRITICAL
2116-
Issue: [Description of attack]
2117-
Time Detected: [Time]
2118-
Affected User Data: [If known]
2119-
Escalation: [Your contact details]
2120-
```
2121-
2. **Contain exposure**
2129+
1. **Contain exposure**
21222130
```bash
21232131
# Take site offline to prevent further data exfiltration
2124-
# Option 1: Redirect to maintenance page (requires WP-CLI 2.2+)
2132+
# Option 1: Redirect to maintenance page (requires WP-CLI 2.5+)
21252133
wp maintenance-mode activate
21262134
21272135
# Option 2: Block all traffic except admins
21282136
# Add to .htaccess or nginx config:
21292137
# deny all;
21302138
# allow [CUSTOMIZE: your-ip];
21312139
```
2132-
3. **Determine scope of compromise**
2140+
2. **Determine scope of compromise**
21332141
```bash
21342142
wp user list --format=table
21352143
wp user list --role=administrator --format=table
21362144
find /home/wordpress -name "*.php" -type f -mtime -7 -ls
21372145
find /home/wordpress -name "shell.php" -o -name "admin.php" -o -name "tmp*.php"
21382146
```
2139-
4. **Capture forensic artifacts before cleanup**
2147+
3. **Capture forensic artifacts before cleanup**
21402148
```bash
21412149
tar -czf /root/forensics/breach-evidence-$(date +%Y%m%d-%H%M%S).tar.gz \
21422150
/home/wordpress/public_html
21432151
wp db export /root/forensics/breach-evidence-db-$(date +%Y%m%d-%H%M%S).sql
21442152
```
2145-
5. **Perform security scans**
2153+
4. **Perform security scans**
21462154
```bash
21472155
# Wordfence scans must be initiated through wp-admin > Wordfence > Scan
21482156
# For CLI-based malware scanning, use dedicated tools:
@@ -2170,9 +2178,7 @@ Confidentiality, integrity, and availability are all at risk. This can require s
21702178
echo "Reset $user — communicate new password via secure channel"
21712179
done
21722180
2173-
# Invalidate all existing sessions
2174-
# Plugin-dependent — wp user session destroy requires a session management plugin.
2175-
# Alternative: wp db query "DELETE FROM wp_usermeta WHERE meta_key LIKE '_session_tokens';"
2181+
# Invalidate all existing sessions (built-in WP-CLI command, no plugin required)
21762182
wp user list --field=ID | xargs -I {} wp user session destroy {} --all
21772183
```
21782184
4. Patch vulnerable components.
@@ -2182,7 +2188,15 @@ Confidentiality, integrity, and availability are all at risk. This can require s
21822188
wp theme update --all
21832189
```
21842190
2185-
**Post-Mitigation Monitoring:**
2191+
**Escalation:**
2192+
2193+
- Escalate immediately via [Section 10.4](#104-incident-roles-and-escalation-path) to Security Officer and Incident Commander.
2194+
- If regulated data may be exposed, involve legal/compliance workflow before public disclosure.
2195+
- If compromise cannot be contained quickly, execute disaster recovery path in [Section 11.2](#112-full-site-restore-from-backup).
2196+
2197+
**Recovery Validation:**
2198+
2199+
Run active monitoring for at least one full monitoring window (minimum 30 minutes):
21862200
21872201
```bash
21882202
# Watch for re-compromise indicators in real time
@@ -2194,15 +2208,7 @@ crontab -l
21942208
wp cron event list
21952209
```
21962210
2197-
Run active monitoring for at least one full monitoring window (minimum 30 minutes) before reducing alerting posture.
2198-
2199-
**Escalation:**
2200-
2201-
- Escalate immediately via [Section 10.4](#104-incident-roles-and-escalation-path) to Security Officer and Incident Commander.
2202-
- If regulated data may be exposed, involve legal/compliance workflow before public disclosure.
2203-
- If compromise cannot be contained quickly, execute disaster recovery path in [Section 11.2](#112-full-site-restore-from-backup).
2204-
2205-
**Recovery Validation:**
2211+
Then confirm recovery:
22062212
22072213
```bash
22082214
wp user list --role=administrator --format=table
@@ -2218,12 +2224,7 @@ Then confirm:
22182224
- site behavior is normal for at least one monitoring window;
22192225
- incident report is completed in [Section 10.6](#106-post-incident-review).
22202226
2221-
**Post-Incident:**
2222-
- Contact affected users
2223-
- Monitor security vendor alerts
2224-
- File incident report
2225-
- Update security measures
2226-
- Schedule security audit
2227+
After all validation checks pass, initiate a full post-incident review per [Section 10.6](#106-post-incident-review), including affected-user notification and a security audit schedule.
22272228
22282229
### 10.4 Incident Roles and Escalation Path
22292230

0 commit comments

Comments
 (0)