The DragonBeam Framework: Hardware-Protected Security Modules for - - PowerPoint PPT Presentation

the dragonbeam framework hardware protected security
SMART_READER_LITE
LIVE PREVIEW

The DragonBeam Framework: Hardware-Protected Security Modules for - - PowerPoint PPT Presentation

The DragonBeam Framework: Hardware-Protected Security Modules for In-Place Intrusion Detection Man-Ki Yoon, Mihai Christodorescu, Lui Sha, Sibin Mohan University of Illinois at Urbana-Champaign Qualcomm Research Silicon Valley June 6, 2016


slide-1
SLIDE 1

The DragonBeam Framework: Hardware-Protected Security Modules for In-Place Intrusion Detection

Man-Ki Yoon, Mihai Christodorescu, Lui Sha, Sibin Mohan

University of Illinois at Urbana-Champaign Qualcomm Research Silicon Valley June 6, 2016

slide-2
SLIDE 2

Security Monitoring

The DragonBeam Framework

In-place Monitoring OS

Applicatio n Applicatio n Application

OS

Applicatio n Applicatio n Application

External Monitoring

slide-3
SLIDE 3

Security Monitoring

The DragonBeam Framework

In-place Monitoring OS

Applicatio n Applicatio n Application

OS

Applicatio n Applicatio n Application

External Monitoring

Unsafety of the monitor

slide-4
SLIDE 4

Security Monitoring

The DragonBeam Framework

In-place Monitoring OS

Applicatio n Applicatio n Application

OS

Applicatio n Applicatio n Application

External Monitoring

Semantic gap Unsafety of the monitor

slide-5
SLIDE 5

OS

Applicatio n Applicatio n Application

DragonBeam Framework

The DragonBeam Framework

Command/Response

Untrusted Layer Secure Layer

slide-6
SLIDE 6

DragonBeam Framework

The DragonBeam Framework

Secure Memory Monitored Core Secure Core

OS

Applicatio n Applicatio n Application

SKM

Command/Response

SecMan Untrusted Layer Secure Layer

slide-7
SLIDE 7

DragonBeam Framework

The DragonBeam Framework

Untrusted Layer Secure Layer

Secure Kernel Module

  • Performs security monitoring operations
  • Expands the observability
  • Protected by Secure Core

Secure Memory Monitored Core Secure Core

OS

Applicatio n Applicatio n Application

SKM

Command/Response

SecMan

slide-8
SLIDE 8

DragonBeam Framework

The DragonBeam Framework

Untrusted Layer Secure Layer

Secure Kernel Module Manager

  • Commands SKM to perform security operations
  • Analyzes monitored information
  • Guarantees the integrity and the liveness of SKM

Secure Memory Monitored Core Secure Core

OS

Applicatio n Applicatio n Application

SKM

Command/Response

SecMan

slide-9
SLIDE 9

DragonBeam Framework

The DragonBeam Framework

Untrusted Layer Secure Layer

Secure Memory

  • Secure communication channel between SKM and SecMan
  • Only accessible by SKM or Secure Core
  • Also hosts SecMan code/data

Secure Memory Monitored Core Secure Core

OS

Applicatio n Applicatio n Application

SKM

Command/Response

SecMan

slide-10
SLIDE 10

Example Use Case

The DragonBeam Framework

Time

SKM SecMan

SKM SecMan

Secure Data Memory

slide-11
SLIDE 11

Example Use Case

The DragonBeam Framework

Time

SKM SecMan

Sends Command

SKM

check_syscall_table() { send_cmd(CMD_SYSCALL_TABLE); settimer(TIMEOUT); }

SecMan

Secure Data Memory

slide-12
SLIDE 12

Example Use Case

The DragonBeam Framework

Time

SKM SecMan

Sends Command

SKM

check_syscall_table() { send_cmd(CMD_SYSCALL_TABLE); settimer(TIMEOUT); }

SecMan

Secure Data Memory

1

slide-13
SLIDE 13

Example Use Case

The DragonBeam Framework

Time

SKM SecMan

Sends Command

SKM

