# Creating a AD structure

1. Open the "Server Manager", click on "Tools" and then "Active Directory Users and Computers".

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2Fgit-blob-d421b127f17eede6c032178891ab7554b051002e%2Fimage.png?alt=media" alt=""></div>

### Creating a Organizational Unit (OU)

2\. Extend the directories and right click on "amsterdam.bank.local", select "New" and "Organizational Unit". Give it the name `Employees` and click on "OK"

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2Fgit-blob-b10e8691e9ea6bd828ddd4975aa65e8ec32df41c%2Fimage.png?alt=media" alt=""></div>

### Creating Groups

1. Right click on the newly created OU and select "New" and then "Group"

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2Fgit-blob-775ac1f744ab2e821bf6651f4a45d85da8487405%2Fimage.png?alt=media" alt=""></div>

2\. Fill in "Finance" and click on "OK"

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2Fgit-blob-c06f1fdd66de6a509e0084ada2600d44370748a9%2Fimage.png?alt=media" alt=""></div>

3\. Repeat and create the following groups:

* Finance
* HR
* Employees
* IT

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2Fgit-blob-3f179fdfdbfe2f2d40e441d937e5b0a314a2e6cb%2Fimage.png?alt=media" alt=""></div>

### Creating Users

For attack path \<url to attackpath> we need to create an user account in the IT-group, to create an account we can use `net user /add <username> <password> /domain` and to add it inside the IT-group we can use `net group IT <username> /add /domain`. In this example we're using the following commands:

```
net user /add IT-support01 Sup3rCompl1c4t3dP4ssw0rd2022 /domain
net group IT IT-Support01 /add /domain
```

With the command `net user <username> /domain` it's possible to check someone's group memberships. In this example we're using the following command:

```
net user IT-Support01 /domain
```

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FpDC5ATn07ebkBfxH0Pgx%2Fafbeelding.png?alt=media&#x26;token=57388dd1-2f0a-4b07-b66a-5f34cfcbf692" alt=""></div>

For attack path \<url to attackpath> we need to create an user account in the Employees-group, to create an account we can use `net user /add <username> <password> /domain` and to add it inside the Employees-group we can use `net group Employees <username> /add /domain`. In this example we're using the following commands:

```
net user /add pukcab Bangbang123 /domain
net group Employees pukcab /add /domain
```

The password `Bangbang123` is a commonly used password from 2020, see refferences for the passwordlist.

With the command `net user <username> /domain` it's possible to check someone's group memberships. In this example we're using the following command:

```
net user pukcab /domain
```

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2F7rL1fMTBuSJSI9CMpdle%2Fafbeelding.png?alt=media&#x26;token=7c565e79-9dec-4d88-862f-ddbe9a2b0b96" alt=""></div>

## References

{% embed url="<https://github.com/danielmiessler/SecLists/blob/master/Passwords/2020-200_most_used_passwords.txt>" %}
