CANSECWEST 2022 DOJO

Assessing and Exploiting Control Systems and IIoT

 

Instructor: Justin Searle

Justin Searle

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

 

Instructor Contact Information

Justin Searle, Director of ICS Security, InGuardians

Training and Opensource:  justin@controlthings.ioConsulting and Testing:  justin@inguardians.com

Cell: +1 801-784-2052

http://twitter.com/meeas

http://www.linkedin.com/in/meeas

 

Course Schedule

The next scheduling of this dojo has yet to be decided.

 

Course Abstract

This is not your traditional SCADA/ICS/IIoT security course!  How many courses send you home with a $500 kit including your own PLC and a set of hardware/RF hacking tools?!?  This course teaches hands-on penetration testing techniques used to test individual components of a control system, including embedded electronic field devices, network protocols, RF communications, Human Machine Interfaces (HMIs), and various forms of master servers and their ICS applications.  Skills you will learn in this course will apply directly to systems such as the Smart Grid, PLCs, RTUs, smart meters, building management, manufacturing, Home Area Networks (HAN), smart appliances, SCADA, substation automation, synchrophasors, and even IoT.  This course is structured around the formal penetration testing methodology created by UtiliSec for the United States Department of Energy.  Using this methodology and ControlThings Pentest Platform (previously SamuraiSTFU), an open source Linux distribution for pentesting energy sector systems and other critical infrastructure, we will perform hands-on penetration testing tasks on user interfaces (on master servers and field device maintenance interfaces), control system protocols (modbus, DNP3, IEC 60870-5-104), proprietary RF communications (433MHz, 869MHz, 915MHz), and embedded circuit attacks (memory dumping, bus snooping, JTAG, and firmware analysis).  We will tie these techniques and exercises back to control system devices that can be tested using these techniques.  The course exercises will be performed on a mixture of real world and simulated devices to give students the most realistic experience as possible in a portable classroom setting. 

Advances in modern control systems such as the energy sector’s Smart Grid has brought great benefits for asset owners/operators and customers alike, however these benefits have often come at a cost from a security perspective.  With increased functionality and additional inter-system communication, modern control systems bring a greater risk of compromise that vendors, asset owners/operators, and society in general must accept to realize the desired benefits.  To minimize this risk, penetration testing in conjunction with other security assessment types must be performed to minimize vulnerabilities before attackers can exploit critical infrastructures that exist in all countries around the world.  Ultimately, this is the goal of this course, to help you know how, when, and where this can be done safely in your control systems.  

 

Course Pre-requisites

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.  This course is designed for intermediate level security professionals, be they engineers, technicians, analysts, managers, or penetration testers.

For those with little or no ICS experience, these Wikipedia articles provide a brief introduction to the concepts and history of control systems that will be helpful to know for class.

  1. http://bit.ly/2WzuVZu    (Large YouTube Playlist of Basic ICS Concepts)

  2. http://en.wikipedia.org/wiki/ICS

  3. http://en.wikipedia.org/wiki/SCADA

  4. http://en.wikipedia.org/wiki/Distributed_control_system 

  5. https://en.wikipedia.org/wiki/Programmable_logic_controller

  6. http://en.wikipedia.org/wiki/Smart_grid 

  1. http://csrc.nist.gov/publications/nistpubs/800-82/SP800-82-final.pdf - NIST 800-82 is a great introduction to industrial control systems and the security issues surrounding them.

  2. http://kunststube.net/encoding - Understanding ASCII, Unicode, UTF-8, UTF-16, and UTF-32

 

Course Learning Objectives

  1. Attendees will be able to explain the steps and methodology used in performing penetration tests on Industrial Control Systems and Industrial Internet of Things.

  2. Attendees will be able to use the free and open source tools in ControlThings Platform to discover and identify vulnerabilities in web applications.

  3. Attendees will be able to exploit several hardware, network, serial, user interface, RF, and server-side vulnerabilities.

 

Who Should Attend

To be announced.

 

Course Agenda

Day 1 Outline – Assessing and Exploiting Controllers

Understanding 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

Understanding controller logic

  • Velocio PLCs vs other PLCs

  • Hands-on exercise creating controller logic

  • Hands-on exercise programming a PLC

  • Hands-on exercise creating an HMI

Architecture Reviews of major ICS and smart grid systems

  • Supervisory control and data acquisition (SCADA)

  • Distribution Grid Management (DGM) and Substation Automation (SA)

  • Wide Area Management, Protection, and Control (WAMPAC)

  • Demand Response (DR)

  • Distributed Energy Resources (DER)

  • Advanced Metering Infrastructure (AMI)

  • Electric Vehicles (EV)

Introduction to ControlThings Platform

  • Setting up the virtual machine

  • Walk through the tools and functionality

  • Introduction to the student hardware kits

Introduction to the NESCOR methodology for penetration testing

  • Preparing for a penetration test

  • Architecture reviews

  • Testing the master servers

  • Testing the user interfaces

  • Testing the network communications

  • Testing the embedded field devices

  • End-to-end assessment

  • Reporting

