Hacking SMS API Service Provider of a Company |Android App Static Security Analysis | Bug Bounty POC
The Android app stored SMS API credentials insecurely, allowing an attacker who decompiled the APK to extract them and take over the SMS API.
Published on blog.securitybreached.org
I decided to do a writeup on this as of increasing messages from new learners regarding doing Analysis of Android App for bug bounty. This is a basic POC guide for them i hope it helps somehow.
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 the app hardcoded SMS API credentials in a Java class file, which could be extracted by decompiling the APK.
Impact
An attacker could take over the SMS API using the extracted credentials.
What the attacker needed
Access to the Android app APK; Ability to decompile the APK
The fix
Companies should not store such sensitive information in apps, and if necessary, encrypt it properly.
How it was found
- Download the Android app and extract the APK file.
- Rename the APK file extension to .zip and extract its contents.
- Locate the classes.dex file(s) and convert them to a JAR file using dex2jar.
- Decompile the JAR file using a Java decompiler such as JD-GUI to view the source code.
- Search the source code for sensitive information, finding SMS API credentials.
- Use the discovered SMS API credentials to log in to the SMS platform and gain access.
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.
When an app is built, some sensitive information like passwords can be left inside the app's code. If someone downloads the app and unpacks it, they can read that information. Here, the SMS service's username and password were stored this way, so anyone could use them to control the SMS system.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.