Assessing and Exploiting PLCs

Course Description

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 Proprietary Serial Protocols

Course contents

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 networks
    • 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 Production Control Networks

  • Examples when to use
  • Overview of methodology
  • DNS interrogation
    • When DNS is and when it is not available
    • Using but not abusing DNS
  • Port Scanning
    • How and why control systems break on port scans
    • Nmap options to avoid
    • General Nmap recommendations
    • Recommended Nmap scans from low to high risk
  • Technology Fingerprinting
    • Safe and unsafe fingerprinting technologies
    • Alternatives to traditional fingerprinting
  • Protocol Enumeration
    • Common IT protocols that are generally safe to enumerate on control systems
    • Avoiding automatic enumerating of web interfaces on control systems
    • Dangers of enumeration control protocols in production
  • Vulnerability Scanning
    • Plugins and configuration that break control systems
    • Recommended settings for Nessus
    • Using audits
    • Again, the dangers of automated tools on web apps and services
  • Vulnerability validation
  • Exploitation
  • Post Exploitation / Cleanup

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: 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 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

Requirements

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.

System 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
  • Intel VT or AMD-V virtualization hardware extensions ENABLED in BIOS
  • Windows 10.x installed on your host laptop or inside a VM
  • The latest version of VirtualBox that has been installed BEFORE class and tested with the latest public release of ControlThings Platform from ControlThings.io (VMware Workstation is NOT compatible with one of our hardware components)
  • Access to a local account with administrative permissions that can install software and disable any security services that interferes with course exercises
  • Access to and ability to change BIOS settings if needed in class

Additional laptop configuration will be provided to attendees via email approximately one week before the course begins. Attendees should plan on about 1-2 hours to complete the laptop configurations before class begins.

Target Audience

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

Trainers Biography

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

Twitter: @meeas