reAVS is a remake of AVS: https://github.com/aimardcr/AVS/
AVS is a defensive, best-effort static analyzer for Android APKs. It extracts the app attack surface from the manifest and looks for high-risk vulnerability patterns using lightweight taint heuristics. No dynamic execution, instrumentation, or network calls are performed.
- Static analysis only; results are best-effort and heuristic-driven.
- Obfuscated APKs may reduce precision; reAVS is designed to degrade gracefully without crashing.
- Findings should be triaged and verified by a human reviewer.
python -m venv .venv
. .venv/bin/activate
pip install -r requirements.txtpython3 avs.py app.apk --out report.json --deepOptions:
--outJSON report path (optional)--fast(default) or--deep--depth <n>helper propagation depth (deep mode, default: 3; ignored in fast mode)--component <ComponentName>focus a specific component--verbose- Findings are printed to the console in a simple table by default.
- Create a scanner in
scanners/that subclassesBaseScanner. - Add it to the scanner list in
avs.py. - Emit
Findingobjects with evidence and recommendations.
Update rules/sources.yml, rules/sinks.yml, rules/sanitizers.yml, and rules/policy.yml using the defined schema. AVS will load these at startup.
core/bc_extract.pyexposes method-scoped extraction (invokes, const strings, new instances, field refs, moves) and links move-result to invocations when possible.core/dataflow/taint_linear.pyperforms minimal intra-procedural taint tracking over registers (fast mode).core/dataflow/taint_cfg.pybuilds CFG/ICFG taint summaries for interprocedural propagation (deep mode).core/dataflow/taint_provider.pyselects the taint engine by scan mode.- Fast mode (
--fast) uses linear taint and does not perform helper propagation. - Deep mode (
--deep --depth N) uses CFG/ICFG taint and performs bounded helper propagation within the same class to attribute sinks in helper methods to tainted inputs.
- Intent redirection:
getParcelableExtra("forward_intent") -> startActivity(forward) - Privilege escalation via
setResult: extras controlsetAction/setData/setClassNamebeforesetResult(RESULT_OK, result) - Arbitrary file write:
getStringExtra("path") -> new File(getFilesDir(), path) -> FileOutputStream - WebView tainted URL:
getStringExtra("url") -> WebView.loadUrl(url)(higher severity if JS enabled) - ContentProvider SQL injection:
query(...) -> rawQuery(sql, null)with selection concatenation - ContentProvider file access:
openFile(Uri, ...)withuri.getPath()and weak traversal checks - Dynamic code loading:
DexClassLoader(dexPath, ...)from untrusted path - Runtime exec:
Runtime.exec(...)orProcessBuilder - Reflection: tainted strings to
Class.forName/getMethod/invoke - Crypto issues: hardcoded base64 keys, AES/ECB modes, fixed IV in CBC, MD5/SHA-1
reAVS is intended for defensive security review and secure coding guidance.