Skip to content

Instantly share code, notes, and snippets.

@HarmJ0y
Last active August 31, 2022 17:27
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HarmJ0y/8738858 to your computer and use it in GitHub Desktop.
Save HarmJ0y/8738858 to your computer and use it in GitHub Desktop.
Win7 Powershell SID Enumeration
schtasks /create /tn GetSid /tr "powershell.exe -c '$k=Get-Item HKLM:\security\sam\domains\account;$v=Get-ItemProperty $k.pspath;New-Object System.Security.Principal.SecurityIdentifier([Byte[]]$v.V[-24..-1],0)|Format-List *|Out-File c:\sid.txt'" /sc minute /ru System /MO 1 & choice /C X /T 60 /D X > nul & schtasks /delete /tn GetSid /f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment