Securing distributed systems with information flow control
Nickolai Zeldovich Silas Boyd-Wickizer David Mazières
Securing distributed systems with information flow control - - PowerPoint PPT Presentation
Securing distributed systems with information flow control Nickolai Zeldovich Silas Boyd-Wickizer David Mazires Traditional web applications: lots of trusted (yellow) code HTTP User's Application User's browser front Database User's
Nickolai Zeldovich Silas Boyd-Wickizer David Mazières
Application code Database
User's browser
HTTP front end
User's browser User's browser
Application code Database
User's browser
HTTP front end
User's browser User's browser
– PayMaxx app code exposed 100,000 users' SSNs
data secure even if application is malicious
– Track flow of user's data through system – Only send user's data to that user's browser – No need to audit/understand application code!
data secure even if application is malicious
– Track flow of user's data through system – Only send user's data to that user's browser – No need to audit/understand application code!
– Web applications need multiple machines for scale
– Review of information flow control (IFC) in an OS – Challenges in distributed IFC and our solution – Apps: web server, incremental deployment, ...
– Can control information flow in distributed system – Key idea: self-certifying category names – Enforce security of scalable web server in 6,000 lines
File A Process
Label Label
File B
Label
File A Process
Label Label
File B
Label
Blue data can flow only to other blue objects Color is category of data (e.g. my files)
File A Process
Label Label
File B
Label
X X
Blue data can flow only to other blue objects Color is category of data (e.g. my files)
File A Process
Label Label
File B
Label
X
Color is category of data (e.g. my files)
X
Blue data can flow only to other blue objects
File A Process
Label Label
File B
Label
Owns blue data, can remove color (e.g. encrypt) Color is category of data (e.g. my files) Blue data can flow only to other blue objects
File A Process
Label Label
File B
Label
– Gets ownership of that category ( ) – Uses category in labels to control information flow – Can grant ownership to others
Application code Database
User's browser
HTTP front end
User's browser User's browser
User's browser
HTTP front end
User's browser User's browser
Database Application code
Application code
User's browser
HTTP front end
User's browser User's browser
Application code Application code Database
Application code
User's browser
HTTP front end
User's browser User's browser
Application code Application code
X X
Database
Application code
User's browser
HTTP front end
User's browser User's browser
Application code Application code
X X
Database
Application code
User's browser
HTTP front end
User's browser User's browser
Application code Application code
X X
Database
Application code
X
User's browser
HTTP front end
User's browser User's browser
Application code Application code
X X X X X X X
Database
HTTP front-end Application server httpd App code
– (Not the usual meaning of decentralized IFC, or DIFC)
kernel that can make all decisions ?
Data server Database
?
HTTP front-end Application server httpd Message App code
Each machine uses OS to enforce labels locally
Data server Message Database
Attacker's machine
X
HTTP front-end Application server httpd Message App code Data server Message Database
user's data (e.g. messages labeled blue)
Attacker's machine
X
HTTP front-end Application server httpd Message App code Data server Message Database
HTTP front-end Application server httpd Message App code Data server Message Database Exporter Exporter Exporter
the app server's exporter to contain the app code
Attacker's machine
X
exp_send(dest_host, dest_mbox, msg, label)
– Exporter provides interface to send datagrams – Message should only be sent if every category
in label trusts the machine dest_host
– How does the exporter check for this trust?
Exporter Process
(secret bit = 1)
Category owner
Exporter Process
(secret bit = 1) exp_send(host_x, msg)
Category owner Host X
? ?
Exporter Process
(secret bit = 1) exp_send(host_x, msg)
Category owner
Control msg: “can I send to host_x?”
Host X
? ?
Exporter Process
(secret bit = 1)
Category owner Attacker's host
X
Host X
Exporter Process
(secret bit = 1)
Category owner Attacker's host
X
Host X
Exporter Process
(secret bit = 1)
Category owner Attacker's host
X
exp_send(host_x, msg)
Host X
? ?
Exporter Process
(secret bit = 1)
Category owner Attacker's host
X
exp_send(host_x, msg)
Host X
? ?
Control msg: “can I send to host_x?” Control msg: “can I send to host_x?”
Exporter Process
(secret bit = 1) host_x host_y
Exporter Process
(secret bit = 1) exp_send(host_x, msg) host_x host_y
Exporter Process
(secret bit = 1) host_x
Colluding Process Attacker's host Y
X
Exporter Process
(secret bit = 1) host_x
Colluding Process Attacker's host Y
X
exp_trust( , host_y) host_y Depends on value of the secret bit
Exporter Process
(secret bit = 1) host_x
Colluding Process Attacker's host Y
X
Depends on value of the secret bit host_y exp_send(host_y, msg) Depends on behavior of malicious process Depends on value of the secret bit exp_trust( , host_y)
– Not practical
– Allow trading off performance to mitigate
covert channels without changing the API
signed by that category's private key
exp_send(dest_host, dest_mbox, msg, label, certs) Caller-supplied
exp_send(dest_host, dest_mbox, msg, label, certs) =
Caller-supplied Mapping
exp_send(dest_host, dest_mbox, msg, label, certs)
Can send to host X
=
Caller-supplied Mapping Certificate
No covert channels to determine trust:
➔ No external
communication
➔ No shared state
stateless – just verify caller-supplied certificates
– Stateless exporter design avoids covert channels
– Also allows granting ownership (stars) across network – By design, only depends on caller-supplied args!
Exporter: datagrams via exp_send()
RPC library Exporter: datagrams via exp_send()
datagrams, much like RPC over UDP
Resource allocation Exporter: datagrams via exp_send() RPC library
(manages access to CPU, memory)
Resource allocation Exporter: datagrams via exp_send() RPC library
previously-allocated resources Program invocation
Application
Resource allocation Exporter: datagrams via exp_send() RPC library Program invocation
New machine B Existing machine A Resources root's shell Exporter A Exporter B
=
using admin's privileges on existing machine
New machine B Existing machine A Resources root's shell Exporter A Exporter B
=
(1) Create mapping on new machine to bridge its protection domain with existing machine's (2) Write down new machine's public key =
(1) Mapping (2) B's public key
New machine B Existing machine A Resources root's shell Exporter A Exporter B
=
category to start running code on new machine =
Message
Process
User's browser
User data User data
Application
(PDF: 600k LoC)
User data listener OpenSSL
(340k LoC)
http RSA key
User's browser User's browser
Application
(PDF: 600k LoC)
Application
(PDF: 600k LoC)
User data User data
Application
(PDF: 600k LoC)
User data listener OpenSSL
(340k LoC)
http RSA key
User's browser User's browser User's browser
httpd httpd User's auth agent User's auth agent Application
(PDF: 600k LoC)
Application
(PDF: 600k LoC)
User data User data
Application
(PDF: 600k LoC)
User data listener OpenSSL
(340k LoC)
http RSA key User's auth agent
Password
User's browser User's browser User's browser
inetd OpenSSL
(340k LoC)
OpenSSL
(340k LoC)
httpd httpd User's auth agent User's auth agent Application
(PDF: 600k LoC)
Application
(PDF: 600k LoC)
User data User data
Application
(PDF: 600k LoC)
User data inetd OpenSSL
(340k LoC)
http RSA key User's auth agent
Password
User's browser User's browser User's browser
listener
User's browser User's browser User's browser
SSL SSL httpd httpd Application
(PDF: 600k LoC)
Application
(PDF: 600k LoC)
User data User data
Application
(PDF: 600k LoC)
User data SSL http RSA key RSAd
4600 lines 340k lines
inetd inetd listener User's auth agent User's auth agent User's auth agent
Password
SSL SSL httpd httpd User's auth agent User's auth agent Application
(PDF: 600k LoC)
Application
(PDF: 600k LoC)
User data User data
Application
(PDF: 600k LoC)
User data SSL http RSA key User's auth agent
Password
RSAd
310 lines 300 lines 360 lines
User's browser User's browser User's browser
340k lines 4600 lines
inetd inetd listener
SSL SSL httpd httpd User's auth agent User's auth agent Application
(PDF: 600k LoC)
Application
(PDF: 600k LoC)
User data User data
Application
(PDF: 600k LoC)
User data SSL http RSA key User's auth agent
Password
RSAd
310 lines 300 lines 360 lines
User's browser User's browser User's browser
340k lines 4600 lines
inetd inetd listener
while minimizing trusted code
New server B Existing server A Resources root's shell key replicator RSA key
(blue star) and name (public key) of new server
New server B Existing server A Resources root's shell key replicator RSA key Replicate to B
RSAd (using program invocation RPC service)
New server B Existing server A Resources root's shell key replicator RSA key RSA key RSAd
access to RSA key itself
New server B Existing server A Resources root's shell key replicator RSA key RSA key RSAd
SSL SSL httpd httpd User's auth agent User's auth agent Application
(PDF: 600k LoC)
Application
(PDF: 600k LoC)
User data User data Application
(PDF: 600k LoC)
User data SSL http RSA key User's auth agent RSAd
310 lines 300 lines 340k lines 4600 lines Password
inetd inetd listener
HiStar Linux Flume
Return value,
Perl code, input data
HiStar machine Linux machine perl
Exporter Exporter Library
Apache
third-party compute clusters
– Limitation: had to use web site's trusted servers – Cannot mix Facebook+MySpace: no common server
– Secure mash-ups can combine data from many sites – No need for fully-trusted common application platform
security in decentralized distributed systems
stateless checks no implicit shared state avoids covert channels in design