SlideShare a Scribd company logo
ICS Security 101Sandeep Singh
Agenda
• What is ICS?
• IT vs ICS
• ICS Components
• ICS Protocols
• PLCs
• Common issues with ICS Security
• Pentesting ICS (approach and methodology)
• Securing ICS
• So you want to learn ICS Security?
What is industrial control system
Where do we
see ICS in use?
• Food manufacturing plants
• Power plants
• Building automation systems (AC/HVAC)
• Water treatment
• Chemical plants
• Oil & Gas
• Telcos
• Weapons Control System
• Dams, etc.
The confusion
IoT
Critical
Infrastructure
Industrial
Control
Systems
IT vs ICS
Confidentiality
Integrity
Availibility
Availability
Integrity
Confidentiality
ICS
IT
IT vs ICS
IT ICS
Security
patches
Applied regularly on standard systems
Only recently provided by vendors. Applied
once a year tops
Antivirus
Deployed on all Windows machines,
centrally managed
Sowly starting to show up. Some vendors used to / stil
forbid AV usage (lack of support if AV is installed)
Not managed
System
Administration
Centralized, dedicated teams, standard
operations and procedures
Lack of local skills, heterogeneous environments, lots of
different tools to use, vendor support is mandatory
IAM Nominative accounts Generic, shared accounts, no password policy
Availibility
Service interruptions are ok, especially
outside business hours
Real-time operations, downtime is unacceptable or very
costly
Protocols
Standard, TCP/IP protocols that include
authentication and encryption
Lot of vendor-specific protocol, no security built in to the
protocols
Impact No people endangered Possible impact of people, envrionment, industrial gear
A look into the
past
 1969: First PLCs
 1973: Modbus protocol invented
 1986: PLCs controlled by PCs
 1992: TCP/IP for PLCs
 2003: Web servers for PLCs
 2017: AD is coming!
ICS
Components
• Sensors and Actuators: allow interaction with
the physical world (pressure sensor, valves,
motors, …)
• Local HMI: Human-Machine Interface, permits
the supervision and control of a subprocess
• PLC: Programmable logic controller: manages
the sensor and actuators
• Supervisor screen: remote supervision of the
industrial process
• Data Historian: Records all data from the
production and Scada networks
• RTU: Remote Terminal Unit (standalone PLC)
• IED: Intelligent Electronic Device (smart sensor)
ICS Protocols
Industrial protocols
 At the beginning, specific protocols on specific physical layer (RS232, RS285, 4-20 current loop)
 Some protocols were adapted to TCP/IP, like Modbus, and other were developed to allow
interoperability.
Currently, the most used seem to be :
 HART / Wireless HART
 Profibus
 Modbus
 Profinet / S7
 DNP3
 OPC
Modbus protocol
 Serial communication protocol invented in 1979 by Schneider Electric
 Developed for industrial application
 Royalty-free
 Now one of the standards for industrial applications
Security?
 Clear-text
 No authentication
How it works:
 Master/Slave protocol
 Master must regularly poll the slaves to get
information
 Modbus addresses are 8 bits long
 There is no object description: a request returns
a value, without any context or unit.
Modbus protocol
 Modbus was originally made for serial communications
 It is now often used over TCP
MODBUS/TCP FRAME FORMAT
Modbus protocol
 The most common Modbus functions allow to read and write data from/to a PLC
 Other functions, such as file read and diagnostics functions also exist
 Undocumented Modbus function codes can also be used to perform specific actions
Commonly used MODBUS function codes
Function name
Function
code
Read coils 1
Write single coils 5
Read holding registers 3
Write single register 6
Write multiple registers 16
Read/Write multiple registers 23
All documented MODBUS function codes: https://en.wikipedia.org/wiki/Modbus
S7 protocol
 Proprietary protocol by Siemens
 TCP port 102
 Based on COTP (Connection-Oriented Transport Protocol, RFC905)
 No security
 New version of the protocol available starting with version 4 and up of the PLC firmware :
provides mutual authentication and communication Encryption
 Security features analyzed by Quarkslab, see the talk from SSTIC
https://www.sstic.org/2015/presentation/analyse_de_scurite_de_technologies_propritai
res_scada/
DNP3 protocol
 Standard protocol, developed by GE in the 90’s
 Slave/Slave : Information can be share at the initiative of any device
 Layer 2 protocol (just top of physical layer), ported to TCP/IP
 Integrity is verified using CRC
 Data reporting communication : only send the data that has changed (simplified), or at
