the simplified mandatory access control kernel

35
The Simplified Mandatory Access Control Kernel Casey Schaufler January 2008

Upload: vanig

Post on 01-Feb-2016

39 views

Category:

Documents


0 download

DESCRIPTION

The Simplified Mandatory Access Control Kernel. Casey Schaufler January 2008. Casey Schaufler. Ported Unix Version 6 to 32bit Started Development of TSOL Architect of Trusted Irix B1, CAPP, LSPP evaluated US NSA’s Trusix Group POSIX P1003.1e/2c TSIG. Today’s Talk. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: The Simplified Mandatory Access Control Kernel

The Simplified Mandatory Access Control Kernel

Casey Schaufler

January 2008

Page 2: The Simplified Mandatory Access Control Kernel

Casey Schaufler

• Ported Unix Version 6 to 32bit

• Started Development of TSOL

• Architect of Trusted Irix– B1, CAPP, LSPP evaluated

• US NSA’s Trusix Group

• POSIX P1003.1e/2c

• TSIG

Page 3: The Simplified Mandatory Access Control Kernel

Today’s Talk

• Mandatory Access Control (MAC)

• What MAC is good for

• How Smack implements MAC

• What Smack is good for

• Details of Smack

Page 4: The Simplified Mandatory Access Control Kernel

Mandatory Access Control

• Concepts– Subject is an active entity– Object is a passive entity– Access is an operation preformed on an

object by a subject

Page 5: The Simplified Mandatory Access Control Kernel

Mandatory Access Control

• Principles– User has no say in it– Based on system controlled attributes

Page 6: The Simplified Mandatory Access Control Kernel

Mandatory Access Control

• Jargon– MAC– Label– Bell & LaPadula– Multilevel Security– CIPSO

Page 7: The Simplified Mandatory Access Control Kernel

Mandatory Access Control

Page 8: The Simplified Mandatory Access Control Kernel

MAC Implementations

• Bell & LaPadula Sensitivity– Multics, Unix

• Type Enforcement– SELinux

• Pathname Controls– AppArmor, TOMOYO

Page 9: The Simplified Mandatory Access Control Kernel

Uses of MAC Systems

• Security Checkbox

• Sharing an expensive machine

• Disjoint sets of users– B&L Catagories

• Hierarchical use of shared data– B&L Levels

Page 10: The Simplified Mandatory Access Control Kernel

Where Did Smack Come From?

• Traditionally– Label relationships hard coded– Names map to label values

• Mythtory:TopSecret,Skeeve,Ahz,Chumly• Level=4,Catagories=17,49,113

– Users only use names

• Why use anything but names?

Page 11: The Simplified Mandatory Access Control Kernel

Smack Label Mechanism

• Labels and label names are the same

• No implicit relationship between labels

• List of explicit access relationships

• Every subject gets a label

• Every object gets a label

• Objects get creating Subject’s label

Page 12: The Simplified Mandatory Access Control Kernel

Subjects Access Objects

• lstat() reads a file object’s attributes

• kill() writes to a process object

• send() writes to a process object

• bind() is uninteresting

Page 13: The Simplified Mandatory Access Control Kernel

System Labels

• _ floor• ^ hat• * star

– Objects Only

• Any single special character

_

*

^

Page 14: The Simplified Mandatory Access Control Kernel

User Labels

_

*

^

DapSEAsia

Page 15: The Simplified Mandatory Access Control Kernel

Explicit Access Rules

• Dap SEAsia r• Med Pop w

Dap

Med

SEAsia

Pop

Page 16: The Simplified Mandatory Access Control Kernel

Access Rule Specification

• /etc/smack/accesses– Subject Object [–rwxa]

• /smack/load– Strict fixed format

• /sbin/smackload– Writes to /smack/load

Page 17: The Simplified Mandatory Access Control Kernel

Bell & LaPadula Levels

• Secret more sensitive than Unclass• TopSecret more sensitive than Secret• Secret Unclass rx• TopSecret Secret rx• TopSecret Unclass rx• All relationships must be specified

