Embedded Firmware Diversity for Smart Electric Meters Stephen - - PowerPoint PPT Presentation

embedded firmware diversity for smart electric meters
SMART_READER_LITE
LIVE PREVIEW

Embedded Firmware Diversity for Smart Electric Meters Stephen - - PowerPoint PPT Presentation


slide-1
SLIDE 1
  • Systems and Internet Infrastructure Security Laboratory (SIIS)
Page

Embedded Firmware Diversity for Smart Electric Meters

Stephen McLaughlin, Dmitry Podkuiko, Adam Delozier, Sergei Miadzvezhanka, and Patrick McDaniel

1 Tuesday, August 10, 2010
slide-2
SLIDE 2 Systems and Internet Infrastructure Security Laboratory (SIIS) Page

Smart Meters

2

Smart Meter Electromechanical

Tuesday, August 10, 2010
slide-3
SLIDE 3 Systems and Internet Infrastructure Security Laboratory (SIIS) Page

3 Concerns

3

Fraud - Hacking meters to reduce energy bill Privacy - Using detailed load profiles to determine behavior Blackout - Exploiting large numbers of meters and cutting power

Tuesday, August 10, 2010
slide-4
SLIDE 4 Systems and Internet Infrastructure Security Laboratory (SIIS) Page

The Problem of Meter Monocultures

4

.

.

.

.

Tuesday, August 10, 2010
slide-5
SLIDE 5 Systems and Internet Infrastructure Security Laboratory (SIIS) Page

The Problem of Meter Monocultures

5 Tuesday, August 10, 2010
slide-6
SLIDE 6 Systems and Internet Infrastructure Security Laboratory (SIIS) Page

The Problem of Meter Monocultures

6

Tuesday, August 10, 2010
slide-7
SLIDE 7 Systems and Internet Infrastructure Security Laboratory (SIIS) Page

The Problem of Meter Monocultures

7

☠ ☠☠ ☠ ☠ ☠ ☠ ☠

Tuesday, August 10, 2010
slide-8
SLIDE 8 Systems and Internet Infrastructure Security Laboratory (SIIS) Page

A Known Mitigation: Diversity

8

Software Diversity: Uniqueness added to the implementation, but not interfaces of a program. Caveat: Uniqueness must depend on good randomness

Tuesday, August 10, 2010
slide-9
SLIDE 9 Systems and Internet Infrastructure Security Laboratory (SIIS) Page

Limitations of Embedded Systems

9

Firmware Type Processor Type MMU Privileged Mode NX Bit RAM Repeater Controller Renesas M16C No No No 20KB Wireless Mesh Renesas H8S No No No N/A Embedded TCP/IP Lantronix DSTni-EX 186 No No No 256KB Gateway Controller Intel i386EX Yes Yes No 8MB

Address Space Layout Randomization No MMU Software Fault Isolation No protected supervisor mode Non-Executable Stacks No NX bit Stack Cookies Check code not segmented Address Encryption Works, but failed exploits can cause random errors

DiversityTechnique Limitation

Tuesday, August 10, 2010
slide-10
SLIDE 10 Systems and Internet Infrastructure Security Laboratory (SIIS) Page

More Embedded Challenges

10
  • Diversity scheme hardness depends on secret size, which

is related to machine word size.

  • Smart meter components range from 32- down to 8-bit

MCUs.

  • This will affect the layout of some data structures in 8-

and 16-bit systems, where multiple machine words will be needed to store the diversified value.

Tuesday, August 10, 2010
slide-11
SLIDE 11 Systems and Internet Infrastructure Security Laboratory (SIIS) Page

Address Encryption

11 R K

Stack Registers

Local Variables Previous Frame R K

R K

ret, jmp, etc.

Normal Dereference

R'

Stack Registers

Local Variables Previous Frame

R'

R' K ret, jmp, etc.

Exploit Dereference

EXPLOIT

K

⊕ ⊕

FAULT

What is normally a fault will cause unpredictable errors in embedded architectures with single, real-mode address spaces.

Tuesday, August 10, 2010
slide-12
SLIDE 12 Systems and Internet Infrastructure Security Laboratory (SIIS) Page

Redundant Address Encryption

12

R K2 R K1 R K3

⊕ ⊕ ⊕

Local Variables Previous Frame

Stack Registers

R K1 R K2 R K3

⊕ ⊕ ⊕

R R R K1 K2 K3

⊕ ⊕ ⊕

Compare ret, jmp, etc. Fail Stop == !=

For three keys on a 16 bit MCU:

  • 248 probes to compromise
  • 232 probes to random error

A 15,000 node deployment that is rate limited to 3 request/second for each meter requires approx. 10 years to fully compromise when using three keys.

Tuesday, August 10, 2010
slide-13
SLIDE 13 Systems and Internet Infrastructure Security Laboratory (SIIS) Page

Binary Instrumentation

  • Feasible for embedded

smart meters:

  • Statically linked code
  • Explicit call and return

instructions

  • Loose performance

constraints

  • Code size must be

minimized!

13

Original function call:

push A ; Save address jmp B ; Perform branch

Instrumented function call:

mov D [key1_addr] ; D = K_1 mov C A ; C = A xor C D ; C = C XOR D push C ; Save encrypted address mov D [key2_addr] ; D = K_2 mov C A ; xor C D ; Second redundant encryption push C ; mov D [key3_addr] ; D = K_3 mov C A ; xor C D ; Third redundant encryption push C ; jmp B ; Perform branch

Tuesday, August 10, 2010
slide-14
SLIDE 14 Systems and Internet Infrastructure Security Laboratory (SIIS) Page

Meter Configuration

14

The project has been using interfaces which have not completed testing (60, 50, 104, 66, 67) to enable AMS Ops to discover and initialize installed meters. The conversion approach for the MDMS needs to be revisited to determine if the right approach is to “initialize” the MEM go live weekend, or use ORT to enable “cut-over”.

Tuesday, August 10, 2010
slide-15
SLIDE 15 Systems and Internet Infrastructure Security Laboratory (SIIS) Page

Summary

  • Meter monocultures
  • Highly exposed nodes
  • Hard to configure
  • Same pandemic problem as other monocultures
  • Diversity
  • Well understood exploit mitigation
  • Significantly slows large scale exploit attempts
  • Embedded diversity schemes will present their own

challenges while facing less stringent performance requirements than traditional diversity techniques

15 Tuesday, August 10, 2010
slide-16
SLIDE 16 Systems and Internet Infrastructure Security Laboratory (SIIS) Page

Thank You

16

http://www.cse.psu.edu/~smclaugh http://siis.cse.psu.edu Seed Questions

  • Are there suggestions for approaches besides diversity for

mitigating large-scale meter exploitation?

  • How could we reduce meter TCB, thus reducing the

amount of code that needs to be diversified?

  • Should we build redundant address encryption or explore

additional diversity techniques?

Tuesday, August 10, 2010
slide-17
SLIDE 17 Systems and Internet Infrastructure Security Laboratory (SIIS) Page 17 Tuesday, August 10, 2010
slide-18
SLIDE 18 Systems and Internet Infrastructure Security Laboratory (SIIS) Page

Performance Considerations

18

Sensors MCU Storage Networking

Meter 1/s

Gateway Device

1/h

Utility Server

1/d (per meter)

Utility Technician

1/decade 1/decade

Tuesday, August 10, 2010