HTB LDAP SKILLS ASSESMENT

A few commands that could com in handy in the near future. This might just be a skills assessment however they are useful once we filter out the Good and bad and categorize into a better payload

Find the one user who has a useraccountcontrol attribute equivalent to 262656.

Get-ADUser -Filter {UserAccountControl -eq 262656} -Properties UserAccountControl

Using built-in tools enumerate a user that has the PASSWD_NOTREQD UAC value set.

Get-ADuser -filter 'protected -eq "False"'

What group is the IT Support group nested into?

Get-ADGroup -filter * -Properties MemberOf | Where-Object {$_.MemberOf -ne $null} | Select-Object Name,MemberOf

Who is a part of this group through nested group membership?

function Get-NestedGroupMembers {
    param(
        [string]$GroupName
    )

    $group = Get-ADGroup -Filter { Name -eq $GroupName } -Properties MemberOf

    if ($group -eq $null) {
        Write-Host "Group '$GroupName' not found."
        return
    }

    $members = Get-ADGroupMember -Identity $group.DistinguishedName

    foreach ($member in $members) {
        if ($member.objectClass -eq "group") {
            Write-Host "Nested Group: $($member.Name)"
            Get-NestedGroupMembers -GroupName $member.Name
        } else {
            Write-Host "User: $($member.Name)"
        }
    }
}

# Specify the group name you're interested in
$groupName = "Server Technicians"

# Get the Server Technicians group and its nested members
Write-Host "Checking Nested Group Memberships for: $groupName"
Get-NestedGroupMembers -GroupName $groupName

Find out nested groups

How many users are in the Former Employees OU?

What is the name of the computer that starts with RD? (Submit the FQDN in all capital letters)

How many groups exist where the admincount attribute is set to 1?

What is the samaccountname of the one SPN set in the domain?

What user could be subjected to an ASREPRoasting attack and is NOT a protected user? (first.last)

What non-default privilege does the htb-student user have?

Last updated