Guardat: Enforcing data policies at the storage layer Anjo Vahldiek-Oberwagner 1, Eslam Elnikety 1,...

Preview:

Citation preview

Guardat: Enforcing data policies at the storage layer

Anjo Vahldiek-Oberwagner1, Eslam Elnikety1, Aastha Mehta1, Deepak Garg1, Peter Druschel1,

Rodrigo Rodrigues2, Johannes Gehrke3,4, Ansley Post5

1MPI-SWS, 2NOVA LINCS/Nova University of Lisbon, 3Microsoft, 4Cornell, 5Google

2

Web attacks and leaks

3

httpd.conf .htaccess

Web Server

Content

Web Server State:

Operating SystemFile System users groups

Threat 1: Unauthorized Access

Clients Web Server Host

App

Unauthorized access due to configuration errors, bugs, attacks.

4

Web Server

App

Threat 2: State Corruption

Clients

Content

Web Server State:

Web Server Host

Operating SystemFile System

.htaccess

users groups

State corruption due to configuration errors, bugs, attacks.

httpd.conf

5

Threat 3: Trojans & log manipulation

Clients Web Server Host

Web Server

App

Logs Executables

Web Server State:

Operating SystemFile System

Trojans & log manipulation due to attacks.

6

Web Server

Content

Web Server State:

Operating SystemFile System

Threat 4: Unaccounted Provider Access

Clients Web Server Host

App

Providers bypass application access control protections.

Provider employee

7

• Confidentiality and integrity depend on large, fast evolving code base.

• Access control lists and access checks spread across system.

• Recovering corrupt persistent state is difficult.

Why is mitigation difficult?

8

Per file policyFile attestation

GuardatStorageLayer

Stakeholder: User, provider, developer, privacy officer

Guardat: Storage Layer Compliance

Trusted Controller

Application

OSFile System

UNTR

USTE

D

9

Outline

Declarative Policies

Enforcement File Attestation

GuardatTransaction

Implementation & Evaluation

Design Principles

1

2

10

Policy language in a nutshell

Goals::• High level policy• Concise

• Easy to audit • Efficient enforcement

permission:- Boolean expression over predicates

read :- When to read a fileupdate :- When to update the filesetPolicy :- When to change policydestroy :- When to reuse the name

11

Protecting files from unauthorized access

read :- sessionIs(Alice)update :- …setPolicy :- sessionIs(Alice)destroy :- sessionIs(Alice)

Assumption: Integrity of Alice’s key is maintainedGuarantee: Protected files may only be read with an authenticated

session.

Threat: Unauthorized access due to configuration error, bug or attack.

Private files:

12

Protecting files from corruption

read :- …update :- sessionIs(Alice)setPolicy :- …destroy :- …

Assumption: Integrity of Alice’s key is maintained.Guarantee: Protected files may only be updated within an authenticated

session.

Threat: State corruption due to configuration error, bug or attack.

Private files:

13

Protecting executables

read :- TRUEupdate :- fileNameIs(F) fileNewLenIs(L) ∧ (0, L) willHaveHash Nh ∧ keyIs(K, “Vendor”) ∧ ∧ K signs okHash(F, N, Nh) setPolicy:- FALSE

Assumption: Integrity of the vendor’s key is maintained.Guarantee: Protected files cannot be overwritten except with content signed by the vendor.

Threat: Attack installing a trojan.

Signed updates-only executables:

14

Protecting log files from manipulation

read :- TRUEupdate :- [ fileCurrLenIs(Lc) fileNewLenIs(Ln) Ln ≥ Lc ∧ ∧ txUpdatedExAre(M)∧ listsAreDisjoint(M, [0, Lc])]∧ [sessionIs(Admin)]∨setPolicy :- FALSEdestroy :- FALSE

Assumption: Administrator key integrityGuarantee: Protected files cannot be overwritten, only appended.

Threat: Attack manipulating logs. Append-only log files:

15

Protecting content from unaccounted provider access

