INSE 6130

INSE 6130: Operating Systems Security

Outline

  • Instructor: Prof. Lingyu Wang
  • Website: INSE6130 2020 Fall
  • Email: wang@ciise.concordia.ca

    Include "INSE 6130" in the subject

  • Office:
    • Fridays 16:30 - 17:30
  • Coursebook
    • M.Bishop, Computer Security. Art and Science (2nd Edition), Addison-Wesley 2018.
  • Course Description:

    System security, MS Windows security, linux security, unix security, embedded and real-time OS, system reliability, OS security mechanisms, security administration, delegation of authority, group policy design, security configuration, password requirements, security services, protection models, protection levels, protection domains, capabilities, sharing, system kernel security, resource control, secure booting, firewalls and border security, security models and policies, security levels, authentication, confidentiality, integrity, access control strategies access matrix, access control list, mandatory, discretionary, monitoring, auditing, accountability, privilege, account security, file system protection, registry security, threat analysis, security attacks, security-hardened operating


Introduction

What is computer security?

  • Physical security and information security

Overview of all perspectives of system security

  • Objectives

    • Confidentiality (Secrecy)
      • What: keeping data and resources hidden
      • How: encryption
    • Integrity
      • What: data integrity and origin integrity (authentication)
      • How: digital signature and ?
    • Availability (Denial of Service)
      • What: enabling access to data and resources
  • Classes of Threats

    • Disclosure: snooping(sniffing) -> confidentiality
    • Deception: modification, spoofing (masquerading), repudiation of origin, denial of receipt -> integrity
    • Disruptoin: modification -> availability
    • Usurpation(taking control of system): modification, spoofing, delay, denial of service -> confidentiality, integrity, availability
  • Policies and Mechanisms

    • Policies define "security" for the system: what can do, what cannot do
      • Given by natural language, math, special languages
    • Mechanisms enforece policies
      • Technical or procedural
    • OM-AM (by Ravi Sandhu)
      • Objective (policy): e.g. confidentiality
      • Model: A model is an abstract conceptual description of the objective. e.g. ACM
      • Architecutre: How to implemente the model. e.g. Client-Server
      • Mechanism: Mechanism is a low level implementation. e.g. Encryption
  • Ways for achieving security

    • Prevention
      • Prevent attacks from violating security policy
      • Prevention not always work
    • Detection
    • Recovery
      • Stop attack, assess and repair damage
      • Continue to function correctly even if attack succeeds (e.g. Amazon cannot stop service to recover)
  • Trust and assumptions

    • They underlie all aspects of security
    • For policies: unambiguously partiion system states, correctly capture security requirements
    • For mechanisms: assumed to enforce policy, work correctly
  • Types of Mechanisms

    • Three cases
      • secure
      • precise
      • broad: some secure states are not reachable, some reachable states are not secure. This is the most common situation.
    • Policy should cover security.
  • The role of trust, assurance, operational issues, human issues

    • Assurance
      • Specification: what is secure
        • Requirements analysis
        • Statement of desired functionality
      • Design
      • Implementatioin
    • Operational issues
      • Cost-Benefit analysis
        • Is it cheaper to prevent or to recover
      • Risk analysis
        • Should we protect something
        • How much should we protect is
      • Laws and Customs
    • Human Issues
      • Organizational Problems
        • Power and responsibility
        • Financial benefits
      • People problems
        • Outsiders and insiders
        • Social engineering: get information from person to go further
  • How them tie together Tying Together


Access Control Matrix

“How do I describe the security of any computer system… mathematically?”

- So we have the Access Control Matrix model
- Access control is who can do what to whom

ACM (Access Control Matrix)

Q: How to describe a system at any given time?

A: Protection state of a system

  1. What is state of a system: Collection of current settings and valus of a system. e.g.: values of memory locations, secondary storage, registers, and other components of an OS
  2. What is protection state of a system: Subset of a state that is relevant to security. e.g.: access control settings (who can do what to whom)

Q: How to mathematically represent a protection state?

A: Access cnotrol matrix

  1. ACM is a matrix describing rights of subjects over objectives
  2. ACM is an abstract model
    • Subject, object, and right could be anything

