Security and Reliability of the Internet Of Things (IoT): A Smart - - PowerPoint PPT Presentation

security and reliability of the internet of things iot a
SMART_READER_LITE
LIVE PREVIEW

Security and Reliability of the Internet Of Things (IoT): A Smart - - PowerPoint PPT Presentation

Security and Reliability of the Internet Of Things (IoT): A Smart Meter Case Study KarthikPattabiraman Farid Molazem Tabrizi, Maryam Raiyat, Abraham Chan, Ivan Beschastnikh University of British Columbia (UBC) My Research Building


slide-1
SLIDE 1

Security and Reliability of the Internet Of Things (IoT): A Smart Meter Case Study

KarthikPattabiraman Farid Molazem Tabrizi, Maryam Raiyat, Abraham Chan, Ivan Beschastnikh

University of British Columbia (UBC)

slide-2
SLIDE 2

My Research

  • Building fault-tolerant and secure software systems
  • Application-level fault and attack tolerance
  • Software resilience techniques [SC’16][DSN’16][DSN’15][DSN’14A][DSN14B]
  • Web applications’ reliability [ICSE’16][ICSE’15][ICSE’14A][ICSE’14B]
  • IoT Security [ACSAC’16][EDCC’15][HASE’14]
  • This talk
  • IoT Security and Reliability: Smart Meter Case Study

2

slide-3
SLIDE 3

IoT Systems are Everywhere

3

slide-4
SLIDE 4

IoT Security and Reliability

4

slide-5
SLIDE 5

IoT Security and Reliability: Challenges

  • IoT devices are resource constrained
  • Low memory and computing capacity
  • Sometimes energy constrained
  • Large scale of deployment
  • Worms can spread quickly in the network
  • Need scalable solutions with low false positives
  • Autonomous operation
  • Need for human intervention should be minimal or none
  • Must be capable of operating continuously for a long time
slide-6
SLIDE 6

IoT Example: Smart Meters

Thermostat TV Fridge Smart Meter Light Control Lock Control

slide-7
SLIDE 7

Smart Meter

7

Energy Sensors

Power line/Wireless

Utility Server

  • Cellular
  • Internet
slide-8
SLIDE 8

Global Status of Smart Meters

8

21,500,000 312,000 95,000,000 120,000 600,000 1,275,000 2009: 76 million 2010: 118 million 2012: 1 billion

slide-9
SLIDE 9

Smart Meter Security

  • Smart meter Attacks
  • No need for physical presence
  • Hard to detect by inspection or testing
  • Attacks can be large-scale

9

Analog Meter Smart Meter

slide-10
SLIDE 10

Smart Meter Security is a concern

slide-11
SLIDE 11

Outline

  • Motivation and Goals
  • Host-based Intrusion Detection System (IDS) for smart meters

[EDCC’15 – Distinguished Paper Award][HASE’14]

  • Model checking to find design vulnerabilities in smart meters

[ACSAC’16]

  • Ongoing Work and Conclusions
slide-12
SLIDE 12

IDS: Goal

  • Goal: Make IoT embedded devices secure
  • Build a host-based intrusion detection system
  • Important constraints
  • Small embedded devices => Low memory capacity
  • Large scale => No false positives
  • Low cost => Automated, no special hardware etc.
slide-13
SLIDE 13

IDS Challenge: False Positives

13

Center

device device device device device device device

slide-14
SLIDE 14

IDS Challenge: Memory Constraints

14

{ a = receive(); if (a > 0) foo(a); else bar(a); } void foo(int a) { if (a % 2 == 0) even(a); else

  • dd(a);

} void bar(int a) { if (a == -1) error1(); else if (a == -2) error2(); } a > 0 a <= 0 a % 2 == 0 a % 2 == 1 a == -1 a == -2

slide-15
SLIDE 15

IDS Existing Solutions

False-Positives Memory Consumption Program Analysis Techniques [Wagner][Giffin] Statistical Techniques [Moradi][Warrender] Our goal

slide-16
SLIDE 16

IDS Threat model

  • Adversary: Wants to change the execution of the software (in subtle

ways) to avoid detection. Do not consider privacy or confidentiality.

University of British Columbia (UBC) 16

