cyberaudit-skill 3.0.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.
Files changed (60) hide show
  1. package/README.md +77 -0
  2. package/dist/cli.d.ts +2 -0
  3. package/dist/cli.js +241 -0
  4. package/dist/mcp-server.d.ts +2 -0
  5. package/dist/mcp-server.js +126 -0
  6. package/package.json +58 -0
  7. package/skills/cyberaudit/AGENT-BOOT.md +122 -0
  8. package/skills/cyberaudit/COMMANDS.md +1125 -0
  9. package/skills/cyberaudit/INSTALL.md +311 -0
  10. package/skills/cyberaudit/MASTER.md +194 -0
  11. package/skills/cyberaudit/README.md +154 -0
  12. package/skills/cyberaudit/USAGE-GUIDE.md +107 -0
  13. package/skills/cyberaudit/mobile/MOBILE-CHECKLIST.md +245 -0
  14. package/skills/cyberaudit/mobile/MOBILE-PHILOSOPHY.md +352 -0
  15. package/skills/cyberaudit/mobile/MOBILE-REMEDIATION-LIBRARY.md +468 -0
  16. package/skills/cyberaudit/mobile/MOBILE-THREAT-MODELS.md +279 -0
  17. package/skills/cyberaudit/mobile/frameworks/EXPO.md +247 -0
  18. package/skills/cyberaudit/mobile/frameworks/FLUTTER.md +338 -0
  19. package/skills/cyberaudit/mobile/frameworks/IONIC.md +248 -0
  20. package/skills/cyberaudit/mobile/frameworks/REACT-NATIVE.md +479 -0
  21. package/skills/cyberaudit/mobile/vulnerabilities/AUTH-MOBILE.md +160 -0
  22. package/skills/cyberaudit/mobile/vulnerabilities/BINARY-ANALYSIS.md +193 -0
  23. package/skills/cyberaudit/mobile/vulnerabilities/CRYPTO-MOBILE.md +192 -0
  24. package/skills/cyberaudit/mobile/vulnerabilities/IPC-DEEPLINKS.md +231 -0
  25. package/skills/cyberaudit/mobile/vulnerabilities/NETWORK-MOBILE.md +165 -0
  26. package/skills/cyberaudit/mobile/vulnerabilities/PERMISSIONS.md +180 -0
  27. package/skills/cyberaudit/mobile/vulnerabilities/RUNTIME-MOBILE.md +214 -0
  28. package/skills/cyberaudit/mobile/vulnerabilities/STORAGE.md +197 -0
  29. package/skills/cyberaudit/reports/EXECUTIVE-SUMMARY-TEMPLATE.md +188 -0
  30. package/skills/cyberaudit/reports/REPORT-TEMPLATE-MOBILE.md +410 -0
  31. package/skills/cyberaudit/reports/REPORT-TEMPLATE-WEB.md +222 -0
  32. package/skills/cyberaudit/shared/COMPLIANCE.md +307 -0
  33. package/skills/cyberaudit/shared/CVSS-GUIDE.md +175 -0
  34. package/skills/cyberaudit/shared/OWASP-MAPPER.md +130 -0
  35. package/skills/cyberaudit/shared/SEVERITY-SCORING.md +102 -0
  36. package/skills/cyberaudit/shared/THREAT-MODELING.md +112 -0
  37. package/skills/cyberaudit/web/WEB-CHECKLIST.md +222 -0
  38. package/skills/cyberaudit/web/WEB-PHILOSOPHY.md +308 -0
  39. package/skills/cyberaudit/web/WEB-REMEDIATION-LIBRARY.md +665 -0
  40. package/skills/cyberaudit/web/WEB-THREAT-MODELS.md +460 -0
  41. package/skills/cyberaudit/web/frameworks/ANGULAR.md +169 -0
  42. package/skills/cyberaudit/web/frameworks/EXPRESS.md +185 -0
  43. package/skills/cyberaudit/web/frameworks/LARAVEL.md +371 -0
  44. package/skills/cyberaudit/web/frameworks/NESTJS.md +337 -0
  45. package/skills/cyberaudit/web/frameworks/NEXTJS.md +352 -0
  46. package/skills/cyberaudit/web/frameworks/REACT.md +346 -0
  47. package/skills/cyberaudit/web/frameworks/VUE.md +205 -0
  48. package/skills/cyberaudit/web/vulnerabilities/AUTH-AUTHZ.md +117 -0
  49. package/skills/cyberaudit/web/vulnerabilities/BUSINESS-LOGIC.md +603 -0
  50. package/skills/cyberaudit/web/vulnerabilities/CORS.md +117 -0
  51. package/skills/cyberaudit/web/vulnerabilities/CSRF.md +131 -0
  52. package/skills/cyberaudit/web/vulnerabilities/DESERIALIZATION.md +96 -0
  53. package/skills/cyberaudit/web/vulnerabilities/HEADERS.md +105 -0
  54. package/skills/cyberaudit/web/vulnerabilities/IDOR-BOLA.md +153 -0
  55. package/skills/cyberaudit/web/vulnerabilities/INJECTION.md +165 -0
  56. package/skills/cyberaudit/web/vulnerabilities/SECRETS.md +119 -0
  57. package/skills/cyberaudit/web/vulnerabilities/SSRF.md +124 -0
  58. package/skills/cyberaudit/web/vulnerabilities/SUPPLY-CHAIN.md +142 -0
  59. package/skills/cyberaudit/web/vulnerabilities/XSS.md +133 -0
  60. package/skills/cyberaudit/web/vulnerabilities/XXE.md +94 -0
