Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 

Repository files navigation

Microsoft Active Directory Logo

Active Directory Deployed in the Cloud (Azure)

This tutorial outlines the implementation of Active Directory within Azure Virtual Machines.

Environments and Technologies Used

  • Microsoft Azure (Virtual Machines/Compute)
  • Remote Desktop
  • Active Directory Domain Services
  • PowerShell

Operating Systems Used

  • Windows Server 2022
  • Windows 10 (21H2)

High-Level Deployment and Configuration Steps

  • Setup Resources in Azure
  • Ensure Connectivity between the client and Domain Controller
  • Install Active Directory
  • Create an Admin and Normal User Account in AD
  • Join Client-1 to your domain (mydomain.com)
  • Setup Remote Desktop for non-administrative users on Client-1
  • Create a bunch of additional users and attempt to log into client-1 with one of the users

Deployment and Configuration Steps

Disk Sanitization Steps

Create the virtual machine for the domain controller DC-1 and name the Resource Group to be made at the same time (AD-1)


Disk Sanitization Steps

Create the second VM (Client-1).


Disk Sanitization Steps

Choose the Vnet that was created with VM1 (DC-1). Ignore the name above. The above example should show (AD-1vnet).


Disk Sanitization Steps

Open DC-1.


Disk Sanitization Steps

Click on Networking on the left hand side.


Disk Sanitization Steps

Click on the NIC (Network Interface Card).


Disk Sanitization Steps

Then click on IP Configurations on the left hand side.


Disk Sanitization Steps

Click on the IP Address in the middle where it says dynamic.


Disk Sanitization Steps

Set the IP Address to static and save.


Disk Sanitization Steps

Log into Client-1 and ping DC-1.


Disk Sanitization Steps

Log into DC-1 and open Windows Defender Firewall.


Disk Sanitization Steps

Sort Inbound Rules by protocol and enable ICMP Core Diagnostics Rules as seen above.


Disk Sanitization Steps

Ping is succeeding.


Disk Sanitization Steps

Click Add Roles and Features to install Active Directory.


Disk Sanitization Steps

Click Next until Server Roles then add Active Directory Domain Services.


Disk Sanitization Steps

Click next until finished and install.


Disk Sanitization Steps

Next, click flag on top right corner to promote server to a domain controller.


Disk Sanitization Steps

Add a new forest.


Disk Sanitization Steps

Click next through the prompts and enter a password when requested and continue to install.

Disk Sanitization Steps

Server will restart and you will have to login as a mydomain (or whatever domain name you chose) user.


Disk Sanitization Steps

Open Active Directory User and Computers.


Disk Sanitization Steps

Create a few Organizational Units.


Disk Sanitization Steps

Admins and Employees created.


Disk Sanitization Steps

Click on admin and right click in the panel to create a new user.


Disk Sanitization Steps

Create Jane Doe Admin User.


Disk Sanitization Steps

Set password and uncheck "set password on next login" and "check password never expires" for this example.


Disk Sanitization Steps

Right click jane doe user and go to properties, members then click add.


Disk Sanitization Steps

Write domain and click check names.


Disk Sanitization Steps

Select Domain Admins and click okay.


Disk Sanitization Steps

Click apply.


Disk Sanitization Steps

Jane Doe is now a part of the domain admins security group and has admin permissions.


Disk Sanitization Steps

Logout of labuser and log back in as Jane Doe.


Disk Sanitization Steps

Login as jane_admin.


Disk Sanitization Steps

Successfully logged in as jane_admin.


Disk Sanitization Steps

We need to set Client-1's DNS to DC-1's private IP now. Navigate to DC-1 on Azure and retreive the private IP address.


Disk Sanitization Steps

Go to Client-1's NIC by going to Networking on the left and clicking Network Interface.


Disk Sanitization Steps

Click on the NIC to the right of Network Interface in bold.


Disk Sanitization Steps

Click on DNS Servers on the left, change from Inherit to Custom and paste DC-1's private IP. Make sure no spaces exist before and after the address and save.


Disk Sanitization Steps

Go back to Client-1 VM and restart to flush the DNS cache.


Disk Sanitization Steps

Log back into Client-1.


Disk Sanitization Steps

Use ipconfig /all command in Command Prompt to see what DNS server address is being used. (10.0.0.4) in this case. It was successful.


Disk Sanitization Steps

Now right click the start menu and go to System.


Disk Sanitization Steps

Click on rename this PC.


Disk Sanitization Steps

Click on change.


Disk Sanitization Steps

Change the domain name to mydomain.com and click okay and then fill in the login and password as shown.


Disk Sanitization Steps

Login successful as jane_admin. Now restart.


Disk Sanitization Steps

Now log back into Client-1 as jane_admin.


Disk Sanitization Steps

Right click start menu and go to system.


Disk Sanitization Steps

Click on remote desktop.


Disk Sanitization Steps

Click on "select users that can remotely access this PC".


Disk Sanitization Steps

Click on add and type in domain users and check names, then click okay.


Disk Sanitization Steps

Domain Users has been added. Now all domain users are allowed to log into this computer.


Disk Sanitization Steps

Click on start menu and then Windows Administrative Tools.


Disk Sanitization Steps

Open DC-1 and go to start menu, then Active Directory Users and Computers.


Disk Sanitization Steps

Click on mydomain.com, Users then Domain Users.


Disk Sanitization Steps

All created users get added to this group. Now any non administator can log in so let's create some users.


Disk Sanitization Steps

Now make sure you're logged into DC-1 as jane_admin or log in if not. We will create a bunch of users.


Disk Sanitization Steps

Open PowerShell ISE as Administrator by right clicking.


Disk Sanitization Steps

Open a new script and write the script shown.


Disk Sanitization Steps

Click run script.


Disk Sanitization Steps

Random users are being created.


Disk Sanitization Steps

Open Active Directory Users and Computers.


Disk Sanitization Steps

Click on the _EMPLOYEES Organizational Unit created earlier and notice all the users created. All users will have passwords of Password1.


Disk Sanitization Steps

Pick a user and right click to go to properties. Then go to the account tab and copy the username. Go to Client-1.


Disk Sanitization Steps

Logout of Client-1 as jane doe.


Disk Sanitization Steps

Log back into Client-1 as the user you chose.


Disk Sanitization Steps

Login was successful.


Disk Sanitization Steps

kim.big is logged into Client-1 after being created as a user on DC-1.


Disk Sanitization Steps

Everytime a new user logs in, a new folder will be created on the PC.


Disk Sanitization Steps

If too many login attempts are made, you can click properties on the user and go to account tab and click unlock and apply.


Disk Sanitization Steps

You can also reset password or disable account by right clicking. That's it! Congratulations on implementing Active Directory!


About

Multi-VM Active Directory lab in Azure for offensive security testing and detection engineering practice.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors