access control
play

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


  1. File Content Based Access Control Casey Schaufler August 2010

  2. Casey Schaufler • Trusted Solaris, Trusted Irix, Linux LSM • Various Government Efforts – Trusix, CMM, CHATS • Standards – P1003.1e/2c, TSIG • Smack Linux Security Module

  3. Today’s Talk • Access Control • File Contents • Looking • Enforcement • Implementation

  4. Access Control • Concepts – Subject, Object, Access • Principles – Always Invoked – Not Circumventable • Jargon – Discretionary, Mandatory – Sensitivity, Integrity

  5. Containers • The thing with a name – An object • Traditional attributes – Mode bits, owner, group • Extended attributes – ACL, SELinux context, Smack label

  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

  7. Rationalizations Break Down • DAC • MAC – Secret file with location of the donuts

  8. File Contents • You have to look • You have to keep looking • You can spend all your time looking

  9. When To Look • New empty files are uninteresting • Newly modified files are interesting • Any modification makes them interesting • Stay interesting until examined

  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

  11. Keeping In Mind • Kernels don’t do data • Pathnames are transient • Existing behaviors can’t change much

  12. Keeping Track • Mark file when modified – Easy for the kernel • Mark file when scanned – Easy for an application • Kernel knows who needs scanning

  13. Data Flow 1 Kernel Metadata 4 2 Data 3 Sca nner

  14. Data States • Kernel marks modified file • Kernel announces pathname • Application opens file, looks for mark • Examine marked files • Remark them for access control

  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

  16. Creating a Mechanism • LSM schemes are easy to write • Access control based on marks been done • Right place for notification, too

  17. The Datastate Implementation • Special purpose LSM • Scanner dispatcher • Scanner applications

  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

  19. Modifications • Any data write operation counts • Files marked – open are ignored • Files marked + anything are ignored • All others are marked – open

  20. Notification • Pathname collected with d_path • Written to /datastate/changed – Only if not marked – open

  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

  22. The Datastate Dispatcher • Reads /datastate/changed • Checks if file exists • Checks if file is marked – open • Invokes scanner

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

  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, ...

  25. The labelgpl3 Scanner • Checks if file is marked – open • Checks for GPL version 3 • Marks GPL3 files GPLv3 • Marks others -closed

  26. Unsolved Mysteries • Repudiation • Rename of – open file • Should open fail, or wait? • Avoid an initial scan

  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

  28. Can I get it? • Hosted by the Smack Project • http://schaufler-ca.com/datastate – Kernel patch – Dispatcher program datastate – Scanner application labelgpl3

  29. Dedication Sue Schaufler 1929 – 2010

  30. Contact Information • http://schaufler-ca.com • casey@schaufler-ca.com

Recommend


More recommend