Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 4.89 KB

16. Active Directory Lab Build.md

File metadata and controls

59 lines (42 loc) · 4.89 KB

Active Directory Lab Build

Lab Overview and Requirements

16 GB of RAM at least

Lab Build - (Cloud Alternative)

Azure: https://medium.com/@kamran-bilgrami/ethical-hacking-lessons-building-free-active-directory-lab-in-azure-6c67a7eddd7f

Downloading Necessary ISOs

Setting Up the Domain Controller

  • in vmware, add a new virtual machine with your server iso. We want the core, not the data center. No need to provide a product key. Uncheck power on.
  • once created, in the machine settings, remove the floppy drive. Allow 4 GB of memory. Make sure that NAT is enabled.
  • hit play. Press any key to boot, otherwise nothing will happen. Check your language preferences and install. Select Standard Evaluation (Desktop Experience). Accept the terms and select custom install. Select the empty drive, click new and apply. Then, hit next to install.
  • add an admin password, P@$$w0rd!. Send ctrl+alt+del with the vmware button, log in.
  • click VM > install VMWare tools. Once prompted, open D drive, install the complete vmware tools on your server.
  • search for view your PC name. Rename it to HYDRA-DC. Restart the server.
  • log in. Click on Manage, Add Roles and Features. Let the default settings. For Server Roles, select Active Directory Domain Services. Hit next several times and then install.
  • once done, click close and then on the yellow flag. Click on Promote this server to a domain controller. Select Add a new forest and name the root domain as MARVEL.local. Reuse the same password. Hit next several times and then install.

Setting Up the User Machines

User 1

  • we need two user machines. One is OK if you're low on RAM or space.
  • create a new virtual machine, use the windows 10 enterprise iso. Select windows 10 enterprise. No need to provide a product key. Uncheck power on.
  • once created, in the machine settings, remove the floppy drive. Allow 4 GB of memory. Make sure that NAT is enabled.
  • hit play. Press any key to boot, otherwise nothing will happen. Check your language preferences and install. Accept the terms and select custom install. Select the empty drive, click new and apply. Then, hit next to install.
  • select your region and the keyboard layout. When asked for an email, click on Domain join instead. Give the name Frank Castle and the password Password1. Answer Bob to three security questions. Decline all the extra features.
  • once logged in, click VM > install VMWare tools. Once prompted, open D drive, install the complete vmware tools on your computer.
  • search for view your PC name. Rename it to THEPUNISHER. Restart the computer.

User 2

  • repeat the process for the second user machine. The user name could be David Lieberman, Password2 for his password, and his machine could be MICROCHIP.

Setting Up Users, Groups, and Policies

  • on the server, go to Tools > Active Directory Users & Computers. Create a new Organizational Unit called Groups under MARVEL.local. Drag & drop all the Security groups from Users to Groups.
  • create users and service accounts: Tony Stark and SQL service by copying the admin user, Frank Castle, Peter Parker, and David Lieberman. Very often, service accounts have admin rights when doing pentests (bad practice).
  • click on File & Storage Services > Shares. Then, click on Tasks > New share. Create a quick share, name it hackme and use all the default settings to create the shared folder.
  • open cmd tool as an admin, enter setspn -a HYDRA-DC/SQLService.MARVEL.local:60111 MARVEL\SQLService. Check the setup: setspn -T MARVEL.local -Q */*.
  • open group policy management as an admin. Right click on MARVEL.local under Domains, create a new GPO, name it Disable windows defender. Enforce the newly created policy. Edit it, under Policies > Admin Templates > Windows Components, look for Windows Defender Antivirus, click on Turn off Windows Defender Antivirus and enable this setting.

Joining Our Machines to the Domain

  • grab the domain controller ip (ipconfig on server machine).
  • on the first user machine, create a Share folder and share it. Open Network & Internet settings > Change Adapter Options. Open Ethernet properties, edit IPV4 address, add the domain controller ip as DNS address.
  • look for Access work or school in your Windows settings. Click connect, then Join this device to an Active Directory domain. Enter MARVEL.local. Connect with the admin credentials. Skip the second step, and restart.
  • Login as another user, with fcastle and your user password.
  • sign out, log in as marvel\administrator. Open Computer Management. Under Local Users & Groups, open Administrators, add fcastle.
  • repeat the whole process for user 2. Add fcastle as an admin on this second machine too.
  • on your domain controller, you should see the 2 computers under Computers.