Home lab - DefiantCoder/Tech-Journals GitHub Wiki

Kali

  • Version: Debian 10.x 64-bit
  • Disk: 40gb
  • Memory: 4gb
  • Network: NAT

Deliverable 1. Provide a screenshot of your kali-lab vm pinging google.com similar to the one below

image

Vyos

  • Version: Debian 10.x 64-bit

  • Disk: 8gb

  • Memory: 1gb

  • Network: NAT

  • Network 2: NAT

    • eth0: 192.168.229.0
    • eth1: 10.0.5.0
  • remove hw-ids

configure
delete interfaces ethernet eth0 hw-id
delete interfaces ethernet eth1 hw-id
commit
save
exit
  • Set IP addresses
configure
set interfaces ethernet eth0 description "NAT on VMnet8"
set interfaces ethernet eth0 address 192.168.229.10/24
set interfaces ethernet eth1 description "RANGE on VMnet5"
set interfaces ethernet eth1 address 10.0.5.2/24
  • set next hop
set protocols static route 0.0.0.0/0 next-hop 192.168.229.2
set system name-server 192.168.229.2

commit
save
exit

Deliverable 2. Provide a screenshot similar to the one below that displays your interfaces as well as a successful ping against google.com image

Centos

  • Version: CentOS 6 64-bit

  • Disk: 20gb

  • Memory: 1gb

  • Network: VMnet5

  • In the installer wen setting software change from Desktop to ==> Web Server

  • go to customize now and under development add Development tools and Server Platform Development

  • add a new user

useradd deployer
passwd deployer
usermod -aG wheel deployer
  • after this find the line Allows people in group wheel to run all and uncomment it in the below file
vi /etc/sudoers

Next in this file delete the lines that start with HWADDR and UUID and change ONBOOT to yes

vi /etc/sysconfig/network-scripts/ifcfg-eth0

next remove the following file

rm /etc/udev/rules.d/70-persistent-net.rules

Install VMware tools

from the menu select VM and Install VMware Tools

mount /dev/cdrom /mnt
cp /mnt/<yourFile> /tmp
cd /tmp
tar xf <yourFile>
vmware-tools-distrib/vmware-install.pl

once this is complete remove the tarball and the extracted folder in /tmp and restart your vm

vyos SSH

run these commands to enable ssh

configure
set service ssh listen-address 192.168.229.10
commit
save

Enable DHCP

to enable DHCP you paste the following into vyos

configure
set service dhcp-server global-parameters 'local-address 10.0.5.2;'
set service dhcp-server shared-network-name DHCPPOOL authoritative
set service dhcp-server shared-network-name DHCPPOOL subnet 10.0.5.0/24 default-router '10.0.5.2'
set service dhcp-server shared-network-name DHCPPOOL subnet 10.0.5.0/24 name-server '10.0.5.2'
set service dhcp-server shared-network-name DHCPPOOL subnet 10.0.5.0/24 domain-name 'range.local'
set service dhcp-server shared-network-name DHCPPOOL subnet 10.0.5.0/24 lease '86400'
set service dhcp-server shared-network-name DHCPPOOL subnet 10.0.5.0/24 range POOL1 start '10.0.5.50'
set service dhcp-server shared-network-name DHCPPOOL subnet 10.0.5.0/24 range POOL1 stop '10.0.5.100'
commit
save

Deliverable 3. Provide a screenshot of an ssh session with vyos-lab and subsequent ping to cupcake from vyos-lab. Similar to the one below. image image

Wireguard setup

this installs wireguard and generates a new keypair

sudo apt install wireguard
cd /etc/wireguard
umask 077
wg genkey | tee privatekey | wg pubkey > publickey

Below my commands differ as the provided commands were not executing properly and so after lots of trial and error the below commands worked

on vyos I ran the below commands to generate the vyos keypair and set the wireguard interface

generate wireguard key-pair
configure
set interfaces wireguard wg0 private-key private
set interfaces wireguard wg0 address '10.0.99.1/24'
set interfaces wireguard wg0 peer adam.lamb allowed-ips '10.0.99.100/32'
set interfaces wireguard wg0 peer adam.lamb public-key public
set interfaces wireguard wg0 port '51820'
commit
save
exit

this command allows you to view your vyos public key

show interfaces wireguard wg0 public-key

you now will create the below file and fill it out as shown in the screenshot to configure wg0 on kali

vi /etc/wireguard/wg0.conf

image

Deliverable 4. Demonstrate network connectivity from kali to the victim machine using the DHCP provided address on VMNET5. Provide a screenshot similar to the one below.

image

Deliverable 5. Comprehensive journaling and chronological reflections on this activity. Provide a video overview of all documentation authored and your reflections on this activity. Submit a link to your panopto or google drive based video (not a link to your wiki).

image

image

image

⚠️ **GitHub.com Fallback** ⚠️