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,352 @@
1
+ # 📱 MOBILE AUDIT PHILOSOPHY — CYBERAUDIT SKILL
2
+ # The mindset of a mobile security expert
3
+
4
+ ═══════════════════════════════════════════════════════════════
5
+ THE MOBILE MENTAL DNA
6
+ ═══════════════════════════════════════════════════════════════
7
+
8
+ Mobile is not a small web in a box.
9
+ It is a radically different environment with:
10
+
11
+ → A physical device that may be compromised
12
+ → A systematically hostile network
13
+ → A distributable binary analysable by anyone
14
+ → A massive local attack surface (storage, IPC, sensors)
15
+ → Users who will never read the permissions
16
+
17
+ When you audit a mobile app, you must think like
18
+ someone who physically has the device in their hands.
19
+
20
+ ═══════════════════════════════════════════════════════════════
21
+ THE MOBILE MENTAL MODEL
22
+ ═══════════════════════════════════════════════════════════════
23
+
24
+ IMAGINE THESE SCENARIOS:
25
+
26
+ SCENARIO 1 — THE STOLEN DEVICE
27
+ The user's phone is stolen.
28
+ The attacker has full physical access.
29
+ → Stored data in cleartext is read
30
+ → Unencrypted tokens are extracted
31
+ → Unencrypted backups are exploited
32
+ Question: What can the attacker see?
33
+
34
+ SCENARIO 2 — THE ROOTED/JAILBROKEN DEVICE
35
+ The user themselves has rooted their device.
36
+ They can read the complete filesystem.
37
+ → AsyncStorage/SharedPreferences readable
38
+ → Memory dumped
39
+ → Frida hooks possible
40
+ Question: Do your protections survive?
41
+
42
+ SCENARIO 3 — THE CAFÉ NETWORK
43
+ The user is on public WiFi.
44
+ An attacker performs MitM with mitmproxy.
45
+ → Without certificate pinning: readable traffic
46
+ → Intercepted tokens = stolen session
47
+ → Personal data exposed
48
+ Question: Is network communication secure?
49
+
50
+ SCENARIO 4 — THE DECOMPILED APK
51
+ The attacker downloads the APK from the Play Store.
52
+ They decompile it with jadx/apktool.
53
+ → Hardcoded API keys found
54
+ → Internal endpoints mapped
55
+ → Client-side validation logic exposed
56
+ Question: What does the binary reveal?
57
+
58
+ SCENARIO 5 — THE MALICIOUS DEEP LINK
59
+ The user clicks a link in an SMS or email.
60
+ This link opens the app via deep link.
61
+ → Malicious parameters injected
62
+ → Redirection to an unwanted action
63
+ → Data exfiltration via the app
64
+ Question: Are deep links validated?
65
+
66
+ ═══════════════════════════════════════════════════════════════
67
+ THE 8 MOBILE COMMANDMENTS
68
+ ═══════════════════════════════════════════════════════════════
69
+
70
+ COMMANDMENT 1 — THOU SHALT STORE NOTHING IN CLEARTEXT
71
+ Keychain (iOS) and Keystore (Android) exist for this.
72
+ AsyncStorage, SharedPreferences, NSUserDefaults = NEVER for sensitive data.
73
+ Encrypt local databases (SQLCipher, encrypted Hive).
74
+
75
+ COMMANDMENT 2 — THOU SHALT PIN CERTIFICATES
76
+ The network is hostile. Always.
77
+ Certificate pinning = shield against MitM.
78
+ Always have a backup pin.
79
+ Have a rotation procedure before expiration.
80
+
81
+ COMMANDMENT 3 — THY BINARY SHALL BE EMPTY OF SECRETS
82
+ Any secret in the binary is a public secret.
83
+ Endpoints, API keys, tokens, credentials = outside the binary.
84
+ Use secure configuration backends.
85
+
86
+ COMMANDMENT 4 — THOU SHALT ASK THE MINIMUM OF PERMISSIONS
87
+ Every permission is an attack surface.
88
+ Every unnecessary permission = unnecessary risk.
89
+ Ask at time of need, not at startup.
90
+
91
+ COMMANDMENT 5 — THOU SHALT VALIDATE ALL DEEP LINKS
92
+ An unvalidated deep link = a mobile injection.
93
+ Check the scheme, path, and parameters.
94
+ Check authentication state before action.
95
+
96
+ COMMANDMENT 6 — THOU SHALT EXPOSE NOTHING IN LOGS
97
+ console.log() in production = data leak.
98
+ Logs are readable on a rooted device.
99
+ Totally disable sensitive logs in prod.
100
+
101
+ COMMANDMENT 7 — THOU SHALT ENCRYPT THE LOCAL DATABASE
102
+ An unencrypted SQLite DB = directly readable file.
103
+ SQLCipher for React Native.
104
+ encrypted for Flutter Hive.
105
+ Core Data with encryption for native iOS.
106
+
107
+ COMMANDMENT 8 — THOU SHALT RESIST REVERSE ENGINEERING
108
+ Code obfuscation (ProGuard, r8 for Android).
109
+ Anti-debug (detect Frida, LLDB attached).
110
+ Integrity checks (detect binary modification).
111
+ Root/Jailbreak detection as an additional layer.
112
+
113
+ ═══════════════════════════════════════════════════════════════
114
+ THE MOBILE AUDIT FLOW
115
+ ═══════════════════════════════════════════════════════════════
116
+
117
+ PHASE 0 — MOBILE RECONNAISSANCE
118
+ ════════════════════════════════
119
+
120
+ □ Framework: React Native / Flutter / Ionic / Expo ?
121
+ □ Target SDK versions (iOS min, Android min) ?
122
+ □ Permissions declared in AndroidManifest.xml ?
123
+ □ Permissions declared in Info.plist ?
124
+ □ Exported Android components ?
125
+ (Activities, Services, Receivers, Providers)
126
+ □ Declared URL Schemes (iOS) ?
127
+ □ App Links / Deep Links configured (Android) ?
128
+ □ Network Security Config present (Android) ?
129
+ □ App Transport Security config (iOS) ?
130
+ □ Native libraries used ?
131
+
132
+ PHASE 1 — LOCAL STORAGE AUDIT
133
+ ════════════════════════════════
134
+
135
+ MAXIMUM PRIORITY — Data at rest
136
+
137
+ □ AsyncStorage / SharedPreferences used ?
138
+ → Search for: tokens, passwords, PII
139
+ → Search for: financial data, health data
140
+ → If yes: HIGH minimum
141
+
142
+ □ Keychain (iOS) / Keystore (Android) used for secrets ?
143
+ → Verify configured access controls
144
+ → Verify accessibility options
145
+
146
+ □ SQLite / Local database ?
147
+ → Encrypted with SQLCipher ?
148
+ → Where is the encryption key stored ?
149
+
150
+ □ Sensitive local files ?
151
+ → PDFs, images, documents with PII data
152
+ → Stored in public or private directory ?
153
+ → Included in backups ?
154
+
155
+ □ HTTP cache ?
156
+ → Sensitive data cached ?
157
+ → NSURLCache / OkHttp unsecured cache ?
158
+
159
+ □ Keyboard cache ?
160
+ → Sensitive fields (password, CC) with autocorrect disabled ?
161
+ → textContentType configured correctly ?
162
+
163
+ □ Background screenshots ?
164
+ → App hidden when moved to background ?
165
+ → FLAG_SECURE (Android) / ignoresSiblingOrder (iOS) ?
166
+
167
+ PHASE 2 — MOBILE NETWORK AUDIT
168
+ ═══════════════════════════════
169
+
170
+ □ HTTPS used exclusively ?
171
+ → Search for http:// in hardcoded URLs
172
+ → Network Security Config: cleartext disabled ?
173
+ → App Transport Security: no exceptions ?
174
+
175
+ □ Certificate Pinning implemented ?
176
+ → On critical endpoints (auth, payment, personal data)
177
+ → Backup pin present ?
178
+ → Pin expiration date configured ?
179
+ → Update procedure documented ?
180
+
181
+ □ Auth tokens in headers (Authorization: Bearer) ?
182
+ → Not in query parameters (exposed in logs)
183
+ → Not in GET body (non-standard)
184
+
185
+ □ Timeout configured ?
186
+ → Network requests without timeout = DoS by resources
187
+
188
+ □ Retry logic with exponential backoff ?
189
+ → Avoid accidental DDoS on your own servers
190
+
191
+ PHASE 3 — BINARY AUDIT
192
+ ═════════════════════════
193
+
194
+ □ Hardcoded secrets ?
195
+ → API keys, tokens, passwords
196
+ → Internal environment URLs (staging, dev)
197
+ → Encryption keys
198
+ → Embedded certificates
199
+
200
+ □ Obfuscated code ?
201
+ → Android: ProGuard/R8 enabled in release ?
202
+ → React Native: Hermes + JS obfuscation ?
203
+ → Flutter: native compiled code (good) but Dart strings ?
204
+
205
+ □ Debug mode detectable ?
206
+ → BuildConfig.DEBUG (Android)
207
+ → #if DEBUG (iOS)
208
+ → __DEV__ (React Native)
209
+ → Disabled in release build ?
210
+
211
+ □ Stack traces in production ?
212
+ → Crash reporters configured not to send local data ?
213
+ → Sentry/Firebase Crashlytics: sensitive data filtered ?
214
+
215
+ □ Development logs in production ?
216
+ → console.log(), print(), NSLog() in release ?
217
+ → Log level filtering configured ?
218
+
219
+ PHASE 4 — IPC AND DEEP LINK AUDIT
220
+ ═══════════════════════════════════
221
+
222
+ ANDROID:
223
+ □ Activities exported without protection ?
224
+ → android:exported="true" without required permission ?
225
+ → Intent filters exposing sensitive functionality ?
226
+
227
+ □ Broadcast Receivers exported ?
228
+ → Receiving unauthenticated broadcasts ?
229
+ → Sensitive data in broadcasts ?
230
+
231
+ □ Content Providers exported ?
232
+ → Data access without permission check ?
233
+ → SQL injection in Content Providers ?
234
+
235
+ □ Deep Links / App Links validated ?
236
+ → Parameters sanitised ?
237
+ → Auth checked before action ?
238
+ → Redirection to external URLs possible ?
239
+
240
+ iOS:
241
+ □ URL Schemes validated ?
242
+ → Parameters sanitised ?
243
+ → Sensitive actions protected ?
244
+
245
+ □ Universal Links configured ?
246
+ → AASA (apple-app-site-association) correctly configured ?
247
+ → Preferred over URL Schemes for security ?
248
+
249
+ ALL FRAMEWORKS:
250
+ □ WebView used ?
251
+ → JavaScript Bridge exposed ?
252
+ → Allowed URLs whitelisted ?
253
+ → JavaScript from untrusted sources executed ?
254
+ → shouldOverrideUrlLoading implemented ?
255
+
256
+ PHASE 5 — MOBILE AUTHENTICATION AUDIT
257
+ ═════════════════════════════════════════
258
+
259
+ □ Tokens stored securely ?
260
+ → Keychain/Keystore, not AsyncStorage/SharedPreferences
261
+
262
+ □ Token expiration managed ?
263
+ → Short access token (15min)
264
+ → Refresh token with rotation
265
+ → Server-side invalidation possible ?
266
+
267
+ □ Biometrics implemented correctly ?
268
+ → Not just a UI check (bypassable)
269
+ → Cryptographic key linked to biometrics
270
+ → invalidatedByBiometricEnrollment = true
271
+
272
+ □ Jailbreak/root behavior ?
273
+ → App refusing to work? (too strict)
274
+ → App warning the user? (reasonable)
275
+ → Sensitive data deleted? (recommended)
276
+
277
+ □ Inactive session timeout ?
278
+ → After X minutes of inactivity → re-auth required
279
+
280
+ □ Client certificate (mTLS) for highly sensitive apps ?
281
+
282
+ PHASE 6 — PERMISSIONS AUDIT
283
+ ═════════════════════════════
284
+
285
+ FOR EACH DECLARED PERMISSION:
286
+ □ Is the permission actually used ?
287
+ □ Is the permission necessary for the feature ?
288
+ □ Is there a less invasive alternative ?
289
+ □ Requested at time of need (not at startup) ?
290
+ □ Can the user refuse without the app crashing ?
291
+
292
+ SENSITIVE PERMISSIONS TO INSPECT:
293
+ □ Camera → Justified? Used only when necessary ?
294
+ □ Microphone → Justified? Visible usage indicator ?
295
+ □ Location → Fine or Coarse? Background justified ?
296
+ □ Contacts → Really necessary? Upload to server ?
297
+ □ Storage → Full access or dedicated folder ?
298
+ □ Phone/SMS → Justified? (often unnecessary)
299
+ □ Biometrics → Secure implementation ?
300
+
301
+ ═══════════════════════════════════════════════════════════════
302
+ OWASP MASVS 2.0 — COMPLETE MAPPING
303
+ ═══════════════════════════════════════════════════════════════
304
+
305
+ MASVS-STORAGE
306
+ MASVS-STORAGE-1 : No sensitive data in insecure storage
307
+ MASVS-STORAGE-2 : No sensitive data in logs
308
+ MASVS-STORAGE-3 : No sensitive data in unencrypted backups
309
+ MASVS-STORAGE-4 : No sensitive data in UI cache
310
+ MASVS-STORAGE-5 : Keyboard cache disabled on sensitive fields
311
+ MASVS-STORAGE-6 : Clipboard not exposed on sensitive data
312
+ MASVS-STORAGE-7 : Sensitive data removed when no longer needed
313
+ MASVS-STORAGE-8 : Local DB encrypted if sensitive data
314
+
315
+ MASVS-CRYPTO
316
+ MASVS-CRYPTO-1 : Modern cryptographic algorithms only
317
+ MASVS-CRYPTO-2 : Standard implementations (no custom)
318
+ MASVS-CRYPTO-3 : Secure random generation
319
+ MASVS-CRYPTO-4 : Secure cryptographic key management
320
+ MASVS-CRYPTO-5 : No hardcoded secrets
321
+
322
+ MASVS-AUTH
323
+ MASVS-AUTH-1 : Server-side auth, not client
324
+ MASVS-AUTH-2 : Secure session management
325
+ MASVS-AUTH-3 : Biometrics correctly implemented
326
+ MASVS-AUTH-4 : Strong password policy
327
+
328
+ MASVS-NETWORK
329
+ MASVS-NETWORK-1 : HTTPS exclusively
330
+ MASVS-NETWORK-2 : Strict certificate verification
331
+ MASVS-NETWORK-3 : Up-to-date network libraries
332
+
333
+ MASVS-PLATFORM
334
+ MASVS-PLATFORM-1 : Correct use of platform APIs
335
+ MASVS-PLATFORM-2 : Validated and secured deep links
336
+ MASVS-PLATFORM-3 : Secure IPC
337
+ MASVS-PLATFORM-4 : Secured WebViews
338
+ MASVS-PLATFORM-5 : Components not unnecessarily exported (Android)
339
+ MASVS-PLATFORM-6 : JavaScript disabled in WebViews if unnecessary
340
+ MASVS-PLATFORM-7 : Minimal permissions
341
+
342
+ MASVS-CODE
343
+ MASVS-CODE-1 : Security tests in CI/CD pipeline
344
+ MASVS-CODE-2 : All third-party components up to date
345
+ MASVS-CODE-3 : App detects binary manipulation
346
+ MASVS-CODE-4 : App implements obfuscation if necessary
347
+
348
+ MASVS-RESILIENCE
349
+ MASVS-RESILIENCE-1 : Root/Jailbreak detection
350
+ MASVS-RESILIENCE-2 : Anti-tampering
351
+ MASVS-RESILIENCE-3 : Anti-debugging
352
+ MASVS-RESILIENCE-4 : Anti-reverse-engineering