sinapse-ai 9.3.0 → 9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/CLAUDE.md +56 -343
- package/.claude/rules/agent-authority.md +6 -0
- package/.claude/rules/agent-handoff.md +5 -0
- package/.claude/rules/cross-squad-routing.md +5 -0
- package/.claude/rules/hook-governance.md +6 -0
- package/.claude/rules/mcp-usage.md +3 -1
- package/.claude/rules/safe-collaboration.md +10 -0
- package/.claude/rules/security-data-protection.md +9 -0
- package/.claude/rules/squad-awareness.md +3 -1
- package/.claude/rules/tool-examples.md +6 -0
- package/.claude/rules/workflow-execution.md +7 -0
- package/.codex/agents/analyst.md +253 -72
- package/.codex/agents/architect.md +455 -68
- package/.codex/agents/data-engineer.md +492 -106
- package/.codex/agents/developer.md +560 -0
- package/.codex/agents/devops.md +518 -69
- package/.codex/agents/product-lead.md +335 -0
- package/.codex/agents/project-lead.md +377 -0
- package/.codex/agents/quality-gate.md +449 -0
- package/.codex/agents/sinapse-orqx.md +9 -7
- package/.codex/agents/sprint-lead.md +287 -0
- package/.codex/agents/squad-creator.md +344 -0
- package/.codex/agents/ux-design-expert.md +495 -0
- package/.codex/delegation-matrix.json +756 -44
- package/.codex/handoff-packet.schema.json +30 -6
- package/.sinapse-ai/data/entity-registry.yaml +175 -363
- package/.sinapse-ai/data/registry-update-log.jsonl +16 -0
- package/.sinapse-ai/development/agents/analyst.md +90 -0
- package/.sinapse-ai/development/agents/architect.md +73 -0
- package/.sinapse-ai/development/agents/developer.md +69 -0
- package/.sinapse-ai/development/agents/devops.md +117 -0
- package/.sinapse-ai/development/agents/quality-gate.md +85 -0
- package/.sinapse-ai/development/checklists/agent-quality-gate.md +27 -0
- package/.sinapse-ai/development/checklists/brownfield-compatibility-checklist.md +20 -0
- package/.sinapse-ai/development/checklists/code-review-checklist.md +106 -0
- package/.sinapse-ai/development/checklists/issue-triage-checklist.md +9 -0
- package/.sinapse-ai/development/checklists/memory-audit-checklist.md +16 -0
- package/.sinapse-ai/development/checklists/pr-quality-checklist.md +72 -0
- package/.sinapse-ai/development/checklists/security-deployment-checklist.md +54 -0
- package/.sinapse-ai/development/checklists/self-critique-checklist.md +19 -1
- package/.sinapse-ai/development/skills/debug.md +57 -0
- package/.sinapse-ai/development/skills/fast-review.md +69 -0
- package/.sinapse-ai/development/skills/research-synthesis.md +77 -0
- package/.sinapse-ai/development/skills/security-scan.md +73 -0
- package/.sinapse-ai/development/skills/verify.md +53 -0
- package/.sinapse-ai/development/templates/squad/agent-template.md +17 -4
- package/.sinapse-ai/development/templates/squad/checklist-template.md +13 -5
- package/.sinapse-ai/development/templates/squad/task-template.md +7 -0
- package/.sinapse-ai/development/templates/squad/workflow-template.yaml +7 -0
- package/.sinapse-ai/development/workflows/fast-track.yaml +87 -0
- package/.sinapse-ai/infrastructure/scripts/validate-codex-delegation.js +3 -1
- package/.sinapse-ai/install-manifest.yaml +71 -35
- package/docs/codex-integration-process.md +22 -0
- package/docs/codex-parity-program.md +27 -0
- package/docs/ide-integration.md +36 -0
- package/package.json +1 -1
- package/squads/claude-code-mastery/knowledge-base/claude-code-internals-reference.md +927 -0
- package/squads/squad-brand/knowledge-base/archetype-brand-mapping.md +12 -1
- package/squads/squad-brand/knowledge-base/brand-activism-cultural-branding.md +216 -0
- package/squads/squad-brand/knowledge-base/brand-audit-criteria.md +58 -0
- package/squads/squad-brand/knowledge-base/brand-digital-strategy.md +188 -0
- package/squads/squad-brand/knowledge-base/brand-legal-ip.md +222 -0
- package/squads/squad-brand/knowledge-base/brand-naming-framework.md +163 -0
- package/squads/squad-brand/knowledge-base/branding-master-reference.md +1001 -0
- package/squads/squad-brand/knowledge-base/color-psychology.md +25 -12
- package/squads/squad-brand/knowledge-base/employer-personal-branding.md +206 -0
- package/squads/squad-brand/knowledge-base/routing-catalog.md +34 -0
- package/squads/squad-brand/knowledge-base/sonic-branding-principles.md +6 -1
- package/squads/squad-brand/knowledge-base/typography-personality.md +34 -0
- package/squads/squad-claude/knowledge-base/context-window-optimization.md +334 -0
- package/squads/squad-claude/knowledge-base/knowledge-architecture-reference.md +403 -0
- package/squads/squad-claude/knowledge-base/memory-systems-reference.md +412 -0
- package/squads/squad-claude/knowledge-base/obsidian-claude-integration.md +423 -0
- package/squads/squad-claude/knowledge-base/retrieval-augmented-generation.md +320 -0
- package/squads/squad-claude/knowledge-base/skill-creation-patterns.md +380 -0
- package/squads/squad-claude/knowledge-base/swarm-orchestration-patterns.md +411 -0
- package/squads/squad-cloning/knowledge-base/clone-quality-assurance.md +211 -0
- package/squads/squad-cloning/knowledge-base/confidence-scoring.md +51 -0
- package/squads/squad-cloning/knowledge-base/cross-squad-deployment.md +47 -0
- package/squads/squad-cloning/knowledge-base/ethical-guidelines.md +237 -0
- package/squads/squad-cloning/knowledge-base/knowledge-graph-for-clones.md +295 -0
- package/squads/squad-cloning/knowledge-base/memory-architecture-for-clones.md +229 -0
- package/squads/squad-cloning/knowledge-base/multi-agent-deployment-patterns.md +320 -0
- package/squads/squad-cloning/knowledge-base/skill-standard-for-clones.md +262 -0
- package/squads/squad-cloning/knowledge-base/sop-extraction-guide.md +243 -0
- package/squads/squad-commercial/knowledge-base/account-based-selling.md +206 -0
- package/squads/squad-commercial/knowledge-base/ai-as-competitive-infrastructure.md +14 -0
- package/squads/squad-commercial/knowledge-base/ai-in-sales.md +199 -0
- package/squads/squad-commercial/knowledge-base/brazilian-sales-context.md +195 -0
- package/squads/squad-commercial/knowledge-base/customer-success-operations.md +83 -2
- package/squads/squad-commercial/knowledge-base/prospecting-pipeline-generation.md +69 -0
- package/squads/squad-commercial/knowledge-base/sales-enablement-playbook.md +260 -0
- package/squads/squad-commercial/knowledge-base/sales-methodology-comparison.md +185 -0
- package/squads/squad-commercial/knowledge-base/sales-revenue-master-reference.md +1123 -0
- package/squads/squad-content/knowledge-base/brazilian-content-context.md +176 -0
- package/squads/squad-content/knowledge-base/competitor-analysis-methods.md +40 -1
- package/squads/squad-content/knowledge-base/content-architecture-taxonomy.md +206 -0
- package/squads/squad-content/knowledge-base/content-formats-encyclopedia.md +58 -1
- package/squads/squad-content/knowledge-base/content-references-bibliography.md +130 -0
- package/squads/squad-content/knowledge-base/content-strategy-master-reference.md +1097 -0
- package/squads/squad-content/knowledge-base/content-tech-stack.md +150 -0
- package/squads/squad-content/knowledge-base/copywriting-formulas-library.md +188 -0
- package/squads/squad-content/knowledge-base/email-newsletter-strategy.md +161 -0
- package/squads/squad-content/knowledge-base/platform-algorithm-intelligence.md +86 -1
- package/squads/squad-content/knowledge-base/social-algorithms-master-reference.md +1007 -0
- package/squads/squad-content/knowledge-base/video-audio-content-playbook.md +218 -0
- package/squads/squad-copy/knowledge-base/ai-copy-production.md +254 -0
- package/squads/squad-copy/knowledge-base/brazilian-copywriting-context.md +242 -0
- package/squads/squad-copy/knowledge-base/email-copywriting-system.md +299 -0
- package/squads/squad-copy/knowledge-base/landing-page-copy-architecture.md +267 -0
- package/squads/squad-copy/knowledge-base/power-words-catalog.md +205 -0
- package/squads/squad-copy/knowledge-base/seo-copywriting.md +255 -0
- package/squads/squad-copy/knowledge-base/video-script-copywriting.md +239 -0
- package/squads/squad-council/knowledge-base/brand-strategy-models.md +193 -0
- package/squads/squad-council/knowledge-base/growth-strategy-models.md +267 -0
- package/squads/squad-council/knowledge-base/innovation-disruption-frameworks.md +193 -0
- package/squads/squad-council/knowledge-base/market-analysis-frameworks.md +240 -0
- package/squads/squad-council/knowledge-base/organizational-leadership-models.md +212 -0
- package/squads/squad-council/knowledge-base/sales-strategy-models.md +215 -0
- package/squads/squad-courses/knowledge-base/course-launch-strategy.md +251 -0
- package/squads/squad-courses/knowledge-base/domain-advocacia-curriculum.md +385 -0
- package/squads/squad-courses/knowledge-base/domain-contabilidade-curriculum.md +266 -0
- package/squads/squad-courses/knowledge-base/platform-comparison.md +68 -0
- package/squads/squad-courses/knowledge-base/video-production-guide.md +70 -0
- package/squads/squad-cybersecurity/knowledge-base/cloud-security-reference.md +363 -0
- package/squads/squad-cybersecurity/knowledge-base/compliance-frameworks.md +273 -0
- package/squads/squad-cybersecurity/knowledge-base/database-security.md +438 -0
- package/squads/squad-cybersecurity/knowledge-base/incident-response-playbook.md +420 -0
- package/squads/squad-cybersecurity/knowledge-base/network-security-reference.md +477 -0
- package/squads/squad-cybersecurity/knowledge-base/penetration-testing-methodology.md +350 -0
- package/squads/squad-cybersecurity/knowledge-base/vulnerability-management.md +349 -0
- package/squads/squad-design/knowledge-base/brazilian-design-context.md +223 -0
- package/squads/squad-design/knowledge-base/component-api-patterns.md +208 -4
- package/squads/squad-design/knowledge-base/design-system-master-reference.md +1302 -0
- package/squads/squad-design/knowledge-base/design-systems-frameworks.md +91 -1
- package/squads/squad-design/knowledge-base/responsive-modern-css.md +96 -4
- package/squads/squad-design/knowledge-base/wcag-aria-reference.md +117 -5
- package/squads/squad-design/knowledge-base/web-performance-reference.md +127 -4
- package/squads/squad-finance/knowledge-base/brazilian-taxation.md +263 -0
- package/squads/squad-finance/knowledge-base/contabilidade-master-reference.md +998 -0
- package/squads/squad-finance/knowledge-base/finance-master-reference.md +946 -0
- package/squads/squad-finance/knowledge-base/financial-reporting-analysis.md +316 -0
- package/squads/squad-finance/knowledge-base/fintech-brazilian-context.md +242 -0
- package/squads/squad-finance/knowledge-base/fpa-planning-frameworks.md +286 -0
- package/squads/squad-finance/knowledge-base/ma-and-transactions.md +285 -0
- package/squads/squad-finance/knowledge-base/risk-management.md +233 -0
- package/squads/squad-finance/knowledge-base/startups-venture-capital.md +337 -0
- package/squads/squad-growth/knowledge-base/ai-growth-playbook.md +216 -0
- package/squads/squad-growth/knowledge-base/attribution-models.md +78 -0
- package/squads/squad-growth/knowledge-base/brazilian-growth-context.md +208 -0
- package/squads/squad-growth/knowledge-base/community-led-growth.md +175 -0
- package/squads/squad-growth/knowledge-base/content-marketing-flywheel.md +190 -0
- package/squads/squad-growth/knowledge-base/email-lifecycle-framework.md +192 -0
- package/squads/squad-growth/knowledge-base/growth-frameworks-catalog.md +82 -0
- package/squads/squad-growth/knowledge-base/growth-master-reference.md +1168 -0
- package/squads/squad-growth/knowledge-base/routing-catalog.md +53 -11
- package/squads/squad-paidmedia/knowledge-base/audiences-segmentation-deep.md +285 -0
- package/squads/squad-paidmedia/knowledge-base/creative-strategy-deep.md +294 -0
- package/squads/squad-paidmedia/knowledge-base/google-ads-account-architecture.md +87 -0
- package/squads/squad-paidmedia/knowledge-base/meta-ads-campaign-architecture.md +76 -0
- package/squads/squad-paidmedia/knowledge-base/paid-media-metrics-reference.md +117 -0
- package/squads/squad-paidmedia/knowledge-base/paid-traffic-master-reference.md +1308 -0
- package/squads/squad-paidmedia/knowledge-base/routing-catalog.md +95 -18
- package/squads/squad-paidmedia/knowledge-base/traffic-masters-frameworks.md +71 -0
- package/squads/squad-product/knowledge-base/brazilian-product-context.md +284 -0
- package/squads/squad-product/knowledge-base/discovery-methodology-playbook.md +141 -0
- package/squads/squad-product/knowledge-base/pm-frameworks-reference.md +125 -9
- package/squads/squad-product/knowledge-base/product-analytics-formulas.md +72 -0
- package/squads/squad-product/knowledge-base/product-led-growth-reference.md +155 -13
- package/squads/squad-product/knowledge-base/product-market-fit-framework.md +222 -0
- package/squads/squad-product/knowledge-base/routing-catalog.md +32 -0
- package/squads/squad-research/knowledge-base/agentic-second-brain-reference.md +591 -0
- package/squads/squad-research/knowledge-base/ai-augmented-research.md +212 -0
- package/squads/squad-research/knowledge-base/brazilian-market-research-sources.md +197 -0
- package/squads/squad-research/knowledge-base/community-platforms-reference.md +786 -0
- package/squads/squad-research/knowledge-base/community-research-methods.md +194 -0
- package/squads/squad-research/knowledge-base/mixed-methods-research-design.md +168 -0
- package/squads/squad-research/knowledge-base/network-effects-analysis.md +192 -0
- package/squads/squad-research/knowledge-base/qualitative-research-deep-methods.md +202 -0
- package/squads/squad-research/knowledge-base/quantitative-research-methods.md +208 -0
- package/squads/squad-research/knowledge-base/research-frameworks-encyclopedia.md +40 -0
- package/squads/squad-research/knowledge-base/research-synthesis-frameworks.md +223 -0
- package/squads/squad-storytelling/knowledge-base/brand-mythology-framework.md +236 -0
- package/squads/squad-storytelling/knowledge-base/brazilian-storytelling-context.md +237 -0
- package/squads/squad-storytelling/knowledge-base/data-storytelling.md +232 -0
- package/squads/squad-storytelling/knowledge-base/improv-storytelling.md +226 -0
- package/squads/squad-storytelling/knowledge-base/persuasion-narrative-techniques.md +269 -0
- package/squads/squad-storytelling/knowledge-base/social-movement-narratives.md +191 -0
- package/squads/squad-storytelling/knowledge-base/video-storytelling.md +252 -0
- package/squads/claude-code-mastery/data/swarm-orchestration-patterns.yaml +0 -378
- package/squads/squad-animations/knowledge-base/framer-motion-complete-reference.md +0 -710
- package/squads/squad-animations/knowledge-base/web-animations-api-view-transitions.md +0 -478
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
# Incident Response Playbook
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Structured incident response methodology and communication templates for Rapid (incident-responder). Based on NIST SP 800-61 Rev. 2, SANS IR Process, and practical web application context including LGPD notification requirements.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## IR Framework Overview
|
|
10
|
+
|
|
11
|
+
Two complementary frameworks inform this playbook:
|
|
12
|
+
|
|
13
|
+
| Framework | Phases | Best For |
|
|
14
|
+
|-----------|--------|---------|
|
|
15
|
+
| **NIST SP 800-61** | Preparation → Detection & Analysis → Containment/Eradication/Recovery → Post-Incident | Comprehensive, government-aligned |
|
|
16
|
+
| **SANS 6-Step** | Preparation → Identification → Containment → Eradication → Recovery → Lessons Learned | Practical, widely adopted |
|
|
17
|
+
|
|
18
|
+
This playbook uses NIST structure with SANS terminology for clarity.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Severity Classification
|
|
23
|
+
|
|
24
|
+
Before executing the playbook, classify severity using the Fortress severity matrix:
|
|
25
|
+
|
|
26
|
+
| Level | Indicators | Response SLA | Escalation |
|
|
27
|
+
|-------|-----------|-------------|------------|
|
|
28
|
+
| **CRITICAL** | Active data exfiltration, ransomware deployed, zero-day exploited in production | 15 minutes to initial response | Rapid + Sentinel + Wire immediately |
|
|
29
|
+
| **HIGH** | Confirmed unauthorized access, credentials compromised, significant data exposed | 1 hour to initial assessment | Rapid primary, Sentinel support |
|
|
30
|
+
| **MEDIUM** | Suspicious activity confirmed, policy violation, limited exposure | 24 hours to initial assessment | Rapid assessment |
|
|
31
|
+
| **LOW** | Anomaly detected, potential policy violation | 5 business days | Scheduled review |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Phase 1: Preparation (Before Any Incident)
|
|
36
|
+
|
|
37
|
+
The effectiveness of incident response is determined almost entirely by preparation quality.
|
|
38
|
+
|
|
39
|
+
### Preparation Checklist
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
Documentation
|
|
43
|
+
[ ] Incident response plan approved and tested
|
|
44
|
+
[ ] Contact list current: CISO, legal, PR, DPO, ANPD contact
|
|
45
|
+
[ ] Asset inventory current — know what you're protecting
|
|
46
|
+
[ ] Data classification documented — know what data you hold
|
|
47
|
+
[ ] LGPD breach notification procedure documented
|
|
48
|
+
|
|
49
|
+
Technical Readiness
|
|
50
|
+
[ ] Centralized logging operational (SIEM, CloudWatch, Datadog)
|
|
51
|
+
[ ] Alerting rules configured and tuned
|
|
52
|
+
[ ] Forensic tools available (disk images, memory capture)
|
|
53
|
+
[ ] Out-of-band communication channel exists (separate from primary systems)
|
|
54
|
+
[ ] Backup integrity verified and restoration tested within 90 days
|
|
55
|
+
|
|
56
|
+
Legal and Compliance
|
|
57
|
+
[ ] Legal counsel identified and on retainer (or internal legal briefed)
|
|
58
|
+
[ ] Cyber insurance policy reviewed — coverage understood
|
|
59
|
+
[ ] ANPD (Brazil) notification procedure documented — 3 business days SLA
|
|
60
|
+
[ ] Regulatory notification requirements identified per data type
|
|
61
|
+
[ ] Evidence preservation procedures documented
|
|
62
|
+
|
|
63
|
+
Training
|
|
64
|
+
[ ] IR team trained on procedures
|
|
65
|
+
[ ] Tabletop exercise conducted in last 12 months
|
|
66
|
+
[ ] After-hours escalation procedure known to all team members
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Phase 2: Detection and Analysis
|
|
72
|
+
|
|
73
|
+
### Detection Sources
|
|
74
|
+
|
|
75
|
+
| Source | What It Detects | Priority |
|
|
76
|
+
|--------|----------------|---------|
|
|
77
|
+
| SIEM alerts | Anomalous access patterns, known attack signatures | High |
|
|
78
|
+
| User reports | Unusual behavior, phishing reports, lockout issues | High |
|
|
79
|
+
| Automated scans | Vulnerability confirmations, configuration changes | Medium |
|
|
80
|
+
| Third-party notification | Vendor/partner breach affecting your data | High |
|
|
81
|
+
| Threat intelligence | IOCs matching your environment | Medium |
|
|
82
|
+
| Audit log review | Scheduled review finds anomalies | Low |
|
|
83
|
+
|
|
84
|
+
### Initial Triage Questions
|
|
85
|
+
|
|
86
|
+
When an alert fires or report arrives, answer in order:
|
|
87
|
+
|
|
88
|
+
1. **What is the affected system/data?** — identify scope
|
|
89
|
+
2. **What is the timeline?** — when did this start?
|
|
90
|
+
3. **Is this still ongoing?** — active vs. historical incident
|
|
91
|
+
4. **What data could be exposed?** — PII, credentials, financial, IP
|
|
92
|
+
5. **Is the attacker still present?** — look for persistence indicators
|
|
93
|
+
6. **What is the business impact?** — revenue, reputation, legal
|
|
94
|
+
|
|
95
|
+
### Evidence Collection (Do This First)
|
|
96
|
+
|
|
97
|
+
Preserve evidence before taking containment actions that might destroy it:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Capture volatile memory before shutdown or isolation
|
|
101
|
+
# Linux
|
|
102
|
+
sudo avml /media/evidence/memory.lime
|
|
103
|
+
|
|
104
|
+
# Windows
|
|
105
|
+
# Use WinPmem or DumpIt
|
|
106
|
+
|
|
107
|
+
# Capture running processes
|
|
108
|
+
ps aux > /evidence/processes.txt
|
|
109
|
+
netstat -natp > /evidence/network.txt
|
|
110
|
+
last > /evidence/last-logins.txt
|
|
111
|
+
|
|
112
|
+
# Capture logs before they rotate
|
|
113
|
+
cp /var/log/auth.log /evidence/
|
|
114
|
+
cp /var/log/nginx/access.log /evidence/
|
|
115
|
+
cp /var/log/nginx/error.log /evidence/
|
|
116
|
+
|
|
117
|
+
# Create filesystem image (if forensic analysis needed)
|
|
118
|
+
sudo dd if=/dev/sda of=/media/evidence/disk.img bs=4M status=progress
|
|
119
|
+
# Hash the image
|
|
120
|
+
sha256sum /media/evidence/disk.img > /media/evidence/disk.img.sha256
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### IOC Analysis
|
|
124
|
+
|
|
125
|
+
When examining suspicious artifacts:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# Check file hash against VirusTotal
|
|
129
|
+
sha256sum suspicious_file | awk '{print $1}' | xargs -I{} curl -s \
|
|
130
|
+
"https://www.virustotal.com/api/v3/files/{}" -H "x-apikey: $VT_API_KEY"
|
|
131
|
+
|
|
132
|
+
# Check IP against threat intel
|
|
133
|
+
curl "https://api.abuseipdb.com/api/v2/check?ipAddress=1.2.3.4" \
|
|
134
|
+
-H "Key: $ABUSEIPDB_API_KEY" -H "Accept: application/json"
|
|
135
|
+
|
|
136
|
+
# Analyze network connections
|
|
137
|
+
netstat -natp | grep ESTABLISHED
|
|
138
|
+
ss -tulpn
|
|
139
|
+
|
|
140
|
+
# Check for web shells (common indicator for web app compromises)
|
|
141
|
+
find /var/www -name "*.php" -newer /var/www/index.php -exec ls -la {} \;
|
|
142
|
+
grep -r "eval(base64_decode" /var/www/ --include="*.php"
|
|
143
|
+
grep -r "system($_" /var/www/ --include="*.php"
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Phase 3: Containment
|
|
149
|
+
|
|
150
|
+
### Containment Decision Tree
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
Is the attacker actively present and causing damage?
|
|
154
|
+
YES → Emergency containment (isolate immediately, accept service disruption)
|
|
155
|
+
NO → Coordinated containment (observe and gather evidence while containing)
|
|
156
|
+
|
|
157
|
+
Can you contain without losing all evidence?
|
|
158
|
+
YES → Contain first, preserve evidence
|
|
159
|
+
NO → Preserve evidence first (set time limit: max 2 hours)
|
|
160
|
+
|
|
161
|
+
Is this a web application compromise?
|
|
162
|
+
YES → See Web App Containment below
|
|
163
|
+
|
|
164
|
+
Is this a cloud account compromise?
|
|
165
|
+
YES → See Cloud Account Containment below
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Web Application Containment
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
# 1. Preserve logs before any action
|
|
172
|
+
# Copy all access logs, error logs, application logs
|
|
173
|
+
|
|
174
|
+
# 2. Revoke compromised sessions immediately
|
|
175
|
+
# Supabase: invalidate all user sessions
|
|
176
|
+
# In Supabase dashboard → Authentication → Users → Invalidate session
|
|
177
|
+
# Or via API:
|
|
178
|
+
curl -X DELETE "https://api.supabase.io/v1/projects/$PROJECT_ID/auth/users/$USER_ID/sessions" \
|
|
179
|
+
-H "Authorization: Bearer $SERVICE_ROLE_KEY"
|
|
180
|
+
|
|
181
|
+
# 3. Rotate compromised credentials
|
|
182
|
+
# API keys, database passwords, JWT secrets
|
|
183
|
+
|
|
184
|
+
# 4. Block malicious IPs at WAF/Cloudflare
|
|
185
|
+
# In Cloudflare Dashboard → Security → WAF → Custom Rules
|
|
186
|
+
# Or via API:
|
|
187
|
+
curl -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/firewall/rules" \
|
|
188
|
+
-H "Authorization: Bearer $CF_TOKEN" \
|
|
189
|
+
-d '{"action":"block","filter":{"expression":"ip.src eq 1.2.3.4"}}'
|
|
190
|
+
|
|
191
|
+
# 5. Enable forced MFA if credentials leaked
|
|
192
|
+
# Force re-authentication for all users
|
|
193
|
+
|
|
194
|
+
# 6. Deploy emergency WAF rules (temporary, until fix deployed)
|
|
195
|
+
# Block attack pattern that was exploited
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Cloud Account Containment
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# AWS: Disable compromised IAM user immediately
|
|
202
|
+
aws iam update-user --user-name compromised-user
|
|
203
|
+
aws iam delete-access-key --user-name compromised-user --access-key-id AKID...
|
|
204
|
+
|
|
205
|
+
# Revoke all active sessions for a role
|
|
206
|
+
aws iam put-role-policy --role-name MyRole --policy-name DenyAll \
|
|
207
|
+
--policy-document '{"Version":"2012-10-17","Statement":[{"Effect":"Deny","Action":"*","Resource":"*"}]}'
|
|
208
|
+
|
|
209
|
+
# GCP: Disable service account
|
|
210
|
+
gcloud iam service-accounts disable compromised-sa@project.iam.gserviceaccount.com
|
|
211
|
+
|
|
212
|
+
# Azure: Disable user account
|
|
213
|
+
az ad user update --id compromised@tenant.com --account-enabled false
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Phase 4: Eradication
|
|
219
|
+
|
|
220
|
+
After containment, remove the attacker's foothold:
|
|
221
|
+
|
|
222
|
+
### Eradication Checklist
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
[ ] Identified and removed all malicious files (web shells, backdoors, malware)
|
|
226
|
+
[ ] Compared current application code against known-good baseline
|
|
227
|
+
[ ] Closed all unauthorized accounts or access paths
|
|
228
|
+
[ ] Rotated all credentials that could be compromised
|
|
229
|
+
[ ] Removed all persistence mechanisms (cron jobs, startup scripts, scheduled tasks)
|
|
230
|
+
[ ] Identified and patched the vulnerability that was exploited
|
|
231
|
+
[ ] Scanned all systems in same network segment for related compromise
|
|
232
|
+
[ ] Verified no exfiltration pathways remain
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Web Shell Detection
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
# Common web shell indicators
|
|
239
|
+
find /var/www -name "*.php" -type f | xargs grep -l "eval\|base64_decode\|system\|exec\|passthru"
|
|
240
|
+
find /var/www -name "*.php" -newer /etc/passwd # Recently modified PHP files
|
|
241
|
+
find /var/www -name "*.php.jpg" # Double extension files
|
|
242
|
+
find /uploads -name "*.php" # PHP in upload directories (should never exist)
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Phase 5: Recovery
|
|
248
|
+
|
|
249
|
+
### Recovery Sequence
|
|
250
|
+
|
|
251
|
+
1. **Verify eradication** — ensure attacker has no remaining access
|
|
252
|
+
2. **Restore from clean backup** if system was compromised at the file/OS level
|
|
253
|
+
3. **Deploy patched code** with the vulnerability fixed
|
|
254
|
+
4. **Monitor intensively** for first 48-72 hours after recovery
|
|
255
|
+
5. **Gradually restore access** — don't turn everything on at once
|
|
256
|
+
6. **Validate functionality** — confirm application works correctly
|
|
257
|
+
7. **Communicate recovery** to affected users and stakeholders
|
|
258
|
+
|
|
259
|
+
### Backup Restoration
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
# Verify backup integrity before restoration
|
|
263
|
+
sha256sum backup.tar.gz
|
|
264
|
+
# Compare with stored hash from when backup was created
|
|
265
|
+
|
|
266
|
+
# For Supabase:
|
|
267
|
+
# Restore from backup via Supabase Dashboard
|
|
268
|
+
# Settings → Database → Backups → Select backup → Restore
|
|
269
|
+
|
|
270
|
+
# For self-managed PostgreSQL:
|
|
271
|
+
pg_restore -h localhost -U postgres -d mydb clean_backup.dump
|
|
272
|
+
|
|
273
|
+
# For filesystem:
|
|
274
|
+
tar xzf clean_backup.tar.gz --directory /var/www/html/
|
|
275
|
+
# Verify file hashes after restoration
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Phase 6: Post-Incident Review
|
|
281
|
+
|
|
282
|
+
Conduct within 7 days of resolution.
|
|
283
|
+
|
|
284
|
+
### Post-Mortem Template (Blameless)
|
|
285
|
+
|
|
286
|
+
```markdown
|
|
287
|
+
# Post-Mortem: [Incident Name] — [Date]
|
|
288
|
+
|
|
289
|
+
## Impact Summary
|
|
290
|
+
- Duration:
|
|
291
|
+
- Systems affected:
|
|
292
|
+
- Users affected:
|
|
293
|
+
- Data exposed (if any):
|
|
294
|
+
- Business impact:
|
|
295
|
+
|
|
296
|
+
## Root Cause
|
|
297
|
+
[What was the underlying vulnerability or failure that enabled the incident?]
|
|
298
|
+
|
|
299
|
+
## Timeline
|
|
300
|
+
[When events were, accurate to the minute]
|
|
301
|
+
|
|
302
|
+
## What Went Well
|
|
303
|
+
- Detection was fast because...
|
|
304
|
+
- Containment was effective because...
|
|
305
|
+
|
|
306
|
+
## What Could Improve
|
|
307
|
+
- We could have detected faster if...
|
|
308
|
+
- Containment was slow because...
|
|
309
|
+
|
|
310
|
+
## Action Items
|
|
311
|
+
| Action | Owner | Due Date | Priority |
|
|
312
|
+
|--------|-------|----------|---------|
|
|
313
|
+
| [Specific fix] | [Person] | [Date] | [P1/P2/P3] |
|
|
314
|
+
|
|
315
|
+
## Lessons Learned
|
|
316
|
+
[3-5 key takeaways for the broader team]
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## LGPD Breach Notification
|
|
322
|
+
|
|
323
|
+
Brazilian law requires notification within 3 business days of becoming aware of a breach involving personal data.
|
|
324
|
+
|
|
325
|
+
### Decision Tree: Do I Need to Notify?
|
|
326
|
+
|
|
327
|
+
```
|
|
328
|
+
Was personal data accessed, exposed, or stolen?
|
|
329
|
+
YES → Was the data encrypted in a way that prevents access?
|
|
330
|
+
NO → Notification required
|
|
331
|
+
YES → May not be required (consult legal)
|
|
332
|
+
NO → No notification required
|
|
333
|
+
|
|
334
|
+
Is this a security incident without personal data exposure?
|
|
335
|
+
→ No LGPD notification required (but document for internal records)
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### ANPD Notification Requirements
|
|
339
|
+
|
|
340
|
+
```
|
|
341
|
+
Timeframe: 3 business days from discovery
|
|
342
|
+
Channel: ANPD portal (https://www.gov.br/anpd/pt-br)
|
|
343
|
+
Email: anpd@anpd.gov.br
|
|
344
|
+
|
|
345
|
+
Required Information:
|
|
346
|
+
- Description of what happened
|
|
347
|
+
- Date of incident and date of discovery
|
|
348
|
+
- Categories and volume of personal data affected
|
|
349
|
+
- Categories of data subjects affected
|
|
350
|
+
- Potential consequences of the incident
|
|
351
|
+
- Technical and organizational measures adopted
|
|
352
|
+
- DPO contact information
|
|
353
|
+
- Measures implemented to mitigate effects
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### Notification to Data Subjects
|
|
357
|
+
|
|
358
|
+
```
|
|
359
|
+
Timeline: As soon as reasonably practicable after ANPD notification
|
|
360
|
+
Content:
|
|
361
|
+
- Plain language description of what happened
|
|
362
|
+
- What personal data was involved
|
|
363
|
+
- What risks exist for the individual
|
|
364
|
+
- What the organization has done
|
|
365
|
+
- What the individual can do to protect themselves
|
|
366
|
+
- Contact information for questions
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### Communication Templates
|
|
370
|
+
|
|
371
|
+
**Initial internal notification (within 1 hour of detection):**
|
|
372
|
+
```
|
|
373
|
+
SUBJECT: [CONFIDENTIAL] Security Incident Alert — [Severity Level]
|
|
374
|
+
|
|
375
|
+
Incident detected at [time] on [date].
|
|
376
|
+
Type: [breach/unauthorized access/data exposure]
|
|
377
|
+
Affected systems: [list]
|
|
378
|
+
Currently investigating.
|
|
379
|
+
|
|
380
|
+
Initial IR team activated: [names]
|
|
381
|
+
Next update at: [time]
|
|
382
|
+
War room: [location/link]
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
**User notification template:**
|
|
386
|
+
```
|
|
387
|
+
Dear [User],
|
|
388
|
+
|
|
389
|
+
We are writing to inform you about a security incident that may have affected
|
|
390
|
+
your account on [Application Name].
|
|
391
|
+
|
|
392
|
+
What happened:
|
|
393
|
+
On [date], we discovered [brief description of incident].
|
|
394
|
+
|
|
395
|
+
What information was involved:
|
|
396
|
+
[Specific data types: email, name, etc. — be specific, not vague]
|
|
397
|
+
|
|
398
|
+
What we have done:
|
|
399
|
+
- [Action 1]
|
|
400
|
+
- [Action 2]
|
|
401
|
+
|
|
402
|
+
What you should do:
|
|
403
|
+
- Change your password immediately at [URL]
|
|
404
|
+
- Enable two-factor authentication
|
|
405
|
+
- Monitor your email for unusual activity
|
|
406
|
+
|
|
407
|
+
If you have questions, contact us at [security@example.com]
|
|
408
|
+
|
|
409
|
+
Sincerely,
|
|
410
|
+
[Organization]
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
## Sources
|
|
416
|
+
|
|
417
|
+
- NIST SP 800-61 Rev. 2: https://csrc.nist.gov/publications/detail/sp/800-61/rev-2/final
|
|
418
|
+
- CISA Federal IR Playbooks: https://www.cisa.gov/sites/default/files/2024-08/Federal_Government_Cybersecurity_Incident_and_Vulnerability_Response_Playbooks_508C.pdf
|
|
419
|
+
- LGPD Art. 48: http://www.planalto.gov.br/ccivil_03/_ato2015-2018/2018/lei/l13709.htm
|
|
420
|
+
- ANPD Breach Notification: https://www.gov.br/anpd/pt-br/assuntos/noticias/anpd-publica-resolucao-sobre-comunicacao-de-incidentes
|