From Android Static Analysis to RCE on Prod
Hardcoded internal server URLs and IP addresses were found in the Android app's Global.java file, leading to an open directory containing an internal cron job UI that executed commands. The same path was later exposed on a production API endpoint, allowing remote command execution on the production server.
Published on blog.dixitaditya.com
Let's call the organization " Redacted Inc.". Their in-scope apps and URL's are their Android apps, and two URL endpoints -
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 hardcoded sensitive information in the mobile app and an unprotected internal admin interface exposed to the internet.
Impact
An attacker could execute arbitrary commands on the production server, potentially leading to full system compromise.
What the attacker needed
Access to the Android app; knowledge of internal URLs
How it was found
- Decompile the Android app and find hardcoded internal URLs and IPs in Global.java.
- Scan and browse the IPs, discovering an open directory for an admin panel.
- Locate the internal cron job UI at /tools/cron/html/cron.html.
- Test command execution by sending a curl request to an external server.
- Find an IDOR in api.redacted.com/admsystem/provider.php that references the admsystem path.
- Access the cron UI on the production API endpoint, achieving RCE.
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.
A mobile app contained secret internal web addresses that should not be public. Attackers used these to find an unprotected admin page that could run commands on the server, and later found the same page on a public website, giving them control of the production server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.