SlideShare a Scribd company logo
1 of 39
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

What's hot

What's hot (20)

Cybersecurity in Industrial Control Systems (ICS)
Cybersecurity in Industrial Control Systems (ICS)Cybersecurity in Industrial Control Systems (ICS)
Cybersecurity in Industrial Control Systems (ICS)
 
SCADA deep inside: protocols and security mechanisms
SCADA deep inside: protocols and security mechanismsSCADA deep inside: protocols and security mechanisms
SCADA deep inside: protocols and security mechanisms
 
SCADA Security Presentation
SCADA Security PresentationSCADA Security Presentation
SCADA Security Presentation
 
[Bucharest] From SCADA to IoT Cyber Security
[Bucharest] From SCADA to IoT Cyber Security[Bucharest] From SCADA to IoT Cyber Security
[Bucharest] From SCADA to IoT Cyber Security
 
Hacker Halted 2016 - How to get into ICS security
Hacker Halted 2016 - How to get into ICS securityHacker Halted 2016 - How to get into ICS security
Hacker Halted 2016 - How to get into ICS security
 
Nist 800 82 ICS Security Auditing Framework
Nist 800 82 ICS Security Auditing FrameworkNist 800 82 ICS Security Auditing Framework
Nist 800 82 ICS Security Auditing Framework
 
EC-Council Certification Roadmap and Course Catalog
EC-Council Certification Roadmap and Course CatalogEC-Council Certification Roadmap and Course Catalog
EC-Council Certification Roadmap and Course Catalog
 
Introduction to ICS/SCADA security
Introduction to ICS/SCADA securityIntroduction to ICS/SCADA security
Introduction to ICS/SCADA security
 
Securing Industrial Control System
Securing Industrial Control SystemSecuring Industrial Control System
Securing Industrial Control System
 
SCADA Security
SCADA SecuritySCADA Security
SCADA Security
 
Industrial Security.pdf
Industrial Security.pdfIndustrial Security.pdf
Industrial Security.pdf
 
IT vs. OT: ICS Cyber Security in TSOs
IT vs. OT: ICS Cyber Security in TSOsIT vs. OT: ICS Cyber Security in TSOs
IT vs. OT: ICS Cyber Security in TSOs
 
Building a Security Operations Center (SOC).pdf
Building a Security Operations Center (SOC).pdfBuilding a Security Operations Center (SOC).pdf
Building a Security Operations Center (SOC).pdf
 
Intrusion detection system
Intrusion detection systemIntrusion detection system
Intrusion detection system
 
Intrusion Detection System
Intrusion Detection SystemIntrusion Detection System
Intrusion Detection System
 
Rothke rsa 2012 building a security operations center (soc)
Rothke rsa 2012  building a security operations center (soc)Rothke rsa 2012  building a security operations center (soc)
Rothke rsa 2012 building a security operations center (soc)
 
S4x20 - Tuning ICS Security Alerts: An Alarm Management Approach
S4x20 - Tuning ICS Security Alerts: An Alarm Management ApproachS4x20 - Tuning ICS Security Alerts: An Alarm Management Approach
S4x20 - Tuning ICS Security Alerts: An Alarm Management Approach
 
Vulnerability Assessment and Penetration Testing in online SCADA ICS Environm...
Vulnerability Assessment and Penetration Testing in online SCADA ICS Environm...Vulnerability Assessment and Penetration Testing in online SCADA ICS Environm...
Vulnerability Assessment and Penetration Testing in online SCADA ICS Environm...
 
The CIS Critical Security Controls the International Standard for Defense
The CIS Critical Security Controls the International Standard for DefenseThe CIS Critical Security Controls the International Standard for Defense
The CIS Critical Security Controls the International Standard for Defense
 
OT Security - h-c0n 2020
OT Security - h-c0n 2020OT Security - h-c0n 2020
OT Security - h-c0n 2020
 

Viewers also liked

