Kuboid
Open Luck·Kuboid.in
Security BSides2023
Open in YouTube ↗

Shining a light onto IoT and OT scanning

BSidesSLC112 views30:25almost 3 years ago

This talk explores the unique security challenges of scanning Operational Technology (OT) and Internet of Things (IoT) environments, which are often fragile and lack traditional security controls. The speaker demonstrates how to perform active reconnaissance on these systems while minimizing the risk of service disruption or device crashes. The presentation provides five key principles for safe scanning, emphasizing incremental fingerprinting and traffic management to avoid triggering vulnerabilities in legacy industrial protocols. The talk highlights the prevalence of default credentials and unpatched vulnerabilities in critical infrastructure.

Why Your Next Network Scan Might Crash the Factory Floor

TLDR: Active scanning in OT and IoT environments is a high-stakes game where standard tools like Nmap and Nessus can easily trigger device reboots or service outages. This post breaks down the five principles of safe reconnaissance, focusing on incremental fingerprinting and traffic management to avoid tripping legacy industrial protocols. If you are testing critical infrastructure, you need to move away from aggressive discovery and toward a surgical, low-and-slow approach.

Most of us cut our teeth on IT networks where the worst-case scenario for an aggressive Nmap scan is a noisy log entry or a temporary firewall block. We are used to high-performance servers, redundant clusters, and systems that expect a constant barrage of traffic. When you pivot to Operational Technology (OT) or Internet of Things (IoT) environments, that mindset is a liability. These systems are often fragile, running on real-time operating systems (RTOS) that were never designed to handle arbitrary, malformed, or high-volume network traffic.

The Fragility of Industrial Control Systems

In an OT environment, availability is the only metric that matters. A PLC controlling a water treatment valve or a gas pipeline doesn't care about confidentiality or integrity in the same way a web server does. If your scan causes a buffer overflow in a legacy network stack or triggers a watchdog timer, you aren't just generating a bug report; you are potentially causing a physical, real-world incident.

The Purdue Model provides a theoretical framework for segmenting these networks, but in practice, it is rarely implemented perfectly. Attackers and researchers often find that the "air gap" is more of a suggestion than a reality. Once you gain a foothold in the upper layers, the path to the lower-level PLCs and actuators is often wide open.

The Mechanics of a Crash

Standard vulnerability scanners like Nessus or Nmap are built to be loud. They send non-standard packets and unexpected payloads to identify services. In an IT environment, this is efficient. In an OT environment, this is a denial-of-service attack.

Consider the Siemens S7-300 and S7-400 vulnerabilities. These devices are susceptible to information exposure and improper input validation. If you hit these devices with a standard scan, you might trigger a state change that forces the PLC into a stop mode. Once that happens, the process stops. You are now responsible for a manual reset of a critical industrial process.

Five Principles for Safe Reconnaissance

To avoid turning your engagement into a disaster, you need to adopt a different methodology. These five principles are the baseline for any professional assessment of OT or IoT assets:

  1. Send standard packets and expected payloads: Avoid the "Christmas tree" packets. If a device expects a specific protocol handshake, give it exactly that. Do not try to fuzz the stack during the discovery phase.
  2. Avoid security probes: Disable the aggressive vulnerability checks in your scanner. If you must use a scanner, configure it to only perform service discovery, not vulnerability exploitation or heavy probing.
  3. Distribute scan traffic sensibly: Do not blast the entire subnet from a single source. Use a distributed, round-robin approach to spread the load across multiple devices. This keeps the packet-per-second (PPS) count low for any individual host.
  4. Fingerprint/scan incrementally: Start with the absolute minimum. Use ARP or ICMP sweeps to find live hosts, then move to device-specific UDP queries. Only if the device remains stable should you consider a SYN scan on specific, non-critical ports.
  5. Test and scan over time: Do not try to map the entire network in an hour. A slow, iterative scan is far more likely to succeed without triggering a crash.

The IoT Fingerprinting Problem

IoT devices present a different challenge. They often have minimal open ports and are frequently encrypted, making them look like generic Linux machines to a naive scanner. You will see an SSH port and an HTTPS port, and that’s it.

To actually identify these devices, you have to look at the payload. This involves a manual, painstaking process of interacting with the service, parsing the response, and looking for specific headers or behaviors that reveal the underlying platform. It is tedious, but it is the only way to distinguish a smart coffee maker from an IP camera without resorting to destructive scanning.

Defensive Realities

If you are working with a blue team, emphasize that they need to move away from relying on passive network monitoring alone. While passive monitoring is safe, it is often incomplete and inaccurate because it only sees what is currently on the wire. A combination of passive monitoring and surgical, authorized active scanning is the only way to maintain a true asset inventory.

If you are on an engagement, remember that your goal is to identify risk, not to break the infrastructure. The moment you see a PLC or an industrial controller, stop the automated tools. Switch to manual, targeted interaction. If you don't know how a device will react to a specific packet, assume it will crash. In the world of OT, the most dangerous tool in your kit is the one that works too well.

Talk Type
talk
Difficulty
intermediate
Category
iot security
Has Demo Has Code Tool Released


BSidesSLC 2023

11 talks · 2023
Browse conference →
Premium Security Audit

We break your app before they do.

Professional penetration testing and vulnerability assessments by the Kuboid Secure Layer team. Securing your infrastructure at every layer.

Get in Touch
Official Security Partner
kuboid.in