00-12-14 Skerhet i Disposition distribuerade system IT-skerhet - - PDF document

00 12 14
SMART_READER_LITE
LIVE PREVIEW

00-12-14 Skerhet i Disposition distribuerade system IT-skerhet - - PDF document

00-12-14 Skerhet i Disposition distribuerade system IT-skerhet Skerhet i distribuerade system Elektronisk identitet Torbjrn Wiberg Krypteringsteknik Ume universitet PKI Infrastruktur fr certifikat


slide-1
SLIDE 1

00-12-14 Torbjörn Wiberg, UmU 1

00-12-14 Torbjörn Wiberg, UmU 1

Säkerhet i distribuerade system

Torbjörn Wiberg Umeå universitet Torbjorn.Wiberg@adm.umu.se

00-12-14 Torbjörn Wiberg, UmU 2

Disposition

IT-säkerhet Säkerhet i distribuerade system Elektronisk identitet Krypteringsteknik PKI – Infrastruktur för certifikat

00-12-14 Torbjörn Wiberg, UmU 3

IT-säkerhet

Syftet med IT-säkerhet är att upprätthålla

sekretess (secrecy, confidentiality) integritet tillgänglighet (availability)

… i systemets komponenter, dvs dess

maskiner program data

00-12-14 Torbjörn Wiberg, UmU 4

Sekretesskydd

Skydd mot obehörig access till data och system Det kan vara lagrade data eller data under överföring Hoten utgörs av bristande rutiner eller dåliga accesskydd, bristande rutiner eller dåliga behörighetskontrollsystem, oskyddade eller bristfälligt skyddade data vid överföringar

00-12-14 Torbjörn Wiberg, UmU 5

Integritetsskydd

Skydd mot otillåten/felaktig modifiering av data (och program) Hoten utgörs av felaktiga/illvilliga program, brister i filsystemet, fel/säkerhetsbrister i datakommunikationen En framgångsrik attack kan vara svår att upptäcka Komponenter i skyddet kan utgöras av kryptering eller digitala signaturer på data

00-12-14 Torbjörn Wiberg, UmU 6

Tillgänglighet

Attacker för att avbryta tillgången till en resurs (denial-of-service attack, DOS-attack) En sådan attack är ofta det första steget i en intrångsattack

  • verflow i buffertar kan leda till att

systemets behörighetskontroller sätts ur spel

slide-2
SLIDE 2

00-12-14 Torbjörn Wiberg, UmU 2

00-12-14 Torbjörn Wiberg, UmU 7

IT-säkerhet, forts

IT-säkerheten i ett datasystem hotas när komponenter i systemet (riskerar att) utsättas för (försök till)

intrång, avlyssning avbrott modifiering förfalskning

00-12-14 Torbjörn Wiberg, UmU 8

God IT-säkerhet

En förutsättning för god IT-säkerhet är att

ha kunskap om tänkbara säkerhetsrisker ha kunskap om möjliga åtgärder för att minska riskerna göra sårbarhetsanalyser av sina system,dvs att för varje system identifiera och dokumentera dess värde för organisationen, samt hot mot och brister i dess säkerhet göra prioriteringar bland tänkbara åtgärder för att begränsa sårbarheten. ha klargjort hur ansvaret för IT-säkerhet fördelas i organisationen och hur incidenter hanteras

00-12-14 Torbjörn Wiberg, UmU 9

Interception

00-12-14 Torbjörn Wiberg, UmU 10

Avbrott

00-12-14 Torbjörn Wiberg, UmU 11

Modifiering

00-12-14 Torbjörn Wiberg, UmU 12

Förfalskning

slide-3
SLIDE 3

00-12-14 Torbjörn Wiberg, UmU 3

00-12-14 Torbjörn Wiberg, UmU 13

Distribuerade system

I ett distribuerat system (DS) utgörs applikationen av program på en grupp samverkande men autonoma (självständiga) datorer. Ansatsen är ofta att ett program utformats för att erbjuda tjänster i det distribuerade systemet - att vara server i systemet. Programmen som utnyttjar serverns tjänster är dess klienter. En server kan vara klient hos andra servrar.

00-12-14 Torbjörn Wiberg, UmU 14

Distribuerade system, forts

De flesta av våra administrativa system är distribuerade klient/serversystem. Det finns önskemål om ökad samverkan mellan universiteten t.ex. antagning. Datornätens komponenter är DS

routing(vägvals)system domännamnsystemet - DNS

