SlideShare a Scribd company logo
1 of 94
Download to read offline
Marina Krotofil, Jason Larsen
DefCon 23, Las Vegas, USA
07.08.2015
Rocking the Pocket Book: Hacking Chemical
Plants for Competition and Extortion
Who we are
Hacker(Ex)Academic
Got hooked on cyber-
physical hacking
Dragged into academic world
against own will
Motivation
Industrial Control Systems
Industrial Control Systems aka SCADA
Physical
application
Curtesy: Compass Security Germany GmbH
Industry means big business
Big business == $$$$$$$
Industrial Control Systems
Some horrible
physical
consequences
010011011011101
Missing piece
of knowledge
How do we do it??
Source: simentari.com
Typical understanding of SCADA hacking
What can be done to the process
Compliance violation
 Safety (occupational,
environment)
 Pollution (environment)
 Contractual agreements
Production damage
 Product quality and
product rate
 Operating costs
 Maintenance efforts
Equipment damage
 Equipment overstress
 Violation of safety limits
Attack considerations
 Equipment damage
o Comes first into anybody’s mind (+)
o Irreversible ( )
o Unclear collateral damage (-)
o May transform into compliance
violation, e.g. if it kills human (-)
Compliance violation
Production damage
Equipment damage
 Compliance violation
o Compliance regulations are public knowledge (+)
o Unclear collateral damage (-)
o Must be reported to the authorities ( )
o Will be investigated by the responsible agencies (-)
±
±
Here’s a plant. What is the plan?
Attack goal: persistent economic damage
Process control
Running upstairs to turn on your
furnace every time it gets cold
gets tiring after a while so you
automate it with a thermostat
(Nest because it’s so cute!)
Process control automation
Set point
Control loop
Actuators
Control
system
Physical process
Sensors
Measure process
state
Computes control
commands for
actuators
Adjust themselves
to influence
process behavior
Control system
Jacques Smuts „Process Control for Practitioners“
Termostat
controller
+
Error in desired
temperature
e(t) = SP - PV
Heat loss
(e.g. through windows)
Heat into houseSet point (SP) Furnace
fuel valve
House
heating
system
Temperature
sensor
-Desired temp
Measured temp
(Process variable, PV)
Controller output, CO
Signal to actuator
(valve)
Adjusted fuel
flow to furnace
Control equipment
 In large –scale operations control logic gets more complex
than a thermostat
 One would need something bigger than a thermostat to
handle it
 Most of the time this is a programmable logic controller (PLC)
1. Copy data from inputs to temporary storage
2. Run the logic
3. Copy from temporary storage to outputs
Inputs
Outputs
PLC internals
Sensors Actuators
If Input 1 and (Input 4 or Input 11)
then Output 6
Control logic
If tank pressure in PLC 1 > 1800
reduce inflow in PLC 3
 It is programmed graphically most of the time
(We hear you screaming: Noooo!!!!
Just give me a real language!)
 PID: proportional, integral, derivative – most widely used control
algorithm on the planet
 The sum of 3 components makes the final control signal
 PI controllers are most often used
Jacques Smuts „Process Control for Practitioners“
PID control
Wires are run from sensors and
actuators into wiring cabinets
Communication media
o 4-20 mA
o 0-10 v
o Air pressure
Usually process values are
scaled into meaningful
data in the PLC
Field communication
PLC cannot do it alone
 PLC does not have the complete picture and time trends
 Human operators watch the process 7/24
 Most important task: resolving of alarms
IT hacking vs. OT hacking
Example: attack on process data flow
Data integrity: packet injection;
replay; data manipulation; …
DoS: DoS; DDoS; flooding;
starvation;….
I am not
controlling the
process!!
Operator
Net. Admin
PLC Frequency
converter
Centrifuge
Engineering
station
Linkage to cyber assets
HMI
DB
Data flow
Controllability
Observability
OT security
OT hacking
 An attacker with an objective beyond simple mayhem will
want to reliably manipulate the process
 This is achieved by obtaining and remaining in control of the
process
 To remain in control you need to apply control theory fu.
(not sql-injections, no XSS or ROP)
Process operator and hacker rival for
control over the process
Process-related security properties
HOLY TRINITY
IT domain Process control
Observability
Controllability
Operability
Process-related security properties
HOLY TRINITY
Observability
Controllability
Operability
Information security Process control security
CIA CO2
Haters gonna hate…
Approaches to attacker control
Reliably control the process throughout the attack
Control the process until failure is guaranteed and then
let it run out of control
Make the process unusable by messing with the
controls
1
2
3
Consider a car and a driver
 Attacker has control of the brakes
 Attacker applies the left front brake
 Diver steers right eventually coming
back into a straight line
 Attacker applies the left brake
 Driver responds by steering to the
right until the car is straight again
Consider a car and a driver
 The attacker responds by swapping brakes whenever the
driver starts to compensate
 Eventually the attacker will win since a computer is faster
than a human
Multi-adaptive
 In the example above, the human is the
“hidden actor” in the process that can’t
be modeled or predicted
 Any subset of a process can be modeled
as a “hidden actor” and potentially
destabilized
 We call the algorithms that counter the
feedback loops in the process “multi-
adaptive” algorithms
 Multi-Adaptive algorithms work just like process control
automatic tuning programs except they try to maximize
the error instead of minimizing it
 The algorithm learns the behavior of the hidden actor
and then compensates for it
Controlled uncontrollability
 A single algorithm can be used as a
payload to disrupt many types of processes
o Crash a car or overpressure a loop
 Everything the control loop does makes
things worse
Get the party started!
Plants for sale
From LinkedIn
More plants offers:
http://www.usedplants.com/
Car vs. plant hacking
It is not about the size
It is about MONEY
Plants are ouch! how expensive
Vinyl Acetate Monomer plant (model)
Stages of cyber-physical attacks
Attack payload
Attack
objective
Cyber-physical
payload
Stages of SCADA attack
Control
Access
DiscoveryCleanup
Damage
Control
Access
DiscoveryCleanup
Damage
Stages of SCADA attack
Control
Access
DiscoveryCleanup
Damage
Stages of SCADA attack
Access
Traditional IT hacking
• 1 0day
• 1 Clueless user
• Repeat until done
• AntiVirus and patch management
• Database links
• Backup systems
• No security
• Move freely
Exploit kit
Modern IT hacking
 Select a vulnerability from the list of