read: - ((“profil”, SEQCNTLOC, _) says seqcnt(currseq)) ^ ((“acclog”, _, _) says read(currseq, _, offset, length)) ^ AccessOffIs(offset) ^ AccessLenIs(length)update:- ((“profil”, SEQCNTLOC, _) says seqcnt(currseq)) ^ ((“profil”, SEQCNTLOC, _) willSay seqcnt(nextseq)) ^ EQ(currseq + 1, nextseq) ^ ((“acclog”, gennb, _, _) says write(nextseq, _, newhash, offsetlist)) ^ ((offsetlist) willHaveHash newhash) ^ TxUpdateLocAre(offsetlist)setpolicy: FALSEdestroy: FALSE

Read :- TRUEupdate: [ FileCurrExAre(oe) ̂ FileNewExAre(ne) ̂ isPrefix(oe, ne) ̂ ((“acclog”, neo, _) willSay _(nseq, _. _. _)) ̂ ((“acclog”, neo - READENTRYLENGTH, _) says _(nseq-1, _, _, _)) ̂ FileCurrLenIs(currlen) ̂ LT(currlen, neo)] [FileCurrExAre(oe) ̂ FileNewExAre(ne) ̂ ∨ isPrefix(oe, ne) ̂ ((“acclog”, neo, _) willSays _(nseq, _. _. _)) ̂ ((“acclog”, gennb, neo - WRITEENTRYLENGTH, _) says _(nseq-1, _, _, _)) ̂ FileCurrLenIs(currlen) ̂ LT(currlen, neo) ] ∨ [ ((“acclog”, neo, nel) willSay write(nseq, _, _, _)) ̂ ((“acclog”,,neo, nel) says write(nseq, _, _, _) ̂ ((“profil”, gennb, SEQCNTLOC, _) says seqcnt(currseq)) ̂ LT(currseq, nseq) ̂ TxUpdateLocAre((neo, nel))]setpolicy:- FALSEdestroy:- FALSE

Assumption: Auditor key integrityGuarantee: Protected files cannot be accessed without corresponding log entry in the access log.

Threat: Provider accesses are not accounted for.

Private files accounting for provider access:

Log file with log entry check and append-only:

16

Outline

Declarative Policies

Enforcement File Attestation

GuardatTransaction

Implementation & Evaluation

Design Principles

1

2

17

Storage Layer Enforcement

Web Server

Host

App

Operating SystemFile System

VMM

Library

OS abstractionFile System

Virtual device

Storage controller Decrease risk of circumvention

Storage Layer

DiskDiskDisk

18

Storage Layer Enforcement

Web Server

Host

App

Operating SystemFile System

VMM

Physically protected Machine Room

NetworkUN

TRUS

TED

UNTR

USTE

D

Storage Area Network Server

DiskDiskDiskDiskDiskDisk

19

Outline

Declarative Policies

Enforcement File Attestation

GuardatTransaction

Implementation & Evaluation

Design Principles

1

2

20

Per file policy

GuardatStorageLayer

Trusted Controller

Data Disk

Attests:• File name• Policy• State• Content

NVM

Application

OSFile SystemUN

TRUS

TED

File Attestation: Bridging gap between file and block level enforcement

Stakeholder: User, provider, developer, policy officer

Metadata:

21

Outline

Declarative Policies

Enforcement File Attestation

GuardatTransaction

Implementation & Evaluation

Design Principles

1

2

22

• Atomic update of file• Bundle multiple accesses• Delays evaluation to commit operation• Transaction caches

Introducing Guardat Transactions

1

2

23

GuardatDevice

Trusted ControllerTransaction cache

Guardat Transaction by Example

Application

OSFile System

Metadata:

UNTR

USTE

D

N#

N#

N#

Shifting burden of proving complex policy compliance to untrusted code keeping policies concise and policy evaluation efficient.

Demonstrate policy compliance:1. Download binary + certificate2. Begin transaction tx (+ certificate)3. Write new binary4. Commit transaction tx`

24

Outline

Declarative Policies

Enforcement File Attestation

GuardatTransaction

Implementation & Evaluation

Design Principles

1

2

25

ImplementationAlternatives:1. Hybrid Disk/RAID controller2. Microcontroller on SCSI/SATA adapter 3. VMM4. Storage area Network (SAN)Trusted controller in iSCSI Enterprise Target (IET) server

Guardat IETserver

Trusted Controller(~ 20,000 LoC)

Metadata(SSD)

Data Disk(HDD/SSD)

Network

SSD Throughput overhead: < 2%• 3.8 Million files• 40,000 policies

Seq. read Seq. write0

100200300400500600

iSCSIGuardat

Access type

Throughput in MB/S

Better

512B Access LatencyHDD latency overhead: < 1%

SSD latency overhead

Random Sequential Random Sequential0

0.10.20.3

iSCSIGuardat

Random Sequential Random Sequential0.1

1

10

iSCSIGuardat

Latency in ms (log)

Latency in ms

Reads Writes

Reads Writes

Better

Better

28

Protection:• Append-only logs• Vendor-only update

executables• Owner-only update

to content pages

Scenario:• Modified Apache (added 51 Lines of code)• Hosting 220 GB English Wikipedia (~15M files)• Replay an hourly access distribution of Wikipedia

Protected Apache Web server

600

50100150200250

iSCSIGuardat

Concurrent HTTP Clients

Requests/s

2% overhead at peak throughput.

Better

29

Conclusions• Guardat guarantees confidentiality and integrity of

persistent data and state of a system.

• No need to trust higher software layers.

• Guardat protects computer systems from unauthorized access, trojans and log manipulations.

• Efficient prototype implementation in SAN server.

30

Anjo Vahldiek-Oberwagnervahldiek@mpi-sws.org

Guardat: Enforcing data policies at the storage layer

Eslam Elnikety

Aastha Mehta

Peter Druschel

Rodrigo Rodrigues

31

Backup slides

Backup slides

32

Guardat: Related work• TCG storage work group spec [2012]

– Architecture for sessions, access control policies– Concrete design, evaluation left to vendors– No object attestation

• TC: Semantic attestation [Haldar 2004], Excalibur [Santos 2012], Pasture [Kotla 2012]

• Integrity/confidentiality: self-encrypting disks, capability NAS [Aguilera 2003], type-safe disks [Sivathanu 2006], Venti [Quinlan 2002], S4 [Strunk 2000], NetApp SnapVault, PCFS[Garg 2010], PFS[Walsh 2012]

• Extended disk functionality: hybrid disks, object-based storage [Mesnier 2003], active disks [Riedel 2001], semantically smart disks [Sivathanu 2003], differentiated storage [Mesnier 2011]

• VMM/OS data protection: Overshadow [Chen 2008], InkTag [Hofmann 2013], Nexus [Sirer 2011], DCAC [Xu 2014]

33

Related work: Trusted Computing

Mostly complementary; can be combined, e.g.,• Remotely attested external verifier• Tamper-resident persistent storage

Property Trusted computing Guardat

Root of trust TPM TGCAuthenticates Motherboard Guardat device

Certifies HW/SW configuration(remote attestation)

Object state + policy(object attestation)

Storage propertyprovided

Confidentiality +Read integrity

Confidentiality + Write integrity

Properties expressed in Trusted software Policy languageTCB TPM + trusted SW TGC (narrow API)Persistent secure state NVRAM Entire storage device

34

Threats to persistent data

• Storage media failure (deterioration, obsolescence)• Natural disasters and physical attack• Operator error and negligence• Software/hardware bugs• Cyber attack and sabotage

Problem is real: Among most frequent causes of loss• Human error is (close) second to device failure• Software errors + viruses third

This talk

35

Discussion: Enforcement layer

36

Legacy FS

37

Transaction API

38

Stateful policies

Recommended