scada security: why is it so hard? - hack in paris · 2016-03-10 · hack in paris scada security:...

65
HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June 22, 2012

Upload: others

Post on 24-Mar-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

SCADA Security:

Why is it so hard?

Amol Sarwate, Director of Vulnerability Labs, Qualys Inc.

June 22, 2012

Page 2: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

SCADA Basics

Threats (where, why & how)

Challenges

Recommendations and Proposals

ScadaScan tool

Agenda

Page 3: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

SCADADCSICS

Page 4: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

Page 5: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

accidents

liquid pipeline failureshttp://www.ntsb.gov/doclib/safetystudies/SS0502.pdf

power failureshttp://www.nerc.com/docs/docs/blackout/Status_Report_081104.pdf

other accidentshttp://en.wikipedia.org/wiki/List_of_industrial_disasters

Page 6: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

vandalism

vandals destroy insulatorshttp://www.bpa.gov/corporate/BPAnews/archive

/2002/NewsRelease.cfm?ReleaseNo=297

Page 7: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

insider

disgruntle employeehttp://www.theregister.co.uk/2001/10/31

/hacker_jailed_for_revenge_sewage/

Page 8: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

APT

terrorism or espionagehttp://www.symantec.com/content/en/us/enterprise/media/security_response/whitepapers/w32_duqu_the_precursor_to_the_next_stuxnet.pdf

Page 9: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

basics

Field Control Center

Page 10: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

acquisitionConvert parameters like light, temperature, pressure or flow to analog signals

Page 11: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

conversionConverts analog and discrete measurements to digital information

Page 12: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

communicationFront end processors (FEP) and protocols

Wired or wireless communication

Modbus DNP 3 OPC

ICCP ControlNet BBC 7200

ANSI X3.28 DCP 1 Gedac 7020

DeviceNet DH+ ProfiBus

Tejas TRE UCA

Page 13: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

presentation & control

Control, monitor and alarming using human machine interface (HMI)

Page 14: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

threats?

Page 15: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

io & remote

Requires physical access

Page 16: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

io & remote

Field equipment generally does not contain process knowledge

Page 17: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

io & remote

Information like valve 16 or breaker 9B

Page 18: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

io & remote

Without process knowledge leads to nuisance disruption

Page 19: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

communication

Manipulate FEP directly

Page 20: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

communication

Change FEP outputwhich is HMI input

Page 21: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

communication

Protocol threats

Page 22: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

modbus protocol

MODBUS Request - Message sent on the network by the Client to initiate a transaction

MODBUS Indication - Request message received on the Server side

MODBUS Response - Response message sent by the Server

MODBUS Confirmation - Response Message received on the Client side

Modbus Client Modbus Server

Request Indication

Confirmation Response

Master Slave

Page 23: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

frame

Additional addresses Function code Data Error Check

ADU

PDU

MODBUS

MODBUS on TCP/IP

MBAP Header Function code Data

MODBUS TCP/IP ADU

PDU

TCP HeaderIP Header

TCP Packet

IP Packet

Page 24: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

frame

Additional addresses Function code Data Error Check

ADU

PDU

MODBUS

MODBUS on TCP/IP

MBAP Header Function code Data

MODBUS TCP/IP ADU

PDU

TCP HeaderIP Header

TCP Packet

IP Packet

Page 25: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

frameMODBUS on TCP/IP

MBAP Header Function code Data

MODBUS TCP/IP ADU

PDU

Transaction ID Protocol ID Length Unit ID

2 bytes 2 bytes 2 bytes 1 byte

Page 26: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

frameMODBUS on TCP/IP

MBAP Header Function code Data

MODBUS TCP/IP ADU

PDU

Transaction ID Protocol ID Length Unit ID

2 bytes 2 bytes 2 bytes 1 byte

Read Discrete

Inputs 2

Read Holding

Registers 3

Read FIFO

Queue 24 Get Com Event Counter 11

Read Coils 1

Write Single

Register 6

Read File

Record 20 Get Com Event Log 12

Write Single Coil 5

Write Multiple

Registers 16

Write File

Record 21 Report Slave ID 17

Write Multiple

Coils 15

Read/Write

Multiple Registers 23

Read Exception

Status 7 Read Device Identification 43

Read Input

Register 4

Mask Write

Register 22 Diagnostic 8

Encapsulated Interface

Transport 43

