Got Access To Server Through Sql Injection
A login form was vulnerable to SQL injection, confirmed by an error on a single quote and then exploited with an automated tool to list databases and confirm the database user was root. The author then bypassed the login with a crafted condition, uploaded a shell, and used it to run a reverse-connection payload, eventually obtaining administrator rights on the Windows server.
Published on systemweakness.com
Hi, how are you guys?, I hope you are fine. This is my first article of the month, I hope you enjoy it.
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
Impact
An attacker could log in without valid credentials, read the databases, and run commands on the server as an administrator, though the text does not say whether the database dump itself succeeded.
What the attacker needed
Reachable login page; no account needed
How it was found
- Enumerate subdomains and filter the ones that respond.
- Open the login page and submit a single quote to see whether an error appears.
- Run an automated injection tool against the login request to list databases.
- Check whether the database user has administrative rights.
- Bypass the login with a crafted condition and upload a shell.
- Upload and execute a reverse-connection payload, then escalate to administrator.
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 login form sends what you type to a database to check your credentials. If the site builds that database query by pasting your text in directly, you can type special characters that change the query itself, which is called SQL injection. Here the author could make the query always true, log in without a password, and then upload a program that let them control the server.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.