ICS Reconnaissance
Identifying ICS/OT systems requires specialized techniques. Many devices use unique protocols and appear differently than traditional IT assets on network scans.
Passive First
Passive Reconnaissance
Shodan Queries
Shodan indexes internet-facing ICS devices: what a plant exposes to the internet, not what sits on its control network. Query mechanics are in Infrastructure Intelligence; the ports below identify a control protocol.
# General ICS searches
port:502 # Modbus
port:102 # Siemens S7
port:44818 # EtherNet/IP
port:47808 # BACnet
port:20000 # DNP3
port:2404 # IEC 60870-5-104 (power utilities)
port:1911,4911 # Niagara Fox
# Vendor-specific
"Siemens" port:102
"Allen-Bradley" port:44818
"Schneider Electric"
"Rockwell Automation"
product:"Modicon"
# HMI/SCADA systems
"Wonderware"
"FactoryTalk"
"WinCC"
http.title:"SCADA"
# By country/region
country:US port:502
city:"Houston" port:44818
# Known-vulnerable CVE only where the indexer has CVSS data for it
vuln:CVE-2019-12255 # VxWorksCensys Searches
# Censys: one services.* object per open service
services.port:502 # Modbus
services.port:102 # S7comm
services.port:47808 # BACnet
services.port:20000 # DNP3
# Certificate holder on a TLS service
services.tls.certificates.leaf_data.subject.organization:"Siemens"
# Exposed HMIs
services.http.response.html_title:"*HMI*"
services.http.response.html_title:"*SCADA*"Google Dorking
# Find exposed ICS documentation
site:target.com filetype:pdf "SCADA"
site:target.com filetype:pdf "PLC programming"
site:target.com filetype:dwg # AutoCAD drawings
# Exposed HMIs and dashboards
intitle:"Wonderware" inurl:portal
intitle:"FactoryTalk" inurl:login
inurl:"/portal/p/access" "Niagara"
# Configuration files
filetype:L5X # Studio 5000 export (XML)
filetype:L5K # Allen-Bradley export
filetype:xml "OPC" # OPC configuration
# Exposed documentation
"network diagram" filetype:pdf site:target.com
"control system" filetype:ppt site:target.comCapture Points: SPAN Port, Tap, Host
A switch access port gives a laptop broadcasts and its own traffic. Controller conversations appear only once the capture has somewhere to listen, and the options below are not equivalent.
A SPAN, or mirror, port copies onto one port the frames the switch forwards. It costs no downtime and only a configuration change, but you get what the switch chose to forward: a session scoped to particular ports or VLANs sees only that selection, frames dropped in hardware may never be copied, and a full-duplex link mirrored onto one port of the same rate over-subscribes the mirror and loses frames under load. Never transmit from a mirror port; its behaviour as a source is undefined.
A network TAP sits inline and copies the signal with no configuration dependency. It keeps errored frames and cannot drop under load, at the cost of breaking the link to install it, which needs a maintenance window. An aggregation tap puts both directions of a full-duplex link into one stream.
On the host side, a capture on an engineering workstation or historian sees only what reaches that NIC, and adding capture software to a production OT asset is itself a change: approval, and CPU on an old machine. Its value is host-local traffic no switch will mirror.
Capture mechanics are in Network Traffic and evidence handling in Digital Forensics and Incident Response. The point: a capture is a record of the wire, re-readable after the plant changes, and it attributes nothing to a scanner.
From a Pcap to an Asset Inventory
Zeek reads the capture offline and writes one log per protocol, so the inventory comes from traffic rather than from a tool's guess about a host. Check that the build carries the analyzer for each protocol before relying on one: a missing protocol needs a package, not a different filter. Read each log's #fields header before querying - column order is not stable across builds.
# Offline analysis: run in an empty directory, one log per protocol appears under ./logs
zeek -r plant.pcap local
# Confirm an analyzer is present on this build (repeat for other analyzer names)
zeek -N Zeek::ModbusThe inventory fields fall out of those logs: address pair, protocol and port, unit or device identifier, direction, first and last seen. Connection data gives endpoints, ports and timestamps; the protocol log gives the unit or device identifier that names the model. Direction is an observation only when the SYN is in the capture; otherwise the originator is inferred from the first packet seen, and that inference belongs in its own column.
# One row per TCP conversation: endpoints, ports, packets, bytes, duration
tshark -r plant.pcap -q -z conv,tcp
# Who opened each connection: a SYN without ACK is the observed direction
tshark -r plant.pcap -Y "tcp.flags.syn==1 && tcp.flags.ack==0" -T fields -e ip.src -e ip.dst -e tcp.dstport | sort -u
# Modbus unit identifiers on the wire. Field names follow the installed dissector:
# list them with: tshark -G fields | grep -i modbus
tshark -r plant.pcap -Y modbus -T fields -e ip.src -e ip.dst -e mbtcp.unit_id | sort -uAsset Discovery
OSINT Sources
Public Filings
- NERC compliance documents
- Environmental permits
- SEC 10-K filings (infrastructure)
- County assessor records
- Building permits
Technical Sources
- Job postings (reveal tech stack)
- Vendor case studies
- Conference presentations
- LinkedIn profiles (engineers)
- GitHub repositories
ICS-Specific Search Engines
-
Shodan -
shodan.io
Best for ICS device discovery -
Censys -
censys.io
Certificate and service enumeration -
FOFA -
fofa.info
Chinese search engine, good for ICS -
ZoomEye -
zoomeye.org
Device and service fingerprinting
Active Reconnaissance
Caution Required
Safe Scanning Techniques
# Nmap - use with extreme caution on ICS networks
# Never use -T4 or -T5 on production ICS
# TCP SYN scan at the slowest timing template
nmap -sS -T1 -p 102,502,20000,44818 --max-retries 1 192.168.1.0/24
# BACnet is UDP/47808 - a TCP scan never sees it
nmap -sU -T1 -p 47808 192.168.1.0/24
nmap -sU -p 47808 --script bacnet-info 192.168.1.100
# Service detection (more intrusive)
nmap -sV -T2 -p 502 --script modbus-discover 192.168.1.100
# ICS-specific Nmap scripts
nmap --script enip-info -p 44818 192.168.1.100
nmap --script s7-info -p 102 192.168.1.100
nmap --script modbus-discover -p 502 192.168.1.100
# List available ICS scripts
ls /usr/share/nmap/scripts/ | grep -E "modbus|s7|bacnet|enip|dnp3"Probe Risk
A read-only probe still carries risk. What matters is whether it asks a device to describe itself, or can change what the device is running.
| Probe | What it sends | Effect |
|---|---|---|
| ping sweep | ICMP echo and local ARP | Liveness only; a host that ignores ICMP looks absent, and ARP never crosses a router. |
| modbus-discover | Read Device Identification, unit-identifier walk | Read-only; a non-conforming stack may log the session, drop it, or stop answering. |
| s7-info | SZL identification reads over COTP | Read-only; the reply names vendor, module and firmware. |
| enip-info | ListIdentity and ListServices | Read-only; identity names device type and revision. |
| version detection | Repeated, malformed probes | Read-only but the noisiest; response parsing is what resets a fragile stack. |
| any write, stop or cold-start | Coil or register writes, mode changes, forced I/O | State change: never on production, simulator only. |
Treat a device whose firmware you cannot identify as fragile: unknown firmware is when a well-formed read gets an unexpected answer, and an unexpected answer from a controller is a process event. Capture first, so an active probe only confirms the wire.
Protocol-Specific Enumeration
"""Read-only identification for three controller families. Lab addresses only."""
from pymodbus.client import ModbusTcpClient
from pycomm3 import CIPDriver
import BAC0
TARGET = "192.168.1.100"
# Modbus: Read Device Identification (function 43/14)
client = ModbusTcpClient(TARGET)
client.connect()
# The method name differs by pymodbus release; check dir(client) for
# read_device_information / read_device_info before relying on one.
print(client.read_device_information())
client.close()
# EtherNet/IP: CIP identity object
with CIPDriver(TARGET) as plc:
print(plc.get_plc_info())
# BACnet: Who-Is, then print the I-Am replies
bacnet = BAC0.lite()
for device in bacnet.whois():
print(device)pip install pymodbus pycomm3 BAC0
python3 read_only_enum.py
# Siemens S7 with s7scan - SZL identification reads only
git clone https://github.com/klsecservices/s7scan
cd s7scan && ./s7scan 192.168.1.100
# Each protocol above also has an NSE equivalent; see the Nmap block for the
# timing that keeps the probe rate downCommon ICS Ports
| Port | Protocol | Common Vendors |
|---|---|---|
| 102 | S7comm (ISO-TSAP) | Siemens |
| 502 | Modbus TCP | Many (universal protocol) |
| 4840 | OPC UA | Modern ICS systems |
| 20000 | DNP3 | Utilities (power, water) |
| 2404 | IEC 60870-5-104 | Power utilities (EU/intl) |
| 44818 | EtherNet/IP | Allen-Bradley, Rockwell |
| 47808 | BACnet | Building automation |
| 1911/4911 | Niagara Fox | Tridium/Honeywell |
| 789 | Red Lion Crimson | Red Lion |
Identifying Vendors
# Common ICS vendor MAC prefixes (OUI)
# Siemens: 00:1B:1B, 00:0E:8C
# Allen-Bradley/Rockwell: 00:00:BC
# Schneider Electric: 00:80:F4 (registered to Telemecanique)
# ABB: 00:1B:45
# Honeywell: 00:40:84
# GE Intelligent Platforms: 00:09:91
# Find vendor from MAC
# Online: https://macvendors.com
# Or use arp-scan
sudo arp-scan -l | grep -i "siemens|schneider|rockwell|allen|abb"
# Identify by banner/response
# Siemens S7 returns specific identifiers
# Modbus device ID function
# BACnet device objectsNetwork Mapping
# Capture from the monitor port or a host NIC - never from the target device
tcpdump -i eth0 -s 0 -w ics_capture.pcap
# Rotate by size so a long capture cannot fill the disk
tcpdump -i eth0 -s 0 -C 200 -w ics_capture.pcapmodbus # Modbus/TCP
s7comm # Siemens S7
enip # EtherNet/IP and CIP
bacnet # BACnet
dnp3 # DNP3Then read the capture for architecture, not hosts: which subnets and VLANs appear, which pairs talk across them, which jump or remote-access hosts sit on both sides, and which flows leave the site. Record the address range per zone, the protocol flows between zones and every external connection - the input to the conduit review in Network Architecture.
Reconnaissance Checklist
Passive Recon
- Agree a SPAN, tap, or host capture point and its window
- Build the inventory from the capture, not from a previous report
- Search Shodan/Censys for exposed ICS
- Google dork for documentation and diagrams
- Review public filings and permits
- Analyze job postings for tech stack
- Check vendor case studies
Active Recon (Authorized Only)
- Slow port scan for ICS ports
- Protocol-specific enumeration
- Device identification
- Network architecture mapping
- Document vendor and firmware versions
Build the Inventory From a Capture
Run a local Modbus or EtherNet/IP server and a client on one isolated host, capture the exchange, then build the asset inventory from the pcap alone: address, protocol, unit or device identifier, direction, first and last seen. Mark every fact that came off the wire against every field you inferred. Done when the inventory names every flow in the capture and every inferred field is labelled as inference.
Evidence to Capture
In an OT review the asset inventory is the artefact everything else depends on. Capture how each device was identified, not just that it was listed.
Capture window: The passive capture that produced the inventory: interface, SPAN or tap point, start and end time. An inventory without a capture window cannot be reconciled with a later change.
Identification strings: The raw response that names the device: the CIP identity object, the S7 vendor and module identifiers, the Modbus exception or banner, the HTTP title. A model number inferred from a MAC prefix alone is a guess.
Purdue and zone attribution: Each asset mapped to a Purdue level and an IEC 62443 zone. An inventory with no zone column cannot drive a conduit rule or a SL-T target.
Scan profile and authorisation: The timing template, NSE scripts, and rate used, plus the written authorisation and change window covering them. Nmap scripts that write to a controller are outside a passive-discovery scope.
Unmatched assets: Devices seen on the wire that are absent from the CMDB, listed separately. That delta is usually the more useful finding than the asset count.
Likely False Positives
The OT inventory punishes assumptions. Most false findings come from attribution, not from scanning.
- Unpatched firmware read from a banner: A version string is often the web server or a gateway default page, not the controller firmware. Confirm against the module identifier or the vendor tool before reporting.
- Exposed device in a search engine: Shodan and Censys index honeypots, ISP equipment, and unrelated organisations behind shared address space. Traceroute and registration confirm attribution.
- Industrial protocol on an odd port: A Modbus-shaped response from a nonstandard port is often a scripted decoy or a building system. Confirm the exchange before calling it a control asset.
- Same asset listed twice: Dual-homed engineering workstations and NAT boundaries produce two addresses for one device. Reconcile by serial or MAC before scoring the inventory.
- Host missing from the scan: A controller that ignores ICMP and nonstandard probes is normal. Absence from an active scan is not absence from the zone; the passive capture decides.
Review Checklist
Inventory
- ☐ Confirm the inventory was built from a capture with a stated window, not from a previous report.
- ☐ Check every asset has a protocol-level identifier, not just an address and a MAC vendor.
- ☐ Reconcile against the CMDB and read the unmatched list with the plant contact.
- ☐ Confirm the boundary of the discovery scope matches the conduit list for the assessment.
Safety envelope
- ☐ Read the authorisation and confirm the scan profile is inside it, including any active probe.
- ☐ Check the timing template and rate are recorded and were applied, not planned.
- ☐ Confirm a change window and a plant contact were in place for every active step.
- ☐ Check any write-capable script was excluded from the run.
Attribution
- ☐ Confirm each discovered device is assigned to a zone and a Purdue level.
- ☐ Check internet-facing findings are verified by the asset owner before reporting.
- ☐ Confirm the vendor and firmware mapping cites the raw response.
- ☐ Check the report distinguishes reachable from exploitable for every exposed port.
Remediation
Fix the inventory, then the conduit that exposed it
Structural
- • Make the passive sensor the inventory source of record and reconcile it against the CMDB on a schedule, so an unmanaged device becomes visible by existing rather than by assessment.
- • Require a zone and Purdue level on every asset record, and derive the conduit review from that column.
- • Remove internet reachability for any control asset found exposed, rather than adding authentication in front of a protocol that has none.
Compensating
- • Where active discovery is prohibited by the plant, extend passive coverage and record the blind spots the sensor cannot see.
- • For devices that cannot be patched or fingerprinted, record the compensating conduit restriction that limits who can reach them.