Security & Cryptographic Methods PacNOG 6 Hervey Allen PacNOG 6 Hervey Allen.

Slides:



Advertisements
Similar presentations
Key Management. Shared Key Exchange Problem How do Alice and Bob exchange a shared secret? Offline – Doesnt scale Using public key cryptography (possible)
Advertisements

CP3397 ECommerce.
Grid Computing, B. Wilkinson, 20045a.1 Security Continued.
Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
Cryptography Chapter 7 Part 4 Pages 833 to 874. PKI Public Key Infrastructure Framework for Public Key Cryptography and for Secret key exchange.
Cryptography and Network Security
SSL CS772 Fall Secure Socket layer Design Goals: SSLv2) SSL should work well with the main web protocols such as HTTP. Confidentiality is the top.
Topic 8: Secure communication in mobile devices. Choice of secure communication protocols, leveraging SSL for remote authentication and using HTTPS for.
CSE 461 Section. “Transport Layer Security” protocol Standard protocol for encrypting Internet traffic Previously known as SSL (Secure Sockets Layer),
NSRC Workshop Some fundamental security concerns... Confidentiality - could someone else read my data? Integrity - has my data been changed? Authentication.
SSL & SharePoint IT:Network:Applications. Agenda Secure Socket Layer Encryption 101 SharePoint Customization SharePoint Integration.
1 Supplement III: Security Controls What security services should network systems provide? Confidentiality Access Control Integrity Non-repudiation Authentication.
15-1 Last time Internet Application Security and Privacy Public-key encryption Integrity.
Security+ Guide to Network Security Fundamentals, Third Edition Chapter 12 Applying Cryptography.
Lesson 12 Cryptography for E-Commerce. Approaches to Network Security Separate Security Protocol--SSL Application-Specific Security--SHTTP Security with.
Mar 12, 2002Mårten Trolin1 This lecture Diffie-Hellman key agreement Authentication Certificates Certificate Authorities SSL/TLS.
Security through Cryptography PacNOG 6 Hervey Allen.
 Authorization via symmetric crypto  Key exchange o Using asymmetric crypto o Using symmetric crypto with KDC  KDC shares a key with every participant.
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.
Encryption An Overview. Fundamental problems Internet traffic goes through many networks and routers Many of those networks are broadcast media Sniffing.
SSL By: Anthony Harris & Adam Shkoler. What is SSL? SSL stands for Secure Sockets Layer SSL is a cryptographic protocol which provides secure communications.
Elias M. Awad Third Edition ELECTRONIC COMMERCE From Vision to Fulfillment 13-1© 2007 Prentice-Hall, Inc ELC 200 Day 23.
Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE CSci530: Computer Security Systems Authentication.
Topic 11: Key Distribution and Agreement 1 Information Security CS 526 Topic 11: Key Distribution & Agreement, Secure Communication.
TLS/SSL Review. Transport Layer Security A 30-second history Secure Sockets Layer was developed by Netscape in 1994 as a protocol which permitted persistent.
INTRODUCTION Why Signatures? A uthenticates who created a document Adds formality and finality In many cases, required by law or rule Digital Signatures.
SSL Technology Overview and Troubleshooting Tips.
Cryptography 101 Frank Hecker
Cryptographic methods: Recommended reading: "Applied Cryptography", Bruce Schneier Brian Candler Updated by Hervey Allen ccTLD Workshop Apia, Samoa.
CSCI 6962: Server-side Design and Programming
DNSSEC Cryptography Review Track 2 Workshop July 3, 2010 American Samoa Hervey Allen.
Security & Cryptographic Methods Unix System Administration May 28, 2008 Rabat, Morocco Hervey Allen.
How HTTPS Works J. David Giese. Hyper Text Transfer Protocol BrowserHTTP Server GET / HTTP/1.1 HOST: edge-effect.github.io HEADERS BODY HTTP/ OK.
SYSTEM ADMINISTRATION Chapter 13 Security Protocols.
OpenVPN OpenVPN: an open source, cross platform client/server, PKI based VPN.
SSL and https for Secure Web Communication CSCI 5857: Encoding and Encryption.
Digital Certificates Made Easy Sam Lutgring Director of Informational Technology Services Calhoun Intermediate School District.
Secure Socket Layer (SSL)
SSL / TLS in ITDS Arun Vishwanathan 23 rd Dec 2003.
Lecture 23 Internet Authentication Applications modified from slides of Lawrie Brown.
Security & Cryptographic Methods AfNOG 2007 April 25-26, 2007 Abuja, Nigeria Hervey Allen.
Protecting Internet Communications: Encryption  Encryption: Process of transforming plain text or data into cipher text that cannot be read by anyone.
E-Commerce Security Professor: Morteza Anvari Student: Xiaoli Li Student ID: March 10, 2001.
Unit 1: Protection and Security for Grid Computing Part 2
Cryptographic methods: Recommended reading: Applied Cryptography, Bruce Schneier PacNOG I Workshop Presented by Hervey Allen Materials originally by Brian.
Certificate-Based Operations. Module Objectives By the end of this module participants will be able to: Define how cryptography is used to secure information.
1 Securing Data and Communication. 2 Module - Securing Data and Communication ♦ Overview Data and communication over public networks like Internet can.
1 Security Protocols in the Internet Source: Chapter 31 Data Communications & Networking Forouzan Third Edition.
Application Services COM211 Communications and Networks CDA College Theodoros Christophides
The TAOS Authentication System: Reasoning Formally About Security Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
Security fundamentals Topic 5 Using a Public Key Infrastructure.
Pertemuan #10 Secure HTTP (HTTPS) Kuliah Pengaman Jaringan.
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.
Digital Signatures and Digital Certificates Monil Adhikari.
Lecture 11 Overview. Digital Signature Properties CS 450/650 Lecture 11: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
Lecture 9 Overview. Digital Signature Properties CS 450/650 Lecture 9: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
Mar 28, 2003Mårten Trolin1 This lecture Certificates and key management Non-interactive protocols –PGP SSL/TLS –Introduction –Phases –Commands.
Lecture 6 (Chapter 16,17,18) Network and Internet Security Prepared by Dr. Lamiaa M. Elshenawy 1.
SSL: Secure Socket Layer By: Mike Weissert. Overview Definition History & Background SSL Assurances SSL Session Problems Attacks & Defenses.
Security & Cryptographic Methods
Security & Cryptographic Methods ccTLD Workshop November 27, 2007 Amman, Jordan Hervey Allen.
Security & Cryptographic Methods
Secure Sockets Layer (SSL)
Cryptographic methods:
Presentation transcript:

