Trainer Name: Justin Searle

Title: Assessing and Exploiting PLCs

Duration: 3 Days

Dates: March 6, 2023 To March 8, 2023

Training Objectives

This is not your traditional SCADA/ICS/IIoT security course! How many courses send you home with a PLC and non-expiring software to program it?!? This course teaches hands-on penetration testing techniques used to test PLCs, including their logic, field buses, network protocols, and proprietary maintenance interfaces. The skills you will learn in this course will apply directly to any current or past PLC in the industry. In fact, these techniques can be used on practically any industrial controller, IoT, IIoT, or medical device. This course is structured around the formal penetration testing methodology created by ControlThings LLC and their opensource suite of tools found at

This course will include the following course modules from ControlThings LLC:

  • Assessing and Exploiting Control System Architectures
  • Assessing and Exploiting Control Network Captures
  • Assessing and Exploiting Controller Logic
  • Assessing and Exploiting Control Protocols
  • Assessing and Exploiting Proprietary Serial Protocols

Training level: Intermediate

Module Outlines

Assessing and Exploiting Control System Architectures
  • Examples of when to use
  • Overview of methodology
  • Different security assessment types and their respective benefits and risks
  • Passive vs active assessments
  • Manual vs automated
  • Reasons why architecture reviews should always be performed first
  • Basic control system concepts, systems, and devices
  • Control system architectures
  • PLCs, RTUs, and IEDs
  • Understanding RTOS
  • Industrial and non-Industrial
  • What is IIoT and how it differs from IoT
  • Field devices, buses, and loops
  • DCS vs SCADA
  • Plant networks
  • SCADA networks
  • Purdue model and IEC 62443
Assessing and Exploiting Control Network Captures
  • Examples of when to use
  • Overview of methodology
  • Traffic Capture
  • Hardware and software to use
  • Suggested configurations
  • Endpoint and Flow Analysis
  • Common TCP/IP-based ICS protocols
  • Exercise: Using Wireshark for endpoint and flow analysis
  • Exercise: Using GrassMarlin
  • Known Protocol Analysis
  • Deep-dive into Modbus TCP
  • Exercise: Analyzing Modbus TCP captures
  • Exercise: Using zeek with Modbus TCP
  • Exercise: Using strings on control protocols
  • Overview of ProfiNet, EnternetIP/CIP, OPC, DNP3, IEC 104, IEC 61850, ICCP
  • Unknown Protocol Analysis
  • Exercise: Finding unknown protocols with Wireshark
  • Exercise: Entropy analysis of network payloads
  • Exercise: Using GrassMarlin on unknown protocols
  • Gap Analysis with Security Architecture Review
Assessing and Exploiting Controller Logic
  • Examples of when to use
  • Overview of methodology
  • Understanding controller logic
  • Exercise: Understanding tags
  • Exercise: Understanding ladder logic
  • Exercise: Understanding sequential function charts
  • Velocio PLCs vs other PLCs
  • Exercise: Programming a PLC
  • Exercise: Debugging a PLC
  • Testing business logic flaws
  • Exercise: Leveraging the HMI for proof of concept attacks
Assessing and Exploiting Control Protocols
  • Examples of when to use
  • Overview of methodology
  • Traffic Capture
  • Communication mediums vs communication protocols
  • Serial communications like RS-232, TIA-422, and TIA-485
  • Fieldbus Protocols and Protocol Families
  • Understanding USB and serial interfaces on Windows
  • Methods to capture serial traffic in Windows and Linux
  • Exercise: Capturing serial traffic
  • Exercise: Manual decode of Modbus RTU
  • Understanding the common 1-off address issue of ICS protocols
  • Exercise: Using Wireshark to decode Modbus RTU
  • Protocol Enumeration
  • The severe lack of availability of ICS protocol tools
  • Repurposing an engineer's troubleshooting tools
  • Exercise: Using Python to interact with Modbus RTU on our PLC
  • Exercise: Enumeration with ctmodbus on our PLC
  • Understanding data types and 2's complement
  • Protocol Fuzzing
  • Reasons to avoid fuzzing protocols on embedded devices
  • Exercise: Writing protocol fuzzers with boofuzz
  • Exercise: Fuzzing Modbus TCP on our PLC
  • Exercise: Manual fuzzing with ctmodbus
  • Protocol Exploitation
