UCA 2021 L01 Intro Basics (8 Files Merged)
UCA 2021 L01 Intro Basics (8 Files Merged)
Basic concepts in
Information
information security
security
Course
information
• Course organization
• Prerequisites
• Lecture plan
• Security education
• Security basics
• Tkachev Vlad
– Baker Tilly, IT Audit Director, 2017
– Center of Information Security, Lead Auditor, 2015
– KyrgyzTelecom, CIO, 2002—2017
Education
– Ethical Hacking Academy, CISA
– Unix Edu Center, RedHat Certified Engineer
– US Dept. of Homeland Security, Critical Infrastructure Protection
– Texas A&M University, Risk Management
– Moscow University of E&L, MBA
• Prerequisites
– Basic computer and network technology
– Basic (discrete) mathematics
executes causes
Step 1 Step 2 Step 3 Incident
Threat actor
Vulnerabilities
• Vulnerabilities
– Weaknesses or opportunities allowing a threat scenario to be executed
• Security Risk
– Likelihood (ease of executing a threat scenario), combined with the potential
damage in case of an incident (successful attack)
• Security Control
UCA / GIPI 2021
– A method for removing vulnerabilities and reducing security risk
Lec. 01 - Information Security
14
The Need for
Information
Security
• Can we remove all vulnerabilities once and for all?
• No we can’t! Reasons why that’s impossible:
– Rapid innovation and new technology creates new vulnerabilities
– Information security is (still) often ignored when developing IT
– New threats that exploit vulnerabilities are invented every day
– More effective attack technique and tools are being developed
– Increased value of online digital assets makes attacks more
attractive
• Conclusion: Information security doesn’t have a final
goal, it’s a continuing process
Security control
categories
Security Controls
Support
Security Services
Confidentiality Integrity Availability
UCA / GIPI 2021 Lec. 01 - Information Security
20
Confidentiality
Security Service • The property that information is not made available
Or Goal or disclosed to unauthorized individuals, entities, or
processes. (ISO 27000)
• Can be divided into:
– Secrecy: Protecting business data
– Privacy: Protecting personal data
– Anonymity: Hide who is engaging in what actions
• Main threat: Information theft, unintentional disclosure
• Controls: Encryption, Access Control, Perimeter defence
As general controls, also include:
– Secure Systems Development, Incident Response
Data Authentication
MAC, DigSig, PKI
Entity Authentication
• PAP: Policy
Administration
3 Authorization PAP Logon:
ID + Key
User
Point
• PDP: Policy
policy request
Authenticati
on function 4
Decision Point
• PEP: Policy System 7 PDP 6
Enforcement resource
Point decision request Request:
• IdP: Identity Resource & Access Type
Provider 8 access PEP 5
Access Control Function
3
Communication
Security
Analogy
Internet
Protected Pipe
5
TLS/SSL
Transport Layer
Security
SSL/TLS:
History • 1994: Netscape Communications developed the network
authentication protocol Secure Sockets Layer, SSLv2.
– Badly broken, officially deprecated 2011
• 1995: Netscape release their own improvements SSLv3.
– Broken, officially deprecated 2015
• In January 1999, RFC 2246 was issued by the IETF,
Transport Layer Security Protocol: TLS 1.0
– Similar to, but incompatible with SSLv3
– Followed by TLS 1.1 (2006) and TLS 1.2 (2008)
– Current version: TLS 1.3 (2018), removes all old/insecure
features/algorithms
7
TLS:
Overview
• TLS is a cryptographic services protocol based on the
Browser PKI and is commonly used on the Internet.
– Each server has a server certificate and private key installed
– Allows browsers to establish secure sessions with web servers.
• Port 443 is reserved for HTTP over TLS/SSL and the
protocol https is used with this port.
– http://www.xxx.com implies using standard HTTP using port 80.
– https://www.xxx.com implies HTTP over TLS/SSL with port 443.
• Other applications:
– IMAP over TLS: port 993
– POP3 over TLS: port 995
8
TLS: Protocol
Stack
TLS TLS Change TLS Application
Handshake Cipher Suite Alert Protocol
Protocol Protocol Protocol (e.g. HTTP)
9
TLS:
Architecture
• Designed to provide secure reliable end-to-end services over
Overview TCP.
– Confidentiality
– Integrity
– Authenticity
• Consists of 3 higher level protocols:
– TLS Handshake Protocol
– TLS Alert Protocol
– TLS Change Cipher Spec Protocol
• The TLS Record Protocol provides the practical encryption
and integrity services to various application protocols.
10
TLS:
Handshake
Protocol
• The handshake protocol
– Negotiates the encryption to be used
– Establishes a shared session key
– Authenticates the server
– Authenticates the client (optional)
• After the handshake, application data is transmitted
securely (encrypted + integrity protected)
11
TLS: Client Server
12
TLS:
Elements of • Client hello
– Advertises available algorithms (e.g. RSA, AES, SHA256)
Handshake – Different types of algorithms bundled into “Cipher Suites”
– Format:
TLS_key-exchange-algorithm_WITH_data-protection-algorithm
– Example (TLS 1.2): TLS_RSA_WITH_AES_256_CBC_SHA256
• RSA for key exchange
• AES (128 bit key) with CBC mode for encryption
• SHA256 as hash function for authentication and integrity protection
– Example (TLS 1.3): TLS_AES_256_GCM_SHA384
• DH for key exchange (implicit)
• AES with GCM for encryption + integrity protection
• SHA384 as hash function for authentication
13
TLS:
Elements of • Server hello
– Returns the selected cipher suite
Handshake – Server adapts to client capabilities
• Server Certificate
– X.509 digital certificate sent to client
– Client verifies the certificate including that the certificate signer is
in its acceptable Certificate Authority (CA) list. Now the client has
the server’s certified public key.
• Client Certificate
– Optionally, the client can send its X.509 certificate to server, in
order to provide mutual authentication
• Server/Client Key Exchange
– The client and server can a establish session key using asymmetric
encryption or DH key exchange
14
TLS:
Record Protocol
Overview
• Provides two services for TLS connections.
– Message Confidentiality:
• Encrypt the payload using symmetric encryption (e.g. AES)
– Message Integrity/Authenticity:
• Calculate a MAC to ensure the message was not modified in
transmission
• For both operations the session key exchanged
during the handshake is used
15
Weakness of DH Key Exchange
Diffie–Hellman key exchange is a method of securely exchanging cryptographic keys over a public channel
A E B
ga gb
ge ge
17
Countermeasure
A E B
verifiy
signature
using B‘s
public key
gb
signed with
ga B‘s private
key
Secure Communication
K = gab mod p
TLS in a
nutshell
Security Authenticity
Confidentiality Integrity
Goals (Message + Sender)
Symmetric Message
Payload
Encryption Authentication Code
Goal support
Key usage
TLS
Challenges • Many vulnerabilities exist for TLS
→ keep client and server software up-to-date
• Also vulnerabilities in cryptographic algorithms
→ configure server to exclude weak algorithms
• TLS provides security just for a single TCP connection
– Browser can establish HTTP and HTTPS connections; even to the
same server (e.g. HTML via HTTPS, images via HTTP)
• Relies on browser PKI which has many security issues
• No trust indicator
– Owner of “mafia.com” can get a legitimate certificate
– Phishing and TLS can be easily combined
– “Secure Connection” indicator can be misleading
Virtual Private
Networks
VPN
• TLS secures only a single TCP connection
• Sometimes:
– all communication from a computer shall be secured
– also non-TCP communication shall be secured
• Typical application:
– VPN tunnel into a company network
– Tunnel can only be established after authentication
– All communication is routed (and secured) through the tunnel
– Client is virtually part of the local company network
– Client gets access to internal services
Typical
usage of
VPN
Remote Side Internal infrastructure and Local Network
VPN
VPNaaS
Internet
(exposed IP addr.)
User
Tor –
The Onion
Router • An anonymizing routing protocol
• Originally sponsored by the US Naval Research Laboratory
• From 2004 to 2006 was supported by EFF
• Since 2006 independent nonprofit organisation
Destination: Jane
Some Payload
„Onion“
Message
Destination: Router A
Encrypt for A
Destination: Router B
Encrypt for B
Destination: Router C
Encrypt for C A B
Destination: Jane
C
Payload
Firewalls
Perimeter
security Medieval Castle Defense
analogy
Observation
posts Outer wall
Inner wall
Guard
Inner
Normal access court
Outer
Bridge court
Gatehouse
Moat
Defending
local
networks
Network
Perimeter
Security
Firewalls
• A firewall is a check point that protects the internal
networks against attack from outside networks
• The check point decides which traffic can pass in & out
based on rules
Firewalls:
Overview 1
• If the risk of having a connection to the Internet is
unacceptable, the most effective way of treating the risk
is to avoid the risk altogether and disconnect completely.
• If disconnection from the Internet is not practical, then
firewalls may provide an effective level of protection that
can reduce the risk to an acceptable level.
• Firewalls are often the first line of defence against
external attacks but should not be the only defence.
• A firewall’s purpose is to prevent unauthorized access to
or from a private network.
Firewalls:
Overview 2 • All traffic entering or leaving must pass through firewall
• The network owner must define criteria for what is
(un)authorized
• The effectiveness of firewalls depends on specifying
authorized traffic in terms of rules
– The rules defines what to let pass through;
– The rules defines what to block.
• Firewalls must be effectively administered, updated with the
latest patches and monitored.
• Firewalls can be implemented in both hardware and
software, or a combination of both.
Types of Firewall Technology
(vehicle analogy)
Inspects packet
• Packet Filters headers only
ABC123
Analyses
• Stateful Packet Filters bi-directional traffic
End-to-end connection
inspects payload, and
analyses traffic
Types of
firewalls
• Examples (iptables)
iptables -A FORWARD -m state --state NEW -i eth0 -j ACCEPT
• Accept new connections (i.e. TCP SYN) from network interface eth0 („from
inside“)
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
• Accept ALL packets which belong to an established TCP connection or are related
to an existing UDP communication
(Stateful)
Packet Filter:
Evaluation
• Strengths:
– Low overhead and high throughput
– Supports almost any application
• Weaknesses:
– Unable to interpret application layer data/commands
• may allow insecure operations to occur
– Allows direct connection between hosts inside &
outside firewall
Application
Level
Gateway • Inspects payload in end-to-end or proxy application
connection
• Support specific application protocols
– e.g. http, telnet, ftp, smtp etc.
– each protocol supported by a specific proxy HW/SW module
• Can be configured to filter specific user applications
– E.g. Facebook, Youtube, LinkedIn, Telegram, WhatsApp, etc
– Can filter detailed elements in each specific user application
• Can provide intrusion detection and intrusion prevention
• Very high processing load in firewall
– High volume needs high performance hardware, or else will be slow
Next
Generation
Firewalls
High range model: PA-7050
Up to 120 Gbps throughput
Prices starting from: US$ 150,000
• Intrusion detection
– The identification of possible intrusion through
intrusion signatures and network activity analysis
– IDS: Intrusion Detection Systems
• Intrusion prevention
– The process of both detecting intrusion activities and managing
automatic responsive actions throughout the network
– IPS: Intrusion Prevention Systems
– IDPS: Intrusion Detection and Prevention Systems
Intrusion
Detection
• IDS are automated systems that detect suspicious activity
Systems:
• IDS can be either host-based or network-based.
• A host-based IDS is designed to detect intrusions only on
the host it is installed on
– monitor events, changes to host’s OS files and traffic sent to the host
• Network based IDS (NIDS) detect intrusions on one or more
network segments, to protect multiple hosts
– monitor networks looking for suspicious traffic
• What can be detected:
– Attempted and successful misuse, both external and internal agents
– Known Malware: Trojan programs, viruses and worms
– DoS (Denial of Service) attacks
Network IDS
Deployment External Router /
Firewall
Internet
Internal
Router /
Firewall DB Production
Work
Server Server
DMZ Network Station
Internal Networks
DNS Web Email NIDS
Server Server Server
NIDS
Intrusion
Detection • Misuse detection
Techniques – Use attack “signatures” (need a model of the attack)
• Sequences of system calls, patterns of network traffic, etc.
– Must know in advance what attacker can do, based on known
attack patterns
– Can only detect known attacks
– Relatively few false positives
• Anomaly detection
– Using a model of normal system behavior, try to detect
deviations and abnormalities
• e.g., raise an alarm when a statistically rare event(s) occurs
– Can potentially detect unknown attacks
– Many false positives
Example:
Vulnerability +
Snort Rule
alert tcp $HOME_NET 445 -> any any ( msg:"OS-WINDOWS Microsoft Windows SMB
possible leak of kernel heap memory"; flow:to_client,established;
content:"Frag",fast_pattern; content:"Free"; content:"|FA FF FF|";
content:"|F8 FF FF|",within 3,distance 5; content:"|F8 FF FF|",within
3,distance 5; metadata:policy balanced-ips alert,policy security-ips
drop,ruleset community; service:netbios-ssn; reference:cve,2017-0147;
reference:url,technet.microsoft.com/en-us/security/bulletin/MS17-010;
classtype:attempted-recon; sid:42339; rev:2; )
Intrusion
Detection
Errors
• False negatives: attack is not detected
– Big problem in signature-based misuse detection
• False positives: harmless behavior is classified as attack
– Big problem in statistical anomaly detection
• Both types of IDS suffer from both error types
• Both false positives and false negatives are problematic
Remarks on
Intrusion • Most alarms are false positives
Detection – Requires automated or manual screening and filtering of alarms
• Most true positives are trivial incidents
– can be ignored,
– the attacks will never be able to penetrate any system
• Serious incidents need human attention
– Can be dealt with locally
– May require external expertise
• Potential for improvement through more intelligent IDS
– Less false positives
– Better detection of advanced attacks (APT)
Honeypots
• A honeypot:
– is a computer configured to detect network
attacks or malicious behavior,
– appears to be part of a network, and seems to
contain information or a resource of value to attackers.
• But honeypots are isolated, are never advertised and are
continuously monitored
• All connections to honeypots are per definition
malicious
• Can be used to extract attack signatures
• Honeynet is an international security club, see next slide
End of
lecture
Lecture 03:
- Information Security Management
- Human Factors for Information Security
Security Management
Set enterprise
Levels objectives.
Balance
Information stakeholder
Security value
Governance propositions.
• 2001 • 2019
BS 7799 ISO/IEC 17799 Major changes to ISO/IEC 27001: ISMS
BS 7799-2 ISO/IEC 17799-2 planned
ISO/IEC 27001:2013
• ISO 27001 specifies requirements for establishing,
implementing, maintaining and continually improving an
information security management system (ISMS) within
the context of the organization.
• ISMS is a holistic approach to IS management
– … not an IT system
• While the ISO 27002 (code of practice) defines a set of
security goals and controls, ISO 27001 (ISMS) defines
how to manage the implementation of security controls.
• Organizations can be certified against ISO 27001
– … but not against ISO 27002
• ISO 27001 is to be used in conjunction with ISO 27002
Planning
• Good IS management
Security requires that all steps
Evaluation
Controls
are implemented
CISSP 7th Ed. (p.41) Description
IS program phases
1. Plan and organise • Establish mgmt commitment and high level IS policy
• Define roles and committees,
•Assess threats, vulnerabilities and risk
• Identify and plan security solutions and controls
2. Implement •Assign roles and responsibilities
• Develop specific IS policies and procedures
• Implement security solutions and controls
3. Operate and • Execute security operations tasks
maintain • Carry out internal and external audit
• Develop monitoring and metrics for security controls
4. Monitor and • Review audits, monitoring and metrics
evaluate •Assess goal accomplishment
• Identify areas for improvement, and integrate in phase 1.
ISO/IEC 27002
Code of practice for information security controls
• ISO 27002 provides a checklist of general security controls to be
considered implemented/used in organizations
– Contains 14 categories (control objectives) of security controls
– Each category contains a set of security controls
– In total, the standard describes 113 generic security controls
• Not all controls are relevant to every organisation
• Objective of ISO 27002:
• “… gives guidelines for […] information security management
practices including the selection, implementation and management
of controls taking into consideration the organization’s information
security risk environment(s).”
The 14 Control Objectives Information security Security Human resources
Asset management
policy organization security
of ISO/IEC 27002:2013
Physical and
Access control Cryptography environmental Operations security
security
Security Controls
Control of Ports,
Analysis of Audit Email and Browser Data Recovery
Malware Defenses Protocols and
Logs Protections Capabilities
Services
Configuration of
Need-to-know Wireless Access
Firewalls, Routers Boundary Defense Data Protection
Access Control Control
and Switches
3) Analyze data:
— Manage raw data
— Sanitize data
— Categorize data
— Apply analytical model:
Basic → Derived → Indicator
Measurement —
ISMS integration Planning
4
Measurement Risk
Reporting
Assessment
results
ISMS
Cycle
3 1
Analyze Information Security
Evaluation
data needs Controls
2
Data
collection
CMMI
Capability Maturity Model Integration
for Information Security Management
5: Optimized /
Cultural
4: Managed and
measurable
3: Defined
processes
2: Repeatable but
intuitive
1: Initial / Ad Hoc processes
processes
0: No security
processes
CMM levels 1 - 3
1. Initial / Ad Hoc
+ Processes are ad-hoc and disorganised.
+ Risks are considered on an ad hoc basis, but no formal processes
exist.
2. Repeatable but intuitive
+ Processes follow a regular pattern.
+ Emerging understanding of risk and the need for security
3. Defined process
+ Processes are documented and communicated.
+ Company-wide risk management.’
+ Awareness of security and security policy
CMM levels 4 - 5
You might have revealed Immediately change the password(s) for your
or shared personal or account(s). If you use the same password for multiple
financial information accounts and sites, change it for each account. Do
not reuse that password in the future.
Watch for signs of identity theft by reviewing your
bank and credit card statements for unauthorized
charges and activity. If you notice anything unusual,
immediately contact your credit card or bank.
Consider reporting the attack to the police.
Social Engineering Tactics
• Neuro-Linguistic Programming (NLP)
• Develop Trust
• Induce strong affect
• Information overload
• Reciprocation
• Diffusion of responsibility and moral duty
• Authority
• Commitment creep
SE Tactics:
Neuro-Linguistic Programming (NLP)
Capability • Redesign policies & tools • Review & change policies & tools
of Security •
•
Education
Skill-building
•
•
Build employee security skills
Practical training
Culture Motivation
•
•
Restrict
Awareness campaigns
•
•
Remove admin rights
Security culture programme.
Incentives • ‘Good security’ awards, Security
performance as Key Performance
Indicator.
• Nudge/Prompt • Alerts & reminders
• Organisational response • Visible organisational reaction to all
policy breaches & errors
Opportunity • Engage employees in • Identify policies & tools that cause friction
security review/design • Identify & support employees who
• Security champion want to build security skills
Audit of ISO/IEC 27001 / 27002 Audit Audits are the most common metrics, but do
results not cover the full spectrum of social and
(Revisjon) psychological items that influence human
behavior.
End of Lecture
Lecture 7
• Risk Management
• Business Continuity Management
• ISO 31000 Risk Management:
What is risk? – “Risk is the effect of uncertainty on objectives”
– No distinction between positive and negative effects of uncertainty
– This definition is very general, and too abstract for IS risk assessment
– But ISO 31000 also says: Risk is often expressed as the combination of
the likelihood of occurrence of an event and the associated
consequences of the event.
Threat
scenario
Likelihood/frequency of
threat scenario to cause
incident
× Impact of incident to
asset
Risk Level
Risk Management standards
• Identification of assets
• Identification of threats
Risk Identification • Identification of existing controls
• Identification of vulnerabilities
• Identification of consequences
• Assess asset values and impacts
Risk analysis • Assess incident likelihood/frequency
• Determine/compute risk levels
• Rank risks
Risk evaluation • Compare risks with criteria
Security
Evaluation
Controls
• Identify relevant assets, and define relevant security aspects
Asset and • For example, which information assets are the most critical to the
Impact organization’s success with regard to the following aspects:
1. generates the most revenue/profitability?
Valuation 2. is the most important for legal compliance (e.g. GDPR)?
3. would be the most embarrassing if compromised?
• Valuation
– Estimate impact on assets from the combined set of aspects
– Example impact level computation using coproduct (“OR” rule),
• Let p1 denote relative impact on asset aspect 1, with value in [0,1]
• Coproduct: ∐ 𝑝1 , 𝑝2 = 𝑝1 ∐ 𝑝2 = 𝑝1 + 𝑝1 𝑝2
• Coproduct: ∐ 𝑝1 , 𝑝2 , 𝑝3 = 𝑝1 ∐ 𝑝2 ∐ 𝑝3 = (𝑝1∐ 𝑝2 ) ∐ 𝑝3 = 𝑝1 + 𝑝2 + 𝑝3 +
+ 𝑝1 𝑝2 𝑝3 − 𝑝1 𝑝2 − 𝑝1 𝑝3 − 𝑝2 𝑝3
• The relative impact levels can be mapped to qualitative levels
Example Asset and Impact Valuation
Information asset Aspect 1 Aspect 2 Aspect 3 Total impact
(corresponding incident) Impact on Impact on Impact on of incidents
revenue / legal public (coproduct)
profit compliance image
System and network availability 0.9 0.0 0.2 0.92
(unavailability)
Product data (loss of) integrity 0.4 0.0 0.0 0.40
Customer profiles (loss of) integrity 0.5 0.0 0.0 0.50
Customer profiles (loss of) 0.0 0.8 0.5 0.90
confidentiality
Customer credentials (loss of) 0.9 0.0 0.4 0.94
confidentiality
Web page integrity 0.1 0.0 0.1 0.19
(defacement)
User support (un) availability 0.2 0.0 0.1 0.28
• All values are relative in the interval [0, 1]
Threat Modelling
• Threat modelling is the process of identifying, analysing and
describing relevant threat scenarios.
• Unimportant/irrelevant threat scenarios can be ignored.
• Examine how each relevant threat scenario can be executed
against the organization’s assets.
• The threat modelling process works best when people with diverse
backgrounds within the organization work together in a series of
brainstorming sessions.
• Threat modelling is important during system development
– Used to identify, remove and avoid vulnerabilities when developing
software and systems.
• Multiple approaches/methods for threat modelling
Threat Modelling Methods
• Attacker-centric
– Starts from attackers, evaluates their goals, and how they might
achieve them through attack tree. Usually starts from entry points or
attacker action.
• System-centric (aka. SW-, design-, architecture-centric)
– Starts from model of system, and attempts to follow model
dynamics and logic, looking for types of attacks against each
element of the model. This approach is e.g. used for threat
modeling in Microsoft's Security Development Lifecycle.
• Asset-centric
– Starts from assets entrusted to a system, such as a collection of
sensitive personal information, and attempts to identify how security
breaches of CIA properties can happen.
Vulnerability Identification
• Vulnerabilities are specific opportunities that threat actors can exploit
to attack systems and information assets.
• Generic vulnerability identification
– To identify a vulnerability is the same as to determine how to block
a specific threat scenario.
– Removing a vulnerability is the same as blocking a threat.
– A vulnerability is the absence of barriers against a threat.
– Blocking a threat (i.e. removing a vulnerability) is done with a
security control.
• Tool-based and checklist-based vulnerability identification
– Vulnerability scanners are automated tools to detect known
vulnerabilities in networks and systems, e.g. Wireshark
– Check lists of vulnerabilities are used by teams when doing risk
assessment and removing vulnerabilities, e.g. OWASP Top 10.
Estimating risk levels
Types of analysis
• Qualitative
– Uses descriptive scales. Example:
• Impact level: Minor, moderate, major, catastrophic
• Likelihood: Rare, unlikely, possible, likely, almost certain
• Relative
– Relative numerical values assigned to qualitative scales
– Gives relatively good distribution of risk levels
• Quantitative
– Use numerical values for both consequence (e.g. $) and
likelihood (e.g. probability value)
Qualitative likelihood scale
Likelihood Description
Increasing likelihood
Medium The event will probably happen in most conditions (every 2 years).
(0.0) Never 0 0 0 0 0
Relative risk estimation can give a better distribution of risk levels than
with purely qualitative models.
Quantitative risk estimation example
Example quantitative risk analysis method
• Quantitative parameters
– Asset Value (AV)
• Estimated total value of asset
– Exposure Factor (EF)
• Percentage of asset loss caused by threat occurrence
– Single Loss Expectancy (SLE)
• SLE = AV EF
– Annualized Rate of Occurrence (ARO)
• Estimated frequency a threat will occur within a year
– Annualised Loss Expectancy (ALE)
• ALE = SLE ARO
Quantitative risk estimation
example Example quantitative risk analysis
• Risk description
– Asset: Public image (and trust)
– Threat: Defacing web site through intrusion
– Impact: Loss of image
• Parameter estimates
– AV(public image) = $1,000,000
– EF(public image affected by defacing) = 0.05
– SLE = AV EF = $50,000
– ARO(defacing) = 2
– ALE = SLE ARO = $100,000
Will happen to 1 in
Virus infection on Virus filter disabled Compromise of
MODERATE 100 clients every HIGH EXTREME
clients on many clients clients
year
No review of source
Logical bomb Breach of integrity Could happen once
code that goes into MAJOR UNLIKELY MODERATE
planted by insider or loss of data every 10 years
production.
Problems of measuring risk
Businesses normally wish to measure risk in money, but
almost impossible to do this
– Valuation of assets
• Value of data, hard to assess
• Value of goodwill and customer confidence, very vague
– Likelihood of incidents
• Past events not always relevant for future probabilities
– The nature of future attacks is unpredictable
– The actions of future attackers are unpredictable
– Measurement of benefit from security control
• Problems with the difference of two approximate quantities
– Estimation of past and present risk
Risk Control Strategies
?
ARO — Annual Rate of Occurrence control
Moderate ROI
𝑆𝑒𝑐𝑢𝑟𝑖𝑡𝑦 𝐶𝑜𝑛𝑡𝑟𝑜𝑙 𝑅𝑂𝐼 =
𝑅𝑖𝑠𝑘 𝑅𝑒𝑑𝑢𝑐𝑡𝑖𝑜𝑛 − 𝐶𝑜𝑠𝑡 𝑜𝑓 𝐶𝑜𝑛𝑡𝑟𝑜𝑙 Use judgement
= 𝐶𝑜𝑠𝑡 𝑜𝑓 𝐶𝑜𝑛𝑡𝑟𝑜𝑙 to decide whether to
Low ROI
implement security
Uneconomic,
control
𝑅𝑖𝑠𝑘 𝑅𝑒𝑑𝑢𝑐𝑡𝑖𝑜𝑛 = don’t implement
= (𝑅𝑒𝑑𝑢𝑐𝑡𝑖𝑜𝑛 𝑜𝑓 𝐴𝑅𝑂) × 𝑆𝐿𝐸 security control
Outline
– Business Continuity Planning
– Business Impact Analysis
Business Continuity Management
• Procedures for the recovery of an organization's
facilities in case of major incidents and disasters,
so that the organization will be able to either
maintain or quickly resume mission-critical functions
• BCM standards
– ISO 27031 Guidelines for ICT readiness for business
continuity
– NISTSP800-34 Contingency Planning Guide for Federal
Information Systems
Effect of BCM
Business • The range of incidents and disasters to be
considered include:
continuity – Acts of nature, for example:
•
management •
Excessive weather conditions
Earthquake
• Flood
• Fire
– Human acts (inadvertent or deliberate), for example:
• Hacker activity
• Mistakes by operating staff
• Theft
• Fraud
• Vandalism
• Terrorism
Business Continuity Plan (BCP)
• The business continuity plan is need to
be used in situations from getting control
over the crisis to reach back in business
and describes:
– a sequence of actions
– and the parties responsible for carrying
them out
– in response to disasters
– in order to restore normal business operations
as quickly as possible
BCP Terminology
• Business Continuity Plan
– Plan for restoring normal business functions after disruption
• Business Contingency Plan
– Same as Business Continuity Plan
– Contingency means ”something unpredictable that can happen”
• Disaster Recovery
– Reestablishment of business functions after a disaster, possibly in
temporary facilities
– Requires a BCP
• Business Continuity Management
– Denotes the management of Business Continuity
– Includes the establishment of a BCP
– ICT Readiness for Business Continuity (IRBC) (term used in ISO27031)
BCP Management (same as IRBC)
BCP Policy Business Impact Identify Preventive Recovery
• Mgmt approval Analysis (BIA) Controls • Strategies
• Scope • Critical functions • Implement controls • Processes
• Responsibility • MTD • Mitigate risks • Facilities
• Teams • Risks • Data
Recovery Phase
BCP Development:
• Sequence recovery activities
• Incorporate BIA finding
• Recovery procedures
• Document recovery strategy
• Escalation and notifications
Reconstitution Phase
• Concurrent processing
Appendices • Testing
• BIA • Notifications
• POC (point of contact) lists • Cleanup
• Procedures • Offsite data storage
• Backup
BCP Development and Output: NIST SP800-34, rev.1 p.34 • Documentation
BIA: Business Impact Analysis
• A Business Impact Analysis (BIA) is performed as
part of the BCP development to identify the
functions that in the event of a disaster or
disruption, would cause the greatest financial or
operational loss.
• Consider e.g.:
– IT network support – Customer support
– Data processing – Order entry
– Accounting – Production scheduling
– Software development – Purchasing
– Payroll – Communications
BIA (continued)
• The MTD (Maximum Tolerable Downtime) is defined for
each function in the event of disaster.
• Example:
– Non-essential = 30 days
– Normal = 7 days
– Important = 72 hours
– Urgent = 24 hours
– Critical = minutes to hours
Alternative • Redundant site
– Mirror of the primary processing environment
Sites More – Operable within minutes
expensive • Hot site
– Fully configured hardware and software, but no data
– Operable within hours
• Cloud
• Warm site
– Partially configured with some equipment, but not the
Less actual computers
expensive – Operable within days
• Cold site
– Basic electricity and plumbing
– Operable within weeks
BCP Testing • Checklist test
– Copies of the BCP distributed to departments for review
• Structured walk-through test
– Representatives from each department come together to go
through the plan
• Simulation test
– All staff in operational and support functions come together to
practice executing the BCP
• Parallel test
– Business functions tested at alternative site
• Full interruption test
– Business functions at primary site halted, and migrated to
alternative site in accordance with the BCP
End of Lecture
Lecture 5: User Authentication
Outline
• Context of user authentication
– Component of IAM (Identity and Access Management)
• User Authentication
– Knowledge-based authentication
– Ownership-based authentication
– Inherence-based authentication
– Authentication based on secondary channel
Taxonomy of Authentication
Authentication:
This lecture
Data Entity
Authentication Authentication
Example: Passwords
123456
User
3 [www-authenticate, domain, nonce] 2
4 [domain, Id, digest = h(nonce, Id, password)] Server
Password
Ownership-Based Authentication
“Something you have”
Example: Authentication Tokens (OTP)
Taxonomy of Authentication Tokens
Authentication Tokens
Typically a Challenge-
hardware token Synchronised Tokens Response
but also available Tokens
as mobile app
Clock-Based Counter-
Tokens Based Tokens
Clock-based OTP Tokens:
Operation
• Token displays time-dependent code on display
– User copies code from token to terminal to log in
• Possession of the token is necessary to know the
correct value for the current time
• Each code computed for specific time window
• Codes from adjacent time windows are accepted
• Clocks must be synchronised
• Example: BankID and SecurID
Clock-based OTP Token Operation with (optional) input PIN
HOST
USER’S TOKEN
user id
clock clock
OTP
Optional
OTP PIN
algorithm =?
compare
SafeID OTP
ActiveID OTP BankID OTP
token with
token with PIN token with PIN
PIN
RSA SecurID
Feitan OTP BankID OTP token
without PIN
token witout PIN without PIN
Compromised OTP Tokens
counter user id
counter
OTP
OTP
algorithm =?
compare
Challenge
Response • A challenge is sent in response to access request
Based Tokens – A legitimate user can respond to the challenge by
for User performing a task which requires use of information
only available to the user (and possibly the host)
Authentication:
• User sends the response to the host
– Access is approved if response is as expected by host.
• Advantage: Since the challenge will be different
each time, the response will be too – the dialogue
can not be captured and used at a later time
• Could use symmetric or asymmetric crypto
Token-based User authentication
Challenge Response Systems HOST
TOKEN
Id / key Id / key
challenge Random
algorithm number algorithm
generator
Optional =?
display response compare
Inherence-Based Authentication
features
Example
fingerprints:
Extracting
minutia
Biometrics: System components
Sensor
Feature
Comparator
Extractor
System
Database
System Components
Biometrics Enrolment Phase
Biometric Verification / Authentication
Comparator
Biometric Identification
Comparator
Evaluating Biometrics:
T Score s
FNMR FMR
IN2120 - UiO 2019
Spoofed • It is relatively simple to trick a biometric system
Biometrics: • Terminology: Presentation Attacks
Presentation
Attacks
Access Access
Management Access Control
Authorization
Identity and System Owner Domain
Access Registration
1
Management User
Scenario
IdP 2 Provisioning
• PAP: Policy
Administration 3 Authorization
PAP Logon:
ID + Key
User
Point
• PDP: Policy policy request
Authenticati
on function
4
Decision Point
• PEP: Policy
Enforcement Point System 7 PDP 6
• IdP: Identity resource
Provider
decision request Request:
Resource & Access Type
8 access PEP 5
Access Control Function
Definition of IAM
• Identity and access management (IAM) is the security
discipline that enables the right individuals to access th
right resources at the right times for the right reasons.
Gartner, IT Glossary
http://blogs.gartner.com/it-glossary/identity-and-access-management-iam/
The concept of identity
Systems
A Names,
Persons
B
Identifiers &
Characteristics
C
Organisations Y
Z
Concepts related
• Entity
to identity – A person, organisation, agent, system, session, process, etc.
• Identity
– A set of names / attributes of entity in a specific domain
– An entity may have identities in multiple domains
– An entity may have multiple identities in one domain
• Digital identity
– Digital representation of names / attributes in a way that is
suitable for processing by computers
• Names and attributes of entity
• Can be unique or ambiguous within a domain
• Transient or permanent, self-defined or defined by
authority, interpretation by humans and/or by
computers, etc
Identity
• Etymology (original meaning of words)
– “identity” = “same one as last time”.
• “First-time” authentication is not meaningful
– because there is no “previous time”
– because the identity first must be created/registered
• Authentication requires a first-time registration of identity
in the form of a name within a domain
• Registration can be take two forms:
– pre-authentication, from previous identity, e.g. passport
– creation of new identity, e.g. new-born baby
Identity • An identity domain has a name-space of unique names
– The same user can have separate identities in different domains
Domains
Silo Id Domain Federated Id Domain
Service A Service B
Service C
Id-1 Id-2 Service D
User
• Identity domain structures:
– Silo domain with single authority, e.g. User Ids in company network
– Distributed hierarchic domain: e.g. DNS (Domain Name System)
• Federated identity domains
– Identity domain can be used by many different Service Providers
– Requires alignment of identity management between SPs
Taxonomy of Identity Management
Architectures Identity
Management
Silo Federeated
Id Mgmt. Id Mgmt.
Hybrid
Centralised
Centralised Distributed Distributed
Federeation Federation Federeation
Silo identity management model Legend:
SP
IdP/CrP
SP/IdP A SP/IdP B SP/IdP C
Identity domain
1 2 3 User identifier for
X
1 2 3 silo domain
X Authentication token
for silo domain
Service logon
Service provision
Silo Id domains
• SP (Service Provider) = IdP (Identity Provider):
SP controls name space and provides access credentials
• Unique identifier assigned to each entity
• Advantages
– Simple to deploy, low initial cost for SPs
– Potentially good privacy
• Disadvantages
– Identity overload for users, poor usability, no business integration
– Low acceptance of new services with separate Id & credentials
– Users must provide same information to different service providers
– For service providers: Barrier to service bundling and data collection
A set of agreements, standards and technologies that enable a group of
Identity SPs to recognise and trust user identities and credentials from different
Federation IdPs, CrPs and SPs.
• Four main types:
1. Centralized Federation: Centralised name space and
management of credentials by single IdP/CrP.
2. Distributed Identity with Centralised Authentication:
Distributed name spaces managed by multiple IdPs. Centralised
credentials authentication by single CrP.
3. Centralised Identity with Distributed Authentication: Centralized
name space managed by single IdP. Distributed mgmt. of credentials
and authentication by multiple CrPs.
4. Distributed Federation: Distributed name spaces and
management of credentials by multiple IdPs and CrPs.
Identity Federation Types
channel 2
4
Browser
User
SAML protocol Federation circle of trust
User
Federation Agreement
5 Select 4
2
Post IdP
Creds 1 3 Redirect
8
client to get Token
Token token from IdP
9 Client
Redirect token to Forward token 10 11
SP via client back to SP
7
Provide Creds
Provide resource
OpenID Connect Characteristics
• Mandatory AC (MAC)
– aka. Label-Based Access Control
– AC policy based on security labels
– e.g. secret-clearance needed to access secret-classified document
DAC – Discretionary Access Control
(Name-Based Access Control)
• Access authorization is specified and enforced
based on the name/identity of subjects/objects.
• Typically implemented as ACL (Access Control Lists)
• DAC is discretionary in the sense that the owner of
the resource can decide at his/her discretion who is
authorized for access
• Operating systems using DAC:
– Windows and Linux
AC Matrix
DAC principles O1
Object names
O2 O3 O4
• AC Matrix S1 r,w - x r
Subject
S2 r - r r,w
names
– Impractical, too many empty cells S3 - x - -
Subject Object
Compare
labels
Bell-LaPadula: The classical MAC model
SS-property (Simple Security): No Read Up
• A subject should not be able to read files with a higher label than
its own label, because otherwise it could cause unauthorized
disclosure of sensitive information.
• So you should only be able to read documents with an
equal or lower label as your security clearance level.
*-Property (Star Property): No Write Down
• Subjects working on information/tasks at a given level should not
be allowed to write to a lower level, because otherwise it could
create unauthorized information flow.
• So you should only be able write to files with an equal or higher
label as your security clearance level.
Bell-LaPadula (MAC model) SS-Property: No Read Up
Top Secret
Current read
Subject Object
Label Labels
Secret read
Secret
read
Confidential
Diagram
Current
write Top Secret
Subject
label
write
Secret Secret
write Object
Labels
Confidential
Labels in Bell La Padula
Dominance
D
Subject Current label LSC = LO
E E
F
Possible LSC read access G
H
I
• Example: Define a label L = (h, c) where h and c are label-
parameters which take values from sets H and C
Partial Ordering
h hierarchical set H = {Secret, Unclassified} = {S, U}
of MAC Labels c category set C = {Development, Marketing, } = {D, M, }
(S,{D,M})
Partial (S,M)
ordering (S,D)
lattice (S,)
: dominates
(U,{D,M})
(U,M)
(U,D)
(U,)
Definition of • Labels defined as: L = (h, c), hH and cC
Label • H: set of hierarchical levels, C: set of categories
Dominance • – Subject current label: LSC = (hSC, cSC),
– Object label: LO = (hO, cO)
• Dominance: LSC LO iff (hO hSC) (cO cSC)
– In case LSC = LO then also LSC LO and LO LSC
• Non-dominance cases: LSC LO
– (hO > hSC) (cO cSC); insufficient hierarchic level
– (hO hSC) (cO cSC); insufficient category set
– (hO > hSC) (cO cSC); insufficient level and category
Combined MAC & DAC
• Combining MAC and DAC access control:
– It can be useful to combine MAC and DAC access control
• MAC policy is applied first,
• DAC policy applied subsequently in case of positive MAC
• Access granted only if both MAC and DAC decisions are positive
– Advantage:
• MAC ensures that users with insufficient clearance label in terms
of level and category can not access resources with a dominant
classification label
• DAC makes it possible to enforce ‘need to know’ to limit access
that would otherwise be granted under the MAC policy
RBAC: Role Based Access Control
Role 3 File 3
2b 2c
Subject
Subject Attributes Object Attributes
Name Affiliation Type Owner
Clearance Classification
etc. etc.
Global Consistence
• ABAC systems require an XML terminology to
express all possible attributes and their values,
• Must be consistent across the entire domain,
– e.g. the attribute Role and all its possible values, e.g.
(Role(subject) = HR-staff), must be known and interpreted by all
systems in the AC security domain.
• Requires standardization:
– e.g. for access to medical journals, medical terms must be
interpreted in a consistent way by all systems
– current international work on XML of medical terms
• Consistent interpretation of attributes and values is a
major challenge for implementing ABAC.
ABAC: + and On the positive side:
• ABAC is much more flexible than DAC, MAC or RBAC
– DAC, MAC and RBAC can be implemented with ABAC
•Can use any type of access authorization policies combined
with an unlimited number of attributes
• Suitable for access control in distributed environments
– e.g. national e-health networks
On the negative side:
•Requires defining AC concepts in terms of XML and ontologies
which is much more complex than what is required in traditional
DAC, MAC or RBAC systems.
•Political alignment and legal agreements are required for ABAC in
distributed environments.
End of lecture
Lecture 7:
Application Security and
Secure System Development
Outline
• Application Security
– Malicious Software
– Attacks on web applications
– Secure System Development
How do computers
get compromised ? • Accessing malicious or infected websites which contain
malicious scripts through browser vulnerabilities
• Downloading and installing malware from websites
• Executing attachments to emails which contain exploits and
malware
• Plugging in external devices which are infected with
malware
• Installing malware / infected software from any media
• Direct attacks from the Internet, which e.g. exploit
vulnerabilities in OS or applications such as web servers or
SQL databases
• Supply-chain attacks through the delivery chain, during
assembly, or during shipment
Malware •
•
Backdoor or trapdoor
Logic bomb
types • Trojan horse
• Worm
• Virus
• Stealth virus
• Uses techniques to hide itself, e.g. encryption
• Polymorphic virus
• Different for every system
• Metamorphic virus
• Different after every activation on same system
• Exploit
• A method to infect systems by using malicious program or input data (e.g.
document) that triggers and exploits a software bug in the systems
Exploits • A piece of software, data, or a sequence of
commands that exploits a software/hardware vulnerability
• Can be carried in common data formats such as pdf
documents, office documents or media files.
• Often contains carefully designed corrupt datatypes
• Causes unintended or unanticipated behavior to occur on
computer software or hardware
• The functionality of exploits is typically to:
– Download a malware/backdoor which allows the attacker to
control the platform
– Directly take control of a computer system, allowing privilege
escalation, or a denial-of-service or other sabotage.
Backdoor or Installed by exploit:
Trapdoor • Provides remote control capabilities by attackers
• Can reside on system for long periods before being used
• Can be removed after use
Installed by user:
• User can be tricked to install malicious program (see Trojan horse)
Installed during design:
• is a hidden/secret entry point into a program,
• allows those who know access bypassing usual security procedures
• is commonly used by developers for testing
• is a threat when left in production software allowing, exploit by attackers
• is very hard to block in O/S
• can be prevented with secure development lifecycle
The Cyber Kill Chain & Timescale
Reconnaissance / OSINT Days, months, • •••••••••
years
Exploitation Milliseconds ••
Installation Seconds • ••
Hybrid Botnet
Centralized Botnet
• Direct attack
DDoS – Bots send traffic with own or
Flood spoofed sender address to victim
Types
• Reflected attack
– Bots send traffic to innocent hosts
with victim address as sender
address. Innocent hosts become
part of attack by replying to victim.
The web application
security challenge
Network security (firewall, SSL, IDS, hardening) does not stop application attacks
What is SQL?
2 3
1
4
3
• For example, if input field ask for a product number, but the malicius user
inputs “40 or 1 = 1” or can leave an ‘ symbol (single quote/apostrophe)
• The result SQL command becomes:
select ProductName from products where ProductID = 40 or 1 = 1
• 1=1 is always TRUE so the “where” clause will always be satisfied, even if
ProductID ≠ 40.
• All product records will be returned.
• Data leak.
SQL injection with a single quote
Stored XSS
• Data provided by users to a web application is stored
persistently on server (in database, file system, …)
and later displayed to users in a web page.
• Typical example: online message boards.
• Attacker uploads data containing malicious script to
server.
• Every time the vulnerable web page is visited, the
malicious script gets executed in client browser.
• Attacker needs to inject script just once and every
user accessed infected page will be infected too.
Preventing SQL Injection and XSS
Waterfall SDLC
Software Development Life Microsoft SDL (Secure Development Lifecycle)
Cycle
Requirements
Design
Implementation
Verification
Maintenance
Agile Software Development (e.g. Scrum)
• Requirements are specified as stories
Project planning • Each story implemented as sprint
• Repeated sprint cycles until all stories are implemented
Deploy system
User Stories and Usecases
User Story – Seen from the user perspective:
As an [actor] I want [action] so that [achievement]. For
example: As an Instagram member, I want to set different
privacy levels on my photos, so I can control who sees
which of my photos.
Deploy system
Threat Modelling in Secure Agile
Tampering
Can an attacker modify data as it flows through the application?
Repudiation
If an attacker denies doing something, can we prove he did it?
Information disclosure
Can an attacker gain access to private or potentially injurious data?
Denial of service
Can an attacker crash or reduce the availability of the system?
Elevation of privilege
Can an attacker assume the identity of a privileged user?
Attacker Story and Misuse Case
(Attacker Goal and Threat Scenario)
Cryptography Cryptanalysis
Hash
Ciphers
Functions
cryptographic algorithm
Called “public-key
Symmetric Asymetric cryptography”
One secret key used for both encryption and Public key used for encryption and private
decryption key used for decryption
Block Stream
Block Cipher vs. Stream Cipher
Block cipher Stream cipher
Plaintext blocks
N bits Key
Key stream
Key Block cipher
generator
“Secret key” means that the key is shared “in secret” between entities who are authorized
to encrypt and decrypt
Strength Factors for cryptographic strength:
• Key size.
of Ciphers – Exhaustive key-search time depends on the key size.
– Typical key size for a symmetric cipher is 256 bit.
– Attacker must try 2256/2 keys on average to find the key, which would
take millions of years, which is not practical.
– With N different keys, the key size is log2(N).
• Algorithm strength.
– Key discovery by cryptanalysis can exploit statistical
regularities in the ciphertext.
– To prevent cryptanalysis, the bit-patterns / characters in the
ciphertext should have a uniform distribution, i.e. all bit-patterns /
characters should be equally probable.
Letter Frequencies → Statistical cryptanalysis
Historic ciphers, like the Caesar Cipher,
Letter frequencies in English
are weak because they fail to hide
statistical regularities in the ciphertext.
Caesar Cipher
Claude Shannon(1916 – 2001)
The Father of Information Theory – MIT / Bell Labs
• Information Theory
• Defined the „binary digit“ (bit) as information
unit
• Defined information „entropy“ to measure
amount of information
• Cryptography
• Model of secrecy systems
• Defined perfect secrecy
• Principle of S-P encryption (substitution &
permutation) to hide statistical regularities
Shannon’s S-P Network plaintext
Removes statistical regularities in ciphertext S S .... S
...
D
– Substitution provides “confusion” i.e. complex E
relationship between input and output
– Permutation provide “diffusion”, i.e. a single S S .... S
input bit influences many output bits
– Iterated S-P functions a specific number of P
times
ciphertext
– Functions must be invertible
AES - Advanced Encryption Standard
f5aff7be85… f529c0840…
C
M = D(C,Kpriv(B))
C = E(M,Kpub(B))
In practical applications, large messages are not encrypted directly with asymmetric
algorithms. Hybrid systems are used.
Hybrid Cryptosystems
• Symmetric ciphers are faster than asymmetric
ciphers (because they are less computationally
expensive ), but ...
• Asymmetric ciphers simplify key distribution,
therefore ...
• a combination of both symmetric and asymmetric
ciphers can be used – a hybrid system:
– The asymmetric cipher is used to distribute a randomly
chosen symmetric key.
– The symmetric cipher is used for encrypting bulk data.
Confidentiality Services: Hybrid Cryptosystems
Bob’s public key Bob’s private key Bob
f5aff7be85… f529c0840…
C
Generate Shared
Cipher Key
secret Asymmetric Asymmetric secret
K (K) K
symmetric encryption decryption symmetric
transfer
key K C = E(K,Kpub(B)) K = D(C,Kpriv(B)) key K
Cipher
Plaintext Symmetric Text (C) Ssymmetric Plaintext
M encryption transfer decryption M
C = E(M,K) M = D(C,K)
Digital
Signatures
Digital • A MAC cannot be used as evidence to be verified
Signature by a 3rd party.
• Digital signatures can be verified by 3rd party.
Mechanisms – Used for non-repudiation,
– data origin authentication and
– data integrity
• Digital signature mechanisms have three
components:
– key generation
– signing procedure (private)
– verification procedure (public)
Digital signature: Basic operation
Alice Alice’s private key Alice’s public key Bob
Kpriv Kpub
C
C= Decryption
Plaintext Encryption Plaintext
operation
M operation (Signing) (Signed M) M
(Validation)
C = E(M,Kpriv(A)) M = D(C,Kpub(A))
2𝑘 = 2𝑘/2