ICS-CERT advisories
 Scan Internet to locate vulnerable
devices
 Exploit
• E. Leverett, R. Wightman. Vulnerability Inheritance in Programmable Logic Controllers (GreHack‘13)
• D. Beresford. Exploiting Siemens Simatic S7 PLCs . Black Hat USA (2011)
 Converts analog signal into digital
 Sensors pre-process the measurements
 IP-enabled (part of the “Internet-of-Things”)
Computational
element
Sensor
Smart instrumentation
Old generation
temperature sensor
Invading field devices
 Jason Larsen at Black Hat’15 “Miniaturization”
o Inserting rootkit into firmware
Water flow
Shock wave
Valve PhysicalReflected shock wave
Valve closes Shockwave Reflected wave
Pipe
movement
Attack scenario: pipe damage with
water hammer
Discovery
Stripper is...
Know the equipment
Stripping column
Process discovery
What and how the
process is producing
How it is build
and wired
How it is
controlled
Espionage, reconnaissance
Target plant and third parties
Operating and
safety constraints
Espionage
 Industrial espionage has started LONG time ago (malware
samples dated as early as 2003)
Process discovery
RefinementReaction
Max economic damage?
Final
product
Requires input of subject matter experts
Understanding points and logic
Piping and instrumentation diagram
Ladder logicProgrammable Logic Controller
Pump in the plant
Understanding points and logic
Piping and instrumentation diagram
Ladder logicProgrammable Logic Controller
Pump in the plant
HAVEX: Using OPC, the malware component
gathers any details about connected devices
and sends them back to the C&C.
CC
1
PC
TC
LC
2
3
LC
4
PC
5
6
TC
7
LC
8
TC
9
TC
11
LC
12
TC
14
TC
16
CC
CC 17
18
TC
19
CC
LC25
20
TC
21
TC LC
LC
24
22
23
26
15
13
10
Understanding control structure
Control
loop
Control loop configuration
Watch the flows!
fixed
HAc flows into two sections. Not good :(
Obtaining control != being in control
 Obtained controls might not be
useful for attack goal
 Attacker might not necessary be
able to control obtained controls
WTF ???
Control Loop
XMV{1}
XMV{2}
XMV{3}
Control
Every action has a reaction
Physics of process control
 Once hooked up together, physical
components become related to each
other by the physics of the process
 If we adjust a valve what happens to
everything else?
o Adjusting temperature also increases
pressure and flow
o All the downstream effects need to be
taken into account
 How much does the process can be changed before
releasing alarms or it shutting down?
Process interdependencies
Process interdependencies
Understanding process response
Controller Process
Transmitter
Final control
element
Set point
Disturbance
• Operating practice
• Control strategy
• Sizing
• Dead band
• Flow properties
• Type
• Duration
• Sampling frequency
• Noise profile
• Filtering
• Control algorithm
• Controller tuning
• Equipment design
• Process design
• Control loops coupling
Understanding process response
Controller Process
Transmitter
Final control
element
Set point
Disturbance
• Operating practice
• Control strategy
• Sizing
• Dead band
• Flow properties
• Type
• Duration
• Sampling frequency
• Noise profile
• Filtering
• Control algorithm
• Controller tuning
• Equipment design
• Process design
• Control loops coupling
Have extensively
studied
Process control challenges
 Process dynamic is highly non-linear (???)
 Behavior of the process is known
to the extent of its modelling
o So to controllers. They cannot
control the process beyond their
control model
UNCERTAINTY!
This triggers alarms Non-liner response
Control loop ringing
Caused by a negative real
controller poles
Makes process unstable and
uncontrollable
Amount of chemical entering
the reactor
Ringing impact
ratio 1: 150
Types of attacks
Step attack
Periodic attack
Magnitude of manipulation
Recovery time
We should automate this process
(work in progress)
Outcome of the control stage
I am 5’3’’ tall
Sensitivity Magnitude of manipulation Recovery time
High XMV {1;5;7} XMV {4;7}
Medium XMV {2;4;6} XMV {5}
Low XMV{3} XMV {1;2;3;6}
Reliably useful controls
Outcome of the control stage
Alarm propagation
Alarm Steady state attacks Periodic attacks
Gas loop 02 XMV {1} XMV {1}
Reactor feed T XMV {6} XMV {6}
Rector T XMV{7} XMV{7}
FEHE effluent XMV{7} XMV{7}
Gas loop P XMV{2;3;6} XMV{2;3;6}
HAc in decanter XMV{2;3;7} XMV{3}
To persist we shall not bring about alarms
The attacker needs to figure out the marginal attack
parameters which (do not) trigger alarms
Damage
How to break things?
Attacker needs one or more attack scenarios to deploy
in final payload
 The least familiar stage to IT hackers
o In most cases requires input of subject matter
experts
 Accident data is a good starting point
o Governmental agencies
o Plants’ own data bases
How to break things?
Hacker unfriendly process
 Target plant may not have been designed in a
hacker friendly way
o There may no sensors measuring exact values
needed for the attack execution
o The information about the process may be spread
across several subsystems making hacker invading
greater number of devices
o Control loops may be designed
to control different parameters
that the attacker needs to
control for her goal
Measuring the process
• Reactor exit flowrate
• Reactor exit temperature
• No analyzer
FT
TT
Chemical
composition
FT
Measuring
here is too late
Analyzer
Analyzer
Analyzer
Analyzer
“It will eventually
drain with the
lowest holes loosing
pressure last”
“It will be fully
drained in 20.4
seconds and the
pressure curve
looks like this”
Technician Engineer
Technician vs. engineer
Technician answer
Reactor with cooling
tubes
Usage of proxy sensor
 Only tells us whether reaction rate increases or decreases
 Is not precise enough to compare effectiveness of different attacks
Quest for engineering answer
0,00073; 0,00016; 0,0007…
 Code in the controller
 Optimization applications
 Test process/plant
Engineering answer
Vinyl Acetate production
Product loss
Product per day: 96.000$
Product loss per day: 11.469,70$
Outcome of the damage stage
Product loss, 24 hours Steady-state attacks Periodic attacks
High, ≥ 10.000$ XMV {2} XMV {4;6}
Medium, 5.000$ - 10.000$ XMV {6;7} XMV {5;7}
Low, 2.000$ - 5.000$ - XMV {2}
Negligible, ≤ 2.000$ XMV {1;3} XMV {1;2}
Product per day: 96.000$
Still might be useful
Clean-up
Socio-technical system
• Maintenance stuff
• Plant engineers
• Process engineers
• ….
Cyber-physical system
Controller
Operator
Creating forensics footprint
 Process operators may get concerned after noticing
persistent decrease in production and may try to fix
the problem
 If attacks are timed to a particular employee
shift or maintenance work, plant employee
will be investigated rather than the process
Creating forensics footprint
1. Pick several ways that the temperature can be
increased
2. Wait for the scheduled instruments calibration
3. Perform the first attack
4. Wait for the maintenance guy being
yelled at and recalibration to be repeated
5. Play next attack
6. Go to 4
Creating forensics footprint
Four different attacks
Defeating chemical forensics
 If reactor doubted, chemical forensics guys will be asked to assist
 Know metrics and methods of chemical investigators
 Change attack patterns according to debugging
efforts of plant personnel
Operator’s
screens
Regulatory
filings
Point
database
Safety
briefs
Historian
Small
changes to
the process
Realtime
data from
sensors
Safety
systems
SEC filings
Process
experts
Custom
research
Final Payload
Custom
operator
spoofs
Waiting for
unusual
events
Log
tampering
Minimal
process
model
Accident
data
Forensic
footprint
Discovery
Control
Damage
Cleanup
Access
ICCP
Regulatory
reporting
Just-in-time
manufacturing
Wireless
links
Afterword
State-of-the-art of ICS security
TCP/IP
Food for thought
 Cost of attack can quickly exceed cost of damage
o Hacking into large number of devices
o Suppression of alarms and process data spoofing
o Badly behaved control loops , synchronization of actions
 Each process is unique, but…
o There are instances of attacks applicable to wide range of scenarios
o SCADA payloads for Metasploit is just a matter of time
Dream BIG
Evil villains from James Bond movies unite! Go forth and start
building your evil lairs.
TE: http://github.com/satejnik/DVCP-TE
VAM: http://github.com/satejnik/DVCP-VAM
Damn Vulnerable Chemical Process
Thank you
marina.krotofil@tuhh.de
jason.larsen@ioactive.com

More Related Content

What's hot

Defcon through the_eyes_of_the_attacker_2018_slides
Defcon through the_eyes_of_the_attacker_2018_slidesDefcon through the_eyes_of_the_attacker_2018_slides
Defcon through the_eyes_of_the_attacker_2018_slidesMarina Krotofil
 
Scada Industrial Control Systems Penetration Testing
Scada Industrial Control Systems Penetration Testing Scada Industrial Control Systems Penetration Testing
Scada Industrial Control Systems Penetration Testing Yehia Mamdouh
 
Embedded Systems, Asset or Security Threat? (6 May 2014, (ICS)2 Secure Rotter...
Embedded Systems, Asset or Security Threat? (6 May 2014, (ICS)2 Secure Rotter...Embedded Systems, Asset or Security Threat? (6 May 2014, (ICS)2 Secure Rotter...
Embedded Systems, Asset or Security Threat? (6 May 2014, (ICS)2 Secure Rotter...Jaap van Ekris
 
2011-05-02 - VU Amsterdam - Testing safety critical systems
2011-05-02 - VU Amsterdam - Testing safety critical systems2011-05-02 - VU Amsterdam - Testing safety critical systems
2011-05-02 - VU Amsterdam - Testing safety critical systemsJaap van Ekris
 
DEF CON 23 - NSM 101 for ICS
DEF CON 23 - NSM 101 for ICSDEF CON 23 - NSM 101 for ICS
DEF CON 23 - NSM 101 for ICSChris Sistrunk
 
Practical DNP3 and Modern SCADA Systems
Practical DNP3 and Modern SCADA SystemsPractical DNP3 and Modern SCADA Systems
Practical DNP3 and Modern SCADA SystemsLiving Online
 
Scada, a PLC's story
Scada, a PLC's storyScada, a PLC's story
Scada, a PLC's storyPaolo Stagno
 
Johannes Klick, Daniel Marzin. Find Them, Bind Them - Industrial Control Syst...
Johannes Klick, Daniel Marzin. Find Them, Bind Them - Industrial Control Syst...Johannes Klick, Daniel Marzin. Find Them, Bind Them - Industrial Control Syst...
Johannes Klick, Daniel Marzin. Find Them, Bind Them - Industrial Control Syst...Positive Hack Days
 
PT-DTS SCADA Security using MaxPatrol
PT-DTS SCADA Security using MaxPatrolPT-DTS SCADA Security using MaxPatrol
PT-DTS SCADA Security using MaxPatrolShah Sheikh
 
Security testing in critical systems
Security testing in critical systemsSecurity testing in critical systems
Security testing in critical systemsPeter Wood
 
Industrial protocols for pentesters
Industrial protocols for pentestersIndustrial protocols for pentesters
Industrial protocols for pentestersPositive Hack Days
 
Wireless SCADA Data Communications
Wireless SCADA Data CommunicationsWireless SCADA Data Communications
Wireless SCADA Data CommunicationsDaniel Ehrenreich
 
RSAC 2016: How to Get into ICS Security
RSAC 2016: How to Get into ICS SecurityRSAC 2016: How to Get into ICS Security
RSAC 2016: How to Get into ICS SecurityChris Sistrunk
 
Rubén Santamarta - SCADA Trojans: Attacking the Grid [Rooted CON 2011]
Rubén Santamarta - SCADA Trojans: Attacking the Grid [Rooted CON 2011]Rubén Santamarta - SCADA Trojans: Attacking the Grid [Rooted CON 2011]
Rubén Santamarta - SCADA Trojans: Attacking the Grid [Rooted CON 2011]RootedCON
 

What's hot (20)

Defcon through the_eyes_of_the_attacker_2018_slides
Defcon through the_eyes_of_the_attacker_2018_slidesDefcon through the_eyes_of_the_attacker_2018_slides
Defcon through the_eyes_of_the_attacker_2018_slides
 
Never Trust Your Inputs
Never Trust Your InputsNever Trust Your Inputs
Never Trust Your Inputs
 
Scada Industrial Control Systems Penetration Testing
Scada Industrial Control Systems Penetration Testing Scada Industrial Control Systems Penetration Testing
Scada Industrial Control Systems Penetration Testing
 
Embedded Systems, Asset or Security Threat? (6 May 2014, (ICS)2 Secure Rotter...
Embedded Systems, Asset or Security Threat? (6 May 2014, (ICS)2 Secure Rotter...Embedded Systems, Asset or Security Threat? (6 May 2014, (ICS)2 Secure Rotter...
Embedded Systems, Asset or Security Threat? (6 May 2014, (ICS)2 Secure Rotter...
 
2011-05-02 - VU Amsterdam - Testing safety critical systems
2011-05-02 - VU Amsterdam - Testing safety critical systems2011-05-02 - VU Amsterdam - Testing safety critical systems
2011-05-02 - VU Amsterdam - Testing safety critical systems
 
DEF CON 23 - NSM 101 for ICS
DEF CON 23 - NSM 101 for ICSDEF CON 23 - NSM 101 for ICS
DEF CON 23 - NSM 101 for ICS
 
Practical DNP3 and Modern SCADA Systems
Practical DNP3 and Modern SCADA SystemsPractical DNP3 and Modern SCADA Systems
Practical DNP3 and Modern SCADA Systems
 
Scada, a PLC's story
Scada, a PLC's storyScada, a PLC's story
Scada, a PLC's story
 
Johannes Klick, Daniel Marzin. Find Them, Bind Them - Industrial Control Syst...
Johannes Klick, Daniel Marzin. Find Them, Bind Them - Industrial Control Syst...Johannes Klick, Daniel Marzin. Find Them, Bind Them - Industrial Control Syst...
Johannes Klick, Daniel Marzin. Find Them, Bind Them - Industrial Control Syst...
 
Improving SCADA Security
Improving SCADA SecurityImproving SCADA Security
Improving SCADA Security
 
scada systems
scada systemsscada systems
scada systems
 
PT-DTS SCADA Security using MaxPatrol
PT-DTS SCADA Security using MaxPatrolPT-DTS SCADA Security using MaxPatrol
PT-DTS SCADA Security using MaxPatrol
 
Security testing in critical systems
Security testing in critical systemsSecurity testing in critical systems
Security testing in critical systems
 
Industrial protocols for pentesters
Industrial protocols for pentestersIndustrial protocols for pentesters
Industrial protocols for pentesters
 
ICS security
ICS securityICS security
ICS security
 
Wireless SCADA Data Communications
Wireless SCADA Data CommunicationsWireless SCADA Data Communications
Wireless SCADA Data Communications
 
RSAC 2016: How to Get into ICS Security
RSAC 2016: How to Get into ICS SecurityRSAC 2016: How to Get into ICS Security
RSAC 2016: How to Get into ICS Security
 
Rubén Santamarta - SCADA Trojans: Attacking the Grid [Rooted CON 2011]
Rubén Santamarta - SCADA Trojans: Attacking the Grid [Rooted CON 2011]Rubén Santamarta - SCADA Trojans: Attacking the Grid [Rooted CON 2011]
Rubén Santamarta - SCADA Trojans: Attacking the Grid [Rooted CON 2011]
 
Sil presentation
Sil presentationSil presentation
Sil presentation
 
New Trends in Automation
New Trends in AutomationNew Trends in Automation
New Trends in Automation
 

Viewers also liked

Contas de governo de 2009 de paracuru ce-br -defesa perante a câmara municipa...
Contas de governo de 2009 de paracuru ce-br -defesa perante a câmara municipa...Contas de governo de 2009 de paracuru ce-br -defesa perante a câmara municipa...
Contas de governo de 2009 de paracuru ce-br -defesa perante a câmara municipa...Francisco Luz
 
Лаборатория Касперского. Сергей Булович. ИТС Софт-проекты. Александр Рябцев. ...
Лаборатория Касперского. Сергей Булович. ИТС Софт-проекты. Александр Рябцев. ...Лаборатория Касперского. Сергей Булович. ИТС Софт-проекты. Александр Рябцев. ...
Лаборатория Касперского. Сергей Булович. ИТС Софт-проекты. Александр Рябцев. ...Expolink
 
Codificando Night Week - Benefícios de Conhecer Business Intelligence com SQL...
Codificando Night Week - Benefícios de Conhecer Business Intelligence com SQL...Codificando Night Week - Benefícios de Conhecer Business Intelligence com SQL...
Codificando Night Week - Benefícios de Conhecer Business Intelligence com SQL...Diego Nogare
 
Vulners: Google for hackers
Vulners: Google for hackersVulners: Google for hackers
Vulners: Google for hackersKirill Ermakov
 
Actividades y proyecto_erika_durán[1]
Actividades y proyecto_erika_durán[1]Actividades y proyecto_erika_durán[1]
Actividades y proyecto_erika_durán[1]Estefania Duran
 
不只是漸層的CSS3漸層
不只是漸層的CSS3漸層不只是漸層的CSS3漸層
不只是漸層的CSS3漸層柏融 陳
 
Ml based detection of users anomaly activities (20th OWASP Night Tokyo, English)
Ml based detection of users anomaly activities (20th OWASP Night Tokyo, English)Ml based detection of users anomaly activities (20th OWASP Night Tokyo, English)
Ml based detection of users anomaly activities (20th OWASP Night Tokyo, English)Yury Leonychev
 
Tuvia Liran, Director of VLSI, Nano Retina
Tuvia Liran, Director of VLSI, Nano RetinaTuvia Liran, Director of VLSI, Nano Retina
Tuvia Liran, Director of VLSI, Nano Retinachiportal
 
DESIGN THINKING - A busca pelo modelo ideal de usabilidade da página de check...
DESIGN THINKING - A busca pelo modelo ideal de usabilidade da página de check...DESIGN THINKING - A busca pelo modelo ideal de usabilidade da página de check...
DESIGN THINKING - A busca pelo modelo ideal de usabilidade da página de check...Euripedes Magalhães
 
New wave of attacks in Ukraine 2016
New wave of attacks in Ukraine 2016New wave of attacks in Ukraine 2016
New wave of attacks in Ukraine 2016Marina Krotofil
 
Prof. Uri Weiser,Technion
Prof. Uri Weiser,TechnionProf. Uri Weiser,Technion
Prof. Uri Weiser,Technionchiportal
 
S4 krotofil afternoon_sesh_2017
S4 krotofil afternoon_sesh_2017S4 krotofil afternoon_sesh_2017
S4 krotofil afternoon_sesh_2017Marina Krotofil
 
S4 krotofil morning_sesh_2017
S4 krotofil morning_sesh_2017S4 krotofil morning_sesh_2017
S4 krotofil morning_sesh_2017Marina Krotofil
 
SibeCrypt 2016. Практические методы защиты веб-приложений
SibeCrypt 2016. Практические методы защиты веб-приложенийSibeCrypt 2016. Практические методы защиты веб-приложений
SibeCrypt 2016. Практические методы защиты веб-приложенийDenis Kolegov
 
PNAIC 2015 - Jogos e interdisciplinaridade
PNAIC 2015 - Jogos e interdisciplinaridadePNAIC 2015 - Jogos e interdisciplinaridade
PNAIC 2015 - Jogos e interdisciplinaridadeElieneDias
 
F5 ASM v12 DDoS best practices
F5 ASM v12 DDoS best practices F5 ASM v12 DDoS best practices
F5 ASM v12 DDoS best practices Lior Rotkovitch
 

Viewers also liked (20)

Contas de governo de 2009 de paracuru ce-br -defesa perante a câmara municipa...
Contas de governo de 2009 de paracuru ce-br -defesa perante a câmara municipa...Contas de governo de 2009 de paracuru ce-br -defesa perante a câmara municipa...
Contas de governo de 2009 de paracuru ce-br -defesa perante a câmara municipa...
 
Лаборатория Касперского. Сергей Булович. ИТС Софт-проекты. Александр Рябцев. ...
Лаборатория Касперского. Сергей Булович. ИТС Софт-проекты. Александр Рябцев. ...Лаборатория Касперского. Сергей Булович. ИТС Софт-проекты. Александр Рябцев. ...
Лаборатория Касперского. Сергей Булович. ИТС Софт-проекты. Александр Рябцев. ...
 
Codificando Night Week - Benefícios de Conhecer Business Intelligence com SQL...
Codificando Night Week - Benefícios de Conhecer Business Intelligence com SQL...Codificando Night Week - Benefícios de Conhecer Business Intelligence com SQL...
Codificando Night Week - Benefícios de Conhecer Business Intelligence com SQL...
 
Vulners: Google for hackers
Vulners: Google for hackersVulners: Google for hackers
Vulners: Google for hackers
 
Actividades y proyecto_erika_durán[1]
Actividades y proyecto_erika_durán[1]Actividades y proyecto_erika_durán[1]
Actividades y proyecto_erika_durán[1]
 
不只是漸層的CSS3漸層
不只是漸層的CSS3漸層不只是漸層的CSS3漸層
不只是漸層的CSS3漸層
 
Ml based detection of users anomaly activities (20th OWASP Night Tokyo, English)
Ml based detection of users anomaly activities (20th OWASP Night Tokyo, English)Ml based detection of users anomaly activities (20th OWASP Night Tokyo, English)
Ml based detection of users anomaly activities (20th OWASP Night Tokyo, English)
 
Tuvia Liran, Director of VLSI, Nano Retina
Tuvia Liran, Director of VLSI, Nano RetinaTuvia Liran, Director of VLSI, Nano Retina
Tuvia Liran, Director of VLSI, Nano Retina
 
VolgaCTF | Bo0oM - DNS and attacks
VolgaCTF | Bo0oM - DNS and attacksVolgaCTF | Bo0oM - DNS and attacks
VolgaCTF | Bo0oM - DNS and attacks
 
DESIGN THINKING - A busca pelo modelo ideal de usabilidade da página de check...
DESIGN THINKING - A busca pelo modelo ideal de usabilidade da página de check...DESIGN THINKING - A busca pelo modelo ideal de usabilidade da página de check...
DESIGN THINKING - A busca pelo modelo ideal de usabilidade da página de check...
 
New wave of attacks in Ukraine 2016
New wave of attacks in Ukraine 2016New wave of attacks in Ukraine 2016
New wave of attacks in Ukraine 2016
 
Prof. Uri Weiser,Technion
Prof. Uri Weiser,TechnionProf. Uri Weiser,Technion
Prof. Uri Weiser,Technion
 
S4 krotofil afternoon_sesh_2017
S4 krotofil afternoon_sesh_2017S4 krotofil afternoon_sesh_2017
S4 krotofil afternoon_sesh_2017
 
S4 krotofil morning_sesh_2017
S4 krotofil morning_sesh_2017S4 krotofil morning_sesh_2017
S4 krotofil morning_sesh_2017
 
SibeCrypt 2016. Практические методы защиты веб-приложений
SibeCrypt 2016. Практические методы защиты веб-приложенийSibeCrypt 2016. Практические методы защиты веб-приложений
SibeCrypt 2016. Практические методы защиты веб-приложений
 
Cerveza Presidente
Cerveza PresidenteCerveza Presidente
Cerveza Presidente
 
Bloom energy
Bloom energyBloom energy
Bloom energy
 
PNAIC 2015 - Jogos e interdisciplinaridade
PNAIC 2015 - Jogos e interdisciplinaridadePNAIC 2015 - Jogos e interdisciplinaridade
PNAIC 2015 - Jogos e interdisciplinaridade
 
1º encontro
1º encontro1º encontro
1º encontro
 
F5 ASM v12 DDoS best practices
F5 ASM v12 DDoS best practices F5 ASM v12 DDoS best practices
F5 ASM v12 DDoS best practices
 

Similar to Hacking Chemical Plants for Economic Damage

DEFCON 23- Marina Krotofil and Jason Larsen -Hacking chemical plants for com...
DEFCON 23-  Marina Krotofil and Jason Larsen -Hacking chemical plants for com...DEFCON 23-  Marina Krotofil and Jason Larsen -Hacking chemical plants for com...
DEFCON 23- Marina Krotofil and Jason Larsen -Hacking chemical plants for com...Felipe Prado
 
Functional safety by FMEA/FTA
Functional safety by FMEA/FTAFunctional safety by FMEA/FTA
Functional safety by FMEA/FTAmehmor
 
2010-03-31 - VU Amsterdam - Experiences testing safety critical systems
2010-03-31 - VU Amsterdam - Experiences testing safety critical systems2010-03-31 - VU Amsterdam - Experiences testing safety critical systems
2010-03-31 - VU Amsterdam - Experiences testing safety critical systemsJaap van Ekris
 
Plc 8 raja presentation plc
Plc 8  raja presentation  plcPlc 8  raja presentation  plc
Plc 8 raja presentation plcRameez Raja
 
Real Time Systems & RTOS
Real Time Systems & RTOSReal Time Systems & RTOS
Real Time Systems & RTOSVishwa Mohan
 
Ankit singh rana plc
Ankit singh rana plc Ankit singh rana plc
Ankit singh rana plc ankits4r3
 
EMBEDDED SYSTEMS 1
EMBEDDED SYSTEMS 1EMBEDDED SYSTEMS 1
EMBEDDED SYSTEMS 1PRADEEP
 
Damn Vulnerable Chemical Process
Damn Vulnerable Chemical ProcessDamn Vulnerable Chemical Process
Damn Vulnerable Chemical ProcessPositive Hack Days
 
Dcs lec01 - introduction to discrete-time control systems
Dcs   lec01 - introduction to discrete-time control systemsDcs   lec01 - introduction to discrete-time control systems
Dcs lec01 - introduction to discrete-time control systemsAmr E. Mohamed
 
2008-10-09 - Bits and Chips Conference - Embedded Systemen Architecture patterns
2008-10-09 - Bits and Chips Conference - Embedded Systemen Architecture patterns2008-10-09 - Bits and Chips Conference - Embedded Systemen Architecture patterns
2008-10-09 - Bits and Chips Conference - Embedded Systemen Architecture patternsJaap van Ekris
 
PLC Training in Noida | PLC Scada Training in Delhi
PLC Training in Noida | PLC Scada Training in DelhiPLC Training in Noida | PLC Scada Training in Delhi
PLC Training in Noida | PLC Scada Training in DelhiSofcon India PVT LTD
 
Ch20-Software Engineering 9
Ch20-Software Engineering 9Ch20-Software Engineering 9
Ch20-Software Engineering 9Ian Sommerville
 

Similar to Hacking Chemical Plants for Economic Damage (20)

DEFCON 23- Marina Krotofil and Jason Larsen -Hacking chemical plants for com...
DEFCON 23-  Marina Krotofil and Jason Larsen -Hacking chemical plants for com...DEFCON 23-  Marina Krotofil and Jason Larsen -Hacking chemical plants for com...
DEFCON 23- Marina Krotofil and Jason Larsen -Hacking chemical plants for com...
 
Functional safety by FMEA/FTA
Functional safety by FMEA/FTAFunctional safety by FMEA/FTA
Functional safety by FMEA/FTA
 
2010-03-31 - VU Amsterdam - Experiences testing safety critical systems
2010-03-31 - VU Amsterdam - Experiences testing safety critical systems2010-03-31 - VU Amsterdam - Experiences testing safety critical systems
2010-03-31 - VU Amsterdam - Experiences testing safety critical systems
 
Plc 8 raja presentation plc
Plc 8  raja presentation  plcPlc 8  raja presentation  plc
Plc 8 raja presentation plc
 
Real Time Systems & RTOS
Real Time Systems & RTOSReal Time Systems & RTOS
Real Time Systems & RTOS
 
Ankit singh rana plc
Ankit singh rana plc Ankit singh rana plc
Ankit singh rana plc
 
EMBEDDED SYSTEMS 1
EMBEDDED SYSTEMS 1EMBEDDED SYSTEMS 1
EMBEDDED SYSTEMS 1
 
Damn Vulnerable Chemical Process
Damn Vulnerable Chemical ProcessDamn Vulnerable Chemical Process
Damn Vulnerable Chemical Process
 
Dcs lec01 - introduction to discrete-time control systems
Dcs   lec01 - introduction to discrete-time control systemsDcs   lec01 - introduction to discrete-time control systems
Dcs lec01 - introduction to discrete-time control systems
 
2008-10-09 - Bits and Chips Conference - Embedded Systemen Architecture patterns
2008-10-09 - Bits and Chips Conference - Embedded Systemen Architecture patterns2008-10-09 - Bits and Chips Conference - Embedded Systemen Architecture patterns
2008-10-09 - Bits and Chips Conference - Embedded Systemen Architecture patterns
 
Ch20
Ch20Ch20
Ch20
 
PLC Training in Noida | PLC Scada Training in Delhi
PLC Training in Noida | PLC Scada Training in DelhiPLC Training in Noida | PLC Scada Training in Delhi
PLC Training in Noida | PLC Scada Training in Delhi
 
plc scada
 plc scada plc scada
plc scada
 
Ch20-Software Engineering 9
Ch20-Software Engineering 9Ch20-Software Engineering 9
Ch20-Software Engineering 9
 
Real timedata
Real timedataReal timedata
Real timedata
 
Safety Integrity Levels
Safety Integrity LevelsSafety Integrity Levels
Safety Integrity Levels
 
Real Time System
Real Time SystemReal Time System
Real Time System
 
PlantPAx Process
PlantPAx ProcessPlantPAx Process
PlantPAx Process
 
Lcs presentation
Lcs presentationLcs presentation
Lcs presentation
 
Real time system
Real time systemReal time system
Real time system
 

Hacking Chemical Plants for Economic Damage

  • 1. Marina Krotofil, Jason Larsen DefCon 23, Las Vegas, USA 07.08.2015 Rocking the Pocket Book: Hacking Chemical Plants for Competition and Extortion
  • 2. Who we are Hacker(Ex)Academic Got hooked on cyber- physical hacking Dragged into academic world against own will
  • 5. Industrial Control Systems aka SCADA Physical application Curtesy: Compass Security Germany GmbH
  • 6. Industry means big business Big business == $$$$$$$ Industrial Control Systems
  • 9. What can be done to the process Compliance violation  Safety (occupational, environment)  Pollution (environment)  Contractual agreements Production damage  Product quality and product rate  Operating costs  Maintenance efforts Equipment damage  Equipment overstress  Violation of safety limits
  • 10. Attack considerations  Equipment damage o Comes first into anybody’s mind (+) o Irreversible ( ) o Unclear collateral damage (-) o May transform into compliance violation, e.g. if it kills human (-) Compliance violation Production damage Equipment damage  Compliance violation o Compliance regulations are public knowledge (+) o Unclear collateral damage (-) o Must be reported to the authorities ( ) o Will be investigated by the responsible agencies (-) ± ±
  • 11. Here’s a plant. What is the plan? Attack goal: persistent economic damage
  • 13. Running upstairs to turn on your furnace every time it gets cold gets tiring after a while so you automate it with a thermostat (Nest because it’s so cute!) Process control automation Set point
  • 14. Control loop Actuators Control system Physical process Sensors Measure process state Computes control commands for actuators Adjust themselves to influence process behavior
  • 15. Control system Jacques Smuts „Process Control for Practitioners“ Termostat controller + Error in desired temperature e(t) = SP - PV Heat loss (e.g. through windows) Heat into houseSet point (SP) Furnace fuel valve House heating system Temperature sensor -Desired temp Measured temp (Process variable, PV) Controller output, CO Signal to actuator (valve) Adjusted fuel flow to furnace
  • 16. Control equipment  In large –scale operations control logic gets more complex than a thermostat  One would need something bigger than a thermostat to handle it  Most of the time this is a programmable logic controller (PLC)
  • 17. 1. Copy data from inputs to temporary storage 2. Run the logic 3. Copy from temporary storage to outputs Inputs Outputs PLC internals Sensors Actuators
  • 18. If Input 1 and (Input 4 or Input 11) then Output 6 Control logic If tank pressure in PLC 1 > 1800 reduce inflow in PLC 3  It is programmed graphically most of the time (We hear you screaming: Noooo!!!! Just give me a real language!)
  • 19.  PID: proportional, integral, derivative – most widely used control algorithm on the planet  The sum of 3 components makes the final control signal  PI controllers are most often used Jacques Smuts „Process Control for Practitioners“ PID control
  • 20. Wires are run from sensors and actuators into wiring cabinets Communication media o 4-20 mA o 0-10 v o Air pressure Usually process values are scaled into meaningful data in the PLC Field communication
  • 21. PLC cannot do it alone  PLC does not have the complete picture and time trends  Human operators watch the process 7/24  Most important task: resolving of alarms
  • 22. IT hacking vs. OT hacking
  • 23. Example: attack on process data flow Data integrity: packet injection; replay; data manipulation; … DoS: DoS; DDoS; flooding; starvation;…. I am not controlling the process!! Operator Net. Admin PLC Frequency converter Centrifuge Engineering station Linkage to cyber assets HMI DB Data flow
  • 25. OT hacking  An attacker with an objective beyond simple mayhem will want to reliably manipulate the process  This is achieved by obtaining and remaining in control of the process  To remain in control you need to apply control theory fu. (not sql-injections, no XSS or ROP) Process operator and hacker rival for control over the process
  • 26. Process-related security properties HOLY TRINITY IT domain Process control Observability Controllability Operability
  • 27. Process-related security properties HOLY TRINITY Observability Controllability Operability Information security Process control security CIA CO2
  • 29. Approaches to attacker control Reliably control the process throughout the attack Control the process until failure is guaranteed and then let it run out of control Make the process unusable by messing with the controls 1 2 3
  • 30. Consider a car and a driver  Attacker has control of the brakes  Attacker applies the left front brake  Diver steers right eventually coming back into a straight line  Attacker applies the left brake  Driver responds by steering to the right until the car is straight again
  • 31. Consider a car and a driver  The attacker responds by swapping brakes whenever the driver starts to compensate  Eventually the attacker will win since a computer is faster than a human
  • 32. Multi-adaptive  In the example above, the human is the “hidden actor” in the process that can’t be modeled or predicted  Any subset of a process can be modeled as a “hidden actor” and potentially destabilized  We call the algorithms that counter the feedback loops in the process “multi- adaptive” algorithms
  • 33.  Multi-Adaptive algorithms work just like process control automatic tuning programs except they try to maximize the error instead of minimizing it  The algorithm learns the behavior of the hidden actor and then compensates for it Controlled uncontrollability  A single algorithm can be used as a payload to disrupt many types of processes o Crash a car or overpressure a loop  Everything the control loop does makes things worse
  • 34. Get the party started!
  • 35. Plants for sale From LinkedIn More plants offers: http://www.usedplants.com/
  • 36. Car vs. plant hacking It is not about the size It is about MONEY Plants are ouch! how expensive
  • 37. Vinyl Acetate Monomer plant (model)
  • 40. Stages of SCADA attack Control Access DiscoveryCleanup Damage
  • 44. Traditional IT hacking • 1 0day • 1 Clueless user • Repeat until done • AntiVirus and patch management • Database links • Backup systems • No security • Move freely Exploit kit
  • 45. Modern IT hacking  Select a vulnerability from the list of ICS-CERT advisories  Scan Internet to locate vulnerable devices  Exploit • E. Leverett, R. Wightman. Vulnerability Inheritance in Programmable Logic Controllers (GreHack‘13) • D. Beresford. Exploiting Siemens Simatic S7 PLCs . Black Hat USA (2011)
  • 46.  Converts analog signal into digital  Sensors pre-process the measurements  IP-enabled (part of the “Internet-of-Things”) Computational element Sensor Smart instrumentation Old generation temperature sensor
  • 47. Invading field devices  Jason Larsen at Black Hat’15 “Miniaturization” o Inserting rootkit into firmware Water flow Shock wave Valve PhysicalReflected shock wave Valve closes Shockwave Reflected wave Pipe movement Attack scenario: pipe damage with water hammer
  • 50. Process discovery What and how the process is producing How it is build and wired How it is controlled Espionage, reconnaissance Target plant and third parties Operating and safety constraints
  • 51. Espionage  Industrial espionage has started LONG time ago (malware samples dated as early as 2003)
  • 54. Understanding points and logic Piping and instrumentation diagram Ladder logicProgrammable Logic Controller Pump in the plant
  • 55. Understanding points and logic Piping and instrumentation diagram Ladder logicProgrammable Logic Controller Pump in the plant HAVEX: Using OPC, the malware component gathers any details about connected devices and sends them back to the C&C.
  • 58. Watch the flows! fixed HAc flows into two sections. Not good :(
  • 59. Obtaining control != being in control  Obtained controls might not be useful for attack goal  Attacker might not necessary be able to control obtained controls WTF ??? Control Loop XMV{1} XMV{2} XMV{3}
  • 61. Physics of process control  Once hooked up together, physical components become related to each other by the physics of the process  If we adjust a valve what happens to everything else? o Adjusting temperature also increases pressure and flow o All the downstream effects need to be taken into account  How much does the process can be changed before releasing alarms or it shutting down?
  • 64. Understanding process response Controller Process Transmitter Final control element Set point Disturbance • Operating practice • Control strategy • Sizing • Dead band • Flow properties • Type • Duration • Sampling frequency • Noise profile • Filtering • Control algorithm • Controller tuning • Equipment design • Process design • Control loops coupling
  • 65. Understanding process response Controller Process Transmitter Final control element Set point Disturbance • Operating practice • Control strategy • Sizing • Dead band • Flow properties • Type • Duration • Sampling frequency • Noise profile • Filtering • Control algorithm • Controller tuning • Equipment design • Process design • Control loops coupling Have extensively studied
  • 66. Process control challenges  Process dynamic is highly non-linear (???)  Behavior of the process is known to the extent of its modelling o So to controllers. They cannot control the process beyond their control model UNCERTAINTY! This triggers alarms Non-liner response
  • 67. Control loop ringing Caused by a negative real controller poles Makes process unstable and uncontrollable Amount of chemical entering the reactor Ringing impact ratio 1: 150
  • 68. Types of attacks Step attack Periodic attack Magnitude of manipulation Recovery time
  • 69. We should automate this process (work in progress) Outcome of the control stage I am 5’3’’ tall
  • 70. Sensitivity Magnitude of manipulation Recovery time High XMV {1;5;7} XMV {4;7} Medium XMV {2;4;6} XMV {5} Low XMV{3} XMV {1;2;3;6} Reliably useful controls Outcome of the control stage
  • 71. Alarm propagation Alarm Steady state attacks Periodic attacks Gas loop 02 XMV {1} XMV {1} Reactor feed T XMV {6} XMV {6} Rector T XMV{7} XMV{7} FEHE effluent XMV{7} XMV{7} Gas loop P XMV{2;3;6} XMV{2;3;6} HAc in decanter XMV{2;3;7} XMV{3} To persist we shall not bring about alarms The attacker needs to figure out the marginal attack parameters which (do not) trigger alarms
  • 73. How to break things? Attacker needs one or more attack scenarios to deploy in final payload  The least familiar stage to IT hackers o In most cases requires input of subject matter experts  Accident data is a good starting point o Governmental agencies o Plants’ own data bases
  • 74. How to break things?
  • 75. Hacker unfriendly process  Target plant may not have been designed in a hacker friendly way o There may no sensors measuring exact values needed for the attack execution o The information about the process may be spread across several subsystems making hacker invading greater number of devices o Control loops may be designed to control different parameters that the attacker needs to control for her goal
  • 76. Measuring the process • Reactor exit flowrate • Reactor exit temperature • No analyzer FT TT Chemical composition FT Measuring here is too late Analyzer Analyzer Analyzer Analyzer
  • 77. “It will eventually drain with the lowest holes loosing pressure last” “It will be fully drained in 20.4 seconds and the pressure curve looks like this” Technician Engineer Technician vs. engineer
  • 78. Technician answer Reactor with cooling tubes Usage of proxy sensor  Only tells us whether reaction rate increases or decreases  Is not precise enough to compare effectiveness of different attacks
  • 79. Quest for engineering answer 0,00073; 0,00016; 0,0007…  Code in the controller  Optimization applications  Test process/plant
  • 81. Product loss Product per day: 96.000$ Product loss per day: 11.469,70$
  • 82. Outcome of the damage stage Product loss, 24 hours Steady-state attacks Periodic attacks High, ≥ 10.000$ XMV {2} XMV {4;6} Medium, 5.000$ - 10.000$ XMV {6;7} XMV {5;7} Low, 2.000$ - 5.000$ - XMV {2} Negligible, ≤ 2.000$ XMV {1;3} XMV {1;2} Product per day: 96.000$ Still might be useful
  • 84. Socio-technical system • Maintenance stuff • Plant engineers • Process engineers • …. Cyber-physical system Controller Operator
  • 85. Creating forensics footprint  Process operators may get concerned after noticing persistent decrease in production and may try to fix the problem  If attacks are timed to a particular employee shift or maintenance work, plant employee will be investigated rather than the process
  • 86. Creating forensics footprint 1. Pick several ways that the temperature can be increased 2. Wait for the scheduled instruments calibration 3. Perform the first attack 4. Wait for the maintenance guy being yelled at and recalibration to be repeated 5. Play next attack 6. Go to 4
  • 88. Defeating chemical forensics  If reactor doubted, chemical forensics guys will be asked to assist  Know metrics and methods of chemical investigators  Change attack patterns according to debugging efforts of plant personnel
  • 89. Operator’s screens Regulatory filings Point database Safety briefs Historian Small changes to the process Realtime data from sensors Safety systems SEC filings Process experts Custom research Final Payload Custom operator spoofs Waiting for unusual events Log tampering Minimal process model Accident data Forensic footprint Discovery Control Damage Cleanup Access ICCP Regulatory reporting Just-in-time manufacturing Wireless links
  • 91. State-of-the-art of ICS security TCP/IP
  • 92. Food for thought  Cost of attack can quickly exceed cost of damage o Hacking into large number of devices o Suppression of alarms and process data spoofing o Badly behaved control loops , synchronization of actions  Each process is unique, but… o There are instances of attacks applicable to wide range of scenarios o SCADA payloads for Metasploit is just a matter of time
  • 93. Dream BIG Evil villains from James Bond movies unite! Go forth and start building your evil lairs.
  • 94. TE: http://github.com/satejnik/DVCP-TE VAM: http://github.com/satejnik/DVCP-VAM Damn Vulnerable Chemical Process Thank you marina.krotofil@tuhh.de jason.larsen@ioactive.com