CMS attacks

Common application attacks

This page covers attacks on these applications:

  1. WordPress

  2. Joomla

  3. Drupal

WordPress

Grabbing information from the site

$ curl -s http://blog.inlanefreight.local | grep WordPress # WP version
$ curl -s http://blog.inlanefreight.local/ | grep themes # active theme
$ curl -s http://blog.inlanefreight.local/ | grep plugins # installed plugins

WordPress /robots.txt

User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Disallow: /wp-content/uploads/wpforms/

Sitemap: https://<site>/wp-sitemap.xml

Key WordPress files

Key WordPress folders

Enumerating Users

Attacking accounts

Brute force using xmlrpc.php and wpscan

Backdoors in WordPress Admin

After logging in as admin, we can add a backdoor to their themes by placing this line in 404.php

Joomla

Joomla robots.txt

Getting Joomla version

Enumerating with droopescan

Brute forcing with joomla-bruteforce

https://github.com/ajnik/joomla-bruteforce

Backdoors as Joomla Admin

After logging in as admin, we can add a backdoor to their themes by placing this line in error.php

Drupal

Enumerating with droopescan

RCE

Enable PHP Filter Module and create a new Basic Page that contains a PHP webshell. Make sure to set the Text format to PHP

In older Drupal version, PHP Filter Module comes installed by default. In newer versions, we will need to install it ourselves either through the admin page, or uploading it via ftp

Drupalgeddons

  • CVE-2014-3704, known as Drupalgeddon, affects versions 7.0 up to 7.31 and was fixed in version 7.32. This was a pre-authenticated SQL injection flaw that could be used to upload a malicious form or create a new admin user.

  • CVE-2018-7600, also known as Drupalgeddon2, is a remote code execution vulnerability, which affects versions of Drupal prior to 7.58 and 8.5.1. The vulnerability occurs due to insufficient input sanitization during user registration, allowing system-level commands to be maliciously injected.

  • CVE-2018-7602, also known as Drupalgeddon3, is a remote code execution vulnerability that affects multiple versions of Drupal 7.x and 8.x. This flaw exploits improper validation in the Form API.

Last updated