├── LICENSE ├── README.md └── img ├── HomeLab.jpg ├── parrot ├── parrot_1.png └── parrot_2.png ├── pfsense ├── pfsense_1.png ├── pfsense_10.png ├── pfsense_2.png ├── pfsense_3.png ├── pfsense_4.png ├── pfsense_5.png ├── pfsense_6.png ├── pfsense_7.png ├── pfsense_8.png └── pfsense_9.png └── securityonion ├── so_1.png ├── so_10.png ├── so_11.png ├── so_12.png ├── so_13.png ├── so_14.png ├── so_15.png ├── so_2.png ├── so_3.png ├── so_4.png ├── so_5.png ├── so_6.png ├── so_7.png ├── so_8.png └── so_9.png /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Nitav Shah 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HomeLab-Setup 2 | HomeLab Setup with a Firewall, SIEM Solution, Exploitable machines and an Attacker. 3 | 4 | # What is a Homelab? 5 | A Homelab is an environment meant to simulate enterprise components and configuration. The goal here is to understand the process of installing, configuring, maintaining and updating this entire infrastructure. We are building a virtualized Homelab as it is beginner friendly and easier to configure and spin up. 6 | 7 | # Tools 8 | - Attacker - Parrot Security OS 9 | - Firewall - pfSense 10 | - IDS - SecurityOnion 11 | - SIEM - Splunk 12 | - Hypervisor - VMWare/Virtualbox 13 | - Domain Controller - Windows Active Directory 14 | - Vulnerable Machines - Ubuntu, Windows, DVWA 15 | 16 | # Network Design 17 | ![Network Design & Topology](/img/HomeLab.jpg) 18 | 19 | # Guide 20 | ## Selecting and Downloading a Hypervisor 21 | We will need a Hypervisor to install all of our tools and services. 22 | 23 | I'll be using VMWare Workstation, being a student I get a license for it for free. Although VirtualBox is also a great free alternative as a Hypervisor. 24 | 25 | You can download VMWare Workstation at - 26 | 27 | [VMWare Workstation Download](https://www.vmware.com/products/workstation-pro/workstation-pro-evaluation.html) 28 | 29 | You can download VirtualBox at - 30 | 31 | [Virtualbox Download](https://www.virtualbox.org/wiki/Downloads) 32 | 33 | ## Installing and Configuring the Firewall - pfsense 34 | pfsense will act as the edge of our Homelab virtual network and will be only accessible from the Parrot Machine. 35 | 36 | pfsense community edition can be downloaded from - [pfsense community edition ISO](https://www.pfsense.org/download/) 37 | 38 | You can follow these steps to install & configure pfsense - 39 | 1. Open VMWare Workstation & Create a new Virtual Machine with the "Typical (recommended)" setting. 40 | 41 | 2. Browse the pfsense CE ISO file and select Next. 42 | (You might need to extract the ISO file from your pfsense download as it is usually zipped.) 43 | 44 | ![pfsense New VM](./img/pfsense/pfsense_1.png) 45 | 46 | 3. Change your VM name to "pfsense" & click Next. 47 | 48 | 4. Leave the disk size to 20GB and ensure split virtual disk into multiple files option is selected. 49 | 50 | ![pfsense Disk Size](./img/pfsense/pfsense_2.png) 51 | 52 | 5. Click on customize hardware and increase the memory limit to 1GB. 53 | 54 | 6. Add 5 Network Adapters and correspond them with a VMnet interface as per the image by selecting Custom specific Virtual Network. 55 | 56 | ![pfsense Network Adapters](./img/pfsense/pfsense_3.png) 57 | 58 | 7. Select Finish. The pfsense machine will power on and you can accept all the default values, after that pfsense will boot. 59 | 60 | 8. Press Install, and select all the default configurations. 61 | 62 | ![pfsense Installer](./img/pfsense/pfsense_4.png) 63 | 64 | 9. After the pfsense is done rebooting you will reach this screen. 65 | 66 | ![pfsense Configuration](./img/pfsense/pfsense_5.png) 67 | 68 | 10. Select option 1 to set up the VLAN. Follow by - 69 | 70 | **'Should VLAN's be set up now [y|n]?' - n** 71 | 72 | Enter the interfaces in respective order for each prompt - 73 | 1. em0 -> WAN 74 | 2. em1 -> LAN 75 | 3. em2 -> Optional 1 76 | 4. em3 -> Optional 2 77 | 5. em4 -> Optional 3 78 | 6. em5 -> Optional 4 79 | 80 | **'Do you want to proceed [y|n]?' - y** 81 | 82 | ![pfsense Interface Selection](img/pfsense/pfsense_6.png) 83 | 84 | 11. Select option 2. We will configure the LAN Interface so select 2 again. 85 | 86 | We will use IP Address **192.168.1.1** to access the pfsense WebGUI. Configure the LAN Interface same as below. 87 | 88 | ![pfsense LAN Interface](img/pfsense/pfsense_7.png) 89 | 90 | For, **'Do you want to revert to HTTP as the webConfigurator protocol? (y/n)' - n** 91 | 92 | 12. The Configuration for OPT1 Interface is - 93 | 94 | ![pfsense OPT1 Interface](img/pfsense/pfsense_8.png) 95 | 96 | 13. The Configuration for OPT2 Interace is - 97 | 98 | ![pfsense OPT1 Interface](img/pfsense/pfsense_9.png) 99 | 100 | 14. The OPT3 Interface should be left without an IP as it is going to have the span port with traffic that the IDS (Security Onion) is going to be monitoring. 101 | 102 | 15. The Configuration for OPT3 Interface is - 103 | 104 | ![pfsense OPT1 Interface](img/pfsense/pfsense_10.png) 105 | 106 | 16. With this we have configured the pfsense VM. Rest of the configuration will be done using the Parrot Machine through the WebConfigurator. 107 | 108 | ## Installing and Configuring the IDS - Security Onion 109 | Security Onion is an open-source IDS, Security Monitoring and Log Management solution. 110 | 111 | You can download Security Onion from - 112 | 113 | [Security Onion Download](https://github.com/Security-Onion-Solutions/securityonion/blob/master/VERIFY_ISO.md) 114 | 115 | Follow these steps to install and configure Security Onion for our network - 116 | 117 | 1. Open VMWare Workstation and select Typical Installation -> Next 118 | 119 | 2. Click on installer disc image file and browse & select the Security Onion ISO file -> Next 120 | 121 | ![Security Onion VMWare](./img/securityonion/so_1.png) 122 | 123 | 3. Choose Linux in Guest Operating System and CentOS 7 64-bit -> Next 124 | 125 | ![Security Onion VMWare Version](./img/securityonion/so_2.png) 126 | 127 | 4. Put in SecurityOnion as the VM name -> Next 128 | 129 | 5. Specify disk size (**minimum 200GB**) make sure to store it as a single file -> Next 130 | 131 | ![Security Onion Disk Size](./img/securityonion/so_4.png) 132 | 133 | 6. Click 'Customize Hardware' -> Increase Processor to 2 -> Change memory to 4-32GB (I recommend atleast 8 GB)-> Add 2 Network Adapters and assign them Vmnet4 & Vmnet5 134 | 135 | ![Security Onion Hardware Customization](./img/securityonion/so_5.png) 136 | 137 | 7. Click Finish and Bootup the 'SecurityOnion' VM -> Click Enter on the 'Installing Security Onion in basic graphic mode' 138 | 139 | 8. After loading, enter 'yes' when you get this prompt. 140 | 141 | ![Security Onion Warning](./img/securityonion/so_6.png) 142 | 143 | 9. Set a username and password for the administrator account -> After Security Onion reboots enter those credentials -> Select Yes 144 | 145 | ![Security Onion Setup](./img/securityonion/so_7.png) 146 | 147 | 10. Select 'Run the standard Security Onion installation' 148 | 149 | 11. Select the EVAL option 150 | 151 | ![Security Onion Install Type](./img/securityonion/so_8.png) 152 | 153 | 12. Type 'Agree' 154 | 155 | 13. Select a hostname, I kept the default 156 | 157 | 14. Use spacebar to select ens33 as the management interface -> Press Enter 158 | 159 | ![Security Onion Management Interface](./img/securityonion/so_9.png) 160 | 161 | 15. Select DHCP to set up the the management interface 162 | 163 | 16. Select 'YES' -> Select 'OK' -> Select 'Standard' for how this manager should be installed. 164 | 165 | 17. Select 'Direct' -> After preflight checks, select ens35 as the Monitor Interface 166 | 167 | ![Security Onion Monitor Interface](./img/securityonion/so_10.png) 168 | 169 | 18. Select 'Automatic' for the OS patch schedule -> Accept all default values for Home Network CIDR ranges, Docker IP Range, 170 | 171 | 19. Enter Email Address and password for your Email account for Admin account 172 | 173 | 20. Select 'IP' for access to web interface -> Select 'Yes' for NTP server and accept defaults. 174 | 175 | 21. Enter '192.168.3.10' when asked for an IP address to access Web Interface 176 | 177 | ![Security Onion Web Interface IP](./img/securityonion/so_11.png) 178 | 179 | 22. Take a screenshot of the final settings, **Especially the Web Access IP Address** 180 | 181 | ![Security Onion Settings](./img/securityonion/so_12.png) 182 | 183 | 23. You will get this prompt at the end of installation of Security Onion. 184 | 185 | ![Security Onion Final](./img/securityonion/so_13.png) 186 | 187 | 24. Next we will access the Security Onion Interface from our VLAN Network which normally the SOC will do. Any machine like Ubuntu or any other flavour in the network will work and you can set it up on your own. I am using Kali as I have it already installed. 188 | 189 | 25. After the VM is installed you can get the IP Address of the machine and add it to the Security Onion instance by running the command 190 | 191 | ``` 192 | sudo so-allow 193 | ``` 194 | 195 | Enter your password -> Type 'a' and wait for the process to complete. 196 | 197 | ![Security Onion Firewall Access](./img/securityonion/so_14.png) 198 | 199 | This will create a firewall rule on Security Onion for the Kali Linux machine that will allow you access to the Web Interface. 200 | 201 | 26. Go to the Security Onion web interface address on the Kali Machine. You can login in it using the Email ID and Password you provided during the setup. 202 | 203 | ![Security Onion Web Interface Access](./img/securityonion/so_15.png) 204 | 205 | 27. Your Security Onion is configured. 206 | 207 | ## Configuring Parrot OS Machine 208 | 209 | I have used Kali Machines extensively before, but I wanted to try out Parrot OS that is why I will be using a Parrot OS as an attack machine to perform offensive attacks against the Domain Controller (Windows Active Directory) and other machines on the virtual network. You can use the Kali Machine if you like. 210 | 211 | [Parrot OS Download Link](https://www.parrotsec.org/download/) 212 | 213 | 214 | [Parrot OS Installation Guide on VMWare](https://www.parrotsec.org/docs/parrot-on-vmware.html) 215 | 216 | After installing the Parrot OS iso as a new VM in VMWare Workstation, before booting it change the Network Adapter to Vmnet2 and its Memory to 4GB. 217 | 218 | ![Parrot OS Configuration](./img/parrot/parrot_1.png) 219 | 220 | Power on the machine using the credentials during the setup. 221 | 222 | The Parrot OS Machine is ready to use. 223 | 224 | ![Parrot OS](./img/parrot/parrot_2.png) 225 | -------------------------------------------------------------------------------- /img/HomeLab.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/HomeLab.jpg -------------------------------------------------------------------------------- /img/parrot/parrot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/parrot/parrot_1.png -------------------------------------------------------------------------------- /img/parrot/parrot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/parrot/parrot_2.png -------------------------------------------------------------------------------- /img/pfsense/pfsense_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/pfsense/pfsense_1.png -------------------------------------------------------------------------------- /img/pfsense/pfsense_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/pfsense/pfsense_10.png -------------------------------------------------------------------------------- /img/pfsense/pfsense_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/pfsense/pfsense_2.png -------------------------------------------------------------------------------- /img/pfsense/pfsense_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/pfsense/pfsense_3.png -------------------------------------------------------------------------------- /img/pfsense/pfsense_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/pfsense/pfsense_4.png -------------------------------------------------------------------------------- /img/pfsense/pfsense_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/pfsense/pfsense_5.png -------------------------------------------------------------------------------- /img/pfsense/pfsense_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/pfsense/pfsense_6.png -------------------------------------------------------------------------------- /img/pfsense/pfsense_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/pfsense/pfsense_7.png -------------------------------------------------------------------------------- /img/pfsense/pfsense_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/pfsense/pfsense_8.png -------------------------------------------------------------------------------- /img/pfsense/pfsense_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/pfsense/pfsense_9.png -------------------------------------------------------------------------------- /img/securityonion/so_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/securityonion/so_1.png -------------------------------------------------------------------------------- /img/securityonion/so_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/securityonion/so_10.png -------------------------------------------------------------------------------- /img/securityonion/so_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/securityonion/so_11.png -------------------------------------------------------------------------------- /img/securityonion/so_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/securityonion/so_12.png -------------------------------------------------------------------------------- /img/securityonion/so_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/securityonion/so_13.png -------------------------------------------------------------------------------- /img/securityonion/so_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/securityonion/so_14.png -------------------------------------------------------------------------------- /img/securityonion/so_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/securityonion/so_15.png -------------------------------------------------------------------------------- /img/securityonion/so_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/securityonion/so_2.png -------------------------------------------------------------------------------- /img/securityonion/so_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/securityonion/so_3.png -------------------------------------------------------------------------------- /img/securityonion/so_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/securityonion/so_4.png -------------------------------------------------------------------------------- /img/securityonion/so_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/securityonion/so_5.png -------------------------------------------------------------------------------- /img/securityonion/so_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/securityonion/so_6.png -------------------------------------------------------------------------------- /img/securityonion/so_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/securityonion/so_7.png -------------------------------------------------------------------------------- /img/securityonion/so_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/securityonion/so_8.png -------------------------------------------------------------------------------- /img/securityonion/so_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shahnitav/HomeLab-Setup/b6afa325435d9fa8514f8f1c0edb4ef51a26277d/img/securityonion/so_9.png --------------------------------------------------------------------------------