SAND2026-16452R Scan2Sim: Software to Convert Network Scans to Emulations Adam J. Beauchaine and Lee T. Maccarone Revision 0 2025 Sandia National Laboratories is a multimission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525. ABSTRACT Within operational technology (OT) systems design, the construction of testing environments for simulation is often a tedious, manual process that slows down safety and security evaluations. This document details the design and functionality of Scan2Sim, a program designed to construct high- fidelity topological schematics for OT systems without significant manual human input. Scan2Sim may take as input a detailed network scan of a system, and produces an instruction set to re-create the original scanned network within a virtualized simulation network. This construction is achieved via heuristic methods of machine template selection, which allows for a fast, performant approach to automated environment construction. The current tool is designed to produce topology schematics compatible with the Minimega[1], a tool designed by Sandia National Laboratories for repeatable experimentation management. VALUE PROPOSITION The evaluation of OT systems often requires high-fidelity testing environments in which outcomes are analyzed with respect to safety and security goals of a facility. In both development and repeatability/reproducibility testing, multi-domain simulation systems allow for the analysis of physical and digital impacts as a result of certain action sequences. The construction of these simulated systems is typically a manual process requiring significant human attention. Device profiles within an OT system simulation must be manually constructed, typically on a per-system basis. Win the common scenario that systems are similar or duplicates of one another, this leads to redundant efforts during system configurations. Further, more complex system components are designed ad- hoc to meet the requirements of specific experiments, leading to further development time. OT system engineers and evaluators need a method for automating the process of environment simulation development. They need a method that is inclusive of existing tests and requires minimal modification to quickly develop novel test environments. This report details a heuristic-based automation solution to support such development strategies. The Scan2Sim program leverages commodity network scanning tools, in combination with a heuristic-based classification algorithm to automatically generate simulated network topologies with respect to existing OT profiles. These profiles include commonly used devices in OT environments, such as programmable logic controllers (PLCs), human-machine interface (HMI) devices, and supervisory control and data acquisition (SCADA) systems. Each profile corresponds to a disk image of the component, which is then loaded and networked in a similar approach to the source scan of the OT network. Competitive approaches in modern hypervisors may provide similar profile-based orchestration but lack the potential to derive a network structure directly from a pre- existing scan. The approach is successful in replicating a number of OT environments, although minor modification may be required in some cases. BACKGROUND Scan2Sim is a classification-based system that leverages a heuristic model of classification for network traffic with respect to a known set of system profiles. Prior work such as Morris et al. [2] has leveraged similar heuristic classification strategies to establish a deterministic classifier for intrusion detection systems within OT environments. Heuristic-based systems leverage background knowledge of a particular problem domain to establish rule or feature-sets that may be classify sample data. They may be used independently or as part of a larger pipeline. While data-driven 2 approaches may be more commonly used in enterprise information technology (IT) networks, OT systems are significantly amenable to heuristic classifiers, due to the simplification or common removal of security protocols, as well as plaintext network traffic. In this work, both IT and OT systems are analyzed to establish a replica topology based on classification results. Figure 1. General Scan2Sim Workflow SOURCE NETWORK SCANNING In testing, the Nmap network scanner was used to provide network analysis of a running system. For these tests, existing simulated test networks were scanned, comprising common OT scenarios such as Turbine and NPP systems. For these scans, no privileged access of a network is required beyond unrestricted ICMP traffic across a scanned network segment. Due to topological designs, there are some networks that are unable to be fully captured in a single scan. This can be addressed by performing multiple scans across multiple networks that comprise an OT system. For simulation reconstruction, internal networks might need some additional human refinements for ensuring correct connectivity between network segments. Networks scans are encoded as simple string data, currently in the format of an XML document that contains a list of all scanned IP addresses, including non-responsive hosts. In testing, networks were scanned on a subnet basis, where large blocks of IP addresses were analyzed based on a known network design. This technique allows for the scanning of all potential hosts present on a network and may be modified to support non-standard topological designs. Although Nmap was the initially chosen tool, alternative tools may additionally be leveraged, provided their outputs may be encoded as a text string. Key data extracted from this text includes port information, which serves as the primary classification heuristic. These ports, as well as additional data, are mapped directly onto a set of system profiles. These profiles correspond to known systems operating within an OT environment such as PLCs, SCADA, and Workstation devices. These profiles represent systems that are reconstructed within a new simulated system. This reconstruction process is performed via the Minimega hypervisor management software and detailed further within this work. Table I lists these profiles and the corresponding software and network information. 3 Table I. Simulation Profiles and Corresponding Detail Profile Name Organizational Role Core Onboard Software Network Ports Control of normal Control PLC operations N/A [102, 502, 504] Control of safety Safety PLC operations N/A [102, 502, 504, 603] Human Machine [80, 135, 139, 445, 1801, HMI Device Interface (HMI) Simatic WinCC Suite 2103, 2105, 2107, 2382] [80, 102, 135, 139, 445, 1442, 1801, 2103, 2105, Engineering PLC Configuration and 2107, 2382, 4430, 4840, Workstation Management TIA Portal Suite 5040] Generic [80, 102, 135, 139, 425, Workstation Standard IT device MS Office 1432, 1800, 2932] These are the set of requirements and conditions for an example network such that a scan may yield data sufficient to replicate the environment using these techniques, as well as the general process by which such a scan may be performed. Certain environments may require specific additional considerations not detailed in this work. 1. Network segment contains no security controls or network devices that impede ICMP responses from scanned devices, and port scanning is not blocked on any devices. 2. Scanning device should be directly connected to the network segment intended for emulation; the subnet associated with that network’s devices should be known. 3. Nmap scan is run on the given subnetwork encompassing all known devices (e.g. 192.168.0.0/24). 4. Scanning device is permitted to run for sufficient time to complete the scan. 5. The resulting scan data may be compiled and exported. GENERATING THE NETWORK EMULATION This section describes the workflow occurring after the scan is completed in the targeted network in order to launch the simulated network. 1. Network mapping software has successfully generated an XML file based on the network simulation target. 2. Simulation system contains a working Minimega installation, with a Qemu/KVM hypervisor for executing the simulation. 3. Simulation system contains a set of image files with an identical syntax to the provided Minimega script. 4. The produced script is read into the Minimega environment on startup, generating the environment dynamically from scratch. This may be done manually through entering commands, or via a script-based approach. 5. Upon the launch of Minimega, the environment may be loaded and interfaced with through the Miniweb interface, locally hosted on the simulation device. 4 SIMULATION INITIALIZATION AND MANAGEMENT This section outlines the overall simulation lifecycle for Scan2Sim-based topological environments. It details the technical aspects of simulation on a device including hardware and software requirements, simulation initialization procedures, and the overall lifecycle of a simulated environment. This lifecycle is displayed below in Figure 2. Figure 2. Core Simulation Lifecycle Scan2Sim was designed for usage with Sandia’s hypervisor management framework Minimega. Minimega interacts directly with the KVM hypervisor and QEMU [3] emulation platform, allowing for compatibility with most Debian-based Linux systems. Minimega requires no external software stack or complex initial configuration, allowing for fast, efficient deployment of a wide array of experimental testbed scenarios. OpenVSwitch is leveraged for an internal switching stack, and VMbetter allows for the export of virtual hosts into many common disk image formats. Protonuke, a simple layer 3 traffic generation module, allows for diverse network conditions for experimentation. These features allow for the ease of recording and exporting scientific results, which in turn allows for the replicability of system experiments. Scan2Sim outputs are currently formatted as a set of Minimega instructions corresponding to system profiles. For example, if Scan2Sim detects a SCADA device, it will output the corresponding profile instructions to generate a simulated SCADA device. While images and onboard software are profile- based, network configurations are fully dynamic with respect to system input data. IP addresses and general network structures may be replicated with significant fidelity, allowing for realistic network topological simulations. The output instructions require no significant pre-processing to use in a simulation. A user would simply run each of the instructions manually or via an automated script, and the environment would be initialized. An example of this output script for a simple OT environment is given in Appendix B. When performing classification, several elements are considered with respect to profile matching. Each candidate profile includes a list of these components, each of which are compared to the 5 unclassified network data. First, port numbers are matched against candidate profiles. The specific nature of OT software and repetitious usage of certain port numbers allows this method to serve as the primary matching tool for Scan2Sim. For each candidate profile, Jaccard similarity between the unclassified port list and candidate port list is computed, with the highest similarity informing the classification decision. Additionally, natural language matching is considered through network driver details, where certain key natural language phrases such as “Windows” and “Siemens” are matched to candidate profiles. Simulations are currently designed to run on a single system; therefore the system requirements are significant. Current testing has been performed on a Dell Precision 7680 Workstation, which contains an Intel core i5 13600-HX, NVIDIA RTX™ 3500, and 32GB of RAM. To launch a simulation, Minimega must be installed into /opt/minimega. While it is possible to build Minimega from source code with a Go compiler, it is recommended to instead use the latest prebuilt publicly available binaries. More information about Minimega’s scalability and implementation experience can be found in [4]. CONCLUSION This document introduces Scan2Sim, a simple heuristic classifier for profile-based OT network reconstruction from enterprise network scanning tools. By using Scan2Sim, cybersecurity researchers can significantly reduce the amount of time and human labor required to develop high- fidelity network emulations of OT systems. Scan2Sim parses XML outputs of network information and outputs a usable topological diagram imitating the scanned target network. The tool has been used within Sandia internal projects, and successfully replicated network structures across a range of systems. Future work includes deploying Scan2Sim externally and analyzing results on industrial sites. APPENDIX A. REVISION HISTORY Revision Description 0 Initial document 8 APPENDIX B. EXAMPLE OUTPUT FOR TURBINE CONTROLLER This appendix contains the example output of Scan2Sim for an OT environment with the following attributes: • 2 Linux Workstations • 3 PLCs • 3 HMI Devices • Network: 30.0.1.0 (255.255.0.0) clear vm config vm config kernel /opt/minimega/images/minirouter.kernel vm config initrd /opt/minimega/images/minirouter.initrd vm config net MAIN vm launch kvm MGTR vm config net vm start MGTR router MGTR interface 0 30.0.1.0/24 router MGTR dhcp 30.0.1.1 range 30.0.1.2 30.0.1.254 router MGTR commit clear vm config vm config disk /opt/minimega/images/ubuntu20.04.qcow2 vm launch kvm Linux_Workstation2 vm config disk /opt/minimega/images/sandia_prop_siemens_backup.qcow2 vm config cores 4 vm config memory 32768 vm launch kvm PLC3 vm config disk /opt/minimega/images/sandia_prop_siemens_backup.qcow2 vm config cores 4 vm config memory 32768 vm launch kvm PLC4 vm config disk /opt/minimega/images/sandia_prop_siemens_backup.qcow2 vm config cores 4 vm config memory 32768 vm launch kvm PLC5 vm config disk /opt/minimega/images/Siemens-SCADA.img vm launch kvm Win_Workstation6 vm config disk /opt/minimega/images/Siemens-SCADA.img 9 vm launch kvm Win_Workstation7 vm config disk /opt/minimega/images/Siemens-SCADA.img vm launch kvm Win_Workstation8 vm config disk /opt/minimega/images/ubuntu20.04.qcow2 vm launch kvm Linux_Workstation9 vm start all cc filter name=Linux_Workstation2 cc exec ip addr add 30.0.1.5/16 dev ens1 cc filter name=PLC3 cc exec powershell.exe -command "New-NetIPAddress -InterfaceIndex 21 - IPAddress 30.0.1.11 -PrefixLength 16"cc exec ip link set ens1 down cc filter name=PLC4 cc exec powershell.exe -command "New-NetIPAddress -InterfaceIndex 21 - IPAddress 30.0.1.21 -PrefixLength 16"cc exec ip link set ens1 down cc filter name=PLC5 cc exec powershell.exe -command "New-NetIPAddress -InterfaceIndex 21 - IPAddress 30.0.1.40 -PrefixLength 16"cc exec ip link set ens1 down cc filter name=Win_Workstation6 cc exec ip addr add 30.0.1.85/16 dev ens1 cc filter name=Win_Workstation7 cc exec ip addr add 30.0.1.87/16 dev ens1 cc filter name=Win_Workstation8 cc exec ip addr add 30.0.1.97/16 dev ens1 cc filter name=Linux_Workstation9 cc exec ip addr add 30.0.1.159/16 dev ens1 10