check_syscall_table() { send_cmd(CMD_SYSCALL_TABLE); settimer(TIMEOUT); }

SecMan

Secure Data Memory

1 2

skm_ISR() { save sp; move sp to secure stack; switch (*CMD) { … case CMD_SYSCALL_TABLE: send_syscall_table(); break; … } restore sp; }

slide-14
SLIDE 14

Example Use Case

The DragonBeam Framework

Time

SKM SecMan

Sends Command Collects Information

SKM

check_syscall_table() { send_cmd(CMD_SYSCALL_TABLE); settimer(TIMEOUT); }

SecMan

send_syscall_table() { get cur_syscall_table; for each entry i write cur_syscall_table[i]; response_ready(); }

Secure Data Memory

1 2

skm_ISR() { save sp; move sp to secure stack; switch (*CMD) { … case CMD_SYSCALL_TABLE: send_syscall_table(); break; … } restore sp; }

3

slide-15
SLIDE 15

Example Use Case

The DragonBeam Framework

Time

SKM SecMan

Sends Command Collects Information

SKM

check_syscall_table() { send_cmd(CMD_SYSCALL_TABLE); settimer(TIMEOUT); }

SecMan

send_syscall_table() { get cur_syscall_table; for each entry i write cur_syscall_table[i]; response_ready(); }

Secure Data Memory

1 2 4

skm_ISR() { save sp; move sp to secure stack; switch (*CMD) { … case CMD_SYSCALL_TABLE: send_syscall_table(); break; … } restore sp; }

3

slide-16
SLIDE 16

Example Use Case

The DragonBeam Framework

Time

SKM SecMan

Sends Command Collects Information Analyzes Data

SKM

check_syscall_table() { send_cmd(CMD_SYSCALL_TABLE); settimer(TIMEOUT); } recv_syscall_table() { cleartimer(TIMEOUT); retrieve current syscall table; for each entry i if (cur.table[i]!=org.table[i]) Raise alert! }

SecMan

send_syscall_table() { get cur_syscall_table; for each entry i write cur_syscall_table[i]; response_ready(); }

Secure Data Memory

1 2 4 5

skm_ISR() { save sp; move sp to secure stack; switch (*CMD) { … case CMD_SYSCALL_TABLE: send_syscall_table(); break; … } restore sp; }

3

slide-17
SLIDE 17

Challenges

  • SKM identification
  • Secure memory access control
  • SKM integrity and liveness guarantee

The DragonBeam Framework

Secure Memory Monitored Core Secure Core

OS

Applicatio n Applicatio n Application

SKM

Command/Response

SecMan

slide-18
SLIDE 18

SKM Registration

The DragonBeam Framework

  • Requested by SKM, verified by SecMan
  • Calculates a hash of SKM’s code
  • Directly from physical frames

Base address

SKM .text

Page Size SKM Size

Virtual Address Space

SKM SecMan

SKM Loading Registration request

Physical Address Space

Page Table Hierarchy

Page table Information

slide-19
SLIDE 19

SKM Registration

The DragonBeam Framework

  • Requested by SKM, verified by SecMan
  • Calculates a hash of SKM’s code
  • Directly from physical frames

Base address

SKM .text

Page Size SKM Size

Virtual Address Space Physical Address Space

Page Table Hierarchy SKM .text Physical Frames

Page table Information

SKM SecMan

SKM Loading Registration request Find phys. frames of SKM .text

slide-20
SLIDE 20

SKM Registration

The DragonBeam Framework

  • Requested by SKM, verified by SecMan
  • Calculates a hash of SKM’s code
  • Directly from physical frames

Base address

SKM .text

Page Size SKM Size

Virtual Address Space Physical Address Space

Page Table Hierarchy SKM .text Physical Frames

Page table Information

SKM SecMan

SKM Loading Registration request Find phys. frames of SKM .text Calculate the hash

  • f SKM .text

Begin

  • perations

Halt and alarm

Match Not

slide-21
SLIDE 21

Secure Memory Access Control

  • Who initiated memory transaction?
  • Use the current program counter and page mapping information

The DragonBeam Framework

Malicious Module SKM

Program Counter Page Table Base Address

