Remember to connect to THM network via OpenVPN

Generating my own set of credentials.

hollie.norris Password: Jxug4101

Credential Injection – AD enumeration –

$dnsip = "10.200.49.101"
$index = Get-NetAdapter -Name 'Ethernet' | Select-Object -ExpandProperty 'ifIndex'
Set-DnsClientServerAddress -InterfaceIndex $index -ServerAddresses $dnsip

It didn’t work for runas.exe command. It was due to OpenVPN Network Adapter was still using IPv6 DNS Servers assigned by DHCP.

I have successfully checked SYSVOL directory from NOT domain joned computer (with valid AD creds)

Enumeration through Microsoft Management Console

Remember to add one DNS server with access to Global DNS System, before installing
run mmc console from runas.exe cmd

Further enumeration based on TryHackMe tasks:

Task 4: Enumeration through Command Prompt

Now I will be using AD joined computer. net user command does not work from runas.exe

net user /domain
net user <username> /domain
net group /domain

Password policy:
net accounts /domain

TryHackMe drawbacks

Commands used to retrieve anserws for THM task

Task 5 –  Enumeration through PowerShell

Powershell cmdlets regarding Active Directory: https://docs.microsoft.com/en-us/powershell/module/activedirectory/?view=windowsserver2022-ps

Get-ADGroupMember -Identity Administrators -Server za.tryhackme.com

If we want to search for accounts which are applicable for password spraying, we can use “badPwdCount”. Thanks to this and password policy we won’t lockout accounts.

Get-ADObject -Filter 'badPwdCount -gt 0' -Server za.tryhackme.com

Task 5 solutions:


What is the value of the Title attribute of Beth Nolan (beth.nolan)?

Get-ADUser -Identity beth.nolan -Server za.tryhackme.com -Properties Title


What is the value of the DistinguishedName attribute of Annette Manning (annette.manning)?


Get-ADUser -Identity annette.manning -Server za.tryhackme.com -Properties DistinguishedName

When was the Tier 2 Admins group created?

Get-ADGroup -Identity “Tier 2 Admins” -Properties whencreated


What is the value of the SID attribute of the Enterprise Admins group?

Get-ADGroup -Identity “Enterprise Admins”


Which container is used to store deleted AD objects?

Task 6 – Enumeration through Bloodhound

.\SharpHound.exe –CollectionMethods All –Domain za.tryhackme.com –ExcludeDCs

CollectionMethods – Determines what kind of data Sharphound would collect. The most common options are Default or All. Also, since Sharphound caches information, once the first run has been completed, you can only use the Session collection method to retrieve new user sessions to speed up the process.

Domain – Here, we specify the domain we want to enumerate. In some instances, you may want to enumerate a parent or other domain that has trust with your existing domain. You can tell Sharphound which domain should be enumerated by altering this parameter.

ExcludeDCs -This will instruct Sharphound not to touch domain controllers, which reduces the likelihood that the Sharphound run will raise an alert.
.bin file is SharpHound output

I will use attackbox to speed up my work:

I only need to download ZIP file
neo4j console start

and in another terminal:

bloodhound --no-sandbox

Further learning:

  • LDAP enumeration – Any valid AD credential pair should be able to bind to a Domain Controller’s LDAP interface. This will allow you to write LDAP search queries to enumerate information regarding the AD objects in the domain.
  • PowerView – PowerView is a recon script part of the PowerSploit project. Although this project is no longer receiving support, scripts such as PowerView can be incredibly useful to perform semi-manual enumeration of AD objects in a pinch.
  • Windows Management Instrumentation (WMI) – WMI can be used to enumerate information from Windows hosts. It has a provider called “root\directory\ldap” that can be used to interact with AD. We can use this provider and WMI in PowerShell to perform AD enumeration

By Marceli

Leave a Reply

Your email address will not be published. Required fields are marked *