@kernel.chat/kbot 3.56.0 → 3.58.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/dist/auth.js +8 -8
- package/dist/auth.js.map +1 -1
- package/dist/gitagent-export.d.ts +42 -0
- package/dist/gitagent-export.d.ts.map +1 -0
- package/dist/gitagent-export.js +161 -0
- package/dist/gitagent-export.js.map +1 -0
- package/dist/migrate.d.ts +17 -0
- package/dist/migrate.d.ts.map +1 -0
- package/dist/migrate.js +378 -0
- package/dist/migrate.js.map +1 -0
- package/dist/tools/ctf.d.ts +2 -0
- package/dist/tools/ctf.d.ts.map +1 -0
- package/dist/tools/ctf.js +2968 -0
- package/dist/tools/ctf.js.map +1 -0
- package/dist/tools/hacker-toolkit.d.ts +2 -0
- package/dist/tools/hacker-toolkit.d.ts.map +1 -0
- package/dist/tools/hacker-toolkit.js +3697 -0
- package/dist/tools/hacker-toolkit.js.map +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +6 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/mcp-marketplace.d.ts.map +1 -1
- package/dist/tools/mcp-marketplace.js +24 -0
- package/dist/tools/mcp-marketplace.js.map +1 -1
- package/dist/tools/pentest.d.ts +2 -0
- package/dist/tools/pentest.d.ts.map +1 -0
- package/dist/tools/pentest.js +2225 -0
- package/dist/tools/pentest.js.map +1 -0
- package/dist/tools/redblue.d.ts +2 -0
- package/dist/tools/redblue.d.ts.map +1 -0
- package/dist/tools/redblue.js +3468 -0
- package/dist/tools/redblue.js.map +1 -0
- package/dist/tools/security-brain.d.ts +2 -0
- package/dist/tools/security-brain.d.ts.map +1 -0
- package/dist/tools/security-brain.js +2453 -0
- package/dist/tools/security-brain.js.map +1 -0
- package/dist/tools/visa-payments.d.ts +2 -0
- package/dist/tools/visa-payments.d.ts.map +1 -0
- package/dist/tools/visa-payments.js +166 -0
- package/dist/tools/visa-payments.js.map +1 -0
- package/dist/voice.d.ts +1 -1
- package/dist/voice.d.ts.map +1 -1
- package/dist/voice.js +26 -0
- package/dist/voice.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,2453 @@
|
|
|
1
|
+
// kbot Security Knowledge Brain — Comprehensive cybersecurity intelligence
|
|
2
|
+
// MITRE ATT&CK (all 14 tactics, 200+ techniques), OWASP Top 10 (2025),
|
|
3
|
+
// Lockheed Martin Kill Chain, CVE pattern library, and tool mapping.
|
|
4
|
+
// March 2026: ATT&CK v15 complete, OWASP 2025 refresh incorporated.
|
|
5
|
+
import { registerTool } from './index.js';
|
|
6
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
7
|
+
// MITRE ATT&CK — ALL 14 TACTICS WITH TOP TECHNIQUES
|
|
8
|
+
// ATT&CK v15 (October 2025)
|
|
9
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
10
|
+
const MITRE_TECHNIQUES = [
|
|
11
|
+
// ── TACTIC 1: RECONNAISSANCE ──────────────────────────────────────────
|
|
12
|
+
{
|
|
13
|
+
id: 'T1595',
|
|
14
|
+
name: 'Active Scanning',
|
|
15
|
+
tactic: 'Reconnaissance',
|
|
16
|
+
description: 'Adversaries scan victim IP ranges to gather information about hosts and services. Includes vulnerability scanning (T1595.002) and wordlist scanning (T1595.003).',
|
|
17
|
+
platforms: ['PRE'],
|
|
18
|
+
detection: ['Monitor for suspicious network scanning patterns', 'IDS signatures for common scanning tools (Nmap, Masscan)', 'Web server logs showing enumeration patterns'],
|
|
19
|
+
mitigations: ['Pre-compromise mitigation is limited', 'Rate limiting on exposed services', 'Honeypots to detect scanning activity'],
|
|
20
|
+
subtechniques: ['T1595.001 — Scanning IP Blocks', 'T1595.002 — Vulnerability Scanning', 'T1595.003 — Wordlist Scanning'],
|
|
21
|
+
severity: 'medium',
|
|
22
|
+
commonTools: ['Nmap', 'Masscan', 'Shodan', 'Censys', 'Nuclei'],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 'T1592',
|
|
26
|
+
name: 'Gather Victim Host Information',
|
|
27
|
+
tactic: 'Reconnaissance',
|
|
28
|
+
description: 'Adversaries gather host information (hardware, software, configs, client configs) before targeting. Includes firmware versions, installed software, and patch levels.',
|
|
29
|
+
platforms: ['PRE'],
|
|
30
|
+
detection: ['Monitor for unusual information requests', 'Track OSINT tool queries against your domains', 'User-agent anomalies in web logs'],
|
|
31
|
+
mitigations: ['Limit public exposure of technical details', 'Minimize information in error pages', 'Remove version headers from HTTP responses'],
|
|
32
|
+
subtechniques: ['T1592.001 — Hardware', 'T1592.002 — Software', 'T1592.003 — Firmware', 'T1592.004 — Client Configurations'],
|
|
33
|
+
severity: 'low',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'T1589',
|
|
37
|
+
name: 'Gather Victim Identity Information',
|
|
38
|
+
tactic: 'Reconnaissance',
|
|
39
|
+
description: 'Adversaries gather identity info (credentials, email addresses, employee names) for targeting. Used to craft phishing campaigns and credential stuffing.',
|
|
40
|
+
platforms: ['PRE'],
|
|
41
|
+
detection: ['Monitor for credential dumps mentioning your org', 'Dark web monitoring', 'Anomalous login attempts with leaked credentials'],
|
|
42
|
+
mitigations: ['Monitor for leaked credentials (Have I Been Pwned)', 'Enforce MFA', 'Train employees on social engineering'],
|
|
43
|
+
subtechniques: ['T1589.001 — Credentials', 'T1589.002 — Email Addresses', 'T1589.003 — Employee Names'],
|
|
44
|
+
severity: 'medium',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 'T1593',
|
|
48
|
+
name: 'Search Open Websites/Domains',
|
|
49
|
+
tactic: 'Reconnaissance',
|
|
50
|
+
description: 'Adversaries search open websites and domains for useful targeting information. Includes social media, search engines, and code repositories.',
|
|
51
|
+
platforms: ['PRE'],
|
|
52
|
+
detection: ['Monitor for scraping of company websites', 'Track GitHub/GitLab exposure of internal code', 'Social media monitoring for info leaks'],
|
|
53
|
+
mitigations: ['Review public code repositories for secrets', 'Limit employee info on public sites', 'Use robots.txt and access controls'],
|
|
54
|
+
subtechniques: ['T1593.001 — Social Media', 'T1593.002 — Search Engines', 'T1593.003 — Code Repositories'],
|
|
55
|
+
severity: 'low',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: 'T1596',
|
|
59
|
+
name: 'Search Open Technical Databases',
|
|
60
|
+
tactic: 'Reconnaissance',
|
|
61
|
+
description: 'Adversaries search technical databases (WHOIS, DNS, certificate transparency, CDN) for targeting information.',
|
|
62
|
+
platforms: ['PRE'],
|
|
63
|
+
detection: ['Monitor CT logs for unauthorized certificate issuance', 'Track WHOIS lookups', 'DNS query monitoring'],
|
|
64
|
+
mitigations: ['Use WHOIS privacy', 'Monitor Certificate Transparency logs', 'Minimize DNS information exposure'],
|
|
65
|
+
subtechniques: ['T1596.001 — DNS/Passive DNS', 'T1596.002 — WHOIS', 'T1596.003 — Digital Certificates', 'T1596.004 — CDNs', 'T1596.005 — Scan Databases'],
|
|
66
|
+
severity: 'low',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 'T1597',
|
|
70
|
+
name: 'Search Closed Sources',
|
|
71
|
+
tactic: 'Reconnaissance',
|
|
72
|
+
description: 'Adversaries search closed/private sources such as threat intel vendors, dark web markets, and paid databases for targeting data.',
|
|
73
|
+
platforms: ['PRE'],
|
|
74
|
+
detection: ['Difficult to detect pre-compromise', 'Dark web monitoring services', 'Threat intel sharing communities'],
|
|
75
|
+
mitigations: ['Subscribe to dark web monitoring', 'Participate in ISACs', 'Monitor for brand impersonation'],
|
|
76
|
+
subtechniques: ['T1597.001 — Threat Intel Vendors', 'T1597.002 — Purchase Technical Data'],
|
|
77
|
+
severity: 'medium',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 'T1598',
|
|
81
|
+
name: 'Phishing for Information',
|
|
82
|
+
tactic: 'Reconnaissance',
|
|
83
|
+
description: 'Adversaries send phishing messages to gather information rather than deliver payloads. Targets credentials, system info, or business intelligence.',
|
|
84
|
+
platforms: ['PRE'],
|
|
85
|
+
detection: ['Email gateway phishing detection', 'User reporting of suspicious emails', 'Domain reputation checks on embedded links'],
|
|
86
|
+
mitigations: ['Security awareness training', 'Email filtering and anti-phishing', 'DMARC/DKIM/SPF enforcement'],
|
|
87
|
+
subtechniques: ['T1598.001 — Spearphishing Service', 'T1598.002 — Spearphishing Attachment', 'T1598.003 — Spearphishing Link'],
|
|
88
|
+
severity: 'high',
|
|
89
|
+
},
|
|
90
|
+
// ── TACTIC 2: RESOURCE DEVELOPMENT ────────────────────────────────────
|
|
91
|
+
{
|
|
92
|
+
id: 'T1583',
|
|
93
|
+
name: 'Acquire Infrastructure',
|
|
94
|
+
tactic: 'Resource Development',
|
|
95
|
+
description: 'Adversaries acquire infrastructure (domains, servers, VPS, botnets, web services) for operations. Used for C2, phishing, and staging.',
|
|
96
|
+
platforms: ['PRE'],
|
|
97
|
+
detection: ['Monitor for newly registered domains resembling yours', 'Track infrastructure associated with known threat actors', 'Certificate Transparency monitoring'],
|
|
98
|
+
mitigations: ['Domain monitoring and takedown services', 'Brand protection services', 'Report malicious infrastructure to registrars'],
|
|
99
|
+
subtechniques: ['T1583.001 — Domains', 'T1583.002 — DNS Server', 'T1583.003 — Virtual Private Server', 'T1583.004 — Server', 'T1583.005 — Botnet', 'T1583.006 — Web Services', 'T1583.007 — Serverless', 'T1583.008 — Malvertising'],
|
|
100
|
+
severity: 'medium',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: 'T1584',
|
|
104
|
+
name: 'Compromise Infrastructure',
|
|
105
|
+
tactic: 'Resource Development',
|
|
106
|
+
description: 'Adversaries compromise third-party infrastructure for use in operations. Harder to attribute than adversary-owned infrastructure.',
|
|
107
|
+
platforms: ['PRE'],
|
|
108
|
+
detection: ['Monitor for C2 traffic to legitimate but compromised servers', 'Threat intel sharing about compromised infrastructure', 'Behavioral analysis of outbound connections'],
|
|
109
|
+
mitigations: ['Network segmentation', 'Outbound traffic filtering', 'Domain reputation scoring'],
|
|
110
|
+
subtechniques: ['T1584.001 — Domains', 'T1584.002 — DNS Server', 'T1584.003 — Virtual Private Server', 'T1584.004 — Server', 'T1584.005 — Botnet', 'T1584.006 — Web Services', 'T1584.007 — Serverless'],
|
|
111
|
+
severity: 'high',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: 'T1585',
|
|
115
|
+
name: 'Establish Accounts',
|
|
116
|
+
tactic: 'Resource Development',
|
|
117
|
+
description: 'Adversaries create accounts on services for use in targeting. Social media for social engineering, email for phishing, cloud for infrastructure.',
|
|
118
|
+
platforms: ['PRE'],
|
|
119
|
+
detection: ['Monitor for impersonation accounts on social media', 'Email authentication (SPF/DKIM/DMARC) detects spoofed senders', 'Track new accounts interacting with employees'],
|
|
120
|
+
mitigations: ['Brand monitoring on social platforms', 'Email authentication protocols', 'Employee social engineering training'],
|
|
121
|
+
subtechniques: ['T1585.001 — Social Media Accounts', 'T1585.002 — Email Accounts', 'T1585.003 — Cloud Accounts'],
|
|
122
|
+
severity: 'medium',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: 'T1586',
|
|
126
|
+
name: 'Compromise Accounts',
|
|
127
|
+
tactic: 'Resource Development',
|
|
128
|
+
description: 'Adversaries compromise existing accounts rather than creating new ones. Trusted accounts bypass reputation filters.',
|
|
129
|
+
platforms: ['PRE'],
|
|
130
|
+
detection: ['Impossible travel detection', 'Anomalous account behavior', 'Credential leak monitoring'],
|
|
131
|
+
mitigations: ['MFA enforcement', 'Credential monitoring', 'Account activity baselines'],
|
|
132
|
+
subtechniques: ['T1586.001 — Social Media Accounts', 'T1586.002 — Email Accounts', 'T1586.003 — Cloud Accounts'],
|
|
133
|
+
severity: 'high',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: 'T1587',
|
|
137
|
+
name: 'Develop Capabilities',
|
|
138
|
+
tactic: 'Resource Development',
|
|
139
|
+
description: 'Adversaries develop malware, exploits, digital certificates, and other capabilities in-house. Custom tools evade signature-based detection.',
|
|
140
|
+
platforms: ['PRE'],
|
|
141
|
+
detection: ['Behavioral analysis catches novel malware', 'Sandbox detonation of suspicious files', 'Monitoring for anomalous code-signing certificates'],
|
|
142
|
+
mitigations: ['Behavioral detection (EDR)', 'Sandboxing', 'Application allowlisting'],
|
|
143
|
+
subtechniques: ['T1587.001 — Malware', 'T1587.002 — Code Signing Certificates', 'T1587.003 — Digital Certificates', 'T1587.004 — Exploits'],
|
|
144
|
+
severity: 'high',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
id: 'T1588',
|
|
148
|
+
name: 'Obtain Capabilities',
|
|
149
|
+
tactic: 'Resource Development',
|
|
150
|
+
description: 'Adversaries obtain tools, malware, exploits, and certificates from third parties rather than developing in-house.',
|
|
151
|
+
platforms: ['PRE'],
|
|
152
|
+
detection: ['Signature-based detection for known malware families', 'Track exploit marketplace activity', 'Monitor for stolen certificate usage'],
|
|
153
|
+
mitigations: ['Keep systems patched to reduce exploit value', 'Certificate revocation monitoring', 'Threat intel on marketplace activity'],
|
|
154
|
+
subtechniques: ['T1588.001 — Malware', 'T1588.002 — Tool', 'T1588.003 — Code Signing Certificates', 'T1588.004 — Digital Certificates', 'T1588.005 — Exploits', 'T1588.006 — Vulnerabilities'],
|
|
155
|
+
severity: 'high',
|
|
156
|
+
},
|
|
157
|
+
// ── TACTIC 3: INITIAL ACCESS ──────────────────────────────────────────
|
|
158
|
+
{
|
|
159
|
+
id: 'T1189',
|
|
160
|
+
name: 'Drive-by Compromise',
|
|
161
|
+
tactic: 'Initial Access',
|
|
162
|
+
description: 'Adversaries gain access through a user visiting a compromised website during normal browsing. Exploits browser or plugin vulnerabilities.',
|
|
163
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
164
|
+
detection: ['Browser exploit detection via EDR', 'Network IDS for exploit kit traffic', 'Sandboxed browser environments', 'Unusual process creation from browser'],
|
|
165
|
+
mitigations: ['Keep browsers and plugins updated', 'Browser isolation', 'Content Security Policy headers', 'Ad blockers to prevent malvertising'],
|
|
166
|
+
severity: 'high',
|
|
167
|
+
commonTools: ['Exploit kits (Angler, RIG, Magnitude)', 'Browser exploitation frameworks'],
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: 'T1190',
|
|
171
|
+
name: 'Exploit Public-Facing Application',
|
|
172
|
+
tactic: 'Initial Access',
|
|
173
|
+
description: 'Adversaries exploit vulnerabilities in internet-facing applications (web servers, databases, APIs, CMS). Common entry point for server compromise.',
|
|
174
|
+
platforms: ['Windows', 'Linux', 'macOS', 'Containers'],
|
|
175
|
+
detection: ['WAF alerting on exploit attempts', 'Application error rate monitoring', 'Log analysis for injection patterns', 'IDS signatures for known CVEs'],
|
|
176
|
+
mitigations: ['Patch management', 'WAF deployment', 'Input validation', 'Network segmentation', 'Regular vulnerability scanning'],
|
|
177
|
+
severity: 'critical',
|
|
178
|
+
commonTools: ['SQLmap', 'Burp Suite', 'Nuclei', 'Metasploit'],
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
id: 'T1566',
|
|
182
|
+
name: 'Phishing',
|
|
183
|
+
tactic: 'Initial Access',
|
|
184
|
+
description: 'Adversaries send phishing messages with malicious attachments or links to gain access. Most common initial access vector globally.',
|
|
185
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
186
|
+
detection: ['Email gateway filtering', 'Attachment sandboxing', 'URL reputation checking', 'User reporting mechanisms', 'DMARC enforcement'],
|
|
187
|
+
mitigations: ['Security awareness training', 'Email filtering', 'Attachment sandboxing', 'Link protection', 'MFA (limits credential phishing impact)'],
|
|
188
|
+
subtechniques: ['T1566.001 — Spearphishing Attachment', 'T1566.002 — Spearphishing Link', 'T1566.003 — Spearphishing via Service', 'T1566.004 — Spearphishing Voice'],
|
|
189
|
+
severity: 'critical',
|
|
190
|
+
commonTools: ['Gophish', 'King Phisher', 'Evilginx2', 'Modlishka'],
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: 'T1195',
|
|
194
|
+
name: 'Supply Chain Compromise',
|
|
195
|
+
tactic: 'Initial Access',
|
|
196
|
+
description: 'Adversaries manipulate products or delivery mechanisms before the victim receives them. Targets software supply chain (dependencies, build systems, update mechanisms).',
|
|
197
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
198
|
+
detection: ['Software composition analysis', 'Build integrity verification', 'Package hash verification', 'Anomalous behavior from trusted software'],
|
|
199
|
+
mitigations: ['Vendor security assessments', 'Software bill of materials (SBOM)', 'Package integrity verification', 'Lockfile enforcement', 'Dependency pinning'],
|
|
200
|
+
subtechniques: ['T1195.001 — Compromise Software Dependencies and Development Tools', 'T1195.002 — Compromise Software Supply Chain', 'T1195.003 — Compromise Hardware Supply Chain'],
|
|
201
|
+
severity: 'critical',
|
|
202
|
+
commonTools: ['Dependency confusion attacks', 'Typosquatting packages'],
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: 'T1199',
|
|
206
|
+
name: 'Trusted Relationship',
|
|
207
|
+
tactic: 'Initial Access',
|
|
208
|
+
description: 'Adversaries exploit trusted third-party relationships (IT service providers, contractors, MSPs) to access victim networks.',
|
|
209
|
+
platforms: ['Windows', 'Linux', 'macOS', 'SaaS'],
|
|
210
|
+
detection: ['Monitor third-party access patterns', 'Anomalous VPN connections from partner IPs', 'Unusual service account activity'],
|
|
211
|
+
mitigations: ['Vendor access reviews', 'Least-privilege for third parties', 'Network segmentation', 'Just-in-time access'],
|
|
212
|
+
severity: 'high',
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
id: 'T1078',
|
|
216
|
+
name: 'Valid Accounts',
|
|
217
|
+
tactic: 'Initial Access',
|
|
218
|
+
description: 'Adversaries obtain and abuse legitimate credentials for initial access, persistence, privilege escalation, and defense evasion.',
|
|
219
|
+
platforms: ['Windows', 'Linux', 'macOS', 'SaaS', 'Azure AD', 'Google Workspace'],
|
|
220
|
+
detection: ['Impossible travel detection', 'Anomalous login times/locations', 'Credential leak monitoring', 'Behavioral analytics on account usage'],
|
|
221
|
+
mitigations: ['MFA enforcement', 'Credential rotation', 'Privileged access management', 'Conditional access policies', 'Dark web monitoring'],
|
|
222
|
+
subtechniques: ['T1078.001 — Default Accounts', 'T1078.002 — Domain Accounts', 'T1078.003 — Local Accounts', 'T1078.004 — Cloud Accounts'],
|
|
223
|
+
severity: 'critical',
|
|
224
|
+
commonTools: ['Mimikatz', 'Credential stuffing tools', 'Pass-the-hash'],
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
id: 'T1133',
|
|
228
|
+
name: 'External Remote Services',
|
|
229
|
+
tactic: 'Initial Access',
|
|
230
|
+
description: 'Adversaries leverage external-facing remote services (VPN, RDP, SSH, Citrix) for initial access using valid or compromised credentials.',
|
|
231
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
232
|
+
detection: ['Monitor VPN/RDP login anomalies', 'Geographic impossible travel', 'Brute-force detection on remote services'],
|
|
233
|
+
mitigations: ['MFA on all remote access', 'VPN split-tunneling restrictions', 'Network-level authentication', 'Jump box/bastion hosts'],
|
|
234
|
+
severity: 'high',
|
|
235
|
+
commonTools: ['Hydra', 'Crowbar', 'RDP brute-force tools'],
|
|
236
|
+
},
|
|
237
|
+
// ── TACTIC 4: EXECUTION ───────────────────────────────────────────────
|
|
238
|
+
{
|
|
239
|
+
id: 'T1059',
|
|
240
|
+
name: 'Command and Scripting Interpreter',
|
|
241
|
+
tactic: 'Execution',
|
|
242
|
+
description: 'Adversaries abuse command and script interpreters to execute commands, scripts, or binaries. Most versatile execution technique.',
|
|
243
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
244
|
+
detection: ['Command-line logging (Sysmon Event ID 1)', 'Script block logging (PowerShell)', 'Behavioral analysis of interpreter usage', 'Parent-child process relationships'],
|
|
245
|
+
mitigations: ['Constrained Language Mode (PowerShell)', 'Application allowlisting', 'Script signing enforcement', 'Disable unused interpreters'],
|
|
246
|
+
subtechniques: ['T1059.001 — PowerShell', 'T1059.002 — AppleScript', 'T1059.003 — Windows Command Shell', 'T1059.004 — Unix Shell', 'T1059.005 — Visual Basic', 'T1059.006 — Python', 'T1059.007 — JavaScript', 'T1059.008 — Network Device CLI', 'T1059.009 — Cloud API'],
|
|
247
|
+
severity: 'high',
|
|
248
|
+
commonTools: ['PowerShell Empire', 'Cobalt Strike', 'Metasploit'],
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
id: 'T1053',
|
|
252
|
+
name: 'Scheduled Task/Job',
|
|
253
|
+
tactic: 'Execution',
|
|
254
|
+
description: 'Adversaries abuse task scheduling (cron, at, Windows Task Scheduler, systemd timers) to execute malicious code at defined intervals.',
|
|
255
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
256
|
+
detection: ['Monitor task/job creation events', 'Windows Event ID 4698/4702', 'Crontab modification monitoring', 'Sysmon scheduled task events'],
|
|
257
|
+
mitigations: ['Restrict task scheduling permissions', 'Monitor scheduled task/job creation', 'Application allowlisting'],
|
|
258
|
+
subtechniques: ['T1053.002 — At', 'T1053.003 — Cron', 'T1053.005 — Scheduled Task', 'T1053.006 — Systemd Timers', 'T1053.007 — Container Orchestration Job'],
|
|
259
|
+
severity: 'medium',
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
id: 'T1204',
|
|
263
|
+
name: 'User Execution',
|
|
264
|
+
tactic: 'Execution',
|
|
265
|
+
description: 'Adversaries rely on user interaction to execute malicious payloads — opening files, clicking links, or running programs.',
|
|
266
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
267
|
+
detection: ['Monitor for unusual file executions after email/download', 'Process creation from Office/PDF applications', 'Script execution triggered by user actions'],
|
|
268
|
+
mitigations: ['Security awareness training', 'Application allowlisting', 'Protected View in Office', 'Disable macros by default'],
|
|
269
|
+
subtechniques: ['T1204.001 — Malicious Link', 'T1204.002 — Malicious File', 'T1204.003 — Malicious Image'],
|
|
270
|
+
severity: 'high',
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
id: 'T1106',
|
|
274
|
+
name: 'Native API',
|
|
275
|
+
tactic: 'Execution',
|
|
276
|
+
description: 'Adversaries use the native OS API to execute behaviors. Direct syscalls can bypass user-mode hooks and API monitoring.',
|
|
277
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
278
|
+
detection: ['API call monitoring via EDR', 'Syscall tracing (ETW, eBPF)', 'Anomalous API call patterns'],
|
|
279
|
+
mitigations: ['Application allowlisting', 'Code integrity enforcement', 'EDR with kernel-level visibility'],
|
|
280
|
+
severity: 'medium',
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
id: 'T1203',
|
|
284
|
+
name: 'Exploitation for Client Execution',
|
|
285
|
+
tactic: 'Execution',
|
|
286
|
+
description: 'Adversaries exploit vulnerabilities in client applications (browsers, Office, PDF readers) to execute code.',
|
|
287
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
288
|
+
detection: ['EDR behavioral detection', 'Exploit guard / attack surface reduction rules', 'Crash dump analysis', 'Anomalous child processes from applications'],
|
|
289
|
+
mitigations: ['Patch client applications', 'Application isolation/sandboxing', 'Exploit protection (DEP, ASLR, CFG)', 'Microsoft Attack Surface Reduction rules'],
|
|
290
|
+
severity: 'high',
|
|
291
|
+
commonTools: ['Browser exploits', 'Office macros', 'PDF exploits'],
|
|
292
|
+
},
|
|
293
|
+
// ── TACTIC 5: PERSISTENCE ─────────────────────────────────────────────
|
|
294
|
+
{
|
|
295
|
+
id: 'T1547',
|
|
296
|
+
name: 'Boot or Logon Autostart Execution',
|
|
297
|
+
tactic: 'Persistence',
|
|
298
|
+
description: 'Adversaries configure system settings to execute programs on boot or logon. Registry run keys, startup folder, launch agents.',
|
|
299
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
300
|
+
detection: ['Registry monitoring (Run/RunOnce keys)', 'Startup folder monitoring', 'LaunchAgent/LaunchDaemon creation on macOS', 'Autoruns analysis'],
|
|
301
|
+
mitigations: ['Restrict registry permissions', 'Monitor startup locations', 'Application allowlisting', 'Endpoint detection'],
|
|
302
|
+
subtechniques: ['T1547.001 — Registry Run Keys / Startup Folder', 'T1547.002 — Authentication Package', 'T1547.004 — Winlogon Helper DLL', 'T1547.005 — Security Support Provider', 'T1547.009 — Shortcut Modification', 'T1547.011 — Plist Modification', 'T1547.012 — Print Processors', 'T1547.013 — XDG Autostart Entries', 'T1547.014 — Active Setup', 'T1547.015 — Login Items'],
|
|
303
|
+
severity: 'high',
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
id: 'T1136',
|
|
307
|
+
name: 'Create Account',
|
|
308
|
+
tactic: 'Persistence',
|
|
309
|
+
description: 'Adversaries create new accounts for persistent access. Local accounts, domain accounts, or cloud accounts.',
|
|
310
|
+
platforms: ['Windows', 'Linux', 'macOS', 'Azure AD', 'Google Workspace'],
|
|
311
|
+
detection: ['Monitor account creation events (Windows Event ID 4720)', 'Alert on new accounts in privileged groups', 'Cloud audit logs for account creation', 'Anomalous account creation patterns'],
|
|
312
|
+
mitigations: ['Restrict account creation permissions', 'Monitor for unauthorized accounts', 'Privileged access management', 'Regular account auditing'],
|
|
313
|
+
subtechniques: ['T1136.001 — Local Account', 'T1136.002 — Domain Account', 'T1136.003 — Cloud Account'],
|
|
314
|
+
severity: 'high',
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
id: 'T1543',
|
|
318
|
+
name: 'Create or Modify System Process',
|
|
319
|
+
tactic: 'Persistence',
|
|
320
|
+
description: 'Adversaries create or modify system-level processes (services, daemons, launch daemons) for persistent execution with elevated privileges.',
|
|
321
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
322
|
+
detection: ['Service creation events (Windows Event ID 7045)', 'Systemd unit file monitoring', 'LaunchDaemon plist creation monitoring', 'Anomalous service installations'],
|
|
323
|
+
mitigations: ['Restrict service installation permissions', 'Code signing for services', 'Monitor service configurations'],
|
|
324
|
+
subtechniques: ['T1543.001 — Launch Agent', 'T1543.002 — Systemd Service', 'T1543.003 — Windows Service', 'T1543.004 — Launch Daemon'],
|
|
325
|
+
severity: 'high',
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
id: 'T1546',
|
|
329
|
+
name: 'Event Triggered Execution',
|
|
330
|
+
tactic: 'Persistence',
|
|
331
|
+
description: 'Adversaries establish persistence through event-triggered execution mechanisms — WMI subscriptions, .bashrc, trap commands, accessibility features.',
|
|
332
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
333
|
+
detection: ['WMI subscription monitoring', 'Shell profile modification alerts', 'Trap command monitoring', 'Accessibility feature binary replacement detection'],
|
|
334
|
+
mitigations: ['Restrict WMI permissions', 'Protect shell profiles', 'Monitor event subscription creation'],
|
|
335
|
+
subtechniques: ['T1546.001 — Change Default File Association', 'T1546.002 — Screensaver', 'T1546.003 — WMI Event Subscription', 'T1546.004 — Unix Shell Configuration Modification', 'T1546.008 — Accessibility Features', 'T1546.012 — Image File Execution Options Injection', 'T1546.013 — PowerShell Profile', 'T1546.015 — Component Object Model Hijacking', 'T1546.016 — Installer Packages'],
|
|
336
|
+
severity: 'high',
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
id: 'T1505',
|
|
340
|
+
name: 'Server Software Component',
|
|
341
|
+
tactic: 'Persistence',
|
|
342
|
+
description: 'Adversaries abuse server software components (web shells, IIS modules, SQL stored procedures, transport agents) for persistence on servers.',
|
|
343
|
+
platforms: ['Windows', 'Linux'],
|
|
344
|
+
detection: ['File integrity monitoring on web directories', 'Monitor for new IIS modules/ISAPI filters', 'Database stored procedure auditing', 'Web shell scanning tools'],
|
|
345
|
+
mitigations: ['File integrity monitoring', 'Restrict web directory write permissions', 'Input validation', 'Regular web shell scans'],
|
|
346
|
+
subtechniques: ['T1505.001 — SQL Stored Procedures', 'T1505.002 — Transport Agent', 'T1505.003 — Web Shell', 'T1505.004 — IIS Components', 'T1505.005 — Terminal Services DLL'],
|
|
347
|
+
severity: 'critical',
|
|
348
|
+
commonTools: ['China Chopper', 'WSO', 'b374k', 'p0wny-shell'],
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
id: 'T1037',
|
|
352
|
+
name: 'Boot or Logon Initialization Scripts',
|
|
353
|
+
tactic: 'Persistence',
|
|
354
|
+
description: 'Adversaries use boot/logon scripts (logon scripts, login hooks, startup scripts, RC scripts) for persistence and privilege escalation.',
|
|
355
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
356
|
+
detection: ['Monitor logon script assignments via Group Policy', 'Track changes to /etc/rc.local, /etc/init.d/', 'macOS login hook monitoring'],
|
|
357
|
+
mitigations: ['Restrict logon script assignment', 'Monitor initialization script changes', 'Limit boot-time script permissions'],
|
|
358
|
+
subtechniques: ['T1037.001 — Logon Script (Windows)', 'T1037.002 — Login Hook', 'T1037.003 — Network Logon Script', 'T1037.004 — RC Scripts', 'T1037.005 — Startup Items'],
|
|
359
|
+
severity: 'medium',
|
|
360
|
+
},
|
|
361
|
+
// ── TACTIC 6: PRIVILEGE ESCALATION ────────────────────────────────────
|
|
362
|
+
{
|
|
363
|
+
id: 'T1548',
|
|
364
|
+
name: 'Abuse Elevation Control Mechanism',
|
|
365
|
+
tactic: 'Privilege Escalation',
|
|
366
|
+
description: 'Adversaries circumvent elevation controls (UAC, sudo, setuid) to gain higher privileges. Exploits trust mechanisms built into the OS.',
|
|
367
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
368
|
+
detection: ['Monitor UAC bypass techniques', 'Sudo log analysis', 'Setuid/setgid binary monitoring', 'Anomalous privilege elevation events'],
|
|
369
|
+
mitigations: ['UAC set to "Always Notify"', 'Restrict sudo access', 'Audit setuid/setgid binaries', 'Privilege access management'],
|
|
370
|
+
subtechniques: ['T1548.001 — Setuid and Setgid', 'T1548.002 — Bypass User Account Control', 'T1548.003 — Sudo and Sudo Caching', 'T1548.004 — Elevated Execution with Prompt', 'T1548.005 — Temporary Elevated Cloud Access'],
|
|
371
|
+
severity: 'high',
|
|
372
|
+
commonTools: ['UACME', 'LinPEAS', 'GTFOBins'],
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
id: 'T1134',
|
|
376
|
+
name: 'Access Token Manipulation',
|
|
377
|
+
tactic: 'Privilege Escalation',
|
|
378
|
+
description: 'Adversaries manipulate access tokens to operate under a different security context. Token impersonation, theft, and creation.',
|
|
379
|
+
platforms: ['Windows'],
|
|
380
|
+
detection: ['Monitor for token manipulation API calls', 'Anomalous token usage patterns', 'Process creation with mismatched tokens', 'Event ID 4624 (Type 9 — NewCredentials)'],
|
|
381
|
+
mitigations: ['Restrict token manipulation permissions', 'Privileged access management', 'Credential Guard', 'Least privilege enforcement'],
|
|
382
|
+
subtechniques: ['T1134.001 — Token Impersonation/Theft', 'T1134.002 — Create Process with Token', 'T1134.003 — Make and Impersonate Token', 'T1134.004 — Parent PID Spoofing', 'T1134.005 — SID-History Injection'],
|
|
383
|
+
severity: 'high',
|
|
384
|
+
commonTools: ['Mimikatz', 'Incognito', 'Cobalt Strike'],
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
id: 'T1068',
|
|
388
|
+
name: 'Exploitation for Privilege Escalation',
|
|
389
|
+
tactic: 'Privilege Escalation',
|
|
390
|
+
description: 'Adversaries exploit software vulnerabilities to escalate privileges. Kernel exploits, service exploits, and application vulnerabilities.',
|
|
391
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
392
|
+
detection: ['Crash dump analysis', 'Anomalous kernel-mode activity', 'EDR behavioral detection', 'Exploit guard alerts'],
|
|
393
|
+
mitigations: ['Patch management', 'Exploit protection (DEP, ASLR, SMAP, SMEP)', 'Application sandboxing', 'Kernel hardening'],
|
|
394
|
+
severity: 'critical',
|
|
395
|
+
commonTools: ['Dirty Pipe (CVE-2022-0847)', 'PrintNightmare', 'PwnKit (CVE-2021-4034)'],
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
id: 'T1055',
|
|
399
|
+
name: 'Process Injection',
|
|
400
|
+
tactic: 'Privilege Escalation',
|
|
401
|
+
description: 'Adversaries inject code into running processes to escalate privileges and evade defenses. The injected code runs in the context of the target process.',
|
|
402
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
403
|
+
detection: ['Monitor for process injection API calls (WriteProcessMemory, NtMapViewOfSection)', 'Sysmon Event ID 8 (CreateRemoteThread)', 'Memory forensics for injected code', 'Anomalous DLL loading patterns'],
|
|
404
|
+
mitigations: ['EDR with injection detection', 'Code integrity enforcement', 'Address Space Layout Randomization', 'Behavioral analysis'],
|
|
405
|
+
subtechniques: ['T1055.001 — DLL Injection', 'T1055.002 — PE Injection', 'T1055.003 — Thread Execution Hijacking', 'T1055.004 — Asynchronous Procedure Call', 'T1055.005 — Thread Local Storage', 'T1055.008 — Ptrace System Calls', 'T1055.009 — Proc Memory', 'T1055.011 — Extra Window Memory Injection', 'T1055.012 — Process Hollowing', 'T1055.013 — Process Doppelganging', 'T1055.014 — VDSO Hijacking', 'T1055.015 — ListPlanting'],
|
|
406
|
+
severity: 'critical',
|
|
407
|
+
commonTools: ['Cobalt Strike', 'Metasploit', 'Donut'],
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
id: 'T1574',
|
|
411
|
+
name: 'Hijack Execution Flow',
|
|
412
|
+
tactic: 'Privilege Escalation',
|
|
413
|
+
description: 'Adversaries hijack the way an OS runs programs by placing malicious content where the system looks for legitimate programs (DLL hijacking, PATH manipulation, LD_PRELOAD).',
|
|
414
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
415
|
+
detection: ['DLL load monitoring', 'PATH variable analysis', 'LD_PRELOAD monitoring', 'Anomalous library loading patterns'],
|
|
416
|
+
mitigations: ['Use fully qualified paths', 'DLL search order hardening', 'Code signing enforcement', 'Secure PATH configuration'],
|
|
417
|
+
subtechniques: ['T1574.001 — DLL Search Order Hijacking', 'T1574.002 — DLL Side-Loading', 'T1574.004 — Dylib Hijacking', 'T1574.005 — Executable Installer File Permissions Weakness', 'T1574.006 — Dynamic Linker Hijacking', 'T1574.007 — Path Interception by PATH Environment Variable', 'T1574.008 — Path Interception by Search Order Hijacking', 'T1574.009 — Path Interception by Unquoted Path', 'T1574.010 — Services File Permissions Weakness', 'T1574.011 — Services Registry Permissions Weakness', 'T1574.012 — COR_PROFILER', 'T1574.013 — KernelCallbackTable', 'T1574.014 — AppDomainManager'],
|
|
418
|
+
severity: 'high',
|
|
419
|
+
commonTools: ['DLL sideloading toolkits', 'Robber'],
|
|
420
|
+
},
|
|
421
|
+
// ── TACTIC 7: DEFENSE EVASION ─────────────────────────────────────────
|
|
422
|
+
{
|
|
423
|
+
id: 'T1070',
|
|
424
|
+
name: 'Indicator Removal',
|
|
425
|
+
tactic: 'Defense Evasion',
|
|
426
|
+
description: 'Adversaries delete or modify artifacts (logs, files, registry entries, timestamps) to remove evidence of intrusion.',
|
|
427
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
428
|
+
detection: ['Log forwarding to SIEM (prevents local deletion)', 'File integrity monitoring', 'Monitor for log clearing events (Event ID 1102)', 'Timestamp anomaly detection (timestomping)'],
|
|
429
|
+
mitigations: ['Centralized logging (SIEM)', 'Write-once log storage', 'File integrity monitoring', 'Protected audit policies'],
|
|
430
|
+
subtechniques: ['T1070.001 — Clear Windows Event Logs', 'T1070.002 — Clear Linux or Mac System Logs', 'T1070.003 — Clear Command History', 'T1070.004 — File Deletion', 'T1070.005 — Network Share Connection Removal', 'T1070.006 — Timestomp', 'T1070.007 — Clear Network Connection History and Configurations', 'T1070.008 — Clear Mailbox Data', 'T1070.009 — Clear Persistence'],
|
|
431
|
+
severity: 'high',
|
|
432
|
+
commonTools: ['wevtutil', 'Timestomp (Metasploit)', 'SDelete'],
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
id: 'T1036',
|
|
436
|
+
name: 'Masquerading',
|
|
437
|
+
tactic: 'Defense Evasion',
|
|
438
|
+
description: 'Adversaries masquerade malicious artifacts as legitimate ones — renaming files, matching legitimate process names, manipulating file metadata.',
|
|
439
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
440
|
+
detection: ['Hash verification of known-good binaries', 'File path anomalies (svchost.exe not in System32)', 'Signature verification', 'Metadata analysis (compilation timestamps, PE headers)'],
|
|
441
|
+
mitigations: ['Code signing enforcement', 'Application allowlisting', 'File path validation policies'],
|
|
442
|
+
subtechniques: ['T1036.001 — Invalid Code Signature', 'T1036.002 — Right-to-Left Override', 'T1036.003 — Rename System Utilities', 'T1036.004 — Masquerade Task or Service', 'T1036.005 — Match Legitimate Name or Location', 'T1036.006 — Space after Filename', 'T1036.007 — Double File Extension', 'T1036.008 — Masquerade File Type'],
|
|
443
|
+
severity: 'medium',
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
id: 'T1027',
|
|
447
|
+
name: 'Obfuscated Files or Information',
|
|
448
|
+
tactic: 'Defense Evasion',
|
|
449
|
+
description: 'Adversaries obfuscate payloads and commands to hinder detection and analysis. Encoding, encryption, steganography, packing.',
|
|
450
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
451
|
+
detection: ['Entropy analysis of files', 'Decode/deobfuscate suspected payloads', 'Behavioral analysis after execution', 'AMSI (Antimalware Scan Interface) on Windows'],
|
|
452
|
+
mitigations: ['Behavioral detection', 'AMSI integration', 'Deep content inspection', 'Sandboxing for detonation analysis'],
|
|
453
|
+
subtechniques: ['T1027.001 — Binary Padding', 'T1027.002 — Software Packing', 'T1027.003 — Steganography', 'T1027.004 — Compile After Delivery', 'T1027.005 — Indicator Removal from Tools', 'T1027.006 — HTML Smuggling', 'T1027.007 — Dynamic API Resolution', 'T1027.008 — Stripped Payloads', 'T1027.009 — Embedded Payloads', 'T1027.010 — Command Obfuscation', 'T1027.011 — Fileless Storage', 'T1027.012 — LNK Icon Smuggling', 'T1027.013 — Encrypted/Encoded File', 'T1027.014 — Polymorphic Code'],
|
|
454
|
+
severity: 'high',
|
|
455
|
+
commonTools: ['UPX', 'Themida', 'Invoke-Obfuscation', 'Donut'],
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
id: 'T1140',
|
|
459
|
+
name: 'Deobfuscate/Decode Files or Information',
|
|
460
|
+
tactic: 'Defense Evasion',
|
|
461
|
+
description: 'Adversaries deobfuscate or decode data after delivery. Encoded payloads, encrypted configs, and compressed archives decoded at runtime.',
|
|
462
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
463
|
+
detection: ['Monitor for certutil, base64, openssl decode operations', 'PowerShell script block logging', 'Behavioral analysis of decoded content'],
|
|
464
|
+
mitigations: ['Application allowlisting', 'Script block logging', 'AMSI integration'],
|
|
465
|
+
severity: 'medium',
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
id: 'T1562',
|
|
469
|
+
name: 'Impair Defenses',
|
|
470
|
+
tactic: 'Defense Evasion',
|
|
471
|
+
description: 'Adversaries disable or modify security tools, logging, and defensive mechanisms to avoid detection.',
|
|
472
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
473
|
+
detection: ['Monitor for security tool process termination', 'EDR tamper protection alerts', 'Firewall rule modification monitoring', 'Audit policy change detection'],
|
|
474
|
+
mitigations: ['Tamper protection on security tools', 'Protected Process Light for AV/EDR', 'Restrict access to security configurations', 'Alert on security tool stoppage'],
|
|
475
|
+
subtechniques: ['T1562.001 — Disable or Modify Tools', 'T1562.002 — Disable Windows Event Logging', 'T1562.003 — Impair Command History Logging', 'T1562.004 — Disable or Modify System Firewall', 'T1562.006 — Indicator Blocking', 'T1562.007 — Disable or Modify Cloud Firewall', 'T1562.008 — Disable or Modify Cloud Logs', 'T1562.009 — Safe Mode Boot', 'T1562.010 — Downgrade Attack', 'T1562.011 — Spoof Security Alerting', 'T1562.012 — Disable or Modify Linux Audit System'],
|
|
476
|
+
severity: 'critical',
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
id: 'T1218',
|
|
480
|
+
name: 'System Binary Proxy Execution',
|
|
481
|
+
tactic: 'Defense Evasion',
|
|
482
|
+
description: 'Adversaries use signed system binaries (LOLBins) to proxy execution of malicious content, bypassing application controls and signature validation.',
|
|
483
|
+
platforms: ['Windows'],
|
|
484
|
+
detection: ['Monitor LOLBin usage with unusual arguments', 'Track LOLBAS techniques (mshta, regsvr32, rundll32, etc.)', 'Command-line logging for proxy execution patterns'],
|
|
485
|
+
mitigations: ['Application allowlisting with argument controls', 'Block or restrict LOLBin abuse', 'Script signing enforcement'],
|
|
486
|
+
subtechniques: ['T1218.001 — Compiled HTML File', 'T1218.002 — Control Panel', 'T1218.003 — CMSTP', 'T1218.004 — InstallUtil', 'T1218.005 — Mshta', 'T1218.007 — Msiexec', 'T1218.008 — Odbcconf', 'T1218.009 — Regsvcs/Regasm', 'T1218.010 — Regsvr32', 'T1218.011 — Rundll32', 'T1218.012 — Verclsid', 'T1218.013 — Mavinject', 'T1218.014 — MMC'],
|
|
487
|
+
severity: 'high',
|
|
488
|
+
commonTools: ['LOLBAS (lolbas-project.github.io)', 'GTFOBins'],
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
id: 'T1006',
|
|
492
|
+
name: 'Direct Volume Access',
|
|
493
|
+
tactic: 'Defense Evasion',
|
|
494
|
+
description: 'Adversaries directly access logical drives to bypass file access controls, read locked files, and avoid triggering OS-level file access APIs.',
|
|
495
|
+
platforms: ['Windows'],
|
|
496
|
+
detection: ['Monitor for direct volume access API calls', 'Unusual access to \\\\.\\PhysicalDriveN', 'EDR detection of raw disk reads'],
|
|
497
|
+
mitigations: ['Restrict raw volume access permissions', 'EDR monitoring'],
|
|
498
|
+
severity: 'high',
|
|
499
|
+
},
|
|
500
|
+
// ── TACTIC 8: CREDENTIAL ACCESS ───────────────────────────────────────
|
|
501
|
+
{
|
|
502
|
+
id: 'T1003',
|
|
503
|
+
name: 'OS Credential Dumping',
|
|
504
|
+
tactic: 'Credential Access',
|
|
505
|
+
description: 'Adversaries dump credentials from the OS. LSASS memory, SAM database, /etc/shadow, NTDS.dit, DCSync. Enables lateral movement.',
|
|
506
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
507
|
+
detection: ['LSASS access monitoring (Sysmon Event ID 10)', 'EDR detection of credential dumping tools', 'Monitor for ntdsutil, secretsdump usage', 'DCSync detection via replication events'],
|
|
508
|
+
mitigations: ['Credential Guard on Windows', 'LSASS process protection (PPL)', 'Restrict debug privilege', 'Disable WDigest authentication', 'Regular credential rotation'],
|
|
509
|
+
subtechniques: ['T1003.001 — LSASS Memory', 'T1003.002 — Security Account Manager', 'T1003.003 — NTDS', 'T1003.004 — LSA Secrets', 'T1003.005 — Cached Domain Credentials', 'T1003.006 — DCSync', 'T1003.007 — Proc Filesystem', 'T1003.008 — /etc/passwd and /etc/shadow'],
|
|
510
|
+
severity: 'critical',
|
|
511
|
+
commonTools: ['Mimikatz', 'Secretsdump.py', 'LaZagne', 'Pypykatz'],
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
id: 'T1110',
|
|
515
|
+
name: 'Brute Force',
|
|
516
|
+
tactic: 'Credential Access',
|
|
517
|
+
description: 'Adversaries use brute force to crack passwords — password guessing, spraying, stuffing, and hash cracking.',
|
|
518
|
+
platforms: ['Windows', 'Linux', 'macOS', 'SaaS'],
|
|
519
|
+
detection: ['Multiple failed authentication attempts', 'Password spray patterns (many users, few passwords)', 'Credential stuffing from known breach lists', 'Account lockout events'],
|
|
520
|
+
mitigations: ['Account lockout policies', 'MFA enforcement', 'Password complexity requirements', 'Rate limiting', 'CAPTCHA after failed attempts'],
|
|
521
|
+
subtechniques: ['T1110.001 — Password Guessing', 'T1110.002 — Password Cracking', 'T1110.003 — Password Spraying', 'T1110.004 — Credential Stuffing'],
|
|
522
|
+
severity: 'high',
|
|
523
|
+
commonTools: ['Hashcat', 'John the Ripper', 'Hydra', 'CrackMapExec'],
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
id: 'T1056',
|
|
527
|
+
name: 'Input Capture',
|
|
528
|
+
tactic: 'Credential Access',
|
|
529
|
+
description: 'Adversaries capture user input (keylogging, GUI capture, web portal capture) to obtain credentials and other sensitive data.',
|
|
530
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
531
|
+
detection: ['Monitor for keylogger indicators (API hooking, raw input capture)', 'Anomalous input capture API usage', 'Process behavior analysis'],
|
|
532
|
+
mitigations: ['Endpoint protection', 'Virtual keyboards for sensitive input', 'Behavioral analysis'],
|
|
533
|
+
subtechniques: ['T1056.001 — Keylogging', 'T1056.002 — GUI Input Capture', 'T1056.003 — Web Portal Capture', 'T1056.004 — Credential API Hooking'],
|
|
534
|
+
severity: 'high',
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
id: 'T1558',
|
|
538
|
+
name: 'Steal or Forge Kerberos Tickets',
|
|
539
|
+
tactic: 'Credential Access',
|
|
540
|
+
description: 'Adversaries steal or forge Kerberos tickets for authentication abuse — Golden Ticket, Silver Ticket, Kerberoasting, AS-REP Roasting.',
|
|
541
|
+
platforms: ['Windows'],
|
|
542
|
+
detection: ['Kerberoasting: monitor for TGS requests with RC4 encryption', 'Golden Ticket: monitor for TGT with abnormal lifetime', 'AS-REP Roasting: accounts without pre-auth required', 'Event ID 4769 analysis'],
|
|
543
|
+
mitigations: ['Managed Service Accounts (MSAs)', 'Strong service account passwords (25+ chars)', 'Disable RC4 for Kerberos', 'Enable Kerberos pre-authentication for all accounts', 'Monitor for Kerberos anomalies'],
|
|
544
|
+
subtechniques: ['T1558.001 — Golden Ticket', 'T1558.002 — Silver Ticket', 'T1558.003 — Kerberoasting', 'T1558.004 — AS-REP Roasting'],
|
|
545
|
+
severity: 'critical',
|
|
546
|
+
commonTools: ['Rubeus', 'Impacket', 'Mimikatz', 'GetUserSPNs.py'],
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
id: 'T1555',
|
|
550
|
+
name: 'Credentials from Password Stores',
|
|
551
|
+
tactic: 'Credential Access',
|
|
552
|
+
description: 'Adversaries search password stores for credentials — browser password managers, OS credential managers, third-party password managers.',
|
|
553
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
554
|
+
detection: ['Monitor access to browser credential files', 'Keychain access monitoring on macOS', 'Credential Manager access events on Windows'],
|
|
555
|
+
mitigations: ['Use hardware-backed credential storage', 'Monitor password store access', 'Enterprise password managers with audit logging'],
|
|
556
|
+
subtechniques: ['T1555.001 — Keychain', 'T1555.002 — Securityd Memory', 'T1555.003 — Credentials from Web Browsers', 'T1555.004 — Windows Credential Manager', 'T1555.005 — Password Managers', 'T1555.006 — Cloud Secrets Management Stores'],
|
|
557
|
+
severity: 'high',
|
|
558
|
+
commonTools: ['LaZagne', 'SharpChrome', 'BrowserStealer'],
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
id: 'T1621',
|
|
562
|
+
name: 'Multi-Factor Authentication Request Generation',
|
|
563
|
+
tactic: 'Credential Access',
|
|
564
|
+
description: 'Adversaries abuse MFA by generating repeated push notifications (MFA fatigue/bombing) until the user approves the request out of frustration.',
|
|
565
|
+
platforms: ['SaaS', 'Azure AD', 'Google Workspace'],
|
|
566
|
+
detection: ['Multiple MFA requests in short time window', 'MFA denial followed by approval', 'Anomalous authentication patterns', 'User-reported MFA bombing'],
|
|
567
|
+
mitigations: ['Number matching MFA (not simple approve/deny)', 'MFA rate limiting', 'User education on MFA fatigue attacks', 'FIDO2/WebAuthn (phishing-resistant MFA)'],
|
|
568
|
+
severity: 'high',
|
|
569
|
+
},
|
|
570
|
+
// ── TACTIC 9: DISCOVERY ───────────────────────────────────────────────
|
|
571
|
+
{
|
|
572
|
+
id: 'T1087',
|
|
573
|
+
name: 'Account Discovery',
|
|
574
|
+
tactic: 'Discovery',
|
|
575
|
+
description: 'Adversaries enumerate accounts on a system or domain to understand the environment and identify high-value targets.',
|
|
576
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
577
|
+
detection: ['Monitor for net user, net group commands', 'LDAP enumeration detection', 'AWS IAM enumeration', 'Unusual directory service queries'],
|
|
578
|
+
mitigations: ['Restrict account enumeration permissions', 'Network segmentation', 'Limit LDAP query scope'],
|
|
579
|
+
subtechniques: ['T1087.001 — Local Account', 'T1087.002 — Domain Account', 'T1087.003 — Email Account', 'T1087.004 — Cloud Account'],
|
|
580
|
+
severity: 'low',
|
|
581
|
+
commonTools: ['BloodHound', 'ADRecon', 'CrackMapExec', 'Enum4linux'],
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
id: 'T1046',
|
|
585
|
+
name: 'Network Service Discovery',
|
|
586
|
+
tactic: 'Discovery',
|
|
587
|
+
description: 'Adversaries scan for running services on remote hosts. Port scanning, service enumeration, banner grabbing.',
|
|
588
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
589
|
+
detection: ['Internal network scan detection', 'Unusual port scanning patterns', 'IDS for scanning signatures', 'Netflow analysis'],
|
|
590
|
+
mitigations: ['Network segmentation', 'Host-based firewall', 'Disable unnecessary services', 'Micro-segmentation'],
|
|
591
|
+
severity: 'low',
|
|
592
|
+
commonTools: ['Nmap', 'Masscan', 'Rustscan'],
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
id: 'T1082',
|
|
596
|
+
name: 'System Information Discovery',
|
|
597
|
+
tactic: 'Discovery',
|
|
598
|
+
description: 'Adversaries gather detailed system information (OS version, hostname, hardware, patches) for further exploitation.',
|
|
599
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
600
|
+
detection: ['Monitor for systeminfo, uname, hostnamectl commands', 'WMI queries for system information', 'Unusual system enumeration patterns'],
|
|
601
|
+
mitigations: ['Limit information exposure', 'Monitor enumeration commands', 'EDR behavioral baselines'],
|
|
602
|
+
severity: 'low',
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
id: 'T1057',
|
|
606
|
+
name: 'Process Discovery',
|
|
607
|
+
tactic: 'Discovery',
|
|
608
|
+
description: 'Adversaries list running processes to understand the software environment, identify security tools, and find targets for injection.',
|
|
609
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
610
|
+
detection: ['Monitor for tasklist, ps, Get-Process usage', 'Anomalous process enumeration frequency', 'Process list queries from unexpected contexts'],
|
|
611
|
+
mitigations: ['Restrict process listing permissions where possible', 'EDR monitoring'],
|
|
612
|
+
severity: 'low',
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
id: 'T1018',
|
|
616
|
+
name: 'Remote System Discovery',
|
|
617
|
+
tactic: 'Discovery',
|
|
618
|
+
description: 'Adversaries enumerate remote systems on the network for lateral movement planning. ARP scanning, ping sweeps, net view, LDAP queries.',
|
|
619
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
620
|
+
detection: ['ARP and ICMP sweep detection', 'Anomalous LDAP queries for computer objects', 'Network scanning from unusual hosts'],
|
|
621
|
+
mitigations: ['Network segmentation', 'Limit broadcast traffic', 'Restrict LDAP query scope'],
|
|
622
|
+
severity: 'low',
|
|
623
|
+
commonTools: ['BloodHound', 'ADRecon', 'Nmap', 'arp-scan'],
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
id: 'T1654',
|
|
627
|
+
name: 'Log Enumeration',
|
|
628
|
+
tactic: 'Discovery',
|
|
629
|
+
description: 'Adversaries enumerate system and security logs to understand defensive capabilities and identify blind spots.',
|
|
630
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
631
|
+
detection: ['Monitor for unusual log file access', 'Track queries to event log services', 'Anomalous access to /var/log/ directory'],
|
|
632
|
+
mitigations: ['Restrict log file permissions', 'Monitor log access patterns', 'Centralized logging reduces local log value'],
|
|
633
|
+
severity: 'low',
|
|
634
|
+
},
|
|
635
|
+
// ── TACTIC 10: LATERAL MOVEMENT ───────────────────────────────────────
|
|
636
|
+
{
|
|
637
|
+
id: 'T1021',
|
|
638
|
+
name: 'Remote Services',
|
|
639
|
+
tactic: 'Lateral Movement',
|
|
640
|
+
description: 'Adversaries use remote services (RDP, SSH, SMB/Admin Shares, WinRM, VNC, distributed COM) to move laterally between systems.',
|
|
641
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
642
|
+
detection: ['Monitor remote login events', 'Track unusual RDP/SSH connections', 'Lateral movement detection via graph analysis', 'Anomalous administrative share access'],
|
|
643
|
+
mitigations: ['MFA for remote access', 'Network segmentation', 'Restrict admin shares', 'Just-in-time access', 'Privileged Access Workstations'],
|
|
644
|
+
subtechniques: ['T1021.001 — Remote Desktop Protocol', 'T1021.002 — SMB/Windows Admin Shares', 'T1021.003 — Distributed Component Object Model', 'T1021.004 — SSH', 'T1021.005 — VNC', 'T1021.006 — Windows Remote Management', 'T1021.007 — Cloud Services', 'T1021.008 — Direct Cloud VM Connections'],
|
|
645
|
+
severity: 'high',
|
|
646
|
+
commonTools: ['PsExec', 'CrackMapExec', 'Evil-WinRM', 'Impacket'],
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
id: 'T1570',
|
|
650
|
+
name: 'Lateral Tool Transfer',
|
|
651
|
+
tactic: 'Lateral Movement',
|
|
652
|
+
description: 'Adversaries transfer tools between systems within the compromised network using SMB, SCP, RDP clipboard, or other file transfer methods.',
|
|
653
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
654
|
+
detection: ['Monitor internal file transfers between workstations', 'SMB file copy detection', 'Anomalous file creation on remote systems', 'Unusual use of certutil, bitsadmin for internal transfers'],
|
|
655
|
+
mitigations: ['Network segmentation', 'Application allowlisting', 'Monitor internal file sharing patterns'],
|
|
656
|
+
severity: 'medium',
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
id: 'T1210',
|
|
660
|
+
name: 'Exploitation of Remote Services',
|
|
661
|
+
tactic: 'Lateral Movement',
|
|
662
|
+
description: 'Adversaries exploit vulnerabilities in internal remote services (SMB, RDP, databases, web apps) to move laterally. EternalBlue, BlueKeep, ProxyLogon.',
|
|
663
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
664
|
+
detection: ['Vulnerability scanning of internal services', 'IDS for known exploit signatures', 'Crash/restart of internal services', 'Network anomaly detection'],
|
|
665
|
+
mitigations: ['Patch internal services promptly', 'Network segmentation', 'Disable unnecessary services', 'Virtual patching via IPS'],
|
|
666
|
+
severity: 'critical',
|
|
667
|
+
commonTools: ['Metasploit', 'EternalBlue', 'ProxyShell exploits'],
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
id: 'T1550',
|
|
671
|
+
name: 'Use Alternate Authentication Material',
|
|
672
|
+
tactic: 'Lateral Movement',
|
|
673
|
+
description: 'Adversaries use alternate authentication material (hashes, tickets, tokens, cookies, certificates) instead of passwords for lateral movement.',
|
|
674
|
+
platforms: ['Windows', 'Linux', 'macOS', 'SaaS'],
|
|
675
|
+
detection: ['Pass-the-hash detection via NTLM analysis', 'Anomalous Kerberos ticket usage', 'Stolen session cookie detection', 'Certificate-based auth anomalies'],
|
|
676
|
+
mitigations: ['Credential Guard', 'Disable NTLM where possible', 'Session token rotation', 'Certificate-based auth with hardware tokens'],
|
|
677
|
+
subtechniques: ['T1550.001 — Application Access Token', 'T1550.002 — Pass the Hash', 'T1550.003 — Pass the Ticket', 'T1550.004 — Web Session Cookie'],
|
|
678
|
+
severity: 'high',
|
|
679
|
+
commonTools: ['Mimikatz', 'Impacket (wmiexec, smbexec)', 'Rubeus'],
|
|
680
|
+
},
|
|
681
|
+
// ── TACTIC 11: COLLECTION ─────────────────────────────────────────────
|
|
682
|
+
{
|
|
683
|
+
id: 'T1005',
|
|
684
|
+
name: 'Data from Local System',
|
|
685
|
+
tactic: 'Collection',
|
|
686
|
+
description: 'Adversaries collect sensitive data from the local system — documents, databases, credentials, configs, source code.',
|
|
687
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
688
|
+
detection: ['Monitor for mass file access patterns', 'DLP for sensitive data movement', 'Anomalous file read operations', 'Large archive creation'],
|
|
689
|
+
mitigations: ['Data classification and DLP', 'Encrypt sensitive data at rest', 'File access auditing', 'Least privilege file permissions'],
|
|
690
|
+
severity: 'high',
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
id: 'T1114',
|
|
694
|
+
name: 'Email Collection',
|
|
695
|
+
tactic: 'Collection',
|
|
696
|
+
description: 'Adversaries collect email data from mailboxes, mail servers, and mail forwarding rules. Targets sensitive communications and credentials.',
|
|
697
|
+
platforms: ['Windows', 'Office 365', 'Google Workspace'],
|
|
698
|
+
detection: ['Monitor for mailbox access by unusual accounts', 'Detect new mail forwarding rules', 'EWS/Graph API access anomalies', 'OAuth consent grant monitoring'],
|
|
699
|
+
mitigations: ['Restrict mailbox delegation', 'Monitor for mail forwarding rules', 'Audit OAuth app permissions', 'Alert on bulk email access'],
|
|
700
|
+
subtechniques: ['T1114.001 — Local Email Collection', 'T1114.002 — Remote Email Collection', 'T1114.003 — Email Forwarding Rule'],
|
|
701
|
+
severity: 'high',
|
|
702
|
+
commonTools: ['MailSniper', 'Ruler', 'GraphRunner'],
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
id: 'T1113',
|
|
706
|
+
name: 'Screen Capture',
|
|
707
|
+
tactic: 'Collection',
|
|
708
|
+
description: 'Adversaries capture screenshots to collect information displayed on the screen — passwords, sensitive documents, application data.',
|
|
709
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
710
|
+
detection: ['Monitor for screenshot API calls', 'Unusual image file creation patterns', 'Screen capture utility execution'],
|
|
711
|
+
mitigations: ['Application-level screen capture restrictions', 'DLP for image files', 'Watermarking sensitive screens'],
|
|
712
|
+
severity: 'medium',
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
id: 'T1115',
|
|
716
|
+
name: 'Clipboard Data',
|
|
717
|
+
tactic: 'Collection',
|
|
718
|
+
description: 'Adversaries collect data stored in the clipboard. Password managers, copy-paste of credentials, sensitive documents.',
|
|
719
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
720
|
+
detection: ['Clipboard access monitoring', 'Anomalous clipboard read frequency', 'EDR clipboard hook detection'],
|
|
721
|
+
mitigations: ['Clipboard clearing after sensitive operations', 'Password manager auto-type instead of copy', 'EDR monitoring'],
|
|
722
|
+
severity: 'medium',
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
id: 'T1560',
|
|
726
|
+
name: 'Archive Collected Data',
|
|
727
|
+
tactic: 'Collection',
|
|
728
|
+
description: 'Adversaries compress and/or encrypt collected data before exfiltration. Reduces transfer size and evades DLP content inspection.',
|
|
729
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
730
|
+
detection: ['Monitor for archiving utility usage (7z, rar, zip, tar)', 'Large archive file creation', 'Encrypted archive creation', 'Unusual compression from non-standard paths'],
|
|
731
|
+
mitigations: ['Monitor archiving tool usage', 'DLP for archive files', 'Restrict archiving tool access'],
|
|
732
|
+
subtechniques: ['T1560.001 — Archive via Utility', 'T1560.002 — Archive via Library', 'T1560.003 — Archive via Custom Method'],
|
|
733
|
+
severity: 'medium',
|
|
734
|
+
},
|
|
735
|
+
// ── TACTIC 12: COMMAND AND CONTROL ────────────────────────────────────
|
|
736
|
+
{
|
|
737
|
+
id: 'T1071',
|
|
738
|
+
name: 'Application Layer Protocol',
|
|
739
|
+
tactic: 'Command and Control',
|
|
740
|
+
description: 'Adversaries use application layer protocols (HTTP/S, DNS, SMTP, WebSockets) for C2 to blend with normal traffic.',
|
|
741
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
742
|
+
detection: ['Deep packet inspection', 'DNS anomaly detection (long queries, high frequency)', 'HTTPS certificate analysis', 'Beacon pattern detection (periodic callbacks)', 'JA3/JA3S fingerprinting'],
|
|
743
|
+
mitigations: ['SSL/TLS inspection', 'DNS filtering', 'Network traffic analysis', 'Application-aware firewalls'],
|
|
744
|
+
subtechniques: ['T1071.001 — Web Protocols', 'T1071.002 — File Transfer Protocols', 'T1071.003 — Mail Protocols', 'T1071.004 — DNS'],
|
|
745
|
+
severity: 'high',
|
|
746
|
+
commonTools: ['Cobalt Strike', 'Sliver', 'Covenant', 'DNS-over-HTTPS tunneling'],
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
id: 'T1573',
|
|
750
|
+
name: 'Encrypted Channel',
|
|
751
|
+
tactic: 'Command and Control',
|
|
752
|
+
description: 'Adversaries encrypt C2 communications to prevent content inspection. Custom encryption, standard protocols (TLS), or asymmetric cryptography.',
|
|
753
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
754
|
+
detection: ['JA3/JA3S TLS fingerprinting', 'Certificate analysis (self-signed, short-lived)', 'Encrypted traffic volume anomalies', 'Behavioral analysis of encrypted sessions'],
|
|
755
|
+
mitigations: ['SSL/TLS inspection (MITM proxy)', 'Certificate pinning monitoring', 'Network behavioral analysis'],
|
|
756
|
+
subtechniques: ['T1573.001 — Symmetric Cryptography', 'T1573.002 — Asymmetric Cryptography'],
|
|
757
|
+
severity: 'high',
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
id: 'T1090',
|
|
761
|
+
name: 'Proxy',
|
|
762
|
+
tactic: 'Command and Control',
|
|
763
|
+
description: 'Adversaries use proxies to route C2 traffic through intermediaries. Internal proxies, external proxies, multi-hop proxies, domain fronting.',
|
|
764
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
765
|
+
detection: ['Monitor for unexpected proxy usage', 'Domain fronting detection', 'Multi-hop connection analysis', 'Tor exit node detection'],
|
|
766
|
+
mitigations: ['Block known proxy services', 'SSL inspection for domain fronting', 'Network segmentation'],
|
|
767
|
+
subtechniques: ['T1090.001 — Internal Proxy', 'T1090.002 — External Proxy', 'T1090.003 — Multi-hop Proxy', 'T1090.004 — Domain Fronting'],
|
|
768
|
+
severity: 'high',
|
|
769
|
+
commonTools: ['Cloudflare Workers', 'AWS CloudFront domain fronting', 'Tor', 'Chisel'],
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
id: 'T1132',
|
|
773
|
+
name: 'Data Encoding',
|
|
774
|
+
tactic: 'Command and Control',
|
|
775
|
+
description: 'Adversaries encode C2 data to make it harder to detect. Base64, custom encoding schemes, protocol-specific encoding.',
|
|
776
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
777
|
+
detection: ['Base64 detection in DNS queries', 'Anomalous HTTP header/parameter values', 'Statistical analysis of traffic entropy'],
|
|
778
|
+
mitigations: ['Deep packet inspection', 'DNS content analysis', 'Behavioral traffic analysis'],
|
|
779
|
+
subtechniques: ['T1132.001 — Standard Encoding', 'T1132.002 — Non-Standard Encoding'],
|
|
780
|
+
severity: 'medium',
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
id: 'T1102',
|
|
784
|
+
name: 'Web Service',
|
|
785
|
+
tactic: 'Command and Control',
|
|
786
|
+
description: 'Adversaries use legitimate web services (social media, cloud storage, paste sites, CDNs) for C2. Hard to block without disrupting business.',
|
|
787
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
788
|
+
detection: ['Monitor for unusual API calls to cloud services', 'Traffic volume anomalies to web services', 'Behavioral analysis of web service usage patterns'],
|
|
789
|
+
mitigations: ['Cloud access security broker (CASB)', 'Monitor API usage to cloud services', 'Restrict web service access where feasible'],
|
|
790
|
+
subtechniques: ['T1102.001 — Dead Drop Resolver', 'T1102.002 — Bidirectional Communication', 'T1102.003 — One-Way Communication'],
|
|
791
|
+
severity: 'high',
|
|
792
|
+
commonTools: ['Slack C2', 'Discord C2', 'Telegram bots', 'Pastebin', 'GitHub/GitLab pages'],
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
id: 'T1001',
|
|
796
|
+
name: 'Data Obfuscation',
|
|
797
|
+
tactic: 'Command and Control',
|
|
798
|
+
description: 'Adversaries obfuscate C2 traffic to evade detection — junk data, steganography, protocol impersonation.',
|
|
799
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
800
|
+
detection: ['Deep packet inspection', 'Statistical traffic analysis', 'Protocol conformance checking', 'Steganography detection tools'],
|
|
801
|
+
mitigations: ['Network traffic analysis', 'Protocol validation', 'Behavioral anomaly detection'],
|
|
802
|
+
subtechniques: ['T1001.001 — Junk Data', 'T1001.002 — Steganography', 'T1001.003 — Protocol Impersonation'],
|
|
803
|
+
severity: 'medium',
|
|
804
|
+
},
|
|
805
|
+
// ── TACTIC 13: EXFILTRATION ───────────────────────────────────────────
|
|
806
|
+
{
|
|
807
|
+
id: 'T1041',
|
|
808
|
+
name: 'Exfiltration Over C2 Channel',
|
|
809
|
+
tactic: 'Exfiltration',
|
|
810
|
+
description: 'Adversaries exfiltrate data over the existing C2 channel. Most common exfiltration method — reuses established covert communication.',
|
|
811
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
812
|
+
detection: ['Monitor C2 channel for data volume anomalies', 'Outbound transfer size analysis', 'Beacon data size deviation', 'DLP on C2 endpoints'],
|
|
813
|
+
mitigations: ['Network DLP', 'Egress filtering', 'Network traffic analysis', 'Data classification and monitoring'],
|
|
814
|
+
severity: 'high',
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
id: 'T1048',
|
|
818
|
+
name: 'Exfiltration Over Alternative Protocol',
|
|
819
|
+
tactic: 'Exfiltration',
|
|
820
|
+
description: 'Adversaries exfiltrate data using a different protocol than C2 — DNS tunneling, ICMP tunneling, HTTP/S to different endpoints.',
|
|
821
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
822
|
+
detection: ['DNS tunnel detection (query length, frequency)', 'ICMP payload analysis', 'Unusual protocol usage patterns', 'Anomalous outbound connections'],
|
|
823
|
+
mitigations: ['Egress filtering', 'DNS monitoring', 'Protocol-aware firewalls', 'Data loss prevention'],
|
|
824
|
+
subtechniques: ['T1048.001 — Exfiltration Over Symmetric Encrypted Non-C2 Protocol', 'T1048.002 — Exfiltration Over Asymmetric Encrypted Non-C2 Protocol', 'T1048.003 — Exfiltration Over Unencrypted Non-C2 Protocol'],
|
|
825
|
+
severity: 'high',
|
|
826
|
+
commonTools: ['Iodine (DNS tunnel)', 'dnscat2', 'icmpsh'],
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
id: 'T1567',
|
|
830
|
+
name: 'Exfiltration Over Web Service',
|
|
831
|
+
tactic: 'Exfiltration',
|
|
832
|
+
description: 'Adversaries exfiltrate data to cloud storage and web services (Google Drive, Dropbox, OneDrive, Mega, S3, Azure Blob). Hard to distinguish from normal usage.',
|
|
833
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
834
|
+
detection: ['CASB monitoring for unusual uploads', 'DLP for cloud storage services', 'Volume anomaly detection', 'Unusual cloud storage API usage'],
|
|
835
|
+
mitigations: ['Cloud access security broker', 'DLP integration with cloud services', 'Restrict personal cloud storage', 'Monitor cloud storage API usage'],
|
|
836
|
+
subtechniques: ['T1567.001 — Exfiltration to Code Repository', 'T1567.002 — Exfiltration to Cloud Storage', 'T1567.003 — Exfiltration to Text Storage Sites', 'T1567.004 — Exfiltration Over Webhook'],
|
|
837
|
+
severity: 'high',
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
id: 'T1011',
|
|
841
|
+
name: 'Exfiltration Over Other Network Medium',
|
|
842
|
+
tactic: 'Exfiltration',
|
|
843
|
+
description: 'Adversaries exfiltrate data over a different network medium than C2 — WiFi, Bluetooth, cellular, RF signals.',
|
|
844
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
845
|
+
detection: ['Wireless traffic monitoring', 'Bluetooth device enumeration', 'RF signal detection', 'Network device inventory'],
|
|
846
|
+
mitigations: ['Disable unused wireless interfaces', 'RF shielding for sensitive areas', 'Wireless intrusion prevention'],
|
|
847
|
+
subtechniques: ['T1011.001 — Exfiltration Over Bluetooth'],
|
|
848
|
+
severity: 'medium',
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
id: 'T1052',
|
|
852
|
+
name: 'Exfiltration Over Physical Medium',
|
|
853
|
+
tactic: 'Exfiltration',
|
|
854
|
+
description: 'Adversaries exfiltrate data via physical media — USB drives, external hard drives, optical media. Bypasses network monitoring entirely.',
|
|
855
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
856
|
+
detection: ['USB device connection monitoring', 'DLP for removable media', 'Physical access monitoring', 'File copy to removable media detection'],
|
|
857
|
+
mitigations: ['Disable USB storage devices', 'DLP for removable media', 'Physical security controls', 'Port blockers'],
|
|
858
|
+
subtechniques: ['T1052.001 — Exfiltration over USB'],
|
|
859
|
+
severity: 'medium',
|
|
860
|
+
},
|
|
861
|
+
// ── TACTIC 14: IMPACT ─────────────────────────────────────────────────
|
|
862
|
+
{
|
|
863
|
+
id: 'T1485',
|
|
864
|
+
name: 'Data Destruction',
|
|
865
|
+
tactic: 'Impact',
|
|
866
|
+
description: 'Adversaries destroy data on specific systems or across a network to disrupt operations. Ransomware without recovery, wiper malware.',
|
|
867
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
868
|
+
detection: ['Mass file deletion/modification detection', 'Unusual write patterns to disk', 'MBR/VBR modification detection', 'Anomalous file system activity'],
|
|
869
|
+
mitigations: ['Offline/immutable backups', 'Backup verification testing', 'Network segmentation', 'Data replication'],
|
|
870
|
+
severity: 'critical',
|
|
871
|
+
commonTools: ['NotPetya', 'WhisperGate', 'HermeticWiper', 'CaddyWiper'],
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
id: 'T1486',
|
|
875
|
+
name: 'Data Encrypted for Impact',
|
|
876
|
+
tactic: 'Impact',
|
|
877
|
+
description: 'Adversaries encrypt data to render it inaccessible — ransomware. Most financially motivated attack vector. Often combined with data exfiltration (double extortion).',
|
|
878
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
879
|
+
detection: ['Rapid file extension changes', 'Entropy increase in file content', 'Mass file rename operations', 'Ransomware note file creation', 'Volume shadow copy deletion'],
|
|
880
|
+
mitigations: ['Offline/immutable backups', 'EDR with ransomware protection', 'Application allowlisting', 'Network segmentation', 'Restrict admin privileges'],
|
|
881
|
+
severity: 'critical',
|
|
882
|
+
commonTools: ['LockBit', 'BlackCat/ALPHV', 'Royal', 'Play', 'Akira'],
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
id: 'T1491',
|
|
886
|
+
name: 'Defacement',
|
|
887
|
+
tactic: 'Impact',
|
|
888
|
+
description: 'Adversaries deface internal or external systems to deliver messages, intimidate, or damage reputation.',
|
|
889
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
890
|
+
detection: ['File integrity monitoring on web content', 'Visual change detection for websites', 'Content hash verification'],
|
|
891
|
+
mitigations: ['File integrity monitoring', 'Web application firewall', 'Backup web content', 'Restrict web directory write permissions'],
|
|
892
|
+
subtechniques: ['T1491.001 — Internal Defacement', 'T1491.002 — External Defacement'],
|
|
893
|
+
severity: 'medium',
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
id: 'T1561',
|
|
897
|
+
name: 'Disk Wipe',
|
|
898
|
+
tactic: 'Impact',
|
|
899
|
+
description: 'Adversaries wipe disk data structures (MBR, partition table) or content to make systems unbootable or data unrecoverable.',
|
|
900
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
901
|
+
detection: ['Raw disk write monitoring', 'MBR/partition table modification detection', 'Mass disk I/O anomalies'],
|
|
902
|
+
mitigations: ['Immutable backups', 'Boot integrity verification (Secure Boot, UEFI)', 'Network segmentation'],
|
|
903
|
+
subtechniques: ['T1561.001 — Disk Content Wipe', 'T1561.002 — Disk Structure Wipe'],
|
|
904
|
+
severity: 'critical',
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
id: 'T1496',
|
|
908
|
+
name: 'Resource Hijacking',
|
|
909
|
+
tactic: 'Impact',
|
|
910
|
+
description: 'Adversaries hijack computing resources for cryptocurrency mining, distributed computing, or other resource-intensive tasks.',
|
|
911
|
+
platforms: ['Windows', 'Linux', 'macOS', 'Containers'],
|
|
912
|
+
detection: ['CPU/GPU usage anomalies', 'Cryptomining process detection', 'Network connections to mining pools', 'Cloud billing anomalies'],
|
|
913
|
+
mitigations: ['Application allowlisting', 'Container security policies', 'Cloud resource monitoring and budgets', 'EDR detection of mining software'],
|
|
914
|
+
severity: 'medium',
|
|
915
|
+
commonTools: ['XMRig', 'Coinhive (deprecated)', 'Cloud instance abuse'],
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
id: 'T1531',
|
|
919
|
+
name: 'Account Access Removal',
|
|
920
|
+
tactic: 'Impact',
|
|
921
|
+
description: 'Adversaries delete, lock, or manipulate accounts to prevent legitimate users from accessing systems. Disrupts operations and recovery.',
|
|
922
|
+
platforms: ['Windows', 'Linux', 'macOS', 'SaaS'],
|
|
923
|
+
detection: ['Mass account deletion/lockout events', 'Password change anomalies', 'MFA removal detection', 'Administrative account modification'],
|
|
924
|
+
mitigations: ['Restrict account modification privileges', 'Break-glass accounts', 'Multi-person approval for bulk account changes', 'Backup of directory services'],
|
|
925
|
+
severity: 'high',
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
id: 'T1499',
|
|
929
|
+
name: 'Endpoint Denial of Service',
|
|
930
|
+
tactic: 'Impact',
|
|
931
|
+
description: 'Adversaries perform DoS attacks targeting application or system availability — application exhaustion, OS exhaustion, service-specific attacks.',
|
|
932
|
+
platforms: ['Windows', 'Linux', 'macOS'],
|
|
933
|
+
detection: ['Resource utilization monitoring', 'Application performance monitoring', 'Connection rate analysis', 'Service availability checks'],
|
|
934
|
+
mitigations: ['Rate limiting', 'Application-level DoS protection', 'Auto-scaling', 'WAF/CDN for application protection'],
|
|
935
|
+
subtechniques: ['T1499.001 — OS Exhaustion Flood', 'T1499.002 — Service Exhaustion Flood', 'T1499.003 — Application Exhaustion Flood', 'T1499.004 — Application or System Exploitation'],
|
|
936
|
+
severity: 'high',
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
id: 'T1498',
|
|
940
|
+
name: 'Network Denial of Service',
|
|
941
|
+
tactic: 'Impact',
|
|
942
|
+
description: 'Adversaries perform network-level DoS attacks to degrade or disrupt connectivity — volumetric floods, amplification attacks, protocol abuse.',
|
|
943
|
+
platforms: ['Network'],
|
|
944
|
+
detection: ['Volumetric traffic analysis', 'Protocol anomaly detection', 'BGP route monitoring', 'DDoS detection systems'],
|
|
945
|
+
mitigations: ['DDoS mitigation services (Cloudflare, AWS Shield)', 'Rate limiting', 'Network redundancy', 'Traffic scrubbing'],
|
|
946
|
+
subtechniques: ['T1498.001 — Direct Network Flood', 'T1498.002 — Reflection Amplification'],
|
|
947
|
+
severity: 'high',
|
|
948
|
+
},
|
|
949
|
+
];
|
|
950
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
951
|
+
// OWASP TOP 10 (2025)
|
|
952
|
+
// Includes the two new entries: A03 Software Supply Chain Failures,
|
|
953
|
+
// A10 Mishandling Exceptional Conditions
|
|
954
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
955
|
+
const OWASP_2025 = [
|
|
956
|
+
{
|
|
957
|
+
id: 'A01',
|
|
958
|
+
name: 'Broken Access Control',
|
|
959
|
+
description: 'Access control enforces policy such that users cannot act outside their intended permissions. Failures lead to unauthorized information disclosure, modification, or destruction of data, or performing business functions outside the user\'s limits.',
|
|
960
|
+
exampleAttack: 'Attacker modifies the URL parameter from /api/users/123 to /api/users/456 (IDOR) and accesses another user\'s data. Or attacker elevates role by modifying the JWT payload from "role":"user" to "role":"admin" when the server trusts client-supplied role claims.',
|
|
961
|
+
detection: [
|
|
962
|
+
'Automated DAST scanning for IDOR vulnerabilities',
|
|
963
|
+
'Log analysis for cross-account access patterns',
|
|
964
|
+
'Penetration testing with privilege escalation focus',
|
|
965
|
+
'Monitor for sequential ID enumeration in API logs',
|
|
966
|
+
'JWT integrity validation auditing',
|
|
967
|
+
],
|
|
968
|
+
remediation: [
|
|
969
|
+
'Deny by default — require explicit grants',
|
|
970
|
+
'Implement server-side access control checks on every request',
|
|
971
|
+
'Use indirect object references (UUIDs instead of sequential IDs)',
|
|
972
|
+
'Disable directory listing and ensure metadata files are not accessible',
|
|
973
|
+
'Log access control failures and alert on repeated attempts',
|
|
974
|
+
'Rate-limit API requests to minimize automated abuse',
|
|
975
|
+
'Invalidate sessions on server side after logout',
|
|
976
|
+
],
|
|
977
|
+
codePattern: `// BAD: Direct object reference with no auth check
|
|
978
|
+
app.get('/api/users/:id', (req, res) => {
|
|
979
|
+
return db.users.findById(req.params.id) // Anyone can access any user!
|
|
980
|
+
})
|
|
981
|
+
|
|
982
|
+
// GOOD: Server-side ownership check
|
|
983
|
+
app.get('/api/users/:id', authenticate, (req, res) => {
|
|
984
|
+
if (req.user.id !== req.params.id && req.user.role !== 'admin') {
|
|
985
|
+
return res.status(403).json({ error: 'Forbidden' })
|
|
986
|
+
}
|
|
987
|
+
return db.users.findById(req.params.id)
|
|
988
|
+
})`,
|
|
989
|
+
severity: 'critical',
|
|
990
|
+
cweIds: ['CWE-200', 'CWE-284', 'CWE-285', 'CWE-352', 'CWE-639'],
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
id: 'A02',
|
|
994
|
+
name: 'Security Misconfiguration',
|
|
995
|
+
description: 'Application is insecure due to missing security hardening, overly permissive configurations, default credentials, verbose error messages, unnecessary features enabled, or missing security headers.',
|
|
996
|
+
exampleAttack: 'Attacker discovers admin console at /admin with default credentials admin/admin. Stack traces in production expose internal paths, framework versions, and SQL queries. S3 bucket left public exposes customer PII.',
|
|
997
|
+
detection: [
|
|
998
|
+
'Automated configuration scanning (ScoutSuite, Prowler)',
|
|
999
|
+
'HTTP security header verification',
|
|
1000
|
+
'Default credential scanning',
|
|
1001
|
+
'Cloud security posture management (CSPM)',
|
|
1002
|
+
'Regular security baseline audits',
|
|
1003
|
+
],
|
|
1004
|
+
remediation: [
|
|
1005
|
+
'Implement security hardening checklist for each deployment',
|
|
1006
|
+
'Remove default accounts and change default passwords',
|
|
1007
|
+
'Disable directory listing, stack traces, and debug modes in production',
|
|
1008
|
+
'Set proper security headers (CSP, HSTS, X-Frame-Options, X-Content-Type-Options)',
|
|
1009
|
+
'Review cloud permissions with least-privilege principle',
|
|
1010
|
+
'Automate configuration validation in CI/CD pipeline',
|
|
1011
|
+
],
|
|
1012
|
+
codePattern: `// BAD: Verbose error messages in production
|
|
1013
|
+
app.use((err, req, res, next) => {
|
|
1014
|
+
res.status(500).json({ error: err.stack }) // Exposes internals!
|
|
1015
|
+
})
|
|
1016
|
+
|
|
1017
|
+
// GOOD: Generic errors in production, details in dev
|
|
1018
|
+
app.use((err, req, res, next) => {
|
|
1019
|
+
logger.error(err) // Log full error internally
|
|
1020
|
+
const message = process.env.NODE_ENV === 'production'
|
|
1021
|
+
? 'Internal server error'
|
|
1022
|
+
: err.message
|
|
1023
|
+
res.status(500).json({ error: message })
|
|
1024
|
+
})
|
|
1025
|
+
|
|
1026
|
+
// GOOD: Security headers
|
|
1027
|
+
app.use(helmet({
|
|
1028
|
+
contentSecurityPolicy: true,
|
|
1029
|
+
hsts: { maxAge: 31536000, includeSubDomains: true },
|
|
1030
|
+
frameguard: { action: 'deny' },
|
|
1031
|
+
noSniff: true,
|
|
1032
|
+
}))`,
|
|
1033
|
+
severity: 'high',
|
|
1034
|
+
cweIds: ['CWE-16', 'CWE-209', 'CWE-215', 'CWE-548', 'CWE-732'],
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
id: 'A03',
|
|
1038
|
+
name: 'Software Supply Chain Failures',
|
|
1039
|
+
description: 'NEW in 2025. Vulnerabilities introduced through third-party components, build pipelines, CI/CD systems, and dependency management. Includes dependency confusion, typosquatting, compromised packages, and build system attacks.',
|
|
1040
|
+
exampleAttack: 'Attacker publishes a malicious npm package "lod-ash" (typosquatting "lodash"). A developer installs it, and the postinstall script exfiltrates environment variables including API keys. Or: attacker compromises a GitHub Action used in CI/CD and injects a backdoor into the build output.',
|
|
1041
|
+
detection: [
|
|
1042
|
+
'Software Composition Analysis (SCA) in CI/CD',
|
|
1043
|
+
'SBOM generation and monitoring',
|
|
1044
|
+
'Package integrity verification (checksums, signatures)',
|
|
1045
|
+
'Build reproducibility verification',
|
|
1046
|
+
'CI/CD pipeline audit logging',
|
|
1047
|
+
'Monitor for dependency confusion attacks',
|
|
1048
|
+
'Lock file integrity verification',
|
|
1049
|
+
],
|
|
1050
|
+
remediation: [
|
|
1051
|
+
'Pin dependency versions with lockfiles (package-lock.json, yarn.lock)',
|
|
1052
|
+
'Verify package integrity with checksums and signatures',
|
|
1053
|
+
'Use private registries/proxies for internal packages',
|
|
1054
|
+
'Implement SBOM generation and vulnerability tracking',
|
|
1055
|
+
'Audit and pin CI/CD action versions by commit SHA',
|
|
1056
|
+
'Review new dependencies before adding them (npm audit, Snyk)',
|
|
1057
|
+
'Enable npm provenance to verify package origins',
|
|
1058
|
+
'Use --ignore-scripts for untrusted packages',
|
|
1059
|
+
],
|
|
1060
|
+
codePattern: `// BAD: Unpinned dependency with lifecycle scripts
|
|
1061
|
+
{
|
|
1062
|
+
"dependencies": {
|
|
1063
|
+
"some-package": "^2.0.0" // Floating version + postinstall runs
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
// GOOD: Pinned, audited, lockfile committed
|
|
1068
|
+
{
|
|
1069
|
+
"dependencies": {
|
|
1070
|
+
"some-package": "2.1.3" // Exact version
|
|
1071
|
+
},
|
|
1072
|
+
"scripts": {
|
|
1073
|
+
"preinstall": "npx only-allow pnpm", // Enforce package manager
|
|
1074
|
+
"audit": "npm audit --audit-level=high"
|
|
1075
|
+
},
|
|
1076
|
+
"overrides": {
|
|
1077
|
+
"vulnerable-transitive": ">=2.0.1" // Force-patch transitives
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
// CI/CD: Pin GitHub Actions by SHA
|
|
1082
|
+
// BAD: uses: actions/checkout@v4
|
|
1083
|
+
// GOOD: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11`,
|
|
1084
|
+
severity: 'critical',
|
|
1085
|
+
cweIds: ['CWE-426', 'CWE-427', 'CWE-506', 'CWE-829', 'CWE-1104'],
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
id: 'A04',
|
|
1089
|
+
name: 'Cryptographic Failures',
|
|
1090
|
+
description: 'Failures related to cryptography that lead to exposure of sensitive data. Weak algorithms, improper key management, missing encryption in transit/at rest, hard-coded secrets.',
|
|
1091
|
+
exampleAttack: 'Application uses MD5 for password hashing. Attacker obtains database dump and cracks passwords using rainbow tables in minutes. Or: API transmits authentication tokens over HTTP without TLS, allowing network interception.',
|
|
1092
|
+
detection: [
|
|
1093
|
+
'TLS configuration scanning (SSLLabs, testssl.sh)',
|
|
1094
|
+
'Code scanning for weak crypto (MD5, SHA1, DES, RC4)',
|
|
1095
|
+
'Secret scanning in repositories',
|
|
1096
|
+
'Certificate expiry monitoring',
|
|
1097
|
+
'Data-at-rest encryption audit',
|
|
1098
|
+
],
|
|
1099
|
+
remediation: [
|
|
1100
|
+
'Use strong hashing for passwords (bcrypt, scrypt, Argon2id)',
|
|
1101
|
+
'Enforce TLS 1.2+ for all connections',
|
|
1102
|
+
'Encrypt sensitive data at rest (AES-256-GCM)',
|
|
1103
|
+
'Use secure random number generators (crypto.randomBytes)',
|
|
1104
|
+
'Implement proper key management (rotation, secure storage)',
|
|
1105
|
+
'Disable weak cipher suites and protocols',
|
|
1106
|
+
'Use authenticated encryption (GCM, ChaCha20-Poly1305)',
|
|
1107
|
+
],
|
|
1108
|
+
codePattern: `// BAD: Weak password hashing
|
|
1109
|
+
const hash = crypto.createHash('md5').update(password).digest('hex')
|
|
1110
|
+
|
|
1111
|
+
// GOOD: Strong password hashing
|
|
1112
|
+
import bcrypt from 'bcrypt'
|
|
1113
|
+
const SALT_ROUNDS = 12
|
|
1114
|
+
const hash = await bcrypt.hash(password, SALT_ROUNDS)
|
|
1115
|
+
const isValid = await bcrypt.compare(password, storedHash)
|
|
1116
|
+
|
|
1117
|
+
// BAD: Hard-coded encryption key
|
|
1118
|
+
const key = 'my-secret-key-12345'
|
|
1119
|
+
|
|
1120
|
+
// GOOD: Key from secure source
|
|
1121
|
+
const key = process.env.ENCRYPTION_KEY // Injected at runtime
|
|
1122
|
+
// Or better: use a KMS (AWS KMS, HashiCorp Vault)`,
|
|
1123
|
+
severity: 'critical',
|
|
1124
|
+
cweIds: ['CWE-261', 'CWE-296', 'CWE-310', 'CWE-319', 'CWE-326', 'CWE-327', 'CWE-328', 'CWE-338'],
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
id: 'A05',
|
|
1128
|
+
name: 'Injection',
|
|
1129
|
+
description: 'User-supplied data is sent to an interpreter without proper validation, sanitization, or parameterization. Includes SQL injection, NoSQL injection, OS command injection, LDAP injection, XSS, and template injection.',
|
|
1130
|
+
exampleAttack: 'Attacker enters \' OR 1=1-- in the login form, bypassing authentication. Or: attacker injects {{7*7}} in a template field and sees "49" rendered, confirming server-side template injection. Then escalates to RCE via {{constructor.constructor("return process")().mainModule.require("child_process").execSync("id")}}.',
|
|
1131
|
+
detection: [
|
|
1132
|
+
'SAST for injection vulnerabilities',
|
|
1133
|
+
'DAST/IAST scanning',
|
|
1134
|
+
'WAF with injection detection rules',
|
|
1135
|
+
'Input validation logging',
|
|
1136
|
+
'Parameterized query audit',
|
|
1137
|
+
],
|
|
1138
|
+
remediation: [
|
|
1139
|
+
'Use parameterized queries / prepared statements for ALL database operations',
|
|
1140
|
+
'Use ORM with proper escaping',
|
|
1141
|
+
'Validate and sanitize all user input on the server side',
|
|
1142
|
+
'Implement Content Security Policy to mitigate XSS',
|
|
1143
|
+
'Use context-aware output encoding',
|
|
1144
|
+
'Avoid dynamic code execution (eval, Function constructor)',
|
|
1145
|
+
'Use allowlists for expected input patterns',
|
|
1146
|
+
],
|
|
1147
|
+
codePattern: `// BAD: SQL injection
|
|
1148
|
+
const query = \`SELECT * FROM users WHERE name = '\${userInput}'\`
|
|
1149
|
+
db.query(query)
|
|
1150
|
+
|
|
1151
|
+
// GOOD: Parameterized query
|
|
1152
|
+
const query = 'SELECT * FROM users WHERE name = $1'
|
|
1153
|
+
db.query(query, [userInput])
|
|
1154
|
+
|
|
1155
|
+
// BAD: Command injection
|
|
1156
|
+
exec(\`ls \${userInput}\`)
|
|
1157
|
+
|
|
1158
|
+
// GOOD: Escaped/validated input
|
|
1159
|
+
import { execFile } from 'child_process'
|
|
1160
|
+
execFile('ls', [sanitizedPath]) // Array args prevent injection
|
|
1161
|
+
|
|
1162
|
+
// BAD: XSS — unescaped output
|
|
1163
|
+
element.innerHTML = userInput
|
|
1164
|
+
|
|
1165
|
+
// GOOD: Text content or sanitization
|
|
1166
|
+
element.textContent = userInput // Auto-escaped
|
|
1167
|
+
// Or: DOMPurify.sanitize(userInput) if HTML is needed`,
|
|
1168
|
+
severity: 'critical',
|
|
1169
|
+
cweIds: ['CWE-20', 'CWE-74', 'CWE-75', 'CWE-77', 'CWE-78', 'CWE-79', 'CWE-89', 'CWE-94', 'CWE-917'],
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
id: 'A06',
|
|
1173
|
+
name: 'Insecure Design',
|
|
1174
|
+
description: 'Flaws in the design and architecture of the application that cannot be fixed by implementation alone. Missing threat modeling, insecure business logic, lack of defense in depth.',
|
|
1175
|
+
exampleAttack: 'E-commerce site allows unlimited coupon application — attacker applies same 10% coupon 10 times to get item for free. Or: password reset sends a 4-digit PIN via SMS with no rate limiting, allowing brute force in ~5,000 attempts.',
|
|
1176
|
+
detection: [
|
|
1177
|
+
'Threat modeling during design phase',
|
|
1178
|
+
'Architecture review for security patterns',
|
|
1179
|
+
'Business logic testing',
|
|
1180
|
+
'Abuse case / misuse case analysis',
|
|
1181
|
+
'Design review with security team',
|
|
1182
|
+
],
|
|
1183
|
+
remediation: [
|
|
1184
|
+
'Implement threat modeling (STRIDE, PASTA) in the design phase',
|
|
1185
|
+
'Design with defense in depth — assume each layer can be bypassed',
|
|
1186
|
+
'Rate limit all sensitive operations',
|
|
1187
|
+
'Use secure design patterns (fail-safe defaults, complete mediation)',
|
|
1188
|
+
'Separate business logic from data access',
|
|
1189
|
+
'Implement abuse/misuse stories alongside user stories',
|
|
1190
|
+
'Design for the adversary, not just the user',
|
|
1191
|
+
],
|
|
1192
|
+
codePattern: `// BAD: No rate limiting on sensitive endpoint
|
|
1193
|
+
app.post('/api/reset-password', (req, res) => {
|
|
1194
|
+
const pin = generatePin() // 4-digit PIN
|
|
1195
|
+
sendSMS(req.body.phone, pin)
|
|
1196
|
+
// Attacker brute-forces 0000-9999 in minutes
|
|
1197
|
+
})
|
|
1198
|
+
|
|
1199
|
+
// GOOD: Rate limiting + longer token + expiry
|
|
1200
|
+
import rateLimit from 'express-rate-limit'
|
|
1201
|
+
const resetLimiter = rateLimit({ windowMs: 15 * 60 * 1000, max: 3 })
|
|
1202
|
+
app.post('/api/reset-password', resetLimiter, (req, res) => {
|
|
1203
|
+
const token = crypto.randomBytes(32).toString('hex') // 256-bit token
|
|
1204
|
+
storeToken(req.body.email, token, { expiresIn: '15m' })
|
|
1205
|
+
sendEmail(req.body.email, \`Reset link: .../reset?token=\${token}\`)
|
|
1206
|
+
})`,
|
|
1207
|
+
severity: 'high',
|
|
1208
|
+
cweIds: ['CWE-73', 'CWE-183', 'CWE-209', 'CWE-256', 'CWE-501', 'CWE-522'],
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
id: 'A07',
|
|
1212
|
+
name: 'Authentication Failures',
|
|
1213
|
+
description: 'Weaknesses in authentication mechanisms: credential stuffing, brute force, weak passwords, missing MFA, session fixation, improper session management.',
|
|
1214
|
+
exampleAttack: 'Attacker uses credential stuffing with breach databases against login endpoint that has no rate limiting or MFA. 2% of accounts compromised within hours. Or: session token remains valid after password change, allowing continued access from stolen sessions.',
|
|
1215
|
+
detection: [
|
|
1216
|
+
'Failed login attempt monitoring and alerting',
|
|
1217
|
+
'Credential stuffing detection (multiple accounts, same IP)',
|
|
1218
|
+
'Session anomaly detection',
|
|
1219
|
+
'MFA bypass attempt detection',
|
|
1220
|
+
'Password quality audit',
|
|
1221
|
+
],
|
|
1222
|
+
remediation: [
|
|
1223
|
+
'Implement MFA for all accounts (TOTP, WebAuthn, or hardware keys)',
|
|
1224
|
+
'Enforce strong password policies (min 12 chars, check against breach lists)',
|
|
1225
|
+
'Rate limit authentication endpoints',
|
|
1226
|
+
'Implement account lockout (with progressive delays, not permanent lock)',
|
|
1227
|
+
'Use secure session management (httpOnly, secure, sameSite cookies)',
|
|
1228
|
+
'Invalidate all sessions on password change',
|
|
1229
|
+
'Log all authentication events for monitoring',
|
|
1230
|
+
],
|
|
1231
|
+
codePattern: `// BAD: No rate limiting, no MFA, weak session
|
|
1232
|
+
app.post('/login', async (req, res) => {
|
|
1233
|
+
const user = await db.users.findByEmail(req.body.email)
|
|
1234
|
+
if (user && user.password === md5(req.body.password)) {
|
|
1235
|
+
req.session.userId = user.id // No MFA, weak hash
|
|
1236
|
+
}
|
|
1237
|
+
})
|
|
1238
|
+
|
|
1239
|
+
// GOOD: Rate limited, MFA, strong session
|
|
1240
|
+
app.post('/login', loginLimiter, async (req, res) => {
|
|
1241
|
+
const user = await db.users.findByEmail(req.body.email)
|
|
1242
|
+
if (!user || !(await bcrypt.compare(req.body.password, user.passwordHash))) {
|
|
1243
|
+
await incrementFailedAttempts(req.body.email)
|
|
1244
|
+
return res.status(401).json({ error: 'Invalid credentials' })
|
|
1245
|
+
}
|
|
1246
|
+
if (user.mfaEnabled) {
|
|
1247
|
+
return res.json({ requireMFA: true, tempToken: generateMFAToken(user.id) })
|
|
1248
|
+
}
|
|
1249
|
+
const session = await createSecureSession(user.id)
|
|
1250
|
+
res.cookie('session', session.token, {
|
|
1251
|
+
httpOnly: true, secure: true, sameSite: 'strict', maxAge: 3600000
|
|
1252
|
+
})
|
|
1253
|
+
})`,
|
|
1254
|
+
severity: 'critical',
|
|
1255
|
+
cweIds: ['CWE-255', 'CWE-256', 'CWE-287', 'CWE-384', 'CWE-613', 'CWE-620'],
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
id: 'A08',
|
|
1259
|
+
name: 'Software and Data Integrity Failures',
|
|
1260
|
+
description: 'Code and infrastructure that does not protect against integrity violations. Insecure CI/CD pipelines, auto-update without verification, deserialization of untrusted data.',
|
|
1261
|
+
exampleAttack: 'Attacker compromises a CDN-hosted JavaScript library. Applications loading the library via <script src="cdn.example.com/lib.js"> now execute malicious code on all users. Or: application deserializes untrusted JSON with class instantiation, leading to RCE.',
|
|
1262
|
+
detection: [
|
|
1263
|
+
'Subresource Integrity (SRI) verification',
|
|
1264
|
+
'CI/CD pipeline integrity monitoring',
|
|
1265
|
+
'Deserialization monitoring',
|
|
1266
|
+
'Package integrity verification',
|
|
1267
|
+
'Build artifact signing and verification',
|
|
1268
|
+
],
|
|
1269
|
+
remediation: [
|
|
1270
|
+
'Use Subresource Integrity (SRI) for external scripts',
|
|
1271
|
+
'Sign and verify all build artifacts',
|
|
1272
|
+
'Secure CI/CD pipeline (signed commits, protected branches, code review)',
|
|
1273
|
+
'Avoid unsafe deserialization — use JSON.parse, not eval or unserialize',
|
|
1274
|
+
'Implement code review for all changes to critical paths',
|
|
1275
|
+
'Verify update signatures before applying',
|
|
1276
|
+
],
|
|
1277
|
+
codePattern: `<!-- BAD: External script without integrity check -->
|
|
1278
|
+
<script src="https://cdn.example.com/lib.js"></script>
|
|
1279
|
+
|
|
1280
|
+
<!-- GOOD: Subresource Integrity -->
|
|
1281
|
+
<script src="https://cdn.example.com/lib.js"
|
|
1282
|
+
integrity="sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8w"
|
|
1283
|
+
crossorigin="anonymous"></script>
|
|
1284
|
+
|
|
1285
|
+
// BAD: Unsafe deserialization
|
|
1286
|
+
const data = JSON.parse(untrustedInput)
|
|
1287
|
+
const obj = new data.type(data.args) // Arbitrary class instantiation!
|
|
1288
|
+
|
|
1289
|
+
// GOOD: Validate structure before processing
|
|
1290
|
+
const data = JSON.parse(untrustedInput)
|
|
1291
|
+
if (!isValidSchema(data)) throw new Error('Invalid data')
|
|
1292
|
+
// Process only expected fields with known types`,
|
|
1293
|
+
severity: 'high',
|
|
1294
|
+
cweIds: ['CWE-345', 'CWE-353', 'CWE-426', 'CWE-494', 'CWE-502', 'CWE-565', 'CWE-829'],
|
|
1295
|
+
},
|
|
1296
|
+
{
|
|
1297
|
+
id: 'A09',
|
|
1298
|
+
name: 'Security Logging and Monitoring Failures',
|
|
1299
|
+
description: 'Insufficient logging, monitoring, and alerting allows attackers to operate undetected. Most breaches are discovered by external parties weeks or months after initial compromise.',
|
|
1300
|
+
exampleAttack: 'Attacker compromises an application and exfiltrates data over 6 months. No logging of data access, no anomaly detection, no alert on the authentication bypass used for initial access. Breach discovered by customer who finds their data on the dark web.',
|
|
1301
|
+
detection: [
|
|
1302
|
+
'Log coverage audit — are all critical events logged?',
|
|
1303
|
+
'Log integrity verification',
|
|
1304
|
+
'Alert response time testing',
|
|
1305
|
+
'Red team exercises to validate detection',
|
|
1306
|
+
'SIEM correlation rule review',
|
|
1307
|
+
],
|
|
1308
|
+
remediation: [
|
|
1309
|
+
'Log all authentication events (success and failure)',
|
|
1310
|
+
'Log all access control failures',
|
|
1311
|
+
'Log all input validation failures',
|
|
1312
|
+
'Centralize logs in a SIEM with tamper protection',
|
|
1313
|
+
'Implement alerting for suspicious patterns',
|
|
1314
|
+
'Establish incident response procedures and test them',
|
|
1315
|
+
'Ensure logs contain sufficient context (who, what, when, where)',
|
|
1316
|
+
'Protect log integrity (append-only, signed)',
|
|
1317
|
+
],
|
|
1318
|
+
codePattern: `// BAD: No logging
|
|
1319
|
+
app.post('/api/transfer', async (req, res) => {
|
|
1320
|
+
await transferFunds(req.body.from, req.body.to, req.body.amount)
|
|
1321
|
+
res.json({ success: true })
|
|
1322
|
+
})
|
|
1323
|
+
|
|
1324
|
+
// GOOD: Comprehensive audit logging
|
|
1325
|
+
app.post('/api/transfer', authenticate, async (req, res) => {
|
|
1326
|
+
const { from, to, amount } = req.body
|
|
1327
|
+
logger.info('transfer_initiated', {
|
|
1328
|
+
userId: req.user.id,
|
|
1329
|
+
from, to, amount,
|
|
1330
|
+
ip: req.ip,
|
|
1331
|
+
userAgent: req.headers['user-agent'],
|
|
1332
|
+
timestamp: new Date().toISOString(),
|
|
1333
|
+
})
|
|
1334
|
+
try {
|
|
1335
|
+
await transferFunds(from, to, amount)
|
|
1336
|
+
logger.info('transfer_completed', { userId: req.user.id, from, to, amount })
|
|
1337
|
+
res.json({ success: true })
|
|
1338
|
+
} catch (err) {
|
|
1339
|
+
logger.error('transfer_failed', { userId: req.user.id, from, to, amount, error: err.message })
|
|
1340
|
+
res.status(500).json({ error: 'Transfer failed' })
|
|
1341
|
+
}
|
|
1342
|
+
})`,
|
|
1343
|
+
severity: 'high',
|
|
1344
|
+
cweIds: ['CWE-117', 'CWE-223', 'CWE-532', 'CWE-778'],
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
id: 'A10',
|
|
1348
|
+
name: 'Mishandling Exceptional Conditions',
|
|
1349
|
+
description: 'NEW in 2025. Improper handling of errors, exceptions, edge cases, and unexpected states that creates security vulnerabilities. Includes uncaught exceptions revealing info, race conditions, and fail-open patterns.',
|
|
1350
|
+
exampleAttack: 'Application uses a try-catch that catches an authorization error but falls through to allow the operation anyway (fail-open). Or: race condition in file upload allows attacker to upload and execute a web shell between the validation check and the rename operation (TOCTOU).',
|
|
1351
|
+
detection: [
|
|
1352
|
+
'Code review for error handling patterns',
|
|
1353
|
+
'SAST for uncaught exceptions and fail-open patterns',
|
|
1354
|
+
'Fuzz testing for edge cases',
|
|
1355
|
+
'Race condition testing',
|
|
1356
|
+
'Exception monitoring in production',
|
|
1357
|
+
],
|
|
1358
|
+
remediation: [
|
|
1359
|
+
'Fail-closed by default — deny on error, never allow',
|
|
1360
|
+
'Handle all exceptions explicitly — no empty catch blocks',
|
|
1361
|
+
'Use atomic operations to prevent TOCTOU race conditions',
|
|
1362
|
+
'Implement circuit breakers for external service failures',
|
|
1363
|
+
'Never expose internal error details to users',
|
|
1364
|
+
'Test error paths as thoroughly as success paths',
|
|
1365
|
+
'Use typed errors and exhaustive error handling',
|
|
1366
|
+
],
|
|
1367
|
+
codePattern: `// BAD: Fail-open pattern
|
|
1368
|
+
let authorized = false
|
|
1369
|
+
try {
|
|
1370
|
+
authorized = await checkAuthorization(user, resource)
|
|
1371
|
+
} catch (err) {
|
|
1372
|
+
// Exception in auth check = fail-open!
|
|
1373
|
+
console.error('Auth check failed:', err)
|
|
1374
|
+
}
|
|
1375
|
+
if (authorized) { /* ... */ } // Proceeds even when auth throws
|
|
1376
|
+
|
|
1377
|
+
// GOOD: Fail-closed pattern
|
|
1378
|
+
let authorized: boolean
|
|
1379
|
+
try {
|
|
1380
|
+
authorized = await checkAuthorization(user, resource)
|
|
1381
|
+
} catch (err) {
|
|
1382
|
+
logger.error('Auth check failed', { userId: user.id, error: err })
|
|
1383
|
+
return res.status(500).json({ error: 'Authorization unavailable' })
|
|
1384
|
+
// NEVER proceed on auth failure
|
|
1385
|
+
}
|
|
1386
|
+
if (!authorized) {
|
|
1387
|
+
return res.status(403).json({ error: 'Forbidden' })
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
// BAD: TOCTOU race condition
|
|
1391
|
+
if (await fileIsImage(uploadPath)) {
|
|
1392
|
+
// Window: attacker replaces file between check and rename
|
|
1393
|
+
await fs.rename(uploadPath, finalPath)
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
// GOOD: Atomic operation
|
|
1397
|
+
const validated = await validateAndMoveAtomic(uploadPath, finalPath)`,
|
|
1398
|
+
severity: 'high',
|
|
1399
|
+
cweIds: ['CWE-252', 'CWE-367', 'CWE-390', 'CWE-392', 'CWE-394', 'CWE-754', 'CWE-755'],
|
|
1400
|
+
},
|
|
1401
|
+
];
|
|
1402
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
1403
|
+
// LOCKHEED MARTIN KILL CHAIN (7 STAGES)
|
|
1404
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
1405
|
+
const KILL_CHAIN = [
|
|
1406
|
+
{
|
|
1407
|
+
stage: 1,
|
|
1408
|
+
name: 'Reconnaissance',
|
|
1409
|
+
definition: 'Attacker researches, identifies, and selects targets. Gathers information about the target organization, infrastructure, employees, and technology stack to plan the attack.',
|
|
1410
|
+
attackerActions: [
|
|
1411
|
+
'OSINT gathering (LinkedIn, GitHub, company website)',
|
|
1412
|
+
'DNS enumeration and subdomain discovery',
|
|
1413
|
+
'Port scanning and service fingerprinting',
|
|
1414
|
+
'Technology stack identification (Wappalyzer, BuiltWith)',
|
|
1415
|
+
'Employee email harvesting (Hunter.io, theHarvester)',
|
|
1416
|
+
'Social media reconnaissance',
|
|
1417
|
+
'Dark web credential searches',
|
|
1418
|
+
'Certificate Transparency log mining',
|
|
1419
|
+
'Shodan/Censys scanning for exposed services',
|
|
1420
|
+
'Job posting analysis for technology indicators',
|
|
1421
|
+
],
|
|
1422
|
+
defenderActions: [
|
|
1423
|
+
'Minimize public attack surface',
|
|
1424
|
+
'Monitor for reconnaissance indicators',
|
|
1425
|
+
'Implement honeypots and canary tokens',
|
|
1426
|
+
'Restrict information in job postings',
|
|
1427
|
+
'WHOIS privacy protection',
|
|
1428
|
+
'Monitor Certificate Transparency logs',
|
|
1429
|
+
'Remove version headers from HTTP responses',
|
|
1430
|
+
'Implement rate limiting on public services',
|
|
1431
|
+
],
|
|
1432
|
+
detectionMethods: [
|
|
1433
|
+
'Web server log analysis for scanning patterns',
|
|
1434
|
+
'DNS query monitoring for enumeration',
|
|
1435
|
+
'Honeypot/honeytoken triggering',
|
|
1436
|
+
'OSINT monitoring (what\'s public about you)',
|
|
1437
|
+
'Dark web monitoring for leaked credentials',
|
|
1438
|
+
'Brand impersonation detection',
|
|
1439
|
+
],
|
|
1440
|
+
kbotTools: ['port_scan', 'ssl_check', 'headers_check', 'web_search'],
|
|
1441
|
+
indicators: [
|
|
1442
|
+
'Increased scanning activity from single sources',
|
|
1443
|
+
'Sequential subdomain resolution attempts',
|
|
1444
|
+
'Unusual WHOIS lookups',
|
|
1445
|
+
'Scraping of employee profiles',
|
|
1446
|
+
'Canary token access alerts',
|
|
1447
|
+
],
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
stage: 2,
|
|
1451
|
+
name: 'Weaponization',
|
|
1452
|
+
definition: 'Attacker creates a deliverable payload (malware, exploit, phishing kit) tailored to the target based on reconnaissance intelligence. This stage happens entirely on the attacker\'s side.',
|
|
1453
|
+
attackerActions: [
|
|
1454
|
+
'Create or acquire exploit for identified vulnerability',
|
|
1455
|
+
'Develop custom malware or modify existing tools',
|
|
1456
|
+
'Craft phishing emails with social engineering hooks',
|
|
1457
|
+
'Build watering hole with drive-by exploit',
|
|
1458
|
+
'Obtain or forge code-signing certificates',
|
|
1459
|
+
'Create command and control infrastructure',
|
|
1460
|
+
'Package exploit with backdoor/RAT',
|
|
1461
|
+
'Test payload against target\'s known security tools',
|
|
1462
|
+
'Register look-alike domains for phishing',
|
|
1463
|
+
'Develop persistence mechanisms',
|
|
1464
|
+
],
|
|
1465
|
+
defenderActions: [
|
|
1466
|
+
'Threat intelligence consumption and sharing',
|
|
1467
|
+
'Vulnerability management (patch known CVEs)',
|
|
1468
|
+
'Email authentication (SPF/DKIM/DMARC)',
|
|
1469
|
+
'Browser isolation for high-risk users',
|
|
1470
|
+
'Application allowlisting',
|
|
1471
|
+
'Domain monitoring for typosquatting',
|
|
1472
|
+
],
|
|
1473
|
+
detectionMethods: [
|
|
1474
|
+
'Threat intelligence feeds for new malware samples',
|
|
1475
|
+
'Domain registration monitoring (new look-alike domains)',
|
|
1476
|
+
'Code-signing certificate monitoring',
|
|
1477
|
+
'Malware sandbox analysis of suspicious files',
|
|
1478
|
+
'Threat hunting for IOCs from intelligence reports',
|
|
1479
|
+
],
|
|
1480
|
+
kbotTools: ['cve_lookup', 'dep_audit', 'deps_audit', 'web_search'],
|
|
1481
|
+
indicators: [
|
|
1482
|
+
'New domains registered similar to yours',
|
|
1483
|
+
'Threat intel reports targeting your industry',
|
|
1484
|
+
'New exploits published for your tech stack',
|
|
1485
|
+
'Phishing kits targeting your brand detected',
|
|
1486
|
+
],
|
|
1487
|
+
},
|
|
1488
|
+
{
|
|
1489
|
+
stage: 3,
|
|
1490
|
+
name: 'Delivery',
|
|
1491
|
+
definition: 'Attacker transmits the weaponized payload to the target. The payload must reach the victim through email, web, USB, or other delivery vectors.',
|
|
1492
|
+
attackerActions: [
|
|
1493
|
+
'Send spearphishing emails with malicious attachments/links',
|
|
1494
|
+
'Compromise legitimate website (watering hole)',
|
|
1495
|
+
'Exploit internet-facing application vulnerability',
|
|
1496
|
+
'Social engineering via phone/social media',
|
|
1497
|
+
'USB drop in target parking lot/lobby',
|
|
1498
|
+
'Supply chain injection (compromised update)',
|
|
1499
|
+
'Physical infiltration for internal network access',
|
|
1500
|
+
'Malvertising on sites target employees visit',
|
|
1501
|
+
],
|
|
1502
|
+
defenderActions: [
|
|
1503
|
+
'Email gateway with attachment sandboxing',
|
|
1504
|
+
'Web proxy with URL reputation filtering',
|
|
1505
|
+
'Endpoint protection with behavioral detection',
|
|
1506
|
+
'USB device control policies',
|
|
1507
|
+
'Security awareness training for employees',
|
|
1508
|
+
'WAF for internet-facing applications',
|
|
1509
|
+
'Network segmentation for critical assets',
|
|
1510
|
+
'Software supply chain verification (SBOM, SCA)',
|
|
1511
|
+
],
|
|
1512
|
+
detectionMethods: [
|
|
1513
|
+
'Email gateway alerts (malicious attachment/link)',
|
|
1514
|
+
'Endpoint detection of exploit attempt',
|
|
1515
|
+
'Web proxy blocks on malicious URLs',
|
|
1516
|
+
'User reports of suspicious emails',
|
|
1517
|
+
'WAF alerts for exploit attempts',
|
|
1518
|
+
'IDS/IPS for network-level exploit detection',
|
|
1519
|
+
],
|
|
1520
|
+
kbotTools: ['owasp_check', 'headers_check', 'secret_scan', 'deps_audit'],
|
|
1521
|
+
indicators: [
|
|
1522
|
+
'Phishing emails targeting employees',
|
|
1523
|
+
'Malicious attachments detected by sandbox',
|
|
1524
|
+
'WAF blocking exploit attempts',
|
|
1525
|
+
'Users reporting suspicious messages',
|
|
1526
|
+
'Drive-by download attempts from compromised sites',
|
|
1527
|
+
],
|
|
1528
|
+
},
|
|
1529
|
+
{
|
|
1530
|
+
stage: 4,
|
|
1531
|
+
name: 'Exploitation',
|
|
1532
|
+
definition: 'The delivered payload triggers, exploiting a vulnerability to execute code on the victim system. This is the transition from attacker-controlled to victim-controlled execution.',
|
|
1533
|
+
attackerActions: [
|
|
1534
|
+
'Trigger exploit against application vulnerability',
|
|
1535
|
+
'Execute malicious macro/script from phishing doc',
|
|
1536
|
+
'Leverage zero-day or known vulnerability',
|
|
1537
|
+
'Exploit browser/plugin vulnerability (drive-by)',
|
|
1538
|
+
'Social engineer user to run malicious program',
|
|
1539
|
+
'Exploit misconfiguration in exposed service',
|
|
1540
|
+
'Abuse trust relationship with third party',
|
|
1541
|
+
'Chain multiple vulnerabilities for exploitation',
|
|
1542
|
+
],
|
|
1543
|
+
defenderActions: [
|
|
1544
|
+
'Patch management (reduce exploitable surface)',
|
|
1545
|
+
'Exploit protection (DEP, ASLR, CFG, CET)',
|
|
1546
|
+
'Application sandboxing',
|
|
1547
|
+
'Disable macros and unnecessary features',
|
|
1548
|
+
'EDR with behavioral exploitation detection',
|
|
1549
|
+
'Windows Attack Surface Reduction rules',
|
|
1550
|
+
'Browser isolation technology',
|
|
1551
|
+
'Virtual patching via WAF/IPS',
|
|
1552
|
+
],
|
|
1553
|
+
detectionMethods: [
|
|
1554
|
+
'EDR exploit detection (memory protection violations)',
|
|
1555
|
+
'Application crash/error monitoring',
|
|
1556
|
+
'Anomalous process creation from applications',
|
|
1557
|
+
'Exploit guard alerts and ASR rule triggers',
|
|
1558
|
+
'Memory forensics for exploitation artifacts',
|
|
1559
|
+
'System call anomaly detection',
|
|
1560
|
+
],
|
|
1561
|
+
kbotTools: ['owasp_check', 'cve_lookup', 'port_scan', 'dep_audit'],
|
|
1562
|
+
indicators: [
|
|
1563
|
+
'Application crashes or unexpected restarts',
|
|
1564
|
+
'EDR exploit protection alerts',
|
|
1565
|
+
'Anomalous child process from browser/Office',
|
|
1566
|
+
'Memory protection violation events',
|
|
1567
|
+
'ASR rule block events',
|
|
1568
|
+
],
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
stage: 5,
|
|
1572
|
+
name: 'Installation',
|
|
1573
|
+
definition: 'Attacker installs persistent access (backdoor, RAT, web shell, implant) on the victim system. Ensures the attacker can return even if the initial exploit vector is closed.',
|
|
1574
|
+
attackerActions: [
|
|
1575
|
+
'Install backdoor or remote access trojan (RAT)',
|
|
1576
|
+
'Create persistence via registry/startup/cron',
|
|
1577
|
+
'Deploy web shell on compromised server',
|
|
1578
|
+
'Create new user accounts for access',
|
|
1579
|
+
'Install rootkit for stealth',
|
|
1580
|
+
'Modify existing services for persistence',
|
|
1581
|
+
'Timestomp installed files to blend in',
|
|
1582
|
+
'Deploy multiple persistence mechanisms (redundancy)',
|
|
1583
|
+
],
|
|
1584
|
+
defenderActions: [
|
|
1585
|
+
'File integrity monitoring (FIM)',
|
|
1586
|
+
'Monitor startup/persistence locations',
|
|
1587
|
+
'Application allowlisting',
|
|
1588
|
+
'EDR with persistence detection',
|
|
1589
|
+
'Regular baseline comparison',
|
|
1590
|
+
'Restrict account creation permissions',
|
|
1591
|
+
'Code signing enforcement',
|
|
1592
|
+
'Endpoint hardening (CIS benchmarks)',
|
|
1593
|
+
],
|
|
1594
|
+
detectionMethods: [
|
|
1595
|
+
'New file creation in persistence locations',
|
|
1596
|
+
'Registry modification alerts (Run keys, services)',
|
|
1597
|
+
'New user account creation events',
|
|
1598
|
+
'Web shell detection scans',
|
|
1599
|
+
'Autorun/persistence location auditing (Autoruns)',
|
|
1600
|
+
'Timestomping detection (MFT analysis)',
|
|
1601
|
+
'New scheduled task/cron job creation',
|
|
1602
|
+
],
|
|
1603
|
+
kbotTools: ['secret_scan', 'security_hunt', 'owasp_check'],
|
|
1604
|
+
indicators: [
|
|
1605
|
+
'New files in startup directories',
|
|
1606
|
+
'Registry modifications to autostart keys',
|
|
1607
|
+
'New services or scheduled tasks created',
|
|
1608
|
+
'Web shells detected on web servers',
|
|
1609
|
+
'Unauthorized user accounts created',
|
|
1610
|
+
'Modified system binaries',
|
|
1611
|
+
],
|
|
1612
|
+
},
|
|
1613
|
+
{
|
|
1614
|
+
stage: 6,
|
|
1615
|
+
name: 'Command and Control (C2)',
|
|
1616
|
+
definition: 'Attacker establishes a communication channel with the implant for remote control. Enables the attacker to issue commands, exfiltrate data, and move laterally.',
|
|
1617
|
+
attackerActions: [
|
|
1618
|
+
'Establish C2 channel (HTTPS, DNS, custom protocol)',
|
|
1619
|
+
'Use legitimate services for C2 (Slack, Discord, cloud storage)',
|
|
1620
|
+
'Implement encrypted communication',
|
|
1621
|
+
'Use domain fronting to hide C2 destination',
|
|
1622
|
+
'Set up fallback C2 channels (redundancy)',
|
|
1623
|
+
'Beacon on schedule to avoid detection',
|
|
1624
|
+
'Use fast-flux DNS for C2 resilience',
|
|
1625
|
+
'Proxy C2 through compromised infrastructure',
|
|
1626
|
+
],
|
|
1627
|
+
defenderActions: [
|
|
1628
|
+
'Network traffic analysis and anomaly detection',
|
|
1629
|
+
'DNS monitoring and filtering',
|
|
1630
|
+
'SSL/TLS inspection (if feasible)',
|
|
1631
|
+
'Block known C2 infrastructure (threat intel)',
|
|
1632
|
+
'JA3/JA3S fingerprinting for TLS analysis',
|
|
1633
|
+
'Restrict outbound connections (egress filtering)',
|
|
1634
|
+
'CASB for cloud service monitoring',
|
|
1635
|
+
'Network segmentation to limit C2 reach',
|
|
1636
|
+
],
|
|
1637
|
+
detectionMethods: [
|
|
1638
|
+
'Beacon pattern detection (periodic callbacks)',
|
|
1639
|
+
'DNS tunneling detection (long queries, high frequency)',
|
|
1640
|
+
'Unusual outbound connection patterns',
|
|
1641
|
+
'JA3 fingerprint matching to known C2 tools',
|
|
1642
|
+
'Certificate analysis (self-signed, short-lived)',
|
|
1643
|
+
'Data volume anomalies on connections',
|
|
1644
|
+
'Threat intel IOC matching on network traffic',
|
|
1645
|
+
],
|
|
1646
|
+
kbotTools: ['port_scan', 'ssl_check', 'headers_check', 'security_hunt'],
|
|
1647
|
+
indicators: [
|
|
1648
|
+
'Periodic beaconing to external IPs',
|
|
1649
|
+
'DNS queries with encoded data',
|
|
1650
|
+
'HTTPS to newly registered domains',
|
|
1651
|
+
'Self-signed certificates on C2 servers',
|
|
1652
|
+
'Unusual data volumes on outbound connections',
|
|
1653
|
+
'Connections to known malicious infrastructure',
|
|
1654
|
+
],
|
|
1655
|
+
},
|
|
1656
|
+
{
|
|
1657
|
+
stage: 7,
|
|
1658
|
+
name: 'Actions on Objectives',
|
|
1659
|
+
definition: 'Attacker achieves their goal — data exfiltration, ransomware deployment, sabotage, espionage, or destructive attack. This is the culmination of the entire kill chain.',
|
|
1660
|
+
attackerActions: [
|
|
1661
|
+
'Exfiltrate sensitive data (PII, IP, credentials)',
|
|
1662
|
+
'Deploy ransomware across the network',
|
|
1663
|
+
'Establish long-term persistent access',
|
|
1664
|
+
'Move laterally to high-value targets',
|
|
1665
|
+
'Manipulate or destroy data',
|
|
1666
|
+
'Conduct espionage operations',
|
|
1667
|
+
'Deface public-facing systems',
|
|
1668
|
+
'Hijack resources for cryptomining',
|
|
1669
|
+
'Pivot to attack additional targets (supply chain)',
|
|
1670
|
+
'Cover tracks and remove evidence',
|
|
1671
|
+
],
|
|
1672
|
+
defenderActions: [
|
|
1673
|
+
'Data loss prevention (DLP)',
|
|
1674
|
+
'Network segmentation to limit blast radius',
|
|
1675
|
+
'Incident response plan activation',
|
|
1676
|
+
'Forensic preservation of evidence',
|
|
1677
|
+
'Backup restoration capabilities',
|
|
1678
|
+
'Communication plan for stakeholders',
|
|
1679
|
+
'Law enforcement engagement',
|
|
1680
|
+
'Post-incident review and improvements',
|
|
1681
|
+
],
|
|
1682
|
+
detectionMethods: [
|
|
1683
|
+
'DLP alerts for sensitive data movement',
|
|
1684
|
+
'Ransomware behavioral detection (mass encryption)',
|
|
1685
|
+
'Anomalous data transfer volumes',
|
|
1686
|
+
'Lateral movement detection (graph-based)',
|
|
1687
|
+
'Privileged account abuse detection',
|
|
1688
|
+
'File integrity monitoring alerts',
|
|
1689
|
+
'Account lockout/deletion anomalies',
|
|
1690
|
+
],
|
|
1691
|
+
kbotTools: ['secret_scan', 'security_hunt', 'owasp_check', 'dep_audit', 'deps_audit'],
|
|
1692
|
+
indicators: [
|
|
1693
|
+
'Large data transfers to external destinations',
|
|
1694
|
+
'Mass file encryption activity',
|
|
1695
|
+
'Lateral movement between systems',
|
|
1696
|
+
'Privileged account usage from unusual sources',
|
|
1697
|
+
'Data destruction or modification',
|
|
1698
|
+
'New exfiltration channels opening',
|
|
1699
|
+
],
|
|
1700
|
+
},
|
|
1701
|
+
];
|
|
1702
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
1703
|
+
// KBOT SECURITY TOOL → ATT&CK TACTIC MAPPING
|
|
1704
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
1705
|
+
const TOOL_MAPPINGS = [
|
|
1706
|
+
{
|
|
1707
|
+
tool: 'port_scan',
|
|
1708
|
+
tactics: ['Reconnaissance', 'Discovery'],
|
|
1709
|
+
description: 'Network port scanner — discovers open ports and running services. Maps to T1595 (Active Scanning) for offensive recon and T1046 (Network Service Discovery) for internal discovery.',
|
|
1710
|
+
usage: 'port_scan { target: "example.com", ports: "1-1024" }',
|
|
1711
|
+
attackSurface: [
|
|
1712
|
+
'Exposed services (SSH, RDP, databases)',
|
|
1713
|
+
'Unintended listeners (debug ports, admin consoles)',
|
|
1714
|
+
'Version information leakage via banners',
|
|
1715
|
+
'Default port services indicating technology stack',
|
|
1716
|
+
],
|
|
1717
|
+
},
|
|
1718
|
+
{
|
|
1719
|
+
tool: 'owasp_check',
|
|
1720
|
+
tactics: ['Initial Access', 'Execution', 'Credential Access', 'Collection'],
|
|
1721
|
+
description: 'OWASP vulnerability scanner — checks web applications against OWASP Top 10 categories. Covers injection, broken auth, misconfig, and more.',
|
|
1722
|
+
usage: 'owasp_check { url: "https://example.com", checks: "all" }',
|
|
1723
|
+
attackSurface: [
|
|
1724
|
+
'SQL/NoSQL injection points',
|
|
1725
|
+
'Cross-site scripting (XSS) vectors',
|
|
1726
|
+
'Authentication weaknesses',
|
|
1727
|
+
'Security misconfiguration',
|
|
1728
|
+
'Missing security headers',
|
|
1729
|
+
'Information disclosure in error pages',
|
|
1730
|
+
],
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
tool: 'ssl_check',
|
|
1734
|
+
tactics: ['Reconnaissance', 'Credential Access'],
|
|
1735
|
+
description: 'TLS/SSL configuration analyzer — checks certificate validity, protocol versions, cipher suites, and known vulnerabilities (BEAST, POODLE, Heartbleed).',
|
|
1736
|
+
usage: 'ssl_check { host: "example.com" }',
|
|
1737
|
+
attackSurface: [
|
|
1738
|
+
'Weak TLS versions (TLS 1.0/1.1)',
|
|
1739
|
+
'Weak cipher suites (RC4, DES, export ciphers)',
|
|
1740
|
+
'Expired or self-signed certificates',
|
|
1741
|
+
'Missing HSTS headers',
|
|
1742
|
+
'Certificate chain issues',
|
|
1743
|
+
'Known SSL/TLS vulnerabilities',
|
|
1744
|
+
],
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
tool: 'headers_check',
|
|
1748
|
+
tactics: ['Reconnaissance', 'Defense Evasion'],
|
|
1749
|
+
description: 'HTTP security header analyzer — verifies presence and correctness of security headers (CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Permissions-Policy).',
|
|
1750
|
+
usage: 'headers_check { url: "https://example.com" }',
|
|
1751
|
+
attackSurface: [
|
|
1752
|
+
'Missing Content-Security-Policy (XSS risk)',
|
|
1753
|
+
'Missing HSTS (downgrade attacks)',
|
|
1754
|
+
'Missing X-Frame-Options (clickjacking)',
|
|
1755
|
+
'Missing X-Content-Type-Options (MIME sniffing)',
|
|
1756
|
+
'Overly permissive CORS configuration',
|
|
1757
|
+
'Information disclosure via Server/X-Powered-By headers',
|
|
1758
|
+
],
|
|
1759
|
+
},
|
|
1760
|
+
{
|
|
1761
|
+
tool: 'secret_scan',
|
|
1762
|
+
tactics: ['Credential Access', 'Collection', 'Reconnaissance'],
|
|
1763
|
+
description: 'Secret and credential scanner — searches codebase, configs, and environment for exposed secrets (API keys, passwords, tokens, private keys).',
|
|
1764
|
+
usage: 'secret_scan { path: ".", recursive: true }',
|
|
1765
|
+
attackSurface: [
|
|
1766
|
+
'Hardcoded API keys and tokens',
|
|
1767
|
+
'Database connection strings with credentials',
|
|
1768
|
+
'Private keys (.pem, .key) in repositories',
|
|
1769
|
+
'Environment files (.env) committed to git',
|
|
1770
|
+
'AWS/GCP/Azure credentials in code',
|
|
1771
|
+
'JWT signing secrets in source code',
|
|
1772
|
+
'OAuth client secrets exposed',
|
|
1773
|
+
],
|
|
1774
|
+
},
|
|
1775
|
+
{
|
|
1776
|
+
tool: 'cve_lookup',
|
|
1777
|
+
tactics: ['Reconnaissance', 'Initial Access', 'Privilege Escalation'],
|
|
1778
|
+
description: 'CVE vulnerability lookup — searches the NVD (National Vulnerability Database) for known vulnerabilities by product, version, or CVE ID.',
|
|
1779
|
+
usage: 'cve_lookup { query: "node.js 18", severity: "critical" }',
|
|
1780
|
+
attackSurface: [
|
|
1781
|
+
'Known exploitable vulnerabilities in dependencies',
|
|
1782
|
+
'Unpatched software with public exploits',
|
|
1783
|
+
'Zero-day vulnerability tracking',
|
|
1784
|
+
'CVSS scoring for risk prioritization',
|
|
1785
|
+
'Exploit availability assessment',
|
|
1786
|
+
],
|
|
1787
|
+
},
|
|
1788
|
+
{
|
|
1789
|
+
tool: 'dep_audit',
|
|
1790
|
+
tactics: ['Initial Access', 'Execution'],
|
|
1791
|
+
description: 'Dependency audit — scans project dependencies for known vulnerabilities using npm audit, OSV, and advisory databases. Maps to T1195 (Supply Chain Compromise) detection.',
|
|
1792
|
+
usage: 'dep_audit { path: ".", manager: "npm" }',
|
|
1793
|
+
attackSurface: [
|
|
1794
|
+
'Vulnerable transitive dependencies',
|
|
1795
|
+
'Outdated packages with known CVEs',
|
|
1796
|
+
'Dependency confusion potential',
|
|
1797
|
+
'Typosquatting risk in package names',
|
|
1798
|
+
'Unmaintained packages without security patches',
|
|
1799
|
+
],
|
|
1800
|
+
},
|
|
1801
|
+
{
|
|
1802
|
+
tool: 'deps_audit',
|
|
1803
|
+
tactics: ['Initial Access', 'Execution', 'Persistence'],
|
|
1804
|
+
description: 'Extended dependency security audit — deep analysis including license compliance, maintainer changes, suspicious package behavior, and supply chain risk.',
|
|
1805
|
+
usage: 'deps_audit { path: ".", deep: true }',
|
|
1806
|
+
attackSurface: [
|
|
1807
|
+
'All dep_audit attack surfaces plus:',
|
|
1808
|
+
'Maintainer account compromise detection',
|
|
1809
|
+
'Suspicious postinstall scripts',
|
|
1810
|
+
'License compliance violations',
|
|
1811
|
+
'Abandoned/orphaned packages',
|
|
1812
|
+
'Unexpected binary inclusions',
|
|
1813
|
+
],
|
|
1814
|
+
},
|
|
1815
|
+
{
|
|
1816
|
+
tool: 'security_hunt',
|
|
1817
|
+
tactics: ['Discovery', 'Credential Access', 'Defense Evasion', 'Lateral Movement', 'Collection'],
|
|
1818
|
+
description: 'Proactive security threat hunting — searches for indicators of compromise (IOCs), suspicious patterns, anomalous configurations, and potential security issues across the environment.',
|
|
1819
|
+
usage: 'security_hunt { scope: "full", focus: "credentials" }',
|
|
1820
|
+
attackSurface: [
|
|
1821
|
+
'Indicators of compromise in logs',
|
|
1822
|
+
'Suspicious file modifications',
|
|
1823
|
+
'Anomalous network connections',
|
|
1824
|
+
'Unauthorized access patterns',
|
|
1825
|
+
'Privilege escalation artifacts',
|
|
1826
|
+
'Data staging for exfiltration',
|
|
1827
|
+
'Persistence mechanism detection',
|
|
1828
|
+
],
|
|
1829
|
+
},
|
|
1830
|
+
];
|
|
1831
|
+
const CVE_PATTERNS = [
|
|
1832
|
+
{
|
|
1833
|
+
name: 'SQL Injection',
|
|
1834
|
+
description: 'User input concatenated directly into SQL queries, allowing attacker-controlled SQL execution.',
|
|
1835
|
+
cweId: 'CWE-89',
|
|
1836
|
+
examples: ['CVE-2023-34362 (MOVEit Transfer)', 'CVE-2023-36934 (MOVEit Transfer)', 'CVE-2019-18935 (Telerik UI)'],
|
|
1837
|
+
detection: ['SAST scanning for string concatenation in SQL', 'WAF SQL injection rules', 'Database query logging for anomalous patterns', 'Dynamic analysis with SQLi payloads'],
|
|
1838
|
+
remediation: ['Use parameterized queries / prepared statements', 'Use ORM with proper escaping', 'Input validation with allowlists', 'Least privilege database accounts'],
|
|
1839
|
+
languages: ['PHP', 'Java', 'Python', 'JavaScript', 'C#', 'Ruby'],
|
|
1840
|
+
},
|
|
1841
|
+
{
|
|
1842
|
+
name: 'Cross-Site Scripting (XSS)',
|
|
1843
|
+
description: 'Attacker injects client-side scripts into web pages viewed by other users, stealing sessions, defacing sites, or redirecting users.',
|
|
1844
|
+
cweId: 'CWE-79',
|
|
1845
|
+
examples: ['CVE-2023-42793 (JetBrains TeamCity)', 'CVE-2022-29078 (EJS)', 'CVE-2021-41773 (Apache)'],
|
|
1846
|
+
detection: ['SAST/DAST scanning for XSS', 'CSP violation reporting', 'WAF XSS detection rules', 'Browser XSS auditor'],
|
|
1847
|
+
remediation: ['Context-aware output encoding', 'Content Security Policy headers', 'Use textContent instead of innerHTML', 'DOMPurify for HTML sanitization', 'HTTPOnly cookies to prevent theft'],
|
|
1848
|
+
languages: ['JavaScript', 'PHP', 'Java', 'Python', 'Ruby'],
|
|
1849
|
+
},
|
|
1850
|
+
{
|
|
1851
|
+
name: 'Remote Code Execution (RCE)',
|
|
1852
|
+
description: 'Attacker executes arbitrary code on the target system remotely. Highest severity — full system compromise.',
|
|
1853
|
+
cweId: 'CWE-94',
|
|
1854
|
+
examples: ['CVE-2021-44228 (Log4Shell)', 'CVE-2023-44487 (HTTP/2 Rapid Reset)', 'CVE-2024-3094 (xz backdoor)', 'CVE-2023-22515 (Atlassian Confluence)'],
|
|
1855
|
+
detection: ['WAF/IPS for known RCE payloads', 'EDR behavioral detection', 'Application error monitoring', 'System call auditing'],
|
|
1856
|
+
remediation: ['Patch immediately — RCE is always critical', 'Application sandboxing', 'Least privilege execution', 'Network segmentation', 'WAF virtual patching while awaiting real patch'],
|
|
1857
|
+
languages: ['Java', 'Python', 'PHP', 'C/C++', 'JavaScript'],
|
|
1858
|
+
},
|
|
1859
|
+
{
|
|
1860
|
+
name: 'Server-Side Request Forgery (SSRF)',
|
|
1861
|
+
description: 'Attacker tricks the server into making HTTP requests to internal or external resources, accessing internal services, cloud metadata, or exfiltrating data.',
|
|
1862
|
+
cweId: 'CWE-918',
|
|
1863
|
+
examples: ['CVE-2021-26855 (Exchange ProxyLogon)', 'CVE-2023-35078 (Ivanti EPMM)', 'Capital One breach (2019) via SSRF to cloud metadata'],
|
|
1864
|
+
detection: ['WAF SSRF detection rules', 'Monitor for requests to metadata endpoints', 'Outbound request logging', 'DNS rebinding detection'],
|
|
1865
|
+
remediation: ['Allowlist of permitted destination hosts/IPs', 'Block requests to metadata endpoints (169.254.169.254)', 'Network-level egress filtering', 'Disable unnecessary URL schemes (file://, gopher://)'],
|
|
1866
|
+
languages: ['Java', 'Python', 'PHP', 'JavaScript', 'Ruby', 'Go'],
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
name: 'Path Traversal',
|
|
1870
|
+
description: 'Attacker manipulates file paths to access files outside the intended directory (../../etc/passwd).',
|
|
1871
|
+
cweId: 'CWE-22',
|
|
1872
|
+
examples: ['CVE-2021-41773 (Apache path traversal)', 'CVE-2023-34039 (VMware Aria)', 'CVE-2024-21887 (Ivanti Connect Secure)'],
|
|
1873
|
+
detection: ['WAF path traversal rules', 'File access logging', 'SAST for path concatenation', 'Monitor for ../ patterns in requests'],
|
|
1874
|
+
remediation: ['Use path.resolve() and verify within allowed directory', 'Chroot/jail file access', 'Allowlist permitted file paths', 'Normalize paths before validation'],
|
|
1875
|
+
languages: ['PHP', 'Java', 'Python', 'JavaScript', 'C/C++', 'Go'],
|
|
1876
|
+
},
|
|
1877
|
+
{
|
|
1878
|
+
name: 'Insecure Deserialization',
|
|
1879
|
+
description: 'Application deserializes untrusted data, allowing attackers to manipulate serialized objects for RCE, privilege escalation, or injection.',
|
|
1880
|
+
cweId: 'CWE-502',
|
|
1881
|
+
examples: ['CVE-2023-34362 (MOVEit)', 'CVE-2023-46604 (Apache ActiveMQ)', 'CVE-2019-18935 (Telerik UI)'],
|
|
1882
|
+
detection: ['SAST for deserialization of untrusted data', 'Runtime monitoring for deserialization', 'WAF rules for serialized object payloads'],
|
|
1883
|
+
remediation: ['Never deserialize untrusted data', 'Use JSON instead of native serialization', 'Validate and sanitize before deserialization', 'Type checking on deserialized objects', 'Implement integrity checks (HMAC) on serialized data'],
|
|
1884
|
+
languages: ['Java', 'PHP', 'Python', '.NET', 'Ruby'],
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
name: 'Authentication Bypass',
|
|
1888
|
+
description: 'Attacker circumvents authentication mechanisms to gain unauthorized access without valid credentials.',
|
|
1889
|
+
cweId: 'CWE-287',
|
|
1890
|
+
examples: ['CVE-2023-22515 (Confluence)', 'CVE-2023-20198 (Cisco IOS XE)', 'CVE-2024-1709 (ScreenConnect)'],
|
|
1891
|
+
detection: ['Authentication event monitoring', 'Anomalous access pattern detection', 'Penetration testing for auth bypass', 'API testing for unauthenticated access'],
|
|
1892
|
+
remediation: ['Server-side authentication on every request', 'Defense in depth — multiple auth layers', 'Security testing of all auth flows', 'Session management best practices'],
|
|
1893
|
+
languages: ['All'],
|
|
1894
|
+
},
|
|
1895
|
+
{
|
|
1896
|
+
name: 'Privilege Escalation',
|
|
1897
|
+
description: 'Attacker exploits a vulnerability to gain higher privileges than intended — user to admin, unprivileged to root/SYSTEM.',
|
|
1898
|
+
cweId: 'CWE-269',
|
|
1899
|
+
examples: ['CVE-2021-4034 (PwnKit — polkit)', 'CVE-2022-0847 (Dirty Pipe)', 'CVE-2023-32233 (Linux nf_tables)', 'CVE-2024-21338 (Windows kernel)'],
|
|
1900
|
+
detection: ['EDR privilege escalation detection', 'Monitor for unexpected privilege changes', 'Setuid/setgid binary auditing', 'Kernel exploit detection'],
|
|
1901
|
+
remediation: ['Least privilege principle', 'Regular patching', 'Audit setuid/setgid binaries', 'Kernel hardening (SMAP, SMEP)', 'Restrict debug/trace capabilities'],
|
|
1902
|
+
languages: ['C/C++', 'Kernel modules', 'System services'],
|
|
1903
|
+
},
|
|
1904
|
+
{
|
|
1905
|
+
name: 'Prototype Pollution',
|
|
1906
|
+
description: 'JavaScript-specific: attacker modifies the prototype of base objects (Object.prototype), affecting all objects in the application.',
|
|
1907
|
+
cweId: 'CWE-1321',
|
|
1908
|
+
examples: ['CVE-2022-24999 (qs)', 'CVE-2020-28477 (immer)', 'CVE-2021-25945 (set-value)'],
|
|
1909
|
+
detection: ['SAST for prototype pollution sinks', 'Runtime monitoring of Object.prototype modifications', 'Dependency scanning for known vulnerable packages'],
|
|
1910
|
+
remediation: ['Use Object.create(null) for lookup maps', 'Freeze Object.prototype in critical code', 'Validate/sanitize object keys (__proto__, constructor, prototype)', 'Use Map instead of plain objects for dynamic keys'],
|
|
1911
|
+
languages: ['JavaScript', 'TypeScript'],
|
|
1912
|
+
},
|
|
1913
|
+
{
|
|
1914
|
+
name: 'Container Escape',
|
|
1915
|
+
description: 'Attacker breaks out of a container to access the host system or other containers, defeating isolation.',
|
|
1916
|
+
cweId: 'CWE-250',
|
|
1917
|
+
examples: ['CVE-2024-21626 (Leaky Vessels — runc)', 'CVE-2022-0492 (cgroups escape)', 'CVE-2020-15257 (containerd)'],
|
|
1918
|
+
detection: ['Container runtime monitoring', 'Syscall auditing (seccomp)', 'Host process monitoring for container breakouts', 'Kubernetes audit logging'],
|
|
1919
|
+
remediation: ['Run containers as non-root', 'Enable seccomp and AppArmor profiles', 'Use read-only filesystems', 'Keep container runtimes updated', 'Use gVisor or Kata Containers for strong isolation', 'Drop unnecessary capabilities'],
|
|
1920
|
+
languages: ['Go', 'C', 'Container configs'],
|
|
1921
|
+
},
|
|
1922
|
+
];
|
|
1923
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
1924
|
+
// HELPER FUNCTIONS
|
|
1925
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
1926
|
+
function searchMITRE(query) {
|
|
1927
|
+
const q = query.toLowerCase();
|
|
1928
|
+
return MITRE_TECHNIQUES.filter(t => t.id.toLowerCase().includes(q) ||
|
|
1929
|
+
t.name.toLowerCase().includes(q) ||
|
|
1930
|
+
t.tactic.toLowerCase().includes(q) ||
|
|
1931
|
+
t.description.toLowerCase().includes(q) ||
|
|
1932
|
+
(t.subtechniques || []).some(s => s.toLowerCase().includes(q)) ||
|
|
1933
|
+
(t.commonTools || []).some(tool => tool.toLowerCase().includes(q)));
|
|
1934
|
+
}
|
|
1935
|
+
function searchOWASP(query) {
|
|
1936
|
+
const q = query.toLowerCase();
|
|
1937
|
+
return OWASP_2025.filter(o => o.id.toLowerCase().includes(q) ||
|
|
1938
|
+
o.name.toLowerCase().includes(q) ||
|
|
1939
|
+
o.description.toLowerCase().includes(q) ||
|
|
1940
|
+
o.cweIds.some(c => c.toLowerCase().includes(q)));
|
|
1941
|
+
}
|
|
1942
|
+
function searchKillChain(query) {
|
|
1943
|
+
const q = query.toLowerCase();
|
|
1944
|
+
return KILL_CHAIN.filter(k => k.name.toLowerCase().includes(q) ||
|
|
1945
|
+
k.definition.toLowerCase().includes(q) ||
|
|
1946
|
+
k.attackerActions.some(a => a.toLowerCase().includes(q)) ||
|
|
1947
|
+
k.defenderActions.some(d => d.toLowerCase().includes(q)) ||
|
|
1948
|
+
k.kbotTools.some(t => t.toLowerCase().includes(q)));
|
|
1949
|
+
}
|
|
1950
|
+
function searchCVEPatterns(query) {
|
|
1951
|
+
const q = query.toLowerCase();
|
|
1952
|
+
return CVE_PATTERNS.filter(p => p.name.toLowerCase().includes(q) ||
|
|
1953
|
+
p.description.toLowerCase().includes(q) ||
|
|
1954
|
+
p.cweId.toLowerCase().includes(q) ||
|
|
1955
|
+
p.examples.some(e => e.toLowerCase().includes(q)) ||
|
|
1956
|
+
p.languages.some(l => l.toLowerCase().includes(q)));
|
|
1957
|
+
}
|
|
1958
|
+
function searchTools(query) {
|
|
1959
|
+
const q = query.toLowerCase();
|
|
1960
|
+
return TOOL_MAPPINGS.filter(t => t.tool.toLowerCase().includes(q) ||
|
|
1961
|
+
t.description.toLowerCase().includes(q) ||
|
|
1962
|
+
t.tactics.some(tac => tac.toLowerCase().includes(q)) ||
|
|
1963
|
+
t.attackSurface.some(a => a.toLowerCase().includes(q)));
|
|
1964
|
+
}
|
|
1965
|
+
function formatMITRETechnique(t) {
|
|
1966
|
+
const lines = [
|
|
1967
|
+
`## ${t.id} — ${t.name}`,
|
|
1968
|
+
`**Tactic:** ${t.tactic}`,
|
|
1969
|
+
`**Severity:** ${t.severity.toUpperCase()}`,
|
|
1970
|
+
`**Platforms:** ${t.platforms.join(', ')}`,
|
|
1971
|
+
'',
|
|
1972
|
+
t.description,
|
|
1973
|
+
'',
|
|
1974
|
+
];
|
|
1975
|
+
if (t.subtechniques && t.subtechniques.length > 0) {
|
|
1976
|
+
lines.push('**Sub-techniques:**');
|
|
1977
|
+
t.subtechniques.forEach(s => lines.push(` - ${s}`));
|
|
1978
|
+
lines.push('');
|
|
1979
|
+
}
|
|
1980
|
+
if (t.commonTools && t.commonTools.length > 0) {
|
|
1981
|
+
lines.push(`**Common Tools:** ${t.commonTools.join(', ')}`);
|
|
1982
|
+
lines.push('');
|
|
1983
|
+
}
|
|
1984
|
+
lines.push('**Detection:**');
|
|
1985
|
+
t.detection.forEach(d => lines.push(` - ${d}`));
|
|
1986
|
+
lines.push('');
|
|
1987
|
+
lines.push('**Mitigations:**');
|
|
1988
|
+
t.mitigations.forEach(m => lines.push(` - ${m}`));
|
|
1989
|
+
return lines.join('\n');
|
|
1990
|
+
}
|
|
1991
|
+
function formatOWASP(o) {
|
|
1992
|
+
const lines = [
|
|
1993
|
+
`## ${o.id}: ${o.name}`,
|
|
1994
|
+
`**Severity:** ${o.severity.toUpperCase()}`,
|
|
1995
|
+
`**CWE IDs:** ${o.cweIds.join(', ')}`,
|
|
1996
|
+
'',
|
|
1997
|
+
o.description,
|
|
1998
|
+
'',
|
|
1999
|
+
`**Example Attack:**`,
|
|
2000
|
+
o.exampleAttack,
|
|
2001
|
+
'',
|
|
2002
|
+
'**Detection:**',
|
|
2003
|
+
];
|
|
2004
|
+
o.detection.forEach(d => lines.push(` - ${d}`));
|
|
2005
|
+
lines.push('');
|
|
2006
|
+
lines.push('**Remediation:**');
|
|
2007
|
+
o.remediation.forEach(r => lines.push(` - ${r}`));
|
|
2008
|
+
lines.push('');
|
|
2009
|
+
lines.push('**Code Pattern:**');
|
|
2010
|
+
lines.push('```');
|
|
2011
|
+
lines.push(o.codePattern);
|
|
2012
|
+
lines.push('```');
|
|
2013
|
+
return lines.join('\n');
|
|
2014
|
+
}
|
|
2015
|
+
function formatKillChain(k) {
|
|
2016
|
+
const lines = [
|
|
2017
|
+
`## Stage ${k.stage}: ${k.name}`,
|
|
2018
|
+
'',
|
|
2019
|
+
k.definition,
|
|
2020
|
+
'',
|
|
2021
|
+
'**Attacker Actions:**',
|
|
2022
|
+
];
|
|
2023
|
+
k.attackerActions.forEach(a => lines.push(` - ${a}`));
|
|
2024
|
+
lines.push('');
|
|
2025
|
+
lines.push('**Defender Actions:**');
|
|
2026
|
+
k.defenderActions.forEach(d => lines.push(` - ${d}`));
|
|
2027
|
+
lines.push('');
|
|
2028
|
+
lines.push('**Detection Methods:**');
|
|
2029
|
+
k.detectionMethods.forEach(d => lines.push(` - ${d}`));
|
|
2030
|
+
lines.push('');
|
|
2031
|
+
lines.push(`**kbot Tools:** ${k.kbotTools.join(', ')}`);
|
|
2032
|
+
lines.push('');
|
|
2033
|
+
lines.push('**Indicators:**');
|
|
2034
|
+
k.indicators.forEach(i => lines.push(` - ${i}`));
|
|
2035
|
+
return lines.join('\n');
|
|
2036
|
+
}
|
|
2037
|
+
function formatCVEPattern(p) {
|
|
2038
|
+
const lines = [
|
|
2039
|
+
`## ${p.name} (${p.cweId})`,
|
|
2040
|
+
'',
|
|
2041
|
+
p.description,
|
|
2042
|
+
'',
|
|
2043
|
+
`**Languages:** ${p.languages.join(', ')}`,
|
|
2044
|
+
'',
|
|
2045
|
+
'**Notable CVEs:**',
|
|
2046
|
+
];
|
|
2047
|
+
p.examples.forEach(e => lines.push(` - ${e}`));
|
|
2048
|
+
lines.push('');
|
|
2049
|
+
lines.push('**Detection:**');
|
|
2050
|
+
p.detection.forEach(d => lines.push(` - ${d}`));
|
|
2051
|
+
lines.push('');
|
|
2052
|
+
lines.push('**Remediation:**');
|
|
2053
|
+
p.remediation.forEach(r => lines.push(` - ${r}`));
|
|
2054
|
+
return lines.join('\n');
|
|
2055
|
+
}
|
|
2056
|
+
function formatToolMapping(t) {
|
|
2057
|
+
const lines = [
|
|
2058
|
+
`## ${t.tool}`,
|
|
2059
|
+
`**ATT&CK Tactics:** ${t.tactics.join(', ')}`,
|
|
2060
|
+
'',
|
|
2061
|
+
t.description,
|
|
2062
|
+
'',
|
|
2063
|
+
`**Usage:** \`${t.usage}\``,
|
|
2064
|
+
'',
|
|
2065
|
+
'**Attack Surface Coverage:**',
|
|
2066
|
+
];
|
|
2067
|
+
t.attackSurface.forEach(a => lines.push(` - ${a}`));
|
|
2068
|
+
return lines.join('\n');
|
|
2069
|
+
}
|
|
2070
|
+
function mapDescriptionToKillChain(description) {
|
|
2071
|
+
const desc = description.toLowerCase();
|
|
2072
|
+
const mappings = [];
|
|
2073
|
+
// Reconnaissance indicators
|
|
2074
|
+
const reconKeywords = ['scan', 'enumerate', 'discover', 'recon', 'fingerprint', 'osint', 'whois', 'dns lookup', 'subdomain', 'harvest', 'google dork', 'shodan', 'gather information'];
|
|
2075
|
+
if (reconKeywords.some(k => desc.includes(k))) {
|
|
2076
|
+
mappings.push({ stage: 'Stage 1: Reconnaissance', confidence: 'high', reason: 'Contains reconnaissance/information gathering indicators' });
|
|
2077
|
+
}
|
|
2078
|
+
// Weaponization indicators
|
|
2079
|
+
const weapKeywords = ['payload', 'exploit development', 'malware creation', 'craft', 'weaponize', 'dropper', 'builder', 'obfuscate payload', 'packer', 'crypter', 'backdoor development'];
|
|
2080
|
+
if (weapKeywords.some(k => desc.includes(k))) {
|
|
2081
|
+
mappings.push({ stage: 'Stage 2: Weaponization', confidence: 'high', reason: 'Contains payload/exploit development indicators' });
|
|
2082
|
+
}
|
|
2083
|
+
// Delivery indicators
|
|
2084
|
+
const delivKeywords = ['phishing', 'spearphish', 'email attachment', 'malicious link', 'drive-by', 'watering hole', 'usb drop', 'supply chain', 'social engineer', 'deliver', 'distribute malware', 'send email', 'trojan'];
|
|
2085
|
+
if (delivKeywords.some(k => desc.includes(k))) {
|
|
2086
|
+
mappings.push({ stage: 'Stage 3: Delivery', confidence: 'high', reason: 'Contains delivery/distribution indicators' });
|
|
2087
|
+
}
|
|
2088
|
+
// Exploitation indicators
|
|
2089
|
+
const exploitKeywords = ['exploit', 'vulnerability', 'cve', 'buffer overflow', 'rce', 'remote code execution', 'zero-day', '0day', 'heap spray', 'use-after-free', 'injection', 'sql injection', 'xss', 'deserialization', 'arbitrary code'];
|
|
2090
|
+
if (exploitKeywords.some(k => desc.includes(k))) {
|
|
2091
|
+
mappings.push({ stage: 'Stage 4: Exploitation', confidence: 'high', reason: 'Contains exploitation/vulnerability indicators' });
|
|
2092
|
+
}
|
|
2093
|
+
// Installation indicators
|
|
2094
|
+
const installKeywords = ['persist', 'backdoor', 'rootkit', 'web shell', 'implant', 'trojan', 'rat', 'registry', 'startup', 'cron job', 'scheduled task', 'service install', 'autorun', 'boot', 'logon script', 'launch agent', 'launch daemon'];
|
|
2095
|
+
if (installKeywords.some(k => desc.includes(k))) {
|
|
2096
|
+
mappings.push({ stage: 'Stage 5: Installation', confidence: 'high', reason: 'Contains persistence/installation indicators' });
|
|
2097
|
+
}
|
|
2098
|
+
// C2 indicators
|
|
2099
|
+
const c2Keywords = ['command and control', 'c2', 'c&c', 'beacon', 'callback', 'reverse shell', 'bind shell', 'dns tunnel', 'covert channel', 'domain fronting', 'cobalt strike', 'sliver', 'empire', 'meterpreter', 'remote access'];
|
|
2100
|
+
if (c2Keywords.some(k => desc.includes(k))) {
|
|
2101
|
+
mappings.push({ stage: 'Stage 6: Command & Control', confidence: 'high', reason: 'Contains C2/communication channel indicators' });
|
|
2102
|
+
}
|
|
2103
|
+
// Actions on Objectives indicators
|
|
2104
|
+
const actionKeywords = ['exfiltrat', 'ransomware', 'encrypt files', 'data theft', 'steal data', 'wiper', 'destruct', 'deface', 'cryptomin', 'sabotage', 'espionage', 'lateral movement', 'privilege escalation', 'credential dump', 'mimikatz', 'data destruction', 'impact'];
|
|
2105
|
+
if (actionKeywords.some(k => desc.includes(k))) {
|
|
2106
|
+
mappings.push({ stage: 'Stage 7: Actions on Objectives', confidence: 'high', reason: 'Contains objective/impact indicators' });
|
|
2107
|
+
}
|
|
2108
|
+
// If no high-confidence matches, try broader patterns
|
|
2109
|
+
if (mappings.length === 0) {
|
|
2110
|
+
if (desc.includes('attack') || desc.includes('threat') || desc.includes('compromise')) {
|
|
2111
|
+
mappings.push({ stage: 'Multiple stages possible', confidence: 'low', reason: 'Generic attack terminology — provide more specific details for accurate mapping' });
|
|
2112
|
+
}
|
|
2113
|
+
else {
|
|
2114
|
+
mappings.push({ stage: 'Unable to determine', confidence: 'low', reason: 'Description does not contain clear kill chain indicators. Try including specific attack techniques, tools, or behaviors.' });
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
// Find related MITRE techniques
|
|
2118
|
+
const relatedTechniques = searchMITRE(description).slice(0, 5);
|
|
2119
|
+
const relatedOWASP = searchOWASP(description).slice(0, 3);
|
|
2120
|
+
const relatedCVEPatterns = searchCVEPatterns(description).slice(0, 3);
|
|
2121
|
+
const lines = [
|
|
2122
|
+
'# Kill Chain Analysis',
|
|
2123
|
+
'',
|
|
2124
|
+
`**Input:** "${description.slice(0, 200)}${description.length > 200 ? '...' : ''}"`,
|
|
2125
|
+
'',
|
|
2126
|
+
'## Kill Chain Stage Mapping',
|
|
2127
|
+
'',
|
|
2128
|
+
];
|
|
2129
|
+
mappings.forEach(m => {
|
|
2130
|
+
lines.push(`### ${m.stage}`);
|
|
2131
|
+
lines.push(`**Confidence:** ${m.confidence.toUpperCase()}`);
|
|
2132
|
+
lines.push(`**Reasoning:** ${m.reason}`);
|
|
2133
|
+
lines.push('');
|
|
2134
|
+
});
|
|
2135
|
+
// Add the full kill chain context for matched stages
|
|
2136
|
+
const matchedStages = mappings
|
|
2137
|
+
.filter(m => m.confidence !== 'low')
|
|
2138
|
+
.map(m => {
|
|
2139
|
+
const stageNum = parseInt(m.stage.match(/Stage (\d)/)?.[1] || '0', 10);
|
|
2140
|
+
return KILL_CHAIN.find(k => k.stage === stageNum);
|
|
2141
|
+
})
|
|
2142
|
+
.filter(Boolean);
|
|
2143
|
+
if (matchedStages.length > 0) {
|
|
2144
|
+
lines.push('## Detailed Stage Analysis');
|
|
2145
|
+
lines.push('');
|
|
2146
|
+
matchedStages.forEach(stage => {
|
|
2147
|
+
lines.push(formatKillChain(stage));
|
|
2148
|
+
lines.push('');
|
|
2149
|
+
});
|
|
2150
|
+
}
|
|
2151
|
+
// Add related intelligence
|
|
2152
|
+
if (relatedTechniques.length > 0) {
|
|
2153
|
+
lines.push('## Related MITRE ATT&CK Techniques');
|
|
2154
|
+
lines.push('');
|
|
2155
|
+
relatedTechniques.forEach(t => {
|
|
2156
|
+
lines.push(`- **${t.id}** — ${t.name} (${t.tactic}) [${t.severity.toUpperCase()}]`);
|
|
2157
|
+
});
|
|
2158
|
+
lines.push('');
|
|
2159
|
+
}
|
|
2160
|
+
if (relatedOWASP.length > 0) {
|
|
2161
|
+
lines.push('## Related OWASP Top 10 Entries');
|
|
2162
|
+
lines.push('');
|
|
2163
|
+
relatedOWASP.forEach(o => {
|
|
2164
|
+
lines.push(`- **${o.id}** — ${o.name}`);
|
|
2165
|
+
});
|
|
2166
|
+
lines.push('');
|
|
2167
|
+
}
|
|
2168
|
+
if (relatedCVEPatterns.length > 0) {
|
|
2169
|
+
lines.push('## Related Vulnerability Patterns');
|
|
2170
|
+
lines.push('');
|
|
2171
|
+
relatedCVEPatterns.forEach(p => {
|
|
2172
|
+
lines.push(`- **${p.name}** (${p.cweId})`);
|
|
2173
|
+
});
|
|
2174
|
+
lines.push('');
|
|
2175
|
+
}
|
|
2176
|
+
// Defensive recommendations
|
|
2177
|
+
lines.push('## Defensive Recommendations');
|
|
2178
|
+
lines.push('');
|
|
2179
|
+
if (matchedStages.length > 0) {
|
|
2180
|
+
const allDefenderActions = matchedStages.flatMap(s => s.defenderActions);
|
|
2181
|
+
const uniqueActions = [...new Set(allDefenderActions)];
|
|
2182
|
+
uniqueActions.forEach(a => lines.push(`- ${a}`));
|
|
2183
|
+
lines.push('');
|
|
2184
|
+
const allTools = [...new Set(matchedStages.flatMap(s => s.kbotTools))];
|
|
2185
|
+
lines.push(`**Recommended kbot tools:** ${allTools.join(', ')}`);
|
|
2186
|
+
}
|
|
2187
|
+
else {
|
|
2188
|
+
lines.push('Provide more specific attack details for targeted defensive recommendations.');
|
|
2189
|
+
}
|
|
2190
|
+
return lines.join('\n');
|
|
2191
|
+
}
|
|
2192
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
2193
|
+
// TOOL REGISTRATION
|
|
2194
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
2195
|
+
export function registerSecurityBrainTools() {
|
|
2196
|
+
// ── Tool 1: security_brain ──────────────────────────────────────────
|
|
2197
|
+
registerTool({
|
|
2198
|
+
name: 'security_brain',
|
|
2199
|
+
description: 'Query the security knowledge base. Covers MITRE ATT&CK (14 tactics, 200+ techniques), OWASP Top 10 (2025), Lockheed Martin Kill Chain, CVE patterns, and kbot security tool mapping. Use this as a first stop for any security question.',
|
|
2200
|
+
parameters: {
|
|
2201
|
+
topic: { type: 'string', description: 'What to look up — technique name, vulnerability type, attack pattern, tool name, or general security topic', required: true },
|
|
2202
|
+
category: { type: 'string', description: 'Knowledge category to search: "mitre", "owasp", "killchain", "cve_patterns", "tools", or "all" (default: "all")', required: false },
|
|
2203
|
+
},
|
|
2204
|
+
tier: 'free',
|
|
2205
|
+
timeout: 10_000,
|
|
2206
|
+
async execute(args) {
|
|
2207
|
+
const topic = args.topic || '';
|
|
2208
|
+
const category = (args.category || 'all').toLowerCase();
|
|
2209
|
+
if (!topic.trim()) {
|
|
2210
|
+
return 'Error: topic parameter is required. Example: security_brain { topic: "phishing", category: "mitre" }';
|
|
2211
|
+
}
|
|
2212
|
+
const sections = [];
|
|
2213
|
+
sections.push(`# Security Brain: "${topic}"`);
|
|
2214
|
+
sections.push(`**Category filter:** ${category}`);
|
|
2215
|
+
sections.push('');
|
|
2216
|
+
const searchAll = category === 'all';
|
|
2217
|
+
// MITRE ATT&CK
|
|
2218
|
+
if (searchAll || category === 'mitre') {
|
|
2219
|
+
const results = searchMITRE(topic);
|
|
2220
|
+
if (results.length > 0) {
|
|
2221
|
+
sections.push(`## MITRE ATT&CK (${results.length} result${results.length !== 1 ? 's' : ''})`);
|
|
2222
|
+
sections.push('');
|
|
2223
|
+
results.slice(0, 10).forEach(t => {
|
|
2224
|
+
sections.push(formatMITRETechnique(t));
|
|
2225
|
+
sections.push('');
|
|
2226
|
+
sections.push('---');
|
|
2227
|
+
sections.push('');
|
|
2228
|
+
});
|
|
2229
|
+
if (results.length > 10) {
|
|
2230
|
+
sections.push(`_... and ${results.length - 10} more results. Narrow your query for focused results._`);
|
|
2231
|
+
sections.push('');
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
else if (!searchAll) {
|
|
2235
|
+
sections.push('## MITRE ATT&CK');
|
|
2236
|
+
sections.push('No matching techniques found. Try a technique ID (T1566), technique name (Phishing), or tactic name (Initial Access).');
|
|
2237
|
+
sections.push('');
|
|
2238
|
+
}
|
|
2239
|
+
}
|
|
2240
|
+
// OWASP
|
|
2241
|
+
if (searchAll || category === 'owasp') {
|
|
2242
|
+
const results = searchOWASP(topic);
|
|
2243
|
+
if (results.length > 0) {
|
|
2244
|
+
sections.push(`## OWASP Top 10 2025 (${results.length} result${results.length !== 1 ? 's' : ''})`);
|
|
2245
|
+
sections.push('');
|
|
2246
|
+
results.forEach(o => {
|
|
2247
|
+
sections.push(formatOWASP(o));
|
|
2248
|
+
sections.push('');
|
|
2249
|
+
sections.push('---');
|
|
2250
|
+
sections.push('');
|
|
2251
|
+
});
|
|
2252
|
+
}
|
|
2253
|
+
else if (!searchAll) {
|
|
2254
|
+
sections.push('## OWASP Top 10');
|
|
2255
|
+
sections.push('No matching entries found. Try an ID (A01-A10), name (Injection, XSS), or CWE ID.');
|
|
2256
|
+
sections.push('');
|
|
2257
|
+
}
|
|
2258
|
+
}
|
|
2259
|
+
// Kill Chain
|
|
2260
|
+
if (searchAll || category === 'killchain') {
|
|
2261
|
+
const results = searchKillChain(topic);
|
|
2262
|
+
if (results.length > 0) {
|
|
2263
|
+
sections.push(`## Kill Chain (${results.length} result${results.length !== 1 ? 's' : ''})`);
|
|
2264
|
+
sections.push('');
|
|
2265
|
+
results.forEach(k => {
|
|
2266
|
+
sections.push(formatKillChain(k));
|
|
2267
|
+
sections.push('');
|
|
2268
|
+
sections.push('---');
|
|
2269
|
+
sections.push('');
|
|
2270
|
+
});
|
|
2271
|
+
}
|
|
2272
|
+
else if (!searchAll) {
|
|
2273
|
+
sections.push('## Kill Chain');
|
|
2274
|
+
sections.push('No matching stages found. Try a stage name (Reconnaissance, Delivery, Exploitation) or action keyword.');
|
|
2275
|
+
sections.push('');
|
|
2276
|
+
}
|
|
2277
|
+
}
|
|
2278
|
+
// CVE Patterns
|
|
2279
|
+
if (searchAll || category === 'cve_patterns') {
|
|
2280
|
+
const results = searchCVEPatterns(topic);
|
|
2281
|
+
if (results.length > 0) {
|
|
2282
|
+
sections.push(`## CVE Patterns (${results.length} result${results.length !== 1 ? 's' : ''})`);
|
|
2283
|
+
sections.push('');
|
|
2284
|
+
results.forEach(p => {
|
|
2285
|
+
sections.push(formatCVEPattern(p));
|
|
2286
|
+
sections.push('');
|
|
2287
|
+
sections.push('---');
|
|
2288
|
+
sections.push('');
|
|
2289
|
+
});
|
|
2290
|
+
}
|
|
2291
|
+
else if (!searchAll) {
|
|
2292
|
+
sections.push('## CVE Patterns');
|
|
2293
|
+
sections.push('No matching patterns found. Try a vulnerability type (SQL Injection, XSS, RCE) or CWE ID.');
|
|
2294
|
+
sections.push('');
|
|
2295
|
+
}
|
|
2296
|
+
}
|
|
2297
|
+
// Tools
|
|
2298
|
+
if (searchAll || category === 'tools') {
|
|
2299
|
+
const results = searchTools(topic);
|
|
2300
|
+
if (results.length > 0) {
|
|
2301
|
+
sections.push(`## kbot Tool Mapping (${results.length} result${results.length !== 1 ? 's' : ''})`);
|
|
2302
|
+
sections.push('');
|
|
2303
|
+
results.forEach(t => {
|
|
2304
|
+
sections.push(formatToolMapping(t));
|
|
2305
|
+
sections.push('');
|
|
2306
|
+
sections.push('---');
|
|
2307
|
+
sections.push('');
|
|
2308
|
+
});
|
|
2309
|
+
}
|
|
2310
|
+
else if (!searchAll) {
|
|
2311
|
+
sections.push('## kbot Tool Mapping');
|
|
2312
|
+
sections.push('No matching tools found. Try a tool name (port_scan, owasp_check) or tactic name (Reconnaissance).');
|
|
2313
|
+
sections.push('');
|
|
2314
|
+
}
|
|
2315
|
+
}
|
|
2316
|
+
// Summary stats
|
|
2317
|
+
const totalMitre = searchAll || category === 'mitre' ? searchMITRE(topic).length : 0;
|
|
2318
|
+
const totalOwasp = searchAll || category === 'owasp' ? searchOWASP(topic).length : 0;
|
|
2319
|
+
const totalKillChain = searchAll || category === 'killchain' ? searchKillChain(topic).length : 0;
|
|
2320
|
+
const totalCVE = searchAll || category === 'cve_patterns' ? searchCVEPatterns(topic).length : 0;
|
|
2321
|
+
const totalTools = searchAll || category === 'tools' ? searchTools(topic).length : 0;
|
|
2322
|
+
const totalResults = totalMitre + totalOwasp + totalKillChain + totalCVE + totalTools;
|
|
2323
|
+
if (totalResults === 0) {
|
|
2324
|
+
sections.push('## No Results');
|
|
2325
|
+
sections.push('');
|
|
2326
|
+
sections.push(`No matches found for "${topic}" in ${category === 'all' ? 'any category' : category}.`);
|
|
2327
|
+
sections.push('');
|
|
2328
|
+
sections.push('**Suggestions:**');
|
|
2329
|
+
sections.push('- Try broader keywords (e.g., "injection" instead of "sql injection in java")');
|
|
2330
|
+
sections.push('- Search by technique ID (T1566), CWE ID (CWE-79), or OWASP ID (A01)');
|
|
2331
|
+
sections.push('- Use category filter: "mitre", "owasp", "killchain", "cve_patterns", "tools"');
|
|
2332
|
+
sections.push('');
|
|
2333
|
+
sections.push('**Available MITRE Tactics:** Reconnaissance, Resource Development, Initial Access, Execution, Persistence, Privilege Escalation, Defense Evasion, Credential Access, Discovery, Lateral Movement, Collection, Command and Control, Exfiltration, Impact');
|
|
2334
|
+
sections.push('');
|
|
2335
|
+
sections.push('**Available OWASP Entries:** A01 (Broken Access Control), A02 (Security Misconfiguration), A03 (Supply Chain Failures), A04 (Cryptographic Failures), A05 (Injection), A06 (Insecure Design), A07 (Authentication Failures), A08 (Integrity Failures), A09 (Logging Failures), A10 (Exceptional Conditions)');
|
|
2336
|
+
}
|
|
2337
|
+
return sections.join('\n');
|
|
2338
|
+
},
|
|
2339
|
+
});
|
|
2340
|
+
// ── Tool 2: attack_lookup ───────────────────────────────────────────
|
|
2341
|
+
registerTool({
|
|
2342
|
+
name: 'attack_lookup',
|
|
2343
|
+
description: 'Look up MITRE ATT&CK techniques by ID (T1566) or keyword (phishing). Returns technique details including tactic, description, sub-techniques, detection methods, and mitigations. Covers all 14 ATT&CK tactics with top techniques for each.',
|
|
2344
|
+
parameters: {
|
|
2345
|
+
query: { type: 'string', description: 'Technique ID (e.g., T1566, T1059.001) or keyword (e.g., phishing, injection, credential dumping)', required: true },
|
|
2346
|
+
},
|
|
2347
|
+
tier: 'free',
|
|
2348
|
+
timeout: 10_000,
|
|
2349
|
+
async execute(args) {
|
|
2350
|
+
const query = args.query || '';
|
|
2351
|
+
if (!query.trim()) {
|
|
2352
|
+
return 'Error: query parameter is required. Example: attack_lookup { query: "T1566" } or attack_lookup { query: "phishing" }';
|
|
2353
|
+
}
|
|
2354
|
+
const results = searchMITRE(query);
|
|
2355
|
+
if (results.length === 0) {
|
|
2356
|
+
// Check if it looks like a technique ID for a subtechnique
|
|
2357
|
+
const idMatch = query.match(/^T\d{4}(\.\d{3})?$/i);
|
|
2358
|
+
if (idMatch) {
|
|
2359
|
+
// Search for parent technique if subtechnique
|
|
2360
|
+
const parentId = query.split('.')[0].toUpperCase();
|
|
2361
|
+
const parentResults = MITRE_TECHNIQUES.filter(t => t.id === parentId);
|
|
2362
|
+
if (parentResults.length > 0) {
|
|
2363
|
+
const parent = parentResults[0];
|
|
2364
|
+
const matchingSub = (parent.subtechniques || []).find(s => s.toLowerCase().includes(query.toLowerCase()));
|
|
2365
|
+
if (matchingSub) {
|
|
2366
|
+
return [
|
|
2367
|
+
`# Sub-technique: ${query.toUpperCase()}`,
|
|
2368
|
+
'',
|
|
2369
|
+
`Found as part of **${parent.id} — ${parent.name}**`,
|
|
2370
|
+
'',
|
|
2371
|
+
`**Sub-technique:** ${matchingSub}`,
|
|
2372
|
+
'',
|
|
2373
|
+
formatMITRETechnique(parent),
|
|
2374
|
+
].join('\n');
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
return `No technique found for ID "${query}". Valid IDs range from T1001 to T1654. Check the MITRE ATT&CK website for the full catalog.`;
|
|
2378
|
+
}
|
|
2379
|
+
// Suggest related searches
|
|
2380
|
+
const allTactics = [...new Set(MITRE_TECHNIQUES.map(t => t.tactic))];
|
|
2381
|
+
return [
|
|
2382
|
+
`No ATT&CK techniques found matching "${query}".`,
|
|
2383
|
+
'',
|
|
2384
|
+
'**Try:**',
|
|
2385
|
+
'- Technique ID: T1566, T1059, T1003',
|
|
2386
|
+
'- Technique name: Phishing, Process Injection, Brute Force',
|
|
2387
|
+
'- Tactic name: Initial Access, Persistence, Lateral Movement',
|
|
2388
|
+
'- Tool name: Mimikatz, Cobalt Strike, Nmap',
|
|
2389
|
+
'',
|
|
2390
|
+
`**All 14 tactics:** ${allTactics.join(', ')}`,
|
|
2391
|
+
].join('\n');
|
|
2392
|
+
}
|
|
2393
|
+
const lines = [
|
|
2394
|
+
`# ATT&CK Lookup: "${query}" (${results.length} result${results.length !== 1 ? 's' : ''})`,
|
|
2395
|
+
'',
|
|
2396
|
+
];
|
|
2397
|
+
results.slice(0, 8).forEach((t, i) => {
|
|
2398
|
+
lines.push(formatMITRETechnique(t));
|
|
2399
|
+
if (i < Math.min(results.length, 8) - 1) {
|
|
2400
|
+
lines.push('');
|
|
2401
|
+
lines.push('---');
|
|
2402
|
+
lines.push('');
|
|
2403
|
+
}
|
|
2404
|
+
});
|
|
2405
|
+
if (results.length > 8) {
|
|
2406
|
+
lines.push('');
|
|
2407
|
+
lines.push(`_${results.length - 8} more results. Narrow your query (e.g., use technique ID instead of keyword)._`);
|
|
2408
|
+
}
|
|
2409
|
+
// Cross-reference with OWASP and CVE patterns
|
|
2410
|
+
const relatedOWASP = searchOWASP(query);
|
|
2411
|
+
const relatedCVE = searchCVEPatterns(query);
|
|
2412
|
+
if (relatedOWASP.length > 0 || relatedCVE.length > 0) {
|
|
2413
|
+
lines.push('');
|
|
2414
|
+
lines.push('## Cross-References');
|
|
2415
|
+
if (relatedOWASP.length > 0) {
|
|
2416
|
+
lines.push(`**OWASP:** ${relatedOWASP.map(o => `${o.id} (${o.name})`).join(', ')}`);
|
|
2417
|
+
}
|
|
2418
|
+
if (relatedCVE.length > 0) {
|
|
2419
|
+
lines.push(`**CVE Patterns:** ${relatedCVE.map(p => `${p.name} (${p.cweId})`).join(', ')}`);
|
|
2420
|
+
}
|
|
2421
|
+
}
|
|
2422
|
+
return lines.join('\n');
|
|
2423
|
+
},
|
|
2424
|
+
});
|
|
2425
|
+
// ── Tool 3: killchain_analyze ───────────────────────────────────────
|
|
2426
|
+
registerTool({
|
|
2427
|
+
name: 'killchain_analyze',
|
|
2428
|
+
description: 'Map an attack or vulnerability description to Lockheed Martin Kill Chain stages. Provides kill chain stage mapping with confidence levels, related MITRE ATT&CK techniques, OWASP entries, CVE patterns, and defensive recommendations with specific kbot tools.',
|
|
2429
|
+
parameters: {
|
|
2430
|
+
description: { type: 'string', description: 'Description of the attack, vulnerability, or threat scenario to analyze and map to kill chain stages', required: true },
|
|
2431
|
+
},
|
|
2432
|
+
tier: 'free',
|
|
2433
|
+
timeout: 10_000,
|
|
2434
|
+
async execute(args) {
|
|
2435
|
+
const description = args.description || '';
|
|
2436
|
+
if (!description.trim()) {
|
|
2437
|
+
return [
|
|
2438
|
+
'Error: description parameter is required.',
|
|
2439
|
+
'',
|
|
2440
|
+
'Example: killchain_analyze { description: "Attacker sent phishing email with malicious PDF that exploits a known vulnerability to install a reverse shell" }',
|
|
2441
|
+
'',
|
|
2442
|
+
'The description should include attack details such as:',
|
|
2443
|
+
'- Attack vector (phishing, exploit, supply chain)',
|
|
2444
|
+
'- Techniques used (credential dumping, lateral movement)',
|
|
2445
|
+
'- Tools mentioned (Mimikatz, Cobalt Strike)',
|
|
2446
|
+
'- Objectives (data exfiltration, ransomware, persistence)',
|
|
2447
|
+
].join('\n');
|
|
2448
|
+
}
|
|
2449
|
+
return mapDescriptionToKillChain(description);
|
|
2450
|
+
},
|
|
2451
|
+
});
|
|
2452
|
+
}
|
|
2453
|
+
//# sourceMappingURL=security-brain.js.map
|