A Control Point for Reducing Root Abuse of File-System Privileges - - PowerPoint PPT Presentation

a control point for reducing root abuse of file system
SMART_READER_LITE
LIVE PREVIEW

A Control Point for Reducing Root Abuse of File-System Privileges - - PowerPoint PPT Presentation

Introduction Solution for the Desktop A Control Point for Reducing Root Abuse of File-System Privileges Glenn Wurster , Paul C. van Oorschot School of Computer Science Carleton University, Canada 6 Oct 2010 Glenn Wurster, Paul C. van Oorschot


slide-1
SLIDE 1

Introduction Solution for the Desktop

A Control Point for Reducing Root Abuse of File-System Privileges

Glenn Wurster, Paul C. van Oorschot School of Computer Science Carleton University, Canada 6 Oct 2010

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 1/ 24

slide-2
SLIDE 2

Introduction Solution for the Desktop Separation of Duties Installer Frameworks

Problem

Root privileged processes can arbitrarily modify the system

Solution

Don’t run as root

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 2/ 24

slide-3
SLIDE 3

Introduction Solution for the Desktop Separation of Duties Installer Frameworks

Re-phrasing the requirements

On the desktop, we should treat two applications as mutually untrustworthy.

1

During install, upgrade, uninstall, and run-time.

2

The paper concentrates only on the file-system.

Allow file-system reads, but don’t allow modifications.

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 3/ 24

slide-4
SLIDE 4

Introduction Solution for the Desktop Separation of Duties Installer Frameworks

Other Approaches to Divide Root

e.g., SELinux dpkg given almost total control over the file-system

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 4/ 24

slide-5
SLIDE 5

Introduction Solution for the Desktop Separation of Duties Installer Frameworks

T wo States

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 5/ 24

slide-6
SLIDE 6

Introduction Solution for the Desktop Separation of Duties Installer Frameworks

T wo States, Many Users

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 6/ 24

slide-7
SLIDE 7

Introduction Solution for the Desktop Separation of Duties Installer Frameworks

T wo States, Many Applications

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 7/ 24

slide-8
SLIDE 8

Introduction Solution for the Desktop Separation of Duties Installer Frameworks

Our focus

Configuration related files:

1

Modified during configuration, not during day-to-day use

2

We focus on system-wide configuration files Files most commonly modified through install, upgrade, and uninstall

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 8/ 24

slide-9
SLIDE 9

Introduction Solution for the Desktop Separation of Duties Installer Frameworks

Application Installers

Run a Script or Binary

1

Provided by application author

2

Usually run as Administrator

3

e.g., make install, self-extracting ZIP

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 9/ 24

slide-10
SLIDE 10

Introduction Solution for the Desktop Separation of Duties Installer Frameworks

Application Packages

sudo apt-get install <package>

1

Typically, become root and run package manager

2

Package manager runs scripts in package

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 10/ 24

slide-11
SLIDE 11

Introduction Solution for the Desktop Separation of Duties Installer Frameworks

Application Bundles

Drag and Drop

1

Drag to the destination folder

2

No scripts run during install

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 11/ 24

slide-12
SLIDE 12

Introduction Solution for the Desktop Separation of Duties Installer Frameworks

Google Android

Self Signing

1

Isolate update to just the package

2

No scripts run during install

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 12/ 24

slide-13
SLIDE 13

Introduction Solution for the Desktop Separation of Duties Installer Frameworks

GoboLinux

1

Don’t modify files during upgrade

2

Redesign the file-system hierarchy

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 13/ 24

slide-14
SLIDE 14

Introduction Solution for the Desktop Separation of Duties Installer Frameworks

GoboLinux - Restricting Scripts

Restricting Scripts

1

Script has write access to build source and install destination

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 14/ 24

slide-15
SLIDE 15

Introduction Solution for the Desktop Separation of Duties Installer Frameworks

Application Installer Goal

Method Upgrade Scripts FS Hierarchy Agnostic Encapsulates Config Separation User Friendly Installer

  • Package
  • Bundle
  • Android
  • GoboLinux
  • Goal
  • Glenn Wurster, Paul C. van Oorschot

Reducing Root Abuse 15/ 24

slide-16
SLIDE 16

Introduction Solution for the Desktop

Breakdown of Separation

1

Configuration related files:

Identified as c-locked, protected by kernel

2

Encapsulating configuration of applications:

Delegated to a user-space app called configd

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 16/ 24

slide-17
SLIDE 17

Introduction Solution for the Desktop

The Control Point

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 17/ 24

slide-18
SLIDE 18

Introduction Solution for the Desktop

What can be c-locked?

Store the c-locking flag in the inode, protecting:

1

Files

2

Symbolic Links

3

Hard Links

4

Directories

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 18/ 24

slide-19
SLIDE 19

Introduction Solution for the Desktop

The Prototype: GoboLinux + Debian Linux

1

Files in the package are segregated by Debian’s dpkg

2

Scripts are restrained using an approach similar to GoboLinux

3

File-system hierarchy is same as standard Debian

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 19/ 24

slide-20
SLIDE 20

Introduction Solution for the Desktop

The Prototype: Restricting Applications

Restricting Installers

1

We likely don’t have a custom security policy for the program being installed

2

We’re not working with security experts

Enforcement

1

Continue enforcement past install

2

Any application gaining root should not be able to modify the system

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 20/ 24

slide-21
SLIDE 21

Introduction Solution for the Desktop

Philosophizing

T wo options for restricting installers

1

Don’t run installers as root; or

2

Don’t give root all the privileges it currently gets

Shifting to not run installers as root

1

Users automatically become root to install

2

Applications still sometimes get root privileges

3

’Root’ does not distinguish between configuration and day-to-day use

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 21/ 24

slide-22
SLIDE 22

Introduction Solution for the Desktop

Prototype Implementation

1

Extended the Linux kernel to enforce c-locked flag

Used extended attribute functionality Any file in a package is marked as c-locked

2

Extended dpkg to work with configd

3

Ran install scripts with a restricted UID

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 22/ 24

slide-23
SLIDE 23

Introduction Solution for the Desktop

Prototype Evaluation

1

Performance overhead ≤ 4.8%

2

Malware prevented from modifying core c-locked system binaries

3

Satisfied design goals

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 23/ 24

slide-24
SLIDE 24

Introduction Solution for the Desktop

A Control Point for Reducing Root Abuse

  • f File-System Privileges

Glenn Wurster, Paul C. van Oorschot http://ccsl.carleton.ca

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 24/ 24

slide-25
SLIDE 25

Introduction Solution for the Desktop

Slide References

Projects:

  • http://www.debian.org/
  • http://www.gobolinux.org/

Images:

  • http://www.mypointless.com/2009/05/more-headlines-of-obvious.html
  • http://en.wikivisual.com/index.php/Key_(lock)
  • http://zarious.deviantart.com/art/Spy-vs-Spy-WallPaper-2560X1024-115603200
  • http://websvn.kde.org/trunk/kdesupport/oxygen-icons/scalable/apps/
  • http://arstechnica.com/open-source/reviews/2010/07/android-22-froyo.ars/
  • http://www.android.com/media/
  • http://www.directindustry.com/prod/norma-group/exhaust-pipe-clamp-15287-33925.html
  • http://www.codeproject.com/kb/WPF/TheWpfThoughtProcess.aspx
  • http://www.multiplaying.net/2009/07/29/slurms-pondering-of-the-day4/
  • http://www.cs.gettysburg.edu/~tneller/mazes/oskar4bit/arduino.html

Glenn Wurster, Paul C. van Oorschot Reducing Root Abuse 25/ 24