Security AFNOG 3 Workshop. Main Security Concerns ● Confidentiality ● Keeping our data safe from prying eyes ● Integrity ● Protecting our data from loss.

Slides:



Advertisements
Similar presentations
Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
Advertisements

DNSSEC Cryptography Review DNSSEC Tutorial February 21, 2011 Hong Kong Will.i.am Hervey Allen.
CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography.
NSRC Workshop Some fundamental security concerns... Confidentiality - could someone else read my data? Integrity - has my data been changed? Authentication.
1 Supplement III: Security Controls What security services should network systems provide? Confidentiality Access Control Integrity Non-repudiation Authentication.
COEN 350: Network Security Authentication. Between human and machine Between machine and machine.
Department of Information Engineering1 Major Concerns in Electronic Commerce Authentication –there must be proof of identity of the parties in an electronic.
Mar 12, 2002Mårten Trolin1 This lecture Diffie-Hellman key agreement Authentication Certificates Certificate Authorities SSL/TLS.
Security through Cryptography PacNOG 6 Hervey Allen.
Lesson Title: Introduction to Cryptography Dale R. Thompson Computer Science and Computer Engineering Dept. University of Arkansas
1 Chapter 11: Authentication Basics Passwords. 2 Establishing Identity Authentication: binding of identity to subject One or more of the following –What.
Cryptography Basic (cont)
BY MUKTADIUR RAHMAN MAY 06, 2010 INTERODUCTION TO CRYPTOGRAPHY.
Secure communications Week 10 – Lecture 2. To summarise yesterday Security is a system issue Technology and security specialists are part of the system.
Apr 22, 2003Mårten Trolin1 Agenda Course high-lights – Symmetric and asymmetric cryptography – Digital signatures and MACs – Certificates – Protocols Interactive.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Cryptography April 20, 2010 MIS 4600 – MBA © Abdou Illia.
Network Security – Part 2 V.T. Raja, Ph.D., Oregon State University.
Network Security. Contents Security Requirements and Attacks Confidentiality with Conventional Encryption Message Authentication and Hash Functions Public-Key.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Cryptography 101 Frank Hecker
Cryptographic methods: Recommended reading: "Applied Cryptography", Bruce Schneier Brian Candler Updated by Hervey Allen ccTLD Workshop Apia, Samoa.
DNSSEC Cryptography Review Track 2 Workshop July 3, 2010 American Samoa Hervey Allen.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
Computer Security Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
E0: Unix System Administration AfNOG 2006 Nairobi, Kenya Security introduction Brian Candler Presented by Hervey Allen.
Lecture 19 Page 1 CS 111 Online Symmetric Cryptosystems C = E(K,P) P = D(K,C) E() and D() are not necessarily the same operations.
May 2002Patroklos Argyroudis1 A crash course in cryptography and network security Patroklos Argyroudis CITY Liberal Studies.
Network Security – Part 2 (Continued) Lecture Notes for May 8, 2006 V.T. Raja, Ph.D., Oregon State University.
Some Practical Security AfNOG 2004 Workshop Hervey Allen May 2004 Liberal borrowing from Brian Candler.
Security & Cryptographic Methods AfNOG 2007 April 25-26, 2007 Abuja, Nigeria Hervey Allen.
Cryptography, Authentication and Digital Signatures
Cryptographic methods: Recommended reading: Applied Cryptography, Bruce Schneier PacNOG I Workshop Presented by Hervey Allen Materials originally by Brian.
Lecture 19 Page 1 CS 111 Online Authentication for Operating Systems What is authentication? How does the problem apply to operating systems? Techniques.
Module 3 – Cryptography Cryptography basics Ciphers Symmetric Key Algorithms Public Key Algorithms Message Digests Digital Signatures.
1 Chapter 11: Authentication Basics Passwords. 2 Establishing Identity Authentication: binding of identity to subject One or more of the following –What.
Internet-security.ppt-1 ( ) 2000 © Maximilian Riegel Maximilian Riegel Kommunikationsnetz Franken e.V. Internet Security Putting together the.
Network Security David Lazăr.
Symmetric Cryptography, Asymmetric Cryptography, and Digital Signatures.
Encryption Questions answered in this lecture: How does encryption provide privacy? How does encryption provide authentication? What is public key encryption?
Public / Private Keys was a big year… DES: Adopted as an encryption standard by the US government. It was an open standard. The NSA calls it “One.
Chapter 8 – Network Security Two main topics Cryptographic algorithms and mechanisms Firewalls Chapter may be hard to understand if you don’t have some.
Privacy versus Authentication Confidentiality (Privacy) –Interceptors cannot read messages Authentication: proving the sender’s identity –The Problem of.
Lecture 2: Introduction to Cryptography
COEN 350: Network Security Authentication. Between human and machine Between machine and machine.
TCP/IP Protocol Suite 1 Chapter 30 Security Credit: most slides from Forouzan, TCP/IP protocol suit.
14-1 Last time Internet Application Security and Privacy Basics of cryptography Symmetric-key encryption.
Security fundamentals Topic 4 Encryption. Agenda Using encryption Cryptography Symmetric encryption Hash functions Public key encryption Applying cryptography.
Network Security Continued. Digital Signature You want to sign a document. Three conditions. – 1. The receiver can verify the identity of the sender.
Public Key Encryption, Secure WWW Transactions & Digital Signatures.
© Copyright 2009 SSLPost 01. © Copyright 2009 SSLPost 02 a recipient is sent an encrypted that contains data specific to that recipient the data.
 Encryption provides confidentiality  Information is unreadable to anyone without knowledge of the key  Hashing provides integrity  Verify the integrity.
