-
Notifications
You must be signed in to change notification settings - Fork 0
Assessment Prep
dthomsen116 edited this page Mar 6, 2023
·
19 revisions
Assessment Description: For the assessment, you will be given a 3 zone network to configure that consists of:
edge01: A vyOS Firewall with three interfaces (WAN, DMZ, LAN). You will need to add an interface using vCenter. (this replaces fw01)
- IP: 10.0.17.27
- GATEWAY: 10.0.17.2
- SUBNET: 255.255.255.0
- DNS: 10.0.17.2
$Password = Read-Host -AsSecureString
New-LocalUser "david" -Password $Password -FullName "david"
Add-LocalGroupMember -Group "Administrators" -Member "david"
Rename-Computer -NewName "traveler-david" -Restart
# Install OpenSSH , does not install if "ssh" folder exists
if (!(Test-Path "C:\ProgramData\ssh\ssh_host_rsa_key")) {
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
}
Start-Service sshd
Set-Service -Name sshd -StartupType Automatic
# Generate Keys
ssh-keygen.exe -f .\ssh-keys
#!/bin/bash
WINDOWSUSER="paul"
WINDOWSIP="10.0.17.27"
JUMPUSER="paul-jump"
JUMPIP="172.16.50.4"
sftp david@$10.0.17.27:ssh-keys.pub
scp ssh-keys.pub david@$172.16.50.4:travel.pub
ssh david@$172.16.50.4
sudo -i
cat /home/david/travel.pub >> /home/jump-david/.ssh/authorized_keys
END
VMWare Config: adap1: WAN adap2: DMZ adap3: LAN
set system host-name 'edge01-david'
set system name-server '10.0.17.2'
set system login user vyos authentication plaintext-password [PASS HERE]
WAIT FOR THE END!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
del service ssh listen-address '0.0.0.0'
set service ssh listen-address '172.16.150.2'
default-action drop
enable-default-log
rule 1:
action accept
state establised enable
rule 10:
action accept
desc: "wazuh comms w wazuhServ"
destination address 172.16.200.10
destination port 1514-1515
protocol tcp
default-action drop
enable-default-log
rule 1:
action accept
state establised enable
rule 999:
action accept
source address 172.16.50.3
default-action drop
enable-default-log
rule 1:
action accept
state establised enable
rule 10:
action accept
desc: "HTTP from LAN 2 NGINX"
destination address 172.16.50.3
destination port 80
protocol tcp
rule 20:
action accept
desc: "ssh from mgmt01 2 DMZ"
destination address 172.16.50.0/29
destination port 22
protocol tcp
source address 172.16.150.10
default-action drop
enable-default-log
rule 1:
action accept
state establised enable
default-action drop
enable-default-log
rule 1:
action accept
state establised enable
rule 10:
action accept
desc: "HTTP from WAN 2 DMZ"
destination address 172.16.50.3
destination port 80
protocol tcp
rule 20:
action accept
desc: "SSH from WAN 2 DMZ"
destination address 172.16.50.4
destination port 22
protocol tcp
default-action drop
enable-default-log
rule 1:
action accept
state establised enable
address 10.0.17.115/24
desc: WAN
address 172.16.50.2/29
desc: DMZ
address 172.16.150.2/24
desc: LAN
rule 10:
desc: HTTP-2-NGINX
destination port 80
inbound interface eth0
protocol tcp
translation address 172.16.50.3
translation port 80
rule 20:
desc: WAN-2-JUMP
destination port 22
inbound interface eth0
protocol tcp
translation address 172.16.50.4
translation port 22
rule 10:
desc: NAT from DMZ-2-WAN
outbound interface eth0
source address 172.16.50.3
translation address masquerade
rule 20:
desc: NAT from LAN-2-WAN
outbound interface eth0
source address 172.16.150.0/24
translation address masquerade
rule 30:
desc: NAT from MGMT-2-WAN
outbound interface eth0
source address 172.16.200.0/28
translation address masquerade
rip:
interface eth2
network 172.16.50.0/29
static:
route 0.0.0.0/0
next hop 10.0.17.2
dns:
forwarding allow-from 172.16.50.0/29
forwarding allow-from 172.16.150.0/24
forwarding listen-address 172.16.50.2
forwarding listen-address 172.16.150.2
forwarding system
ssh:
listen address 172.16.150.2
zone WAN:
from DMZ firewall name DMZ-2-WAN
from LAN firewall name LAN-2-WAN
interface eth0
zone DMZ:
from LAN firewall name LAN-2-DMZ
from WAN firewall name WAN-2-DMZ
interface eth1
zone LAN
from DMZ firewall name DMZ-2-LAN
from WAN firewall name WAN-2-LAN
interface eth2
Windows:
Linux:
- edit /etc/hostname
Vyos:
set system login user [user] authentication plaintext-password [password]
-
useradd [user]
-
passwd [user]
-
usermod -aG sudo/wheel [user]