Skip to content
SQL injection Write-up Beginner

The Stories How I Found SQL Injection In BPOM (Government)

A parameter on a BPOM subdomain returned a 500 error when a quotation mark was added, indicating SQL injection. The author then used an automated tool to enumerate databases, though the text does not show what data was actually extracted.

medium.com

Published on medium.com

hi everyone. in this article, i’d like to share a bit of my experience when i discovered an sql injection vulnerability on a government institution’s website.

Firdaus Muhammad Ismail, on medium.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 article parameter was concatenated into a database query without proper parameterisation or escaping.

Impact

An attacker could run database queries through the vulnerable parameter, potentially reading data stored in the database, though the text does not show what was actually retrieved.

What the attacker needed

Publicly reachable subdomain; no WAF on the target

How it was found

  1. Search for subdomains with search-engine queries and find a parameter that reacts to input.
  2. Add a quotation mark to the parameter and observe a server error.
  3. Check whether a web application firewall protects the site.
  4. Run an automated injection tool against the parameter to list databases.

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 website often builds database queries from the values you type into it. If those values are not handled safely, adding a special character like a quotation mark can break the query and cause an error, which hints that an attacker could read or change database contents. Here the author found such an error and then used a tool to confirm and explore it.

What is SQL injection?

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

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.