Skip to content
SQL injection Write-up Beginner

Mendapatkan Akses SMTP Melalui Celah SQL Injection

Two SQL injection vulnerabilities were found in a campus e-learning application, allowing access to 301 databases including other campuses' data and SMTP credentials. The attacker could read sensitive student and admin information and send emails using the compromised SMTP account.

rdnzx Follow

Published on rdnzx.medium.com

Saya menemukan celah keamanan ini pada website kampus saya, yang menggunakan aplikasi pihak ketiga (vendor) untuk sistem e-learning. Setelah menemukan celah tersebut, saya segera melaporkannya kepada vendor terkait.

Radian ID, on rdnzx.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 application concatenated user-supplied parameter values directly into SQL queries without parameterisation or input validation.

Impact

An attacker could read sensitive data from 301 databases, including other campuses' student and admin records, and could send emails using the compromised SMTP credentials.

What the attacker needed

Valid login credentials; access to the vulnerable endpoints

The fix

The vulnerabilities were fixed by the vendor.

How it was found

  1. Log in to the application using provided credentials.
  2. Capture HTTP requests while browsing features.
  3. Test parameters with a single quote to look for SQL errors.
  4. Use sqlmap on the vulnerable endpoint to enumerate databases.
  5. Dump the konfigsmtp table to obtain SMTP credentials.
  6. Validate the credentials by sending an email using a PHP script.

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.

SQL injection is a flaw where user input is inserted into database commands without proper handling, letting an attacker change the command. Here, adding a quote character to certain parameters caused database errors, showing the input was being used directly in SQL queries. The attacker then used a tool to extract data, including email server passwords.

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 rdnzx

View all

1 more disclosed report, 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.