How I hacked NASA in 3 days using AI
A parameter that carried coordinates was passed into a SQL query without sanitisation, allowing blind SQL injection. An attacker could use time-based techniques to confirm the injection and read the database name.
medium.com
Published on medium.com
I was 16 when I watched Mr. Robot.
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 a SQL query by directly concatenating an attacker-controlled parameter without using parameterised queries or sanitisation.
Impact
An attacker could read the database name, and potentially more data, through blind SQL injection.
What the attacker needed
Access to the target application; ability to send requests with the latCmd parameter
The fix
The report was validated and fixed.
How it was found
- Crawl the front-end code to catalogue parameters and suspicious names.
- Identify the latCmd parameter as carrying coordinates.
- Test latCmd for injection using a time-based payload.
- Confirm the injection by observing a deliberate delay in the response.
- Use sqlmap minimally to read the database name and confirm impact.
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 blind SQL injection is when user input is inserted into a database query without being made safe, so an attacker can change the query. 'Blind' means the attacker cannot see the query results directly, but can ask yes/no questions by causing delays. Here, a parameter that looked like it only held coordinates could be abused to make the database wait, proving the injection.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.