Skip to content
SQL injection Write-up Intermediate

Complex Attack Types: Sample Scenarios 7

A Joomla 3.7.0 installation was vulnerable to SQL injection through the com_fields component, allowing an attacker to dump the database and recover an administrator's username and bcrypt password hash. After cracking the password, the attacker logged into the administrator panel and edited a template file to plant a reverse shell, gaining command execution on the server.

brsdncr Follow

Published on medium.com

It’s time to share the new scenario in which we will infiltrate the system by following the traces through Joomla CMS(Content Management System), which includes many methods, and the tool set we will use in this scenario.

Baris Dincer, 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 com_fields component passed a user-controlled ordering parameter into a database query without proper sanitisation, enabling SQL injection.

Impact

An attacker could read the whole database, recover administrator credentials and gain remote command execution on the server.

What the attacker needed

Network access to the target; Joomla 3.7.0 with com_fields; crackable admin password

How it was found

  1. Scan the target to find open ports and identify Joomla on port 80
  2. Enumerate directories and the language folder to determine the Joomla version
  3. Look up a known exploit for the identified version
  4. Run sqlmap against the vulnerable com_fields parameter to dump the database
  5. Crack the recovered bcrypt password hash with John the Ripper
  6. Log into the administrator panel and edit a template file to plant a reverse shell

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 content management system (CMS) like Joomla is software that lets people build and edit websites. This version had a flaw where a specially crafted web address let an attacker read data straight out of the site's database, including login details. With an admin password recovered from that data, the attacker could change the site's code and run their own commands on the server.

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 brsdncr

View all

7 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.