What is a Domain Controller?
What is an OU?
AD Enumeration
AD Enumeration: Traditional Approach
AD Enumeration: Modern Approach
AD Enumeration: Unravel nested groups
1. Adjust the PowerShell script from above to print out all groups in the domain:
$Searcher.SearchRoot = $objDomain
$Searcher.filter="(objectClass=Group)"
$Result = $Searcher.FindAll()
Foreach($obj in $Result)
{
$obj.Properties.name
}
*** When executed the groups are displayed ***
...
Key Admins
Enterprise Key Admins
DnsAdmins
DnsUpdateProxy
Secret_Group
Nested_Group
Another_Nested_Group
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
2. We can get the members of 'Secret_Group':
$Searcher.filter="(name=Secret_Group)"
$Result = $Searcher.FindAll()
Foreach($obj in $Result)
{
$obj.Properties.member
}
**** According to this output, 'Nested_Group' is a member of this group ****
CN=Nested_Group,OU=CorpGroups,DC=corp,DC=com
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
3. Alter to get the members of 'Nested_Group':
$Searcher.filter="(name=Nested_Group)"
**** According to this output, 'Another_ Nested_Group' is a member of this group ****
CN=Another_Nested_Group, OU=CorpGroups,DC=corp,DC=com
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_What is the concept behind finding currently logged on users?
** We want to find logged-in users that are members of high-value groups since their credentials will be cached in memory,
and we can steal their credentials and authenticate with them **
- We must tailor our enumeration to consider not only ‘Domain Admins’ but also potential avenues of “chained compromise”, including a hunt for a “derivative local admin”
What tools are helpful with enumerating currently logged on users?
AD Enumeration: Currently Logged on Users
*** Use PowerView.ps1
PS C:\Tools\active_directory> Import-Module .\PowerView.ps1
__________________________________
1. Enumerate logged-in users with Get-NetLoggedon along with the -ComputerName option and specify a workstation
– PS C:\Tools\active_directory> Get-NetLoggedon -ComputerName client251
__________________________________
2. Let’s try to retrieve active sessions on the domain controller DC01
– PS C:\Tools\active_directory> Get-NetSession -ComputerName dc01
Explain Service Principal Names
AD Enumeration: SPNs
What 2 authentication types are used by AD?
- NTLM
NTLM Authentication
Kerberos Authentication
What is the best way to use Mimikatz against LSASS as a general rule of thumb?
How would we use Mimikatz on a Windows target as standalone application with a user that has local admin?
What can we do after we obtain password hashes with Mimikatz, what can we do?
How can we use Mimikatz to get currently logged on users Kerberos TGT and TGS tickets?
– mimikatz # sekurlsa::tickets
What can we do with a Kerberos TGT ticket?
How can we use Kerberos for Service Account Attacks?
How can we request the Kerberos service ticket for the SPN ‘HTTP/CorWebServer.corp.com?
What is another way to list Kerberos tickets, besides Mimikatz?
How do we download Kerberos Service Tickets from memory with Mimikatz?
– mimikatz # kerberos::list /export
What tool can we use to try and and crack encrypted Kerberos Service Tickets?
- - kali@kali:~$ sudo apt update && sudo apt install kerberoast