Towards High-Assurance Hypervisors - PowerPoint PPT Presentation

About This Presentation
Title:

Towards High-Assurance Hypervisors

Description:

Hardware State. Mode = {Kernel, User} Program Counter (IP) Physical. Memory. Device. Exclusion ... Let property P = (Mode = K IP = KC) Verify (Model M, State S, ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 24
Provided by: csC76
Learn more at: http://www.cs.cmu.edu
Category:

less

Transcript and Presenter's Notes

Title: Towards High-Assurance Hypervisors


1
Towards High-Assurance Hypervisors
  • Jason Franklin
  • Joint with Anupam Datta, Sagar Chaki, Ning Qu,
    Arvind Seshadri

2
Overview
  • Goal Develop techniques to reason about
    assurance level of secure systems
  • Security mechanisms include
  • Memory protection and cryptographic protocols
  • Security properties include code or data
    integrity
  • Safety properties
  • Examples OSes, hypervisors, and VMMs

3
Analysis of Secure Systems
  • Design level analysis
  • Pros Before implementation of possibly insecure
    design
  • Cons May miss attacks in implementation
  • Techniques
  • Logics and model checking
  • Implementation level analysis
  • Pros Source code is closer to what is actually
    run
  • Cons Much more complicated
  • Techniques
  • Software model checking

4
Hypervisor-Protected Systems
Hypervisor-Protected System Architecture

App.
App.
Protected OS
Hardware
5
Hypervisor Security Hypothesis
  • Claim Hypervisors are easier to secure than
    traditional operating systems for two reasons
  • Hypervisors can be written in few lines of code
  • Theyre small.
  • Hypervisors expose a narrow interface
  • Theyre simple.
  • Lets test this hypothesis

6
Case Study SecVisor Hypervisor
  • SecVisor security hypervisor (3K loc, 2 calls)
  • Only approved code executes with kernel privilege

7
Outline
  • We model and analyze SecVisors design
  • Find and repair vulnerabilities
  • Verify security of repaired design
  • Extend verification to arbitrarily large model

8
How SecVisor Works
9
Modeling State in Murphi
  • hardware_platform_t record
  • phy_mem phy_mem_t
  • mode bit
  • IP word
  • DEV dev_t
  • end

State 1
mode K IP KC
10
Modeling Transitions in Murphi
  • rule Kernel Exit
  • hw.mode KERNEL_MODE gt setIP(USER_MEM)
  • end
  • rule Kernel Entry
  • hw.mode USER_MODE gt secvisor_kernel_entry()
  • end

Kernel Exit
State 1
State 2
mode K IP KC
mode K IP UM
Kernel Entry
11
SecVisor Environment
Kernel
Key
Adv
MMU
Phy. Mem.
Code
KPT
SPT
Data
IOMMU
Adversary
SecVisor
DEV
12
Operational Behavior
Kernel
Write(0x00, hello)
Write(0x01, hello)
0x01 VA_to_HPA(0x00)
Phy. Mem.
KPT
RW 01
X 10
RW 00
hello
RW 01
X 10
RW 00
SPT
MMU
SecVisor
Synch(KPT, SPT)
13
Verification
  • Specify security property as invariant (holds in
    all states)
  • Let property P (Mode K ? IP KC)
  • Verify (Model M, State S, Property P)
  • Check property in state S
  • If property does not hold, then print
    counter-example and exit
  • If (more neighbors exist)
  • Verify (M, Neighbors(S), P)
  • else return VERIFIED

Attacker Step
State 1
State 2
mode K IP KC
mode K IP UM
14
Results of Verification
  • Initial verification failed
  • Counterexamples identified two vulnerabilities
  • Writable virtual alias attack
  • Approved page remapping attack

MMU
Write (A, mal.code)
Kernel
Mal. Code
Phy. Mem
Adv
SecVisor
KPT
SPT
W, A-gtKC
Synch(KPT, SPT)
15
Successful Verification
  • After adding checks in synchronization code,
    verification succeeded
  • No property violations found in small models

Model Size States Transitions Time Memory Result
3 PTEs, 3 Mem. 55,000 2,000,000 2.52 Sec. 8MB Success
4 PTEs, 3 Mem. 1,700,000 88,000,000 5.75 Mins. 256MB Success
gt4PTE, gt3 Mem. ? ? ? ? Unknown
16
Limitations of Small Models
  • We ran out of memory after 3 PTEs and 3 memory
    pages
  • Memory requirements grow exponentially (state
    explosion)
  • Do attacks exist when system has many more PTEs
    and memory pages?
  • Murphi cant check realistically sized machine
    models
  • E.g., 220 memory pages and 220 PTEs in both KPT
    and SPT
  • Even if it could, what if attacker has 220 1?

17
To infinity and beyond! (sorta)
  • We prove SecVisor is secure with an arbitrarily
    large but finite number of PTEs and physical
    memory pages
  • Lets look at SecVisor from different perspective

18
Translation to Small Model
  • Translate functional model to parameterized model
  • Mem. pages and PTEs become duplicated homogeneous
    processes
  • Prove template model is reducible to small model

Functional Model
Kernel
KPT
PTE
PTE

PTE
19
Extending Small World Verification
  • Small World Theorem If security property P is
    violated in process model with arbitrarily large
    (but finite) number of processes then it will be
    violated in small model.
  • It is sufficient to model check only small model
    (completeness)

Process Model
Small Model
Functional Model
KPT
PTE
Translate
Reduce to


PTE
Successful Verification
Successful Verification
Successful Verification
20
Automatic Small World Verification
  • Process of small world verification
  • Translation to process model is manual
  • Application of small world theorem is manual
  • Inspection of every state transition
  • Proving simulation theorem is manual
  • Currently automating small world verification in
    Murphi
  • Verification will return both VERIFIED and proof
    of S.W. theorem

Functional Model
Process Model
Small Model

KPT
Translate
Reduce to
PTE
Successful Verification
Successful Verification
Successful Verification
21
Conclusion
  • We employed model checking to increase assurance
    level of SecVisor hypervisor
  • Found and repaired vulnerabilities in SecVisors
    design and implementation
  • Verified repaired design model up to 3 PTEs
  • Extended verification result to large model
  • Using small world theorem and simulation
  • Currently automating application of small world
    theorem

22
How is verification for security different?
  • Limitations of related work in verification
  • No adversary
  • Focus on checking correctness of security
    critical code rather than security (i.e.,
    correctness in presence of adversary)
  • Correct system components do not imply secure
    system

New State
Adversary Action
Kernel Exit
State 1
State 2
mode K IP KC
mode U IP UM
Kernel Entry
23
References
  • SecVisor Seshadri et al. SecVisor A Tiny
    Hypervisor to Provide Lifetime Kernel Code
    Integrity, SOSP 07.
  • TCG http//www.trustedcomputing.com
Write a Comment
User Comments (0)
About PowerShow.com