Cybersecurity Build Book
Cybersecurity Build Book
Cybersecurity Build Book
Analyst
Build book
Jensky Colin
Table of Contents
Index.............................................................................................................................................................. 2
Lab Design ..................................................................................................................................................... 3
Cybersecurity Build Book .............................................................................................................................. 4
Install Windows Server using Virtual Box ..................................................................................................... 4
Step 1 – Download Virtual Box ................................................................................................................. 4
Step 2 – Launch Virtual Box ...................................................................................................................... 4
Step 3 – Network card configuration ........................................................................................................ 4
Step 4 – Install Windows image ................................................................................................................ 5
Step 5 – Windows Settings ....................................................................................................................... 6
Step 6 - Edit and view the VM settings ..................................................................................................... 9
Step 7 – Start the VM .............................................................................................................................. 11
Step 8 – Windows Server 2016 installation ............................................................................................ 11
Windows Server 2016 configuration .......................................................................................................... 14
Configure Active Directory and Domain Server ...................................................................................... 14
Add roles and Features to the Server. .................................................................................................... 16
Configure AD ........................................................................................................................................... 17
Create a New User ...................................................................................................................................... 21
Add client’s computer to the Domain......................................................................................................... 23
Pfsense installation and configuration ....................................................................................................... 26
Windows Server setup to use pfsense .................................................................................................... 30
Pfsense rules configuration..................................................................................................................... 32
Sumologic configuration ............................................................................................................................. 34
Create Collection..................................................................................................................................... 34
Create Collection alert ............................................................................................................................ 37
Nessus Vulnerability Server scan ................................................................................................................ 40
N-stalker Web server scan .......................................................................................................................... 43
Badstore .................................................................................................................................................. 43
Web scanner ........................................................................................................................................... 44
Deploying IPS (Snort) module in PFsense ................................................................................................... 46
Pfsense setup .......................................................................................................................................... 46
Get a Snort OinkCode ............................................................................................................................. 50
Enable Snort as IPS .................................................................................................................................. 53
Installing and configuring Sophos ............................................................................................................... 55
Create Sophos account ........................................................................................................................... 55
1|Page
Index
FIGURE 1-NETWORK SHARING CENTER ................................................................................................................ 14
FIGURE 2-ETHERNET STATUS ................................................................................................................................ 15
FIGURE 3-TCP/IPV4 ............................................................................................................................................... 15
FIGURE 4-IPV4....................................................................................................................................................... 16
FIGURE 5-LAUNCH START MANAGER ................................................................................................................... 16
FIGURE 6-DASHBOARD ......................................................................................................................................... 17
FIGURE 7- DESTINATION SERVER .......................................................................................................................... 18
FIGURE 8- AD / DNS .............................................................................................................................................. 18
FIGURE 9 - PROMOTE SERVER .............................................................................................................................. 19
FIGURE 10 - DOMAIN NAME ................................................................................................................................. 19
FIGURE 11 – PASSWORD....................................................................................................................................... 20
FIGURE 12 - ADDITIONAL OPTION ........................................................................................................................ 20
FIGURE 13- USERS AND COMPUTERS ................................................................................................................... 21
FIGURE 14- CREATE USER ..................................................................................................................................... 21
FIGURE 15 - NEW USER ......................................................................................................................................... 22
FIGURE 16 - CLIENT STATIC IP ............................................................................................................................... 23
FIGURE 17- SYSTEM PROPERTIES.......................................................................................................................... 24
FIGURE 18- DOMAIN NAME.................................................................................................................................. 24
FIGURE 19 - CLIENT LOG ....................................................................................................................................... 25
FIGURE 20-PFSENSE VM SETUP ............................................................................................................................ 26
FIGURE 21 -LOAD PFSENSE ISO FILE ..................................................................................................................... 27
FIGURE 22- PFSENSE ADAPTER 1 .......................................................................................................................... 27
FIGURE 23 - PFSENSE ADAPTER 2 ......................................................................................................................... 28
FIGURE 24 – ACCEPT ............................................................................................................................................. 28
FIGURE 25 - INSTALL PFSENSE .............................................................................................................................. 29
FIGURE 26 - DEFAULT KEYMAP ............................................................................................................................. 29
FIGURE 27 - COMPLETED INSTALLATION .............................................................................................................. 30
FIGURE 28 - WINDOWS SERVER ADAPTER 1 ........................................................................................................ 30
FIGURE 29 - WINDOWS SERVER ADAPTER 2 ........................................................................................................ 31
FIGURE 30 - ADAPTER 2 ........................................................................................................................................ 31
FIGURE 31 - CREATED ALIASE ............................................................................................................................... 32
FIGURE 32 - ADD RULE .......................................................................................................................................... 32
FIGURE 33 - EDIT RULE.......................................................................................................................................... 33
FIGURE 34 - SET SOURCE AND DESTINATION ....................................................................................................... 33
FIGURE 35 - RULE CREATED .................................................................................................................................. 34
FIGURE 36 - CREATE COLLECTION......................................................................................................................... 35
FIGURE 37_ ADD COLLECTOR ............................................................................................................................... 35
FIGURE 38- COLLECTOR TYPE ............................................................................................................................... 36
FIGURE 39- WINDOWS SOURCES.......................................................................................................................... 36
FIGURE 40- CREATE COLLECTION ......................................................................................................................... 37
FIGURE 41 - EVENT SEARCH .................................................................................................................................. 38
FIGURE 42-PARSE EVENTCODE ............................................................................................................................. 38
FIGURE 43 - PARSE EVENT .................................................................................................................................... 38
FIGURE 44- NAME YOUR ALERT ............................................................................................................................ 39
FIGURE 45 - NESSUS CODE.................................................................................................................................... 40
FIGURE 46-CREATE A SCAN................................................................................................................................... 41
FIGURE 47- SCAN OPTION .................................................................................................................................... 41
FIGURE 48-CUSTOMIZE SCAN ............................................................................................................................... 42
FIGURE 49- BADSTORE SERVER ............................................................................................................................ 43
FIGURE 50 - BADSTORE WEB ACCESS ................................................................................................................... 43
2|Page
Lab Design
3|Page
Cybersecurity Build Book
Install Windows Server using Virtual Box
Before proceeding, if the lab asks, click the Preferences icon, select Network, and click on the
Add new NAT Network icon to create a NAT Network card.1 You will be not able to do it after
launching your Virtual Machine.
1
NAT Network. A NAT network is a type of internal network that allows outbound connections.
4|Page
Step 4 – Install Windows image
Now ready to install the Windows image. Click the New icon.
5|Page
Name your VM, choose the operating system and the version you will create.
2
https://docs.microsoft.com/en-us/windows-server/get-started/system-requirements
6|Page
Select Create a Virtual Disk now.
7|Page
Select Dynamically allocated in the next window.
View the default select location of the VM and select the hard disk size to allocate the VM.
Virtual Box recommended 50 GB.
8|Page
Step 6 - Edit and view the VM settings
Select the name of your new VM to edit the settings and click the Settings icon.
Click the System icon and select the boot order where to find your image.
Select the Processor tab and choose the number of processors to assign.
9|Page
Click on Storage to load the ISO file to the VM, select Empty, click the optical disk icon, and find
the windows server 2016 ISO.
10 | P a g e
Click on Network, within your network adaptor tab selected, attached the NAT Network.
Click OK
11 | P a g e
Select Desktop experience version
12 | P a g e
Choose a Password.
13 | P a g e
Windows Server 2016 configuration
14 | P a g e
Figure 2-Ethernet Status
Figure 3-TCP/IPV4
15 | P a g e
Figure 4-IPV4
If Server Manager did not open automatically, click the Windows Start button and select Server
Manager. (Figure 5)
In the Server Manager window, select Dashboard if it is not already selected. (Figure 6)
16 | P a g e
Figure 6-Dashboard
Configure AD
17 | P a g e
Figure 7- Destination Server
Figure 8- AD / DNS
18 | P a g e
Figure 9 - Promote Server
19 | P a g e
Figure 11 – Password
20 | P a g e
Create a New User
1. With the Dashboard open, click Tools, and click Active Directory Users and Computers. Figure 13
2. In the Active Directory Users and Computers, click the down arrow left your Domain Name.
3. Right click Users, New and click User. Figure 14
4. Create the User. Figure 15
5. Next
6. Create a password and click Finish.
21 | P a g e
Figure 15 - New User
22 | P a g e
Add client’s computer to the Domain
1. Setup static IP for the client, add the Server IP address as client’s DNS. (Figure 16)
2. Try to ping each other. Maybe you could have to disable the Windows Firewall.
3. Open Windows System info click Change Settings.
4. In System Properties click change. (Figure 17)
5. In Computer Name/Domain Changes window, enter the Domain Name. (Figure 18)
6. Enter the Server admin Password
7. Click Close and click Restart Now
8. Login to the client with the created user. (Figure 19)
23 | P a g e
Figure 17- System Properties
24 | P a g e
Figure 19 - Client log
25 | P a g e
Pfsense installation and configuration
26 | P a g e
Figure 21 -load pfsense iso file
27 | P a g e
Figure 23 - Pfsense Adapter 2
Figure 24 – Accept
28 | P a g e
Figure 25 - Install pfsense
29 | P a g e
Figure 27 - Completed installation
1. Setup two Network Adapters, both as Host-Only. (Figure 28) (Figure 29)
2. Start the Windows Server VM.
3. Set Static IP for Adapter 2 by using the Firewall LAN IP as Default Gateway. (Figure 30)
30 | P a g e
Figure 29 - Windows Server Adapter 2
Figure 30 - Adapter 2
31 | P a g e
Pfsense rules configuration
1. Access the firewall webpage by using his IP Address (192.168.1.1) and Sign In.
2. Change the password.
3. Click on Firewall menu and click Aliases.
4. Click Add to create aliases. (Figure 31)
5. Save
6. Click Apply changes
7. Click Firewall menu and select Rules.
8. Click the Lan link and click Add. (Figure 32)
9. In Edit Firewall Rule, Select Block in Action menu, LAN interface, IPV4 Address Family, and TCP
protocol. (Figure 33)
10. Any source
11. In Destination, Select Single Host or Aliases. (Figure 34)
12. Click Apply Changes. (Figure 35)
32 | P a g e
Figure 33 - Edit Rule
33 | P a g e
Figure 35 - Rule created
Sumologic configuration
Create Collection
1. Go to sumologic website (https://www.sumologic.com/)
2. Create an account.
3. Download Sumologic Agent
4. Click on Manage Data – Collection (Figure 36 - Create Collection)
5. Click the link Add a Collector (Figure 37_ Add Collector)
6. Select Installed Collector and download (Figure 38- Collector type)
7. Install SumoCollector agent on your server.
8. Click Next and Accept the agreement.
9. Next
10. Login to SumoLogic
11. Click the link Add Source beside the server name.
12. Choose a Windows Sources. (Figure 39- Windows Sources)
13. Fill the field. (Figure 40- Create collection)
34 | P a g e
Figure 36 - Create Collection
35 | P a g e
Figure 38- Collector type
36 | P a g e
Figure 40- Create collection
37 | P a g e
Figure 41 - Event search
38 | P a g e
Figure 44- Name your Alert
39 | P a g e
Nessus Vulnerability Server scan
1. Make sure Server and Client can communicate together and have internet connection.
2. Go to https://www.tenable.com/downloads/nessus, and download the last Nessus version for
windows server.
3. Start the installation in the client machine.
4. Go to https://www.tenable.com/try, and click Nessus Try for free.
5. Enter your information and receive and evaluation code to your email.
6. Click Activate Account.
7. Create and account.
8. When the installation done, Nessus will launch your browser to the localhost port 8894.
9. Plugins will be downloaded.
10. Enter your received code. (Figure 45 - Nessus Code)
11. Click new Scan button (Figure 46-Create a scan)
12. Select your desire scan option. (Figure 47- Scan Option)
13. Enter the server IP address. (Figure 48-Customize scan)
14. Save and start the scan.
40 | P a g e
Figure 46-Create a scan
41 | P a g e
Figure 48-Customize scan
42 | P a g e
N-stalker Web server scan
Badstore
1. Load and install Badstore as web application
2. Type ifconfig to see your Badstore IP address. (Figure 49- Badstore server)
3. Setup the web application to be in your network.
4. Use the IP address in a browser to access the web page. (Figure 50 - Badstore web access)
43 | P a g e
Web scanner
44 | P a g e
45 | P a g e
Deploying IPS (Snort) module in PFsense
Pfsense setup
1. Setup 2 network interfaces for the pfsense. 1 NAT adapter as 1 Host only adapter. (Figure 51 -
Adapter 1) (Figure 52 - Adapter 2)
2. Install pfsense if it not already.
3. Launch pfsense. (Figure 53-pfsense interface)
4. Launch Windows server
5. Setup Server in the same network than pfsense.
6. Test internet connection on pfsense then Windows Server.
7. In a browser, type the pfsense LAN IP address. (Figure 54 - pfsense login)
8. In order to install Snort, go to System – Package Manager – Available Packages (Figure 55-
pfsense packages) and type snort in the search bar.
9. Click Install and Confirm. (Figure 56-Install snort)
10. When completed go to Service, click snort. (Figure 57 - snort installed)
11. In the next screen, click Add for network interfaces settings. (Figure 58- Add interfaces)
12. Keep the default settings for both interfaces. (Figure 59-Interface settings)
13. Click Global Settings to add rule to Snort.
14. Select Enable Snort GPLv2, Enable ET Open, Enable OpenAppID.
15. On enable Snort VRT, click the link Sign Up for a free Registered User.
Figure 51 - Adapter 1
46 | P a g e
Figure 52 - Adapter 2
47 | P a g e
Figure 54 - pfsense login
48 | P a g e
Figure 56-Install snort
49 | P a g e
Figure 58- Add interfaces
50 | P a g e
Figure 60-Snort sign up
Figure 61-Oinkcode
51 | P a g e
Figure 62-Snort Oinkmaster Code
52 | P a g e
Figure 64-Update Snort Rules
1. Click Edit to add alert to block offenders in WAN. (Figure 66-WAN block alert)
2. Click Save
3. Click Edit to add alert to block offenders in LAN. (Figure 67-LAN block Offenders)
4. Click Save
5. LAN and WAN blocking enabled. ( Figure 68- IPS enabled)
53 | P a g e
Figure 67-LAN block Offenders
54 | P a g e
Installing and configuring Sophos
55 | P a g e
Figure 69- Sophos account
56 | P a g e
Figure 71- Download Sophos Endpoint Agent
57 | P a g e
Figure 73 - Users and Computers
58 | P a g e
Figure 75 - Admin sign-in
59 | P a g e
Figure 77- Tamper password
60 | P a g e