Definition of ACM

o1o_1o2o_2\ldotsomo_ms1s_1s2s_2\dotssns_n
s1s_1r1r_1r1r2r_1r_2r3r_3
s2s_2r3r4r5r_3r_4r_5r4r_4
\ldots
sns_n
  • Subjects: S={s1,,sn}S=\{s_1, \ldots, s_n\}
  • Objects: O={o1,,om}O=\{o_1, \ldots, o_m\}
  • Rights: R={r1,,rk}R=\{r_1, \ldots, r_k\}
  • Matrix entries: A[si,oj]RA[s_i, o_j]\subseteq R
  • Interpretation: A[si,oj]={rx,,ry}A[s_i, o_j]=\{r_x,\ldots, r_y\} means subject sis_i has rights rx,,ryr_x, \dots, r_y over object ojo_j
  • Object set always encloses subject set

Transition in ACM

  • Why transition
    • The protection state of a system will change
    • Such change is modeled as ACM state transition
  • Elements of transition
    • XiX_i : ACM in the starting state
    • Xi+1X_{i+1}: ACM in the ending state
    • Command τ\tau : the action that causes this state transition
  • Put it together: XiτXi+1X_i \vdash_{\tau} X_{i+1}

Primitive Operations

Primitive Operations are the basic changes you can make to ACM.

  • Create/destroy/enter/delete its elements:
    • create/destroy subject ss
    • create/destroy object oo
    • enter/delete rr into A[s,o]A[s, o]

Special Rights

  • Copy
  • Own

Command

Command is a fixed sequence of primitive operations.

  • Command with Conditions
  • Mono-operations Command
  • Mono-conditional Command
note

Conditions cannot be negative or connected by "or"

Principle of Attenuation of privilege

  • One shouldn't be able to give out rights he/she does not posses except owner.
  • The owner right implies all other rights.
    • Owner can give itself rights, then give the right to others, and finally delete its rights.
Question

Given an ACM and all the allowed commands, how to decide whether a subject will ever posses a right over an object?


Foundational Results

“Can I determine whether Can I determine whether any computer system is computer system is secure?” (asked by Harrison Ruzzo and Ullman)

- So we have the HRU result

Safety Problem

note

If a subject who does not initially possess a right rr can never obtain rr, then the system is safe with respect to rr (legitimate delegation of rr are ignored).

Q: Can we write a program to decide the safety of any protection system?

A: Safety problem is undecidable. (Special cases may be decidable)

Take-Grant Protection model

Take-Grant Protection model is a protection system with a specific set of commands. It decidable with a linear time complexity in the size of the system.


Access Control Mechanism

ACM is good for theoretical study but bad for implementation.

Access Control List(ACL)

An ACL stores the non-empty elements of each column with an object.

#TODO

  • 'Closed World' assumption
    • Denied unless explicitly granted
  • Identical rows
    • Use groups or wildcards to merge them
  • Who can modify ACL?
    • Creator of the file ACL or
    • who have been granted modify right

Capability Lists (C-List)

Rows or access control matrix stored with subjects.

#TODO

  • The key challenge in implmentation is to prevent process/user from altering capabilities.
    • Kernel space versus User space
    • Put C-List inKernel space

ACL versus C-Lists

  • Equivalent in theory
  • Differ in efficiency in answering
    • Which object can be accessed by a given subject? (C-List win)
    • What subjects can access a given object? (ACL win)

Role-Based Access Control (RBAC)

ACL/C-List full mapping would be too complicated, so introduce RBAC (Role).

info

