ad-pentest-lab

AD Pentest Lab on Azure

Active Directory lab creation - Initial steps

Creating Azure resources

Domain controller VM

User machine 1

User machine 2


Connecting to DC VM

RDP into GOTHAM-DC with Username : anjula & Password : labuser123Anjula

{DA4CEC44-B8D5-40E1-90AB-57BFC38D5772}.png

Configuring services

Launch Server manager > Add roles and features > Add roles and features wizard

Install service.

Choose “Promote this server to a domain controller”.

Promoting VM to domain controller

Active directory domain service configuration wizard > Deployment configuration > Add a new forest

photo_6320918058767599684_y.jpg

photo_6320918058767599685_y.jpg

photo_6320918058767599687_y.jpg

photo_6320918058767599688_y.jpg

Reboot machine.

RDP into GOTHAM-DC with domain credentials; Username : GOTHAM\anjula & Password : labuser123Anjula

photo_6320918058767599691_x.jpg

Configuring certificate services

Launch Server manager > Add roles and features > Add roles and features wizard

Install service.

Choose “Configure Active Directory certificate services on the destination server”.

photo_6320918058767599692_y.jpg

photo_6320918058767599693_y.jpg

AD CS configuration wizard >

photo_6320918058767599694_y.jpg

photo_6320918058767599695_y.jpg

photo_6320918058767599696_y.jpg

photo_6320918058767599697_y.jpg

Configure and reboot machine.


Setting up a share

This PC > C:\ Drive > Create new folder “hackme”

Launch Server manager > File and storage services > Shares > Tasks > New share wizard >

photo_6320918058767599699_y.jpg

Create and close.


Creating domain users

Launch Server manager > Tools > Active Directory users and computers > MARVEL.local

Create new Organizational unit (OU) “Groups”

Move every entry except “Guest” and “anjula” from Users to Groups

photo_6320918058767599701_y.jpg

photo_6320918058767599703_x.jpg

photo_6320918058767599702_y.jpg

MARVEL.local > Users >

Create new user

Create another user

photo_6320918058767599704_y.jpg

photo_6320918058767599705_x.jpg

photo_6320918058767599707_x.jpg

photo_6320918058767599706_x.jpg

Copy user “anjula” to create another user

SQLService > properties >

photo_6320918058767599708_y.jpg

photo_6320918058767599709_x.jpg

photo_6320918058767599711_x.jpg


Setting up SPNs

Launch Command prompt as administrator.

Setup SPN for SQLService account

setspn -a GOTHAM-DC/SQLService.GOTHAM.local:60111 GOTHAM\SQLService

Confirm SPN.

setspn -T GOTHAM.local -Q */*

photo_6320918058767599712_y.jpg

photo_6320918058767599713_y.jpg

Domain machine IP address

Command prompt >

ipconfig

Connecting to user machines

RDP into THEBATMAN with Username : bwayne and Password : myPassword01

Launch File explorer > Network

Turn on Network discovery.

Launch Settings > Network & internet > Ethernet > Change adapter settings

Choose Ethernet > properties > Internet Protocol version 4 (TCP/IPv4)

photo_6320918058767599724_y.jpg

RDP connection will be lost. Reconnect to the same user “bwayne”

Launch Settings > Accounts > Access work or school > Connect

Choose “Join this device to a local Active Directory domain”.

Join a domain >

photo_6320918058767599725_w.jpg

photo_6320918058767599726_x.jpg

Restart machine.

RDP into WAYNEENT with Username : lfox and Password : myPassword02

Repeat the same process above.

Configuring Domain users to user machines

Launch GOTHAM-DC > Server manager > Tools > Active Directory users and computers > MARVEL.local > Computers

Both user computers “THEBATMAN” and “WAYNEENT” is listed under the domain.

photo_6320918058767599728_y.jpg

RDP into THEBATMAN with admin credentials; Username : GOTHAM\anjula and Password : labuser123Anjula

Go to Computer management > Local users and groups > Groups > Administrators.

Choose “Add”

Select Users, computers, service accounts or groups >

Check names, then apply.

photo_6320918058767599729_y.jpg

photo_6320918058767599732_x.jpg

RDP into WAYNEENT with admin credentials; Username : GOTHAM\anjula and Password : labuser123Anjula

Go to Computer management > Local users and groups > Groups > Administrators.

Choose “Add”

Select Users, computers, service accounts or groups >

Check names & choose “Add” again

Check names, then apply.

photo_6320918058767599733_x.jpg


Re-connecting to machines with Domain user accounts

RDP into THEBATMAN machine with;

RDP into WAYNEENT machine with both;

and


Setting up the Attacker machine

Attacker VM

photo_6323169858581284747_y.jpg


Planning the attack methods - pentest structure

  1. LLMNR poisoning
  2. SMB relay
  3. IPv6 DNS attack
  4. MFP hacking

# #

to be continued…

Browse ad-pentest-lab GitHub Repo here.