This courseware is copyrighted © 2016 gtslearning. No part of this courseware or any training material supplied by gtslearning International Limited to.
ENGR 101 Compression and Encryption. Todays Lecture  Encryption  Symmetric Ciphers  Public Key Cryptography  Hashing.
@Yuan Xue Case Study (Mid-term question) Bob sells BatLab Software License Alice buys BatLab Credit card information Number of.
Security & Cryptographic Methods
Security & Cryptographic Methods ccTLD Workshop November 27, 2007 Amman, Jordan Hervey Allen.
Security & Cryptographic Methods
Web Applications Security Cryptography 1
Outline The basic authentication problem
Some Practical Security
Secure Sockets Layer (SSL)
PPP – Point to Point Protocol
Security introduction
Security through Encryption
Outline Using cryptography in networks IPSec SSL and TLS.
Cryptographic methods:
Chapter 8 roadmap 8.1 What is network security?
Presentation transcript:

Security AFNOG 3 Workshop

Main Security Concerns ● Confidentiality ● Keeping our data safe from prying eyes ● Integrity ● Protecting our data from loss or unauthorised alteration ● Authentication and Authorisation ● Is this person who they claim to be? ● Is this person allowed to do this? ● Availability ● Are our systems working when we need them? (Denial of Service)

Security Implications of connecting to the Internet ● The Internet lets you connect to millions of hosts ● but they can also connect to you! ● Many points of access (e.g. telephone, X25) ● even if you can trace an attack to a point on the Internet, the real source may be untraceable ● Your host runs many Internet services ● many potential points of vulnerability ● many servers run as "root" !

Network-based attacks ● Passive attacks ● e.g. packet sniffers, traffic analysis ● Active attacks ● e.g. connection hijacking, IP source spoofing, exploitation of weaknesses in IP stack or applications ● Denial of Service attacks ● e.g. synflood ● Attacks against the network itself ● e.g. smurf

Other common attacks ● Brute-force and Dictionary attacks (password guessing) ● Viruses ● Trojan horses ● Humans are often the weakest link ● "Hi, this is Bob, what's the root password?"

Authentication: Passwords ● Can be guessed ● If too complex, users tend to write them down ● If sent unencrypted, can be "sniffed" from the network and re-used

Choosing good passwords ● Combinations of upper and lower-case letters, numbers and symbols ● 'brute force' attacker has to try many more combinations ● Not in any dictionary, including hackers dictionaries $40&yc4f "Money for nothing and your chicks for free" wsR!vst? "workshop students aRe not very sleepy today ?"

