User Enumeration
1. User Information Commands
1.1 Current Username
Commands:
echo %USERNAME%
whoamiOr, using PowerShell:
$env:USERNAMEDescription: Displays the username of the currently logged-in user.
Output: The current username is shown.
1.2 List Users
Commands:
net userOr, for a more detailed view in PowerShell:
Get-LocalUser | Format-Table Name, Enabled, LastLogonOr, to list user profiles:
Get-ChildItem C:\Users -Force | Select-Object NameDescription: Lists all local user accounts, showing their status and last logon time.
Output: A list of all users on the system.
1.3 User Privileges
Commands:
To display privileges:
whoami /privTo view group memberships:
whoami /groupsFor comprehensive user details:
whoami /allDescription: These commands provide detailed information about user privileges and group memberships.
Output: Displays user privileges, group memberships, and other detailed information.
2. Group Information Commands
2.1 List All Local Groups
Commands:
net localgroupOr, using PowerShell:
Get-LocalGroup | Format-Table NameDescription: Lists all local groups on the system.
Output: Displays a list of local groups.
2.2 Group Details
Commands:
To view members of a specific group (e.g., Administrators):
net localgroup administratorsFor detailed member information using PowerShell:
Get-LocalGroupMember Administrators | Format-Table Name, PrincipalSourceDescription: Provides details about the members of a specified local group.
Output: Lists the group members, including their source (local or domain).
3. Domain Controller Commands
3.1 Get Domain Controllers
Commands:
To list domain controllers:
nltest /DCLIST:DomainNameTo get the current domain controller:
nltest /DCNAME:DomainNameTo query for a domain controller based on specific criteria:
nltest /DSGETDC:DomainNameDescription: Queries the domain for information about domain controllers.
Output: Displays domain controllers' names and details, useful for network configuration and security assessments.
Last updated