I ett DS samverkar olika företag och

  • rganisationer eventuellt i olika länder.

00-12-14 Torbjörn Wiberg, UmU 15

Säkerhet i distribuerade system

De speciella förutsättningarna för säkerhet i distribuerade system har accentuerat behovet av en genomtänkt IT- säkerhetsstrategi För ett distribuerat system måste man förutsätta

att fysiskt skydd av hela systemet inte kan upprätthållas att systemets svagheter därmed exponeras vitt

00-12-14 Torbjörn Wiberg, UmU 16

Säkerhetskomponenter i ett distribuerat system

I ett distribuerat system krävs att tillfredsställande produkter/rutiner för följande funktioner ingår:

autentisering av kommunikationens parter sekretessskyddad kommunikationskanal accesskontroll till applikationen integritetsskydd för data

00-12-14 Torbjörn Wiberg, UmU 17

Autentisering

Authenticate – establish the originality of

T.ex att avgöra en om en persons (eller ett program) är den den utger sig att vara Ex: Enkel autentisering - Användaren uppger sin användaridentitet och sitt lösenord, systemet avgör på grundval av dessa användarens identitet.

Grundbulten i ett DSs säkerhet Mål: Autentiseringen utförs av en mekanism som är fristående från applikationen Vi behöver alltså elektroniska identiteter

00-12-14 Torbjörn Wiberg, UmU 18

Elektronisk identitet

Vad är en elektronisk identitet? Hur kan en elektronisk identitet användas? I botten ligger krypteringsteknik Identiteten förvaras i ett certifikat Mera krypteringsteknik PKI – en infrastruktur för certifikat

slide-4
SLIDE 4

00-12-14 Torbjörn Wiberg, UmU 4

00-12-14 Torbjörn Wiberg, UmU 19

What is an Electronic Identity?

An electronic way to prove that You are You You identify Yourself and present Your chosen electronic identity to a trusted authority that issues a Certificate that certifies that the particular electronic identity belongs to You Trust has to be earned! Your identity is a pair of crypto keys for Public Key Cryptography

00-12-14 Torbjörn Wiberg, UmU 20

How Can an Electronic Identity Be Used?

It can be used to authenticate

You (to systems) documents or messages You have digitally signed systems You are responsible for

Authenticate – establish the originality of Non-repudiation – A process or method that ensures that once You have signed a document or identified Yourself to a system You can’t deny that

00-12-14 Torbjörn Wiberg, UmU 21

Legal Status

EU directive

Shall be implemented within two years Two levels of certificates An qualified signature shall be accepted in all states Supervising authority (Keep a list of issuers)

Swedish law

Law from Jan01 Qualified signatures shall always be accepted where a signature is required Issuers of qualified signatures has to inform the supervising authority

00-12-14 Torbjörn Wiberg, UmU 22

Elektronisk identitet

Vad är en elektronisk identitet? Hur kan en elektronisk identitet användas? I botten ligger krypteringsteknik Identiteten förvaras i ett certifikat Mera krypteringsteknik PKI – en infrastruktur för certifikat

00-12-14 Torbjörn Wiberg, UmU 23

Cryptography - Overview

Cryptography functions

Secret key (e.g., DES) Public key (e.g., RSA) Message digest (e.g., MD5)

Security Cryptography algorithms Public key (e.g., RSA) Secret key (e.g., DES) Message digest (e.g., MD5) Security services Authentication Privacy Message integrity 00-12-14 Torbjörn Wiberg, UmU 24

Public Key Cryptography

Public Key Cryptography It can be used to authenticate

Persons Signatures (documents) Systems

! (The same technique can be used to encipher data (to, for instance,exchange crypto keys))

slide-5
SLIDE 5

00-12-14 Torbjörn Wiberg, UmU 5

00-12-14 Torbjörn Wiberg, UmU 25

Public Key Cryptography?

What is it? Advantages Disadvantages Problems

00-12-14 Torbjörn Wiberg, UmU 26

Public Key Cryptography? - What Is It?

A pair of keys – one private (pr) and one public (pu) A cryptographic method that uses pairs

  • f keys with the property:

Dec (pu, Enc (pr, m)) = m = Dec (pr, Enc (pu, m)

You keep the private key to yourself and make the public key known The keys have to be carefully chosen

00-12-14 Torbjörn Wiberg, UmU 27

Public Key Cryptography? - (Dis)Advantages

All compared to shared (secret) key cryptography + You need only one pair of keys to use cryptography in communicating with many

  • The keys are longer (10x)
  • The Enc/Dec functions are often slow

00-12-14 Torbjörn Wiberg, UmU 28

Public Key Cryptography? - Problems

You have to make your key known! People getting your public key has to trust that it is Your key. There has to be a way of saying that your key shall no longer be used (revoke the key) when

Time has gone and you need a longer key You suspect that your key has been compromised

00-12-14 Torbjörn Wiberg, UmU 29

Elektronisk identitet

Vad är en elektronisk identitet? Hur kan en elektronisk identitet användas? I botten ligger krypteringsteknik Identiteten förvaras i ett certifikat Mera krypteringsteknik PKI – en infrastruktur för certifikat

00-12-14 Torbjörn Wiberg, UmU 30

The Public Key Is Stored in a Certificate

One way to make Your public key known is to store it in a certificate and publish it The certificate is signed By signing a certificate the signer certifies that the information in the certificate is correct The certifier has to be trusted

slide-6
SLIDE 6

00-12-14 Torbjörn Wiberg, UmU 6

00-12-14 Torbjörn Wiberg, UmU 31

The Content of a Certificate

Identity information Public key Validity period (not before, not after) Issuer Serial number Key usage

(digital signature, non-repudiation, key encipherment, ...)

! And remember – The certificate must be signed by someone that can be trusted.

00-12-14 Torbjörn Wiberg, UmU 32

Elektronisk identitet

Vad är en elektronisk identitet? Hur kan en elektronisk identitet användas? I botten ligger krypteringsteknik Identiteten förvaras i ett certifikat Mera krypteringsteknik PKI – en infrastruktur för certifikat

00-12-14 Torbjörn Wiberg, UmU 33

Cryptography

Public Key Cryptography? It can be used to authenticate

Persons Signatures (documents) Systems

! (The same technique can be used to encipher data (to, for instance,exchange crypto keys)) Cryptographical technique

00-12-14 Torbjörn Wiberg, UmU 34

Authentication of Persons

The authenticating entity A sends a challenge c to the person P P encrypts the challenge with the private key and sends it back

m = Enc (prP, c)

A decrypts m to retrieve the challenge c

c = Dec (puP, m)

To protect against replay attacks the challenge shall be short-lived

00-12-14 Torbjörn Wiberg, UmU 35

Authentication of Signatures

A digital signature is computed from the document, signature policy info, and

  • ther data (for instance a time stamp):

ds = Enc (pr, Hash (doc+))

Authentication of signature:

Dec (pu, ds) = Hash (doc+)

00-12-14 Torbjörn Wiberg, UmU 36

Authentication of Systems

The system S receives a challenge c (including a time stamp) from a user (or peer) It encrypts the challenge and returns it to the user

m = Enc (prS, c)

The user decrypts the message and retrieves the original challenge

c = Dec (puS, m)

slide-7
SLIDE 7

00-12-14 Torbjörn Wiberg, UmU 7

00-12-14 Torbjörn Wiberg, UmU 37

Cryptography

Public Key Cryptography? It can be used to authenticate

Persons Signatures (documents) Systems

! (The same technique can be used to encipher data (to, for instance,exchange crypto keys)) Cryptographical technique

00-12-14 Torbjörn Wiberg, UmU 38

Secret Key (DES)

Plaintext Encrypt with secret key Ciphertext Plaintext Decrypt with secret key

00-12-14 Torbjörn Wiberg, UmU 39

64-bit key (56-bits + 8- bit parity) 16 rounds

Initial permutation Round 1 Round 2 Round 16 56-bit key Final permutation …

+ F Li– 1 Ri– 1 Ri Ki Li

  • Each Round

DES

00-12-14 Torbjörn Wiberg, UmU 40

4-bit chunk Expanded to 6 bits by stealing a bit from left and right chunks

… … …

Bit Stealing

00-12-14 Torbjörn Wiberg, UmU 41

Repeat for larger messages

Block1 IV DES Cipher1 Block2 DES Block3 DES Block4 DES + Cipher2 Cipher3 Cipher4 + + +

DES (cont)

00-12-14 Torbjörn Wiberg, UmU 42

Public Key (RSA)

Encryption & Decryption

  • c = memod n
  • m = cdmod n

Plaintext Encrypt with public key Ciphertext Plaintext Decrypt with private key

slide-8
SLIDE 8

00-12-14 Torbjörn Wiberg, UmU 8

00-12-14 Torbjörn Wiberg, UmU 43

RSA (cont)

Choose two large prime numbers p and q (each 256 bits) Multiply p and q together to get n Choose the encryption key e, such that e and (p - 1) x (q - 1) are relatively prime. Compute decryption key d such that d = e-1mod ((p - 1) x (q - 1)) Construct public key as (e, n) Construct public key as (d, n) Discard (do not disclose) original primes p and q

00-12-14 Torbjörn Wiberg, UmU 44

Message Digest (Hash)

Cryptographic checksum

protects the receiver from malicious changes to the message.

One-way function

it is virtually impossible to figure out what message produced that checksum; it is not computationally feasible to find two messages that hash to the same cryptographic checksum.

00-12-14 Torbjörn Wiberg, UmU 45

Message Digest (cont)

Relevance

if you are given a checksum for a message and you are able to compute exactly the same checksum for that message, then it is highly likely this message produced the checksum you were given.

00-12-14 Torbjörn Wiberg, UmU 46

Transform Initial “ digest” (constant) Message (padded) Transform Transform Message digest 512 bits 512 bits 512 bits

… …

MD5 - ansats

00-12-14 Torbjörn Wiberg, UmU 47

Authentication Protocols

Three-way handshake Trusted third party Public key authentication

00-12-14 Torbjörn Wiberg, UmU 48

Three-way handshake

Client and Server already share secrets

CHK/SHK – client/server handshake key x – random number SK – chosen session key

Client Server C l i e n t I d , E ( x , C H K ) E(y + 1, CHK) E(SK, SHK) E(x + 1, SHK), E(y, SHK)

slide-9
SLIDE 9

00-12-14 Torbjörn Wiberg, UmU 9

00-12-14 Torbjörn Wiberg, UmU 49

Trusted third party (Kerberos)

A o B använder S för att autentisera sig A o B får bl.a en sessionsnyckel K med livslängd L av S A krypterar med K ett meddelande till B B svarar krypterat med K och med modifierad timestamp T

A S B E ( ( T , L , K , B ) , K

A),

E ( ( A , T ) , K ) , E ( ( T , L , K , A ) , K

B)

A , B E ( T + 1 , K ) E ( ( T , L , K , A ) , K

B) 00-12-14 Torbjörn Wiberg, UmU 50

A B E(x, PublicB) x

Public key authentication

A vill att B ska autentisera sig:

A skickar ett meddelande till B, krypterat med Bs publika nyckel B dekrypterar med sin privata nyckel och skickar tillbaka meddelandet

00-12-14 Torbjörn Wiberg, UmU 51

Message Integrity Protocols

Digital signature using RSA

special case of a message integrity where the code can only have been generated by one participant compute signature with private key and verify with public key

Keyed MD5

sender: m + MD5(m + k) + E(k, private) receiver

recovers random key using the sender’s public key applies MD5 to the concatenation of this random key message

00-12-14 Torbjörn Wiberg, UmU 52

Message Integrity Protocols (cont)

MD5 with RSA signature

sender: m + E(MD5(m), private) receiver

decrypts signature with sender’s public key compares result with MD5 checksum of sent message

00-12-14 Torbjörn Wiberg, UmU 53

Elektronisk identitet

Vad är en elektronisk identitet? Hur kan en elektronisk identitet användas? I botten ligger krypteringsteknik Identiteten förvaras i ett certifikat Mera krypteringsteknik PKI – en infrastruktur för certifikat

00-12-14 Torbjörn Wiberg, UmU 54

Public Key Infrastructure

What is it? Interoperability

Between PKIs Between IT-systems

Standardisation SwUPKI – A PKI for Swedish Universities and University Colleges

slide-10
SLIDE 10

00-12-14 Torbjörn Wiberg, UmU 10

00-12-14 Torbjörn Wiberg, UmU 55

Once Again –

What Does a Certificate Contain?

It is a special type of digitally signed document:

“I certify that the public key in this document belongs to the entity named in this document, signed X.”

It contains

serial number and validity period the name of the entity being certified the public key of the entity the name of the certification authority restrictions on key usage - (digital signature, non- repudiation, key encipherment, ...) a digital signature on the info in the certificate

00-12-14 Torbjörn Wiberg, UmU 56

Public Key Infrastructure – What is it?

Infrastructure for issuance, management, validation and distribution of certificates The IT-systems and users must trust and have the ability to use the PKI The implementation of a PKI must deal with

Organisation of CA work Certificate Management Certificate Use User Competence Development

00-12-14 Torbjörn Wiberg, UmU 57

Certification Authority

An administrative entity that issues and manages certificates The CA is of value only for those who holds the CA’s public key One CA in the PKI is the Policy CA The Policy CA (Root CA) issues certificates to other CAs in the PKI

00-12-14 Torbjörn Wiberg, UmU 58

PKI – For the Management and

Distribution of Certificates

Distribute Policy CA’s public key Issue (sign) Distribute Repository for (published) certificates Revocation Repository for revocation list Renewal (Key backup – not in SwUPKI)

00-12-14 Torbjörn Wiberg, UmU 59

Public Key Infrastructure – Trust

The PKI must be organised to earn the appropriate level of trust from

Subscribers of certificates Users of certificates (relying parties) Other PKIs

Certificate Policy - declaration

Compliance inspection Application and issuing Operation and technique Security Applicability Obligations Liability Services

00-12-14 Torbjörn Wiberg, UmU 60

Public Key Infrastructure –

Its Organisational Structure

Certification Authority (CA)

Trusted to issue & manage certificates

Certificate Policy (CP) Policy CA (PCA)

At the top of the CP hierarchy

Policy Management Authority (PMA)

Manages the CP and makes sure that the CAs comply with the CP

Certification Practice Statement (CPS)

PCA CA CA CA CA CA CA CA CA CA PKI - Supervised by the PMA CP CPS CPS

slide-11
SLIDE 11

00-12-14 Torbjörn Wiberg, UmU 11

00-12-14 Torbjörn Wiberg, UmU 61

Public Key Infrastructure –

Its Certificate Management Structure

  • Initialisation of client
  • Subscriber

Subject = Subscriber or system or role attributable to the subscriber

  • Proof of possession of

private key

  • Issuance and delivery of

certificate

  • Publication of certificate
  • Renewal

Keys Certificates

g

Cert / CRL Repository Subscriber

Initial Certification Key Pair Renewal Certificate Renewal Revocation Request a b Out-of-band Loading PKI Subscribers PKI Management Entities a b a b

RA CA

c d

i

Out-of-band Publishing g g Certificate Publishing Certificate Publishing Certificate/CRL Publishing

CA

e f Cross-certification Cross-certificate renewal j

00-12-14 Torbjörn Wiberg, UmU 62

Public Key Infrastructure –

Certificate Use Structure

  • Receive a signed document
  • Find and get the signer’s

public key certificate (PKC)

  • Validate the certificate by

following the validation path to a CA ”You trust”, that is

Signed by your CA In the same PKI as you Cross-certified with your PKI In a PKI you have decided to trust

Reposi- tory PCA CA CACA CA CACA CA CACA PKI-1 CP PCA CA CACA CA CACA CA CACA PKI-2 CP Trusted CA 1 2 3 4 5 6 7 "Our" PKI and CA

00-12-14 Torbjörn Wiberg, UmU 63

Key Distribution (cont)

Chain of Trust

if X certifies that a certain public key belongs to Y, and Y certifies that another public key belongs to Z, then there exists a chain of certificates from X to Z someone that wants to verify Z’s public key has to know X’s public key and follow the chain

Certificate Revocation List

00-12-14 Torbjörn Wiberg, UmU 64

Firewalls

Filter-Based Solution

example

( 192.12.13.14, 1234, 128.7.6.5, 80 ) (*,*, 128.7.6.5, 80 )

default: forward or not forward? how dynamic?

Rest of the Internet Local site Firewall

00-12-14 Torbjörn Wiberg, UmU 65

Proxy-Based Firewalls

Problem: complex policy Example: web server Solution: proxy Design: transparent vs. classical Limitations: attacks from within

Company net Firewall Web server Random external user Remote company user Internet

External client External HTTP/TCP connection Proxy Firewall Internal HTTP/TCP connection Local server

00-12-14 Torbjörn Wiberg, UmU 66

Sekretesskyddad kommunikationskanal

Kommunikationen mellan systemets parter ska inte kunna avlyssnas Sekretesskyddet upprätthålls med kryptering För att säkert komma överens om krypterings-nycklar kan information i certifikat utnyttjas Brister i sekretessen öppnar för t.ex återuppspelningsattacker på det distribuerade systemet

slide-12
SLIDE 12

00-12-14 Torbjörn Wiberg, UmU 12

00-12-14 Torbjörn Wiberg, UmU 67

Accesskontroll till applikationen

Accesskontroll eller behörighetskontroll Givet vilken person jag är ger systemet mig vissa rättigheter Med brister i behörighetskontrollen öppnas systemet för integritetsattacker mot systemets data