Put VMs in the same subnet, according to the project's schema
This commit is contained in:
parent
ab6863e224
commit
b5c77eb6aa
2 changed files with 9 additions and 30 deletions
|
@ -8,13 +8,15 @@ vagrant up
|
|||
```
|
||||
|
||||
You then need to:
|
||||
- Upload the `motor.st` program to the PLC, through `http://192.168.95.2:8080` (credentials: `openplc:openplc`).
|
||||
- Add the connection to the PLC on ScadaBR, with `http://192.168.90.5:8080/ScadaBR` (credentials: `admin:admin`).
|
||||
- Upload the `motor.st` program to the PLC, through `http://192.168.1.100:8080` (credentials: `openplc:openplc`).
|
||||
- Add the connection to the PLC on ScadaBR, with `http://192.168.1.11:8080/ScadaBR` (credentials: `admin:admin`).
|
||||
|
||||
## Attacks
|
||||
|
||||
Attack scripts are in `modbus_scripts`.
|
||||
Example of ARP spoofing attack to block connections from ScadaBR to OpenPLC:
|
||||
|
||||
```bash
|
||||
sudo sysctl -w net/ipv4/conf/all/forwarding=1
|
||||
sudo arpspoof -i <interface> -t 192.168.90.5 192.168.95.2
|
||||
sudo arpspoof -i <interface> -t 192.168.1.11 192.168.1.100
|
||||
```
|
||||
|
|
31
Vagrantfile
vendored
31
Vagrantfile
vendored
|
@ -2,35 +2,17 @@
|
|||
# vi: set ft=ruby :
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
|
||||
config.vm.box = "generic/ubuntu1604"
|
||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
|
||||
config.vm.define "router" do |router|
|
||||
router.vm.box = "debian/bookworm64"
|
||||
router.vm.hostname = "router"
|
||||
router.vm.network "private_network", ip: "192.168.90.100"
|
||||
router.vm.network "private_network", ip: "192.168.95.100"
|
||||
|
||||
router.vm.provision "shell", run: "always", inline: <<-SHELL
|
||||
sysctl -w net.ipv4.conf.all.forwarding=1
|
||||
SHELL
|
||||
|
||||
end
|
||||
|
||||
config.vm.define "hmi" do |hmi|
|
||||
hmi.vm.box = "generic/ubuntu1604"
|
||||
hmi.vm.hostname = "hmi"
|
||||
hmi.vm.network "private_network", ip: "192.168.90.5"
|
||||
hmi.vm.network "private_network", ip: "192.168.1.11"
|
||||
|
||||
# Dependencies, Networking
|
||||
hmi.vm.provision "shell", inline: <<-SHELL
|
||||
apt-get update
|
||||
apt-get install -y git
|
||||
sed -i 's/allow-hotplug/auto/' /etc/network/interfaces
|
||||
sed -i 's/#VAGRANT.*//' /etc/network/interfaces
|
||||
sed -i 's/# The contents below.*//' /etc/network/interfaces
|
||||
echo up route add -net 192.168.95.0 netmask 255.255.255.0 gw 192.168.90.100 dev eth1 >> /etc/network/interfaces
|
||||
systemctl restart networking
|
||||
SHELL
|
||||
|
||||
# Installation
|
||||
|
@ -50,23 +32,18 @@ Vagrant.configure("2") do |config|
|
|||
config.vm.define "plc" do |plc|
|
||||
plc.vm.box = "debian/bullseye64"
|
||||
plc.vm.hostname = "plc"
|
||||
plc.vm.network "private_network", ip: "192.168.95.2"
|
||||
plc.vm.network "private_network", ip: "192.168.1.100"
|
||||
|
||||
# USB passthrough, may need changing
|
||||
plc.vm.provider :libvirt do |libvirt|
|
||||
libvirt.usb :bus => '1', :device => '1'
|
||||
libvirt.usb :bus => '2', :device => '1'
|
||||
end
|
||||
|
||||
|
||||
# Dependencies, Networking
|
||||
plc.vm.provision "shell", inline: <<-SHELL
|
||||
apt-get update
|
||||
apt-get install -y git net-tools
|
||||
sed -i 's/allow-hotplug/auto/' /etc/network/interfaces
|
||||
sed -i 's/#VAGRANT.*//' /etc/network/interfaces
|
||||
sed -i 's/# The contents below.*//' /etc/network/interfaces
|
||||
echo up route add -net 192.168.90.0 netmask 255.255.255.0 gw 192.168.95.100 dev eth1 >> /etc/network/interfaces
|
||||
systemctl restart networking
|
||||
SHELL
|
||||
|
||||
# Installation
|
||||
|
|
Loading…
Reference in a new issue