Read Consumption data Send consumption data to the server Read consumption data Multiply consumption by 0.01 Write modified data to memory

slide-17
SLIDE 17

IDS: Main Idea

  • Quantify security to detect only the most critical

attacks, subject to memory constraints

17

slide-18
SLIDE 18

IDS Approach: Overview

18

Our work Software Design Documents (SDD) Code Coverage function Invariants IDS Monitoring Software trace

slide-19
SLIDE 19

IDS Approach: Details

19

Our work Software Design Documents (SDD) Code Coverage function

1-Study Software Design Document 2-Generating abstract Invariants 3-Static Analysis 4-Generating concrete invariants

Software Design Documents (SDD) Code Coverage function

5-Select

  • ptimized

invariants

slide-20
SLIDE 20
  • Storage/Retrieval integrity

20

Receive sensor data Store on flash memory Sensor data must eventually be stored on flash memory □(𝑕𝑓𝑢𝑢𝑗𝑜𝑕 𝑡𝑓𝑜𝑡𝑝𝑠𝐸𝑏𝑢𝑏 ⟹ ◊ 𝑡𝑢𝑝𝑠𝑓 𝑝𝑜 𝑔𝑚𝑏𝑡ℎ )

1- Study Software Design Document 2-Generating abstract Invariants 3-Static Analysis 4- Generating concrete invariants 5- Select

  • ptimized

invariants

slide-21
SLIDE 21

IDS Approach: Steps 3-4

21

Abstract invariants Concrete invariants (contain system calls)

1-Study Software Design Document 2-Generating abstract Invariants 3-Static Analysis 4-Generating concrete invariants

Software Design Documents (SDD) Code Coverage function

5-Select

  • ptimized

invariants

slide-22
SLIDE 22

22

□(𝑕𝑓𝑢𝑢𝑗𝑜𝑕 𝑡𝑓𝑜𝑡𝑝𝑠𝐸𝑏𝑢𝑏(𝑒𝑏𝑢𝑏) ⟹ ◊ 𝑡𝑢𝑝𝑠𝑓 𝑝𝑜 𝑔𝑚𝑏𝑡ℎ(𝑒𝑏𝑢𝑏) ) □(𝑠𝑓𝑑𝑓𝑗𝑤𝑓(𝑒) ⟹ ◊ 𝑥𝑠𝑗𝑢𝑓(𝑒) ) { …. data = socket.receive(); …. } { …. write(f, data); …. }

1- Study Software Design Document 2-Generating abstract Invariants 3-Static Analysis 4- Generating concrete invariants 5- Select

  • ptimized

invariants

… recv(4, 0x47cf68, 8192, 0) … write(1, 0x47cf68, 4) = 4 …

slide-23
SLIDE 23

IDS Approach: Step 5

23

1-Study Software Design Document 2-Generating abstract Invariants 3-Static Analysis 4-Generating concrete invariants

Software Design Documents (SDD) Code Coverage function

5-Select

  • ptimized

invariants

slide-24
SLIDE 24

IDS Approach: Building the IDS

1-Study Software Design Document 2-Generating abstract Invariants 3-Static Analysis 4-Generating concrete invariants 5-Generating IDS Memory Capacity

Formulate building the IDS as an optimization problem, where we maximize coverage subject to cost constraints

slide-25
SLIDE 25

IDS Coverage: MaxMin Coverage

𝑤8 𝑤9 𝑞8 𝑞; Invariants Security Properties 𝑞9 𝑤; 𝑤< 𝑤= 𝑤> 𝑞<

MaxMin Coverage IDS: Maximize minimum coverage i.e., distribute coverage among all properties

slide-26
SLIDE 26

IDS Coverage: MaxProperty IDS

𝑤8 𝑤9 𝑞8 𝑞; Invariants Security Properties 𝑞9 𝑤; 𝑤< 𝑤= 𝑤> 𝑞<

MaxProperty IDS: Maximize security properties that are fully covered

slide-27
SLIDE 27

IDS: Building the IDS

Select the invariants from the graph according to the coverage function Automatically convert it to Buchi Automaton Monitor the invariants at runtime

slide-28
SLIDE 28

IDS Evaluation: Testbed

  • Testbed: Smart Meter
  • Meter:
  • Arduino board
  • ATMEGA 32x series

