Top Banner
20

1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

Mar 26, 2015

Download

Documents

Brianna Manning
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

11

Finding the Dark Cloud:

Static Analysis ofCloud Configurations

Shriram KrishnamurthiBrown University

Page 2: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

2

A Cloud of Policies

Application Author:end-user access-control, …

Datacenter Administrator:firewalls, hypervisor Chinese Walls,

Cloud-Based App Builder

Page 3: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

3

Cloud-Based App Builder

“Need isolation at serverand network level”

—Shenoy

Page 4: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

4

… and other dens of iniquity

Page 5: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

5

Page 6: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

6

Page 7: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

7

int dmz dmz ext

DMZ

employees

contractors

manager

Page 8: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

8

blacklistblacklist

telnet

wwwtcp

smtptcp

wwwtcp

Page 9: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

9

ACL for External firewall:1: DENY if: ifc=fw1_dmz, ipdest in blacklist2: DENY if: ifc=fw1_ext, ipsrc in blacklist3: DENY if: ifc=fw1_dmz, portdest=telnet4: ACCEPT if: ifc=fw1_ext, ipdest=mailserver,

portdest=smtp, proto=tcp5: ACCEPT if: ifc=fw1_ext, ipdest=webserver,

portdest=http, proto=tcp6: ACCEPT if: ifc=fw1_dmz, ipdest=any outside,

portdest=http, proto=tcp, ipsrc=manager7: DROP otherwise

Page 10: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

10

smtp

tcpwww

tcp

fw2_staticipsrc

smtptcp

Page 11: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

11

Problem

The manager can’t connect to the

Web.

Page 12: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

1212

Policy Analysis

Using Margrave

Page 13: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

13

? When can a connection from the manager’s PC be denied if it’s to port 80 (www) over TCP to any machine?

Page 14: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

14

p . p.dstprt = www p.proto = TCP

p.ipdest outIPs p.ipsrc = managerInt.ACL denies p p’ . Int.NAT translates p to p’

p’.dstprt = p.dstprt p’.proto = p.proto p’.ipdest = p.ipdest Ext.ACL denies p’

Page 15: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

15

p.entry-interface = IntFW.intp.ipsrc = managerp.ipdest in outIPsp.srcprt = any p.dstprt = wwwp.proto = tcpp’ = p except

p’.entry-interface = ExtFW.dmz p’.ipsrc = fw2_static

Page 16: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

16

? When can a connection from the manager’s PC be denied if it’s to port 80 (www) over TCP to any machine?

Always.

Page 17: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

17

? …same query…,but with rule-tracing enabled.

…same response…, with Int’s ACL accepts the packet via rule 4. Int’s NAT applies to the packet. Int’s ACL denies the post-NAT packet

via rule 7.

Page 18: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

18

wwwtcp

fw2_staticipsrc

wwwtcp

wwwtcp

Page 19: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

19

ACL for External firewall:1: DENY if: ifc=fw1_dmz, ipdest in blacklist2: DENY if: ifc=fw1_ext, ipsrc in blacklist3: DENY if: ifc=fw1_dmz, portdest=telnet4: ACCEPT if: ifc=fw1_ext, ipdest=mailserver,

portdest=smtp, proto=tcp5: ACCEPT if: ifc=fw1_ext, ipdest=webserver,

portdest=http, proto=tcp6: ACCEPT if: ifc=fw1_dmz, ipdest=any outside,

portdest=http, proto=tcp, ipsrc=managerfw2_static

7: DROP otherwise

Page 20: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

20

P⊦Does

thepolicy

satisfyits

property?

Page 21: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

2121

P⊦“They tend to think

in terms of procedures,

rather than goals”

—Anderson

Can people state them?Are they good enough?

Page 22: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

2222

P- P’

Help people with policy evolution:

study what has changed

Page 23: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

23

p . Int.ACL accepts p p’ . Int.NAT translates p to p’

p’.dstprt = p.dstprt p’.proto = p.proto p’.ipdest = p.ipdest ((Ext.ACL denies p’ Ext.ACLNew accepts p’) (Ext.ACL accepts p’ Ext.ACLNew denies p’))

Page 24: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

24

Presenting “Change”

p.entry-interface = fw2_int

p.ipsrc = employeep.ipdest in outIPsp.srcprt = anyp.dstprt = wwwp.protocol = tcp

p.entry-interface = fw2_int

p.ipsrc = contractorp.ipdest in outIPsp.srcprt = anyp.dstprt = wwwp.protocol = tcp

packets

Deny to

Permit

Permit to Deny

A function mapping

requests tochanges in outcome

Page 25: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

25

p.entry-interface = fw2_intp.ipsrc = managerp.ipdest in outIPsp.srcprt = anyp.dstprt = wwwp.protocol = tcp

p.entry-interface = fw2_intp.ipsrc = employeep.ipdest in outIPsp.srcprt = anyp.dstprt = wwwp.protocol = tcp

p.entry-interface = fw2_intp.ipsrc = contractorp.ipdest in outIPsp.srcprt = anyp.dstprt = wwwp.protocol = tcp

Denied Permit

Page 26: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

26

Change as a First-Class Entity

• Restrict changes to External FirewallView

• Which machines lost privileges?Query

• Confirm no machines gained privileges

Verification

Page 27: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

2727

Configuration checking

Upgrade checking Finding “hotspots”

“What if” questions

Mutationtesting

?

Refactoring testing

Page 28: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

28

Scope of Margrave

• Most of XACML 1.0 and 2.0• Cisco IOS:

– ACL: standard and extended– NAT: static; dynamic: ACL-based, map-based– routing: static and policy-based– limited: BGP announcements and VPN

endpoints

• Amazon Access Policy Language (in SQS)• Hypervisor, based on sHype (IBM)• A Datalog-based intermediate language

Page 29: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

29

Performance

Production firewall (1108 rules):Change-impact:

Time: 2.5 secSpace: baseline +

83 MbList all superfluous rules:

Time: 10 minSpace: baseline +

467 Mb

Production XACML policy:Verification:

Time: <10 millisecSpace: baseline +

316 KbChange-impact:

Time: 2 millisecSpace: baseline +

16 Kb

Page 30: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

30

Under the Hood

Translation into first-order logicPropositionalize to BDDs and SATBernays-Schönfinkel-Ramsey class

Extended to multi-sorted logicSome small theories for networkingAggregation to compress i. and o.Rule-tracing EDBs and IDBs in models

Page 31: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

31

Upcoming Work

• More sophisticated modeling of state

• Visualization of output• Generating constraints on

components• Suggesting repairs• Handling numerics

Page 32: 1 1 Finding the Dark Cloud: Static Analysis of Cloud Configurations Shriram Krishnamurthi Brown University.

32

• Dan Dougherty [WPI]• Kathi Fisler [WPI]• Tim Nelson [WPI]• Alums:

– Leo Meyerovich [Brown u.g. Berkeley]– Michael Tschantz [Brown u.g. CMU]

http://www.margrave-tool.org/