Viewers also liked (20)

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

Similar to ICS Security 101 by Sandeep Singh

Similar to ICS Security 101 by Sandeep Singh (20)

Industrial Control Systems Security - A Perspective on Product Design (Sequi,...
Industrial Control Systems Security - A Perspective on Product Design (Sequi,...Industrial Control Systems Security - A Perspective on Product Design (Sequi,...
Industrial Control Systems Security - A Perspective on Product Design (Sequi,...
 
Nozomi Networks SCADAguardian - Data-Sheet
Nozomi Networks SCADAguardian - Data-SheetNozomi Networks SCADAguardian - Data-Sheet
Nozomi Networks SCADAguardian - Data-Sheet
 
Smart Networks for the Industrial Internet of Things
Smart Networks for the Industrial Internet of ThingsSmart Networks for the Industrial Internet of Things
Smart Networks for the Industrial Internet of Things
 
CyberSecurity Best Practices for the IIoT
CyberSecurity Best Practices for the IIoTCyberSecurity Best Practices for the IIoT
CyberSecurity Best Practices for the IIoT
 
Secure IOT Gateway
Secure IOT GatewaySecure IOT Gateway
Secure IOT Gateway
 
Scada Industrial Control Systems Penetration Testing
Scada Industrial Control Systems Penetration Testing Scada Industrial Control Systems Penetration Testing
Scada Industrial Control Systems Penetration Testing
 
Penetrationtestingascadaindustrialcontrolsystems 141229233134-conversion-gate02
Penetrationtestingascadaindustrialcontrolsystems 141229233134-conversion-gate02Penetrationtestingascadaindustrialcontrolsystems 141229233134-conversion-gate02
Penetrationtestingascadaindustrialcontrolsystems 141229233134-conversion-gate02
 
Ls catalog thiet bi tu dong master rtu e_dienhathe.vn
Ls catalog thiet bi tu dong master rtu e_dienhathe.vnLs catalog thiet bi tu dong master rtu e_dienhathe.vn
Ls catalog thiet bi tu dong master rtu e_dienhathe.vn
 
Training manual on scada
Training manual on scadaTraining manual on scada
Training manual on scada
 
FE_Technologies_PLC.ppt
FE_Technologies_PLC.pptFE_Technologies_PLC.ppt
FE_Technologies_PLC.ppt
 
CHM_Technologies_PLC.ppt
CHM_Technologies_PLC.pptCHM_Technologies_PLC.ppt
CHM_Technologies_PLC.ppt
 
FE_Technologies_PLC.ppt
FE_Technologies_PLC.pptFE_Technologies_PLC.ppt
FE_Technologies_PLC.ppt
 
Case Study At91RM9200 Data Hub Controller
Case Study At91RM9200 Data Hub ControllerCase Study At91RM9200 Data Hub Controller
Case Study At91RM9200 Data Hub Controller
 
Ti k2 e for mission critical applications
Ti k2 e for mission critical applicationsTi k2 e for mission critical applications
Ti k2 e for mission critical applications
 
RAD Industrial Automation, Labs, and Instrumentation
RAD Industrial Automation, Labs, and InstrumentationRAD Industrial Automation, Labs, and Instrumentation
RAD Industrial Automation, Labs, and Instrumentation
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Embeddedsystem
EmbeddedsystemEmbeddedsystem
Embeddedsystem
 
Industrial Pioneers Days - Machine Learning
Industrial Pioneers Days - Machine LearningIndustrial Pioneers Days - Machine Learning
Industrial Pioneers Days - Machine Learning
 
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Core of Embedded Systems
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I   Core of Embedded SystemsSYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I   Core of Embedded Systems
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Core of Embedded Systems
 
ICS Threat Scenarios
ICS Threat ScenariosICS Threat Scenarios
ICS Threat Scenarios
 

More from OWASP Delhi

More from OWASP Delhi (20)

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

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

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

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