microcontroller

  • Sensors
  • Gateway board
  • Broadcom BCM 3302 240MHz

CPU

  • 16 MB RAM
  • 4 MB available for IDS
  • OpenWRT Linux
  • IDS runs on the Gateway board
slide-29
SLIDE 29

IDS Evaluation: Fault injection

  • Flipping branches (surreptiously)

29

if (data_file~= nil) then big_string = data_file:read("*all") … end if (data_file== nil) then big_string = data_file:read("*all") … end

slide-30
SLIDE 30

IDS Results (MaxMin IDS: 2 MB memory)

  • How good is the coverage of the IDS (left)?
  • How good the graph-based optimization is reflected at run-time (right)?
slide-31
SLIDE 31

IDS Results (MaxProperty IDS: 2 MB memory)

  • How good is the coverage of the IDS (left)?
  • How good the graph-based optimization is reflected at run-time (right)?
slide-32
SLIDE 32

Outline

  • Motivation and Goals
  • Host-based Intrusion Detection System (IDS) for smart meters

[EDCC’15 – Distinguished Paper Award][HASE’14]

  • Model checking to find design vulnerabilities in smart meters

[ACSAC’16]

  • Ongoing Work and Conclusions
slide-33
SLIDE 33

Model Checking: Problem

33 embedded device

void foo() { … } int bar() { … }

Environment

Attacker

Action

Enumerate all possible attacks

slide-34
SLIDE 34

Model Checking: Challenge

  • Formal analysis requires well-defined properties (e.g. TCP/IP)
  • Unclear in IoT devices
  • The state space may be very large
  • Require the right level of abstraction
  • High-level enough to avoid state space explosion
  • Low-level enough to be translatable to device code

34

slide-35
SLIDE 35

Model Checking: Our approach

  • Key Idea: Each class of embedded

devices performssimilar operations

  • We can abstract the operations
  • Create an abstract model
  • Formalize the model (using

Maude)

  • Formalize attacker actions
  • Define unsafe states
  • Run model checking to find

attacker actions leading to unsafe states

35

State space

Unsafe state

slide-36
SLIDE 36

Model Checking: Formal model

SENSOR-STATES

  • 1. mod SENSOR-STATES is
  • 2. op getSensorDataList : —> SensorDataList.
  • 3. var dataList : SensorDataList.
  • 4. var r n : Nat.
  • 5. rl[r1]: getSensorDataList —> sensorDataElement(0,0).
  • 6. crl[r2]: sensorDataElement(r,n) —> sensorDataElement(r,n)

sensorDataElement(r+1, 0) if r < maxSensorNumber.

  • 7. crl[r3]: sensorDataElement(r,n) —> sensorDataElement(r,n+1)

if n < maxSensorData.

  • 8. endm

Defines the operation of receiving data from sensors SensorDataList is a list of tuples, each called sensorDataElement Defines necessary variables for defining the operations Recursively defining the rule to extend one sensorDataElement, to up to maxSensorNumber

  • elements. Each tuple is: [value,

sensor channel number]. Base of recursion

sensors

Gateway board

Data: (s1, v1) (s2, v2), …

slide-37
SLIDE 37

Model Checking: Threat model

  • Actions
  • Drop messages
  • Replay messages
  • Reboot meter

37

Read/Write access to communication interfaces [McLaughlin et al. 2010]

Root access to a node in grid network [Mo et al. 2012]

slide-38
SLIDE 38

Model Checking: Results

  • For each attacker action: query for paths to unsafe

states, e.g.,

  • search sensor(N1, M1) sensor(N2, M2) sensor(N3, M3)

⇒ sensor(N1, M1) sensor(N2, M2)

  • Checks if any data may be lost via dropping messages
  • Found many attacks: Many map to the same execution path

38

slide-39
SLIDE 39

Model Checking: Attacks example 1

39

Meter Server Server

Root access to a routing node Add IPTables rule: drop messages to time server

Function confirm_time_is_OK() while time_is_ok == false do ... time_is_ok = check_time() if (time_is_ok == true) then set_time() break end end end Gets stuck in the loop

: iptables − A INPUT − d ADDRESS − j DRO P

