Introduction to Active Directory
Active Directory (AD): Its a directory service used to managed windows network, Store the information on the network and makes it easily available to …
In this part we will discus Domain Enumration using PowerView or ADModule and I’ll use PowerView.
let’s import it
PS C:\Users\adlab> . .\PowerView.ps1
PS C:\Users\adlab> Get-NetDomain
PS C:\Users\adlab> Get-NetDomain -Domain <Domain name>
PS C:\Users\adlab> Get-DomainSID
PS C:\Users\adlab> Get-NetDomainController
PS C:\Users\adlab> Get-NetDomainConroller -Domain <Domain Name>
PS C:\Users\adlab> Get-DomainPolicy
PS C:\Users\adlab> Get-NetUser
PS C:\Users\adlab> Get-NetUser | select cn
PS C:\Users\adlab> Get-NetUser -SamAccountName <The name of User>
PS C:\Users\adlab> Get-UserProperty
PS C:\Users\adlab> Get-UserProperty -Properties pwdlastset
PS C:\Users\adlab> Find-UserField -SearchField Description -SearchTerm "password"
sameaccountname Description
--------------- -----------
SQL Service my pass is : MYpassword123$
PS C:\Users\adlab> Get-NetLoggedon -ComputerName <servername>
PS C:\Users\adlab> Get-NetComputer
PS C:\Users\adlab> Get-NetComputer -FullData
PS C:\Users\adlab> Get-NetComputer -ping
PS C:\Users\adlab> Get-NetGroup
PS C:\Users\adlab> Get-NetGroup -Domain <targetdoamin>
PS C:\Users\adlab> Get-NetGroup -FullData
PS C:\Users\adlab> Get-NetGroup *admin*
PS C:\Users\adlab> Get-NetGroupMember -GroupName 'Domain Admins'
PS C:\Users\adlab> Get-NetLocalGroup -ComputerName <dcname>
PS C:\Users\adlab> Get-NetLocalGroup -ComputerName <dcname> -ListGroups
PS C:\Users\adlab> Invoke-ShareFinder -verbose
PS C:\Users\adlab> Invoke-FileFinder -verbose
PS C:\Users\adlab> Get-NetFileserver -verbose
notice :: if you do not know what is GPO go to introduction of Active Directory you will get it there.
PS C:\Users\adlab> Get-NetGPO
PS C:\Users\adlab> Get-NetGPO | select displayname
PS C:\Users\adlab> Get-NetGPO -ComputerName <ComputerName>
And there is a module in PowerView called (gpresult) It display the resultant set of policy information for a target user and computer, and we will use pareameter ‘/R’ for display SRoP summary data and also we can use too ‘/v’ parameter to display verbose information of the domain
PS C:\Users\adlab> gpresult /R /V
PS C:\Users\adlab> Get-NetGPOGroup
PS C:\Users\adlab> Find-GPOComputer -ComputerName <domainname>
PS C:\Users\adlab> Find-GPOLocation -UserName <username> -verbose
PS C:\Users\adlab> Get-NetOU -FullData
PS C:\Users\adlab> GetNetGPO -GPOname "gplink"
PS C:\Users\adlab> Get-ObjectAcl -SamAccountName <domainname> -ResolveGUIDs
PS C:\Users\adlab> Get-NetDomainTrusts
PS C:\Users\adlab> Get-NetForest
PS C:\Users\adlab> Get-NetForestDomain
PS C:\Users\adlab> Get-NetForestCatalog
PS C:\Users\adlab> Get-NetForestTrust
PS C:\Users\adlab> Get-NetDomainTrusts
PS C:\Users\adlab> Find-LocalAdminAccess -Verbose
There is another way if ports like (RPC, SMB) used by Find-LocalAdminAccess are blocked , we can done it using remote administrator tools like WMI and PowerShell remoting.
PS C:\Users\adlab> . .\Find-WMILocalAdminAccess.ps1
PS C:\Users\adlab> Find-WMILocalAdminAccess
PS C:\Users\adlab> Invoke-UserHunter
PS C:\Users\adlab> Invoke-UserHunter -CheckAccess
PS C:\Users\adlab> Invoke-UserHunter -Stealth
know we will talk about Defending part and have a look at most lethal enumeration techniques : user hunting.
Netcease : is an script which changes permission on the NetSessionEnum method by removing permission for Authenticated users group.
This script fails many of attacker’s session enumeration.
PS C:\Users\adlab> . .\NetCease.ps1
There is another interesting script from the same auther is SAMRi10 which hardens Windows10 and windows server 2015 against enumertion which uses SAMAR protocol like (net.exe)
Using powershell module ingestor
PS C:\Users\adlab> . .\SharpHound.ps1
PS C:\Users\adlab> Invoke-BloodHound -CollectionMethod All
Using powershell module ingestor
PS C:\Users\adlab> .\SharpHound.exe -CollectionMethod All
And now we finish this sieres (Active Directory Enumeration) in the next sieres we will talk about Local Privilege Escalation part , I hope you enjoy reading .. see you <3.
Active Directory (AD): Its a directory service used to managed windows network, Store the information on the network and makes it easily available to …
Hello friends, I will make a new series about IOT Hacking because I want to share my knowledge with y’all, I hope it will be useful and easy to …