+ All Categories
Home > Documents > SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header...

SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header...

Date post: 24-Jun-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
64
SCADA security why is it so hard? Amol Sarwate Director of Vulnerability Engineering, Qualys Inc.
Transcript
Page 1: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

SCADA security

why is it so hard?

Amol Sarwate

Director of Vulnerability Engineering, Qualys Inc.

Page 2: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

SCADA DCS

ICS

Page 3: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead
Page 4: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

accidents

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

power failures http://www.nerc.com/docs/docs/blackout/Status_Report_081104.pdf

other accidents http://en.wikipedia.org/wiki/List_of_industrial_disasters

Page 5: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

vandalism

vandals destroy insulators http://www.bpa.gov/corporate/BPAnews/archive/2002/NewsRelease.c

fm?ReleaseNo=297

Page 6: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

insider

disgruntle employee http://www.theregister.co.uk/2001/10/31/hacker_jailed_for

_revenge_sewage/

Page 7: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

APT

terrorism or espionage http://www.symantec.com/content/en/us/enterprise/

media/security_response/whitepapers/w32_duqu_

the_precursor_to_the_next_stuxnet.pdf

Page 8: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

basics

Field Control Center

Page 9: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

input output

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

Page 10: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

remote

Converts analog and discrete measurements to digital information

Page 11: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

communication

Front 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 12: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

master

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

Page 13: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

threats?

Page 14: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

io & remote

require physical access

Page 15: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

io & remote

field equipment generally does not contain process knowledge

Page 16: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

io & remote

information like valve 16 or breaker 9B

Page 17: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

io & remote

without process knowledge leads to nuisance disruption

Page 18: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

communication

manipulate FEP directly

Page 19: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

communication

change FEP output

which is HMI input

Page 20: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

communication

protocol threats

Page 21: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

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 22: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

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 Header IP Header

TCP Packet

IP Packet

Page 23: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

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 Header IP Header

TCP Packet

IP Packet

Page 24: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

frame MODBUS 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 25: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

frame MODBUS 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 26: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

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 27: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

request

Page 28: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

response

Page 29: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

what does modbus provide?

Page 30: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

ScadaScan (alpha)

Page 31: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

DNP 3.0

Page 32: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

application layer

Page 33: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

transport layer

Page 34: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

link layer

Page 35: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

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 36: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

request

Page 37: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

response

Page 38: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

what does DNP 3.0 provide?

Page 39: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

ScadaScan (alpha)

Page 40: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

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 41: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

master threats

control system network connected to corporate network or internet

Page 42: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

master threats

no authentication or per user authentication

Page 43: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

master threats

shared passwords or weak passwords

Page 44: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

master threats

no password change policy

Page 45: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

master threats

no patching

Page 46: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

master threats

not restarted in years

Page 47: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

master threats

unnecessary services

Page 48: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

master threats

off-the-shelf software

Page 49: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

challenges

SCADA system long life cycle

Page 50: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

challenges

difficulty and cost of upgrading

Page 51: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

challenges

no testing or guidance about OS patches from SCADA vendors

Page 52: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

challenges

some systems managed by

SCADA vendors

Page 53: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

challenges

data historians and other systems on the

SCADA network

Page 54: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

challenges

internal differences between IT and

SCADA engineers

Page 55: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

challenges

wrong mentality - SCADA too obscure for

hackers

Page 56: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

proposals

strategy for password policy, access control, access roles

Page 57: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

proposals

strategy for software upgrades and patches

Page 58: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

proposals

SCADA Test environment

Page 59: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

proposals

demand from SCADA vendors

expedite testing and approval of OS patches

Page 60: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

proposals

demand from SCADA vendors

newer and secure protocols

Page 61: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

proposals

apply experience from IT network management and security

Page 62: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

proposals

auditing and scanning

Page 63: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

ScadaScan

Alpha version Scan network range

Works with TCP/IP

Identifies Modbus TCP slaves

Identifies DNP 3 TCP slaves

Beta version SCADA master vulnerability scanning

SNMP support

HTTP support

1.0 Release User configurable signature files

Authenticated support for Windows and *nix

Code cleanup

Page 64: SCADA security why is it so hard? - Black Hat Briefings...frame MODBUS on TCP/IP MBAP Header Function code Data MODBUS TCP/IP ADU PDU Transaction ID Protocol ID Length Unit IDRead

thank you

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

twitter: @amolsarwate

please complete the speaker feedback surveys


Recommended