<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Taylor on Medium]]></title>
        <description><![CDATA[Stories by Taylor on Medium]]></description>
        <link>https://medium.com/@r3c0nx00?source=rss-99eaebd2e351------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*B4t_hJ2X4JElOZBp99fmzQ.jpeg</url>
            <title>Stories by Taylor on Medium</title>
            <link>https://medium.com/@r3c0nx00?source=rss-99eaebd2e351------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 15:47:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@r3c0nx00/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Learning ICS Security Pt. 1: The Network and Firewall [OPNsense]]]></title>
            <link>https://r3c0nx00.medium.com/learning-ics-security-pt-1-the-network-and-firewall-opnsense-51f8f6498cca?source=rss-99eaebd2e351------2</link>
            <guid isPermaLink="false">https://medium.com/p/51f8f6498cca</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[scada]]></category>
            <category><![CDATA[opnsense]]></category>
            <category><![CDATA[scada-cyber-security]]></category>
            <category><![CDATA[ics-security]]></category>
            <dc:creator><![CDATA[Taylor]]></dc:creator>
            <pubDate>Fri, 04 Sep 2026 02:44:04 GMT</pubDate>
            <atom:updated>2026-09-04T15:01:16.151Z</atom:updated>
            <content:encoded><![CDATA[<h4>Materializing our network design from Part 0 in OPNsense.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*howAuCOpPeduCtX09To6BA.png" /><figcaption>Figure — PolyForm Containers</figcaption></figure><h3>Introduction</h3><p><a href="https://medium.com/@r3c0nx00/learning-ics-security-pt-0-lab-design-layout-cc9e39d370cc">Part 0</a> was the design of our lab. I did a brief overview of the Purdue model, zones and conduits, and drew our lab out. I also invented a company to run it: <strong>PolyForm Containers</strong>. It is a fictitious plastics thermoforming plant that gives our lab some business context around the design and layout. Shout out to my wife for designing the logo for me in Canva! =)</p><p>This post is where I begin the core build out of the lab. Part 1 covers the networking and firewall portion. By the end, we will have:</p><ul><li>Five isolated virtual networks (four zone + management segment)</li><li>OPNsense routing between all of our zones, with DHCP and DNS being served to each</li><li>Phase 1 rules to allow zone to zone communication (for now)</li></ul><p>The rest of the lab comes one zone per post. Part 2 is the Enterprise zone (Levels 5 and 4), then Part 3 for the industrial DMZ, Part 4 for supervisory, and Part 5 for control with the first working process loop. Part 6 is when we will begin to cover our offensive use cases for this lab.</p><h4>Before you start</h4><p>You need VirtualBox (7.x or newer) and enough RAM to be comfortable. Run it off an SSD if you can as the random IO of a dozen VMs can be a killer on a spindle.</p><pre>Tier         CPU         RAM     Free disk   Runs<br>-----------  ----------  ------  ----------  ---------------------------------<br>Minimum      4 cores     16 GB   80 GB       Firewall, PLC, services box, Kali<br>Comfortable  8 cores     32 GB   150 GB      Core lab, about 9 VMs<br>What I use   16 threads  64 GB   200 GB      All 13 VMs at once</pre><p>Part 1 needs one ISO: OPNsense 26.7 (dvd image) from <a href="https://opnsense.org/download">https://opnsense.org/download</a>. It comes compressed so you will need to extract it before attaching it to the VM.</p><p>Version matters. OPNsense 26.7 uses Kea for DHCP (moved from ISC to Kea in 2024, so a lot of articles will reference ISC). Besides that, nothing else is needed for this part.</p><p>Now let’s get into the fun part: the build!</p><h3>Networking</h3><h4>The Four (Five) Zones</h4><p>Each of the Purdue zones gets its own VirtualBox “Internal Network”. An internal network is a sealed segment where the virtual machines on it can only talk to each other. This gives me four zones to work with:</p><ul><li>Enterprise, 10.40.0.0/24</li><li>Industrial DMZ, 10.35.0.0/24</li><li>Supervisory, 10.20.0.0/24</li><li>Control, 10.10.0.0/24</li></ul><p>Plus, there is a fifth “host-only” network for management. This allows me (and you at home following along) the ability to access each of the internal applications (like Grafana, ScadaBR, etc.) shown later in the series from your host machine.</p><p>What about Level 0? No network for it. Level 0 represents our field devices. OpenPLC exposes its IO as addressable memory (%QW / %MW), %IX / %QX for discrete points, %IW / %QW for analog words. Each of these map to a specific Modbus register block. Our process simulator runs as Modbus slave that OpenPLC polls. This is similar to how a real controller would poll its remote IO.</p><p>To learn more about OpenPLC (though, this is a bit preemptive), check out this documentation: <a href="https://old.autonomylogic.com/docs/2-5-modbus-addressing/">OpenPLC Modbus Addressing</a>.</p><h4>Wiring it in VirtualBox</h4><p>Setting this up is much less work than it appears. In VirtualBox an internal network doesn’t need to be created. You give a VM a network adapter, set the adapter to “Internal Network”, and set the name. Now, any future machine you point at the name exists on the same segment.</p><p>However, there is an exception. OPNsense has to touch everything so this VM gets six network adapters:</p><ul><li>Adapter 1: NAT (internet)</li><li>Adapter 2: ICS-ENT (Enterprise)</li><li>Adapter 3: ICS-DMZ (Industrial DMZ)</li><li>Adapter 4: ICS-SUP (Supervisory)</li><li>Adapter 5: ICS-CTRL (Control)</li><li>Adapter 6: “Host-Only” adapter (management)</li></ul><p>The ordering matters. These get handed to OPNsense as em0 through em5 in this order and I refer to these adapters in relation to their name later on.</p><p>Also, leave these as the default model (Intel PRO/1000 MT Desktop). That is how we get the em naming scheme used throughout this series. If you switch NIC models, you may get vtnet0 through vtnet5 instead.</p><p>Adapter 6 is the exception to what I said above. Internal networks appear by themselves; however host-only networks do not. From the VirtualBox window go to “File”, “Tools”, “Network Manager”, and then pick the “Host-only Networks” tab. Click “Create”. You now should have an adapter named vboxnet0. Select it and set the following:</p><ul><li>IPv4 Address: 192.168.56.1</li><li>IPv4 Network Mask: 255.255.255.0</li></ul><p>Now, switch to the “DHCP Server” tab for the adapter and uncheck “Enable Server”. Everything on this network is static since your host is .1 and OPNsense will be .10. You can also run these commands if you hate GUIs:</p><pre>VBoxManage hostonlyif create<br>VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1 --netmask 255.255.255.0<br>VBoxManage dhcpserver modify --interface vboxnet0 --disable</pre><p>Confirm that you can see the new interface:</p><pre>ip addr show vboxnet0 # should show 192.168.56.1/24</pre><p>You need to set adapter 6 on the OPNsense VM as “Host-only” as mentioned earlier in this section and set the name to “vboxnet0”.</p><p><strong>Note: </strong>VirtualBox only allows host-only networks inside the ranges listed in /etc/vbox/networks.conf, which defaults to 192.168.56.0/21. Ours fits, so there is nothing to edit. Use something outside that range and the interface will not come up.</p><h3>Standing up OPNsense</h3><h4>Installing it</h4><p>In terms of resources, OPNsense doesn’t demand much. Quite frankly, it’s the cheapest of the virtual machines in this lab. I gave it 1 vCPU, 2 GB of RAM, 8 GB HDD, BIOS (instead of EFI) for the firmware, and the 6 network adapters discussed in the previous section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*7yRrETGvSmRjduaA05cw6w.png" /><figcaption>Figure — System overview for OPNsense</figcaption></figure><p>Installation is quick. Once you boot the machine with the ISO attached, you will get launched into a console and begin configuring the interfaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*iWUkidpAKm7DJMfuPxsHqQ.png" /><figcaption>Figure — OPNsense installer splash screen</figcaption></figure><h4>Assigning the Interfaces</h4><p>Before configuring the interfaces you will be asked if you would like to enable LAGG and VLANs, select “N” to both as we do not need them:</p><figure><img alt="Prompt asking to configure LAGGs / VLANs. Should select “N” for both." src="https://cdn-images-1.medium.com/max/552/1*b4LwkByd9o9Dtlb4etSikA.png" /><figcaption>Figure — LAGG / VLAN dialog</figcaption></figure><p>The set up walks you through WAN, then LAN, and then each additional interface. Since we added the adapters in a specific order these line up cleanly:</p><ul><li>em0 = WAN</li><li>em1 = LAN (Enterprise)</li><li>em2 = OPT1 (DMZ)</li><li>em3 = OPT2 (Supervisory)</li><li>em4 = OPT3 (Control)</li><li>em5 = OPT4 (Management)</li></ul><figure><img alt="List of valid interfaces in OPNSense configuration (the 6 network adapters configured in the previous step)." src="https://cdn-images-1.medium.com/max/656/1*lOB2IELMBn3Ai-RBgx8sVg.png" /><figcaption>Figure — Interface list</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*W46F99wqT_hufOJyspwP_Q.png" /><figcaption>Figure — Configured interfaces in OPNsense setup</figcaption></figure><p>It will take a few minutes after hitting enter for it to kick you back into the login. Once there, login with the installer credentials (installer / opnsense). Select your keymap (or just do default) and then select “Install ZFS”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*81xo1xaGL5wnf75ZJczETQ.png" /><figcaption>Figure — Install (ZFS) Selection</figcaption></figure><p>If you went with my specs, it will complain about the 2GB of memory: ignore it. Also, select “No Redundancy” and kick off the installation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*xOaObdyOoXpKysyG3ev_wQ.png" /><figcaption>Figure — Installation progress dialog</figcaption></figure><p>You will be prompted to set the root password:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*NqFiO7piKovSXkEqSGGDNw.png" /><figcaption>Figure — Installation complete</figcaption></figure><p>Before rebooting, however, you should eject the current installation ISO (so we don’t accidentally boot into the installer again, VirtualBox chooses the optical boot option by default). Go to “Devices”, “Optical Drives”, “Remove disk from virtual drive”. Now we can hit “Complete Install” and let it restart.</p><p>Once the system reboots, sign in as root. We need to set addresses for each of our interfaces. From the console menu select “Option 2”, “Set interface IP address”, and it will let you do them one at a time:</p><ul><li>WAN (em0): leave set to DHCP, NAT on VirtualBox will handle it</li><li>Enterprise (em1): 10.40.0.1 /24</li><li>DMZ (em2): 10.35.0.1 /24</li><li>Supervisory (em3): 10.20.0.1 /24</li><li>Control (em4): 10.10.0.1 /24</li><li>Management (em5): 192.168.56.10 /24</li></ul><p><strong>Heads up:</strong> Each of these is the gateway address for its respective zone.</p><p>Answer “N” when asked to configure the IPv4 address for the LAN interface via DHCP:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*wXhu6Ak3kO0ZmzX-Tm6dzA.png" /><figcaption>Figure — Gateway address configuration for the em1 interface (LAN)</figcaption></figure><p>When prompted to set an upstream address for LAN and the other OPT interfaces, just hit enter for “None”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*vTgNyZgicnpOLxm2sOlZyA.png" /><figcaption>Figure — Upstream address prompt</figcaption></figure><p>Additionally, you can skip configuring IPv6 for these interfaces as well:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*GmA9KCH6wwLn_PSrE7hLug.png" /><figcaption>Figure — Skipping IPv6 for all interface adapters</figcaption></figure><p>When prompted to turn on the “DHCP server” for each adapter, select “no”. We will go through and configure it properly in the web GUI later in this article:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*Wg6IGr1ewl9vX6oweQOJGQ.png" /><figcaption>Figure — Skipping DHCP server on all interface adapters</figcaption></figure><p>When prompted about the “Change web GUI protocol to HTTP” or “generate new self-signed certificate”, reply “N” to both.</p><p>The management address of <strong>192.168.56.10 </strong>is the one you want to remember. You have to bootstrap your access to the management network (prior to setting up the rule). We need to temporarily disable packet filtering.</p><p>Short lesson on OPNsense: the “anti-lockout” rule included is applied to whatever interface is set as LAN. For us that is em1. MGMT is OPT4, and an OPT interface starts with no rules at all:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*EB_BE22y6JED9xck2Nk5iw.png" /><figcaption>Figure — Default LAN rules</figcaption></figure><p>From the console menu, select option 8: “8) Shell”. Once in the shell as root, run the following command:</p><pre>pfctl -d</pre><p>And then from your host machine in a terminal:</p><pre>ip addr show vboxnet0 # should see 192.168.56.1/24<br>curl -k -I https://192.168.56.10</pre><p>Now, you should be able to open your browser and head over to <a href="https://192.168.56.10/">https://192.168.56.10</a>. Sign in with the root account (and password you set during install).</p><p>Go over to “Interfaces”, select “Assignments” and rename interfaces OPT1 — OPT4 to DMZ / SUP / CTRL / MGMT. Ensure each interface is enabled. Also, rename LAN to ENT (Enterprise):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*b5xwd57TR_977hO95_kb8A.png" /><figcaption>Figure — Renamed network interfaces</figcaption></figure><p>Go to “Firewall”, “Rules”, expand “Interface rules”, Click the “+” icon in the bottom right of the table, add the following settings in the popup form:</p><ul><li>Action: Pass</li><li>Interface: MGMT</li><li>Direction: in</li><li>TCP / IP Version: IPv4</li><li>Protocol: any</li><li>Source: MGMT net</li><li>Destination: any</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*bEmoAcujMS6TvLtQLTn6pA.png" /><figcaption>Figure — MGMT firewall rule</figcaption></figure><p>Hit “Save” then “Apply”. Once the apply runs, it will enable pf with our new rule in place. Keep your console window open until you confirm your host can still reach the web GUI.</p><p>Note: The current MGMT rule is more permissive than I’d like, but for now it works. Later in this series it gets revised along with many other things. It ends up as two rules instead of one: MGMT to “This Firewall” on 443 for the web GUI, and MGMT to the zones on just the admin ports we actually use.</p><h4>DHCP / DNS</h4><p>In our virtual lab we must be able to resolve hostnames and hand out network addresses. Our OPNsense appliance serves as both. We are going to get started with DHCP first so head over to the web GUI and sign in as root (using the password you set during installation).</p><p>The version of OPNsense I am using (26.7) uses <strong>Kea </strong>to hand out DHCP addresses. Browse to “Services”, “Kea DHCP”, and then “Kea DHCPv4”. On the “Settings” tab, click “Enable” and then select our four zone interfaces in the interface list (ENT (LAN), DMZ, SUP, and CTRL). Make sure to click “Apply”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*2E3IYOQ9xaUUJxoE45iApA.png" /></figure><p>Switch over to the “Subnets” tab, click “+ Add”. For our first zone, set the following:</p><ul><li><strong>Subnet</strong>: 10.20.0.0/24 (Supervisory for this example)</li><li><strong>Pools</strong>: 10.20.0.100 — 10.20.0.200</li><li>Leave “Auto collect option data” checked. Kea will autofill the router / DNS information from the interface.</li><li>Make sure to click “Save” before exiting.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*8aUCo6XcGwU6ZRxTTkMFvA.png" /><figcaption>Figure — SUP Kea DHCPv4 Configuration</figcaption></figure><p>Repeat the above directions for our three other zones (10.40.0.0/24, 10.35.0.0/24, 10.10.0.0/24) and give each their own .100 — .200 address pool. Be sure to click “Apply” before leaving the page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*gOw1LgtO1ecnyhKn2Z5uCQ.png" /><figcaption>Figure — Kea DHCPv4 configured for ENT/DMZ/SUP/CTRL</figcaption></figure><p>Just two notes from my personal experience….</p><ul><li>If Kea will not start — check to ensure that you didn’t accidentally enable the DHCP server for one of the interfaces. That uses dnsmasq which will prevent Kea from starting due to the port conflict (Dnsmasq operates both a DNS and DHCP server). Go into “Services”, “Dnsmasq DNS &amp; DHCP”, and disable it. Restart Kea and it should be working.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*Qa25cKqhYr7da-sGGkUSwA.png" /></figure><ul><li>Make sure to put the network and not the gateway (10.20.0.0/24 vs. 10.20.0.1/24) when configuring the subnet.</li></ul><p>You will notice that I use a mix of static and dynamic addresses. In ICS networks, the standard is static IP addresses over DHCP. This is to reduce confusion, simplify tracking, and ensure that mission-critical equipment remains connected. In order to mimic a real plant environment, I have opted to set static IP addresses for each of the machines. We do use DHCP however for a few machines (in the Enterprise zone) down the road, hence why we have it enabled.</p><p>Moving on to DNS, “Unbound” is the built in DNS resolver for our OT zones and it is on by default. One addition: add a domain override so our OT zones can resolve the AD domain (ics.lab). To do this, go to “Services”, “Unbound DNS”, “Overrides” and then under “Domain Overrides” click “+ Add” and set the following values:</p><ul><li>Domain: ics.lab</li><li>Server IP: 10.40.0.10</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*guaXJ6t4AKw7P6iJFgfQFg.png" /><figcaption>Figure — ics.lab DNS override for AD domain</figcaption></figure><p>Save and apply. Now Unbound will forward all DNS queries for ics.lab to the DC. We build the controller in Part 2 so this override does nothing until then. Doing this now so we don’t have to go back later. However, <strong>note: </strong>this does bend our rules. In a real ICS environment, the hostname resolution would live in the IDMZ or a read only replica. However, for this lab I am keeping it because I want the AD attack path to the plant floor for later. Phase 2 of our networking plan also scopes this down.</p><h4>Firewall, for now…</h4><p>As mentioned in Part 0, this does not start locked down. Phase 1 of our firewall configuration is quite permissive. I want to ensure that I am getting learning value vs. having to fight against firewall rules. Each zone has the ability to reach each other. Phase 2 replaces all of it with the segmented design from Part 0, with real conduits between zones.</p><p>Right now our firewall is in an uneven state. Some of the interfaces can pass traffic while others cannot:</p><ul><li>ENT (LAN) picked up the “Default allow LAN to any” during the installation</li><li>MGMT has the rule we wrote above</li><li>DMZ, SUP, and CTRL have nothing.</li></ul><p>An interface with no rules on it will drop everything. If you boot a VM in the control zone for example, you will get a DHCP lease (Kea supplies default rules for DHCP), but fail to reach anything else.</p><p>So, each of these interfaces needs a new rule:</p><ul><li>Action: Pass</li><li>Interface: [DMZ/SUP/CTRL]</li><li>Direction: in</li><li>TCP / IP Version: IPv4</li><li>Protocol: any</li><li>Source: [DMZ/SUP/CTRL] net</li><li>Destination: any</li></ul><p>Hit “Save” (you will need to do this three times). Once all three are created, click “Apply”.</p><p>Yes, this rule is as bad as it sounds. Any device on a zone can talk to anything, anywhere. Our Enterprise zone can reach our PLC. No plant should be built this way, though I am sure plenty out there are.</p><p>Outbound NAT is set to “automatic” by default so these interfaces can also reach the internet through our WAN adapter. For now, this is intentional to make installation / set up easier, but this will also be going away in Phase 2.</p><p>We need to give our host a route into the zones to reach the other web GUIs later in this series:</p><pre>sudo for n in 10 20 35 40; do sudo ip route add 10.$n.0.0/24 via 192.168.56.10 dev vboxnet0; done</pre><p>This sends any traffic bound for 10.x through our firewall’s management leg. This is not permanent so you will need to do this if you happen to reboot between parts.</p><p>One last thing before we call it: Take a snapshot of your clean VM. Everything else in this series depends on this box being right. Being able to roll back to a working configuration will make your life much easier.</p><p>Open up the console on your host machine:</p><pre>VBoxManage snapshot NAME take opnsense-fresh # ics-opnsense in my case</pre><p>Or you can just right click the VM, click “Snapshots”, then “Take”.</p><h3>Wrapping up</h3><p>Our lab has a backbone now with five networks, a firewall, DNS / DHCP served for each zone, and a management path using a host-only network so as not to poke holes in our environment.</p><p>It is also completely wide open as it stands. Every zone can reach the others and all of them are able to reach the internet. This is the exact opposite of what we designed in Part 0. However, it ensures that we can complete all machine installs / configurations without having to fight the firewall. The next phase replaces it all with our segmented design from Part 0.</p><p>Part 2 of our series goes in detail on the Enterprise zone (Levels 5 and 4). This zone includes our domain controller (Windows Server 2022), corporate workstation (Windows 11), mail server, and Odoo running PolyForm’s business side. We also build our Kali VM in Part 2, but we do not use it until Part 6.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51f8f6498cca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning ICS Security Pt. 0: Lab Design & Layout]]></title>
            <link>https://r3c0nx00.medium.com/learning-ics-security-pt-0-lab-design-layout-cc9e39d370cc?source=rss-99eaebd2e351------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc9e39d370cc</guid>
            <category><![CDATA[scada-cyber-security]]></category>
            <category><![CDATA[ics-security]]></category>
            <category><![CDATA[plc]]></category>
            <category><![CDATA[virtualbox]]></category>
            <category><![CDATA[labs]]></category>
            <dc:creator><![CDATA[Taylor]]></dc:creator>
            <pubDate>Sat, 29 Aug 2026 17:48:55 GMT</pubDate>
            <atom:updated>2026-08-29T18:39:35.089Z</atom:updated>
            <content:encoded><![CDATA[<h4>Building a fully virtual home ICS / SCADA lab from scratch</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5fzqgdoW7sM1jm_-anf3-g.png" /><figcaption>Figure 1 — Fictitious thermoforming process</figcaption></figure><h3>Introduction</h3><p>Somewhere right now sits a programmable logic controller the size of a lunchbox, making a decision that impacts the physical world. These machines usually aren’t at the forefront of our minds. They blend into the infrastructure around us. By 2010, Stuxnet had been quietly tearing through the centrifuges at Natanz for months, spinning them to destruction while replaying recorded “everything’s fine” readings back to the operators watching the screens. Seven years later, TRITON went after a petrochemical plant’s safety instrumented system, the last line of defense between a process and a catastrophe, and tripped the plant into emergency shutdown twice before anyone realized what they were looking at. This is operational technology: the cyber-physical layer running some of the most critical operations behind our day-to-day lives. The stakes are much, much higher than your typical data breach.</p><p>For the past few weeks I’ve been reading through <em>Industrial Network Security </em>by Eric Knapp and Joel Langill (you can find it <a href="https://shop.elsevier.com/books/industrial-network-security/knapp/978-0-443-13737-2">here</a>, they have a deal to get both the eBook and physical copy for $89). In theory, it all makes sense, but who has a spare Siemens S7 lying around? (Side note, I will gladly accept any hardware donations). So I built a simulated plant instead within VirtualBox (just my desktop, however your mileage may vary depending on specs). This is Part 0 where I cover the design of the plant before we get into the machine setup.</p><h3>IT vs. OT: What’s the big deal?</h3><p>So what sets OT apart from the IT that a good majority of us come from? On the surface, there doesn’t seem to be a whole lot. TCP/IP, Ethernet, and even the same Windows machines you’d find in the office. The major difference here is the function they serve. IT moves data; OT runs machines that cut, lift, pour, etc.</p><p>That flips two fundamental rules. First, our priorities invert. In IT, we live and die by the CIA triad. In OT, however, safety (most important!) and availability rule, and confidentiality often gets the short end of the stick (more on this later). Quite frankly, nobody is losing sleep over keeping the oven’s current temperature secret. What keeps them up is someone changing it, or worse, spoofing a normal reading to the operator while the oven cooks itself into thermal runaway. Second, it’s physical. IT attacks, while still terrible in their own right, at least stay within the digital realm. OT hands a threat actor a physical presence in your environment.</p><p>Well great, how do we resolve this? Thankfully, the industry has an answer for this within the Purdue Model. This is the skeleton for the lab that we are constructing.</p><h3>Brief Purdue Model Overview</h3><p>What is the Purdue Model you may be asking? It’s a way to slice industrial networks into different layers stacked by how close each system sits to the physical process within the plant. This comes out of the Purdue Enterprise Reference Architecture from the 1990s, and the level structure you will see everywhere is one that got carried into ISA-95. See the picture below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*pATgy-dQpSLxr1AmVycSVQ.png" /><figcaption>Figure 2 — Purdue model and IIoT model for network segmentation with DMZ segments. Source: NIST SP 800–82r3, Figure 16.</figcaption></figure><p>At the very bottom we have Level 0 which are the field devices (<strong>Physical Process)</strong>. These are our various sensors and actuators. Next up we have Level 1 which is our <strong>Basic</strong> <strong>Control </strong>level. This is where our PLCs live and make our decisions in real-time. Above that is Level 2 which is our <strong>Supervisory Control </strong>level that drives the HMI / SCADA screens for operators to “supervise” the process. Level 3 is site operations, the historian, engineering workstations, and production systems that operate the plant as a whole. Above that, Level 4 (<strong>Business Planning / Logistics</strong>) and Level 5 (<strong>Enterprise Network</strong>) are the enterprise layers for things like email, web servers, file sharing, and the other wonderful Corporate IT we are familiar with.</p><p>The lower you go in this model, the closer you get to something physical. The model’s whole idea is simple: keep the layers separated and control every crossing between them. IEC 62443 formalizes that segmentation as zones and conduits. This is separate from the Purdue Model as it does not mandate the levels. They just happen to work well together so we often map them together.</p><p>This is our blueprint for the lab. Let’s turn it into actual machines.</p><h3>Building out the virtual plant</h3><p>The nice thing about the Purdue Model is that it maps almost perfectly to our virtual networking. Each layer becomes its own isolated network with a single firewall that sits in the middle deciding what is allowed to talk to what.</p><p>Within VirtualBox each zone is broken out into an internal network. The VMs attached to it can talk to each other and nothing else. I deliberately opted out of bridged networking so I can treat this like a true sandbox (and for some future security testing). One gotcha: you will need to set promiscuous mode to Allow All on these adapters to be able to capture traffic from the Kali VM. This gives me four zones, one per trust level:</p><ul><li><strong>Enterprise</strong> (Level 4 / 5), 10.40.0.0/24</li><li><strong>IDMZ</strong> (Level 3.5), 10.35.0.0/24</li><li><strong>Supervisory</strong> (Level 2 / 3), 10.20.0.0/24</li><li><strong>Control</strong> (Level 1), 10.10.0.0/24</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_1x05lYJzFPbxIf8Xa77pw.png" /><figcaption>Figure 3— Lab topology</figcaption></figure><p>Each zone has its own purpose within the lab:</p><p><strong>Enterprise </strong>is the office. This is where we operate our single domain controller (Win Server 2022), a corporate workstation (Win 11), and our Kali workstation. This layer knows nothing (or at least <em>shouldn’t) </em>about our plant and running processes.</p><p>The <strong>Industrial DMZ </strong>(IDMZ)<strong> </strong>is the broker layer containing our historian (InfluxDB) with Grafana to display dashboards on top, plus a Mosquitto MQTT broker. In a real plant, the primary historian will usually sit down at Level 3 with a replica pushed into the DMZ. However for sake of resources I am opting to make it a single instance. This is where plant data comes to rest and where our enterprise network is allowed to read it.</p><p><strong>Supervisory</strong> is where the people watch the plant. ScadaBR is our HMI simulating the screens that our operators stare at all day. It’s an older project but it’s free and communicates through Modbus so good enough for me! Node-RED handles the work of polling our controllers over Modbus and sending the data up to our IDMZ. This is also where our engineering machines live to actually program the PLCs.</p><p><strong>Control </strong>is the heart of it all: OpenPLC. This is a free soft PLC that we can use to simulate our logic. In this case, it runs our fictitious thermoforming plant with a handful of simulated cells.</p><p>Below this is <strong>Level 0</strong>, the field. No hardware necessary for this portion! We utilize registers inside our PLC while using real protocols. However, I would love to explore making a hybrid lab that gives attack vectors tactile feedback in our testing. Maybe introduce a spare Raspberry Pi to control stuff via the GPIO headers?</p><p>Right in the middle of it all sits my OPNsense appliance, and this is where our first real lesson lives. It’s what lets me enforce the controls that make the Purdue Model actually mean something: the HMI on the supervisory network can read data from the PLC, while a compromised email server on the enterprise network is blocked from reaching down and controlling the physical process.</p><p>That said, I don’t start with this lab locked down. The zones exist with everything routing through OPNSense. However, there is not a single filtering rule in place (yet). Every zone can currently reach every other zone. This gives me a feel for exactly what an attacker sees after landing on the corporate network with no internal boundaries. In the next part, we start building this for real!</p><h3>Wrapping Up (for now)</h3><p>That’s our blueprint. We mapped each layer of the Purdue Model against its own isolated network within VirtualBox. In Part 1, we will take this plan and actually construct our environment. Creating each VM, wiring our zones together, and getting a live process running end to end in our virtual plant. Below are some of the systems we are going to be building:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*kLheEMEBrLcgkt04iHYf4A.png" /><figcaption>Figure 4— VirtualBox machine list</figcaption></figure><p>If you want to follow along, drop a follow and stay tuned!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AnCDGJym2oWxJy4wTMOEYw.png" /><figcaption>Figure 5— Grafana Dashboard preview</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc9e39d370cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>