stealth low-level manipulation of programmable logic controllers i/o by ... - critis...

16
Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by Pin Control Exploitation Ali Abbasi a , Majid Hashemi b , Emmanuele Zambon a,c , and Sandro Etalle a, d a University of Twente, Services, Cyber Security and Safety Group b Quarkslab c SecurityMatters B.V. d Eindhoven University of Technology

Upload: others

Post on 05-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by ... - CRITIS 2016critis2016.org/IMG/pdf/1b_1_stealth_low-level... · 2016-12-14 · Stealth Low-Level Manipulation

Stealth Low-Level Manipulation of Programmable Logic

Controllers I/O by Pin Control Exploitation

Ali Abbasia, Majid Hashemib, Emmanuele

Zambona,c, and Sandro Etallea, d

a University of Twente, Services, Cyber Security and Safety Group b Quarkslab

c SecurityMatters B.V. dEindhoven University of Technology

Page 2: Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by ... - CRITIS 2016critis2016.org/IMG/pdf/1b_1_stealth_low-level... · 2016-12-14 · Stealth Low-Level Manipulation

2 / 15

Programmable Logic Controller

1

Page 3: Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by ... - CRITIS 2016critis2016.org/IMG/pdf/1b_1_stealth_low-level... · 2016-12-14 · Stealth Low-Level Manipulation

3 / 15

Background on Attacks and Defenses in PLCs

• Attacks:

• Firmware modification attacks

• Configuration manipulation attacks

• Control Flow attacks

• Authentication bypass

• Defenses:

• Attestation

• Control flow integrity

• Firmware integrity verification

• Logic checksum

Page 4: Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by ... - CRITIS 2016critis2016.org/IMG/pdf/1b_1_stealth_low-level... · 2016-12-14 · Stealth Low-Level Manipulation

4 / 15

Background on Pin Control

Pin Control Subsystem

• Pin Configuration

• Pin Multiplexing

Page 5: Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by ... - CRITIS 2016critis2016.org/IMG/pdf/1b_1_stealth_low-level... · 2016-12-14 · Stealth Low-Level Manipulation

5 / 15

How PLC Control the I/O

Page 6: Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by ... - CRITIS 2016critis2016.org/IMG/pdf/1b_1_stealth_low-level... · 2016-12-14 · Stealth Low-Level Manipulation

6 / 15

Security concerns regarding Pin Control

No Interrupt for Pin Configuration

How the OS knows about the modification of pin configuration?

What if somebody modify configuration of Pin at runtime?

No Interrupt for Pin Multiplexing

How OS knows about the of pin multiplexing?

What if somebody multiplex a Pin at runtime?

Page 7: Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by ... - CRITIS 2016critis2016.org/IMG/pdf/1b_1_stealth_low-level... · 2016-12-14 · Stealth Low-Level Manipulation

7 / 15

Security Concerns

Operating System/ Kernel Map (I/O Memory, +16bytes)

Request for mapping the physical I/O Memory

Read Pin 24

Write 0/1 every 5 sec

PLC Runtime

Pin 24 == Input (bit == 0)

Pin 22 == Output (bit == 1)

Write register

Virtual I/O Memory (mapped)

State Register

Read register

0 for bit 24

1 for bit 22

0/1

1

State Register

Physical I/O Memory

Read register

Write register

0 for bit 24

1 for bit 22

0/1

1

map via MMU

Logic

Blink LED every 5 sec in Pin 22 if

Pin 24 is True

Page 8: Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by ... - CRITIS 2016critis2016.org/IMG/pdf/1b_1_stealth_low-level... · 2016-12-14 · Stealth Low-Level Manipulation

8 / 15

Security Concerns

Operating System/ Kernel Map (I/O Memory, +16bytes)

Request for mapping the physical I/O Memory

Read Pin 24

Write 0/1 every 5 sec

PLC Runtime

Pin 24 == Input (bit == 0)

