Attack Active Directory: Enumeration
MITM and Samba exploits not working?
1. Kerberos Username Enumeration
Download Here: https://github.com/ropnop/kerbrute/releases. Install, chmod the file, thats it.
2. LDAP Enumeration
Check out: https://book.hacktricks.xyz/network-services-pentesting/pentesting-ldap and https://www.n00py.io/2020/02/exploiting-ldap-server-null-bind/
>>> import ldap3 >>> server = ldap3.Server('x.X.x.X', get_info = ldap3.ALL, port =636, use_ssl = True) >>> connection = ldap3.Connection(server) >>> connection.bind() True >>> server.info >>> connection.search(search_base='DC=vault,DC=offsec', search_filter='(&(objectClass=*))', search_scope='SUBTREE', attributes='*') >>> connection.entries >>> connection.search(search_base='DC=htb,DC=local', search_filter='(&(objectClass=person))', search_scope='SUBTREE', attributes='userPassword') >>> connection.entries
Change use_ssl to False if it doesn't connect. Different ports like 3268 can work. Check description field for accidental passwords.
3. Bloodhound
Benefit of BloodHound: Make pretty graphs for clients to understand. Also to visualize what is going on in the domain.
On Kali:sudo apt install bloodhound sudo neo4j console (default creds: neo4j/neo4j) bloodhoundOn Active Directory:
Get Collector Here: https://github.com/BloodHoundAD/BloodHound/tree/master/Collectors
powershell -ep bypass . .\SharpHound.ps1 Invoke-BloodHound -CollectionMethod All -Domain vulcan.local -ZipFileName file.zip
Next: Go to (bloodhound) instance and upload the file. Run different queries to obtain graphs.
Invoke-BloodHound can take awhile.
4. PowerView
powershell -ep bypass -nop . .\PowerView.ps1 Get-NetDomain Get-NetDomainController (info about Domain Controller, if you can't find it) Get-DomainPolicy (Get-DomainPolicy).SystemAccess Get-NetUser Get-NetUser | select cn Get-NetUser | select cn, description Get-UserProperty -Properties pwdlastset Get-NetGroup -GroupName *admin* Get-NetGroupMember -GroupName "Domain Admins" Invoke-ShareFinder Get-NetGPO (show client what bad group policies they have)
Comments
Post a Comment