Skills von pixel: security/spycheck software-development/android-debugging-from-termux

This commit is contained in:
2026-11-08 16:27:36 +01:00
parent 97b91c57dd
commit 7b925fc2c5
3 changed files with 35 additions and 2 deletions
+10 -2
View File
@@ -17,7 +17,9 @@ The user wants to check their own or someone else's phone (with consent) for spy
## User preferences (always)
- Plain German text, no Markdown. Short verdict first, then findings, then limits ("no guarantee: only KNOWN traces").
- One-tap widgets on the phone, not a CLI recipe. Ask for consent first; at the end offer to delete raw data and archives (they hold the other person's private data).
- One-tap widgets on the phone, not a CLI recipe. Ask for consent first. Clean up AUTOMATICALLY at the end, without asking: delete raw case data (often 500+ MB) and the sysdiagnose archive. Keep only the report (and the expert ZIP if one was made).
- Results must be shareable as a compact, styled HTML mail, not a bare .txt file: dark header, verdict banner (green/orange/red), lists, real umlauts. Append a short help block (what to do, hotlines, expert contacts) only on AUFFAELLIG or PRUEFEN.
- Live progress is required for long steps: a step counter n/15 with a bar in the terminal and as an ongoing notification. Silent phases look like a hang to the user.
- iOS: no long full backup. Use sysdiagnose plus the iCloud/account checklist instead.
- Calm, realistic framing: mercenary spyware is targeted and rare; stalkerware and account access are the common threat.
@@ -35,8 +37,14 @@ The user wants to check their own or someone else's phone (with consent) for spy
- The heuristic flags sideloaded apps that combine accessibility, notification-listener and device-admin rights.
- A MEDIUM "installed via browser/adb" alert alone is normal for F-Droid/Termux users. Never treat it as a finding.
5. Turn it into mail HTML with `lib/html_report.py <report.txt> [--hilfe]`, which writes `<report>.html`. Use a fixed word map for umlauts (ae->ä etc.); a generic regex wrecks words like "Quelle" and "aktuell". `share_results` in common.sh offers: report only, or report plus an expert ZIP (alerts.json, alerts_timeline.csv, info.json, *_detected.json, about 70 KB, no raw data).
6. Mail handoff: `termux-share -a send -c text/html < report.html` opens the share sheet but cannot preset the recipient or subject. Prefilling FairEmail needs `termux-am start -a android.intent.action.SEND -t text/html -p eu.faircode.email --esa android.intent.extra.EMAIL <addr> --es android.intent.extra.SUBJECT ... --es android.intent.extra.HTML_TEXT "$H"`. That only works when Termux's am socket server is running; if `am.sock` is missing, the user must fully exit and restart Termux. `/system/bin/am` is refused for the app uid. Never ask for SMTP passwords in chat; use the vault if SMTP sending is wanted.
## Procedure: iPhone
The owner restarts the iPhone, triggers sysdiagnose, waits about 10 minutes, then shares the archive to /sdcard/Download (Quick Share works from iPhone). ios-check.sh runs `mvt-ios check-sysdiagnose` (device info only, no detection), then `lib/ios_analyze.py <tar.gz> ~/.local/share/mvt/indicators <mvt.log>`. That script checks shutdown.log (iShutdown method), ps.txt, .ips names and log domains against the IOCs. For account and iCloud-based spying, walk through `references/ios-account-checklist.md`.
The owner restarts the iPhone, triggers sysdiagnose, waits about 10 minutes, then shares the archive to /sdcard/Download (Quick Share works from iPhone). ios-check.sh runs `mvt-ios check-sysdiagnose` (device info only, no detection), then `lib/ios_analyze.py <tar.gz> ~/.local/share/mvt/indicators <mvt.log>`. That script checks shutdown.log (iShutdown method), ps.txt, .ips names and log domains against the IOCs. For account and iCloud-based spying, walk through `references/ios-account-checklist.md`. ios-check.sh appends the same checklist (/sdcard/Download/Spycheck/iPhone-iCloud-Checkliste.txt) to every iPhone report.
## Real suspicion: advice order
Next steps and contacts go in `references/suspicion-next-steps.md`. Core rule: do not delete or reset first. Removing stalkerware alerts the abuser, and the traces are evidence. Seek help from a clean device; get a tool hit confirmed by experts before acting on it.
## Environment rules
- Always `unset LD_LIBRARY_PATH` before Termux python/mvt/go; Hermes's value loads a mismatched libpython.
@@ -0,0 +1,24 @@
# Real suspicion: next steps and contacts (Germany)
Order matters. Present it compactly; the user prefers a short list over prose.
1. Do not delete, uninstall or factory-reset yet. Traces are evidence, and stalkers notice when their app disappears, which can escalate partner or ex situations.
2. Look for help from a different, clean device (a friend's phone, a work PC, a counselling centre).
3. Document it: keep the Spycheck report and expert ZIP, take screenshots, note dates of odd events.
4. Get it confirmed. A tool hit is an indication, not proof; false positives exist.
5. Only after advice: change Google/Apple/mail passwords from a clean device, turn on 2FA, remove foreign devices, then remove the app or factory-reset. Do not restore a full old backup afterwards, because it can bring the app back. For mercenary spyware: update, reboot regularly, turn on Lockdown Mode (iOS) or Advanced Protection (Android); in serious cases use a new device.
## Contacts
Stalking or surveillance by someone close:
- Hilfetelefon Gewalt gegen Frauen 116 016 (24/7, anonymous, multilingual, also for relatives and men)
- Weisser Ring 116 006
- frauen-gegen-gewalt.de (bff, project "Aktiv gegen digitale Gewalt")
- stopstalkerware.org (Coalition Against Stalkerware)
- Police: §238 StGB (Nachstellung), §202a StGB (Ausspähen von Daten)
Targeted or mercenary spyware (journalists, activists, lawyers, politicians and the people around them):
- Amnesty Security Lab: securitylab.amnesty.org/get-help (the makers of MVT)
- Access Now Digital Security Helpline: help@accessnow.org (24/7, German available)
- Reporter ohne Grenzen Digital Security Lab (journalists)
- Citizen Lab
- An Apple threat notification is serious; Apple itself refers people to Access Now.
@@ -49,6 +49,7 @@ Install MVT into its own venv and check app IDs against the IOCs right away (wor
| `/system/bin/settings list` | ❌ often empty | secure/global/system reads require perms |
| `/system/bin/content query` | ❌ broken via `/bin/sh` | fix: call `app_process /system/bin com.android.commands.content.Content …` with `CLASSPATH=/system/framework/content.jar`, but READ_CONTACTS still required |
| `adb` (client) | ✅ works | client is fine; target server is what you connect to |
| `/system/bin/am start` | ❌ denied | runs as com.android.shell and does not match the app uid. Use `termux-am` instead: it needs Termux's am socket server (`$PREFIX/../apps/com.termux/termux-am/am.sock`); if the socket is missing, fully exit and restart the Termux app. `termux-share` (Termux:API) works without the socket but cannot preset intent extras. |
Rule: use ABSOLUTE paths for any /system/bin tool. The Termux PATH is a lie.