@vantagesec/socc 0.1.12 → 0.1.14
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/.socc/agents/socc.md +256 -0
- package/.socc/rules/socc-business-rules.md +328 -0
- package/.socc/skills/code-review-excellence/SKILL.md +538 -0
- package/.socc/skills/cybersecurity-analyst/QUICK_REFERENCE.md +263 -0
- package/.socc/skills/cybersecurity-analyst/README.md +243 -0
- package/.socc/skills/cybersecurity-analyst/SKILL.md +1707 -0
- package/.socc/skills/cybersecurity-analyst/tests/quiz.md +472 -0
- package/.socc/skills/data-visualization/SKILL.md +304 -0
- package/.socc/skills/deep-research/SKILL.md +192 -0
- package/.socc/skills/excel-analysis/SKILL.md +247 -0
- package/.socc/skills/find-skills/SKILL.md +133 -0
- package/.socc/skills/humanizer/README.md +120 -0
- package/.socc/skills/humanizer/SKILL.md +439 -0
- package/.socc/skills/malware-behavior/SKILL.md +54 -0
- package/.socc/skills/mitre/SKILL.md +200 -0
- package/.socc/skills/observability-logs-search/SKILL.md +237 -0
- package/.socc/skills/observability-logs-search/references/log-search-reference.md +76 -0
- package/.socc/skills/payload-triage/SKILL.md +53 -0
- package/.socc/skills/phishing-analysis/SKILL.md +51 -0
- package/.socc/skills/prd/SKILL.md +143 -0
- package/.socc/skills/remembering-conversations/MCP-TOOLS.md +137 -0
- package/.socc/skills/remembering-conversations/SKILL.md +65 -0
- package/.socc/skills/sequential-thinking/README.md +118 -0
- package/.socc/skills/sequential-thinking/SKILL.md +93 -0
- package/.socc/skills/sequential-thinking/references/advanced.md +122 -0
- package/.socc/skills/sequential-thinking/references/examples.md +274 -0
- package/.socc/skills/soc-generalist/SKILL.md +53 -0
- package/.socc/skills/suspicious-url/SKILL.md +51 -0
- package/.socc/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/.socc/skills/systematic-debugging/SKILL.md +296 -0
- package/.socc/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/.socc/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/.socc/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/.socc/skills/systematic-debugging/find-polluter.sh +63 -0
- package/.socc/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/.socc/skills/systematic-debugging/test-academic.md +14 -0
- package/.socc/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/.socc/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/.socc/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/.socc/skills/translation-expertise/SKILL.md +284 -0
- package/.socc/skills/translation-expertise/chinese-traditional.md +535 -0
- package/.socc/skills/translation-expertise/english.md +372 -0
- package/.socc/skills/translation-expertise/japanese.md +515 -0
- package/.socc/skills/translation-expertise/tools-resources.md +527 -0
- package/.socc/skills/translation-expertise/translation-challenges.md +603 -0
- package/.socc/skills/web-search/SKILL.md +322 -0
- package/README.md +8 -8
- package/dist/cli.mjs +10702 -10799
- package/package.json +7 -5
- package/scripts/bootstrap-socc-soul.mjs +369 -26
- package/.claude/agents/socc.md +0 -316
- package/socc-canonical/.agents/generated/socc-agent-manifest.json +0 -16
- package/socc-canonical/.agents/generated/socc-agent.md +0 -316
- package/socc-canonical/.agents/soc-copilot/AGENTS.md +0 -33
- package/socc-canonical/.agents/soc-copilot/MEMORY.md +0 -26
- package/socc-canonical/.agents/soc-copilot/SKILL.md +0 -55
- package/socc-canonical/.agents/soc-copilot/SOUL.md +0 -48
- package/socc-canonical/.agents/soc-copilot/TOOLS.md +0 -47
- package/socc-canonical/.agents/soc-copilot/USER.md +0 -32
- package/socc-canonical/.agents/soc-copilot/identity.md +0 -13
- package/socc-canonical/.agents/soc-copilot/schemas/analysis_response.json +0 -119
- package/socc-canonical/.agents/soc-copilot/skills.md +0 -28
- package/socc-canonical/README.md +0 -8
- /package/{socc-canonical/.agents/soc-copilot → .socc}/references/evidence-rules.md +0 -0
- /package/{socc-canonical/.agents/soc-copilot → .socc}/references/intelligence-source-registry.md +0 -0
- /package/{socc-canonical/.agents/soc-copilot → .socc}/references/ioc-extraction.md +0 -0
- /package/{socc-canonical/.agents/soc-copilot → .socc}/references/knowledge-ingestion-policy.md +0 -0
- /package/{socc-canonical/.agents/soc-copilot → .socc}/references/mitre-guidance.md +0 -0
- /package/{socc-canonical/.agents/soc-copilot → .socc}/references/output-contract.md +0 -0
- /package/{socc-canonical/.agents/soc-copilot → .socc}/references/security-json-patterns.md +0 -0
- /package/{socc-canonical/.agents/soc-copilot → .socc}/references/telemetry-investigation-patterns.md +0 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
# Cybersecurity Analyst - Quick Reference
|
|
2
|
+
|
|
3
|
+
## TL;DR
|
|
4
|
+
|
|
5
|
+
Analyze systems through security lenses: threat modeling (STRIDE), vulnerability assessment, cryptography validation, access control, incident response, and application security. Apply defense-in-depth and assume breach mentality to protect confidentiality, integrity, and availability.
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
**Perfect For:**
|
|
10
|
+
|
|
11
|
+
- System and application security design
|
|
12
|
+
- Threat modeling and risk assessment
|
|
13
|
+
- Code review for security vulnerabilities
|
|
14
|
+
- Incident response and forensics
|
|
15
|
+
- Compliance assessment (SOC 2, GDPR, HIPAA)
|
|
16
|
+
- Security architecture review
|
|
17
|
+
- Penetration testing scoping
|
|
18
|
+
- Cryptography implementation review
|
|
19
|
+
- Access control design
|
|
20
|
+
|
|
21
|
+
**Skip If:**
|
|
22
|
+
|
|
23
|
+
- System has no security requirements
|
|
24
|
+
- Working with purely public, non-sensitive data
|
|
25
|
+
- Focused on pure functionality without threat context
|
|
26
|
+
|
|
27
|
+
## Core Frameworks
|
|
28
|
+
|
|
29
|
+
### CIA Triad
|
|
30
|
+
|
|
31
|
+
The foundation of security:
|
|
32
|
+
|
|
33
|
+
- **Confidentiality** - Prevent unauthorized information disclosure
|
|
34
|
+
- **Integrity** - Prevent unauthorized modification
|
|
35
|
+
- **Availability** - Ensure authorized users can access system
|
|
36
|
+
|
|
37
|
+
### STRIDE Threat Model
|
|
38
|
+
|
|
39
|
+
Six threat categories:
|
|
40
|
+
|
|
41
|
+
1. **Spoofing** - Impersonating user/system (authentication)
|
|
42
|
+
2. **Tampering** - Modifying data/code (integrity)
|
|
43
|
+
3. **Repudiation** - Denying actions (logging/audit)
|
|
44
|
+
4. **Information Disclosure** - Exposing data (confidentiality)
|
|
45
|
+
5. **Denial of Service** - Making unavailable (availability)
|
|
46
|
+
6. **Elevation of Privilege** - Gaining unauthorized access (authorization)
|
|
47
|
+
|
|
48
|
+
### OWASP Top 10 (2021)
|
|
49
|
+
|
|
50
|
+
Most critical web vulnerabilities:
|
|
51
|
+
|
|
52
|
+
1. Broken Access Control
|
|
53
|
+
2. Cryptographic Failures
|
|
54
|
+
3. Injection
|
|
55
|
+
4. Insecure Design
|
|
56
|
+
5. Security Misconfiguration
|
|
57
|
+
6. Vulnerable and Outdated Components
|
|
58
|
+
7. Identification and Authentication Failures
|
|
59
|
+
8. Software and Data Integrity Failures
|
|
60
|
+
9. Security Logging and Monitoring Failures
|
|
61
|
+
10. Server-Side Request Forgery (SSRF)
|
|
62
|
+
|
|
63
|
+
### Defense in Depth
|
|
64
|
+
|
|
65
|
+
Multiple security layers:
|
|
66
|
+
|
|
67
|
+
- **Perimeter** - Firewall, VPN
|
|
68
|
+
- **Network** - Segmentation, IDS/IPS
|
|
69
|
+
- **Host** - Endpoint protection, hardening
|
|
70
|
+
- **Application** - Input validation, secure coding
|
|
71
|
+
- **Data** - Encryption, access control
|
|
72
|
+
- **User** - MFA, least privilege, training
|
|
73
|
+
|
|
74
|
+
## Quick Analysis Steps
|
|
75
|
+
|
|
76
|
+
### Step 1: Asset and Trust Boundary Identification (5 min)
|
|
77
|
+
|
|
78
|
+
- What assets need protection? (data, systems, users)
|
|
79
|
+
- What are the trust boundaries? (internet/DMZ, DMZ/internal, user/admin)
|
|
80
|
+
- Who are potential attackers? (external, insider, nation-state)
|
|
81
|
+
- What's the impact if compromised? (financial, reputation, legal)
|
|
82
|
+
|
|
83
|
+
### Step 2: STRIDE Threat Modeling (10 min)
|
|
84
|
+
|
|
85
|
+
For each component/interface:
|
|
86
|
+
|
|
87
|
+
- **S**: Can attacker impersonate? (weak auth, no MFA)
|
|
88
|
+
- **T**: Can data be tampered? (no integrity checks, MITM)
|
|
89
|
+
- **R**: Can actions be denied? (no audit logging)
|
|
90
|
+
- **I**: Can data be leaked? (no encryption, excessive permissions)
|
|
91
|
+
- **D**: Can service be disrupted? (no rate limiting, resource exhaustion)
|
|
92
|
+
- **E**: Can privileges be escalated? (injection flaws, broken access control)
|
|
93
|
+
|
|
94
|
+
### Step 3: Vulnerability Identification (10 min)
|
|
95
|
+
|
|
96
|
+
Check for common vulnerabilities:
|
|
97
|
+
|
|
98
|
+
- **Input validation** - SQL injection, XSS, command injection
|
|
99
|
+
- **Authentication** - Weak passwords, no MFA, session fixation
|
|
100
|
+
- **Authorization** - Broken access control, insecure direct object references
|
|
101
|
+
- **Cryptography** - Weak algorithms, hardcoded keys, plain text passwords
|
|
102
|
+
- **Configuration** - Default credentials, unnecessary services, verbose errors
|
|
103
|
+
- **Dependencies** - Known CVEs, outdated libraries
|
|
104
|
+
|
|
105
|
+
### Step 4: Attack Surface Assessment (7 min)
|
|
106
|
+
|
|
107
|
+
- List all entry points (APIs, forms, file uploads, network ports)
|
|
108
|
+
- Identify external vs. internal interfaces
|
|
109
|
+
- Map unauthenticated vs. authenticated access
|
|
110
|
+
- Count input sources requiring validation
|
|
111
|
+
- Prioritize highest-risk interfaces
|
|
112
|
+
|
|
113
|
+
### Step 5: Security Controls Evaluation (10 min)
|
|
114
|
+
|
|
115
|
+
Assess existing controls:
|
|
116
|
+
|
|
117
|
+
- **Prevention** - Input validation, access control, encryption
|
|
118
|
+
- **Detection** - Logging, monitoring, anomaly detection
|
|
119
|
+
- **Response** - Incident response plan, backup/recovery
|
|
120
|
+
- **Gaps** - What's missing? What's weak?
|
|
121
|
+
|
|
122
|
+
### Step 6: Risk Prioritization and Recommendations (8 min)
|
|
123
|
+
|
|
124
|
+
- Calculate risk: Likelihood × Impact
|
|
125
|
+
- Prioritize by CVSS score or qualitative risk (Critical, High, Medium, Low)
|
|
126
|
+
- Recommend mitigations (prevent, detect, respond)
|
|
127
|
+
- Quick wins vs. long-term hardening
|
|
128
|
+
- Ensure defense in depth
|
|
129
|
+
|
|
130
|
+
## Key Security Principles
|
|
131
|
+
|
|
132
|
+
### Least Privilege
|
|
133
|
+
|
|
134
|
+
Give minimum necessary permissions:
|
|
135
|
+
|
|
136
|
+
- Users: Only access they need for their job
|
|
137
|
+
- Services: Run with minimal OS privileges
|
|
138
|
+
- APIs: Scoped tokens, not full access
|
|
139
|
+
- Databases: Specific grants, not root
|
|
140
|
+
|
|
141
|
+
### Fail Securely
|
|
142
|
+
|
|
143
|
+
On error, default to secure state:
|
|
144
|
+
|
|
145
|
+
- Authentication failure → Deny access (not grant)
|
|
146
|
+
- Authorization error → Deny (not allow)
|
|
147
|
+
- Crypto error → Reject (not continue insecurely)
|
|
148
|
+
|
|
149
|
+
### Never Trust Input
|
|
150
|
+
|
|
151
|
+
All input is malicious until validated:
|
|
152
|
+
|
|
153
|
+
- Validate on server side (not just client)
|
|
154
|
+
- Whitelist, don't blacklist
|
|
155
|
+
- Encode output to prevent XSS
|
|
156
|
+
- Use parameterized queries to prevent SQLi
|
|
157
|
+
|
|
158
|
+
### Defense in Depth
|
|
159
|
+
|
|
160
|
+
Never rely on single security control - layer multiple defenses.
|
|
161
|
+
|
|
162
|
+
## Common Vulnerabilities
|
|
163
|
+
|
|
164
|
+
### Injection Flaws
|
|
165
|
+
|
|
166
|
+
**SQL Injection**: Attacker injects SQL into queries
|
|
167
|
+
|
|
168
|
+
- **Prevention**: Parameterized queries, ORMs, input validation
|
|
169
|
+
|
|
170
|
+
**Command Injection**: Attacker executes OS commands
|
|
171
|
+
|
|
172
|
+
- **Prevention**: Avoid system calls, validate/sanitize input, use safe APIs
|
|
173
|
+
|
|
174
|
+
**XSS (Cross-Site Scripting)**: Attacker injects malicious scripts
|
|
175
|
+
|
|
176
|
+
- **Prevention**: Output encoding, Content Security Policy, HTTPOnly cookies
|
|
177
|
+
|
|
178
|
+
### Broken Authentication
|
|
179
|
+
|
|
180
|
+
- **Weak passwords**: No complexity requirements
|
|
181
|
+
- **No MFA**: Single factor is insufficient
|
|
182
|
+
- **Session fixation/hijacking**: Predictable session IDs
|
|
183
|
+
|
|
184
|
+
**Prevention**: Strong password policy, MFA, secure session management
|
|
185
|
+
|
|
186
|
+
### Broken Access Control
|
|
187
|
+
|
|
188
|
+
- **IDOR (Insecure Direct Object References)**: Access objects by guessing IDs
|
|
189
|
+
- **Path traversal**: Access unauthorized files (../../../etc/passwd)
|
|
190
|
+
- **Missing authorization**: Forgot to check permissions
|
|
191
|
+
|
|
192
|
+
**Prevention**: Validate authorization on every request, use indirect references
|
|
193
|
+
|
|
194
|
+
### Sensitive Data Exposure
|
|
195
|
+
|
|
196
|
+
- **Unencrypted data**: Plain text passwords, credit cards
|
|
197
|
+
- **Weak crypto**: MD5, DES, ECB mode
|
|
198
|
+
- **Insecure transmission**: HTTP instead of HTTPS
|
|
199
|
+
|
|
200
|
+
**Prevention**: Encrypt at rest and in transit, use strong algorithms (AES-256, SHA-256, Argon2)
|
|
201
|
+
|
|
202
|
+
## Resources
|
|
203
|
+
|
|
204
|
+
### Quick Checklists
|
|
205
|
+
|
|
206
|
+
- **OWASP Top 10** - Most critical web vulnerabilities
|
|
207
|
+
- **OWASP ASVS** - Application Security Verification Standard
|
|
208
|
+
- **CIS Benchmarks** - Hardening guides for systems
|
|
209
|
+
|
|
210
|
+
### Essential Tools
|
|
211
|
+
|
|
212
|
+
- **Burp Suite** - Web security testing
|
|
213
|
+
- **OWASP ZAP** - Automated vulnerability scanning
|
|
214
|
+
- **Snyk/Dependabot** - Dependency vulnerability checking
|
|
215
|
+
- **Nmap** - Network reconnaissance
|
|
216
|
+
- **Wireshark** - Network traffic analysis
|
|
217
|
+
|
|
218
|
+
### Learning Resources
|
|
219
|
+
|
|
220
|
+
- **PortSwigger Web Security Academy** - Free web security training
|
|
221
|
+
- **OWASP Cheat Sheets** - Quick security guidance
|
|
222
|
+
- **HackerOne/BugCrowd** - Bug bounty programs for practice
|
|
223
|
+
|
|
224
|
+
## Red Flags
|
|
225
|
+
|
|
226
|
+
**Major Security Issues:**
|
|
227
|
+
|
|
228
|
+
- Passwords in plain text or weak hashes (MD5, SHA-1)
|
|
229
|
+
- No input validation on user-supplied data
|
|
230
|
+
- Hardcoded secrets (API keys, passwords) in code
|
|
231
|
+
- Default credentials not changed
|
|
232
|
+
- No HTTPS (HTTP only)
|
|
233
|
+
- Missing authentication/authorization checks
|
|
234
|
+
- Verbose error messages exposing system details
|
|
235
|
+
- SQL queries built with string concatenation
|
|
236
|
+
- Outdated dependencies with known CVEs
|
|
237
|
+
- No security logging or monitoring
|
|
238
|
+
|
|
239
|
+
## Integration Tips
|
|
240
|
+
|
|
241
|
+
Combine with other skills:
|
|
242
|
+
|
|
243
|
+
- **Computer Scientist** - Cryptography theory, complexity
|
|
244
|
+
- **Lawyer** - Compliance and regulatory requirements
|
|
245
|
+
- **Systems Thinker** - Attack propagation and cascading failures
|
|
246
|
+
- **Psychologist** - Social engineering and human factors
|
|
247
|
+
- **Engineer** - Secure implementation and hardening
|
|
248
|
+
|
|
249
|
+
## Success Metrics
|
|
250
|
+
|
|
251
|
+
You've done this well when:
|
|
252
|
+
|
|
253
|
+
- All components threat modeled with STRIDE
|
|
254
|
+
- Critical vulnerabilities identified and prioritized
|
|
255
|
+
- Defense in depth applied (multiple layers)
|
|
256
|
+
- Cryptography uses modern, secure algorithms
|
|
257
|
+
- All inputs validated, all outputs encoded
|
|
258
|
+
- Least privilege enforced throughout
|
|
259
|
+
- Security logging captures relevant events
|
|
260
|
+
- Incident response plan defined
|
|
261
|
+
- Dependencies scanned for known CVEs
|
|
262
|
+
- Compliance requirements mapped and met
|
|
263
|
+
- Risk assessment completed with prioritized remediation
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
# Cybersecurity Analyst
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The Cybersecurity Analyst brings security-first thinking, threat modeling, and defense-in-depth principles to protect systems, data, and users. This skill analyzes threats, vulnerabilities, and risks across technical, human, and organizational dimensions to design secure systems and respond to security incidents.
|
|
6
|
+
|
|
7
|
+
Cybersecurity is not just about technology - it encompasses cryptography, network security, application security, human factors, legal compliance, and risk management. Modern security requires understanding attacker motivations, techniques, and economics while building defense strategies that balance security with usability and business needs.
|
|
8
|
+
|
|
9
|
+
This skill combines offensive security thinking (how attackers exploit systems) with defensive security practices (how to prevent, detect, and respond to attacks) to provide comprehensive security analysis.
|
|
10
|
+
|
|
11
|
+
## Core Capabilities
|
|
12
|
+
|
|
13
|
+
### 1. Threat Modeling
|
|
14
|
+
|
|
15
|
+
Systematically identifies potential threats, attack vectors, and security risks for systems, applications, and organizations. Threat modeling reveals vulnerabilities before attackers exploit them.
|
|
16
|
+
|
|
17
|
+
**Methodologies:**
|
|
18
|
+
|
|
19
|
+
- **STRIDE** - Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege
|
|
20
|
+
- **PASTA** - Process for Attack Simulation and Threat Analysis
|
|
21
|
+
- **Attack Trees** - Hierarchical diagrams of attack paths
|
|
22
|
+
- **Kill Chain** - Stages of cyber attacks (reconnaissance → delivery → exploitation → control)
|
|
23
|
+
- **MITRE ATT&CK** - Knowledge base of adversary tactics and techniques
|
|
24
|
+
|
|
25
|
+
### 2. Vulnerability Assessment
|
|
26
|
+
|
|
27
|
+
Identifies weaknesses in systems that could be exploited by attackers. Combines automated scanning with manual analysis to discover security flaws.
|
|
28
|
+
|
|
29
|
+
**Vulnerability Categories:**
|
|
30
|
+
|
|
31
|
+
- **Injection flaws** - SQL injection, command injection, XSS
|
|
32
|
+
- **Broken authentication/authorization** - Weak credentials, session management
|
|
33
|
+
- **Sensitive data exposure** - Unencrypted data, weak crypto
|
|
34
|
+
- **Security misconfiguration** - Default credentials, unnecessary services
|
|
35
|
+
- **Known vulnerabilities** - Unpatched CVEs, outdated dependencies
|
|
36
|
+
- **Design flaws** - Architectural security weaknesses
|
|
37
|
+
|
|
38
|
+
### 3. Cryptography Analysis
|
|
39
|
+
|
|
40
|
+
Evaluates cryptographic implementations, key management, and protocols. Ensures proper use of encryption, hashing, digital signatures, and random number generation.
|
|
41
|
+
|
|
42
|
+
**Key Areas:**
|
|
43
|
+
|
|
44
|
+
- **Encryption** - AES, RSA, elliptic curves (proper algorithms, key lengths, modes)
|
|
45
|
+
- **Hashing** - SHA-256, bcrypt, Argon2 (password storage, integrity)
|
|
46
|
+
- **Key management** - Generation, storage, rotation, destruction
|
|
47
|
+
- **TLS/SSL** - Certificate validation, protocol versions, cipher suites
|
|
48
|
+
- **PKI** - Public key infrastructure and certificate authorities
|
|
49
|
+
|
|
50
|
+
### 4. Access Control and Identity Management
|
|
51
|
+
|
|
52
|
+
Analyzes authentication, authorization, and identity systems to ensure proper access controls.
|
|
53
|
+
|
|
54
|
+
**Principles:**
|
|
55
|
+
|
|
56
|
+
- **Least privilege** - Minimum necessary permissions
|
|
57
|
+
- **Separation of duties** - No single person has complete control
|
|
58
|
+
- **Defense in depth** - Multiple layers of security
|
|
59
|
+
- **Zero trust** - Never trust, always verify
|
|
60
|
+
- **MFA/2FA** - Multi-factor authentication requirements
|
|
61
|
+
|
|
62
|
+
### 5. Security Monitoring and Incident Response
|
|
63
|
+
|
|
64
|
+
Designs detection mechanisms and response procedures for security incidents.
|
|
65
|
+
|
|
66
|
+
**Components:**
|
|
67
|
+
|
|
68
|
+
- **Logging and monitoring** - SIEM, IDS/IPS, anomaly detection
|
|
69
|
+
- **Incident response** - Preparation, detection, containment, eradication, recovery, lessons learned
|
|
70
|
+
- **Forensics** - Evidence collection and analysis
|
|
71
|
+
- **Threat intelligence** - Understanding attacker TTPs (Tactics, Techniques, Procedures)
|
|
72
|
+
|
|
73
|
+
### 6. Application Security (AppSec)
|
|
74
|
+
|
|
75
|
+
Applies security principles throughout software development lifecycle.
|
|
76
|
+
|
|
77
|
+
**Practices:**
|
|
78
|
+
|
|
79
|
+
- **Secure coding** - Input validation, output encoding, parameterized queries
|
|
80
|
+
- **SAST/DAST** - Static and dynamic application security testing
|
|
81
|
+
- **Dependency scanning** - Known vulnerabilities in libraries
|
|
82
|
+
- **Security testing** - Penetration testing, fuzzing, red team exercises
|
|
83
|
+
- **Secure SDLC** - Security requirements, design review, code review
|
|
84
|
+
|
|
85
|
+
## Use Cases
|
|
86
|
+
|
|
87
|
+
### System and Application Design
|
|
88
|
+
|
|
89
|
+
Apply security principles during design phase to build secure systems from the ground up. Threat model architectures before implementation to identify and mitigate risks early.
|
|
90
|
+
|
|
91
|
+
### Code Review and Security Testing
|
|
92
|
+
|
|
93
|
+
Review code for security vulnerabilities, test applications for exploitable flaws, and scan dependencies for known CVEs. Conduct penetration testing to validate security controls.
|
|
94
|
+
|
|
95
|
+
### Incident Response and Forensics
|
|
96
|
+
|
|
97
|
+
Respond to security incidents, contain breaches, analyze attacker behavior, collect forensic evidence, and implement remediation to prevent recurrence.
|
|
98
|
+
|
|
99
|
+
### Compliance and Risk Management
|
|
100
|
+
|
|
101
|
+
Assess compliance with security standards (SOC 2, ISO 27001, GDPR, HIPAA, PCI-DSS), evaluate risk posture, and prioritize security investments based on threat and impact.
|
|
102
|
+
|
|
103
|
+
### Security Architecture Review
|
|
104
|
+
|
|
105
|
+
Evaluate security architectures for defense-in-depth, identify single points of failure, assess attack surface, and recommend security improvements.
|
|
106
|
+
|
|
107
|
+
## Key Methods
|
|
108
|
+
|
|
109
|
+
### Method 1: STRIDE Threat Modeling
|
|
110
|
+
|
|
111
|
+
Apply STRIDE to identify threats:
|
|
112
|
+
|
|
113
|
+
1. **Spoofing** - Attacker impersonates user/system
|
|
114
|
+
2. **Tampering** - Unauthorized modification of data
|
|
115
|
+
3. **Repudiation** - Denying actions without proof
|
|
116
|
+
4. **Information Disclosure** - Exposing sensitive information
|
|
117
|
+
5. **Denial of Service** - Making system unavailable
|
|
118
|
+
6. **Elevation of Privilege** - Gaining unauthorized permissions
|
|
119
|
+
|
|
120
|
+
For each component, ask: What STRIDE threats apply?
|
|
121
|
+
|
|
122
|
+
### Method 2: Attack Surface Analysis
|
|
123
|
+
|
|
124
|
+
Map all entry points and assess risk:
|
|
125
|
+
|
|
126
|
+
1. Enumerate interfaces (APIs, UI, network services)
|
|
127
|
+
2. Identify input sources (user input, file uploads, API calls)
|
|
128
|
+
3. Map trust boundaries (internal vs. external, privileged vs. unprivileged)
|
|
129
|
+
4. Assess attack complexity and likelihood
|
|
130
|
+
5. Prioritize reduction of attack surface
|
|
131
|
+
|
|
132
|
+
### Method 3: Defense in Depth
|
|
133
|
+
|
|
134
|
+
Layer security controls:
|
|
135
|
+
|
|
136
|
+
1. **Perimeter** - Firewalls, VPN, network segmentation
|
|
137
|
+
2. **Network** - IDS/IPS, network monitoring
|
|
138
|
+
3. **Host** - Endpoint protection, hardening, patching
|
|
139
|
+
4. **Application** - Input validation, secure coding, WAF
|
|
140
|
+
5. **Data** - Encryption at rest and in transit
|
|
141
|
+
6. **User** - Strong authentication, least privilege, training
|
|
142
|
+
|
|
143
|
+
### Method 4: Risk Assessment (CVSS)
|
|
144
|
+
|
|
145
|
+
Quantify vulnerability severity using Common Vulnerability Scoring System:
|
|
146
|
+
|
|
147
|
+
- **Base score** - Intrinsic qualities of vulnerability
|
|
148
|
+
- **Temporal score** - Current exploit availability
|
|
149
|
+
- **Environmental score** - Impact in specific environment
|
|
150
|
+
- Prioritize remediation by risk score
|
|
151
|
+
|
|
152
|
+
### Method 5: Security Testing Pyramid
|
|
153
|
+
|
|
154
|
+
Test security at multiple levels:
|
|
155
|
+
|
|
156
|
+
1. **Unit tests** - Security test cases for functions
|
|
157
|
+
2. **Integration tests** - Security of component interactions
|
|
158
|
+
3. **SAST** - Static analysis of source code
|
|
159
|
+
4. **DAST** - Dynamic testing of running application
|
|
160
|
+
5. **Penetration testing** - Manual security testing by experts
|
|
161
|
+
|
|
162
|
+
## Resources
|
|
163
|
+
|
|
164
|
+
### Essential Reading
|
|
165
|
+
|
|
166
|
+
- **"The Web Application Hacker's Handbook"** - Comprehensive web security
|
|
167
|
+
- **"Threat Modeling: Designing for Security"** - Adam Shostack
|
|
168
|
+
- **"The Tangled Web"** - Browser security by Michal Zalewski
|
|
169
|
+
- **"Security Engineering"** - Ross Anderson (comprehensive security principles)
|
|
170
|
+
- **OWASP Top 10** - Most critical web application security risks
|
|
171
|
+
|
|
172
|
+
### Key Frameworks
|
|
173
|
+
|
|
174
|
+
- **OWASP** - Open Web Application Security Project resources
|
|
175
|
+
- **NIST Cybersecurity Framework** - Risk management framework
|
|
176
|
+
- **CIS Controls** - Prioritized security best practices
|
|
177
|
+
- **MITRE ATT&CK** - Adversary tactics and techniques
|
|
178
|
+
- **STRIDE/DREAD** - Threat modeling methodologies
|
|
179
|
+
|
|
180
|
+
### Standards and Compliance
|
|
181
|
+
|
|
182
|
+
- **PCI-DSS** - Payment card industry security
|
|
183
|
+
- **GDPR** - European data protection regulation
|
|
184
|
+
- **HIPAA** - Healthcare data security (US)
|
|
185
|
+
- **SOC 2** - Service organization security controls
|
|
186
|
+
- **ISO 27001** - Information security management
|
|
187
|
+
|
|
188
|
+
### Tools
|
|
189
|
+
|
|
190
|
+
- **Burp Suite** - Web application security testing
|
|
191
|
+
- **Metasploit** - Penetration testing framework
|
|
192
|
+
- **Wireshark** - Network protocol analyzer
|
|
193
|
+
- **Nmap** - Network scanning and enumeration
|
|
194
|
+
- **OWASP ZAP** - Web app vulnerability scanner
|
|
195
|
+
- **Snyk/Dependabot** - Dependency vulnerability scanning
|
|
196
|
+
|
|
197
|
+
## Links
|
|
198
|
+
|
|
199
|
+
- [Agent Implementation](/Users/ryan/src/Fritmp/amplihack/.claude/skills/cybersecurity-analyst/cybersecurity-analyst.md)
|
|
200
|
+
- [Quick Reference](/Users/ryan/src/Fritmp/amplihack/.claude/skills/cybersecurity-analyst/QUICK_REFERENCE.md)
|
|
201
|
+
- [All Skills](/Users/ryan/src/Fritmp/amplihack/.claude/skills/README.md)
|
|
202
|
+
|
|
203
|
+
## Best Practices
|
|
204
|
+
|
|
205
|
+
**Do:**
|
|
206
|
+
|
|
207
|
+
- Assume breach (defense in depth)
|
|
208
|
+
- Practice least privilege
|
|
209
|
+
- Validate all input, encode all output
|
|
210
|
+
- Use secure defaults
|
|
211
|
+
- Keep security simple (complexity is the enemy)
|
|
212
|
+
- Log security events
|
|
213
|
+
- Encrypt sensitive data (at rest and in transit)
|
|
214
|
+
- Keep dependencies updated
|
|
215
|
+
- Threat model during design
|
|
216
|
+
- Security test before deployment
|
|
217
|
+
|
|
218
|
+
**Don't:**
|
|
219
|
+
|
|
220
|
+
- Rely on security through obscurity
|
|
221
|
+
- Roll your own crypto
|
|
222
|
+
- Store passwords in plain text or weak hashes
|
|
223
|
+
- Trust client-side validation
|
|
224
|
+
- Ignore security in development
|
|
225
|
+
- Disable security features for convenience
|
|
226
|
+
- Use default credentials
|
|
227
|
+
- Forget about human factors (social engineering)
|
|
228
|
+
- Assume you'll never be attacked
|
|
229
|
+
|
|
230
|
+
## Integration with Amplihack
|
|
231
|
+
|
|
232
|
+
Security aligns with amplihack's ruthless simplicity - complex systems have more attack surface and are harder to secure. Simple, well-understood security controls are more effective than elaborate schemes. Security-first thinking ensures long-term sustainability by protecting against threats that could destroy trust and viability.
|
|
233
|
+
|
|
234
|
+
## Key Security Principles
|
|
235
|
+
|
|
236
|
+
1. **Defense in Depth** - Multiple layers of security
|
|
237
|
+
2. **Least Privilege** - Minimum necessary permissions
|
|
238
|
+
3. **Fail Securely** - Errors should default to secure state
|
|
239
|
+
4. **Complete Mediation** - Check every access
|
|
240
|
+
5. **Separation of Privilege** - Multiple conditions for access
|
|
241
|
+
6. **Open Design** - Security should not depend on secrecy of design
|
|
242
|
+
7. **Economy of Mechanism** - Keep security simple
|
|
243
|
+
8. **Psychological Acceptability** - Security should be usable
|