Secure Memory RAM Array

Within SKM .text? Same with the registered one?

Monitored Core

Registered .text info Registered Page Table info

slide-22
SLIDE 22

Secure Memory Access Control

  • What if attacker modifies SKM’s page mapping?

The DragonBeam Framework Page Table Hierarchy SKM .text Physical Frames

Base Size Virtual Address Space Physical Address Space

PC PC

slide-23
SLIDE 23

Secure Memory Access Control

  • What if attacker modifies SKM’s page mapping?

The DragonBeam Framework Page Table Hierarchy SKM .text Physical Frames

Base Size

Altered

Page Table Hierarchy Malicious Module’s Physical Frames

Virtual Address Space Physical Address Space

PC PC PC

slide-24
SLIDE 24

Secure Memory Access Control

  • What if attacker modifies SKM’s page mapping?
  • Solution: Regularly translate virt-to-phys address and verifies SKM .text hash

The DragonBeam Framework Page Table Hierarchy SKM .text Physical Frames

Base Size

Altered

Page Table Hierarchy Malicious Module’s Physical Frames

Virtual Address Space Physical Address Space

PC PC PC

slide-25
SLIDE 25

Heartbeat and Hashing

  • Heartbeat
  • Checks if SKM is alive
  • Only SKM can respond

The DragonBeam Framework

Time

SKM SecMan

Requests for HB Sends HB Receives HB

Timeout

slide-26
SLIDE 26

Heartbeat and Hashing

  • Heartbeat
  • Checks if SKM is alive
  • Only SKM can respond
  • SKM .text hashing
  • Checks if SKM’s code and page mapping have not been altered

The DragonBeam Framework

Time

SKM SecMan

Requests for HB Sends HB Receives HB

Timeout

slide-27
SLIDE 27

Random Check Intervals

  • To prevent TOCTTOU (Time Of Check To Time Of Use) attacks
  • Attacker cannot guess the pattern of checks

The DragonBeam Framework

Time

SKM SecMan

SKM OP SKM OP SKM OP HB HB HB HS HB HB HB SKM OP SKM OP SKM OP HS HB HS

SKM Operation (Send/Response/Analysis) Heartbeat (Request/Send/Receive) Hashing SKM .text

SKM OP HS

slide-28
SLIDE 28

Implementation

  • Leon3 processor on Xilinx

ZC702 FPGA

  • SPARC V8, soft-core
  • 83.3 MHz
  • 256 MB

The DragonBeam Framework Secure Memory Leon3 Core 1 (Monitored Core) Controller Leon3 Core 2 (Secure Core) MMU AHBRAM Instruction Pipeline

PC CTP

AHB2AXI Bridge Main Memory AHB2APB Bridge

Multiprocessor Interrupt Controller

MMU Instruction Pipeline

PC CTP

Unused

CTP Base Size

Access Control

AMBA AHB BUS IRQ IRQ SKM Linux

SecMan

Secure Data/Stack

slide-29
SLIDE 29

Implementation

The DragonBeam Framework Secure Memory Leon3 Core 1 (Monitored Core) Controller Leon3 Core 2 (Secure Core) MMU AHBRAM Instruction Pipeline

PC CTP

AHB2AXI Bridge Main Memory AHB2APB Bridge

Multiprocessor Interrupt Controller

MMU Instruction Pipeline

PC CTP

Unused

CTP Base Size

Access Control

AMBA AHB BUS IRQ IRQ SKM Linux

SecMan

Secure Data/Stack

Leon3 on-chip SRAM (128KB)

  • Leon3 processor on Xilinx

ZC702 FPGA

  • SPARC V8, soft-core
  • 83.3 MHz
  • 256 MB
slide-30
SLIDE 30

Implementation

The DragonBeam Framework Secure Memory Leon3 Core 1 (Monitored Core) Controller Leon3 Core 2 (Secure Core) MMU AHBRAM Instruction Pipeline

PC CTP

AHB2AXI Bridge Main Memory AHB2APB Bridge

Multiprocessor Interrupt Controller

MMU Instruction Pipeline

PC CTP

Unused

CTP Base Size

