Pentest Lab Setup Guide Updated
Pentest Lab Setup Guide Updated
WARNING
As you go through the activities, please keep the following in mind:
You will be using hacking tools! BE SURE to back up your computer before you start!
The IP addresses of your virtual machines are likely to be different from those shown in the
video or this setup guide. They are also likely to change from day to day. Use a separate piece of
paper/document to record IP addresses for handy reference during the activities. You will
probably have to update it from time to time.
Objectives
When you are through setting up your lab, you will have the following:
Pre-requisites
In order to reproduce the lab environment used during the course, you will need a desktop or laptop
host computer with the following MINIMUM hardware and software:
Note: You can, of course, modify the setup to suit your particular environment. For example, you could
install all host software onto another virtual machine, or use a different virtualization product. You could
also use physical computers that are networked, rather than virtual machines.
Uninstall Hyper-V
If you have never installed Hyper-V on your host, you can skip this task. If Hyper-V is installed on your
host, you will not only have to remove it in the Control Panel, you will also have to run a command to
disable an unremovable artifact so it does not interfere with VMware.
C:\Support Tools
C:\Operating Systems
C:\Hacking Tools
2. In your antivirus program, create an exemption for C:\Hacking Tools. Refer to your antivirus
software documentation for the exact procedure.
VMWare Workstation 15 Player for Windows (alternatively, VMWare Workstation Pro or Oracle
Virtual Box)
o https://www.vmware.com/products/workstation-player/workstation-player-
evaluation.html
7zip for 64-bit Windows
o https://www.7-zip.org/a/7z1805-x64.exe
Opera Browser for Windows
o https://www.opera.com/computer/thanks?ni=stable&os=windows
Wireshark 2.6.0 for Windows
o https://1.na.dl.wireshark.org/win64/Wireshark-win64-2.6.0.exe
Microsoft Baseline Security Analyzer (MBSA)
https://www.techspot.com/downloads/3886-microsoft-baseline-security-analyzer.html
A PDF reader such as Adobe Acrobat Reader or Foxit PDF Reader
o https://www.foxitsoftware.com/downloads/#Foxit-Reader/
o https://get.adobe.com/reader/
Mozilla Thunderbird for Windows
o https://www.thunderbird.net/en-US/
MailEnable Standard Edition (Free) Email Server
o http://www.mailenable.com/standard_edition.asp
Internet Explorer 7
o https://www.microsoft.com/en-us/download/internet-explorer-7-details.aspx
o Note: If you get a warning that Internet Explorer 7 is not compatible with your system,
ignore the warning and select Windows Internet Explorer 7 for Windows Server 2003
SP1 or Windows Server 2003 SP2
WARNING: Some of these tools are NOT NICE, and they come from NOT NICE PLACES. Use caution when
downloading. Some of these tools have no “official” website, or ar no longer supported by the vendor. If
the provided link no longer works, you will have to hunt for the tool yourself. Make sure you click the
correct download, as many sites will try to clickbait you into downloading something else. Turn off your
antivirus/antimalware software. Some browsers, such as Chrome and IE, might refuse to download
some tools. If that is the case, use the Opera browser to download the tools.
Low Orbit Ion Cannon (LOIC) -- WARNING: Your host antivirus, Google Chrome, and Internet
Explorer might all disallow this download. If you have problems, install the Opera browser on
your host, then temporarily disable your antivirus. Use Opera to download LOIC. Alternatively,
install Opera on your Windows Server 2016 Attacker VM and download LOIC directly to that VM.
https://sourceforge.net/projects/loic/
L0phtCrack 7 (Win64)
http://lc7.download/win64/
Note: This tool is hard to find. Because it is a Trojan, any antivirus will mark it as infected. If
necessary, download it directly using Opera onto Server 2016 VM with Windows Defender
disabled. Then copy to XP-SP2 VM.
Netcut
http://www.arcai.com/download_netcut/
1. On your host PC or laptop, locate and double-click the VMWare Workstation Player installer that
you downloaded. The name will be something like VMware-player-15.0.0-10134415.exe
2. On the setup welcome page, click Next.
3. On the End User License Agreement page, check the I accept the terms in the License
Agreement checkbox and click Next.
4. On the next Custom Setup page accept the defaults and click Next.
5. On the User Experience Settings page, uncheck the two check boxes and click Next.
6. On the Shortcuts page, accept the defaults and click Next.
7. On the Ready to install WMware Workstation 15 Player page, click Install.
8. When the wizard completes, click Finish.
9. If necessary, open VMware Workstation Player, and if prompted to enter a license key, ensure
that the Use VMware Workstation 15 Player for free for non-commercial use radio button is
checked, click Continue, then click Finish.
Set Up Server2016
You will set up Windows Server 2016 in a workgroup with the following:
Install the OS
Note about VMware Player: Unlike the Pro version, VMware Player will not let you manage multiple
VMs from the same dashboard. You can run multiple VMs at the same time, but will have to launch a
separate instance of VMware Workstation Player for every VM you wish to run. Just double-click the
launcher icon from your desktop to launch a separate VM. Do NOT install VMware player more than
once. Just start the launcher for each new VM.
1. Locate the Windows Server 2016 evaluation copy ISO that you downloaded. The name might be
similar to 14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US.iso. Keep the
location handy as you will need to refer to it.
2. If necessary, open VMware Workstation Player, and if prompted to enter a license key, ensure
that the Use VMware Workstation 15 Player for free for non-commercial use radio button is
checked, click Continue, then click Finish.
3. In VMware Workstation 15 Player, click Create a New Virtual Machine.
4. In the Welcome to the New Virtual Machine Wizard popup dialog box, under Install from:, click
the I will install the operating system later radio button and click Next.
5. On the Select a Guest Operating System page, ensure that the Microsoft Windows radio button
is selected, and in the Version dropdown box that Windows Server 2016 is selected. If you do
not have that choice, then select Windows 10 x64. Click Next.
6. On the Name the Virtual Machine page, in the Virtual machine name: text box, enter Server
2016 and click Next.
7. On the Specify Disk Capacity page, accept the defaults and click Next.
8. Click Finish.
9. In VMware Workstation Player, ensure that Server 2016 is select. Click Edit virtual machine
settings.
10. Adjust the Memory to 4 GB.
11. Click CD/DVD (SATA), click the Use ISO image file: radio button.
12. Click the Browse… button.
13. Browse to the Windows Server ISO, select it, and click Open.
14. Click OK
15. Click Play virtual machine.
16. When prompted to press any key, click inside the black installation window and press any key.
17. On the Windows Server 2016 page, accept the defaults and click Next.
18. On the next page, click Install now.
19. On the Select the operating system you want to install page, select Windows Server 2016
Standard Evaluation (Desktop Experience) and then click Next.
20. On the Applicable notices and license terms page, check the I accept the license terms
checkbox and click Next.
21. On the Which type of installation do you want? page select Custom: Install Windows only
(advanced).
22. On the Where do you want to install Windows? page, accept the default and click Next.
23. Allow Windows to install.
24. On the Customize settings page, enter and reenter the password Pa22w0rd (that’s a zero, not a
capital O) and click Finish.
25. If applicable, at the bottom of the VM, click Install Tools. In the Software Updates popup dialog
box, click Download and Install. If prompted by User Account Control, click Yes.
26. With Server2016 running in VMware, on the menu bar above the VM, click the Ctrl+Alt+Del
button.
27. At the Administrator login prompt, in the password text field, enter Pa22w0rd and press Enter.
28. If you see a message about Networks Do you want to allow your PC to be discoverable… click
Yes.
29. IF you do not see the VMware tools installing, press the Window key + R. In the Run line enter
D:\setup and press Enter. Click through the installation wizard, accepting the defaults. When the
installation is done, restart the server.
Add IIS
1. In Server Manager, switch to Dashboard.
2. Click Add roles and features.
3. Click Next.
4. Ensure that Role-based or feature-based installation is selected, and click Next.
5. Click Next again.
6. On the Select server roles page, check the Web Server (IIS) checkbox, click Next, click Add
Features, then click Next and Install.
7. If prompted, restart Server 2016 and log in again.
Disable the Firewall and Windows Defender Realtime Protection
1. Click the Start button and enter Command Prompt.
2. Right-click Command Prompt Run as administrator. When prompted by User Account
Control, click Yes.
3. Type these two commands. Press Enter after each:
1. Locate the MailEnable installer you downloaded. It will be named something like
standard1015.exe.
2. Drag and drop it from your host computer to the desktop of Windows Server 2016.
Note: if you are having trouble dragging and dropping, restart Server 2016 and try again.
3. When the installer has copied to the server desktop, double-click it.
4. Click OK.
5. Click Next.
6. On the Get Installation Settings page, in the Name: text box enter your name. In the Company:
text box, enter example.com
7. Click Next 5 times.
8. On the Get Postoffice Details page, in the Post Office Name: text box change the text to the
example.com
9. In the Password: text box, change the default to 1Password and click Next.
10. Click Next.
11. On the SMTP Connector Configuration page, in the Domain Name: text box example.com,
accept the other defaults, and click Next.
12. Click Next and allow the installation to continue.
13. On the Select WebMail Web Root page, ensure that the Configure web mail as an IIS Virtual
Directory checkbox is selected, and that the Web Server: dropdown box shows (Default Web
site) Default Web Site and then click Next.
14. Click Next again.
15. Click Finish.
16. If a browser page opens, close it.
Set Up Mailboxes
1. On the server, click Start.
2. In the M section, expand MailEnable.
3. Click MailEnable.
4. In the MailEnableAdmin console, on the left pane, under MailEnable Management, expand
Messaging Manager Messaging Manager Post Offices example.com
5. Double-click Mailboxes.
6. Verify that you see the Postmaster mailbox.
10. On the Mail Account Setup page, enter your name, the email address you created in
MailEnable, and the password you set for the mailbox in MailEnable.
18. Ensure that you can receive and read the email you sent to yourself.
19. In Thunderbird, on the left pane, select your account.
20. In the middle pane, under Accounts, under Set up an account, click Email.
21. Using the steps you just learned, set up an account for your second user.
22. Verify that you can see both users in Thunderbird, and that they can send email to each other.
Install Low Orbit Ion Cannon
Note: If your host antivirus deletes LOIC, open a browser on the Server attacker machine and download
it directly to the server attacker.
Install Wireshark
1. Locate the Wireshark installer in C:\Support Tools. It will be named something like Wireshark-
win64-2.6.0.exe.
2. Drag and drop it to the Server2016 desktop.
3. Perform a default installation.
Install FOCA
1. Drag and drop FOCA from your host’s C:\Hacking Tools to the Server2016 desktop.
2. Perform a default installation.
Set Up DC1
NOTE: If your mouse ever gets trapped inside a virtual machine, press Ctrl+Alt to release it.
Install the OS
1. Locate the Windows Server 2016 evaluation copy ISO that you downloaded. The name will be
similar to 14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US.iso. Keep the
location handy as you will need to refer to it.
2. If necessary, open VMware Workstation Player, and if prompted to enter a license key, ensure
that the Use VMware Workstation 15 Player for free for non-commercial use radio button is
checked, click Continue, then click Finish.
3. In VMware Workstation 15 Player, click Create a New Virtual Machine.
4. In the Welcome to the New Virtual Machine Wizard popup dialog box, under Install from:, click
the I will install the operating system later radio button and click Next.
5. On the Select a Guest Operating System page, ensure that the Microsoft Windows radio button
is selected, and in the Version dropdown box that Windows 10 x64 is selected. Click Next.
6. On the Name the Virtual Machine page, in the Virtual machine name: text box, enter DC1 and
click Next.
7. On the Specify Disk Capacity page, accept the defaults and click Next.
8. Click Finish.
9. In VMware Workstation Player, ensure that DC1 is select. Click Edit virtual machine settings.
10. Adjust the Memory to 4 GB.
11. Click CD/DVD (SATA), click the Use ISO image file: radio button.
12. Click the Browse… button.
13. Browse to the Windows Server ISO, select it, and click Open.
14. Click OK
15. Click Play virtual machine.
16. When prompted to press any key, click inside the black installation window and press any key.
17. On the Windows Server 2016 page, accept the defaults and click Next.
18. On the next page, click Install now.
19. On the Select the operating system you want to install page, select Windows Server 2016
Standard Evaluation (Desktop Experience) and then click Next.
20. On the Applicable notices and license terms page, check the I accept the license terms
checkbox and click Next.
21. On the Which type of installation do you want? page select Custom: Install Windows only
(advanced).
22. On the Where do you want to install Windows? page, accept the default and click Next.
23. Allow Windows to install.
24. On the Customize settings page, enter and reenter the password Pa22w0rd and click Finish.
25. If applicable, at the bottom of the VM, click Install Tools. In the Software Updates popup dialog
box, click Download and Install. If prompted by User Account Control, click Yes.
26. With Server2016 running in VMware, on the menu bar above the VM, click the Ctrl+Alt+Del
button .
27. At the Administrator login prompt, in the password text field, enter Pa22w0rd and press Enter.
28. If you see a message about Networks Do you want to allow your PC to be discoverable… click
Yes.
29. IF you do not see the VMware tools installing, press the Window key + R. In the Run line enter
D:\setup and press Enter. Click through the installation wizard, accepting the defaults. When the
installation is done, restart the server.
. If you do not see the launcher, click Start and search for Server Manager.
3. On the left pane, click Local Server.
4. In the PROPERTIES section, locate Computer name, and click the link (current computer name)
next to it.
ipconfig
3. Make note of the first three octets (subnet ID) of the IP address (for example, 192.168.98.) Also
make note of the Subnet Mask and Default Gateway.
4. On the Deployment Configuration page, click the Add a new forest radio button.
5. In the Root domain name: text box, enter example.com
6. Click Next.
7. On the Domain Controller Options page, in the Password: and Confirm password: text boxes,
enter Pa22w0rd
8. Click Next four times, ignoring any warnings, then click Install
9. Allow the installation to complete. The server will reboot automatically.
10. Log into DC1 as EXAMPLE\Administrator with the password of Pa22w0rd
3. In the left pane, expand Forest: example.com until you see the Default Domain Policy
4. Right-click Default Domain PolicyEdit
5. In the Group Policy Management Editor, expand Computer ConfigurationPoliciesWindows
SettingsSecurity SettingsAccount PoliciesPassword Policies.
Install Wireshark
1. Locate your download of Wireshark on the host.
2. Drag and drop it from your host to the DC1 desktop
3. Install it with default settings.
Install the OS
1. Using the same technique you used to install Server2016, create a default Server 2003 VM with
these settings:
Warning: There have been reports of VMware tools not installing properly on Windows Server
2003, or if they install, then suddenly the mouse does not work in Windows 2003. If that is the
case, you can ignore the problem. HOWEVER, be sure to choose “I will install the operating
system later” in the New Virtual Machine Wizard. This bypasses VMware installing the tools,
thus allowing the mouse to function.
Shut Down XP
1. From the desktop, click Start Turn Off Computer Turn Off.
1. At the Kali desktop, on the Favorits (Launcher) bar on the left, click the Firefox launcher
2. Open a new page to the following site. You can also conduct a Google search for 1000 most
common passwords rather than typing in the URL. Just be sure to go to this site.
https://github.com/DavidWittman/wpxmlrpcbrute/blob/master/wordlists/1000-most-common-
passwords.txt
4. When the raw page opens, right-click anywhere in the white space of the page Save Page
As.
5. In the breadcrumb trail at the top, click root, change the name to
1000_most_common_passwords, click the plain text document button, then click Save.
6. Verify that you have the file. On the Kali desktop, on the left side tool pane, click the Files
icon.
7. On the breadcrumb trail, if necessary, click Home. Make sure you see the file there.
Copy Scripts to Desktop
1. Using Kali’s Firefox, download the following scripts from the course files to the Kali Desktop:
pingsweep.sh
pingsweep2.sh
simplescan.sh
simplescan2.sh
portscan.sh
nmap_scanner.sh
Note: If you accidentally saved the scripts to the Downloads folder, use steps from the previous
task to help you navigate to the Downloads folder and copy the files to the Desktop.
2. Verify that you see the scripts on the Kali desktop.
ifconfig
Create pingsweep.sh
1. On the Kali desktop, open Leafpad by clicking its launcher icon from the Favorites (Launcher) bar
on the left.
2. Copy or type the following content (between the lines) into a new blank text file in Kali. Change
the IP address to match your subnet ID if necessary. Your results should look similar to this:
3. Save the file as pingsweep.sh on the Kali desktop.
do
ping -c 1 192.168.75.$ip
done
Create pingsweep2.sh
1. On Kali, open Leafpad
2. Copy or type the following content (between the lines) into a new blank text file in Kali
3. Save the file as pingsweep2.sh on the Kali desktop
#!/bin/bash
Create simplescan.sh
1. On Kali, open Leafpad
2. Copy or type the following content (between the lines) into a new blank text file in Kali
3. Save the file as simplescan.sh on the Kali desktop
#!/bin/bash
do
echo >/dev/tcp/192.168.75.10/$port &&
echo "Port $port is open" ||
echo "Port $port is closed"
done
Create simplescan2.sh
1. On Kali, open Leafpad
2. Copy or type the following content (between the lines) into a new blank text file in Kali
3. Save the file as simplescan2.sh on the Kali desktop
do
(echo >/dev/tcp/192.168.75.10/$port) > /dev/null 2>&1 &&
echo "$port open"
done
Create portscan2.sh
1. On Kali, open Leafpad
2. Copy or type the following content (between the lines) into a new blank text file in Kali
3. Save the file as portscan.sh on the Kali desktop
firstport=$1
lastport=$2
do
do
done
done
#!/bin/bash
echo "Port:"
read port
You will have to register using a real business email address, not a Gmail/Yahoo/Hotmail
webmail address. The trial is good for only 14 days, but you can keep requesting a new trial key
indefinitely.
Install Thunderbird
1. Ensure that Server2016 is running, as this is the email server.
2. Ensure that you know the IP address of Server2016.
3. Open an terminal and enter:
Alternatively, on the left pane Favorites Launcher bar, click the terminal icon to open a
terminal, type thunderbird and press Enter. (Note: if you use this method, do not close the
terminal window until you are ready to close Thunderbird!)
6. Set up Thunderbird for the user Moo using the same method you used in Server2016.
Install the OS
1. Use VMware Workstation Player to open Kali 2.
2. Log in as root / toor
3. Open and terminal and enter ifconfig
4. Ensure that the IP address is different from Kali. If it is not, restart Kali 2 and check again.
5. In VMware, right-click the new Kali and rename it to Kali 2.
Note: you do not have to worry about changing the computer name for Kali. Linux does not use
NetBIOS names, so duplicate names are not an issue like they are with Windows computers.
Set Up Metasploitable
Install the OS
1. Using the same procedure you used for Kali, use VMware Workstation Player to open the
Metasploitable VM.
2. Log in as msfadmin / msfadmin
3. There is no GUI. Verify that Metasploitable obtained a lease by entering ifconfig
Troubleshooting
Here are some troubleshooting steps you can use if you encounter specific difficulties during setup.
Uninstalling Hyper-V
Microsoft Hyper-V is not compatible with other virtualization products such as VMware or VirtualBox.
Additionally, when you uninstall Hyper-V, it will still leave an artifact of itself in the computer’s boot
record which you will need to remove manually.
If you uninstall Hyper-V and you still get an error message when you try to launch VMware Workstation
Player, perform this task:
1. As you specify roles and features, if you are prompted “Do you need to specify an alternate
path?...” click the Specify an alternate source path link at the bottom of the page.
2. Leave the installation windows open. Temporarily navigate to the Task Bar and click the File
Explorer icon at the bottom. In the This PC popup window, identify the drive letter for the DVD
Drive. It is most likely D: Ensure that the ISO you connected to the VM (to install the server)
appears as a DVD.
3. Return to the Add Roles and Features window.
4. In the Path: text box, enter D:\Sources\sxs\
5. Note: If your DVD is some other drive letter, substitute D with that letter.
6. Click OK, Next, or Install as prompted
Drag and Drop Between Host and Guests Does Not Work
If you installed VMware tools on your Guest VMs, you should be able to drag and drop between your
host and the Guest (at least Windows guests). If this does not work, then use any of these alternate
methods to move the files:
9. Click OK twice.
10. Click the Security tab
11. Click the Edit button
12. Click the Add button
13. In the Enter the object names to select text box, type everyone and press Enter.
14. Back in the Security tab, ensure that Everyone is selected.
15. In the Allow column, click Full control.
Create an ISO from C:\Hacking and Use the ISO to Move the Files
1. On your host, download a copy of Folder2Iso from here:
http://www.trustfm.net/software/utilities/Folder2Iso.php?page=Download
Note: You will have to choose a site from which to actually download it. I chose Google Drive.
The direct link is:
https://drive.google.com/file/d/0B7nKMWPhyfl-SlVoWXprWkhHR2c/view
2. Double-click the installer. It is actually just a self-extracting archive that, by default, will unzip
the folder to wherever you downloaded the installer to.
3. Locate the Folder2iso folder, and double-click Folder2iso.exe
4. Click Select folder, then browse to and select C:\Hacking Tools.
5. Click Select Output, browse to your desktop, and name the ISO Hacking Tools and click Save.
6. Click Generate ISO. When finished, it will say “ISO Generated” at the bottom left.
7. Switch to VMware Player for the VM that needs the tools.
8. Click PlayerManageVirtual Machine Settings.
9. On the Hardware tab, click CD/DVD (SATA).
10. On the right side, under Connection, click Use ISO image file:
11. Click Browse…
12. Browse to and select Hacking Tools.iso and click Open.
13. Click OK.
14. In the VM, browse to ComputerDVD Drive (D:)
15. Open up the D: drive and copy the files to the VM desktop.
~ finish ~