Security & Cryptographic Methods PacNOG 6 Hervey Allen PacNOG 6 Hervey Allen

6 Nadi, Fiji Reminder: Core Security Principals What are they? (1)-- C onfidentiality (2)-- I ntegrity (3)-- A uthentication - Access Control - Verification (4)-- A vailability

6 Nadi, Fiji What We'll Cover Digital signatures TLS/SSL SSH PGP

6 Nadi, Fiji When encrypting (review): 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. k1k1 k2k2 encrypted session key cipher text random session key ksks ksks (private) (public)

6 Nadi, Fiji When authenticating (review): Take a hash of the document and encrypt only that. An encrypted hash is called a "digital signature" k2k2 k1k1 digital signature COMPARE hash (public) (private)

6 Nadi, Fiji Digital Signatures have many uses, for example: 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

6 Nadi, Fiji Do public keys really solve the key distribution problem? Often we want to communicate securely with a remote party whose key we don't know We can retrieve their public key over the network But what if there's someone in between intercepting our traffic? public key

6 Nadi, Fiji The "man-in-the-middle" Attack  Passive sniffing is no problem  But if they can modify packets, they can substitute a different key  The attacker uses separate encryption keys to talk to both sides  You think your traffic is secure, but it isn't! key 1key 2 Attacker sees all traffic in plain text - and can modify it!

6 Nadi, Fiji TLS/SSL – Digital Certificates

6 Nadi, Fiji Digital Certificates can solve the man-in- the-middle problem Problem: I have no prior knowledge of the remote side's key, so cannot tell if a different one has been substituted But maybe someone else does A trusted third party can vouch for the remote side by signing a certificate which contains the remote side's name & public key I can check the validity of the certificate using the trusted third party's public key

