Internet Systems KCL Course
Internet Systems KCL Course
Outline
The particular risks posed by connecting a host to the
internet can be classified as:
Someone sends data to your host which causes it to do
something it shouldn't
Someone retrieves data from your host that they shouldn't have
access to
Someone captures (a copy of) the data communicated from you
to another host
First two are examples of illegitimate access to a host,
the last is eavesdropping
Security threats
Preventing illegitimate access can be split into two
issues
Authentication: Determining who is trying to gain access to your
host
Access Control: Determining whether that individual is allowed
to access a resource on your host
Access control is not particular to the internet
Authentication poses problems in an network with
billions of people you don't know
Illegitimate access
Authentication mechanisms of web servers prevent
illegitimate access to resources
Resources are often grouped into named realms, which
users can be allowed access to
They require clients to demonstrate who they are, from
extra data sent with their messages
Authentication
If a client tries to access a secured web server with no
authentication, it receives a response with status code:
401 Authentication Required
This tells the client to supply identification
Proof of identity
Basic authentication is indicated by the Basic scheme
being passed in the 401 response:
WWW-Authenticate: Basic realm="somerealm"
Password authentication
A digest of some data is a transformation of that data
into a fixed length string, from which the original cannot
be deduced
Use a digest wherever data across places or times need
to be compared to check they are the same: if digests
match this is almost proof
Value of algorithm depends on:
Difficulty of deducing original from digest
Lack of collisions: 2 messages with same digests
Digests
Digests are used in password authentication to send an
obscured version of a password from the sender to be
checked against that held by the receiver
Sender and receiver perform digest on same data,
including password as known by each, and receiver
compares results
Password digests
Receiver Sender
1. Create digest
of username
and password
Password digests
2. Send username
Receiver Sender
and digest
1. Create digest
of username
and password
Password digests
2. Send username
Receiver Sender
and digest
Password digests
2. Send username
Receiver Sender
and digest
Password digests
2. Send username
Receiver Sender
and digest
If digests
match,
strong evidence
of correct
5. Compare password 1. Create digest
digest created of username
with digest received and password
Password digests
MD5 is a digest function devised by Ronald L. Rivest
It takes an arbitrarily long string and produces a string of
fixed length, the digest
Collisions are possible in MD5
Can try it out with UNIX command md5sum
“digest” abfd2c0ecb4e9dec4a6b1159d5fea334
“Digest” 5a20c77381e982467465dd18facf0807
“digest ” e21681785dc42cfc30867e4fcf78edaf
MD5
1. Client tries to access a realm on the server
2. Server responds asking for authentication (HTTP 401)
using digests and providing a unique identifier, a
number used once (nonce), for the request
3. Client sends a digest of the concatenation of:
username, realm, password, URL, request method and nonce id
Eavesdropping
Encryption on the internet takes several forms:
Link encryption: Encrypts all communication across a physical
link, but it is expensive and unrealistic over large scale
Document encryption: Documents encrypted, sent, then
decrypted by document-handling applications
Transport Layer Security: TLS encrypts all messages at the
TCP layer
Encryption types
Both a digest and an encryption of a message are a
transformation of that message into some new data that
gives no clue to the original
The original message can be computed from the
encrypted data (decrypted) given the right information,
but this is not true of a digest
Two different messages can transform into the same
digest (a collision), but every encrypted message is
unique for the message
Receiver
Sender
Integrity: data
4. Decrypt data could only have 2. Encrypt data
with sender's been encrypted with own
public key by sender private key
RSA
1. Generate two large primes: p, q
2. Calculate the product: n = pq
3. Calculate the totient: m = (p - 1)(q - 1)
4. Find a co-prime to totient m: e
5. Choose integers d, i so that: d = (1 + im) / e
6. The public key is (n, e)
7. The private key is (n, d)
PGP algorithm
Secure Socket Layer (SSL) was developed by Netscape
Communications
It operates between host-to-host protocols (TCP) and
the application layer protocols (e.g. HTTP)
For each communication, SSL uses the most recent
secure communication protocol that both hosts can
support
Transport Layer Security (TLS) is a more recent
variation on SSL, standardised by IETF
Man-in-the-middle attacks
TLS operates over TCP, but under HTTP or other
application protocols
Inserts a new layer into the four-layer internet layering
model
This layer deals with the issue of secure communication
of application data
HTTPS
A digital certificate is a block of data about a
communicating host that is signed
Signing a certificate means adding an encrypted digest
of the host data, so that other hosts can check that:
You are who you say you are
The host data has not been tampered with
Digital certificates
Host data can include:
Public key
Validity period of certificate
URL of revocation centre
Name, institution, email address of owning user
Public key is used to secure communication to the host
Certificates are revoked if they are suspected of being
compromised (like credit cards)
Revocation centres provide lists of revoked certificates to check
against
Host data
A certification authority is an organisation responsible for
issuing and verifying the correctness of certificates
If a host's certificate is signed by a CA, then any other
host trusting the CA may reliably know that the
certificate's public key belongs to the host as stated
Publicly trusted CAs exist, such as VeriSign and CertCA
Certification authorities
Certificate
Authority
2. Create
certificate,
1. Send identifying Encrypt with own
information, host private key
data 3. Send
encrypted
certificate
Sender Receiver
1. Send digital
certificate
Sender Receiver
X.509
Internet security threats
HTTP authentication
Digests and encryption
Public key encryption
Pretty Good Privacy
Transport Layer Security and HTTPS
Digital certificates