Authentication: Source IP address ● Not verified by the network (since not used in datagram delivery) ● Datagrams are easily forged ● TCP 3-way handshake gives some degree of protection, as long as you can't guess TCP sequence numbers ● Legitimate example: controlling SMTP relaying by source IP address ● Any UDP protocol is completely vulnerable ● e.g. NFS

Authentication: Host name ● Very weak ● DNS is easily attacked (e.g. by loading false information into cache) ● Slight protection by ensuring that reverse and forward DNS matches ● e.g. Connection received from ● Lookup > noc.ws.afnog.org ● Lookup noc.ws.afnog.org -> ● This is why many sites won't let you connect unless your forward and reverse matches

Cryptographic methods ● Can provide REALLY SECURE solutions to authentication, privacy and integrity ● Some are hard to implement, many different tools, usually requires special clients ● Export and usage restrictions (less of a problem these days) ● Take care to understand where the weaknesses lie

Simple combinations ● The lock on your front door can be picked ● Two locks are better than one ● The thief is more likely to try somewhere else

IP source address AND password authentication ● You can use "tcp wrappers" (/etc/hosts.allow) to add IP source authentication to any service run from inetd ● For info and examples: man 5 hosts_access ● The application also typically has password authentication

Exercise ● Enable telnet (note: bad idea!) ● Uncomment telnet... tcp line in /etc/inetd.conf ● killall -1 inetd ● Check other people can telnet to your machine ● Now restrict access to only yourself and your neighbour ● Add two lines to top of /etc/hosts.allow ● telnetd : , : allow ● telnetd : ALL : deny ● Get someone on a different row to try to telnet to you. What happens if you telnet to ?

UNDERSTAND what you're doing ● A bad security solution is worse than no security at all ● Know what you're doing ● Read all the documentation ● Read sample configurations ● Build test machines ● Ask questions ● Join the announcements mailing list for your O/S and applications ● Test what you've done ● Try connecting from outside your network ● Try circumventing your own rules

Summary ● Disable all services which are not needed ● Apply security patches promptly; join the announcement mailing lists ● Good password management ● Combine passwords with IP access controls where possible ● Use cryptographic methods where possible

Cryptographic methods: Three important components of cryptographicsystems Recommended reading: "Applied Cryptography", Bruce Schnier

1. "Private key" or "symmetric" ciphers clear text clear text k k cipher text The same key is used to encrypt the document before sending and decrypt it at the far end

We assume an eavesdropper is able to intercept the ciphertext ● How can they recover the cleartext?

Examples of symmetric ciphers ● DES - 56 bit key length, designed by US security service ● 3DES - effective key length 112 bits ● AES (Advanced Encryption Standard) to 256 bit key length ● Blowfish bits, optimised for fast operation on 32-bit microprocessors ● IDEA bits, patented (requires a licence for commercial use)

Features of symmetric ciphers ● Fast to encrypt and decrypt, suitable for large volumes of data ● A well-designed cipher is only subject to brute-force attack; the strength is therefore directly related to the key length ● Current recommendation is a key length of at least 90 bits ● i.e. to be fairly sure that your data will be safe for at least 20 years ● Problem - how do you distribute the keys?

2. "Hashing" - one-way encryption clear text Munging the document gives a short "message digest" (checksum). Not possible to go back from the digest to the original document. Fixed length "message digest" hashing function

Examples ● Unix crypt() function ● MD5 (Message Digest 5) bit hash ● SHA1 (Secure Hash Algorithm) bits ● No two documents have yet been discovered which have the same MD5 digest! ● No feasible method to create any document which has a given MD5 digest

So what use is that? a. Integrity checks ● You can run many megabytes of data through MD5 and still get only 128 bits to check ● An attacker cannot feasibly modify your file and leave it with the same MD5 checksum ● Gives your document a unique "fingerprint"

Exercise ● Exercise: on your machine type ● cat /etc/motd ● Look at your neighbour's machine. Is their file exactly the same as yours? Can you be sure? ● md5 /etc/motd ● Compare the result with your neighbour ● Now change ONE character in /etc/motd and repeat the md5 test ● Under Linux the command is "md5sum”

