nightowl-security 8.0.0__tar.gz

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 (58) hide show
  1. nightowl_security-8.0.0/LICENSE +21 -0
  2. nightowl_security-8.0.0/PKG-INFO +374 -0
  3. nightowl_security-8.0.0/README.md +341 -0
  4. nightowl_security-8.0.0/nightowl_pkg/__init__.py +14 -0
  5. nightowl_security-8.0.0/nightowl_pkg/authmap.py +275 -0
  6. nightowl_security-8.0.0/nightowl_pkg/billing.py +359 -0
  7. nightowl_security-8.0.0/nightowl_pkg/cli.py +692 -0
  8. nightowl_security-8.0.0/nightowl_pkg/core.py +94 -0
  9. nightowl_security-8.0.0/nightowl_pkg/deepscan.py +223 -0
  10. nightowl_security-8.0.0/nightowl_pkg/diff.py +175 -0
  11. nightowl_security-8.0.0/nightowl_pkg/dragonjar.py +491 -0
  12. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/auto-audit-static.sh +919 -0
  13. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/bypass-profiles.json +186 -0
  14. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/calculate-score.py +344 -0
  15. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/cordova-analysis.sh +803 -0
  16. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/detector-catalog.json +241 -0
  17. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/findings-schema.json +27 -0
  18. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/flutter-analysis.sh +778 -0
  19. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/frida-exploit-helper.py +943 -0
  20. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/masvs-mapping.json +183 -0
  21. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/masvs-matrix.json +186 -0
  22. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/merge-findings.py +232 -0
  23. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/preflight-check.py +958 -0
  24. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/preflight-check.sh +376 -0
  25. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/rasp-bypass-runner.sh +192 -0
  26. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/react-native-analysis.sh +611 -0
  27. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/runtime-defense-analyzer.sh +359 -0
  28. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/semgrep-rules/MASTG-rules.yaml +1261 -0
  29. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/semgrep-scan.py +256 -0
  30. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/unity-analysis.sh +799 -0
  31. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/update-coverage.py +213 -0
  32. nightowl_security-8.0.0/nightowl_pkg/dragonjar_data/update-rules.sh +166 -0
  33. nightowl_security-8.0.0/nightowl_pkg/engine.py +3358 -0
  34. nightowl_security-8.0.0/nightowl_pkg/frameworks.py +286 -0
  35. nightowl_security-8.0.0/nightowl_pkg/hardening.py +185 -0
  36. nightowl_security-8.0.0/nightowl_pkg/lab.py +373 -0
  37. nightowl_security-8.0.0/nightowl_pkg/mcp_server.py +321 -0
  38. nightowl_security-8.0.0/nightowl_pkg/nwproc.py +39 -0
  39. nightowl_security-8.0.0/nightowl_pkg/preflight.py +279 -0
  40. nightowl_security-8.0.0/nightowl_pkg/privacy.py +165 -0
  41. nightowl_security-8.0.0/nightowl_pkg/proxy.py +333 -0
  42. nightowl_security-8.0.0/nightowl_pkg/report.py +678 -0
  43. nightowl_security-8.0.0/nightowl_pkg/runtime.py +405 -0
  44. nightowl_security-8.0.0/nightowl_pkg/sca.py +231 -0
  45. nightowl_security-8.0.0/nightowl_pkg/validators.py +470 -0
  46. nightowl_security-8.0.0/nightowl_pkg/wizard.py +321 -0
  47. nightowl_security-8.0.0/nightowl_security.egg-info/PKG-INFO +374 -0
  48. nightowl_security-8.0.0/nightowl_security.egg-info/SOURCES.txt +56 -0
  49. nightowl_security-8.0.0/nightowl_security.egg-info/dependency_links.txt +1 -0
  50. nightowl_security-8.0.0/nightowl_security.egg-info/entry_points.txt +2 -0
  51. nightowl_security-8.0.0/nightowl_security.egg-info/requires.txt +14 -0
  52. nightowl_security-8.0.0/nightowl_security.egg-info/top_level.txt +1 -0
  53. nightowl_security-8.0.0/pyproject.toml +80 -0
  54. nightowl_security-8.0.0/setup.cfg +4 -0
  55. nightowl_security-8.0.0/tests/test_nightowl.py +471 -0
  56. nightowl_security-8.0.0/tests/test_security_invariants.py +159 -0
  57. nightowl_security-8.0.0/tests/test_v7_modules.py +310 -0
  58. nightowl_security-8.0.0/tests/test_v8_modules.py +231 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Moaaz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,374 @@
