Access Control Casey Schaufler August 2010 Casey Schaufler - - PowerPoint PPT Presentation

access control
SMART_READER_LITE
LIVE PREVIEW

Access Control Casey Schaufler August 2010 Casey Schaufler - - PowerPoint PPT Presentation

File Content Based Access Control Casey Schaufler August 2010 Casey Schaufler Trusted Solaris, Trusted Irix, Linux LSM Various Government Efforts Trusix, CMM, CHATS Standards P1003.1e/2c, TSIG Smack Linux Security Module


slide-1
SLIDE 1

File Content Based Access Control

Casey Schaufler August 2010

slide-2
SLIDE 2

Casey Schaufler

  • Trusted Solaris, Trusted Irix, Linux LSM
  • Various Government Efforts

– Trusix, CMM, CHATS

  • Standards

– P1003.1e/2c, TSIG

  • Smack Linux Security Module
slide-3
SLIDE 3

Today’s Talk

  • Access Control
  • File Contents
  • Looking
  • Enforcement
  • Implementation
slide-4
SLIDE 4

Access Control

  • Concepts

– Subject, Object, Access

  • Principles

– Always Invoked – Not Circumventable

  • Jargon

– Discretionary, Mandatory – Sensitivity, Integrity

slide-5
SLIDE 5

Containers

  • The thing with a name

– An object

  • Traditional attributes

– Mode bits, owner, group

  • Extended attributes

– ACL, SELinux context, Smack label

slide-6
SLIDE 6

Container Rationalizations

  • Owner knows best

– Fundamental tenant of DAC

  • Like breeds like

– Fundamental tenant of MAC

  • Don’t care what is in the container

– Container is appropriately marked

slide-7
SLIDE 7

Rationalizations Break Down

  • DAC
  • MAC

– Secret file with location of the donuts

slide-8
SLIDE 8

File Contents

  • You have to look
  • You have to keep looking
  • You can spend all your time looking
slide-9
SLIDE 9

When To Look

  • New empty files are uninteresting
  • Newly modified files are interesting
  • Any modification makes them interesting
  • Stay interesting until examined
slide-10
SLIDE 10

Is it Time To Look?

  • Filesystem scan

– A’La Windows Virus Scanning

  • Inotify

– You have to ask for each file – Limited number of watches

slide-11
SLIDE 11

Keeping In Mind

  • Kernels don’t do data
  • Pathnames are transient
  • Existing behaviors can’t change much
slide-12
SLIDE 12

Keeping Track

  • Mark file when modified

– Easy for the kernel

  • Mark file when scanned

– Easy for an application

  • Kernel knows who needs scanning
slide-13
SLIDE 13

Data Flow

Kernel Scanner

Data 1 2 3 4 Metadata

slide-14
SLIDE 14

Data States

  • Kernel marks modified file
  • Kernel announces pathname
  • Application opens file, looks for mark
  • Examine marked files
  • Remark them for access control
slide-15
SLIDE 15

Enforcement Mechanisms

  • Overloading the familiar leads to tears
  • LSM schemes aren’t so familiar
  • SELinux would work

– “All it would take is policy”

  • Smack would do

– Still more than you need

slide-16
SLIDE 16

Creating a Mechanism

  • LSM schemes are easy to write
  • Access control based on marks been done
  • Right place for notification, too
slide-17
SLIDE 17

The Datastate Implementation

  • Special purpose LSM
  • Scanner dispatcher
  • Scanner applications
slide-18
SLIDE 18

The Datastate LSM

  • Marks files as they are modified
  • Provides names of modified files
  • Enforces Smack style access rules
  • Only cares about regular files
slide-19
SLIDE 19

Modifications

  • Any data write operation counts
  • Files marked –open are ignored
  • Files marked +anything are ignored
  • All others are marked –open
slide-20
SLIDE 20

Notification

  • Pathname collected with d_path
  • Written to /datastate/changed

– Only if not marked –open

slide-21
SLIDE 21

Access Control

  • Process mark

– /proc/self/attr/current

  • Process mark and file mark rules

– Developer GPLv3 n – Lawyer GPLv3 y – Careful –open n – -system +logfile y

slide-22
SLIDE 22

The Datastate Dispatcher

  • Reads /datastate/changed
  • Checks if file exists
  • Checks if file is marked –open
  • Invokes scanner
slide-23
SLIDE 23

The Datastate Scanner

“ Wait a second. This isn’t Windows with viruses. Why do I care?“

slide-24
SLIDE 24

The Datastate Scanner

… under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, ...

slide-25
SLIDE 25

The labelgpl3 Scanner

  • Checks if file is marked –open
  • Checks for GPL version 3
  • Marks GPL3 files GPLv3
  • Marks others -closed
slide-26
SLIDE 26

Unsolved Mysteries

  • Repudiation
  • Rename of –open file
  • Should open fail, or wait?
  • Avoid an initial scan
slide-27
SLIDE 27

What have you learned?

  • Content based access control is

– Important – Viable

  • It could be done with existing facilities
  • It is easier to do from scratch
slide-28
SLIDE 28

Can I get it?

  • Hosted by the Smack Project
  • http://schaufler-ca.com/datastate

– Kernel patch – Dispatcher program datastate – Scanner application labelgpl3

slide-29
SLIDE 29

Dedication Sue Schaufler 1929 – 2010

slide-30
SLIDE 30

Contact Information

  • http://schaufler-ca.com
  • casey@schaufler-ca.com