Skip to content

Phase 10 — Siemens S7comm & IEC 60870-5-104 Legacy Device Emulation

Choose a tag to compare

@iburres iburres released this 18 May 16:26
· 391 commits to main since this release

Phase 10: Conpot Legacy Device Emulation

This release adds Siemens S7comm and IEC 60870-5-104 protocol emulation — two of the most widely deployed legacy protocols in industrial control systems. Both device types are emulated by a single lightweight pure-Python container (ics-sim-conpot) that responds to real network scanner and exploit framework probes.


New Device Types

Device Protocol Port Emulated Behavior
Siemens S7 PLC (legacy-plc) S7comm TCP 102 RFC 1006 TPKT + COTP handshake, S7 Setup Communication, Read Variable, SZL reads (module ID 0x0011, component ID 0x001C)
IEC 104 RTU (iec104-rtu) IEC 60870-5-104 TCP 2404 STARTDT/STOPDT/TESTFR U-frames, General Interrogation (type 100), spontaneous M_ME_NC_1 floating-point measurements with drift

Both device types are draggable from the OT Layer → Legacy / Protocol palette section.


Attack Surface for Student Labs

The S7 emulator responds to:

  • nmap --script s7-enumerate -p 102 — returns CPU order number and firmware version
  • Metasploit auxiliary/scanner/scada/siemens_simatic_manager — full fingerprinting
  • python-snap7 / custom S7 PDU tools

The IEC 104 emulator responds to:

  • STARTDT activation → spontaneous M_ME_NC_1 process data (power kW, frequency Hz, voltage V, current A, power factor, reactive power kVAR, tap position, temperature)
  • General Interrogation command → full data response with ACT_CON + ACT_TERM
  • Command injection exercises (write command objects via type C_SC_NA_1)

What's in This Release

  • containers/conpot/ — new Docker image (python:3.12-alpine, ~120 MB); one image handles both S7 and IEC 104 via DEVICE_CATEGORY env var
  • Schema — s7comm and iec-104 protocol union members; S7Config and Iec104Config device config interfaces; legacy-plc and iec104-rtu device categories
  • Orchestrator — compose generator injects S7_DEVICE_TYPE, S7_PORT, IEC104_COMMON_ADDRESS, IEC104_PORT environment variables
  • Canvas — ISA-5.1-style icons for both device types; full Purdue Reference Model connection matrix (connections to PLCs, RTUs, IEDs, HMI, Historian, field devices, and infrastructure)
  • Palette — new "Legacy / Protocol" section on the OT layer tab
  • CI — ics-sim-conpot added to the Docker build matrix; image published to GHCR on every push to main

Development Status

Phase Feature Status
0–9 Foundation through community scenario packs ✅ Complete
10 Conpot legacy device emulation (S7comm + IEC 104) ✅ Complete
11 Physical process simulation (tank, pump, valve dynamics) 🔜 Planned
12 macOS + Linux packaging and distribution 🔜 Planned

Author: Ian Burres, Professor of Practice — Cybersecurity, University of Texas at San Antonio (UTSA)