1
+ Metadata-Version: 2.4
2
+ Name: nightowl-security
3
+ Version: 8.0.0
4
+ Summary: NightOwl - Unified Android Security Analysis Platform: validated secrets, auth mapping, subscription enforcement, packer fingerprinting, privacy audit, SCA/SBOM, dynamic lab, MCP agent bridge
5
+ Author: moaaz01
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/moaaz01/nightowl
8
+ Project-URL: Repository, https://github.com/moaaz01/nightowl
9
+ Project-URL: Issues, https://github.com/moaaz01/nightowl/issues
10
+ Keywords: android,apk,security,pentesting,frida,mobsec,masvs,mastg,secrets-detection,sbom,mcp
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Information Technology
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Security
18
+ Requires-Python: >=3.12
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: rich>=13.0
22
+ Requires-Dist: loguru>=0.7
23
+ Requires-Dist: PyYAML>=6.0
24
+ Provides-Extra: full
25
+ Requires-Dist: androguard>=3.4; extra == "full"
26
+ Requires-Dist: requests>=2.28; extra == "full"
27
+ Provides-Extra: agent
28
+ Requires-Dist: mcp>=1.0; extra == "agent"
29
+ Provides-Extra: dev
30
+ Requires-Dist: pytest>=8.0; extra == "dev"
31
+ Requires-Dist: ruff>=0.4; extra == "dev"
32
+ Dynamic: license-file
33
+
34
+ <div align="center">
35
+
36
+ ```
37
+ ,_ _,
38
+ | \.___./" |
39
+ '. o o .' N I G H T O W L v8
40
+ '--.-.--' Ultimate Android Security Platform
41
+ .--' '-.
42
+ / \
43
+ | |
44
+ ```
45
+
46
+ # 🦉 NightOwl
47
+
48
+ ### Unified Android Security Analysis Platform
49
+
50
+ **Validated Secrets · Auth Mapping · Subscription Enforcement · Packers ·
51
+ Privacy · SCA/SBOM · Dynamic Lab · Report Diffing · MCP Agent Bridge**
52
+
53
+ [![Python](https://img.shields.io/badge/python-3.12%2B-green)](https://python.org)
54
+ [![License: MIT](https://img.shields.io/badge/license-MIT-yellow)](LICENSE)
55
+ [![Tests](https://img.shields.io/badge/tests-103%20passing-brightgreen)](#testing)
56
+ [![MCP](https://img.shields.io/badge/MCP-compatible-blue)](#ai-agent-integration)
57
+ [![OWASP](https://img.shields.io/badge/MASVS%2FMASTG-aligned-orange)](#masvs-alignment)
58
+
59
+ *For authorized security testing and research only.*
60
+
61
+ </div>
62
+
63
+ ---
64
+
65
+ NightOwl is a single-command Android security analysis platform for penetration
66
+ testers, security researchers, and AI agents. It fuses deep static analysis, a
67
+ false-positive elimination engine, authentication-flow mapping,
68
+ subscription-enforcement assessment, packer fingerprinting, supply-chain
69
+ scanning, a dynamic-analysis lab, and an interactive reporting engine into one
70
+ dependency-light CLI.
71
+
72
+ ## Why NightOwl
73
+
74
+ Most scanners stop at pattern matching: any string that *looks* like an API key
75
+ becomes a CRITICAL alarm, drowning real findings in noise. NightOwl treats every
76
+ regex hit as a **candidate** that must survive structural validation, entropy
77
+ floors, context analysis, and a public-documentation denylist before it is
78
+ reported. Every finding carries a **confidence score**, a **verdict**, and
79
+ **human-readable reasons** — so you act on results instead of triaging them.
80
+
81
+ | Verdict | Confidence | Meaning |
82
+ |---|---|---|
83
+ | `CONFIRMED` | ≥ 75 | Structure valid + positive context. Report as real. |
84
+ | `LIKELY` | 55–74 | Plausible. Report with caveat. |
85
+ | `SUSPECTED` | 35–54 | Weak evidence. Downgraded automatically. |
86
+ | `FILTERED` | < 35 | Docs example / placeholder / public-by-design. Hidden but auditable. |
87
+
88
+ Rejected candidates are never silently dropped — they are preserved in a
89
+ `secrets_filtered` audit trail with rejection reasons.
90
+
91
+ ## Capabilities
92
+
93
+ | Module | Command | What it does |
94
+ |---|---|---|
95
+ | Core analysis | `full`, `quick` | Package info, permission risk, URLs/endpoints, certificates, manifest components, architecture, score & grade (A–F) |
96
+ | Secrets validation | `secrets` | 55+ provider patterns → validated findings with confidence, verdicts and audit trail (`--strict`, `--min-confidence`, `--show-filtered`) |
97
+ | Authentication map | `authmap` | Login/register/token/MFA endpoints with HTTP methods & credential params, token storage lifecycle, transport weaknesses (cleartext login, token-in-URL, missing pinning) |
98
+ | Subscription enforcement | `billing` | Play Billing / RevenueCat / Adapty / Superwall detection, local entitlement flags, missing receipt validation → enforcement model (`local-only` / `server-backed` / `sdk-managed`) + Frida verification script generation |
99
+ | Deep static layers | `deepscan` | Exported attack surface, deep-link hijacks, WebView hardening, crypto misuse (ECB, static IVs), intent redirection — MASVS-mapped with CVSS vectors |
100
+ | Hardening fingerprint | `hardening` | APKiD-style packer/protector/obfuscator detection (360 Jiagu, Bangcle, Ijiami, DexGuard, DashO…), anti-analysis families, Janus v1-only signing (CVE-2017-13156) |
101
+ | Privacy audit | `privacy` | Exodus-style tracker catalog (~50 SDKs) + data-collection permission map grouped by data category |
102
+ | Supply chain | `sca` | Version-aware vulnerable-library scan with advisories (CVE-2021-0341, CVE-2023-4863…) + CycloneDX 1.5 SBOM generation |
103
+ | Decompilation | `decompile` | jadx + apktool pipeline with workspace caching |
104
+ | Frameworks | `flutter`, `react-native`, `cordova`, `unity` | Framework-specific analysis paths |
105
+ | RASP & bypass | `rasp`, `bypass` | Runtime-defense detection (RootBeer, Frida checks, SafetyNet, Talsec…) and per-profile Frida bypass script generation |
106
+ | Traffic capture | `proxy`, `capture` | Device proxy setup for Burp/mitmproxy/Charles/any target, CA-install helper, APK network-config patcher, mitmproxy addon streaming JSONL flows |
107
+ | Dynamic lab | `lab` | adb/frida/objection workflow: device inventory, install/launch, NDJSON logcat, dumpsys, private-storage listing, backup capture, SSL-unpinning, screenshots, cleanup |
108
+ | Regression diffing | `diff` | Compare two saved scans: score delta, IMPROVED/REGRESSED verdict, added/resolved secrets & weaknesses per layer |
109
+ | Reporting | `--save`, `report` | Interactive single-file HTML + Markdown + JSON (see [Reports](#reports)) |
110
+
111
+ ## Installation
112
+
113
+ **From source:**
114
+ ```bash
115
+ git clone https://github.com/moaaz01/nightowl.git
116
+ cd nightowl
117
+ python3 -m venv .venv && source .venv/bin/activate
118
+ pip install -e ".[full]"
119
+ nightowl preflight # verify environment
120
+ ```
121
+
122
+ **Or install as a CLI tool (pipx/pip):**
123
+ ```bash
124
+ pipx install nightowl-security # then just: nightowl <command>
125
+ export NIGHTOWL_HOME=~/.nightowl # where reports/artifacts go
126
+ ```
127
+
128
+ **Or Docker (jadx/apktool baked in):**
129
+ ```bash
130
+ docker build -t nightowl .
131
+ docker run --rm -v "$PWD:/data" nightowl full /data/app.apk --json
132
+ ```
133
+
134
+ Deep documentation: [architecture](docs/architecture.md) ·
135
+ [JSON contract](docs/json-contract.md) ·
136
+ [MCP server](docs/mcp.md)
137
+
138
+ **Requirements:** Python 3.12+. Optional but recommended:
139
+ [jadx](https://github.com/skylot/jadx),
140
+ [apktool](https://ibotpeaches.github.io/Apktool/),
141
+ [semgrep](https://semgrep.dev),
142
+ [adb](https://developer.android.com/tools/adb),
143
+ [Frida](https://frida.re) for dynamic work.
144
+ Heavy Python deps (androguard, rich) are optional — core string-based scans run
145
+ on a bare interpreter.
146
+
147
+ **Hostile-input mode:** scanning untrusted samples? Use `--static-only`
148
+ (or `NIGHTOWL_STATIC_ONLY=1`) to disable every command that executes external
149
+ parsers or touches devices. See [SECURITY.md](SECURITY.md).
150
+
151
+ ## Quick Start
152
+
153
+ ```bash
154
+ ./nightowl # interactive wizard
155
+ ./nightowl start app.apk --save # one-shot pipeline: progress +
156
+ # executive summary card + reports
157
+ ./nightowl full app.apk --json # everything, machine-readable
158
+ ```
159
+
160
+ ## Command Reference
161
+
162
+ ### Analysis
163
+
164
+ ```bash
165
+ ./nightowl start <apk> [--save] # guided pipeline + executive summary card
166
+ ./nightowl full <apk> # all layers, merged JSON
167
+ ./nightowl quick <apk> # fast scan
168
+ ./nightowl info|perms|urls|vulns|manifest <apk>
169
+ ./nightowl secrets <apk> --strict [--show-filtered]
170
+ ./nightowl authmap <apk>
171
+ ./nightowl billing <apk>
172
+ ./nightowl deepscan <apk>
173
+ ./nightowl hardening <apk>
174
+ ./nightowl privacy <apk>
175
+ ./nightowl sca <apk> [--save-sbom sbom.json]
176
+ ./nightowl endpoints <apk> # API access points only
177
+ ./nightowl decompile <apk> # jadx + apktool -> workspace/decompiled/
178
+ ./nightowl scan ./targets/ # batch directory
179
+ ```
180
+
181
+ ### Subscription enforcement testing *(authorized targets only)*
182
+
183
+ ```bash
184
+ ./nightowl billing app.apk # enforcement model + weaknesses
185
+ ./nightowl bypass-premium app.apk # -> workspace/bypass/<pkg>-premium-verify.js
186
+ frida -U -f <package> -l workspace/bypass/<pkg>-premium-verify.js --no-pause
187
+ ```
188
+
189
+ ### Network interception
190
+
191
+ ```bash
192
+ ./nightowl proxy setup --burp|--mitm|--charles|--target HOST:PORT [--serial S]
193
+ ./nightowl proxy ca proxyca.pem # exact CA install commands (user/system store)
194
+ ./nightowl proxy netconfig app.apk # user-CA trust config + apktool patch steps
195
+ ./nightowl capture # write mitmproxy addon -> JSONL flow capture
196
+ mitmdump -s workspace/capture/nightowl_capture_addon.py -p 8080
197
+ NIGHTOWL_CAPTURE_HOSTS=api.target.com mitmdump -s ... # scope to target hosts
198
+ ./nightowl proxy clear && ./nightowl lab clean # cleanup when done
199
+ ```
200
+
201
+ ### Dynamic lab *(your own rooted device/emulator)*
202
+
203
+ ```bash
204
+ ./nightowl lab devices # inventory: root + frida status
205
+ ./nightowl lab install app.apk -r
206
+ ./nightowl lab launch <pkg> # / stop <pkg>
207
+ ./nightowl lab logcat --pkg <pkg> --json # NDJSON stream for agents
208
+ ./nightowl lab dumpsys <pkg> # package/activity view
209
+ ./nightowl lab prefs <pkg> [--pull DIR] # private storage listing
210
+ ./nightowl lab backup <pkg> # adb backup capture (.ab)
211
+ ./nightowl lab frida # push/start frida-server
212
+ ./nightowl lab objection <pkg> # ready-made REPL commands
213
+ ./nightowl lab ssl <pkg> # unpinning one-liners
214
+ ./nightowl lab screenshot out.png
215
+ ```
216
+
217
+ ### Reports & regression tracking
218
+
219
+ ```bash
220
+ ./nightowl full app.apk --save # JSON + MD + interactive HTML
221
+ ./nightowl report saved-scan.json # re-render old JSON in new format
222
+ ./nightowl diff old.json new.json [--json] # IMPROVED / REGRESSED / MIXED
223
+ ```
224
+
225
+ ### DragonJAR modules
226
+
227
+ ```bash
228
+ ./nightowl static-audit app.apk [--reuse-jadx DIR]
229
+ ./nightowl semgrep app.apk # OWASP MASTG compliance rules
230
+ ./nightowl rasp app.apk [package] # runtime defense detection
231
+ ./nightowl bypass <package> [detector_ids] [--output DIR]
232
+ ./nightowl cvss findings.json # CVSS v3.1 scoring
233
+ ```
234
+
235
+ ### Global flags
236
+
237
+ | Flag | Effect |
238
+ |---|---|
239
+ | `--json` | Machine output on stdout; human progress on stderr |
240
+ | `--save` | Write JSON + Markdown + HTML reports |
241
+ | `--lang ar` | Arabic translations in exported reports |
242
+ | `--min-confidence N` / `--strict` | Secret confidence threshold (default 55 / strict 75) |
243
+ | `--show-filtered` | Print rejected candidates and why |
244
+ | `--serial DEVICE` | Target a specific adb device |
245
+ | `-v` | Verbose errors with traceback |
246
+
247
+ **Exit codes:** `0` success · `1` analysis failure · `2` usage error.
248
+
249
+ ## Reports
250
+
251
+ `--save` produces three formats in `workspace/reports/`:
252
+
253
+ - **HTML (interactive, single file)** — dark/light themes, sticky navigation,
254
+ live search, severity filter chips, click-to-reveal masked secrets (raw
255
+ values are base64-encoded at rest — never plaintext in the file), confidence
256
+ bars, filtered-candidates audit trail, embedded SBOM download, print-friendly
257
+ CSS. Zero external assets: safe to email or archive.
258
+ - **Markdown** — mirrors every section with masked values for wikis and PRs.
259
+ - **JSON** — complete machine-readable state of every module.
260
+
261
+ Older saved scans can be upgraded anytime: `./nightowl report old-scan.json`.
262
+
263
+ ## JSON Contract
264
+
265
+ ```jsonc
266
+ {
267
+ "info": { "package": "...", "version_name": "...", "sha256": "..." },
268
+ "perms": { "dangerous": [{ "name": "...", "risk": "HIGH" }] },
269
+ "endpoints": { "urls": [], "servers": [], "ips": [] },
270
+ "secrets": [{
271
+ "type": "AWS Access Key", "risk": "HIGH",
272
+ "confidence": 90, "verdict": "CONFIRMED",
273
+ "validation": ["well-formed AWS key ID"]
274
+ }],
275
+ "secrets_filtered": [],
276
+ "security": { "score": 62, "grade": "C", "issues": [] },
277
+ "authmap": { "flows": [], "token_lifecycle": {}, "weaknesses": [] },
278
+ "billing": { "enforcement_model": "local-only", "findings": [] },
279
+ "deepscan": { "findings": [] },
280
+ "hardening": { "packers_protectors": {}, "anti_analysis": {} },
281
+ "privacy": { "trackers": {}, "data_collection_permissions": [] },
282
+ "sca": { "vulnerable": [], "sbom": { "bomFormat": "CycloneDX" } }
283
+ }
284
+ ```
285
+
286
+ ## AI Agent Integration
287
+
288
+ NightOwl speaks native agent:
289
+
290
+ - **MCP server** — 12 tools for OpenClaw, Hermes, Claude Code/Desktop, Codex,
291
+ OpenCode, Cursor and any MCP-capable host:
292
+ ```bash
293
+ claude mcp add nightowl -- /path/to/nightowl mcp
294
+ ```
295
+ Tools: `nightowl_full`, `nightowl_secrets`, `nightowl_authmap`,
296
+ `nightowl_billing`, `nightowl_deepscan`, `nightowl_hardening`,
297
+ `nightowl_privacy`, `nightowl_sca`, `nightowl_diff`, `nightowl_endpoints`,
298
+ `nightowl_decompile`, `nightowl_preflight`.
299
+ - **SKILL.md** — [`skills/nightowl/SKILL.md`](skills/nightowl/SKILL.md):
300
+ decision tables, jq recipes, JSON contracts, safety rules.
301
+ - **AGENTS.md** — quick reference for repository agents.
302
+ - **NDJSON streams** — `lab logcat --json` for runtime telemetry.
303
+
304
+ ## MASVS Alignment
305
+
306
+ Findings across modules carry MASVS mappings (e.g. `MASVS-NETWORK-1` for
307
+ cleartext auth transport, `MASVS-STORAGE-1` for unencrypted token storage,
308
+ `MASVS-RESILIENCE-2` for client-side-only entitlement enforcement) and key
309
+ deep-scan findings include CVSS v3.1 vectors. The Semgrep module runs
310
+ MASTG-aligned rules for compliance validation. This makes NightOwl output
311
+ directly usable in MASVS-scoped engagement reports.
312
+
313
+ ## Project Structure
314
+
315
+ ```
316
+ nightowl/
317
+ ├── nightowl # Unified CLI entry point (v8)
318
+ ├── nightowl.py # Core analysis engine (9 sections + scoring)
319
+ ├── nightowl_pkg/
320
+ │ ├── core.py # Engine re-exports + decompilation helpers
321
+ │ ├── validators.py # False-positive reduction engine (v7)
322
+ │ ├── authmap.py # Authentication flow mapper
323
+ │ ├── billing.py # Subscription enforcement analyzer
324
+ │ ├── deepscan.py # Advanced static layers (MASVS/CVSS)
325
+ │ ├── hardening.py # Packer/protector fingerprinting
326
+ │ ├── privacy.py # Tracker & data-collection audit
327
+ │ ├── sca.py # Vulnerable libraries + CycloneDX SBOM
328
+ │ ├── lab.py # Dynamic analysis orchestrator
329
+ │ ├── diff.py # Report differ (regression tracking)
330
+ │ ├── report.py # Interactive HTML/MD report engine
331
+ │ ├── proxy.py # Universal proxy/capture integration
332
+ │ ├── mcp_server.py # MCP stdio server (12 tools)
333
+ │ ├── dragonjar.py # Static audit, Semgrep, CVSS scoring
334
+ │ ├── frameworks.py # Flutter/RN/Cordova/Unity analyzers
335
+ │ ├── runtime.py # RASP detection + bypass generation
336
+ │ ├── preflight.py # Dependency validation
337
+ │ └── wizard.py # Interactive menu
338
+ ├── frida-scripts/ # api-interceptor, ssl-bypass, memory-dump…
339
+ ├── scripts-dragonjar/ # Semgrep rules, detector catalog, profiles
340
+ ├── skills/nightowl/SKILL.md # AI-agent skill definition
341
+ └── tests/ # 103 tests (unit + integration)
342
+ ```
343
+
344
+ ## Testing
345
+
346
+ ```bash
347
+ python -m pytest tests/ -q
348
+ # 103 passing — validators, billing, authmap, deepscan, hardening, privacy,
349
+ # SCA, diff, report engine, MCP protocol, legacy engine compatibility
350
+ ```
351
+
352
+ ## Security & Responsible Use
353
+
354
+ NightOwl is a defensive-security testing tool. Bypass and verification script
355
+ generation (`bypass-premium`, `lab`, `rasp bypass`) exists to *demonstrate*
356
+ weaknesses on applications you own or are explicitly licensed to test.
357
+ See [SECURITY.md](SECURITY.md) for the project security policy. Do not use
358
+ NightOwl against third-party applications without authorization.
359
+
360
+ ## Roadmap
361
+
362
+ - [ ] iOS (IPA) parity for core modules
363
+ - [ ] AAB support alongside APK
364
+ - [ ] CI/CD GitHub Action wrapper with SARIF output
365
+ - [ ] Live secret verification behind explicit opt-in flag
366
+ - [ ] Cross-build trend dashboards from `diff` history
367
+
368
+ ## License
369
+
370
+ [MIT](LICENSE) — free for authorized security testing and research.
371
+
372
+ <div align="center">
373
+ <i>Built for security researchers who demand depth — and truth in results.</i>
374
+ </div>