Page 27: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

example

$socket = IO::Socket::INET->new (PeerHost => $ip,PeerPort => '502',Proto => 'tcp',

)$socket->send($data);

# Transaction ID (2 bytes)

$buffer[0] = chr(1);

$buffer[1] = chr(0);

# Protocol ID (2 bytes)

$buffer[2] = chr(0);

$buffer[3] = chr(0);

# Length (2 bytes)

$buffer[4] = chr(0);

$buffer[5] = chr(6);

# Unit ID (1 bye)

$buffer[6] = chr(1);

# Function Code (1 byte)

$buffer[7] = chr(3);

# Data

$buffer[8] = chr(hex (substr $data_val, 0, 2));

$buffer[9] = chr(hex (substr $data_val, 2, 2));

$buffer[10] = chr(0);

$buffer[11] = chr($num_registers);

Page 28: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

request

Page 29: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

response

Page 30: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

whatdoes modbus provide?

Page 31: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

ScadaScan (alpha)

Page 32: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

DNP 3.0

Page 33: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

application layer

Page 34: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

transport layer

Page 35: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

link layer

Page 36: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

example

$socket = IO::Socket::INET->new (PeerHost => $ip,PeerPort => ‘20000',Proto => 'tcp',

)$socket->send($data);

# DNP 3.0 link layer frame

# Start character (2 bytes)

$buffer[0] = chr(5);

$buffer[1] = chr(100);

# Length field (1 byte)

$buffer[2] = chr(05);

# Control byte (1 byte)

$buffer[3] = chr(201);

# Destination address (2 bytes)

$buffer[4] = chr(241);

$buffer[5] = chr(255);

# Source address (2 bytes)

$buffer[6] = chr(05);

$buffer[7] = chr(00);

# CRC (2 bytes)

$buffer[8] = chr(170);

$buffer[9] = chr(210);

Page 37: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

request

Page 38: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

response

Page 39: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

whatdoes DNP 3.0 provide?

Page 40: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

ScadaScan (alpha)

Page 41: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

Secure DNP 3.0

Version 1.0 specification released in Feb 2007

Authentication

Initialization

Periodic

Critical Function Code Requests

Implementation Specific

Cryptography

Keyed Hashing for Message Authentication (HMAC)

Key Management

New Function Codes

Page 42: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

master threats

Control system network connected to

corporate network or internet

Page 43: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

master threats

No authentication or per user authentication

Page 44: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

master threats

Shared passwords or default passwords

Page 45: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

master threats

No password change policy

Page 46: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

master threats

No patching

Page 47: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

master threats

Not restarted in years

Page 48: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

master threats

Unnecessary services

Page 49: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

master threats

Off-the-shelf software

Page 50: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

challenges

SCADA system long life cycle

Page 51: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

challenges

Difficulty and cost of upgrading

Page 52: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

challenges

No testing or guidance about OS patches from SCADA vendors

Page 53: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

challenges

Some systems managed bySCADA vendors

Page 54: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

challenges

Data historians and other systems on theSCADA network

Page 55: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

challenges

Internal differences between IT andSCADA engineers

Page 56: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

challenges

Wrong mentality - SCADA too obscure forhackers

Page 57: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

proposals

Strategy for password policy, access control, access roles

Page 58: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

proposals

Strategy for software upgrades and patches

Page 59: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

proposals

SCADA Test environment

Page 60: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

proposals

Demand from SCADA vendorsexpedite testing and approval of OS patches

Page 61: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

proposals

Demand from SCADA vendorsnewer and secure protocols

Page 62: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

proposals

Apply experience from IT network management and security

Page 63: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

proposals

Auditing and scanning

Page 64: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

ScadaScanAlpha version

Scan network range

Works with TCP/IP

Identifies Modbus TCP slaves

Identifies DNP 3 TCP slaves

Beta versionSCADA master vulnerability scanning

SNMP support

HTTP support

1.0 ReleaseUser configurable signature files

Authenticated support for Windows and *nix

Code cleanup

Page 65: SCADA Security: Why is it so hard? - Hack In Paris · 2016-03-10 · HACK IN PARIS SCADA Security: Why is it so hard? Amol Sarwate, Director of Vulnerability Labs, Qualys Inc. June

HACK IN PARIS

Thank You

http://code.google.com/p/scadascan/

Twitter: @amolsarwate

https://community.qualys.com