Adversaries may attempt to get a listing of domain accounts. This information can help adversaries determine which domain accounts exist to aid in follow-on behavior.Commands such as
net user /domain
andnet group /domain
of the Net utility,dscacheutil -q group
on macOS, andldapsearch
on Linux can list domain users and groups.
Enumerate all accounts Upon exection, multiple enumeration commands will be run and their output displayed in the PowerShell session
Supported Platforms: Windows
net user /domain
net group /domain
Enumerate all accounts via PowerShell. Upon execution, lots of user account and group information will be displayed.
Supported Platforms: Windows
net user /domain
get-localgroupmember -group Users
get-aduser -filter *
Enumerate logged on users. Upon exeuction, logged on users will be displayed.
Supported Platforms: Windows
Name | Description | Type | Default Value |
---|---|---|---|
computer_name | Name of remote system to query | String | $env:COMPUTERNAME |
query user /SERVER:#{computer_name}
ADRecon extracts and combines information about an AD environement into a report. Upon execution, an Excel file with all of the data will be generated and its path will be displayed.
Supported Platforms: Windows
Name | Description | Type | Default Value |
---|---|---|---|
adrecon_path | Path of ADRecon.ps1 file | Path | $env:TEMP\ADRecon.ps1 |
Invoke-Expression #{adrecon_path}
Remove-Item #{adrecon_path} -Force -ErrorAction Ignore | Out-Null
Get-ChildItem $env:TEMP -Recurse -Force | Where{$_.Name -Match "^ADRecon-Report-"} | Remove-Item -Force -Recurse
if (Test-Path #{adrecon_path}) {exit 0} else {exit 1}
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/sense-of-security/ADRecon/38e4abae3e26d0fa87281c1d0c65cabd4d3c6ebd/ADRecon.ps1" -OutFile #{adrecon_path}
Adfind tool can be used for reconnaissance in an Active directory environment. The example chosen illustrates adfind used to query the local password policy. reference- http://www.joeware.net/freetools/tools/adfind/, https://social.technet.microsoft.com/wiki/contents/articles/7535.adfind-command-examples.aspx
Supported Platforms: Windows
PathToAtomicsFolder\T1087.002\src\AdFind -default -s base lockoutduration lockoutthreshold lockoutobservationwindow maxpwdage minpwdage minpwdlength pwdhistorylength pwdproperties