TÜBİTAK Ulusal Elektronik ve Kriptoloji Araştırma Enstitüsü Introduction to Network Security (Revisit an Historical 12 year old Presentation) Prof. Dr. Halûk Gümüşkaya Why Security? Three primary reasons Policy vulnerabilities Configuration vulnerabilities Technology vulnerabilities Doç. Dr. Halûk Gümüşkaya haluk@uekae.tubitak.gov.tr http: / /www.mam.gov.tr /~haluk Start: August 2001, Update: September 2001 1 And People Eager to Take Advantage of the Vulnerabilities 2 Contents 2. Cryptography - Definitions Security Threats telnet company.org username: dan password: Passive Threats m-y-p-a-s-s-w-o-r-d d-a-n Interception (Loss of Privacy) I m. Send Me All Corporate Correspondence with Cisco. Active Threats Fabrication (Impersonation) Deposit $1000 Deposit $ 100 CPU 3 Interruption (Denial of Service) Customer Modification (Loss of Integrity) Bank 4
UNIVERSAL PASSPORT Elements of Security Identity Identity Accurately identify users Determine what users are allowed to do Integrity Ensure network availability Provide perimeter security Ensure privacy Active Audit Recognize network weak spots Uniquely and accurately identify users, applications, services, and resources Username/password, one-time password Password Authentication Protocol (PAP) Challenge Handshake Authentication Protocol (CHAP) AAA server RADIUS, TACACS+, Kerberos, MS-login Digital Certificates, Directory Services Network Address Translation Detect and react to intruders Policy 5 6 Authentication, Authorization, and Accounting (AAA) Example: End-to-End Security Products Tool for enforcing security policy Authentication Verifies identity Who are you? Authorization 123 456 7 8 9 0 Configures integrity What are you permitted to do? Accounting Assists with audit What, When, How long did you do? 123 456 7 8 9 0 UNIVERSAL PASSPORT USA UNIVERSAL PASSPORT USA Identity Secure access control server Integrity Secure Integrated Software Firewall Access control lists VPN/encryption solutions (IPSec) Active Audit Secure Scanner Secure Intrusion Detection System 7 8
Components of Security Management Workstation Components of Security and Real World Security Examples WAN Firewall or Security Gateway Administration Audit Trails (Acounting) Corp IS Identity: Authentication, Authorization, Accounting (AAA) (Kimlik Doğrulama, Yetkilendirme, Takip) ID Card (i.e: Driver License), Notery, Physical Presence, Keys and Badges (Doors, locks, guards, Analogy: Firewalls & access controls ) Integrity (Bütünlük) Signature, barkode, stamp Active Audit Surveillance cameras & motion sensors Authentication Integrity Authorization Nonrepudiation (Gizlilik) Non-repudiation (İnkâr Edememezlik) Sealed Envelope Signature, Received, Approval Availability (Reliability) (Süreklilik) Different Communication Paths, Standby Systems and Power Supplies, Backup 9 10 Components of Security and Electronic Security Solutions Security Objective: Balance Business Needs with Risks Identity: Authentication, Authorization, Accounting (AAA) (Kimlik Doğrulama, Yetkilendirme, Takip) Digital Signatures, Secret key,hashing Integrity (Bütünlük) Hash, Digital Signatures, Certificates Active Audit Intrusion Detection System (Gizlilik) Ciphering Connectivity Performance Ease of Use Manageability Availability Authentication Authorization Accounting Assurance Data Integrity Non-repudiation (İnkâr Edememezlik) Digital Signatures, Log Files Access Security Availability (Reliability) (Süreklilik) Standby Systems, Backup, Maintenance 11 Policy Management 12
Cryptography 2. Cryptography Services: (Gizlilik) (ciphering) Integrity (Bütünlük) (one-way hash) Authentication (Kimlik Doğrulama) (secret key or digital signatures) Non-repudiation (İnkâr Edememezlik) Two types: Symmetric cryptography (secret key) Asymmetric cryptography (public key) 13 14 Symmetric Cryptography Advantages Secret Key Fast ciphering / deciphering One secret key shared for: Ciphering (Encryption) Deciphering (Decryption) *^1 h Many algorithms available DES, Triple DES* RC2, RC4, RC5* IDEA* Blowfish* CAST* SkipJack FWZ-1 MPPE Reliability: Depends on the length of the key 15 * supported by IPSec 16
Symmetric Cryptography Key Management Symmetric Cryptography Key Management 5 1 4 4 6 3 Users 3 4 Keys 3 6 One-to-Many 17 5 6 2 Many-to-Many 1 2 3 10 100 1000 10000 55 5,050 500,500 49,995,000!!!? 18 Disadvantages Asymmetric [public key] cryptography Secret key = shared secret Problem to safely exchange the secret A distinct key for each couple communicating Many users = many keys to manage Finding the secret key = access to the data exchanged in the past and the present Consider the need to change keys often A key pair Public key / Private key Bound mathematically via very large numbers Theoretically impossible to find one of the key by knowing the other one No shared Secret! Private key Confidential Public key Published The more the key is used to cipher large blocks of data, the more the key is exposed 19 20
Asymmetric cryptography - Application Asymmetric cryptography - Alice Encryption Receiver s Public key Decryption Receiver s Private key Message Authentication Encryption Decryption Alice s public key *&^1 )-h@ Alice s private key Sender s Private key Sender s Public key 21 22 Asymmetric cryptography - Examples Diffie-Hellman exchange key protocol Much slower than symmetric cryptography From 100 to 1000 times slower Not usable for ciphering major flows Alice Examples : DH private key s DH public key Alice s DH public key s DH public key Alice s DH public key DH private key RSA (Rivest Shamir Adleman): Algorithm providing encryption and authentication Diffie-Hellman: Key Exchange Protocol 23 DH Secret key 24
Cryptography - IPSec combination Public key cryptography not well-adapted for fast ciphering Use of secret key cryptography How to make secret key sharing secure? Use of public key cryptography Diffie-Hellman (used by IPSec) Digital envelope (used by SSL) 2. Cryptography 25 26 One-way Hash (message digest) Data Integrity (1) Verification of the integrity of the data transmitted Comparable to a CRC, but much more sophisticated Usually 128-bit or 160-bit message digest No return possible to the original text from the message digest One bit modified on the message affects half of the bits of the digest! Two different messages do not produce the same digest Example of a hash algorithm: MD2 (128-bit digest) MD4 (128-bit digest) MD5* (128-bit digest) (Ron Rivest, RFC 1321) SHA-1* (160-bit digest) (NIST) Hash Algorithm Digest Digest Message sent to Alice * supporté par IPSec 27 28
Data Integrity (2) Alice 2. Cryptography Hash Algorithm Digest Digest If Digest = Digest Verified! 29 30 Authentication - Message Authentication Code How does Alice know the message is coming from? combines the hash function with cryptography (Hash + cryptography) Result = MAC, Message Authentication Code Hash Algorithm + Key Authentication methods Two cryptographic techniques Two MAC computations Symmetric cryptography MAC = hash + secret key Asymmetric cryptography MAC = hash + private key Called Digital Signature + Hash Algorithm Secret key + Hash Algorithm Private key 31 32
Secret key Authentication Secret key Authentication Alice + Secret key Hash Algorithm MAC A to table eat! MAC + Secret key Hash Algorithm MAC Message sent to Alice If MAC = MAC verified! MAC 33 34 Secret key Authentication - Examples Public key Authentication (signature) Authentication using secret key (symmetric cryptography) Keyed-MD5 Keyed-SHA-1 IPSec implementation : the HMAC transform Defined by RFC 2104 Based on a keyed-md5 or keyed-sha-1 mechanism Apply twice the keyed hash function Optionally truncates the result : RFC 2403 : HMAC-MD5-96 RFC 2404 : HMAC-SHA-1-96 Hash Algorithm Digest s Private key Encryption * ^1 Message sent to Alice * ^1 35 36
How Public-Key Cryptography Works 2. Cryptography 37 38 39 40
2. Cryptography Where can we put security in the TCP/IP Protocol Stack? OSI Modeli Uygulama (Application) Sunum (Presentation) Oturum (Session) Aktarım (Transport) Ağ (Network) Veri Bağı (Data Link) TCP/IP Uygulama (Application) Aktarım (Transport) (TCP/UDP) IP Veri Bağı (Data Link) S-MIME S-HTTP SET... SOCKS, SSL, TSL IPSEC (AH, ESP) Packet Filtering Tunneling Link Encription Fiziksel (Physical) Fiziksel (Physical) 41 Security Levels 42 Application Layer SHTTP S/MIME TCP/UDP IP Transport Layer HTTP FTP SMTP Presentation Layer HTTP FTP SMTP SET PGP TCP/UDP IP Network Layer HTTP FTP SMTP Main References Some papers from IEEE W. Stallings, Network Security Essentials, Applications and Standards, Prentice Hall, 2000. N. Rivat, Description of IPSec Tutorial, IPSEC 99 Conferance Proceedings, Paris, France, October 1999 CISCO Business Essentials, Self-Paced Training CD, Security Basics. My experience. Internet. SSL/TLS/SOCKS TCP/UDP IP TCP/UDP AH ESP IP Secure IP 43 44