The Story of How I Hacked one of the online payment system website twice
The author found an admin login page on a blog subdomain that accepted a SQL injection payload, giving access to the blog admin panel, and later found a file upload flaw that allowed a web shell to be uploaded. After the site was patched, the author returned and found the admin panel still accepted the default admin/admin credentials, then uploaded a web shell again and accessed employee files on the server.
Back in 2018 when I was in high school, the site owner asked me to check the security of their website. They were curious because I had previously found a vulnerability on another site of theirs and reported 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
Root cause
Likely the login form passed user input straight into a database query without proper parameterisation, and the admin panel was left with default credentials and an unrestricted file upload.
Impact
An attacker could take full control of the blog and main site servers and databases, and later access around 1,000 employee files including ID cards and driver's licences.
What the attacker needed
Permission from the site owner; internet access; admin panel finder tool
The fix
The site owner patched the SQL injection and added a captcha, but the default credentials and file upload issue were only addressed after the second report.
How it was found
- Find the blog subdomain through Google dorking and locate its login page.
- Submit a SQL injection payload in the login form to log in as admin.
- Use a file upload feature to upload a web shell and gain server access.
- After the fix, run an admin panel finder and locate the adminpanel/ path.
- Log in with the default admin credentials.
- Upload a web shell again and browse the server's files.
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 that builds database commands directly from what you type can be tricked into letting you in without a real password; this is called SQL injection. Separately, many systems ship with a built-in administrator username and password that nobody changed, so anyone who guesses them gets in. Once inside, the attacker could upload a file that runs commands on the server, called a web shell.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.