@@ -0,0 +1,308 @@
1
+ # 🌐 WEB AUDIT PHILOSOPHY — CYBERAUDIT SKILL
2
+ # The mindset of a web security expert
3
+
4
+ ═══════════════════════════════════════════════════════════════
5
+ THE WEB MENTAL DNA
6
+ ═══════════════════════════════════════════════════════════════
7
+
8
+ When you look at a web application, you don't see code.
9
+ You see a TRUST NETWORK with boundaries.
10
+
11
+ Each boundary is a question:
12
+ "Who decided this data is safe here?"
13
+ "Who verifies that this action is authorized?"
14
+ "Who guarantees that this secret stays secret?"
15
+
16
+ If the answer is "nobody" or "we assume" → VULNERABILITY
17
+
18
+ ═══════════════════════════════════════════════════════════════
19
+ THE 7 DEADLY SINS OF THE WEB
20
+ ═══════════════════════════════════════════════════════════════
21
+
22
+ SIN 1 — TRUSTING INPUT
23
+ Data coming from outside is always hostile.
24
+ "But it's a client-side validated email field"
25
+ → The client can be anyone with Burp Suite
26
+ → ALWAYS validate server-side. Always. Without exception.
27
+
28
+ SIN 2 — CONFUSING AUTHENTICATION AND AUTHORIZATION
29
+ Authenticated = I know who you are
30
+ Authorized = I verified you can do this
31
+
32
+ A logged-in user accessing another user's data = IDOR = mortal sin
33
+
34
+ SIN 3 — PUTTING SECRETS IN CODE
35
+ Every secret in code is offered to:
36
+ → Every developer on the team
37
+ → Anyone with repo access (GitHub breach?)
38
+ → CI/CD logs
39
+ → Error messages
40
+ → Source maps
41
+
42
+ SIN 4 — TRUSTING THE FRONTEND
43
+ The frontend is a billboard.
44
+ Anyone can modify it.
45
+ Any security logic on the client side = no security.
46
+
47
+ "The button is disabled" → F12 → button enabled
48
+ "We hide the ID in base64" → atob() → ID visible
49
+ "We check the role in JS" → console → role changed
50
+
51
+ SIN 5 — NEGLECTING DEPENDENCIES
52
+ You don't write 100% of your code.
53
+ Log4Shell was in a dependency.
54
+ The code you didn't write can be the most dangerous.
55
+
56
+ SIN 6 — DEPLOYING IN DEBUG
57
+ A debug mode in production offers:
58
+ → Full stack traces (infrastructure mapping)
59
+ → Exposed environment variables
60
+ → Active debug routes
61
+ → Verbose logs with sensitive data
62
+
63
+ SIN 7 — IGNORING HEADERS
64
+ Security headers are a free shield.
65
+ Not configuring them = leaving a door open
66
+ for no good reason.
67
+
68
+ ═══════════════════════════════════════════════════════════════
69
+ THE AUDIT FLOW
70
+ ═══════════════════════════════════════════════════════════════
71
+
72
+ PHASE 0 — RECONNAISSANCE AND CONTEXT
73
+ ══════════════════════════════════════
74
+
75
+ QUESTIONS TO ASK:
76
+
77
+ □ What is the main framework? Its version?
78
+ □ Is there a frontend separate from the backend?
79
+ □ What types of data are processed?
80
+ (PII? Financial? Health? National security?)
81
+ □ Who are the users?
82
+ (Anonymous public? Authenticated users? Admins?)
83
+ □ What are the most critical endpoints?
84
+ □ Are there third-party integrations?
85
+ (Payment, OAuth, external APIs?)
86
+ □ What is the target environment?
87
+ (Local dev? Staging? Production?)
88
+
89
+ ATTACK SURFACE MAPPING:
90
+
91
+ → List ALL entry points:
92
+ - HTTP routes (GET/POST/PUT/PATCH/DELETE)
93
+ - WebSockets
94
+ - GraphQL queries/mutations
95
+ - Incoming webhooks
96
+ - File uploads
97
+ - Import/Export features
98
+ - Background jobs (if triggerable)
99
+
100
+ → Identify high-value areas:
101
+ - Authentication endpoints
102
+ - Payment endpoints
103
+ - Administration endpoints
104
+ - Personal data endpoints
105
+ - File endpoints
106
+
107
+ PHASE 1 — SECRETS AND CONFIGURATION AUDIT
108
+ ══════════════════════════════════════════
109
+
110
+ ABSOLUTE PRIORITY — Done first, always.
111
+ An exposed secret = possible immediate compromise.
112
+
113
+ SCAN FOR:
114
+
115
+ □ API Keys in source code (all files)
116
+ □ Hardcoded passwords
117
+ □ Private RSA/EC keys
118
+ □ JWT secret tokens
119
+ □ Connection strings with credentials
120
+ □ Encryption keys
121
+ □ Webhook secrets
122
+ □ NEXT_PUBLIC_ containing secrets
123
+ □ Variables in comments
124
+ □ Secrets in test files
125
+ □ Git history (deleted but present secrets)
126
+ □ Committed .env files
127
+ □ Config files with production values
128
+
129
+ CHECK CONFIGURATION:
130
+
131
+ □ Debug mode disabled in production?
132
+ □ Error handling does not reveal infrastructure?
133
+ □ Logging configured not to log secrets?
134
+ □ CORS configured restrictively?
135
+ □ Rate limiting in place?
136
+ □ Security headers present?
137
+
138
+ PHASE 2 — AUTHENTICATION AUDIT
139
+ ══════════════════════════════════
140
+
141
+ ANALYSIS FLOW:
142
+
143
+ STEP 2.1 — Authentication mechanism
144
+ □ How are credentials verified?
145
+ □ Password hashing: bcrypt/argon2 or MD5/SHA1?
146
+ □ Salt used?
147
+ □ Timing attacks possible in comparison?
148
+
149
+ STEP 2.2 — Sessions and Tokens
150
+ □ JWT: algorithm configured? (reject "none")
151
+ □ JWT: expiration configured? (15min access, 7d refresh)
152
+ □ JWT: signature verified with verify() not decode()?
153
+ □ JWT: secret long and random enough?
154
+ □ Sessions: cryptographically random ID?
155
+ □ Sessions: invalidation on logout?
156
+ □ Sessions: regeneration after login?
157
+ □ Refresh tokens: rotation implemented?
158
+ □ Refresh tokens: revocation possible?
159
+
160
+ STEP 2.3 — Password reset process
161
+ □ Reset token: random and unique?
162
+ □ Reset token: short expiration? (15-30min max)
163
+ □ Reset token: single-use?
164
+ □ User enumeration possible via message?
165
+ □ Reset link: HTTPS only?
166
+
167
+ STEP 2.4 — Brute force protection
168
+ □ Rate limiting on login?
169
+ □ Lockout after N attempts?
170
+ □ CAPTCHA present if necessary?
171
+ □ Alerts on suspicious attempts?
172
+
173
+ STEP 2.5 — MFA
174
+ □ MFA available?
175
+ □ MFA bypassable? (poorly secured recovery codes?)
176
+ □ TOTP properly implemented?
177
+ □ Backup codes stored securely?
178
+
179
+ PHASE 3 — AUTHORIZATION AUDIT
180
+ ══════════════════════════════
181
+
182
+ ANALYSIS FLOW:
183
+
184
+ STEP 3.1 — Authorization model
185
+ □ RBAC implemented?
186
+ □ Authorization check server-side on EVERY endpoint?
187
+ □ Auth middleware applied globally or per route?
188
+ □ Public routes explicitly defined or by default?
189
+
190
+ STEP 3.2 — IDOR/BOLA (Object Level Authorization)
191
+ □ Each object access checks ownership?
192
+ EXAMPLE: GET /api/orders/:id → verify the order
193
+ belongs to the logged-in user
194
+ □ Are IDs predictable? (1, 2, 3...)
195
+ □ UUIDs used instead of sequential IDs?
196
+ □ Indirect access verified? (A accesses B which contains C)
197
+
198
+ STEP 3.3 — BFLA (Function Level Authorization)
199
+ □ Admin routes protected by role check?
200
+ □ Admin actions verified and not just hidden?
201
+ □ Privilege elevation possible via parameter?
202
+ EXAMPLE: POST /user/update with { "role": "admin" }
203
+
204
+ STEP 3.4 — Mass Assignment
205
+ □ Whitelist of accepted fields defined?
206
+ □ Sensitive fields excluded from mass updates?
207
+ (role, is_admin, verified, balance...)
208
+
209
+ PHASE 4 — INJECTION AUDIT
210
+ ══════════════════════════
211
+
212
+ FOR EACH ENTRY POINT IDENTIFIED IN PHASE 0:
213
+
214
+ □ SQL Injection
215
+ → Parameterized queries used?
216
+ → ORM used? If yes, raw queries avoided?
217
+ → Input passed directly into a query?
218
+
219
+ □ NoSQL Injection
220
+ → MongoDB: $where, $regex operators with user input?
221
+ → Redis: commands built with user input?
222
+
223
+ □ Command Injection
224
+ → exec(), system(), shell_exec() with user input?
225
+ → Shell libraries with unsanitized parameters?
226
+
227
+ □ SSTI (Server-Side Template Injection)
228
+ → User input inserted into templates?
229
+ → Engines: Twig, Jinja2, Blade, Handlebars, EJS?
230
+
231
+ □ Path Traversal
232
+ → File paths built with user input?
233
+ → Upload: filename validated?
234
+ → File read: path confined to allowed directory?
235
+
236
+ □ XSS (Cross-Site Scripting)
237
+ → Output encoded/escaped before display?
238
+ → dangerouslySetInnerHTML without sanitization?
239
+ → Direct innerHTML?
240
+ → CSP configured?
241
+ → Correct Content-Type headers?
242
+
243
+ □ XXE (XML External Entities)
244
+ → XML parsing: external entities disabled?
245
+ → XML/SVG upload accepted?
246
+
247
+ □ GraphQL
248
+ → Introspection disabled in production?
249
+ → Query depth limited?
250
+ → Query complexity limited?
251
+ → Rate limiting on queries?
252
+
253
+ PHASE 5 — CRYPTOGRAPHY AND DATA AUDIT
254
+ ══════════════════════════════════════════
255
+
256
+ □ Sensitive data encrypted in database?
257
+ □ Encryption keys stored separately from data?
258
+ □ Modern algorithms used?
259
+ (AES-256-GCM, ChaCha20-Poly1305, not DES/RC4)
260
+ □ Passwords hashed with bcrypt/argon2/scrypt?
261
+ □ Data in transit: HTTPS only?
262
+ □ Recent TLS version? (1.2 minimum, 1.3 recommended)
263
+ □ Certificates valid and up to date?
264
+ □ HSTS configured?
265
+ □ Sensitive data in URLs? (logs expose them)
266
+ □ Sensitive data in logs?
267
+ □ PII: minimal collection?
268
+ □ PII: limited retention?
269
+
270
+ PHASE 6 — DEPENDENCIES AUDIT
271
+ ═════════════════════════════
272
+
273
+ □ npm audit / yarn audit: critical/high CVEs?
274
+ □ composer audit: same
275
+ □ Framework versions: known CVEs?
276
+ □ Abandoned or unmaintained packages?
277
+ □ Lock files committed? (avoids dependency confusion)
278
+ □ Post-install scripts in dependencies?
279
+ □ Dependencies directly from GitHub?
280
+ (risk of commit modification)
281
+ □ Packages with names similar to known packages?
282
+ (typosquatting)
283
+
284
+ PHASE 7 — INFRASTRUCTURE AND HEADERS AUDIT
285
+ ═══════════════════════════════════════════
286
+
287
+ MANDATORY SECURITY HEADERS:
288
+ □ Content-Security-Policy (CSP)
289
+ □ Strict-Transport-Security (HSTS)
290
+ □ X-Frame-Options or CSP frame-ancestors
291
+ □ X-Content-Type-Options: nosniff
292
+ □ Referrer-Policy
293
+ □ Permissions-Policy
294
+ □ Cache-Control on sensitive data
295
+
296
+ HEADERS TO REMOVE:
297
+ □ X-Powered-By (reveals the framework)
298
+ □ Server (reveals the web server)
299
+ □ X-AspNet-Version
300
+
301
+ CONFIGURATION:
302
+ □ CORS: origins explicitly whitelisted?
303
+ □ CORS: credentials: true with * forbidden?
304
+ □ Rate limiting: global + per sensitive endpoint?
305
+ □ File upload: MIME type verified server-side?
306
+ □ File upload: size limited?
307
+ □ File upload: stored outside webroot?
308
+ □ Pagination: server-side limits enforced?