// notes/ PrivEsc — Windows
🪟

Windows Subsystem For Linux

WSL allows a user to run Linux on top on the Windows system making it a... subsystem. However, with this comes vulnerabilities like the ability to create a elevated bind shell, wi…

#windows privilege escalation#adot8
source · oscp.adot8.com · windows-privilege-escalation/windows-subsystem-for-linux

Windows Subsystem for Linux

Overview

WSL allows a user to run Linux on top on the Windows system making it a... subsystem. However, with this comes vulnerabilities like the ability to create a elevated bind shell, with root privileges, to the Windows machine on any port.

{% embed url="https://swisskyrepo.github.io/InternalAllTheThings/redteam/escalation/windows-privilege-escalation/#eop---windows-subsystem-for-linux-wsl" %}

Escalation via WSL

powerquery
01where /R C:\Windows bash.exe
02where /R C:\Windows wsl.exe
code
01bash.exe
02python -c 'import pty;pty.spawn("/bin/bash")';

{% hint style="info" %} Check the history for easy wins {% endhint %}