Forest and Domains
Forest, SSID, Domains
Domain Enumeration Manual
#The enumeration can be done by using Native executables and .NET classes
Whoami /priv
$ADClass=[System.DirectoryServices.ActiveDirectory.Domain]
$ADClass::GetCurrentDomain()
Domain Enumeration Tools
PowerView
https://github.com/PowerShellMafia/PowerSploit/blob/master/Recon/PowerView.ps1
#Import
..\PowerView.ps1
#Get Domain Info
Get-NetDomain
#Specify Domain Name
Get-NetDomain -Domain moneycorp.local
#Get Domain SID
Get-DomainSID
#Get domain policy for the current domain
Get-DomainPolicy
(Get-DomainPolicy)."system access"
(Get-DomainPolicy)."Kerberos Policy"
(Get-DomainPolicy)."Version"
(Get-DomainPolicy)."Registry Values"
#Get domain policy for another domain
(Get-DomainPolicy–domainmoneycorp.local)."system access"
(Get-DomainPolicy–domainmoneycorp.local)."Kerberos Policy"
#Get domain controllers for the current domain
Get-NetDomainController
#Get domain controllers for another domain
Get-NetDomainController –Domain moneycorp.local
The ActiveDirectoryPowerShell module
#To use ActiveDirectorymodule without installing RSAT, we can use Import-Module
for the valid ActiveDirectorymodule DLL
https://docs.microsoft.com/en-us/powershell/module/addsadministration/?view=win10-ps
#import Module: We need to import both the .dll and psd1
Import-Module .\Microsoft.ActiveDirectory.Management.dll
Import-Module .\ActiveDirectory\ActiveDirectory.psd1
#Get Domain info after importing .dll and .psd1
GetADDomain
#Get object of another Domain
Get-ADDomain-Identity moneycorp.local
#Get domain SID for the current domain
(Get-ADDomain).DomainSID
#Get domain controllers for the current domain
Get-ADDomainController
#Get domain controllers for another domain
Get-ADDomainController -DomainName moneycorp.local -Discover
samratashok
#To use ActiveDirectorymodule without installing RSAT, we can use Import-Module
for the valid ActiveDirectorymodule DLL
https://github.com/samratashok/ADModule
Last updated
Was this helpful?