# Active Directory Methodology

## Extract domain info using IPC$ Share

IPC$ Share is essential for communication between programs and remotely accessing or managing another computer.

```bash
enum4linux IP
```

{% embed url="<https://dec-solutions.com/what-is-the-ipc-share-and-why-should-you-care/>" %}

## Find objects updated since a specific date

```powershell
$ChangeDate = New-Object DateTime(2022, 02, 28, 12, 00, 00)
Get-ADObject -Filter 'whenChanged -gt $ChangeDate' -includeDeletedObjects -Server za.tryhackme.com
```

## Show domain users

```powershell
net user /domain
```

## Show specific info of domain user

```powershell
net user william.torres /domain
```

## Show domain groups

```powershell
net group /domain
```

## Show members of a group

```powershell
net group "Tier 1 Admins" /domain
```

## Show Password Policy

```powershell
net accounts /domain
```

## Show info about the Domain

```powershell
Get-ADDomain -Server za.tryhackme.com
```

## Perform password-spray attack without locking accounts

We need to search accounts with the `badPwdCount` attribute greater than 0, those accounts will be avoided in our password-spray attack.

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

> This will only show results if one of the users in the network mistyped their password a couple of times.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lanzt.gitbook.io/cheatsheet-pentest/windows-things/active-directory-methodology.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