the initiative of the PLC/RTU
 Used for smartgrids in the US
 Secure DNP3 introduced in 2007
- Works on serial and TCP versions
- Challenge/response to exchange a session key (using PSK)
- Can be done at startup, every XX minutes, or only for sensitive actions (write requests for example)
- Possible to use secure DNP3 over TLS
PLC
 Real-time digital computer used for automation
 Replaces electrical relays
 Lots of analogue or digital inputs & outputs
 Rugged devices (immune to vibration, electrical noise, temperature, dust, …)
PLC Programming
 “Ladder Logic” was the first programming language for PLC.
Other languages..
 SoMachine is the software provided by Schneider Electric to program
the entry level PLCs.
 PLCs used in big plants are usually programmed using Unity Pro.
 Unity Pro has no free/demo version
PLC programming
 Create a project
 Define the hardware setup
 Create variables
 Define the program
 Test
 Debug
 Push to PLC
 START
Common
issues with ICS
security
 Organization & awareness
 Network segmentation
 Vulnerability management
 Security in protocols
 Third Party management
 Security monitoring & detection
Approaching ICS
Pentests
ICS security assessments
 Types of Security assessments
- Security Posture Audits (interview and artifact reviews)
- Physical Security Assessments (policy and walkthroughs)
- Network Capture Assessments (passive network)
- Vulnerability Scanning (actve network)
- Penetration Testing (active network and hands-on)
 Each assessment type fills looks at the system from different perspectives
and angles
 Most common time to do penetration tests on control systems are during
equipment acquisitions
What to pentest?
 All connectivity from corporate networks to control networks
 All remote access connectivity into the control network
 Any link carrying control traffic across public or semi-public links
 Any new system before it is implemented
 Any system changes or updates that are being tested in test or staging
environments
 Web applications running on top of devices such as RTUs, PLC, HMIs
 Fuzzing ICS protocol implementations
Port scanning on ICS networks is dangerous
 Nmap is the de-facto tool for port scanning but can be really
dangerous on ICS
 Two stories from NIST SP800-82
 A ping sweep broke for over $50,000 in product at a semi-conductor factory
 The blocking of gas distribution for several hours after a pentester went
slightly off-perimeter during an assessment for a gas company
 Nmap useful setup for scanning
 Reduce scanning speed! Use « --scan-delay=1 » to scan one port at a time
 Perform a TCP scan instead of a SYN scan / do not perform UDP scan
 Do not use fingerprinting functions, and manually select scripts (do not use “–
sC”)
PLCSCAN
 https://code.google.com/archive/p/plcscan/
