Skip to content

Latest commit

 

History

History
59 lines (30 loc) · 1 KB

Basic_Windows.md

File metadata and controls

59 lines (30 loc) · 1 KB

Basic Windows Commands and Tools for Potential Exploitation

Environment

To see all environment variables set within a shell:

    C:\> set

To see specific variables:

    C:\> set [variables]

Linux equal to "whoami":

   C:\> set username

Show path to executables:

   C:\> set path

File System

To search for a file in the filesystem:

   C:\> dir /b /s [directory]\[file]

Example

   C:\> dir /b /s %systemroot%\hosts

Accounts and Groups

Local users:

    C:\> net user

Local Groups:

   C:\> net localgroup

Members of Local Admin group:

   C:\> net localgroup administrators

Add user:

   C:\> net user [logon_name] [password] /add

Add user to local admin group:

   C:\> net localgroup administrators [logon_name] /add

Domain User:

   C:\> net user USERNAME /DOMAIN

List All Domain Users:

   C:\> net user /DOMAIN