Windows privilege escalation
System Enumeration
To find information about system os version & hostname
systeminfoOne liner to find os version and architecture
systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type"To find latest patch information
wmic qfeTo list drives
wmic logicaldisk To get better output for logical disk
wmic logicaldisk get caption,description,providernameUser Enumeration
To find out which user you are
whoamiTo find out what kind of priv's your user has
whoami /privTo find out which group your user belong's
whoami /groupsTo find out User's on your computer
net usersTo find out information about a specific user on the computer
net user usernameTo find out diiferent group's
net localgroupTo find information about a specific group
net localgroup groupnameNetwork Enumeration
To find the ip address of the machine , subnets etc.......
ipconfig /allTo find arp table
arp -aTo find out which port's are open and connected tcp , udp
netstat -anoPassword Hunting
findstr /si password *.txt *.config *.iniAv Enumeration
Checking windows defender
sc query windefendChecking other running services to look for some other antivirus
sc queryex type= serviceTo Checking firewall
netsh advfirewall firewall dumpor
netsh firewall show stateTo Get more detailed overview of firewall to check different port's
netsh firewall show configAutomatic Enumeration
Some best tool
Winpeas https://github.com/carlospolop/PEASS-ng/tree/master/winPEAS/winPEASexe
Windows exploit suggester https://github.com/AonCyberLabs/Windows-Exploit-Suggester
Metasploit post/multi/recon/local_exploit_suggester
Wsl
Wsl stand's for window's sub system for linux mean's you can run linux on windows system .
#update this
look for bash.exe
Impersonete Tokens
In this attack we can impersonete someone's token if we have any of these token SeAssignPrimaryToken
https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Windows%20-%20Privilege%20Escalation.md#eop---impersonation-privileges
In meterpreter u can try
load incognitolist_tokens -uU can also use local_exploit_suggester to find exploit's
Also try exploit/windows/local/ms16_075_reflection exploit/windows/local/ms16_075_reflection_juicy
Runas
It's a feature in a feature in windows which let's you run a program as administrator . U can abuse this feature to get root .
cmdkey /listLast updated