Why role? Because rights usually depend on role (job function) instead of idenity.

  1. RBAC0\text{RBAC}_{0}

    • Four sets: U,R,P,SU, R, P, S
    • Two many-to-many relations UA,PAUA, PA (User assignments, Permission assignments)
      • USU×RUS\subseteq U\times R
      • PAP×RPA\subseteq P\times R
    • user(s)\text{user}(s): which user does a session ss belong to
    • roles(s)\text{roles}(s): which roles the session ss has activated
  2. RBAC1\text{RBAC}_{1}: RBAC1\text{RBAC}_{1} = RBAC0\text{RBAC}_{0} + role hierarchy

    • If r1r2r_1\leq r_2 then
    1. Any user assigned to r2r_2 can activate r1r_1
    2. Activating r2r_2 gives user the all of r1r_1's permissions
  3. RBAC3\text{RBAC}_{3}: RBAC3\text{RBAC}_{3} = RBAC1\text{RBAC}_{1} + constraints

    • No session can activate both TA and student

Security Policies and Confidentiality Policies

Security Plicies are unambiguous statements.

Define Security Policies

  • Positive authorizations with the Closed World assumption
  • Negative authorizations with the Open World assumption
  • A mixture of the two, with conflicts resolution meta-policies

Security Policty Defines Security

note

Under security policies, a 'secure' system is one that

  1. Only starts from authorized states
  2. Never enters any unauthorized states

Types of Security policy

  1. Confidentiality policy
  2. Integrity policy
  3. Availability policy

Most applications require combinations of these.

Types of Access Control Policies

  1. Descretionary Access Control (DAC)
    • Access is based on owner's discretionary
    • Standard Unix security
  2. Mandatory Access Control (MAC)
    • System controls accesses and users cannot alter

Lattice

  • LUB: least upper bound
  • GLB: greatest lower bound
  • Lattice is a poset whose elements all have unique LUBs and GLBs.

Denning's Axioms

Security levels form a lattice.

  • A security level is a pair (clearance/classification, category)

Bell-LaPadula (BLP) model

Objective: Information cannot flow downwards. This implies:

  1. No read up
  2. No write down

The BLP policy has two parts to achieve this goal.

  1. Simple Security Policy (Read)
    • Subject ss can read object o    L(s)L(o)o\iff L(s)\geq L(o).
    • This is the "no read up" rule.
  2. *-Property (Write)
    • Subject ss can write object o    L(s)L(o)o\iff L(s)\leq L(o).
    • This is the "no write down" rule.

Integrity Policies and Hybrid Policies

Biba model

Objective: Information cannot flow upwards. This implies:

  1. No read down
  2. No write up

General Formal

  • SS: the set of subjects
  • OO: the set of Objects
  • II: the set of integrity levels
  • i(s)Ii(s)\in I: integrity level of ss where sSs\in S
  • i(o)Ii(o)\in I: integrity level of oo where oOo\in O
  • sros\: \underline{r}\: o: ss can read oo
  • swos\: \underline{w}\: o: ss can write oo
  • sxss\: \underline{x}\: s: ss can execute ss

Strict Integrity Policy

Low-Water-Mark Policy

  1. Subject Low-Water-Mark Policy
  2. Object Low-Water-Mark Policy

Information Transfer Path

Combining Biba and BLP

  1. What if they are exactly reversed
  2. What if they are exactly the same

Chinese Wall Policy (Hybird Policy)

  • Place non-conflicting objects inside walls
  • Each analyst can only access objects inside a walls
  • History-based access control

Organization of Objects

  • Objects
    • Sanitized objects: Public information that never results in conflicts of interests.
    • Unsanitized objects: Everyting else
  • Company dataset (CD)
  • Conflict of interest class (COI)
  • One special CD in one special COI for all sanitized objects.

CW-Simple Security Conditions

  • Initially, a subject can read any CD in any COI
  • Once the subject has read any CD in a COI, he/she can only read
    • within the same CD, or
    • another COI

CW-*-Property

A subject ss can write to oo iff both hold:

  1. ss can read oo
  2. All ss can read are
    • either within oo's CD,
    • or sanitized.

Design principles

Principles of security design

  • Simplicity
  • Restriction

Least privilege

  • A subject should be given only those information/privileges necessary to complete its task.

Fail-Safe Defaults

  • Default action is to deny access unless access privileges are granted explicitly to a subject.
  • If action fails, it should undo the actions before it terminates.

Economy of Mechanism

  • Keep security mechanism as simple as possible.

Complete Mediation

  • Check every access, don't cache or rely on previous permissions.