Page 18: The Simplified Mandatory Access Control Kernel

Bell & LaPadula Categories

• Categories Skeeve and Ahz• Labels:

– “Skeeve,Ahz”– “Skeeve”– “Ahz”

• Skeeve,Ahz Skeeve rx• Skeeve,Ahz Ahz rx

Page 19: The Simplified Mandatory Access Control Kernel

Biba Integrity

• Floor is highest integrity

• Hat is lowest Integrity

Page 20: The Simplified Mandatory Access Control Kernel

Ring of Vigilance

• SEAsia Dap r• Med SEAsia r• Dap Med r

Dap

Med

SEAsia

Page 21: The Simplified Mandatory Access Control Kernel

Messaging

• Informant Reporter w• Reporter Editor w• Editor Reporter w

Page 22: The Simplified Mandatory Access Control Kernel

Time of Day

• At 17:00– WorkerBee Game x

• At 08:00– WorkerBee Game –

Page 23: The Simplified Mandatory Access Control Kernel

Implementation

• Label Scheme

• Access Checks

• File Systems

• Networking

• The LSM

• Audit

Page 24: The Simplified Mandatory Access Control Kernel

Label Scheme

• Labels are short text strings

• Compared for equality

• Stored in a list– secid– Optional CIPSO value– Never forgotten

Page 25: The Simplified Mandatory Access Control Kernel

Access Checks

• Rules written to /smack/load

• Hard Coded Labels

• Subject and object equal

• Find the subject/object pair

• Check the request against the rule

Page 26: The Simplified Mandatory Access Control Kernel

File Systems

• Use xattrs if supported

• Hard coded behavior– smackfs, pipefs, sockfs, procfs, devpts

• Superblock values– File system root– File system default– File system floor and hat

• Not yet implemented

Page 27: The Simplified Mandatory Access Control Kernel

Networking Model

• Sender writes to receiver– Sender is subject, receiver is object

• Socket, packet not policy components• William Janet w

– Allows a UDP packet

• Janet William r– Does not allow a UDP Packet

Page 28: The Simplified Mandatory Access Control Kernel

Packet Labeling

• Unlabeled packets get ambient label

• CIPSO option on every local packet

• CIPSO value from the label list– Set via /smack/cipso

• CIPSO direct mapping– Level 250– Label copied into category bits

• Same CIPSO as SELinux

Page 29: The Simplified Mandatory Access Control Kernel

The LSM

• Provides a restrictive interface

• Evolved in step with SELinux

• Imperfectly defined– Networking– Audit– USB

• Module Stacking

Page 30: The Simplified Mandatory Access Control Kernel

Programming interfaces

• getxattr(), setxattr()– SMACK64

• /proc/<pid>/attr/current

Page 31: The Simplified Mandatory Access Control Kernel

Socket Interfaces

• Socket Attributes– fgetxattr(), fsetxattr()– SMACK64.IPIN– SMACK64.IPOUT

• Packet Attributes– SO_PEERSEC

• TCP– SCM_SECURITY

• UDP

Page 32: The Simplified Mandatory Access Control Kernel

Administrative Interfaces

• /smack/load• /smack/cipso• /smack/doi• /smack/direct• /smack/nltype

Page 33: The Simplified Mandatory Access Control Kernel

What Have You Learned?

• Smack is a modern implementation of old school Mandatory Access Control with the mistakes omitted.

• Smack is designed for simplicity

• Smack is designed as a kernel mechanism

Page 34: The Simplified Mandatory Access Control Kernel

Special Thank You

• Paul Moore – Network interfaces

• Ahmed S. Darwish – Work on smackfs

• And a host of reviewers, including– Stephen Smalley, Seth Arnold,– Joshua Brindle, Al Viro,– James Morris, Kyle Moffett,– Pavel Machek

Page 35: The Simplified Mandatory Access Control Kernel

Contact Information

• http://schaufler-ca.com

[email protected]

[email protected]