**FotaProvider.apk — Arbitrary Command Execution**
An exported broadcast receiver in a system-privileged Android app passes attacker-supplied strings into a ProcessBuilder, so a crafted broadcast can run arbitrary shell commands. Because the app shares the system user ID, those commands would run with system privileges.
This is an exercise from Maddiestone’s “Android Reverse Engineering 101” workshop.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely an exported broadcast receiver forwards attacker-controlled strings into a ProcessBuilder without validation, and the app runs under the system shared user ID.
Impact
An attacker could run arbitrary commands with system privileges, though the text does not demonstrate a full exploit chain.
What the attacker needed
Malicious app on the device; exported receiver reachable
How it was found
- Inspect the manifest and note the app shares the system user ID and exports its components.
- Find the command execution helper that builds a ProcessBuilder from a string array.
- Locate the exported WriteCommandReceiver that calls this helper.
- Send a broadcast with the operReceiver action to trigger command execution.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Android apps can expose 'components' such as broadcast receivers that other apps are allowed to message. This app exposed one that takes text from the message and runs it as a system command, and since the app runs as the system user, the command runs with very high privileges.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.