Open Design

  • Security should not depend on secrecy of design or implementation.

Separation of privilege

  • Rquire multiple conditions/subjects to grant privilge.

Least Common Mechanism

  • Mechanisms/resouces should not be shared.

Psychological Acceptability

  • Security mechanisms should not add to the difficulty of accessing resource.

UNIX Security

  1. UID, /etc/passwd
  2. GID, /etc/group
  3. The Superuser

Authentication and Identity

Basic concept

  • Authentication: to prove an Identity
    • Strong authentication
      • Without transmitting password over Network (then over what?)
      • Or, multi-factor authentication
        • At least two of the following factors.
        • If only password and PIN, it's only one factor.
  • Factors
    • What the user know: password, PIN
    • What the user has: ID card, ticket
    • What the user is: figerprint, iris, DNA
  • Attach
    • Active: password guessing, cracking password hashes, authentication replay, etc.
    • Passive: password sniffing, etc.

Password Security

  • Basic Model (two stages)

    • Registration
    • Login
  • Password storage

    • Why not plaintext password
      • The password file could be accessed by insider/outsider
    • Why not the encrypted password
      • Server has to store the key. If the key is lost, same problem as plaintext password
    • Hash (three properties)
      • One-Way
      • Fixed-length output
        • Cannot guess password length
        • Storage efficiency
      • Collision-resistant
        • Weak: Given xx, to find a 2nd-preimage xx' where xxx'≠x such that h(x)=h(x)h(x')=h(x).
          • Given a password, infeasible to find another password such that their hashes are the same.
        • Strong
          • Most attacks are all about string collision, so passwords are still safe.
          • But dictionary attacks do.
  • Dictionary Attacks

    • Two ways
      • Online
        • Compile a dictionary of possible passwords, sorted in likelihood of passwords
        • Try to login with passwords in dictionary
      • Offline
        • Download password file from server
        • Compute hashes of dictionary to try to find a match
    • Time Memory Tradeoff
      • Pre-compute all hashes: faster O(logn)O(\log{n}), but need more space O(n)O(n)
      • Compute on the fly: slower O(n)O(n), but less space O(1)O(1)
        • O(n)O(n) because cannot do binary search
      • In-between: time memory tradeoff method
  • Time Memory Tradeoff

    • Assumptions

      • All passwords are three charachters
      • All hashes are also three characters
    • Denote ht(abc)=h(h(hht(abc)))h^t(abc)=\underbrace{h(h(h\ldots h}_{t}(abc)))

    • Compute the table (m×(t+1)m\times (t+1))

      abcabch(abc)h(abc)h(h(abc))h(h(abc))\ldots\ldotsht1(h(abc))h^{t-1}(h(abc))ht(h(abc))h^{t}(h(abc))
      abdabdh(abd)h(abd)h(h(abd))h(h(abd))\ldots\ldotsht1(h(abd))h^{t-1}(h(abd))ht(h(abd))h^{t}(h(abd))
      cbdcbdh(cbd)h(cbd)h(h(cbd))h(h(cbd))\ldots\ldotsht1(h(cbd))h^{t-1}(h(cbd))ht(h(cbd))h^{t}(h(cbd))
      \ldots\ldots\ldots\ldots\ldots\ldots\ldots
      \ldots\ldots\ldots\ldots\ldots\ldots\ldots
      foofooh(foo)h(foo)h(h(foo))h(h(foo))\ldots\ldotsht1(h(foo))h^{t-1}(h(foo))ht(h(foo))h^{t}(h(foo))
    • Suppose we choose m×t263=17000m\times t \geq {26}^{3}=17000, say 100×170100\times 170

Challenge-Response

Biometrics


Secure Booting

Secure bootstrap architectures and TPM


Auditing and Logging

Auditing systems

Auditing in UNIX

Audit log analysis


Vulnerability and Defense

Common vulnerabilities

Intrusion detection


Securing Network Services

Security in UNIX internet server

Network Security tools in UNIX and Windows

Security protocols


Various Topics

Registry security

Embedded and real-time OS security

Cloud computing security

Mobile OS security

Last updated on