slide-40
SLIDE 40

Model Checking: Attack example 2

40

Sensor board Communica tion board

Request Data Normal behavior

Find serial communicatio n configuration (a handful common configs, a couple

  • f hundreds total configs

Use USB to 6-pin serial connector from laptop to meter

Replay data request

Receive data on the laptop – data deleted from sensor board One of the common configs worked in our case

slide-41
SLIDE 41

Model Checking: Attack example 3

41

meter

electricity

Network

Meter operations follow specific timing rules Meter operations follow specific timing rules

Profile timing behavior Profile timing behavior

Vulnerable code Vulnerable code

Open file in write mode Open file in write mode Vulnerability window Vulnerability window

Program solid state timer to reboot meter at vulnerability window Program solid state timer to reboot meter at vulnerability window

Will lose data if reboot Will lose data if reboot

slide-42
SLIDE 42

Model Checking: Performance

Attacker action Time (hrs) Attacks found Dropping packets 0.002 12 Replay 0.005 845 System reboot 1.9 6452

slide-43
SLIDE 43

Outline

  • Motivation and Goals
  • Host-based Intrusion Detection System (IDS) for smart meters

[EDCC’15 – Distinguished Paper Award][HASE’14]

  • Model checking to find design vulnerabilities in smart meters

[ACSAC’16]

  • Ongoing Work and Conclusions
slide-44
SLIDE 44

In Invariants: ARTIN INALI

  • A Real-Time-specific Invariant

iNference ALgorIthm

  • Mining independent

properties

  • Finding Temporal

relationship of independent properties

  • Incorporating time

properties into data invariants

slide-45
SLIDE 45

In Invariants: ARTIN INALI I VS

  • VS. Previou

ious s wor

  • rk

Data Event Time Daikon[IEEE’01] Dysy[ICSE’08] Quarry [ICSE’15] Gk-tail [ICSE’08] Pefume [ASE’14] ARTINALI (D|T Miner) ARTINALI (D|E Miner) ARTINALI (T|E Miner)

slide-46
SLIDE 46

In Invariants: Synchronization Ta Tampering Attack

Detection : violation in time per event invariant: send (T0 + K*15)à send (T0+(K+1)*15)

send recv recv send recv send send Time

T0 T0+15 T0+30

recv send

Get-seg-data= true Command=all-nodes Partial=nil Get-seg-data= true Command=all-nodes Partial=nil ) Get-seg-data= true Command=all-nodes Partial=nil Get-seg-data= false Command=nil Partial=DATA Get-seg-data= false Command=nil Partial=DATA Get-seg-data= false Command=nil Partial=DATA Get-seg-data= false √ Command=nil √ Partial=DATA √ Get-seg-data= false × Command=nil × Partial=DATA × Get-seg-data= false √ Command=nil √ Partial=DATA √ Get-seg-data= false × Command=nil × Partial=DATA ×

T0+45

Get-seg-data= true × Command=all-nodes × Partial=nil ×

Synchronization tampering attack

ts ts ts

Normal Execution

slide-47
SLIDE 47

Diversity: Motivation

  • One compromised device will not lead to attacks on other similar

devices

47

p1 p2 p3 pn ……..

slide-48
SLIDE 48

Diversity: Code Reuse Attacks

48

Code Injection Attack Code Reuse Attack

slide-49
SLIDE 49

Diversity: Functional Correctness vs Security?

49

Semantic Preserving Variants Semantic Non- Preserving Variants but Passes Tests Variants Break Tests Compilable Variants

slide-50
SLIDE 50

Conclusions

  • IoT Security and Reliability are important
  • Challenging due to memory and resource constraints
  • Physical access to the device is possible
  • Smart Meters: Important class of IoT device
  • Host-Based IDS to detect intrusions
  • Model checking to find design defects
  • Ongoing Work
  • Extracting invariants for runtime monitoring (ArtiNali)
  • Enhancing diversity among deployed variants (NVerD)
slide-51
SLIDE 51

Security and Reliability of the Internet Of Things (IoT): A Smart Meter Case Study

KarthikPattabiraman Farid Molazem Tabrizi, Maryam Raiyat, Abraham Chan, Ivan Beschastnikh

University of British Columbia (UBC)