Windows Privilege Escalation

Room Link: https://tryhackme.com/room/windowsprivesc20

Harvesting Passwords from Usual Spots

A password for the julia.jones user has been left on the Powershell history. What is the password?

Victim(cmd)

type %userprofile%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt

A web server is running on the remote host. Find any interesting password on web.config files associated with IIS. What is the password of the db_admin user?

Victim(cmd)

There is a saved password on your Windows credentials. Using cmdkey and runas, spawn a shell for mike.katz and retrieve the flag from his desktop.

Victim(cmd)

Retrieve the saved password stored in the saved PuTTY session under your profile. What is the password for the thom.smith user?

Victim(cmd)

Other Quick Wins

What is the taskusr1 flag?

Victim(cmd)

Victim(cmd)

Victim(cmd)

Kali

Victim

Abusing Service Misconfigurations

Insecure Permissions on Service Executable

Get the flag on svcusr1's desktop

Victim(cmd)

Victim(cmd)

Kali

Victim(Powershell)

Once the payload is in the Windows server, we proceed to replace the service executable with our payload. Since we need another user to execute our payload, we'll want to grant full permissions to the Everyone group as well.

Victim(Powershell)

Kali

Note: PowerShell has sc as an alias to Set-Content, therefore you need to use sc.exe in order to control services with PowerShell this way.

As a result, you'll get a reverse shell with svcusr1 privileges:

Victim(cmd)

OR

Victim(Powershell)

Unquoted Service Paths

Victim(cmd)

Kali

Victim(Powershell)

Kali

Victim(cmd)

Insecure Service Permissions

Victim(cmd)

Kali

Victim(Powershell)

Kali

Victim(Powershell)

Abusing dangerous privileges

Kali

Victim(Browser)

Abusing vulnerable software

Case Study: Druva inSync 6.6.3

Druva_inSync_exploit.ps1

Victim

Victim(Powershell)

Victim(cmd)

Last updated