Access Control

AMBA AHB BUS IRQ IRQ SKM Linux

SecMan

Secure Data/Stack

PC and CTP for Secure Memory access control

  • Leon3 processor on Xilinx

ZC702 FPGA

  • SPARC V8, soft-core
  • 83.3 MHz
  • 256 MB
slide-31
SLIDE 31

Implementation

The DragonBeam Framework Secure Memory Leon3 Core 1 (Monitored Core) Controller Leon3 Core 2 (Secure Core) MMU AHBRAM Instruction Pipeline

PC CTP

AHB2AXI Bridge Main Memory AHB2APB Bridge

Multiprocessor Interrupt Controller

MMU Instruction Pipeline

PC CTP

Unused

CTP Base Size

Access Control

AMBA AHB BUS IRQ IRQ SKM Linux

SecMan

Secure Data/Stack

Unmodified Linux 3.8

  • Leon3 processor on Xilinx

ZC702 FPGA

  • SPARC V8, soft-core
  • 83.3 MHz
  • 256 MB
slide-32
SLIDE 32

Evaluation – Use Cases

1) System call table integrity check 2) Hidden module detection

The DragonBeam Framework

slide-33
SLIDE 33

Evaluation – Use Cases

1) System call table integrity check 2) Hidden module detection

The DragonBeam Framework

Module 1 Module 2 Module 4 Kernel Module List

Kernel Module Region (12MB)

Main Memory

slide-34
SLIDE 34

Evaluation – Use Cases

The DragonBeam Framework

Module 1 Module 2 Module 4 Kernel Module List

Kernel Module Region (12MB)

Main Memory Module 3 (Hidden) No matching module

1) System call table integrity check 2) Hidden module detection

slide-35
SLIDE 35

Evaluation – Use Cases

The DragonBeam Framework

Module 1 Module 2 Module 4 Kernel Module List

Kernel Module Region (12MB)

Main Memory Module 3 (Hidden) No matching module

Time SKM SecMan

Sends Command Traverses module list Finds orphan pages Receives Result

1) System call table integrity check 2) Hidden module detection

slide-36
SLIDE 36

Evaluation – Performance Overhead

  • SPEC Benchmarks on the monitored core

The DragonBeam Framework

Benchmark

bzip2 hmmer libquantum mcf sjeng

Average ratio of execution time to the case of No SKM

0.99 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08

Heartbeat (100 ms) SKM .text hashing (100 ms) System call table check (100 ms) Hidden module detection (100 ms)

slide-37
SLIDE 37

Evaluation – Performance Overhead

  • SPEC Benchmarks on the monitored core

The DragonBeam Framework

Benchmark

bzip2 hmmer libquantum mcf sjeng

Average ratio of execution time to the case of No SKM

0.99 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08

Heartbeat (100 ms) SKM .text hashing (100 ms) System call table check (100 ms) Hidden module detection (100 ms)

In-SKM Procedure

slide-38
SLIDE 38

Evaluation – Performance Overhead

  • SPEC Benchmarks on the monitored core

The DragonBeam Framework

Benchmark

bzip2 hmmer libquantum mcf sjeng

Average ratio of execution time to the case of No SKM

0.99 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08

Heartbeat (100 ms) SKM .text hashing (100 ms) System call table check (100 ms) Hidden module detection (100 ms)

Memory traffic interference

slide-39
SLIDE 39

Evaluation – Performance Overhead

  • SPEC Benchmarks on the monitored core

The DragonBeam Framework

Benchmark

bzip2 hmmer libquantum mcf sjeng

Average ratio of execution time to the case of No SKM

0.99 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08

Heartbeat (100 ms) SKM .text hashing (100 ms) System call table check (100 ms) Hidden module detection (100 ms) Random (random interval)

Random order Random interval: [0,1,…,199,200] ms Back-to-back with prob. of 5%

slide-40
SLIDE 40

Evaluation – Hardware Cost

The DragonBeam Framework Secure Memory Leon3 Core 1 (Monitored Core) Controller Leon3 Core 2 (Secure Core) MMU AHBRAM Instruction Pipeline

PC CTP