6 Nadi, Fiji Example: TLS (SSL) web server with digital certificate I generate a private key on my webserver I send my public key plus my identity (my webserver's domain name) to a certificate authority (CA) The CA manually checks that I am who I say I am, i.e. I own the domain They sign a certificate containing my public key, my domain name, and an expiration date I install the certificate on my web server

6 Nadi, Fiji When a client's web browser connects to me using HTTPS: They negotiate an encrypted session with me, during which they learn my public key I send them the certificate They verify the certificate using the CA's public key, which is built-in to the browser If the signature is valid, the domain name in the URL matches the domain name in the certificate, and the expiration date has not passed, they know the connection is secure (Q: why is there an expiration date?)

6 Nadi, Fiji The security of TLS depends on: Your webserver being secure So nobody else can obtain your private key The CA's public key being in all browsers The CA being well managed How carefully do they look after their own private keys? The CA being trustworthy Do they vet all certificate requests properly? Could a hacker persuade the CA to sign their key pretending to be someone else? What about a government? Do you trust them? Why?

6 Nadi, Fiji Testing TLS (SSL) Applications There is an equivalent of telnet you can use: openssl s_client It opens a TCP connection, negotiates TLS, then lets you type data $ openssl s_client -connect nsrc.org:443 CONNECTED( ) depth=1 /C=US/ST=Washingron/L=Bainbridge Island/O=RGnet/PSGnet/OU= \ Engineering/CN=RGnet Root verify error:num=19:self signed certificate in certificate chain verify return:0... New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-SHA... And, at the end you see: Verify return code: 19 (self signed certificate in certificate chain)

6 Nadi, Fiji Limitations of s_client Works only for protocols which use TLS from the very beginning of the connection -These protocols are identified by using a different port number to the non-encrypted version (HTTP port 80), HTTPS port 443 (POP3 port 110), POP3S port 995 Other protocols start unencrypted and then "upgrade" the connection to encrypted on request -e.g. SMTP has a "STARTTLS" command -s_client is not usable for these

6 Nadi, Fiji SSH

6 Nadi, Fiji SSH Uses a Simple Solution to man-in-the-middle The first time you connect to a remote host, remember its public key Stored in ~/.ssh/known_hosts The next time you connect, if the remote key is different, then maybe an attacker is intercepting the connection! - Or maybe the remote host has just got a new key, e.g. after a reinstall. But it's up to you to resolve the problem Relies on there being no attack in progress the first time you connect to a machine Connect on LAN before travelling with laptop

6 Nadi, Fiji SSH Can Eliminate Passwords Use public-key cryptography to prove who you are Generate a public/private key pair locally ssh-keygen -t rsa Private key is ~/.ssh/id_rsa Public key is ~/.ssh/id_rsa.pub Install your PUBLIC key on remote hosts mkdir ~/.ssh chmod 755 ~/.ssh Copy public key into ~/.ssh/authorized_keys Login!

6 Nadi, Fiji Notes on SSH Authentication Private key is protected by a passphrase - So you have to give it each time you log in - Or use "ssh-agent" which holds a copy of your passphrase in RAM No need to change passwords across dozens of machines Disable passwords entirely! - /etc/ssh/sshd_config There are currently two different types of SSH keys in use: - SSH2 DSA, SSH2 RSA - (SSH1 RSA is deprecated)

6 Nadi, Fiji PGP/GPG – Pretty Good Privacy

6 Nadi, Fiji PGP Takes a Different View We don't trust anyone except our friends (especially not big corporate monopolies) You sign your friends' keys to vouch for them Other people can choose to trust your signature as much as they trust you Generates a distributed "web of trust" Sign someone's key when you meet them face to face - "PGP key signing parties"

6 Nadi, Fiji Summary

6 Nadi, Fiji Designing a Good Cryptosystem is Very Difficult Many possible weaknesses and types of attack, often not obvious DON'T design your own! DO use expertly-designed cryptosystems which have been subject to widespread scrutiny Understand how they work and where the potential weaknesses are Remember the other weaknesses in your systems, especially the human ones, speaking of which...

6 Nadi, Fiji The following code was removed from md_rand.c on Debian: The end result was disastrous... MD_Update(&m,buf,j); [.. ] MD_Update(&m,buf,j); /* purify complains */

6 Nadi, Fiji This was a human issue, and a subtle one at that. More information is here:

6 Nadi, Fiji Where can you apply these cryptographic methods? At the link layer PPP encryption At the network layer IPSEC, IPv6 At the transport layer TLS (SSL): many applications support it At the application layer SSH: system administration, file transfers PGP/GPG: for securing messages, stand-alone documents, software packages etc. Tripwire (and others): system integrity checks

6 Nadi, Fiji Start Using Cryptography Now! Use ssh for remote administration. Use scp/sftp for files transfer (except public ftp repositories). Install pop3/imap/smtp servers with tls support. Phase out the use of non-tls version. Use https for any web application where users enter passwords or confidential data - e.g. webmail, databases, wikis, nagios, cacti

6 Nadi, Fiji Any questions?