So what use is that? b. Encrypted password storage ● We don't want to keep cleartext passwords if possible; the password file would be far too attractive a target ● Store hash(passwd) in /etc/master.passwd ● When user logs in, calculate the hash of the password they have given, and compare it to the hash in the password file ● If the two hashes match, the user must have entered the correct password

So what use is that? c. Shared secret authentication ● Using hashing, a user can prove that they possess a password, without actually sending it over the wire ● Usually called a "shared secret" in this case Server Client Challenge hash(Challenge + Secret) Server recalculates the hash using the challenge it sent and its local copy of the secret. OK if both hashes match.

Notes on shared secret authentication ● Examples: APOP, CRAM-MD5 ● Sniffer cannot see the secret - but they can see the challenge and hash of (challenge + secret). This will allow them to try dictionary and brute-force attacks to recover the secret. ● The secret must be stored in PLAIN TEXT on the server for this method to work.

So what use is that? d. Generating encryption keys ● Users cannot remember 128 bit binary encryption keys ● However they can remember "passphrases" ● A hash can be used to convert a passphrase into a fixed-length encryption key ● The longer the passphrase, the more "randomness" it contains and the harder to break. English text is typically only 1.3 bits of randomness per character.

Generating encryption keys Passphrase entered by user 128-bit key MD5 hash Every passphrase generates a different 128-bit key

So what use is that? e. one-time passwords ● S/Key (OPIE) ● Cryptocard

So what use is that? f. Registering copyright ● By giving someone the MD5 digest of a document, I can prove that I possessed the document at that time, without having to reveal its contents until later ● Lots of other uses

3. "Public key" ciphers clear text clear text k 1 (public key) k 2 (private key) cipher text One key is used to encrypt the document, a different key is used to decrypt it

Public key and Private key ● The Public key and Private key are mathematically related (generated as a pair) ● It is easy to convert the Private key into the Public key. It is not easy to do the reverse. ● Key distribution problem is solved: you can post your public key anywhere. People can use it to encrypt messages to you, but only the holder of the private key can decrypt them. ● Examples: RSA, Elgamal (DSA)

Use for authentication: reverse the roles of the keys clear text clear text k 2 (private key) k 1 (public key) cipher text If you can decrypt the document with the public key, it proves it was written by the owner of the private key (and was not changed)

Protecting the private key ● The security of the private key is paramount: keep it safe! ● Keep it on a floppy or a smartcard? ● Prefer to keep it encrypted if on a hard drive ● That means you have to decrypt it (using a passphrase) each time you use it ● An attacker would need to steal the file containing the private key, AND know or guess the passphrase

Protecting the private key k 2 (encrypted on disk) Passphrase entered by user k 2 ready for use hash symmetric cipher key

Key lengths ● Attacks on public key systems involve mathematical attempts to convert the public key into the private key. This is more efficient than brute force. ● Recent developments suggest that 1024-bit keys might not be secure for long ● Recommend using 2048-bit keys

Public key cryptosystems require a lot of computation ● So we use some tricks to minimise the amount of data which is encrypted

When encrypting: ● Use a symmetric cipher with a random key (the "session key"). Use a public key cipher to encrypt the session key and send it along with the encrypted document. K1 K2 encrypted session key cipher text random session key ksskss ksskss

When authenticating: ● Take a hash of the document and encrypt only that. An encrypted hash is called a "digital signature" K2 K1 digital signature COMPARE hash

Digital Signatures have many uses... ● E-commerce. An instruction to your bank to transfer money can be authenticated with a digital signature. ● Legislative regimes are slow to catch up ● A trusted third party can issue declarations such as "the holder of this key is a person who is legally known as Alice Hacker" ● like a passport binds your identity to your face ● Such a declaration is called a "certificate" ● You only need the third-party's public key to check the signature

Where can you apply these cryptgraphic methods? ● At the link layer ● PPP encryption ● At the network layer ● IPSEC ● At the transport layer ● TLS (SSL) ● At the application layer ● SSH, PGP/GPG