Skills von pixel: security/spycheck software-development/android-debugging-from-termux
This commit is contained in:
+6
-6
@@ -1,5 +1,7 @@
|
||||
# MVT (mvt-project) on the phone itself, from Termux
|
||||
|
||||
Full workflow (widgets, androidqf, iOS sysdiagnose, report): see the `spycheck` skill. This file only covers install and the no-ADB quick check.
|
||||
|
||||
## Install (verified)
|
||||
```bash
|
||||
unset LD_LIBRARY_PATH
|
||||
@@ -7,10 +9,12 @@ pkg install -y python-pip python-cryptography rust # rust is needed for the py
|
||||
/data/data/com.termux/files/usr/bin/python -m venv --system-site-packages --without-pip ~/mvt-venv
|
||||
# run in the background, it takes several minutes:
|
||||
env -u LD_LIBRARY_PATH ~/mvt-venv/bin/python -m pip install mvt > ~/mvt-install.log 2>&1
|
||||
env -u LD_LIBRARY_PATH ~/mvt-venv/bin/python -m pip uninstall -y cryptography # use Termux's python-cryptography; the pip wheel fails with dlopen PyModule_Type
|
||||
env -u LD_LIBRARY_PATH ~/mvt-venv/bin/mvt-android download-iocs # -> ~/.local/share/mvt/indicators/*.stix2
|
||||
```
|
||||
- `--without-pip`: venv's ensurepip fails here. The system pip is reused through `--system-site-packages`.
|
||||
- If even plain Termux python fails to `import array`, run `pkg upgrade python` (a partial upgrade leaves lib-dynload out of sync).
|
||||
- If even plain Termux python fails to `import array`, first check that LD_LIBRARY_PATH is unset; only then try `pkg upgrade python`.
|
||||
- `pip check` complains about the cryptography version pin afterwards; MVT runs fine anyway.
|
||||
|
||||
## Quick check without ADB (app IDs vs IOCs)
|
||||
```bash
|
||||
@@ -18,8 +22,4 @@ env -u LD_LIBRARY_PATH ~/mvt-venv/bin/mvt-android download-iocs # -> ~/.local/
|
||||
```
|
||||
Line format: `package:<apk path>=<pkg> installer=<x> uid:<n>`. Parse the package with `\.apk=(\S+)\s+installer`. Pull the IOC app IDs from the STIX `pattern` fields with the regex `app:id\s*=\s*'([^']+)'`, then intersect the two sets.
|
||||
Also list the `/data/app` packages with `installer=null`. These are sideloaded via adb or restored from a backup, so mention them as "worth a look", not as a finding.
|
||||
Limits: this check covers app IDs only. Processes, logs, SMS/URLs, files and settings need `mvt-android check-adb` (or androidqf) over a paired ADB session.
|
||||
|
||||
## Full scan
|
||||
Pair via wireless debugging (SKILL.md §4), then:
|
||||
`env -u LD_LIBRARY_PATH ~/mvt-venv/bin/mvt-android check-adb --output ~/mvt-out`
|
||||
Limits: app IDs only. For processes, logs, settings and hashes use androidqf + `mvt-android check-androidqf` (`check-adb` was removed from MVT).
|
||||
|
||||
Reference in New Issue
Block a user