How I got RCE on an Indian university without admin credentials Tale of directory listing, SQL…
A university web server exposed a base64-encoded GET parameter vulnerable to SQL injection, an open directory listing, admin-only PHP pages reachable without a valid session, and an unauthenticated file upload endpoint that accepted a PHP web shell. The author could read sensitive admission documents and upload a shell, but a firewall and limited account permissions prevented actual command execution.
Published on medium.com
At first I looked around for a few minutes and noticed some GET parameters that were Base64 encoded. FFUF for directory fuzzing was not practical due to some sort of rate limiting and firewall in place.
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 several separate mistakes: unsanitised base64-decoded input in SQL queries, directory listing left on, session checks centralised in one include rather than each admin script, and an upload endpoint with no file-type validation.
Impact
The tester could read sensitive admission documents and other universities' messages, and could upload a PHP shell, but a firewall and limited account permissions meant no shell could actually be popped.
What the attacker needed
No login needed for the exposed pages; target uses base64-encoded GET parameters; directory listing enabled on upload folders; admin pages indexed by search engines
The fix
The author recommended a full recode of the admin panel and its configuration, and noted that adding die() after the session check would stop the admin pages being served to unauthenticated users.
How it was found
- Notice base64-encoded GET parameters and test them for SQL injection
- Use ORDER BY and UNION SELECT to find a reflected column and dump the admin table
- Open an image URL and browse the /images directory because listing is enabled
- Google dork the site for admin pages and open an applicant-schools page directly
- Find an indexed upload endpoint for universities and upload a PHP web shell
- Locate the uploaded shell through the directory listing
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.
Some web pages take input from the address bar and paste it straight into database queries, so a crafted link can make the database reveal other data. Separately, the site let visitors browse a folder of uploaded files and reach admin pages that only checked the login on one shared file, not on each page. The tester combined these to read private documents and place a script file on the server, though a firewall stopped it from running commands.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.