Lecture 2 - AccessControl
Lecture 2 - AccessControl
Access Control
Dr. Zaki Brahmi
[email protected]
3
Introduction
“Access control” is where security engineering meets
computer science.
guard resource
source حارس
(e.g. users, (e.g. files,
printers)
processes)
6
Basic Terminology
Subject/Principal: active entity – user or
process
Object: passive entity – file or resource
Access operations: read, write, ...
– Access operations vary from basic
memory/file access to method calls in an
object-oriented system.
– Comparable systems may use different
access operations.
7
Authorization
Access control decision is actually an
authorization decision
if o is an object, authorization answers
the question “Who is trusted to access o
?” ()من موثوق به للوصول
8
Example
Consider a paper-based office in which
certain documents should only be read
by certain individuals
We could implement access control by
– storing documents in filing cabinets
– issuing ( )إصدارkeys to the relevant
individuals for the appropriate cabinets
9
Simple analogy
The reference monitor is the set of
locked ( )مقفلfiling cabinets
– An access request (an attempt to open a
filing cabinet) is granted if the key fits the
lock (and denied otherwise)
10
Options for Focusing Control
Subjects and objects provide a different focus
of control
What is the subject allowed to do?
What may be done with an object?
Traditionally, multi-user operating systems
manage files and resources, i.e. objects
– Access control takes the second approach
Application oriented IT systems, like DBMSs,
offer services for the user and control the
actions of subjects.
11
Elementary access operations
On the most elementary level, a subject may
• observe an object, or
• alter an object.
We refer to observe and alter as access modes
()نموذج الوصول.
The four Bell-LaPadula (BLP a security method used for
enforcing access control in government and military applications )
access rights:
• execute
• read
• Append ()أضافة, also called blind write
• write 12
BLP Access Rights and Modes
Mapping between access rights and access
modes.
execute append read write
observe X X
alter X X
Write access usually includes read access. Hence, the
write right includes observe and alter mode.
Few systems implement append. Allowing users to alter an
object without observing its content is rarely useful
(exception: audit log).
A file can be used without being opened and read.
Example: use of a cryptographic key. This can be
expressed by an execute right that includes neither observe
nor alter mode. 13
Ownership
14
Who Sets the Policy?
Security policies specify how subjects access
objects. There are two options for deciding who is
in charge of setting the policy:
The owner of a resource decides who is allowed
access. Such policies are called discretionary
(disˈkreSHəˌnerē) as access control is at the owner’s
discretion ()تقدير.
– Called: Discretionary Access Control (DAC)
18
Access Control Matrix
The access control matrix is
– an abstract concept
– not very suitable for direct implementation
• Management of the matrix is likely to be
extremely difficult if there are ten thousands of
files and hundreds of users (resulting in millions
of matrix entries)
• The matrix is likely to be extremely sparse and
therefore implementation is inefficient
19
Capability-based security
Focus on the subject
– access rights are stored with the subject
– capabilities rows of the access control
matrix
Alice edit.exe: {exec} fun.com: {exec,read}
22
Aggregation Techniques
ACLs and capability lists are of limited
use (one focuses on subjects, the other
focuses on objects)
need to aggregate subjects and objects
• Groups
• Roles
• Procedures Role-based Access Control
• Data types
23
Groups & Negative Permissions
Groups are an intermediate layer between users
and objects. users
groups
objects
To deal with special cases, negative permissions
withdraw rights
users
groups
objects
24
Role-Based Access Control
(RBAC)
Several intermediate concepts can be inserted
between subjects and objects
subjects
roles
procedures
data types
objects
25
Role Based Access Control (RBAC)
Data types: A data type is a set of objects with the
same structure (e.g. bank accounts)
– each object is of a certain data type and can be accessed only
through procedures defined for this data type.
28
RBAC continued
Roles are a good match for typical access
control requirements in business
Roles implemented in
– Window NT onwards (as global and local
groups)
– IBM’s OS/400
– Oracle 8 onwards
– .NET framework
There is no generally accepted standard for
RBAC 29
Example
How to build role-based access control in
SQL ?
– privilege systems – for example:
group Can_delete Can_Update
user 0 1
admin 1 1
The application code often looks like this:
if ( $user->is_in_group("admin") ) {
$message->delete();
}
else {
print_error("Sorry, you can't delete messages."); }
if ( $user->is_in_group("users" || $user-
is_in_group("officers") )
{ // display some link here... ad nauseum } 30
RBAC – a quote
“The term RBAC itself does not have a
generally accepted meaning, and it is
used in different ways by different vendors
and users”
31
Lab
ManageEngine
– https://www.manageengine.com/
32
Exercice 1
User Permission
Alice read account of Mr X
Alice read account of Mr Y
Alice write in project New Bank
Propose a
Alice start application Money
RBAC model
Alice start application Create New client
Bob read account of Mr Y
for
Bob write in project New Bank improving
Bob start application Create New client this
Bob read account of Mr X situation.
Charlie read account of Mr X
Charlie read account of Mr Y
Charlie write in project New Bank
Charlie start application Create New client
John read account of Mr Y 33
Exercice 2
1. You have a system that allows the owner of a file to identify users and their
permissions to the file. Which type of access control model is implemented?
2. Which access control model manages rights and permissions based on job
descriptions and responsibilities?
3. A remote access user needs to gain access to resources on the server.
Which of the processes are performed by the remote access server to control
access to resources?
4. In which form of access control environment is access controlled by rules
rather than identity?
5. What form of access control is based on job descriptions?
6. Which of the following defines an object as used in access control?
7. Which form of access control enforces security based on user identities and
allows individual users to define access controls over owned resources?
8. You have implemented an access control method that allows only managers
to access specific data. Which type of access control model is used?
34
Security Labels and Partial
orderings
In several approaches to access control,
functions are used to associate entities with a
security label ( )وسم
– a value that can be compared using an operator
We can use a set L of security labels.
– We need a way of comparing labels but we need
not compare any pair of labels.
A data structure with the property that some,
but not all, elements can be compared is
called a partial ordering.
35
Partial orderings
A partial ordering (read as ‘less or equal’ –
but not necessarily numeric comparison) on a
set L is relation on LL that is
reflexive: for all aL, aa
transitive: for all a,b,cL, if ab and bc, then ac
antisymmetric: for all a,bL, if ab and ba, then
a=b
Examples for partial orderings
– the integers with the relation ‘is divided by’
– a power set P(C) with the subset relation
36
37
38
39
40
Lattices
Assume that a subject may observe an object
only if the subject’s label is higher than or
equal to the object’s label.
Lattices are a mathematical structure where
these questions have unique answers
Given two objects with different labels, what is the
minimal label a subject must have to be able to
observe both objects?
Given two subjects with different labels, what is the
maximal label an object can have so that it can be
observed by both subjects?
A lattice is a partially ordered set in which
every pair of elements has a greatest lower
bound and a least upper bound
41
System Low and System High
If a b, we say ‘a is dominated by b’ or
‘b dominates a’.
If a label exists that is dominated by all
other labels, it will be called System Low.
If a label exists that dominates all other
labels, it will be called System High.
What are System Low and System High in
the power set lattice example?
42
root
guest
A ‘flat’ lattice
43
Information flow policies
To address confidentiality requirements
We assume the existence of a lattice of
security labels
Every subject and object is assigned a
security label using a security function
Information can flow from an entity x to an
entity y if (x) <= (y)
– information can flow from low security entity
to high security one
Read and write access rights are defined in
terms of information flow principles
44
Read Access: no read up
Information flow from an object o to a
subject s
Read access is granted if (o) <= (s)
– you can read an object if your security
label is larger than the object’s
This condition is known as “no read up”
or the simple security (ss) property in
BLP terms
45
Write Access
Information flow from a subject s to an object o
Write access is granted if (s) <= (o)
– you can write to an object if your security label is
smaller than object’s
– quite counter-intuitive, but necessary to prevent
confidentiality violations such as
• a top secret user writing to an insecure printer
This condition is known as “no write down” or
the -property (star property) in BLP terms
No read-up and no write-down properties are
“mandatory access control” policies of BLP
46
Information flow blocked by -property
read
1 2
Trojan copy
Not
allowed
3 due to *-
property
read
confidential
unclassified
49
Compartments
In multi-level security, generally categories are
used as well as the security levels in lattices
C is a set of all categories, e.g. project names, company
divisions, academic departments, etc.
A compartment is a set of categories (a subset of C).
H is a set of security levels which are hhierarchically
ordered.
A security label (the function ) is a pair (h,c), where h
H is a security level and c C is a compartment.
The partial ordering is defined by (h1,c1) (h2,c2) if
and only if h1 h2 and c1 c2 .
50
Compartments - Example
Two hierarchical levels:
– public, private (public private)
Two categories: PERSONNEL, ENGINEERING
For examples, the following relations hold:
52
The Bell-LaPadula Model
Implements an information flow policy using a
lattice with compartments and an access
control matrix
An example: evaluating a read access request
in BLP
– A read access request by subject s to object o is
granted if
(o) <= (s) (information flow policy) and
• r M [s, o] (appropriate entry in the access control matrix)
BLP model actually a state machine
53
State Machine Models
State machines (automata): popular tool for modelling
many aspects of computing systems including security.
The essential features of a state machine model are the
concepts of a state and of state transitions.
– A state is a representation of the system under investigation at one moment
in time. It should capture exactly those aspects of the system relevant to the
problem.
– The state transition (next state) function defines the next state depending
on the present state and the input. An output may also be produced.
To design a secure system with the help of state machine
models:
– define state set so that it captures “security”
– check that initial state of the system is ‘secure’
– check that all state transitions starting in a “secure” state yield a
“secure” state
Security is then preserved by all state transitions. The
system will always be ‘secure’.
54
States in BLP model
A state in BLP model is
– the current subjects, objects and access
matrix among them and
– the security levels of subjects and objects
– current accesses by subjects to objects
55
Basic Security Theorem
A state is secure, if all current access tuples
(s,o,a) are permitted by the ss-, -, and ds-
properties.
A state transition is secure if it goes from a
secure state to a secure state.
How would you define state transition in BLP?
58
Examples
Subject s creates a file f The owner s of file f
so that s owns the file grants read access to
(access right o) and has another subject p
read and write
permission to the file
(access rights r and w). command grant_read(s,p,f)
if o in Ms,f
command create_file(s,f)
then enter r in Mp,f
create f
end
enter o into Ms,f
enter r into Ms,f
enter w into Ms,f
end
59
Security vs. Complexity in
HRU Model
The access matrix describes the state of the system;
commands change the access matrix.
HRU can model policies for allocating access rights. To
verify compliance with a given policy, you have to check
that no undesirable access rights can be granted.
HRU model has some definitions and theorems about
the decidability of the safety of the system
– Saying that HRU model does not help to verify safety
in its full generality, but verification is possible with
some restrictions
The moral of those theorems is:
– The more expressive and complex the security
model, the more difficult it is to verify security
60
References
Vincent C. Hu, and al., Guide to Attribute Based Access Control
(ABAC) Definition and Considerations. NIST Special Publication 800-
162, 2014. (Available at http://nvlpubs.nist.gov/nistpubs/specialpublications/NIST.SP.800-
162.pdf
Advances in Security in Computing and Communications, Edited
by Jaydip Sen, ISBN 978-953-51-3346-9, 2017
61
Lecture IV:
Cryptographic
attacks can be
– passive
• attempts to learn or make use of information from the system but
does not affect system resources
• examples: eavesdropping message contents, traffic analysis
• difficult to detect, should be prevented
– active
• attempts to alter system resources or affect their operation
• examples: masquerade (spoofing
Security and Cooperation in Wireless Networks
خداع ), replay, modification
(substitution,
Appendix A: Intro to cryptographic insertion,
algorithms and destruction), denial of service
Introduction
6
protocols • difficult to prevent, should be detected 3
Main security services
authentication
– aims to detect masquerade
– provides assurance that a communicating entity is the one
that it claims to be
access control
– aims to prevent unauthorized access to resources
confidentiality
– aims to protect data from unauthorized disclosure
– usually based on encryption
integrity
– aims to detect modification and replay
– provides assurance that data received are exactly as sent by
the sender
– provides protection denial by one entity involved in
communication of having participated
against a in all or part of the
communication()عدم التنصل
non-repudiation
– twoinbasic
Security and Cooperation Wirelesstypes:
Networksnon-repudiation of origin and non-
repudiation
Appendix A: Intro to cryptographic deliveryand A.1
ofalgorithms Introduction 6
protocols 4
Some security mechanisms
encryption
– symmetric key, asymmetric (public) key
digital signature
authentication protocols
– passwords, cryptographic challenge-response
protocols, biometrics
Encryptio Decryptio
n n
Ciphert ICFVQRVVNEFVRNNVSIYRGAHSLIOJICNTIYBFGTICRXR
ext S
Security and Cooperation in Wireless Networks
Appendix A: Intro to cryptographic algorithms and
protocols 66
/80
Cryptography: Overview
Plaintex Plaintex
e n e m y a t t a c k s t o n ti g h t te n emy a t t a c k s t on i g h t
z z
Write row by Read row by row
row
e n e m e n e m
a y a y
k t t a k t t a
c c
s t o i s t o
i
n n
g h t g h t
z z
E E M Y E E M Y N
NT A A C T A A C T
TT K O N T K O N S
SH I T Z H I T Z G
Read column by column
G Write column by
column
E T T H E A K I MA O T Y C N Z N T S E T T H E A K I MA O T Y C N Z N T S
G G
Ciphertex Ciphertex
t Transmission t
Security and Cooperation in Wireless Networks
Appendix A: Intro to cryptographic algorithms and
protocols 67
/80
CRYPTOGRAPHY: OVERVIEW -
CRYPTANALYSIS
• Cryptanalysis is the art of breaking codes and
ciphers
• Cryptanalyst
• Deduce the original meaning of the ciphertext
• Determine the decryption algorithm that matches the
encryption one used
Breakable Encryption!
68
/80
&/80
Classical model of encryption
EK(m)
E ciphertext D
m DK’ (EK(m)) =
plaintex m
t
K eavesdroppi K’
encryption ng decryption
key adversary key
Kerckhoff’s principle:
– we must assume that the adversary knows all details of
E and D
– security of the system should be based on the
protection of the
Securitydecryption key Networks
and Cooperation in Wireless
Appendix A: Intro to cryptographic algorithms and
protocols 69
/80
Adversary models
ciphertext-only attack
– the adversary can only observe ciphertexts produced by
the same encryption key
known-plaintext attack
– the adversary can obtain corresponding plaintext-
ciphertext pairs produced with the same encryption key
(adaptive) chosen-plaintext attack
– the adversary can choose plaintexts and obtain the
corresponding ciphertexts
(adaptive) chosen-ciphertext attack
– the adversary can choose ciphertexts and obtain the
corresponding plaintexts
related-key attack
– the adversary can obtain ciphertexts, or plaintext-
ciphertext pairs that are produced with different
encryption keys that are related in a known way to a
specific encryption key
symmetric-key encryption
– it is easy to compute K’ from K (and vice versa)
– usually K’ = K
– two main types:
• stream ciphers – operate on individual characters of
the plaintext
• block ciphers – process the plaintext in larger blocks of
characters
asymmetric-key encryption
– it is hard (computationally infeasible) to compute K’
from K
– K can be made public ( public-key cryptography)
Plaintext
Blocks of plaintext
66 6F 72 05 05 05 05
Note: There is others paid 05
methods
Security and Cooperation in Wireless Networks
Appendix A: Intro to cryptographic algorithms and
protocols
7
Block cipher modes of operation
ECB – Electronic Codebook
– used to encipher a single plaintext block (e.g., a DES
key)
CTR – Counter
– simplified OFB with certain advantages
Security and Cooperation in Wireless Networks A.2 Encryption
Appendix A: Intro to cryptographic algorithms and Block cipher modes of
protocols operation 7
Classification of Modern Block cipher
Substitution Ciphers
Substitute a character or a symbol for each character of
the original message
Transposition Ciphers
The order of letters is rearranged
Notation
UPPERCASE PLAINTEXT
lowercase ciphertext
Security and Cooperation in Wireless Networks A.2 Block cipher
Appendix A: Intro to cryptographic algorithms and
protocols
7
Example. The Caesar Cipher -- Substitution
Ad Xa
Be Yb
Cf Zc
1, 2, 3, 4, 5, 6, 7, 8, 9
p1 = 1, 3, 5, 7, 9, 8, 6, 4, 2
p1(1) = 1, p1(2) = 3, p1(3) = 5, p1(4) = 7, etc.
Two copies of the OTP should existe: one for sender and one
for receiver.
Security and Cooperation in Wireless Networks A.2 Block cipher
Appendix A: Intro to cryptographic algorithms and
protocols
8
One-Time Pads (OTP) or Or Vernam Cipher
H
Encryption E L L O Message
7 4 11 11 14
23 12 2 10 11 key
30 = 16 13 21 25 Message + key
= 16 13 21 25 (Message + key)
4 mod 26
Q N V Z ciphertext
E Q N V Z Ciphertext
E
16 13 21 25
4
Decryption
- 12 2 10 11 key
23
- = 4 11 11 14 Ciphertext - key
19
If = the(-19
number 4 is negative
11 11 then1426 is added to
(Ciphertext make the
- key)
number
+26)
Security and positive
Cooperation in Wireless Networks A.2 Block cipher
mod 26
Appendix A: Intro to cryptographic algorithms and
protocols
7 8
Transposition
protocols
8
nasna
Stream ciphers
Secret key
RC
A
KeyStrem
1. Generate private
and public key
3. Encrypt message
by public key 4 decrypt
message using the
private key
Encryptio
n: F(m, e) = me mod n=c
–
Q:12027524255478748885956220793734512128733387803682075433653899983955
17985098
87978998691469008091316111533468170508320960221601463663463918124709871054
15233
Security and Cooperation in Wireless Networks
– Encryption:
Appendix A: Intro to cryptographic algorithms and
protocols 101
35052111338673026690212423937053328511880760811579981620642802346685810623 /80
References
http://doctrina.org/How-RSA-Works-With-
Examples.html
Dejan Ristanovic and Jelica Protic, The Book Cipher Algorithm,
2008
Delfs, Hans & Knebl, Helmut (2007). "Symmetric-key encryption".
Introduction to cryptography: principles and applications. Springer.
ISBN 9783540492436.
Pelzl & Paar (2010). Understanding Cryptography. Berlin: Springer-
Verlag. p. 30.
Security Architecture
and Design
Dr. Bhavani Thuraisingham
OUTLINE
Computer Architecture
Operating System
System Architecture
Security Architecture
Security Models
Security Models of Operation
System Evaluation Methods
Open Vs Closed Systems
Some security threats
COMPUTER ARCHITECTURE
COMPONENTS
Central Processing Unit (CPU)
Registers
Memory Units
Input/output Processors
Single Processor
Multi-Processor
Multi-Core Architecture
Grids and Clouds
OPERATING SYSTEMS
Memory Management
Process management
File Management
Capability Domains
Virtual Machines
SYSTEM ARCHITECTURE
The software components that make up the system
Middleware
Database management
Networks
Applications
SECURITY ARCHITECTURE
Security critical components of the system
Trusted Computing Base
Reference Monitor and Security Kernel
Security Perimeter
Security Policy
Least Privilege
TRUSTED COMPUTING BASE
The trusted computing base (TCB) of a computer system is
the set of all hardware, firmware, and/or software
components that are critical to its security, in the sense that
bugs or vulnerabilities occurring inside the TCB might
jeopardize the security properties of the entire system.
The Simple Security Property - a subject at a given security level may not read
an object at a higher security level (no read-up).
BIBA
In general, preservation of data integrity has three goals:
Prevent data modification by unauthorized parties
Prevent unauthorized data modification by authorized parties
Maintain internal and external consistency (i.e. data reflects the real world)
Biba security model is directed toward data integrity (rather than confidentiality) and is
characterized by the phrase: "no read down, no write up". This is in contrast to the Bell-
LaPadula model which is characterized by the phrase "no write down, no read up".
CLARK WILSON MODEL
The Clark-Wilson integrity model provides a foundation for
specifying and analyzing an integrity policy for a computing
system.
The model is primarily concerned with formalizing the notion
of information integrity.
Information integrity is maintained by preventing corruption
of data items in a system due to either error or malicious
intent.
CLARK WILSON MODEL
A well-formed transaction is a series of operations that transition a system from one consistent
state to another consistent state.
In this model the integrity policy addresses the integrity of the transactions.
The principle of separation of duty requires that the certifier of a transaction and the
implementer be different entities.
CLARK WILSON MODEL
At the heart of the model is the notion of a relationship between an
authenticated principal (i.e., user) and a set of programs (i.e., TPs) that
operate on a set of data items (e.g., UDIs and CDIs). The components of
such a relation, taken together, are referred to as a Clark-Wilson triple.
The model must also ensure that different entities are responsible for
manipulating the relationships between principals, transactions, and data
items. As a short example, a user capable of certifying or creating a
relation should not be able to execute the programs specified in that
relation.
CLARK WILSON MODEL
E1—System must maintain a list of certified relations and ensure only TPs certified to
run on a CDI change that CDI. E2—System must associate a user with each TP and
set of CDIs. The TP may access the CDI on behalf of the user if it is “legal.” This
requires keeping track of triples (user, TP, {CDIs}) called “allowed relations.”
E3—System must authenticate every user attempting a TP. Note that this is per TP
request, not per login. For security purposes, a log should be kept.
SECURITY MODES OF OPERATION
Dedicated
Systems High
Compartmented
Multilevel
Trust and Assurance
OPEN VS. CLOSED SYSTEM
Open systems allow users to reuse, edit, manipulate, and
contribute to the system development
Open source software is an example of Open systems
Licensed to the public
Freeware is also an example of Open systems
Closed system permits users the system as it is
SOME SECURITY THREATS
Buffer Overflow
Maintenance Hooks
Time of check / Time of use attacks
DATABASE
SECURITY
CREATE TABLE department ( CREATE VIEW newtable (Dname, Ename, Eid, Ephone) AS
Did INTEGER PRIMARY Dname KEY, SELECT D.Dname E.Ename, E.Eid, E.Ephone
CHAR (30), FROM Department D Employee E WHERE E.Did = D.Did
Dacctno CHAR (6) )
Use
DBM DB
r S
Access and
Applicatio data
interference
n encryption
Control
IS 257 - Fall 2017-
2017 SLIDE
130
DATABASE SECURITY AND THE DBA
• The database administrator (DBA) is the central
authority for managing a database system.
– The DBA’s responsibilities include:
• granting privileges to users who need to use the
system. 2 types of database security mechanisms:
– Discretionary security mechanisms
– Mandatory security mechanisms
• Classifying users and data in accordance with the
policy of the organization
• Impose same constraint: Integrity constraints
– The DBA is responsible for the overall security of the
database system.