by SCADAStrangeLove (http://scadastrangelove.org/)
 Scans for ports 102 (Siemens) and 502 (Modbus) and tries to pull
information about the PLC (modules, firmware version,…)
 Not exhaustive since not all PLCs use Modbus or are Siemens
Attacking standard services
 Most PLCs have standard interfaces, such as HTTP and FTP
 Lets’ say security was not the first thing in mind when introducing
these features …
 On Schneider M340
 FTP credentials are hardcoded (sysdiag /factorycast@schneider)
 Allows you to retrieve the password file for the web UI
Metasploit for everything
 /auxiliary/scanner/scada/modbusclient (can perform read/write
operations on coils and registers)
 Unauthenticated actions on PLC
 /auxiliary/scanner/scada/modicon_command (STOP/RUN)
 /auxiliary/scanner/scada/modicon_stux_transfer (Logic download/upload)
Securing ICS
Securing ICS
 ICS security standards
 ANSSI
 ISA99
 NIST SP800-82 Revision 2
 ENISA Guidelines
 NERC CIP
 System Hardening
 Network Segmentation
 Corporate network to ICS network pivoting is a problem
 Segregate while allowing some communications
 Two network cards
 Security monitoring
So you want to learn ICS
Security? – ICS Security
Resources
Connect!
• SCADAsec email list at Infracritical
 ICS Security Conferences
 DigitalBond’s S4
 SANS ICS Summit
 4SICS
 EnergySec
 Oil and Gas Security Summit
Information Sharing
 National Council of ISACs
 Downstream Natural Gas (www.dngisac.com)
 Electricity (www.esisac.com)
 Oil & Natural Gas (www.ongisac.com)
 Water (www.waterisac.com)
Books
 Robust Control System Networks, Ralph Langner
 Industrial Network Security, 2nd Edition, Knapp & Langill
 Cybersecurity for Industrial Control Systems, Macaulay & Singer
 Countdown to Zero Day, Kim Zetter
 Handbook of SCADA/Control Systems, 2nd Ed., Radvanovsky &
Brodsky
 Hacking Exposed Industrial Control Systems, Bodungen, et al
Books
 Robust Control System Networks, Ralph Langner
 Industrial Network Security, 2nd Edition, Knapp & Langill
 Cybersecurity for Industrial Control Systems, Macaulay & Singer
 Countdown to Zero Day, Kim Zetter
 Handbook of SCADA/Control Systems, 2nd Ed., Radvanovsky &
Brodsky
 Hacking Exposed Industrial Control Systems, Bodungen, et al
Training
ICS-CERT
 Free online training and resources
 Free 5-day Red vs Blue ICS exercise
ICS Vendor Training
SANS ICS410 and ICS515
Red Tiger Security, Lofty Perch, SCADAhacker
Intelligence Sources
ICS-CERT portal
ISAC Portals
FBI Infragaurd
Twitter #ICS #SCADA
Google
Shodan.io
This slide deck is generously borrowed from the following
talks:
Pentesting ICS 101 - https://www.defcon.org/html/defcon-
24/dc-24-workshops.html#Soullie
How to get into ICS security – RSA Conference 2016
What the hell is ICS security – Bsides Tampa 2016
Thank you
Sandeep Singh
@sandy1sm
Email: sandeep.singh@owasp.org
san@null.co.in
Thank you 

More Related Content

PPT
Industrial control systems cybersecurity.ppt
PDF
Nist 800 82
PDF
SCADA Security Presentation
PDF
ICS security
PDF
Nozomi Networks Q1_2018 Company Introduction
PPTX
IEC62443.pptx
PDF
Active Directory in ICS: Lessons Learned From The Field
PDF
Cyber Attack Methodologies
Industrial control systems cybersecurity.ppt
Nist 800 82
SCADA Security Presentation
ICS security
Nozomi Networks Q1_2018 Company Introduction
IEC62443.pptx
Active Directory in ICS: Lessons Learned From The Field
Cyber Attack Methodologies

What's hot (20)

PDF
Network Access Control (NAC)
PDF
Addressing the cyber kill chain
PDF
Introduction to Industrial Control Systems : Pentesting PLCs 101 (BlackHat Eu...
PPSX
Next-Gen security operation center
PPTX
Beginner's Guide to SIEM
PPTX
Security Information and Event Management (SIEM)
PPTX
Technology Overview - Symantec Data Loss Prevention (DLP)
PDF
DEF CON 23 - NSM 101 for ICS
PPTX
SOC Architecture Workshop - Part 1
PDF
Cyber Threat Intelligence
PPTX
SIEM presentation final
PPTX
Fortinet Corporate Overview Deck.pptx
PPTX
Security Operation Center - Design & Build
PPTX
Crowdstrike .pptx
PPTX
ClearPass design scenarios that solve the toughest security policy requirements
PDF
Cybersecurity in Industrial Control Systems (ICS)
PPTX
Introduction to ICS/SCADA security
PDF
IT vs. OT: ICS Cyber Security in TSOs
PPTX
Security operation center (SOC)
PPTX
Fortinet sandboxing
Network Access Control (NAC)
Addressing the cyber kill chain
Introduction to Industrial Control Systems : Pentesting PLCs 101 (BlackHat Eu...
Next-Gen security operation center
Beginner's Guide to SIEM
Security Information and Event Management (SIEM)
Technology Overview - Symantec Data Loss Prevention (DLP)
DEF CON 23 - NSM 101 for ICS
SOC Architecture Workshop - Part 1
Cyber Threat Intelligence
SIEM presentation final
Fortinet Corporate Overview Deck.pptx
Security Operation Center - Design & Build
Crowdstrike .pptx
ClearPass design scenarios that solve the toughest security policy requirements
Cybersecurity in Industrial Control Systems (ICS)
Introduction to ICS/SCADA security
IT vs. OT: ICS Cyber Security in TSOs
Security operation center (SOC)
Fortinet sandboxing
Ad

Viewers also liked (20)

PPTX
Keynote Session : Using Behavioral Psychology and Science of Habit to Change ...
PPTX
Cyber threat intelligence: maturity and metrics
PPTX
TechnIQ Prelims - Tech Quiz for IETE, DJSCoE
PDF
The reliability of IoT solutions in the healthcare sector
PPT
Final cyber physical system (1)
PPTX
Data ethics and machine learning: discrimination, algorithmic bias, and how t...
ODP
Hostile Subdomain Takeover by Ankit Prateek
PPTX
ELECTRONIC VOTING MACHINE(EVM) HACKABLE OR NOT
PDF
Thwarting The Surveillance in Online Communication by Adhokshaj Mishra
PPTX
7 Myths of AI
PPTX
HoloLens x Graphics 入門
PDF
Senzations’15: Secure Internet of Things
PDF
frog IoT Big Design IoT World Congress 2015
PDF
(Kpi summer school 2015) theano tutorial part1
PDF
IoT and BD Introduction
PDF
(Kpi summer school 2015) theano tutorial part2
PPTX
Individual-In-The-Loop (for Ethically Aligned Artificial Intelligence)
PDF
Pivotal Digital Transformation Forum: Accelerate Time to Market with Business...
PDF
Pivotal Digital Transformation Forum: Becoming a Data Driven Enterprise
PDF
저성장 시대 데이터 경제만이 살길이다
Keynote Session : Using Behavioral Psychology and Science of Habit to Change ...
Cyber threat intelligence: maturity and metrics
TechnIQ Prelims - Tech Quiz for IETE, DJSCoE
The reliability of IoT solutions in the healthcare sector
Final cyber physical system (1)
Data ethics and machine learning: discrimination, algorithmic bias, and how t...
Hostile Subdomain Takeover by Ankit Prateek
ELECTRONIC VOTING MACHINE(EVM) HACKABLE OR NOT
Thwarting The Surveillance in Online Communication by Adhokshaj Mishra
7 Myths of AI
HoloLens x Graphics 入門
Senzations’15: Secure Internet of Things
frog IoT Big Design IoT World Congress 2015
(Kpi summer school 2015) theano tutorial part1
IoT and BD Introduction
(Kpi summer school 2015) theano tutorial part2
Individual-In-The-Loop (for Ethically Aligned Artificial Intelligence)
Pivotal Digital Transformation Forum: Accelerate Time to Market with Business...
Pivotal Digital Transformation Forum: Becoming a Data Driven Enterprise
저성장 시대 데이터 경제만이 살길이다
Ad

Similar to ICS Security 101 by Sandeep Singh (20)

PDF
BruCON 2015 - Pentesting ICS 101
PDF
Scada Strangelove - 29c3
PPTX
Ics presentation
PPT
Power Grid Communications & Control Systems
PPT
Control system including PLC cybersecurity
PDF
ICSA 2019 Architectural Security Weaknesses in Industrial Control Systems
PDF
Techniques of attacking ICS systems
PPTX
BSidesAugusta ICS SCADA Defense
PDF
Taking a closer look at level 0 and level 1 security
PPTX
chile-2015 (2)
PDF
How to Get into ICS Security byChris Sistrunk
PPTX
Hacker Halted 2016 - How to get into ICS security
PDF
Cybersecurity For Industrial Control Systems Scada Dcs Plc Hmi And Sis 1st Ed...
PDF
Cybersecurity for Industrial Control Systems SCADA DCS PLC HMI and SIS 1st Ed...
PDF
Industrial Control Systems Security - A Perspective on Product Design (Sequi,...
PDF
Vulnerabilities on the Wire: Mitigations for Insecure ICS Device Communication
PDF
Defcon 22-aaron-bayles-alxrogan-protecting-scada-dc101
PDF
SCADA deep inside:protocols and software architecture
PPTX
Scada, a PLC's story
PDF
The journey to ICS - Extended
BruCON 2015 - Pentesting ICS 101
Scada Strangelove - 29c3
Ics presentation
Power Grid Communications & Control Systems
Control system including PLC cybersecurity
ICSA 2019 Architectural Security Weaknesses in Industrial Control Systems
Techniques of attacking ICS systems
BSidesAugusta ICS SCADA Defense
Taking a closer look at level 0 and level 1 security
chile-2015 (2)
How to Get into ICS Security byChris Sistrunk
Hacker Halted 2016 - How to get into ICS security
Cybersecurity For Industrial Control Systems Scada Dcs Plc Hmi And Sis 1st Ed...
Cybersecurity for Industrial Control Systems SCADA DCS PLC HMI and SIS 1st Ed...
Industrial Control Systems Security - A Perspective on Product Design (Sequi,...
Vulnerabilities on the Wire: Mitigations for Insecure ICS Device Communication
Defcon 22-aaron-bayles-alxrogan-protecting-scada-dc101
SCADA deep inside:protocols and software architecture
Scada, a PLC's story
The journey to ICS - Extended

More from OWASP Delhi (20)

PDF
Getting Started With Hacking Android & iOS Apps? Tools, Techniques and resources
PDF
Securing dns records from subdomain takeover
PDF
Effective Cyber Security Report Writing
PPTX
Data sniffing over Air Gap
PPTX
UDP Hunter
PDF
Demystifying Container Escapes
PPTX
Automating WAF using Terraform
PPTX
Actionable Threat Intelligence
PDF
Threat hunting 101 by Sandeep Singh
PPTX
Owasp top 10 vulnerabilities
PPTX
Recon with Nmap
PPTX
Securing AWS environments by Ankit Giri
PDF
DMARC Overview
PDF
Cloud assessments by :- Aakash Goel
PDF
Pentesting Rest API's by :- Gaurang Bhatnagar
ODP
Wireless security beyond password cracking by Mohit Ranjan
PDF
IETF's Role and Mandate in Internet Governance by Mohit Batra
PDF
Malicious Hypervisor - Virtualization in Shellcodes by Adhokshaj Mishra
PDF
DFIR using Docker Containers by Deep Shankar Yadav
PPTX
RAT - Kill or Get Killed! by Karan Bansal
Getting Started With Hacking Android & iOS Apps? Tools, Techniques and resources
Securing dns records from subdomain takeover
Effective Cyber Security Report Writing
Data sniffing over Air Gap
UDP Hunter
Demystifying Container Escapes
Automating WAF using Terraform
Actionable Threat Intelligence
Threat hunting 101 by Sandeep Singh
Owasp top 10 vulnerabilities
Recon with Nmap
Securing AWS environments by Ankit Giri
DMARC Overview
Cloud assessments by :- Aakash Goel
Pentesting Rest API's by :- Gaurang Bhatnagar
Wireless security beyond password cracking by Mohit Ranjan
IETF's Role and Mandate in Internet Governance by Mohit Batra
Malicious Hypervisor - Virtualization in Shellcodes by Adhokshaj Mishra
DFIR using Docker Containers by Deep Shankar Yadav
RAT - Kill or Get Killed! by Karan Bansal

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Big Data Technologies - Introduction.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
KodekX | Application Modernization Development
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
Spectral efficient network and resource selection model in 5G networks
Electronic commerce courselecture one. Pdf
Encapsulation_ Review paper, used for researhc scholars
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Big Data Technologies - Introduction.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
NewMind AI Monthly Chronicles - July 2025
Advanced methodologies resolving dimensionality complications for autism neur...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Agricultural_Statistics_at_a_Glance_2022_0.pdf
KodekX | Application Modernization Development
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
20250228 LYD VKU AI Blended-Learning.pptx

ICS Security 101 by Sandeep Singh

  • 2. Agenda • What is ICS? • IT vs ICS • ICS Components • ICS Protocols • PLCs • Common issues with ICS Security • Pentesting ICS (approach and methodology) • Securing ICS • So you want to learn ICS Security?
  • 3. What is industrial control system
  • 4. Where do we see ICS in use? • Food manufacturing plants • Power plants • Building automation systems (AC/HVAC) • Water treatment • Chemical plants • Oil & Gas • Telcos • Weapons Control System • Dams, etc.
  • 7. IT vs ICS IT ICS Security patches Applied regularly on standard systems Only recently provided by vendors. Applied once a year tops Antivirus Deployed on all Windows machines, centrally managed Sowly starting to show up. Some vendors used to / stil forbid AV usage (lack of support if AV is installed) Not managed System Administration Centralized, dedicated teams, standard operations and procedures Lack of local skills, heterogeneous environments, lots of different tools to use, vendor support is mandatory IAM Nominative accounts Generic, shared accounts, no password policy Availibility Service interruptions are ok, especially outside business hours Real-time operations, downtime is unacceptable or very costly Protocols Standard, TCP/IP protocols that include authentication and encryption Lot of vendor-specific protocol, no security built in to the protocols Impact No people endangered Possible impact of people, envrionment, industrial gear
  • 8. A look into the past  1969: First PLCs  1973: Modbus protocol invented  1986: PLCs controlled by PCs  1992: TCP/IP for PLCs  2003: Web servers for PLCs  2017: AD is coming!
  • 9. ICS Components • Sensors and Actuators: allow interaction with the physical world (pressure sensor, valves, motors, …) • Local HMI: Human-Machine Interface, permits the supervision and control of a subprocess • PLC: Programmable logic controller: manages the sensor and actuators • Supervisor screen: remote supervision of the industrial process • Data Historian: Records all data from the production and Scada networks • RTU: Remote Terminal Unit (standalone PLC) • IED: Intelligent Electronic Device (smart sensor)
  • 11. Industrial protocols  At the beginning, specific protocols on specific physical layer (RS232, RS285, 4-20 current loop)  Some protocols were adapted to TCP/IP, like Modbus, and other were developed to allow interoperability. Currently, the most used seem to be :  HART / Wireless HART  Profibus  Modbus  Profinet / S7  DNP3  OPC
  • 12. Modbus protocol  Serial communication protocol invented in 1979 by Schneider Electric  Developed for industrial application  Royalty-free  Now one of the standards for industrial applications Security?  Clear-text  No authentication How it works:  Master/Slave protocol  Master must regularly poll the slaves to get information  Modbus addresses are 8 bits long  There is no object description: a request returns a value, without any context or unit.
  • 13. Modbus protocol  Modbus was originally made for serial communications  It is now often used over TCP MODBUS/TCP FRAME FORMAT
  • 14. Modbus protocol  The most common Modbus functions allow to read and write data from/to a PLC  Other functions, such as file read and diagnostics functions also exist  Undocumented Modbus function codes can also be used to perform specific actions Commonly used MODBUS function codes Function name Function code Read coils 1 Write single coils 5 Read holding registers 3 Write single register 6 Write multiple registers 16 Read/Write multiple registers 23 All documented MODBUS function codes: https://en.wikipedia.org/wiki/Modbus
  • 15. S7 protocol  Proprietary protocol by Siemens  TCP port 102  Based on COTP (Connection-Oriented Transport Protocol, RFC905)  No security  New version of the protocol available starting with version 4 and up of the PLC firmware : provides mutual authentication and communication Encryption  Security features analyzed by Quarkslab, see the talk from SSTIC https://www.sstic.org/2015/presentation/analyse_de_scurite_de_technologies_propritai res_scada/
  • 16. DNP3 protocol  Standard protocol, developed by GE in the 90’s  Slave/Slave : Information can be share at the initiative of any device  Layer 2 protocol (just top of physical layer), ported to TCP/IP  Integrity is verified using CRC  Data reporting communication : only send the data that has changed (simplified), or at the initiative of the PLC/RTU  Used for smartgrids in the US  Secure DNP3 introduced in 2007 - Works on serial and TCP versions - Challenge/response to exchange a session key (using PSK) - Can be done at startup, every XX minutes, or only for sensitive actions (write requests for example) - Possible to use secure DNP3 over TLS
  • 17. PLC  Real-time digital computer used for automation  Replaces electrical relays  Lots of analogue or digital inputs & outputs  Rugged devices (immune to vibration, electrical noise, temperature, dust, …)
  • 18. PLC Programming  “Ladder Logic” was the first programming language for PLC.
  • 19. Other languages..  SoMachine is the software provided by Schneider Electric to program the entry level PLCs.  PLCs used in big plants are usually programmed using Unity Pro.  Unity Pro has no free/demo version
  • 20. PLC programming  Create a project  Define the hardware setup  Create variables  Define the program  Test  Debug  Push to PLC  START
  • 21. Common issues with ICS security  Organization & awareness  Network segmentation  Vulnerability management  Security in protocols  Third Party management  Security monitoring & detection
  • 23. ICS security assessments  Types of Security assessments - Security Posture Audits (interview and artifact reviews) - Physical Security Assessments (policy and walkthroughs) - Network Capture Assessments (passive network) - Vulnerability Scanning (actve network) - Penetration Testing (active network and hands-on)  Each assessment type fills looks at the system from different perspectives and angles  Most common time to do penetration tests on control systems are during equipment acquisitions
  • 24. What to pentest?  All connectivity from corporate networks to control networks  All remote access connectivity into the control network  Any link carrying control traffic across public or semi-public links  Any new system before it is implemented  Any system changes or updates that are being tested in test or staging environments  Web applications running on top of devices such as RTUs, PLC, HMIs  Fuzzing ICS protocol implementations
  • 25. Port scanning on ICS networks is dangerous  Nmap is the de-facto tool for port scanning but can be really dangerous on ICS  Two stories from NIST SP800-82  A ping sweep broke for over $50,000 in product at a semi-conductor factory  The blocking of gas distribution for several hours after a pentester went slightly off-perimeter during an assessment for a gas company  Nmap useful setup for scanning  Reduce scanning speed! Use « --scan-delay=1 » to scan one port at a time  Perform a TCP scan instead of a SYN scan / do not perform UDP scan  Do not use fingerprinting functions, and manually select scripts (do not use “– sC”)
  • 26. PLCSCAN  https://code.google.com/archive/p/plcscan/ by SCADAStrangeLove (http://scadastrangelove.org/)  Scans for ports 102 (Siemens) and 502 (Modbus) and tries to pull information about the PLC (modules, firmware version,…)  Not exhaustive since not all PLCs use Modbus or are Siemens
  • 27. Attacking standard services  Most PLCs have standard interfaces, such as HTTP and FTP  Lets’ say security was not the first thing in mind when introducing these features …  On Schneider M340  FTP credentials are hardcoded (sysdiag /factorycast@schneider)  Allows you to retrieve the password file for the web UI
  • 28. Metasploit for everything  /auxiliary/scanner/scada/modbusclient (can perform read/write operations on coils and registers)  Unauthenticated actions on PLC  /auxiliary/scanner/scada/modicon_command (STOP/RUN)  /auxiliary/scanner/scada/modicon_stux_transfer (Logic download/upload)
  • 30. Securing ICS  ICS security standards  ANSSI  ISA99  NIST SP800-82 Revision 2  ENISA Guidelines  NERC CIP  System Hardening  Network Segmentation  Corporate network to ICS network pivoting is a problem  Segregate while allowing some communications  Two network cards  Security monitoring
  • 31. So you want to learn ICS Security? – ICS Security Resources
  • 32. Connect! • SCADAsec email list at Infracritical  ICS Security Conferences  DigitalBond’s S4  SANS ICS Summit  4SICS  EnergySec  Oil and Gas Security Summit
  • 33. Information Sharing  National Council of ISACs  Downstream Natural Gas (www.dngisac.com)  Electricity (www.esisac.com)  Oil & Natural Gas (www.ongisac.com)  Water (www.waterisac.com)
  • 34. Books  Robust Control System Networks, Ralph Langner  Industrial Network Security, 2nd Edition, Knapp & Langill  Cybersecurity for Industrial Control Systems, Macaulay & Singer  Countdown to Zero Day, Kim Zetter  Handbook of SCADA/Control Systems, 2nd Ed., Radvanovsky & Brodsky  Hacking Exposed Industrial Control Systems, Bodungen, et al
  • 35. Books  Robust Control System Networks, Ralph Langner  Industrial Network Security, 2nd Edition, Knapp & Langill  Cybersecurity for Industrial Control Systems, Macaulay & Singer  Countdown to Zero Day, Kim Zetter  Handbook of SCADA/Control Systems, 2nd Ed., Radvanovsky & Brodsky  Hacking Exposed Industrial Control Systems, Bodungen, et al
  • 36. Training ICS-CERT  Free online training and resources  Free 5-day Red vs Blue ICS exercise ICS Vendor Training SANS ICS410 and ICS515 Red Tiger Security, Lofty Perch, SCADAhacker
  • 37. Intelligence Sources ICS-CERT portal ISAC Portals FBI Infragaurd Twitter #ICS #SCADA Google Shodan.io
  • 38. This slide deck is generously borrowed from the following talks: Pentesting ICS 101 - https://www.defcon.org/html/defcon- 24/dc-24-workshops.html#Soullie How to get into ICS security – RSA Conference 2016 What the hell is ICS security – Bsides Tampa 2016
  • 39. Thank you Sandeep Singh @sandy1sm Email: sandeep.singh@owasp.org san@null.co.in Thank you 

Editor's Notes

  • #4: Lowest Level 1: Production Network where sensors and actuators exist Corporate network handles data ICS interfaces data with physical world
  • #15: Two big kinds of data – Coil: 0 or 1 Registers: stores a word which is 8 bit long