Prologue
Welcome back, fellow cybersecurity enthusiasts! In our last blog, we embarked on the exciting journey of setting up domain users and computers for an Active Directory (AD) lab. Today, we'll take things a step further as we delve into the world of penetration testing on our freshly established AD domain.
So, buckle up as we explore the process of resolving network issues and installing Kali Linux to launch an effective pen test on our AD domain.
Installing Kali Linux
Kali Linux, the go-to operating system for ethical hackers, is a powerful tool that equips us with a wide array of penetration testing utilities. You can find the VMware image for Kali Linux from the below link.
https://www.kali.org/get-kali/#kali-virtual-machines
Installing Kali Linux in VMware is a straightforward process. Choose either the 32-bit or 64-bit version based on your host machine's architecture and follow the below steps.
- Open VMware Workstation Player.
- Go to "File" > "Open..."
- Browse to the location where you downloaded or saved the Kali Linux VMX file.
- Select the VMX file and click "Open."
After importing the VMX file, VMware Workstation Player will display the virtual machine's settings. Review and verify the hardware configuration to ensure it meets your requirements. You can make changes to the hardware settings if needed. Once you've reviewed the settings, click "Play virtual machine" to power on the Kali Linux virtual machine.
After booting into Kali linux, perform apt update && apt upgrade
to install all libraries and dependencies in the Kali Linux VM.
Now lets try reaching our Domain Controller of our AD lab using nmap
.
Now we have setup our pentesting VM. But still we have a problem, where the AD domain and the attacker are on different subnets. We will be resolving this network issue for better connectivity for performing the pentesting.
Resolving Network Issues
Before we venture into penetration testing, it's crucial to ensure that our network is robust and error-free. In this section, we'll address common network issues and provide effective troubleshooting methods to resolve them. We take the next step towards optimizing our network by our shifting VMs to a different subnet and resolving DNS connectivity issues.
On the Host's machine, you can find many interfaces for VMware
,
For our AD lab, I will be using the interface VMnet1
,
Changing the network adapters of every VMs (3 AD VMs + 1 Kali VM) on their Virtual Machine settings to VMnet1
.
Now changing the DNS and Static IP in the Domain Controller.
Flushing the DNS cache and registering it again to reflect the changes.
After the IP gets changed successfully, lets start the Performance Counters
of the DNS server. Now the DNS should work perfectly within our new subnet.
After the network adapter change, our attacker VM will also be in the same subnet.
Now the both machines should be able to interact perfectly.
We haven't made any changes on our Domain Computers yet.
Performing the network changes using the Local Administrator credential of those machines.
Now our Domain Computers should be perfectly connected to the domain.
By default we cannot ping our Domain Computers due to the firewall present in the system. If we need to enable pings we can enable the rule for the Inbound connections on the Domain Computers.
Now lets run a nmap
scan to check the result after adding it in /etc/hosts
.
The attacker VM is now configured to interact with the domain subnet. But it needs internet access to install offensive tools and dependencies. This can be simply sorted out by adding a second network interface to the VM.
Conclusion
Congratulations! You've successfully transformed your AD lab from a basic domain setup to an advanced penetration testing environment using Kali Linux. By honing your skills in resolving network issues and performing ethical hacking, you're well on your way to becoming a proficient cybersecurity professional.
Stay tuned for more exciting cybersecurity topics in our upcoming blogs! Happy hacking, and as always, stay curious and stay secure.