Transcript Master

IC3 - Network Security
M.Sc. in Information Security
Royal Holloway, University of London
1
IC3 - Network Security
Lecture 1, Part 1
Introduction to Networking
2
Objectives of Lecture
CINS/F1-01
• Show how networks can be understood using a
layered approach.
• Introduce the OSI seven layer reference model.
• Introduce the concepts of internetworking and
routing.
• Understand the difference between network
protocols and services.
3
Contents
1.1
1.2
1.3
1.4
Extended example: how the Internet
protocols fetch a web page
The concept of protocol layering
Internetworking and routing
The OSI seven layer model
4
1.1 Internet Protocols
Web Browser
Network
Web Server
5
Application Layer
• How does a web browser retrieve data from a
web server?
• Application Protocol: Hypertext Transfer
Protocol (HTTP).
• Users invoke applications which “speak” using
application protocol.
• Applications interact with a transport protocol to
send or receive data.
• Other applications: FTP, SMTP, DNS, SMB, …
6
Application Layer Example
• HTTP outline:
– GET /directory/dirsearch.html HTTP/1.1
– Host: www.phoenix.co.uk
GET /directory/dirsearch.html HTTP/1.1
Host: www.phoenix.co.uk
HTTP Message
7
Transport Layer
• Provides end-to-end communication between
applications.
• Transport Protocol: Transport Control Protocol (TCP)
– a reliable, connection-oriented transport protocol.
• Divides stream of application messages into packets.
• Interacts with Internet Layer to send or receive data.
• In general, a transport protocol may be
– reliable or unreliable,
– connection-oriented or connectionless,
– and flow may or may not be regulated.
• Others: UDP, ICMP.
8
Transport Layer Example
• TCP outline:
– Source Port: 1081
– Destination Port: 80
– Checksum: 0xa858
Src: 1081 Dst: 80
Chksum: 0xa858
TCP header
GET /directory/dirsearch.html HTTP/1.1
Host: www.phoenix.co.uk
HTTP Message
9
Internet Layer
• Responsible for routing communications
between one machine and another.
• Accepts requests to send packets to
destination address.
• Internet Protocol (IP) encapsulates packets in
IP datagram with IP header and uses routing
algorithm to decide whether to send directly or
indirectly.
• Also handles incoming IP datagrams.
– If addressed to local machine, remove the IP
datagram header and pass up to transport layer.
10
Internet Layer Example
• IP outline:
–
–
–
–
Time to live: 128
Header checksum: 0x57d1
Source: pelican (192.168.0.40)
Destination: www.phoenix.co.uk (192.168.0.50)
IP datagram header
Src: 192.168.0.40
Dst: 192.168.0.50 TTL: 128
TCP header
Src: 1081 Dst: 80
Chksum: 0xa858
HTTP Message
GET /directory/dirsearch.html HTTP/1.1
Host: www.phoenix.co.uk
11
Network Interface Layer
• Accepts IP datagrams and transmits over
specific networks.
• Maybe a simple device driver (e.g. an Ethernet
driver) or a complex subsystem with further
data link protocols.
12
Network Interface Layer Example
• Ethernet outline:
– Destination: 00:a0:cc:54:1d:4e
– Source: 00:e0:81:10:19:fc
– Type: IP
Ethernet Frame
Src: 00:e0:81:10:19:fc Dst: 00:a0:cc:54:1d:4e Type: IP
Src: 192.168.0.40
Dst: 192.168.0.50 TTL: 128
Src: 1081 Dst: 80
Chksum: 0xa858
GET /directory/dirsearch.html HTTP/1.1
Host: www.phoenix.co.uk
13
1.2 Protocol Layering
Host A
Host B
Application Layer
Application Layer
Message
Transport Layer
Transport Layer
Packet
Internet Layer
Internet Layer
Datagram
Network Interface
Network Interface
Frame
Physical Network
14
Protocol Layering
Web Browser
Web Server
Application Layer
Application Layer
HTTP Message
Transport Layer
Transport Layer
TCP Packet
Internet Layer
Internet Layer
IP Datagram
Network Layer
Network Layer
Ethernet Frame
Physical Network
15
Protocol Hierarchies
• Protocols are stacked vertically as series of
‘layers’.
• Each layer offers services to layer above,
shielding implementation details.
• Layer n on one machine communicates with
layer n on another machine (they are peer
processes/entities) using Layer n Protocol.
16
Layers, Protocols & Interfaces
Layer n/n+1
interface
Layer n
Layer n protocol
Layer n/n+1
interface
Layer n
Layer n-1/n
interface
Layer 2/3
interface
Layer 2
Layer 1/2
interface
Layer 1
Layer n-1/n
interface
Layer 2 protocol
Layer 1 protocol
Layer 2/3
interface
Layer 2
Layer 1/2
interface
Layer 1
Physical communications medium
17
Layer/Interface Design
• Important objective is ‘clean’ interfaces, having
minimal set of well-defined services.
• Clean-cut interfaces enable:
– minimisation of inter-layer communications
– easy replacement of individual layers
• Set of layers and protocols is the Network
Architecture.
18
Virtual & Actual Communications
• Important to understand difference between:
– virtual and actual communications,
– protocols and interfaces.
• Peer processes ‘think’ of communications as
being ‘horizontal’ using protocol.
• Actual communications is via interfaces (and
the physical communications medium).
• Peer process idea is key to network design.
19
Design Issues
• Some issues affect many layers, e.g:
–
–
–
–
–
–
–
need to address data (say who it’s for),
possible need for setting up connections,
data transfer rules (simplex, half-duplex, ...),
error management,
deal with message component re-ordering,
flow control,
routing.
20
1.3 Internetworking and Routing
• No single networking technology can satisfy all
requirements.
• Universal interconnection is desired.
• Protocols allow communication between nodes
without understanding underlying mechanisms.
• Internetworking is the process by which a
group of disparate, heterogenous networks can
be linked to form a single logical network.
• The Internet is just such a collection.
21
Routing
Routing is the mechanism used to transfer data
between networks to reach the correct
destination.
Router
Network
B
Web Browser
Network
A
Web Server
Routing takes place at the IP
layer: routers are not aware of
transport and application
layers.
22
Protocol Layering and Routing
Host A
Host B
Application Layer
Application Layer
HTTP Message
Transport Layer
Transport Layer
TCP Packet
Router
Internet Layer
Internet Layer
IP Datagram
Network Layer
Ethernet
Frame
Internet Layer
IP Datagram
Network Layer
Physical Network
Ethernet
Frame
Network Layer
Physical Network
23
1.4 The OSI Reference Model
• OSI Reference Model – an internationally
standardised network architecture.
• An abstract representation of an ideal network
protocol stack; not used in real networks.
• OSI = Open Systems Interconnection.
• Specified in ISO 7498-1.
• Model has 7 layers.
24
Internet Protocols vs OSI
5
Application
Application
7
Presentation
6
Session
5
4
3
TCP
Transport
4
IP
Network
3
2
Network Interface
Data Link
2
1
Hardware
Physical
1
25
The OSI Model
Layer 7
Application Layer
Layer 6
Presentation Layer
Layer 5
Session Layer
Layer 4
Transport Layer
Layer 3
Network Layer
Layer 2
Data Link Layer
Layer 1
Physical Layer
26
Lower/Upper Layers
• Layers 1-4 often referred to as lower layers.
• Layers 5-7 are the upper layers.
• Lower layers relate more closely to the
communications technology.
• Layers 1 – 3 manage the communications
subnet.
– the entire set of communications nodes required to
manage comms. between a pair of machines.
• Layers 4 – 7 are true ‘end-to-end’ protocols.
• Upper layers relate to application.
27
Layer 7: Application Layer
• Home to wide variety of protocols for specific
user needs, e.g.:
–
–
–
–
virtual terminal service,
file transfer,
electronic mail,
directory services.
28
Layer 6: Presentation Layer
• Concerned with representation of transmitted
data.
• Deals with different data representations.
–
–
–
–
ASCII or EBCDIC,
one’s complement or two’s complement,
byte ordering conventions,
floating point conventions (IEEE or proprietary).
• Also deals with data compression.
29
Layer 5: Session Layer
• Allows establishment of sessions between
machines, e.g. to
– allow remote logins
– provide file transfer service.
• Responsible for:
– dialogue control
• which entity sends when with half-duplex communications.
– token management
• E.g. control which entity can perform an operation on
shared data.
– synchronisation
• E.g. insertion of checkpoints in large data transfers.
30
Layer 4: Transport Layer
• Basic function is to take data from Session
Layer, split it up into smaller units, and ensure
that the units arrive correctly.
• Concerned with efficient provision of service.
• The Transport Layer also determines the ‘type
of service’ to provide to the Session Layer.
31
Layer 3: Network Layer
• Key responsibility is control of routing in the
subnet.
• Routing can be based on:
– static tables,
– determined at start of session,
– highly dynamic (varying for each packet depending
on network load).
• Also responsible for congestion control and
usage monitoring.
32
Layer 2: Data Link Layer
• Provides reliable, error-free service on top of
raw Layer 1 service.
• Breaks data into frames. Requires creation of
frame boundaries.
• Frames used to manage errors via
acknowledgements and selective frame
retransmission.
33
Layer 1: Physical Layer
• Concerned with bit transmission over physical
channel.
• Issues include:
– definition of 0/1,
– whether channel simplex/duplex,
– connector design.
• Mechanical, electrical, procedural matters.
34
Services in the OSI Model
• In OSI model, each layer provide services to
layer above, and ‘consumes’ services provided
by layer below.
• Active elements in a layer are called entities.
• Entities in same layer in different machines are
called peer entities.
35
Layering Principles
n+1
PDU
(n+1) Entity
Service User
SDU
(n) Entity
Service Provider
Layer n+1 protocol
Layer n Service
Access Point (SAP)
Layer n protocol
N-1
PDU
(n+1) Entity
Service User
(n) Entity
Service Provider
N-1
PDU
PDU - Protocol Data Unit
SDU - Service Data Unit
36
Services and Protocols
• Service = set of primitives provided by one
layer to layer above.
• Service defines what layer can do (but not how
it does it).
• Protocol = set of rules governing data
communication between peer entities, i.e.
format and meaning of frames/packets.
• Service/protocol decoupling very important.
37
Connections
• Layers can offer connection-oriented or
connectionless services.
• Connection-oriented like telephone system.
• Connectionless like postal system.
• Each service has an associated Quality-ofservice (e.g. reliable or unreliable).
38
Reliability Issues
• Reliable services never lose/corrupt data.
• Reliable service costs more.
• Typical application for reliable service is file
transfer.
• Typical application not needing reliable service
is voice traffic.
• Not all applications need connections.
39
IC3 - Network Security
Lecture 1, Part 2
Introduction to Network Security
40
Objectives of Lecture
CINS/F1-01
• Understand why security should be a
fundamental consideration when designing and
operating networks.
• Examine the primary enabling threats and
fundamental threats to security for networks.
• Introduce security services and mechanisms,
and show how they can be used to counter
threats.
• Study the provision of security services at
different network layers in ISO7498-2.
41
Contents
1.5
1.6
1.7
1.8
1.9
Why network security?
Security policies for networks
Security threats for networks
Security services and mechanisms
Security services and layers
42
1.5 Why Network Security?
• Businesses and individuals are increasingly reliant on
networks of all kinds for day-to-day operations:
– E-mail used in preference to letter, fax, telephone for many
routine communications.
– B2B and C2B e-commerce still growing rapidly, despite the
bursting of the Internet bubble.
– Internet as a vast repository of information of all kinds:
competitors and their prices, stock markets, cheap flights,….
– Increasing automation of supply chains of all kinds: from
supermarkets to aircraft components.
– Utility companies control plant, banks move money,
governments talk to citizens over networks.
43
Why Network Security?
• Networks are becoming increasingly inter-connected
and the concept of identity more and more blurred:
– If I send sensitive data over my internal network, then who else
can see it or even alter it? My employees? My competitors?
– Can a hacker who gets into my internal network then get
access to other resources (computer accounts, stored data)?
Can he use my network as a stepping-off point for further
attacks? I am then liable?
– A compelling Internet presence is essential for my company,
but if someone can see my website, can they alter it too?
– How can I trust that this website is that of a reputable company
and not one who will steal my credit card details?
– Who has my personal information and what are they doing with
it?
44
Why Network Security?
• Safeguarding the confidentiality, integrity and
availability of data carried on these various networks is
therefore essential.
• Authenticity and accountability are often also important:
who did what and when?
• It’s not only about security of Internet-connected
systems.
– Insider threats are often more potent than threats originating on
the Internet.
• It’s not only about TCP/IP networks.
– Many networks use special-purpose protocols and
architectures.
– However TCP/IP dominates in LANs and the Internet.
45
1.6 Security Policies for Networks
• In this and the following sections, we follow the
approach of ISO7498-2
– a companion document to ISO7498-1 (the seven
layer model),
– provides a useful overview of the security issues
pertinent to networks,
– also equips us with a handy set of definitions to fix
our terminology.
46
Security Policies for Networks
• In a secure system, the rules governing
security behaviour should be made explicit in
the form of an Information Security Policy.
• Security policy: ‘the set of criteria for the
provision of security services’.
• Security domain: the scope of a security policy.
47
Security Policies for Networks
• A network security policy should interpret the
overall Information Security Policy in the
context of the networked environment:
• Defines what is the responsibility of the network
and what is not.
• Describes what security is to be available from
the network.
• Describes rules for using the network.
• Describes who is responsible for the
management and security of the network.
48
Generic Security Policy
• A generic authorisation policy (from ISO 74982):
‘Information may not be given to, accessed by, nor
permitted to be inferred by, nor may any resource be
used by, those not appropriately authorised.’
• Possible basis for more detailed policy: needs
lots of refinement to produce final document:
– What information?
– What resources?
– Who is authorised and for what?
49
The Security Life-Cycle
• A generic model for the security life-cycle,
including network security issues, is as follows:
– define security policy,
– analyse security threats (according to policy) and
associated risks, given existing safeguards,
– define security services to meet/reduce threats, in
order to bring risks down to acceptable levels,
– define security mechanisms to provide services,
– provide on-going management of security.
50
1.7 Security Threats for Networks
• A threat is:
– a person, thing, event or idea which poses some
danger to an asset (in terms of confidentiality,
integrity, availability or legitimate use).
– a possible means by which a security policy may be
breached.
• An attack is a realisation of a threat.
• Safeguards are measures (e.g. controls,
procedures) to protect against threats.
• Vulnerabilities are weaknesses in safeguards.
51
Risk
• Risk is a measure of the cost of a vulnerability
(taking into account probability of a successful
attack).
• Risk analysis determines whether expenditure
on (new/better) safeguards is warranted.
• Risk analysis can be quantitative or qualitative.
52
Threats
Threats can be classified as:
• deliberate (e.g. hacker penetration);
• accidental (e.g. a sensitive file being sent to the
wrong address).
Deliberate threats can be further sub-divided:
• passive (e.g. monitoring, wire-tapping);
• active (e.g. changing the value of a financial
transaction).
• In general passive threats are easier to realise
than active ones.
53
Fundamental Threats
• Four fundamental threats (matching four
‘standard’ security goals: confidentiality,
integrity, availability, legitimate use):
–
–
–
–
Information leakage,
Integrity violation,
Denial of service,
Illegitimate use.
(There are other ways to classify threats)
54
Fundamental Threat Examples
• Information Leakage
– Prince Charles mobile phone calls, 1993.
• Integrity violation
– USA Today, falsified reports of missile attacks on
Israel, 7/2002.
• Denial of service
– Yahoo, 2/2000, 1Gbps.
• Illegitimate use
– Vladimir Levin, Citibank, $3.7M, 1995.
55
Primary Enabling Threats
• Realisation of any of these primary enabling
threats can lead directly to a realisation of a
fundamental threat:
–
–
–
–
–
Masquerade,
Bypassing controls,
Authorisation violation,
Trojan horse,
Trapdoor.
• First three are penetration threats, last two are
planting threats.
56
Primary Enabling Threat Examples
• Masquerade
– Royal Opera House web site, 8/2002 – Information
Leakage
• Bypassing controls
– ADSL modem passwords – Illegitimate Use
• Authorisation violation
– Cross site scripting – Information Leakage
• Trojan horse
– PWSteal.Trojan, 1999 – Information Leakage
• Trapdoor
– Ken Thompson, Unix login – Reflections on Trusting
Trust, 1975 - Illegitimate Use
57
1.8 Security Services and Mechanisms
• A security threat is a possible means by which
a security policy may be breached (e.g. loss of
integrity or confidentiality).
• A security service is a measure which can be
put in place to address a threat (e.g. provision
of confidentiality).
• A security mechanism is a means to provide a
service (e.g. encryption, digital signature).
58
Security Service Classification
• Security services in ISO 7498-2 are a special
class of safeguard applying to a
communications environment.
• Five main categories of security service:
– Authentication (including entity authentication and
origin authentication),
– Access control,
– Data confidentiality,
– Data integrity,
– Non-repudiation.
59
Authentication
• Entity authentication provides checking of a
claimed identity at a point in time.
• Typically used at start of a connection.
• Addresses masquerade and replay threats.
• Origin authentication provides verification of
source of data.
• Does not protect against replay or delay.
• Lots of examples in Lectures 4, 5 and 6 on
secure protocols.
60
Access Control
• Provides protection against unauthorised use
of resource, including:
– use of a communications resource,
– reading, writing or deletion of an information
resource,
– execution of a processing resource.
• Example: file permissions in Unix/NT file
systems.
61
Data Confidentiality
• Protection against unauthorised disclosure of
information.
• Four types:
–
–
–
–
Connection confidentiality,
Connectionless confidentiality,
Selective field confidentiality,
Traffic flow confidentiality.
• Example: Internet banking session.
• Example: encrypting routers as part of Swift
funds transfer network.
62
Data Integrity
• Provides protection against active threats to the
validity of data.
• Five types:
–
–
–
–
–
Connection integrity with recovery,
Connection integrity without recovery,
Selective field connection integrity,
Connectionless integrity,
Selective field connectionless integrity.
• Example: MD5 hashes on software
http://www.apache.org/dist/httpd/binaries/linux/
• Example: AH protocol in IPSec (Lecture 5).
63
Non-repudiation
• Protects against a sender of data denying that
data was sent (non-repudiation of origin).
• Protects against a receiver of data denying that
data was received (non-repudiation of delivery).
• Example: analagous to signing a letter and
sending via recorded delivery.
• Example: signatures in S/MIME secure e-mail
system (Lecture 9).
64
Security Mechanisms
• Exist to provide and support security services.
• Can be divided into two classes:
– Specific security mechanisms, used to provide
specific security services, and
– Pervasive security mechanisms, not specific to
particular services.
65
Specific Security Mechanisms
• Eight types:
–
–
–
–
–
–
–
–
encipherment,
digital signature,
access control mechanisms,
data integrity mechanisms,
authentication exchanges,
traffic padding,
routing control,
notarisation.
66
Specific Mechanisms 1
• Encipherment mechanisms = encryption
algorithms.
– Can provide data and traffic flow confidentiality.
• Digital signature mechanisms
– signing procedure (private),
– verification procedure (public).
– Can provide non-repudiation, origin authentication
and data integrity services.
• Both can be basis of some authentication
exchange mechanisms.
67
Specific Mechanisms 2
• Access Control mechanisms
– A server using client information to decide whether
to grant access to resources
• E.g. access control lists, capabilities, security labels.
• Data integrity mechanisms
– Protection against modification of data.
• Provide data integrity and origin authentication services.
Also basis of some authentication exchange mechanisms.
• Authentication exchange mechanisms
– Provide entity authentication service.
– Covered in detail in Lecture 4.
68
Specific Mechanisms 3
• Traffic padding mechanisms
– The addition of ‘pretend’ data to conceal real volumes of data
traffic.
– Provides traffic flow confidentiality.
• Routing control mechanisms
– Used to prevent sensitive data using insecure channels.
– E.g. route might be chosen to use only physically secure
network components.
• Notarisation mechanisms
– Integrity, origin and/or destination of data can be guaranteed by
using a 3rd party trusted notary.
• Notary typically applies a cryptographic transformation to the data.
69
Pervasive Security Mechanisms
• Five types identified:
–
–
–
–
–
trusted functionality,
security labels,
event detection,
security audit trail,
security recovery.
70
Pervasive Mechanisms 1
• Trusted functionality
– Any functionality providing or accessing security
mechanisms should be trustworthy.
– May involve combination of software and hardware.
• Security labels
– Any resource (e.g. stored data, processing power,
communications bandwidth) may have security label
associated with it to indicate security sensitivity.
– Similarly labels may be associated with users.
Labels may need to be securely bound to
transferred data.
71
Pervasive Mechanisms 2
• Event detection
– Includes detection of
• attempted security violations,
• legitimate security-related activity.
– Can be used to trigger event reporting (alarms), event logging,
automated recovery.
• Security audit trail
– Log of past security-related events.
– Permits detection and investigation of past security breaches.
• Security recovery
– Includes mechanisms to handle requests to recover from
security failures.
– May include immediate abort of operations, temporary
invalidation of an entity, addition of entity to a blacklist.
72
Services Versus Mechanisms
• ISO 7498-2 indicates which mechanisms can
be used to provide which services.
• Illustrative NOT definitive.
• Omissions include:
– use of integrity mechanisms to help provide
authentication services,
– use of encipherment to help provide non-repudiation
service (as part of notarisation).
73
Service/Mechanism Table 1
Mechanism Encipherment
Y
Y
Service
Entity authentication
Origin authentication
Access control
Connection confidentiality
Connectionless confidentiality
Selective field confidentiality
Traffic flow confidentiality
Connection integrity with recovery
Connection integrity without recovery
Selective field connection integrity
Connectionless integrity
Selective field connectionless integrity
Non-repudiation of origin
Non-repudiation of delivery
Digital
sign.
Y
Y
Access
Control
Data
integrity
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
74
Service/Mechanism Table 2
Mechanism Auth.
exchange
Y
Service
Entity authentication
Origin authentication
Access control
Connection confidentiality
Connectionless confidentiality
Selective field confidentiality
Traffic flow confidentiality
Connection integrity with recovery
Connection integrity without recovery
Selective field connection integrity
Connectionless integrity
Selective field connectionless integrity
Non-repudiation of origin
Non-repudiation of delivery
Traffic
padding
Routing
Control
Notarisation
Y
Y
Y
Y
Y
Y
75
1.9 Security Services And Layers
• ISO 7498-2 lays down which security services
can be provided in which of the 7 layers.
• Layers 1 and 2 may only provide confidentiality
services.
• Layers 3/4 may provide many services.
• Layer 7 may provide all services.
• A set of principles dictate which services
can/should be provided at which layers.
• We’ll return to this issue in Lectures 5 and 6.
76
Service/Layer Table
Layer
Service
Entity authentication
Origin authentication
Access control
Connection confidentiality
Connectionless confidentiality
Selective field confidentiality
Traffic flow confidentiality
Connection integrity with recovery
Connection integrity without recovery
Selective field connection integrity
Connectionless integrity
Selective field connectionless integrity
Non-repudiation of origin
Non-repudiation of delivery
Layer
1
Layer
2
Y
Y
Y
Y
Layer
3
Y
Y
Y
Y
Y
Layer
4
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Layer
5/6
Layer
7
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
77