Taking over 60k spyware user accounts with SQL injection
The Catwatchful stalkerware service had an unauthenticated SQL injection in its getDevice API endpoint, allowing an attacker to dump the entire user database including plaintext passwords. This gave full control over all ~62,000 user accounts.
ericdaigle.ca
Published on ericdaigle.ca
Recently I was looking through a database of known stalkerware services and found one I wasn’t familiar with: Catwatchful. It seemed to be a full-featured Android spy app, to actually be its own service as opposed to a millionth FlexiSpy reseller, and to offer a 3-day free trial.
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 application built SQL queries by directly inserting user-supplied input (the imei parameter) without proper sanitisation or parameterised queries.
Impact
An attacker could obtain plaintext credentials for all ~62,000 accounts, giving full control over every account on the service; later a WAF blocked the SQL injection on the replacement domain.
What the attacker needed
None (unauthenticated API)
The fix
The service should use parameterised queries or prepared statements to prevent SQL injection; the report notes a WAF was later deployed that blocked the attack, but the underlying code flaw may remain.
How it was found
- Create a free trial account on the website.
- Observe requests to the servicios.php API, including the getDevice operation with an imei parameter.
- Run sqlmap against the getDevice endpoint and confirm time-based blind and UNION injection.
- Use sqlmap to dump all databases, revealing the user table with plaintext credentials.
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 SQL injection is a way to sneak database commands into a website's input, like a search box, so the site runs your commands instead of its own. Here, the attacker could ask the server to return all user records, including passwords stored without encryption. That let them take over every account on the service.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.