image image
Justin Searle Picture

Assessing and Exploiting PLCs

Trainer: Justin Searle

Date: 5-8 July 2021 (5hrs for 4days)

Time: 9:00am to 2:00pm PDT

Platform: Zoom + Discord


Course Abstract:

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. Skills you will learn in this course will apply directly to any current or past PLC in the industry. This course is structured around the formal penetration testing methodology created by ControlThings LLC and their opensource suite of tools found at ControlThings.io.

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 Maintenance Interfaces

Module Outlines:

    Assessing and Exploiting Control System Architectures
  • Examples 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 neworks
      • SCADA networks
      • Purdue model and IEC 62443

    • Assessing and Exploiting Control Network Captures
    • Examples 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
        • Deepdive into Modbus TCP
        • Exercise: Analysing 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 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 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: Fuzzing Modbus TCP on our PLC
            • Exercise: Manual fuzzing with ctmodbus
          • Protocol Exploitation

            • Assessing and Exploiting Maintenance Interfaces
            • Examples 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

            • Recommended Reading before the Course


              Each Attendee Must Bring a Laptop that Meets the Following Requirements

              • 64-bit processor with 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
              • Windows 10.x installed on your host laptop or inside a VM
              • VMware Workstation Player 15 (or later), VMware Workstation Pro 15 (or later), or VWware Fusion 11 (or later) installed BEFORE class begins. Other virtualization software such as Parallels, VirtualBox, or earlier versions of VMware products may work if the attendee is familiar with its functionality and takes full ownership of its configuration, however non-VMware software is not officially supported and VMware should be pre-installed as a backup just in case
              • Access to an account with administrative permissions and the ability to disable all security software on their laptop such as Antivirus and/or firewalls if needed for the class
              • If you are using Linux for your host machine, you will need ExFAT drivers installed for the USB drive

              Resources Provided at the Course

              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)
              • Latest version of the ControlThings Platform
              • PDF version of the course slide deck


              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 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).