Types of ICS user interfaces

  • Traditional applications

  • Web applications

  • Terminal interfaces

Pentesting maintenance interfaces on ICS field and floor devices

  • Functional analysis of field technician interfaces

  • Hands-on exercise capturing USB communications to tech interfaces

  • Hands-on exercise analyzing captured USB communications

  • Impersonating endpoints in field tech interface communications

  • Hands-on exercises impersonating vendor endpoints with Python

  • Exploiting vulnerabilities found during analysis


Day 2 Outline – Assessing and Exploiting ICS Communication Protocols

Performing traditional network pentests on control systems

  • Overview of a traditional network penetration test methodology

  • Dangers of port and vulnerability scanning

  • Strategies to perform port and vulnerability scanning 

Pentesting Different Communication Layers

  • Testing of communication mediums vs communication protocols

  • Where security defenses should be place …… and tested

Serial communications

  • RS-232, TIA-422, and TIA-485 

  • Fieldbus Protocols and Protocol Families

  • Hands-on sniffing and injection of serial Modbus RTU

Pentesting TCP/IP based ICS protocols

  • Protocol capture and analysis

  • ModbusTCP, ProfiNet, EnternetIP/CIP, DNP3, IEC 104, IEC 61850, ICCP

  • Dealing with unknown protocols

  • Hands-on entropy analysis of network payloads

  • Reverse engineering unknown protocols

  • Hands-on ICS protocol fuzzing


Day 3 Outline – Assessing and Exploiting ICS RF Communications

Pentesting RF communications between master servers and field devices

  • Examples of where RF is used in ICS and IIoT

  • Overview of the RF Pentesting methodology

Capturing RF Signals

  • Hardware used for different RF protocols

  • SDR vs rfcat

  • Comparison of different SDR hardware

  • Finding the right frequencies

  • Using the right antenna

  • Hands-on RF spectrum analysis

  • Hands-on RF signal capture

Analyzing the captured signal

  • Spread Spectrum types and strategies

  • Strategies for recovering frequency hopping

  • Modulation and Demodulation

  • Methods for identifying modulation type

  • Hands-on traffic demodulation with Universal Radio Hacker (URH)

Data Extraction

  • Understanding how data streams are assembled

  • Hands-on analysis of data streams with URH

  • Hands-on packetization with URH

RF Transmission

  • Traffic transmission and exploitation

  • Hardware needed for transmission

  • Replaying attacks

  • Signal transmission with URH

  • Hands-on signal generation with rfcat and Great Scott Gadgets' Yardstick

Day 4 Outline – Assessing and Exploiting ICS Embedded Electronics

Overview of pentesting embedded device circuits

  • Local attack through physically exposed devices

  • Expanding physical attacks to remote attacks

  • Cryptographic keys and firmware

Analysis of embedded electronics in ICS field and floor devices

  • Discussion of device disassembly

  • Component analysis on embedded circuits

  • Datasheet acquisition and analysis for target components

Dumping data at rest on embedded circuits

  • Using the Bus Pirate and other similar tools

  • Overview of I2C or two-wire serial protocol

  • Hands-on exercise dumping I2C EEPROMs

Overview of SPI serial protocol

  • Hands-on exercise dumping SPI EEPROMs

  • Overview of JTAG

  • Hands-on exercise interfacing with debug interfaces

  • Bus Snooping on embedded circuits

Overview of bus snooping

  • Hands-on exercise snooping busses

  • Analyzing data obtained from data dumping and bus snooping

  • Hands-on exercise doing string analysis of datasets

  • Hands-on exercise doing entropy analysis of datasets

  • Hands-on exercise doing systematic key searches through datasets

  • Hands-on exercise doing file carving from datasets

Analyzing field and floor device firmware

  • Obtaining field and floor device firmware

  • Hands-on exercise disassembling firmware

  • Hands-on exercise analyzing disassembled firmware

  • Exploiting firmware flaws

 

Hardware Requirements

  1. 64-bit processor with 64-bit operating system

  2. VT or other 64-bit virtualization settings enabled in your BIOS to run 64-bit VMs

  3. At least eight (8) GB of RAM, recommended sixteen (16) GB if possible

  4. At least fifty (50) GB of free hard drive space 

  5. Windows 10.x installed on your host laptop or inside a VM

 

Software Requirements

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

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

  3. If you are using Linux for your host machine, you will need ExFAT drivers installed for the USB d

 

Included Course Materials

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

  1. Programmable Logic Controller (PLC)

  2. Software to program the PLC to keep (non-expiring)

  3. Software to program an HMI for the PLC (non-expiring)

  4. RTL-SDR (Software Defined Radio)

  5. Great Scott Gadgets Yardstick sub-GHz Radio

  6. Great Scott Gadgets GreatFET

  7. Breadboard with SPI and I2C EEPROMs

  8. TivaC Launchpad (ARM m4) for Firmware exercises

  9. Latest version of the ControlThings Platform on USB

  10. Power for your laptop

  11. Internet connectivity may or may not be available depending on the facility hosting the course

  12. PDF version of the course slide deck

Previous
Previous

Attacking and Defending Linux, Docker and Kubernetes