TECH_SUPPORT01 TRYHACKME WRITE-UP
Problem :-
# Find the root.txt Flag.
Solution :-
Step 1 :-
First, Enumeration the target using nmap.
After the scan you can see only 22,80 and 445 port is open. But port 445 is smb , let's enumeration the smb .
Step 2 :-
Let's go using smbclient to find anything is import. Select the [websvr] path is very useful.
You see a suspicious [enter.txt] file on the picture. Let's copy the file using 'get; cmd. After this read the file.
I found a username and password , and most import this use only the [Subrion creds]. You notice that a dir. is '/subrion'.
Step 3 :-
Let's go to the browser and check the website .
You will see the apache webserver is running. Let's brute force the dir.
See, I found the '/test/' directory and the '/wordpress/wp-login.php' page. Be sure to check these pages as well.
This page is a phishing page , nothing to find special here. Let's check another . but I can use some cmn creds to bypass the wp- login, but failed.
Step 4 :-
Let's check the '/subrion' dir. that is find in [enter.txt] file.
After go to the '/subrion' page, but nothing here, after fuzzing the .... found the 'panel' lo login using [enter.txt] username and password is 'admin' but password are encrypted. Then I decrypt the password by CyberChef. That is 'Scam20121'
After access the panel , I was trying to upload a malicious php shell. In the menu [content]-------->>>[uploads] see the pic, point be note '.php' not allowed use '.phar' , successfully upload the shell.
Step 5 :-
Let's set the listener, and execute the phpshell in browser using the link path.
As you can see, I am accessing the shell, but I need to switch to a valid user shell. Let's try it. You can see a wp-config.php file is here. Let's read the file content.
I found a password. But the user was not found. So, let's find out the user.
After identifying a valid username, I used the password credentials to log in via SSH.
Step 6 :-
This is time for dinner, to find out the root.txt flag, that's why i need to root access of this machine . And i found a dinner for me that binary '/usr/bin/iconv' no need to password , so i found a tech.
Just set "LFILE=/root/root.txt" and run this on cmd using sudo [./iconv -f 8859_1 -t 8859_1 "$LFILE"], and you see the top picture that I found the flag.



![How to Solve Tech_Support:1 on TryHackMe: A Step-by-Step Guide see a suspicious [enter.txt] file](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHXRX9PJL9KMFFlpwA-g-XJAtDf18xZFge_l_Y6oZ7LsW9acRyD_pg3Ml0qXYY2W4zPWZRtrOCn8VpmDzNZNew5ILS5-F_8EQU80lF54JcIbQ9eOomzyFFVeslB0z71scZBosfsgOzkn5hyphenhyphen4wPbSDZsag_rqOFM94SqDYOJgm4m1un1MVOaKRbqMOgrH3F/s16000/smbcli.png)










0 Comments