# AD Module and PowerView

* Generate Metasploit payloads using msfvenom
* Using Metasploit payloads with an AMSI bypass stager from memory

Tools

<table><thead><tr><th width="164">Tool</th><th>GIT</th></tr></thead><tbody><tr><td>AD Module</td><td><a href="https://github.com/samratashok/ADModule">https://github.com/samratashok/ADModule</a></td></tr><tr><td>PowerView</td><td><a href="https://github.com/PowerShellMafia/PowerSploit">https://github.com/PowerShellMafia/PowerSploit</a></td></tr><tr><td>SharpView</td><td><a href="https://github.com/tevora-threat/SharpView">https://github.com/tevora-threat/SharpView</a></td></tr></tbody></table>

### PowerView Enumeration

<table><thead><tr><th width="245">Command</th><th>Description</th></tr></thead><tbody><tr><td>Get-NetDomain</td><td>Get current domain</td></tr><tr><td>Get-DomainSID</td><td>Get domain SID for the current domain</td></tr><tr><td>Get-NetDomainController</td><td>Get domain controllers for the current domain</td></tr><tr><td><p>Get-NetUser </p><p>Get-NetUser –Username fileadmin</p></td><td>Get a list of users in the current domain</td></tr><tr><td>Find-UserField -SearchField Description -SearchTerm "built"</td><td>Search for a particular string in a user's attributes</td></tr><tr><td>Get-NetComputer Get-NetComputer –OperatingSystem "<em>Server 2019</em>"</td><td>Get a list of computers in the current domain</td></tr><tr><td>Get-NetGroup</td><td>Get all the groups in the current domain</td></tr><tr><td>Get-NetGroupMember -GroupName "Domain Admins" -Recurse</td><td>Get all the members of the Domain Admins group</td></tr><tr><td>Get-NetGroup –UserName "fileadmin"</td><td>Get the group membership for a user</td></tr></tbody></table>

### AD Module Enumeration

<table><thead><tr><th width="400">Command</th><th>Description</th></tr></thead><tbody><tr><td>Get-ADDomain</td><td>Get current domain</td></tr><tr><td>(Get-ADDomain).DomainSID</td><td>Get domain SID for the current domain</td></tr><tr><td>Get-ADDomainController</td><td>Get domain controllers for the current domain</td></tr><tr><td><p>Get-ADUser -Filter * -Properties * </p><p>Get-ADUser -Identity fileadmin -Properties *</p></td><td>Get a list of users in the current domain</td></tr><tr><td>Get-ADUser -Filter 'Description -like "<em>built</em>"' -Properties Description | select name,Description</td><td>Search for a particular string in a user's attributes</td></tr><tr><td>Get-ADComputer -Filter * | select Name Get-ADComputer -Filter 'OperatingSystem -like "<em>Server 2019</em>"' - Properties OperatingSystem | select Name,OperatingSystem</td><td>Get a list of computers in the current domain</td></tr><tr><td>Get-ADGroup -Filter * | select Name</td><td>Get all the groups in the current domain</td></tr><tr><td>Get-ADGroupMember -Identity "Domain Admins" -Recursive</td><td>Get all the members of the Domain Admins group</td></tr><tr><td>Get-ADPrincipalGroupMembership -Identity fileadmin</td><td>Get the group membership for a user</td></tr></tbody></table>


---

# 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://linux-ad.certs-study.com/domain-enumeration/ad-module-and-powerview.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.