AHB2AXI Bridge Main Memory AHB2APB Bridge

Multiprocessor Interrupt Controller

MMU Instruction Pipeline

PC CTP

Unused

CTP Base Size

Access Control

AMBA AHB BUS IRQ IRQ SKM Linux

SecMan

Secure Data/Stack

Modified

slide-41
SLIDE 41

Evaluation – Hardware Cost

The DragonBeam Framework Secure Memory Leon3 Core 1 (Monitored Core) Controller Leon3 Core 2 (Secure Core) MMU AHBRAM Instruction Pipeline

PC CTP

AHB2AXI Bridge Main Memory AHB2APB Bridge

Multiprocessor Interrupt Controller

MMU Instruction Pipeline

PC CTP

Unused

CTP Base Size

Access Control

AMBA AHB BUS IRQ IRQ SKM Linux

SecMan

Secure Data/Stack

Modified

Resource Original W/ DragonBeam Registers 10258 10356 0.96% Look-up Tables 19482 19511 0.15%

slide-42
SLIDE 42

Extension to Multiple Monitored Cores

The DragonBeam Framework Secure Memory Leon3 Core 1 (Monitored Core 1) Controller Leon3 Core 4 (Secure Core) MMU Instruction Pipeline

PC CTP

MMU Instruction Pipeline

PC CTP

Unused

CTP Base Size

Access Control

SecMan

Secure Data/Stack

Leon3 Core 3 (Monitored Core 3) Leon3 Core 2 (Monitored Core 2) MMU Instruction Pipeline

PC CTP

MMU Instruction Pipeline

PC CTP

  • Extended to quad-core
  • Works only for SMP
  • Single SKM
slide-43
SLIDE 43

Extension to Multiple Monitored Cores

The DragonBeam Framework Secure Memory Leon3 Core 1 (Monitored Core 1) Controller Leon3 Core 4 (Secure Core) MMU Instruction Pipeline

PC CTP

MMU Instruction Pipeline

PC CTP

Unused

CTP Base Size

Access Control

SecMan

Secure Data/Stack

Leon3 Core 3 (Monitored Core 3) Leon3 Core 2 (Monitored Core 2) MMU Instruction Pipeline

PC CTP

MMU Instruction Pipeline

PC CTP

  • Extended to quad-core
  • Works only for SMP
  • Single SKM

PC1 CTP1

>= < =

Registered CTP Registered Base Registered Base + Size

=

ID(Secure Core)

Transaction Master ID

0/1 0/1 0/1 0/1

Monitored Cores Bus Interface

PCN-1

… …

Transaction Master ID

CTPN-1

PC Mux CTP Mux

Extension for N-1 monitored cores

slide-44
SLIDE 44

Extension to Multiple Monitored Cores

The DragonBeam Framework Secure Memory Leon3 Core 1 (Monitored Core 1) Controller Leon3 Core 4 (Secure Core) MMU Instruction Pipeline

PC CTP

MMU Instruction Pipeline

PC CTP

Unused

CTP Base Size

Access Control

SecMan

Secure Data/Stack

Leon3 Core 3 (Monitored Core 3) Leon3 Core 2 (Monitored Core 2) MMU Instruction Pipeline

PC CTP

MMU Instruction Pipeline

PC CTP

  • Extended to quad-core
  • Works only for SMP
  • Single SKM

Resource Original W/ DragonBeam Dual Core Registers 10258 10356 0.96% Look-up Tables 19482 19511 0.15% Quad Core Registers 18932 19029 0.51% Look-up Tables 37777 37835 0.15%

slide-45
SLIDE 45

Conclusion

  • DragonBeam Framework
  • HW/SW framework for trusted security monitoring
  • Bootstrap trust into SW layer from trusted HW
  • Multicore-based
  • Expanded observability due to in-place monitoring
  • Secure “Kernel Module”
  • Allows for customized security modules to system developers

The DragonBeam Framework Secure Memory Monitored Core Secure Core

OS

Applicati

  • n

Applicati

  • n

Application

SKM

Command/Response

SecMan

slide-46
SLIDE 46

The DragonBeam Framework

Thank you