Skip to content
SQL injection Write-up Beginner

From Sql Injection To Weak Passwords A Deep Dive Into A Tamil Nadu Government Security Flaw

A government website's GET parameter was vulnerable to time-based SQL injection, allowing an attacker to dump the user database. The dumped password hashes were weak and easily cracked, letting the tester log in as superadmin and access PII.

B4LOGI Follow

Published on infosecwriteups.com

One morning, coffee in hand ☕, I began testing a new target from the Tamil Nadu Government and spotted signs of SQL injection. I ran SQLmap, which showed it was a time-based flaw.

B4LOGI, on infosecwriteups.com

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 concatenated user input directly into SQL queries without parameterisation or validation.

Impact

An attacker could read the entire user database and, because of weak passwords, log in as superadmin to view and modify PII and user accounts.

What the attacker needed

Network access to the target; no authentication needed for the vulnerable endpoint

The fix

The application should use parameterised queries and enforce strong password policies; the text does not state that a fix was applied.

How it was found

  1. Send a single quote in the GET parameter and observe a 500 error.
  2. Run SQLmap against the parameter to confirm time-based injection.
  3. Use SQLmap's dump option to extract the user table.
  4. Search the dumped password hashes online to recover a weak password.
  5. Log in with the recovered credentials and gain superadmin access.

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.

The website took input from the address bar and put it straight into a database command without cleaning it. By sending a special character, the tester made the database pause, which proved they could ask it questions. They then used a tool to read the whole user table, and because the passwords were weak, they could log in as the top administrator.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

More by B4LOGI

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.