Pin 22 == Output (bit == 1)

Write register

Virtual I/O Memory (mapped)

State Register

Read register

0 for bit 24

1 for bit 22

0/1

1

State Register

Physical I/O Memory

Read register

Write register

0 for bit 24

1 for bit 22

0/1

1

map via MMU

Logic

Blink LED every 5 sec in Pin 22 if

Pin 24 is True

Pin 22 == Input (bit == 0)

0 for bit 22

0 for bit 22

Write Failure!!

Pin is in Input Mode

Page 9: Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by ... - CRITIS 2016critis2016.org/IMG/pdf/1b_1_stealth_low-level... · 2016-12-14 · Stealth Low-Level Manipulation

9 / 15

Pin Control Attack

• We can disable write to the PLC I/O outputs

• Virtual memory have different value since CPU will

ignore write operations.

• We can enable write to the PLC input I/O as

well.

• Pin Control Attack: manipulate the I/O

configuration of the PLC

• PLC OS never knows about it.

Page 10: Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by ... - CRITIS 2016critis2016.org/IMG/pdf/1b_1_stealth_low-level... · 2016-12-14 · Stealth Low-Level Manipulation

10 / 15

Threat Model & Attack Implementation

• PLC runtime privilege

• Knowledge of the physical process

• Knowledge of mapping between I/O pins and the logic

Page 11: Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by ... - CRITIS 2016critis2016.org/IMG/pdf/1b_1_stealth_low-level... · 2016-12-14 · Stealth Low-Level Manipulation

11 / 15

Page 12: Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by ... - CRITIS 2016critis2016.org/IMG/pdf/1b_1_stealth_low-level... · 2016-12-14 · Stealth Low-Level Manipulation

12 / 15

Practical Implementation of the Attack

Page 13: Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by ... - CRITIS 2016critis2016.org/IMG/pdf/1b_1_stealth_low-level... · 2016-12-14 · Stealth Low-Level Manipulation

13 / 15

Implication of the attack on the ICS

• Taxonomy of Utilities

• Water Utilities

• What can happen?:

• Attacker can change the I/O

• PLC is unaware of it.

• Even if we deploy some kind of detection

mechanisms

Page 14: Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by ... - CRITIS 2016critis2016.org/IMG/pdf/1b_1_stealth_low-level... · 2016-12-14 · Stealth Low-Level Manipulation

14 / 15

Implication of Attack in the ICS

• For now attacker can:

• Simply change the logic

• Modify PLC Runtime executable

• Fixing this attacks are trivial:

• Proper Authentication

• Proper Logic Checksum

• PLC Runtime integrity verification

• Next Step for attackers:

• Achieve its goal without actually modifying the Logic or Runtime or hooking functions

Page 15: Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by ... - CRITIS 2016critis2016.org/IMG/pdf/1b_1_stealth_low-level... · 2016-12-14 · Stealth Low-Level Manipulation

15 / 15

Conclusions

• Need to focus on system level security of control devices In future more

sophisticated techniques come that evade defenses.

• Pin Control attack is an example of such attacks.

• Pin Control Attack:

• lack of interrupt for I/O configuration registers

• Significant consequences on protected PLCs and other control devices such as IEDs.

• Solution:

• It is hard to handle I/O interrupts with existing real-time constraints.

• Monitoring I/O Configuration Pins for anomalies.

• User/Kernel space separation for I/O memory.

Page 16: Stealth Low-Level Manipulation of Programmable Logic Controllers I/O by ... - CRITIS 2016critis2016.org/IMG/pdf/1b_1_stealth_low-level... · 2016-12-14 · Stealth Low-Level Manipulation

16 / 15

Questions?

Looking for more technical detail?

Attend our talk at Black Hat EU 2016, London, UK.

or SCADA Security Scientific Symposium (S4x17) at Miami, USA.

Or ZeroNights 2016, Moscow, Russia.

Contact:

[email protected]