Assessing and Exploiting Proprietary Serial Protocols
  • Examples of when to use
  • Overview of methodology
  • Functional analysis
  • Using ICS vendor maintenance software and hardware
  • Exercise: Functional analysis of PLC's vendor tools
  • Communication capture
  • Capturing USB with hardware, software, and virtualization layers
  • Understanding USB and serial interfaces on Windows
  • Exercise: Capture of our vendor tool interactions with our PLC
  • Capture analysis
  • Exercise: Analysis of our vendor's proprietary protocol
  • Exercise: Reverse engineering our vendor's proprietary protocol
  • Exercise: Using Wireshark's column, comment, and coloring rules for RE
  • Testing harness creation
  • Exercise: Creating serial connections with Python
  • Exercise: Using ctserial to impersonate our vendor tools
  • Endpoint fuzzing
  • Exercise: Using ctserial for manual fuzzing on our PLC
  • Exploitation

Who Should Attend?

This course is designed for intermediate-level security professionals, be they engineers, technicians, analysts, managers, or penetration testers.

What to Bring?

Each attendee must bring a computer that meets the following requirements:

  • 64-bit processor with the 64-bit operating system
  • VT or other 64-bit virtualization settings enabled in your BIOS to run 64-bit VMs
  • At least eight (8) GB of RAM, recommended sixteen (16) GB if possible
  • At least fifty (50) GB of free hard drive space
  • Intel VT or AMD-V virtualization hardware extensions ENABLED in BIOS
  • Windows 10 or 11 installed on your host laptop or inside a VM
  • Virtualization software, which must be installed and tested with ControlThings Platform VM BEFORE CLASS!
  • Windows Users: Recent version of VirtualBox or VMware Fusion (released within the last year)
  • Mac Users: Recent version of VirtualBox or VMware Fusion (released within the last year)
  • Linux Users: Recent version of Gnome Boxes, Libvirt, VirtualBox, or VMware Workstation (released within the last year)
  • Access to a local account with administrative permissions that can install software and disable any security services that interfere with course exercises
  • Access to and ability to change BIOS settings if needed in class

Training Prerequisite

Basic penetration testing experience is desirable, but not required. It is assumed that attendees will have no knowledge of ICS, Smart Grid, SCADA, or critical infrastructure.

What attendees will be provided?

The following items (or rough equivalents depending on availability) are provided to each attendee to use in class and keep after course completion:

  • Velocio Ace 1600 PLC (Programmable Logic Controller)
  • vBuilder software to program the PLC to keep (non-expiring)
  • vFactory software to program an HMI for the PLC (non-expiring)
  • PDF version of the course slide deck
  • Lifetime access to future updates to the course modules presented in class is restricted to the individual that attended the course

What to Expect?

The course is about 70% hands-on and 30% lecture. The hands-on exercises are mostly instructor lead with the instructor doing the exercise on the projector while students do it on their own laptops, which allows for deeper conversations about exercise steps and adhoc experimentation during the exercise. The exercises will use the course methodology to exploit a specific PLC, however, the methodology and tools are taught in a generic method that will apply to any other PLC or ICS controller.

What not to expect?

This course will explore reverse engineering techniques on proprietary PLC technologies for the purpose of a 0-day vulnerability discovery. This course does not go into firmware exploitation or embedded circuit-board attacks which is covered in the longer 5-day version of this course titled "Assessing and Exploiting Control Systems and IIoT" taught at other conferences.

About the Trainer

Justin Searle is the Director of ICS Security at InGuardians, specializing in ICS security architecture design and penetration testing. He led the Smart Grid Security Architecture group in the creation of NIST Interagency Report 7628 and has played key roles in the Advanced Security Acceleration Project for the Smart Grid (ASAP-SG), National Electric Sector Cybersecurity Organization Resources (NESCOR), and Smart Grid Interoperability Panel (SGIP).

Justin has taught courses in hacking techniques, forensics, networking, and intrusion detection for multiple universities, corporations, and security conferences. He is currently a Senior Instructor for the SANS Institute and a faculty member at IANS. In addition to electric power industry conferences, Justin frequently presents at top international security conferences such as Black Hat, DEFCON, OWASP, Nullcon, and AusCERT.

Justin leads prominent open-source projects including The Control Thing Platform, Samurai Web Testing Framework (SamuraiWTF), Samurai Security Testing Framework for Utilities (SamuraiSTFU). He has an MBA in International Technology and is a CISSP and SANS GIAC certified Incident Handler (GCIH), Intrusion Analyst (GCIA), Web Application Penetration Tester (GWAPT), and GIAC Industrial Control Security Professional (GICSP).