PA160: Net-Centric Computing II. Network Security Luděk Matýska Slides by: Tomáš Rebok Faculty of Informatics Masaryk University Spring 2011 Luděk Matýska (Fl MU) 1. Network Security Spring 2011 1 / 128 Course Introduction PA160 - Course Introduction Luděk Matýska (Fl MU) 1. Network Security Spring 2011 2 / 128 Course Introduction Course Organization o attending the lectures is optional o the knowledge acquired during PB156 & PA159 courses is assumed o course materials will be published on the course webpage (more or less in time ;-) ) o assessment methodology: o final exam (written form) course literature: o slides, RFCs, ... o literature being announced in relevant course parts 1. Network Security Spring 2011 3 / 128 Course Introduction Course Overview o the course goal: o to provide an advanced insight into the area of computer networks and their applications o discussed topics: network security network management and monitoring parallel and distributed applications, grids service-oriented architectures o specification and verification of communication protocols network simulators and emulators o etc. 1. Network Security Spring 2011 4 / 128 1. Network Security 1. Network Security 1. Network Security Luděk Matýska (Fl MU) 1. Network Security Spring 2011 5 / 128 Lecture overview Lecture overview Introduction O Motivation O Network Security Elements Cryptography Introduction O Symmetric Cryptography O Asymmetric Cryptography Network Security Mechanisms Entity Authentication O Message Confidentiality (Security) Message Integrity Message Authentication O Digital Signature O Key Management and Distribution Example Protocols Ensuring Network Security in the Internet © Application-layer Security © Transport-layer Security Network-layer Security Link-layer Security Network & Data Protection - Maintaining the Availability O Firewalls Intrusion Detection Systems O Denial of Service (DoS) & Distributed Denial of Service (DDoS) attacks O Virusses & Worms O Network & Data Protection - Concluding Remarks Conclusion 1 2 3 4 5 6 1. Network Security Spring 2011 6 / 128 Introduction Lecture overview Introduction O Motivation O Network Security Elements 1 Cryptography Introduction 9 Symmetric Cryptography 9 Asymmetric Cryptography Network Security Mechanisms Entity Authentication 9 Message Confidentiality (Security) Message Integrity Message Authentication 9 Digital Signature 9 Key Management and Distribution 1 Example Protocols Ensuring Network Security in the Internet • Application-layer Security • Transport-layer Security Network-layer Security • Link-layer Security Network & Data Protection - Maintaining the Availability • Firewalls Intrusion Detection Systems 9 Denial of Service (DoS) & Distributed Denial of Service (DDoS) attacks 9 Virusses & Worms • Network & Data Protection - Concluding Remarks Ludek Matyska (FI MU) 1. Network Security Spring 2011 7/128 1 3 4 Introduction Security o most of computer science is concerned with achieving desired behavior o in some sense, security is concerned with preventing undesired behavior o different way of thinking! o an enemy/opponent/hacker/adversary may be actively and maliciously trying to circumvent any protective measures one put in place o computer vs. network security o computer security - focuses on security aspects of systems in isolation o viruses, secure data storage, OS security, etc. o network security - focuses on security of data as it is transmitted between networked systems □ authentication protocols, encryption of transmitted data, firewalls, etc. o not always a clear-cut dividing line.. . 1. Network Security Spring 2011 8 / 128 Introduction Motivation What can go wrong? o when your computer y receives or is waiting for a message m? ? 1. Network Security Spring 2011 9 / 128 Introduction Motivation What can go wrong? Message loss o adversary A can discard m in its transit 10 / 128 Introduction Motivation What can go wrong? Message interception o adversary A can get a copy of m when m passes by 1. Network Security Spring 2011 11 / 128 Introduction Motivation What can go wrong? Message modification o adversary A can arbitrarily modify the content of m to become m' 12 / 128 Introduction Motivation What can go wrong? Message insertion o adversary A can arbitrarily fabricate a message m, pretending that m was sent by x 13 / 128 Introduction Motivation What can go wrong? Message replay o adversary A can replay a message m that has been sent earlier by x and received by y 14 / 128 Introduction Motivation What can go wrong? Denial-of-Service attack o adversary A can send huge amount of messages to y to block m from arriving at y o in the case of botnet attack, the adversary instructs many bots to send messages to y simultaneously 15 / 128 Introduction Motivation What is needed? Reliable transmission o y wants to receive all messages sent by x to her o both x and y want to make sure the message is not tampered with o eventually they both want the message not to be overheard by any third party 1. Network Security Spring 2011 16 / 128 Introduction Motivation What is needed? Sender verification o y wants to be able to verify that the message m has been really sent by x 17 / 128 Introduction Motivation What is needed? Message non-repudiation o x wants to be able to prove to third party z that y has received a message m from x y wants to be able to prove to third party z that x has sent a message m to y 18 / 128 Introduction Motivation Network Security Network Security is great... o protects messages from interception in their transit o provides desired level of privacy for users or data o detects and discards messages that had been modified, inserted, or replayed o disallows unauthorized access to local system resources and sensitive data ... but hard to achieve o many layers in network architecture o many different media of network connection • adversary's location hard to determine new attacks keep emerging cryptographic overhead Ludek Matyska (FI MU) 1. Network Security Spring 2011 19 / 128 Introduction Network Security Elements Network Security - Basic Elements A secure communication network should provide the following mechanisms/services: o AAA o Authentication o Authorization Accounting o + secured communication o Confidentiality o Integrity Non-repudiation o + Availability 1. Network Security Spring 2011 20 / 128 Introduction Network Security Elements Network Security - Basic Elements Authentication Authentication o in Czech: autentizace o NOT autentikace, autentifikace, . . . o several perspectives: o a process verifying that someone is who they claim they are (= entity authentication) o a process assuring the recipient that the message is from the source that it claims to be from (= message authentication) • requires a determination of the entity's identity o several methods for identity determination exist: o based on what a user knows - a proper pair of username and password/PIN o based on what a user has - a tool which a user owns (USB dongle, smart card, private key, etc.) o based on what a user is - a user has characteristics, which can be verified (fingerprint, retinal images, etc.) based on what a user can - a user is able to answer particular verifying questions Ludek Matyska (FIMU) 1. Network Security Spring 2011 21/128 Introduction Network Security Elements Network Security - Basic Elements Authorization and Accounting Authorization o process of granting the user access to specific system resources • based on user's profile and the local/global policy controlling the resource access o follows the authentication process o ensured by access control lists (ACLs) o define permissions to perform particular operation or to access particular resources Accounting o monitoring the users' usage of network services o the information can be used for management, planning, billing, or any other purposes 1. Network Security Spring 2011 22 / 128 Introduction Network Security Elements Network Security - Basic Elements Confidentiality, Integrity, and Non-repudiation Confidentiality o protects data and information from unauthorized disclosure (sniffers) o data during transmission cannot be read by any unauthorized user o just the sender and receiver understand the content of the transferred message o ensured by message encryption Integrity o protects data from unauthorized modification o data during transmission cannot be modified or fabricated by any unauthorized user usually based on encryption and hashing algorithms Non-repudiation o sender nonrepudiation and receiver nonrepudiation serves the receiver/sender for the purposes of proving origin/delivery of the message neither the sender of a message can deny the transmission of the message nor the receiver of a message is able to deny the reception of the message ensured by digital signatures Ludek Matyska (FIMU) 1. Network Security Spring 2011 23 / 128 Introduction Network Security Elements Network Security - Basic Elements Availability Availability o property of a system, network, or a resource being accessible and usable any time upon demand by an authorized system entity o i.e., a system is available if it provides services according to the system design whenever users require them o has to be associated with various security services o such as services protecting from denial of service (DoS) attacks 1. Network Security Spring 2011 24 / 128 Cryptography Introduction Lecture overview Introduction Motivation • Network Security Elements Cryptography Introduction Symmetric Cryptography O Asymmetric Cryptography Network Security Mechanisms Entity Authentication 9 Message Confidentiality (Security) Message Integrity Message Authentication 9 Digital Signature 9 Key Management and Distribution 1 Example Protocols Ensuring Network Security in the Internet • Application-layer Security • Transport-layer Security Network-layer Security • Link-layer Security Network & Data Protection - Maintaining the Availability • Firewalls Intrusion Detection Systems 9 Denial of Service (DoS) & Distributed Denial of Service (DDoS) attacks 9 Virusses & Worms • Network & Data Protection - Concluding Remarks 2 4 1. Network Security Spring 2011 25 / 128 Cryptography Introduction Cryptography Introduction o network security is mostly achieved through the use of Cryptography Cryptography: o the science and art of transforming messages to make them secure and immune to attacks basic cryptography mechanisms: o symmetric (secret-key) cryptography o asymmetric (public-key) cryptography Ludek Matyska (Fl MU) 1. Network Security Spring 2011 26 / 128 Cryptography Introduction Symmetric Cryptography Symmetric Cryptography o the same key is used by both parties for both encryption and decryption o advantages: o low computational demands o suitable for encryption of large messages drawbacks: o a necessity to share the secret key (— a mechanism for key distribution is required) o can lead to many keys required to be maintained (e.g., many-to-one communication in distributed environment) o e.g., DES, 3DES, IDEA, Blowfish, Rivest Cipher 4 (RC4), AES, etc. Alice Bob 1. Network Security Spring 2011 27 / 128 Cryptography Introduction Symmetric Cryptography Symmetric Cryptography Simple Symmetric Ciphers Character-oriented o operate on characters of an alphabet o substitution ciphers - substitutes one symbol with another o monoalphabetic - a character/symbol in the plaintext is always changed to the same character/symbol in the ciphertext (e.g., Caesar cipher) o polyalphabetic - each occurrence of a character can have a different substitute o transposition ciphers - reorders (permutes) symbols in a block of symbols o instead of substitutions, locations of characters change Bit-oriented o operate on blocks of bits o e.g., XOR cipher, rotation cipher, etc. Ludek Matyska (FIMU) 1. Network Security Spring 2011 28 / 128 Cryptography Introduction Symmetric Cryptography Symmetric Cryptography DES (Data Encryption Standard) DES (Data Encryption Standard) o designed by IBM and adopted by the U.S. government as the standard encryption method for nonmilitary and nonclassified use o the algorithm encrypts a 64-bit plaintext blocks using a 64-bit key o in fact, the key is just 56-bits long (every eighth bit is used for parity checking and is ignored) o DES has two transposition blocks (so-called P-boxes) and 16 complex round ciphers although the 16 iteration round ciphers are conceptually the same, each uses a different key derived from the original key o not considered to be secure any more because of the key length (too short) o see details in the animation: http://www.cs.bham.ac.uk/ research/projects/lemsys/DES/DESPage.jsp 1. Network Security Spring 2011 29 / 128 Cryptography Introduction Symmetric Cryptography Ludek Matyska (FI MU) 64-bit ciphertext 1. Network Security Spring 2011 30 / 128 Cryptography Introduction Symmetric Cryptography Symmetric Cryptography DES (Data Encryption Standard) - Algorithm outline II. (single round) Cryptography Introduction Symmetric Cryptography Symmetric Cryptography Triple DES (3DES) Triple DES (3DES) o has been proposed and implemented to lengthen the DES key o uses three DES blocks o encryption: DES encryption-decryption-encryption o decryption: DES decryption-encryption-decryption o different variants: o 3DES with three keys — the size of the key is increased to 168 bits o 3DES with two keys (Key1 = Key3) — the size of the key is 112 bits o if (Key1 = Key2 = Key3) == standard DES 1. Network Security Spring 2011 32 / 128 Cryptography Introduction Symmetric Cryptography Symmetric Cryptography Triple DES (3DES) a. EncryptionTriple DES Ludek Matyska (FI MU) b. Decryption Triple DES 1. Network Security Spring 2011 33 / 128 Cryptography Introduction Symmetric Cryptography Symmetric Cryptography AES (Advanced Encryption Standard) AES (Advanced Encryption Standard) o proposed as a reaction to competition for selecting a successor to DES (1997) o originally called Rijndael o standardized in 2001 o three variants: AES-128, AES-192 and AES-256 o the number indicates the key length o the keysize has no theoretical maximum • operates on a 4 x 4 array of bytes (= 128 bits) o AES performs a number of repetitions of transformation rounds that convert the input plaintext into the final output of ciphertext o each round consists of several processing steps, including one that depends on the encryption key o can be effectively implemented in HW see details in the animation: http://www.formaestudio.com/rijndaelinspector/ Ludek Matyska (FIMU) 1. Network Security Spring 2011 34 / 128 Cryptography Introduction Symmetric Cryptography Ludek Matyska (FI MU) 1. Network Security Spring 2011 35 / 128 Cryptography Introduction Symmetric Cryptography Ludek Matyska (FI MU) 128-bit data 1. Network Security Spring 2011 36 / 128 Cryptography Introduction Asymmetric Cryptography Asymmetric Cryptography o also known as Public-key Cryptography o uses different keys for encryption and decryption o both keys are denoted as keypair o the public key is used for encryption, while the private key is used for decryption o the message encrypted by a public key can be decrypted only by the appropriate private key o advantages: o no secret key is passed between two communicating parties == lowers the risk of its disclosure the public key can be published drawbacks: the speed = asymmetric ciphers are suitable for small messages for example, for a symmetric key exchange o suffer from the man-in-the-middle attack the public keys have to be provided by a trusted party o e.g., RSA, Diffie-Hellman (key exchange), etc. Ludek Matyska (FIMU) 1. Network Security Spring 2011 37 / 128 Cryptography Introduction Asymmetric Cryptography Asymmetric Cryptography Illustration 1. Network Security Spring 2011 38 / 128 Cryptography Introduction Asymmetric Cryptography Asymmetric Cryptography RSA (Rivest, Shamir, and Adleman algorithm) I. RSA (Rivest, Shamir, and Adleman algorithm) the most common and popular public key algorithm o RSA gets its security from the difficulty of factoring large numbers o uses two (large) numbers, e and d, as the encryption and decryption keys o public/private keys generation: o choose two random large prime numbers, p and q (ideally of equal length, e.g., 200 digits) o compute the product N = p • q • then randomly choose the encryption key, e (between 1 and N — 1), such that e and (p — 1)(q — 1) are relatively prime • then compute the decryption key, d: d = e-1 mod ((p — 1)(q — 1)) o i.e., d • e = 1 mod ((p — — 1)) p and q are no longer needed o public key: (e, N) o private key: (d, N) 1. Network Security Spring 2011 39 / 128 Cryptography Introduction Asymmetric Cryptography Asymmetric Cryptography RSA (Rivest, Shamir, and Adleman algorithm) II. RSA (Rivest, Shamir, and Adleman algorithm) cont'd o message encryption o to encrypt a message m, it has to be divided into numerical blocks smaller than N o each block is then individually encrypted: c = me mod N message decryption o decrypt every block by: m = cd mod N o see all the details in the RSA animation: http://cryptool.org/media/RSA/RSA-Flash-en/player.html 1. Network Security Spring 2011 40 / 128 Network Security Mechanisms Lecture overview Introduction • Motivation • Network Security Elements Cryptography Introduction Symmetric Cryptography w Asymmetric Cryptography Network Security Mechanisms Entity Authentication O Message Confidentiality (Security) Message Integrity Message Authentication O Digital Signature O Key Management and Distribution 1 Example Protocols Ensuring Network Security in the Internet • Application-layer Security • Transport-layer Security Network-layer Security • Link-layer Security Network & Data Protection - Maintaining the Availability • Firewalls Intrusion Detection Systems 9 Denial of Service (DoS) & Distributed Denial of Service (DDoS) attacks 9 Virusses & Worms • Network & Data Protection - Concluding Remarks 2 3 1. Network Security Spring 2011 41 / 128 Network Security Mechanisms Entity Authentication Entity Authentication Passwords Password authentication: o the simplest and the oldest method o Alice authenticates to Bob by sending a password o fixed passwords - subjects to several attacks: o eavesdropping, stealing a password, accessing a file with passwords, guessing (dictionary attacks), etc. o can be (partially) solved by: o hashing the passwords o hashing salted passwords o e.g., PAP (Password Authentication Protocol) - transmits unencrypted ASCII passwords (assumes out-of-band control channel) o one-time passwords - passwords valid just for only one login session new password generated based on previous password new password generated based on a challenge o specialized electronic tokens, out-of-band channels (SMS), etc. Ludek Matyska (FIMU) 1. Network Security Spring 2011 42 / 128 Network Security Mechanisms Entity Authentication Entity Authentication Challenge-Response Authentication o in password authentication, the claimant proves her identity by demonstrating that she knows a secret (the password) o however, since the claimant reveals this secret, the secret is susceptible to interception by the adversary o in challenge-response authentication, the claimant proves that she knows a secret without revealing it o the challenge is a time-varying value (a random number or a timestamp) sent by the verifier the claimant applies a function to the challenge and sends the result (response) to the verifier o the response shows that the claimant knows the secret 1. Network Security Spring 2011 43 / 128 Network Security Mechanisms Entity Authentication o Alice asks Bob for sending a nonce (a random number, timestamp, etc.) o Alice encrypts the nonce by shared secret key (the password) and sends it back to Bob LudSk Matyska (FI MU) 1. Network Security Spring 2011 44 / 128 Network Security Mechanisms Entity Authentication Entity Authentication Challenge-Response Authentication - Symmetric keys using a nonce (mutual auth.) o same as the previous one, but with the mutual authentication Alice Bob Alice sends data to Bob using KAB 1. Network Security Spring 2011 45 / 128 Network Security Mechanisms Entity Authentication Entity Authentication Challenge-Response Authentication - Hash functions usage instead of encryption/decryption, one can also use a hash function for entity authentication o hash function - a one-way function generating a message digest o details on hash functions - see Message Integrity part e.g., MS CHAP (Challenge-Handshake Authentication Protocol) 1. Network Security Spring 2011 46 / 128 Network Security Mechanisms Entity Authentication instead of symmetric-key ciphers, asymmetric-key ciphers can be also used for entity authentication the secret is the private key of the claimant o she must show that she owns the private key related to the public key the nonce can be encrypted either by the claimant's public key Ludek Matyska (FI MU) 1. Network Security Spring 2011 47 / 128 Network Security Mechanisms Entity Authentication Entity Authentication Asymmetric keys - Private key usage o or by her private key (= digital signatures, see later) 1. Network Security Spring 2011 48 / 128 Network Security Mechanisms Message Confidentiality (Security) Message Confidentiality/Security - Data Encryption the transmitted data are usually (especially for the long messages) encrypted using a symmetric cryptography algorithm because of their speed the shared secret key necessary for the encryption can be (prior to the transmission) obtained using: o asymmetric cryptography - the chosen shared key is encrypted using the public key of the communicating partner and delivered to her o Diffie-Hellman algorithm - shared key computation 1. Network Security Spring 2011 49 / 128 Network Security Mechanisms Message Confidentiality (Security) b. A different shared secret key is recommended in Bob-Alice communication Ludek Matyska (FI MU) 1. Network Security Spring 2011 50 / 128 Network Security Mechanisms Message Confidentiality (Security) O G and N are prime numbers, which both parties have to agree on o can be freely transmitted through the network O the x and y are (private) large numbers chosen by the parties independently on each other O the computed K becomes the shared key used for the following symmetric encryption O employed principle: (Gx mod N)y mod N = (Gy mod N)x mod N = Gxy mod N Ludek Matyska (FI MU) 1. Network Security Spring 2011 51 / 128 Network Security Mechanisms Message Confidentiality (Security) a weakness - suffers from a man-in-the-middle attack o can be avoided if Bob and Alice first authenticate each other pand g are public. Ludek Matyska (FI MU) 1. Network Security Spring 2011 52 / 128 Network Security Mechanisms Message Integrity Message Integrity Hash functions o encryption provides confidentiality, but not integrity o sometimes, the message does not need to be hidden (encrypted) - the only need is to keep it safe from any tampering to preserve the integrity of a message, the message is passed through a hash function » an algorithm that creates a compressed "image" (fingerprint) of the message o so-called a message digest or a modification detection code (MDC) o the digest needs to be kept secret 1. Network Security Spring 2011 53 / 128 Network Security Mechanisms Message Integrity Message Integrity Hash function criteria o to be eligible for a hash, a function needs to meet the four criteria: o one-wayness - a message digest is created by a one-way hashing function o it must be impossible to recreate the message from the digest o resistance to weak collision - ensures that a message cannot easily be forged o one cannot easily modify the original message so that the new message hashes exactly to the same digest o resistance to strong collision - ensures that we cannot find two messages that hash to the same digest • called "strong" because the probability of a collision is higher than in the previous case o computation ease - it must be easy to compute the hash value for any given message o hash function examples: o MD5 (broken == not secure), SHA-1, SHA-256, SHA-512, etc. 1. Network Security Spring 2011 54 / 128 Network Security Mechanisms Message Integrity Message Integrity Message integrity check Ludek Matyska (FI MU) 1. Network Security Spring 2011 55 / 128 Network Security Mechanisms Message Authentication Message Authentication Message Authentication o a process assuring the recipient that the message is from the source that it claims to be from o can be provided by: o symmetric cryptography - keyed hash functions, HMAC o asymmetric cryptography - digital signature 1. Network Security Spring 2011 56 / 128 Network Security Mechanisms Message Authentication Message Authentication Symmetric cryptography o keyed hash functions are used o when creating the digest, such a function includes the symmetric key between the sender and receiver into the computation o => so-called Message Authentication Code (MAC) is computed besides the message authentication, the message integrity is obviously ensured as well 57 / 128 Network Security Mechanisms Message Authentication Message Authentication Symmetric cryptography - HMAC o instead of keyed hash functions, a keyless hash function can also be used for message authentication o = hashed MAC (HMAC) o creates a MAC by applying a keyless hash function to the concatenation of the message and a symmetric key o i.e., a copy of the symmetric key is prepended to the message and this combination is hashed using a keyless hash function (e.g., SHA-1, SHA-256, etc.) 1. Network Security Spring 2011 58 / 128 Network Security Mechanisms Digital Signature Digital Signature • MAC's/HMAC's main drawback: they require a symmetric key to be established between the sender and the receiver o == Digital Signatures - employ asymmetric cryptography to provide message authentication and integrity o besides, the message nonrepudiation is also provided Digital Signature • a message is "signed" (= encrypted) using the sender's private key • and "verified" (= decrypted) using the sender's public key can be achieved in two ways: o signing the whole document - easier, but less efficient (for long messages) o signing a digest of the document o most commonly used • instead of signing the whole document, just the message's digest is signed Ludek Matyska (FIMU) 1. Network Security Spring 2011 59 / 128 Network Security Mechanisms Digital Signature Digital Signature Sender's side 1. Network Security Spring 2011 60 / 128 Network Security Mechanisms Digital Signature Digital Signature Receiver's side 1. Network Security Spring 2011 61 / 128 Network Security Mechanisms Digital Signature Digital Signature Summary Remember In a cryptosystem (to provide message confidentiality), we use the private and public keys of the receiver; in digital signatures (to provide message authentication/integrity/nonrepudiation), we use the private and public keys of the sender. • to combine both, the message is signed at first and later both the message and the signature are encrypted Luděk Matýska (Fl MU) 1. Network Security Spring 2011 62 / 128 Network Security Mechanisms Key Management and Distribution Key Management and Distribution How secret keys in symmetric-key cryptography and how public keys in asymmetric-key cryptography are distributed and maintained? Symmetric-key Distribution o the symmetric key needs to be shared between every two communicating parties o if Alice needs to exchange confidential messages with N people - she needs to maintain N different keys o if N people need to communicate with one another - a total of N • (N - 1)/2 keys is needed • (each person needs to maintain N — 1 keys; since the keys are shared, we need "only" N • (N — 1)/2 keys) • moreover, the keys' distribution is another problem o == a trusted party - Key Distribution Center (KDC) - is needed to reduce the number of keys Ludek Matyska (FIMU) 1. Network Security Spring 2011 63 / 128 Network Security Mechanisms Key Management and Distribution Symmetric-key Management and Distribution Key Distribution Center (KDC) I. Key Distribution Center (KDC) o each person/entity establishes a shared secret key with the KDC 64 / 128 Network Security Mechanisms Key Management and Distribution Symmetric-key Management and Distribution Key Distribution Center (KDC) II. Key Distribution Center (KDC) cont'd. o the process of sending a confidential message from Alice to Bob may proceed as follows: Alice sends a request to KDC, stating that she needs a session (temporary) secret key between herself and Bob Q KDC informs Bob of Alice's request [5) If Bob agrees, a session key is created between the two o once the communication is terminated, the session key is no longer valid o several approaches of creating the session key based on the previous ideas have been proposed o e.g., basic approach, Needham-Schroeder protocol, Otway-Rees protocol, etc. o for the following three slides, the following holds: o Ka (Kg) ... a symmetric key known only to A and S (resp. B and S) o R, Ra, Rg, Ri, R2 . .. nonces o Kab . .. the symmetric session key o example real implementation - Kerberos 1. Network Security Spring 2011 65 / 128 Network Security Mechanisms Key Management and Distribution Symmetric-key Management and Distribution Ludek Matyska (FI MU) 1. Network Security Spring 2011 66 / 128 Key Distribution Center (KDC) III. - Basic Approach Network Security Mechanisms Key Management and Distribution Ludek Matyska (FI MU) 1. Network Security Spring 2011 67 / 128 Network Security Mechanisms Key Management and Distribution Symmetric-key Management and Distribution Key Distribution Center (KDC) III. - Otway-Rees protocol Alice Bob 68 / 128 Network Security Mechanisms Key Management and Distribution Public-key Management and Distribution Public-key Distribution o in public-key cryptography, everyone shields a private key and advertises a public key o the public-key is freely available o Why a public-key distribution mechanism is needed, when the public-keys can be freely announced? o to protect the keys from forgery o the mechanism: the use of a trusted center - Certification Authority 1. Network Security Spring 2011 69 / 128 Network Security Mechanisms Key Management and Distribution Public-key Management and Distribution Certification Authority (CA) Certification Authority (CA) o issues so-called public-key certificates □ bind an entity (human, server, etc.) with its public key o to prevent the certificate itself from being forged, the CA signs the certificate with its private key o such a certificate can be freely published and distributed o anyone who wants to extract the public key from the certificate uses the CA's public key to extract it o when compromised, the previously issued certificates can be revoked o example: X.509 certificates o supports hierarchical structure to allow the use in the wide Internet o (= hierarchical trust model) o called Public Key Infrastructure (PKI) 1. Network Security Spring 2011 70 / 128 Network Security Mechanisms Key Management and Distribution Public-key Management and Distribution X.509 Certificates 1. Network Security Spring 2011 71 / 128 Network Security Mechanisms Key Management and Distribution Public-key Management and Distribution Public Key Infrastructure (PKI) > One of many definitions: a set of hardware, software, people, policies, and procedures needed to create, manage, store, distribute, and revoke certificates based on public key cryptography ) each certificate is issued (and signed) only by a single party (= CA) o each CA certifies only its children • the CA's certificate itself may be signed by a different CA (all the way up to a "self-signed" root certificate) o =>■ root certificates must be available to those who use a lower level CA certificate (root certificates are typically widely distributed) Ludek Matyska (FI MU) 1. Network Security Spring 2011 72 / 128 Example Protocols Ensuring Network Security in the Internet Lecture overview Introduction • Motivation • Network Security Elements 1 Cryptography Introduction 9 Symmetric Cryptography 9 Asymmetric Cryptography Network Security Mechanisms Entity Authentication 9 Message Confidentiality (Security) Message Integrity Message Authentication 9 Digital Signature w Key Management and Distribution Example Protocols Ensuring Network Security in the Internet 9 Application-layer Security 9 Transport-layer Security Network-layer Security Link-layer Security Network & Data Protection - Maintaining the Availability Firewalls Intrusion Detection Systems 9 Denial of Service (DoS) & Distributed Denial of Service (DDoS) attacks 9 Virusses & Worms • Network & Data Protection - Concluding Remarks 2 3 4 1. Network Security Spring 2011 73 / 128 Example Protocols Ensuring Network Security in the Internet Example Protocols Ensuring Network Security in the Internet o all the presented concepts can be realized on: application layer - security mechanisms provided by applications (application protocols) themselves o e.g., PGP, SET, S/MIME, S-HTTP, etc. □ transport layer - SSL and TLS o network layer - IPv6 & IPSec (IPv4) o link layer -e.g., PPP 1. Network Security Spring 2011 74 / 128 Example Protocols Ensuring Network Security in the Internet Application-layer Security Application-layer Security Pretty Good Privacy (PGP) Pretty Good Privacy (PGP) o a de-facto standard proposed by Phil Zimmermann (1991) o the mechanism providing secure email communication channels • originally uses an alternative approach to PKI for distributing user's public keys -Web of Trust o decentralized trust model o identity certificates are digitally signed by other users who, by that act, endorse the association of that public key with the person/entity listed in the certificate o == leaves the trust decisions in the hands of individual users o there are several levels of confidence which can be included in such signatures o later versions are able to use PKI as well o involves all the basic security mechanisms: • email confidentiality (using a symmetric one-time key because of performance — 3DES, IDEA, etc.) • integrity (hash functions — MD5, SHA) o authentication (asymmetric cryptography — RSA) non-repudiation (through the use of PKI) o ~ Digital Signatures Ludek Matyska (FI MU) 1. Network Security Spring 2011 75 / 128 Example Protocols Ensuring Network Security in the Internet Application-layer Security Application-layer Security - PGP Sender's side Sender site (Alice) Digital signature Privacy Figure: The mechanism of signing and encrypting the sending message (sender's side). 1. Network Security Spring 2011 76 / 128 Example Protocols Ensuring Network Security in the Internet Application-layer Security Application-layer Security - PGP Receiver's side Figure: The mechanism of decrypting and verifying the received message (receiver's side). Ludek Matyska (FI MU) 1. Network Security Spring 2011 77 / 128 Example Protocols Ensuring Network Security in the Internet Application-layer Security Application-layer Security Secure Electronic Transactions (SET) I. Secure Electronic Transactions (SET) o a specialized cryptographic protocol developed by a group of companies (Visa, Microsoft, IBM, MasterCard, etc.) o designed for securing credit card transactions over insecure networks o NOT for a general encryption design goals: o confidentiality of payment and ordering information integrity of all transmitted data authentication of all card holders ensuring that a merchant can accept card transactions based on buyer's relationship with her financial institution • the merchant does not need to know the buyer's identity o creating protocols that neither depend on transport security mechanism nor prevent their use 1. Network Security Spring 2011 78 / 128 Example Protocols Ensuring Network Security in the Internet Application-layer Security Application-layer Security Secure Electronic Transactions (SET) II. Figure: The SET transactions outline. Ludek Matyska (FI MU) 1. Network Security Spring 2011 79 / 128 Example Protocols Ensuring Network Security in the Internet Application-layer Security Application-layer Security S/MIME and S-HTTP Secure/Multipurpose Internet Mail Extension (S/MIME) o a standard for public key encryption and signing of MIME data o MIME - Internet standard that extends the format of e-mail to support, e.g., text in character sets other than ASCII, non-text attachments (pictures, video, audio, etc.), message bodies with multiple parts, etc. o provides authentication, message integrity and non-repudiation of origin (using digital signatures) and privacy and data security (using encryption) Secure-HTTP (S-HTTP) o extends the Hypertext Transfer Protocol (HTTP) to support encryptions and digital signatures extends the negotiation between the client browser and the server to include the negotiation for security matters o uses additional headers for message encryption, digital certificates, and authentication in the HTTP format the HTTP headers are encapsulated into the S-HTTP headers o has been bundled away by the HTTPs (HTTP over SSL/TLS) Ludek Matyska (FIMU) 1. Network Security Spring 2011 80 / 128 Example Protocols Ensuring Network Security in the Internet Transport-layer Security Transport-layer Security - SSL/TLS I. Secure Sockets Layer (SSL) / Transport Layer Security (TLS) o the protocols for ensuring secure communication channels on the transport layer o (SSL precedes the TLS) o SSL 3.0 « TLS 1.0 o SSL/TLS provide secure and authenticated data paths between servers and clients: o data encryption - protect data in transport between the client and the server from interception (making them readable only by the intended recipient) o server and client authentication - the SSL uses standard public key encryption to authenticate the communicating parties to each other o message integrity - achieved through the use of session keys so that data cannot be intentionally/unintentionally tampered • main drawback: the necessity to adapt the applications (applications' protocols) o HTTP — HTTPS (HTTP Secure) o FTP — FTPS (FTP Secure) etc. Ludek Matyska (FIMU) 1. Network Security Spring 2011 81/128 Example Protocols Ensuring Network Security in the Internet Transport-layer Security Transport-layer Security - SSL/TLS II. Figure: The SSL protocol stack. Ludek Matyska (FI MU) 1. Network Security Spring 2011 82 / 128 Example Protocols Ensuring Network Security in the Internet Transport-layer Security Transport-layer Security - SSL/TLS III. Before any SSL connection can be established, there must be a handshake performed: Browser Web Server Figure: The SSL handshake (steps 5 and 6 verify the integrity of the handshake; the communication is encrypted using a symmetric (session) key). Ludek Matyska (FI MU) 1. Network Security Spring 2011 83 / 128 Example Protocols Ensuring Network Security in the Internet Network-layer Security Network-layer Security - IPv6 & IPSec (IPv4) I. IP Security - IPv6 & IPSec (IPv4) o a set of protocols providing secured communication channels on the network layer • Authentication Header (AH) protocol - ensures sender's and receiver's authentication and communication integrity o NOT communication confidentiality o Encapsulating Security Payload (ESP) protocol - designed for providing sender's authentication, communication integrity and confidentiality o can be used independently or in combination o establishes one-way logical channels (Security Associations, SAs) o two modes of operation: transport and tunnel mode Ludek Matyska (FI MU 1. Network Security Spring 2011 84 / 128 Example Protocols Ensuring Network Security in the Internet Network-layer Security Network-layer Security - IPv6 & IPSec (IPv4) II. IP Security - IPv6 & IPSec (IPv4) cont'd. o key distribution: • Internet Key Exchange (IKE) - used to set up an SA (RFC 4306 for v2) o uses X.509 certificates for authentication and Diffie-Hellman key exchange to set up a shared session secret o Internet Security Association and Key Management Protocol (ISAKMP) - a framework for authentication and key exchange (RFC 2408) o advantages: secures all the data flows between two communicating parties; it is not necessary to adapt applications (application protocols) • drawbacks: there are no automated mechanisms for cryptographic keys' management o further information: q see IPv6 section in PA159 o see the animation (ongoing BP Thesis == will be available in a month): http://frakira.fi.muni.cz/~jeronimo/vyuka/IPSec 1. Network Security Spring 2011 85 / 128 Example Protocols Ensuring Network Security in the Internet Network-layer Security Virtual Private Network (VPN) o a computer network that uses a public telecommunication infrastructure (such as the Internet) to provide remote offices or individual users with secure access to their organization's network o using a secure cryptographic method, it encapsulates data transfers between two or more networked devices which are not on the same private network o in order to keep the transferred data private o the VPN technology provides the following activities: o IP encapsulation - involves enclosing TCP/IP data packets within another packet with an IP-address of either a firewall or a server that acts as a VPN endpoint • various tunneling mechanisms: IPSec ESP tunnel, Point-to-Point Tunneling protocol (PPTP), Layer 2 Tunneling Protocol (L2TP), PPP over SSL and PPP over SSH, etc. o Encryption - used to obfuscate the contents of the encapsulated data o Authentication - used to determine whether or not the endpoint can participate in the encrypted tunnel o may also be used to exchange the secret or public key used for payload encryption Ludek Matyska (FIMU) 1. Network Security Spring 2011 86 / 128 Example Protocols Ensuring Network Security in the Internet Network-layer Security Network-layer Security - IPv6 & IPSec (IPv4) IV. Virtual Private Networks (VPNs) II. 1. Network Security Spring 2011 87 / 128 Example Protocols Ensuring Network Security in the Internet Link-layer Security Link-layer Security Point-to-Point Protocol (PPP) I. Point-to-Point Protocol (PPP) o a connection-oriented data link protocol that enables the creation of L2 links over a variety of different physical layer connections o commonly used in establishing a direct communication channel between two networking nodes o designed to carry IP traffic o but is general enough to allow any type of network layer datagram to be sent over a PPP connection not a single protocol but rather a suite of many o a key advantage: it is an extensible protocol suite o provides connection authentication, transmission encryption (confidentiality), and compression o several authentication protocols can be used (PAP, CHAP, EAP, etc.) o transmission encryption - DES or 3DES o moreover supports link aggregation o =$> two devices are allowed to use multiple physical links as if they were a single, higher-performance link Ludek Matyska (FIMU) 1. Network Security Spring 2011 88 / 128 Example Protocols Ensuring Network Security in the Internet Link-layer Security Link-layer Security Point-to-Point Protocol (PPP) II. 7 6 5 Application Upper Layer Protocols 4 Transport TCP/UDP 3 Internet IP 2 Network Interface PPP 1 Physical Link (Serial, Dial-Up, ISDN, etc.) OSI and TCP/IP PPP Model Layers Architecture Ludek Matyska (FIMU) 1. Network Security Spring 2011 89 / 128 Example Protocols Ensuring Network Security in the Internet Link-layer Security Link-layer Security Point-to-Point Protocol (PPP) III. Point-to-Point Protocol (PPP) cont'd. o consists of many components: o "main" components: • PPP Encapsulation Method — takes higher-layer messages and encapsulates them for transmission over the underlying physical layer link o Link Control Protocol (LCP) — responsible for setting up, maintaining and terminating the link between devices o Network Control Protocols (NCPs) — an NCP is defined for each upper layer network protocol to allow for dynamic negotiation of its properties (e.g., IP address assignment for IP protocol == PPP Internet Protocol Control Protocol (IPCP)) o additional functional groups — representants of many extra protocols that have been added to support or enhance the basic operation of PPP LCP Support Protocols — protocols used during the link negotiation process, either to manage it or to configure options (e.g., CHAP and PAP authentication protocols) • LCP Optional Feature Protocols — enhance PPP's operation after a link has been set up and datagrams are being passed between devices (e.g., PPP Compression Control Protocol (CCP), PPP Encryption Control Protocol (ECP), etc.) Ludek Matyska (FIMU) 1. Network Security Spring 2011 90 / 128 Example Protocols Ensuring Network Security in the Internet Link-layer Security Link-layer Security Point-to-Point Protocol (PPP) IV. Point-to-Point Protocol (PPP) cont'd. most commonly used forms: o Point-to-Point Protocol over ATM (PPPoA) o a network protocol for encapsulating PPP frames in AAL5 (ATM adaptation layer - allows to send variable-length packets through an ATM network) Point-to-Point Protocol over Ethernet (PPPoE) o a network protocol for encapsulating PPP frames inside Ethernet frames o both serve to establish a DSL line connection with an ISP 1. Network Security Spring 2011 91 / 128 Network & Data Protection - Maintaining the Availability Lecture overview Introduction Motivation Network Security Elements 1 Cryptography Introduction 9 Symmetric Cryptography Asymmetric Cryptography Network Security Mechanisms Entity Authentication 9 Message Confidentiality (Security) Message Integrity Message Authentication Digital Signature Key Management and Distribution Example Protocols Ensuring Network Security in the Internet Application-layer Security Transport-layer Security Network-layer Security Link-layer Security Network & Data Protection — Maintaining the Availability Firewalls Intrusion Detection Systems O Denial of Service (DoS) & Distributed Denial of Service (DDoS) attacks O Virusses & Worms Network & Data Protection — Concluding Remarks 2 3 4 5 1. Network Security Spring 2011 92 / 128 Network & Data Protection - Maintaining the Availability Network&Data Protection - Maintaining the Availability I. o all the previous security mechanisms cannot prevent Eve from sending a harmful message to a system o network & data protection - a complicated problem without a simple solution o authentication and encryption mechanisms are just technical fundamentals o organizational and social aspects are needed humans (users) are usually the weakest elements = social engineering o possible threats: o accessing private data o modification of private or public data o including their removal (e.g., web pages) o undesired interferences to the network traffic/operation • including services' denial (so-called Denial of Service attacks) 1. Network Security Spring 2011 93 / 128 Network & Data Protection - Maintaining the Availability Ludek Matyska (FI MU) 1. Network Security Spring 2011 94 / 128 Network & Data Protection - Maintaining the Availability Network&Data Protection - Maintaining the Availability II. Attack/Intrusion a deliberate unauthorized attempt, successful or not, to break into, access, manipulate, or misuse some valuable property and where the misuse may result into or render the property unreliable or unusable The attack/intrusion process consists of few stages: • Reconnaissance - the process of gathering information about the target system and the details of its workings and weak points • a scanning program sends network traffic to all/selected computers and expects receiving return traffic that will indicate whether those computers have known vulnerabilities • Physical Intrusion to acquire/modify private information, and/or • Denial of Service to crash a service (or a machine), overload network links or machines' CPU, fill up a disk, etc. Luděk Matyska (Fl MU) 1. Network Security Spring 2011 95 / 128 Network & Data Protection - Maintaining the Availability Network&Data Protection - Maintaining the Availability III. The protection from exploits has to be implemented on: physical level o access protection software level o authentication o encryption o traffic monitoring and instant reaction to incidents juridical level o a definition of desired and undesired behaviour The basic security mechanisms for network protection: o Firewalls o Intrusion Detection Systems o Antiviruses Ludek Matyska (FIMU) 1. Network Security Spring 2011 96 / 128 Network & Data Protection - Maintaining the Availability Firewalls Firewalls I. Firewall a primary mean of securing a private network against penetration o firewall = a hardware, software, or a combination of both that monitors and filters traffic packets that attempt to either enter or leave a protected private network o i.e., interconnects networks with different trust o creates a perimeter defense designed to protect information resources of an organization Outgoing ^ Incoming Firewall 1. Network Security Spring 2011 97 / 128 Network & Data Protection - Maintaining the Availability Firewalls Firewalls II. What a firewall can do... o implement security policies network access protection) at a single point o only authorized traffic is allowed to access the network/services o (or leave the network) o monitor security-related events (audit, log) o alarms for abnormal behavior can be implemented 98 / 128 Network & Data Protection - Maintaining the Availability Firewalls Firewalls III. and what a firewall cannot do... o protect against attacks that bypass the firewall o e.g., dial-out from internal host to an ISP protect against internal threats o disgruntled employee o an insider cooperates with an external attacker o protect against the transfer of virus-infected programs or files o not including application gateways, which may be able to do so 1. Network Security Spring 2011 99 / 128 Network & Data Protection - Maintaining the Availability Firewalls Firewalls IV. Firewalls' Classification Basic firewalls' classification: o Packet filtering firewalls - operate on network layer o Circuit level gateways - operate on session/transport layer o Application gateways (or proxy servers) - operate on application layer o Dynamic packet filtering firewalls (or Session filtering firewalls) o a combination of the three above o these technologies operate at different levels of detail, providing varying degrees of network access protection 1. Network Security Spring 2011 100 / 128 Network & Data Protection - Maintaining the Availability Firewalls Firewalls V. Packet Filtering firewalls Packet Filtering firewalls o decisions are made on per-packet basis o no state information is maintained o applies packet filters based on access rules defined by the following parameters: o source address o destination address o application or protocol/next header (TCP, UDP, etc.) source port number destination port number o advantages: simple, low cost, fast, transparent to users disadvantages: o cannot prevent attacks that employ application-specific vulnerabilities or functions o because they do not examine upper-layer data Ludek Matyska (FIMU) 1. Network Security Spring 2011 101/128 Network & Data Protection - Maintaining the Availability Firewalls Firewalls V. Dynamic Packet Filtering (Session Filtering) firewalls I. Dynamic Packet Filtering (Session Filtering) firewalls o traditional packet filters do not examine higher layer context o i.e., matching the incoming (returned) packets with an outgoing flow o dynamic packet filtering examines and maintains a context of each packet o they keep track of client-server connection o == a connection table (so-called State table) is maintained packet decision is made in the context of a connection o if a packet establishes a new connection, it is checked against a policy o if a packet is a part of an existing connection, it is matched up in the state table o advantages: transparent to users o low CPU overheads o for all the packets (except the first one) belonging to the same connection, no policy database lookups are performed Ludek Matyska (FIMU) 1. Network Security Spring 2011 102 / 128 Network & Data Protection - Maintaining the Availability Firewalls Firewalls V. Dynamic Packet Filtering (Session Filtering) firewalls II. Network & Data Protection — Maintaining the Availability Firewalls Firewalls V. Circuit Level Gateways I. Circuit Level Gateways o work at the session layer of the ISO/OSI model (TCP layer of the TCP/IP model) o monitor TCP handshaking between packets to determine whether a requested session is legitimate o do not permit an end-to-end TCP connection o rather, the gateway sets up two TCP connections o one between itself and a TCP user on an inner host, and o one between itself and a TCP user on an outside host o once the two connections are established, the gateway typically relays TCP segments from one to the other without examining the contents o usage example: o hiding information about internal/protected networks • non-requested data from outside the firewall is not allowed in — all ports are closed until the firewall opens them o e.g., requests from protected network pass through the gateway, which intercept and record them once the answer reaches the gateway, it is compared to the original request to see if the IP address and the port match up Ludek Matyska (FIMU) 1. Network Security Spring 2011 104 / 128 Network & Data Protection - Maintaining the Availability Firewalls Firewalls V. Circuit Level Gateways II. Circuit Level Gateways cont'd. o a combination of circuit-level gateway with Internet sharing = Network Address Translation (NAT) o originally a reaction to IPv4 address exhaustion o but the NAT is not a firewall on itself! 1. Network Security Spring 2011 105 / 128 Network & Data Protection - Maintaining the Availability Firewalls Firewalls V. Circuit Level Gateways III. 1. Network Security Spring 2011 106 / 128 Network & Data Protection - Maintaining the Availability Firewalls Firewalls V. Application Gateways I. Application Gateways o similar to circuit-level gateways except that they are application specific o i.e., tailored to a specific application program every connection between two networks is made via an application program called a proxy o proxies are application/protocol specific o they investigate the content of the passing flows connection state is maintained and updated o only protocols that have specific proxies configured are allowed through the firewall (all other traffic is rejected) o e.g., a gateway that is configured to be a web proxy will not allow any FTP, telnet or other traffic through Ludek Matyska (FI MU) 1. Network Security Spring 2011 107 / 128 Network & Data Protection - Maintaining the Availability Firewalls Firewalls V. Application Gateways II. Application Gateways cont'd. o usage example: o HTTP proxies (URL blocking), SMTP proxies (virus scanning, spam identification), DNS proxies, etc. o advantages: o more secure than packet filtering firewalls o can investigate the content of the flows o can protect against protocol errors o it is easy to log and audit all incoming/outgoing traffic disadvantages: o very CPU intensive == lower performance require high performance host computer more vulnerable to DoS attacks (see later) o problematic for encrypted data (including IPSec) 1. Network Security Spring 2011 108 / 128 Network & Data Protection - Maintaining the Availability Firewalls Firewalls VI. Concluding Remarks o firewalls cannot serve as a panacea to network security threats o many security attacks led from within the internal (not protected) network increase the risk of rapid infection spread false safety feeling o the internal network is not usually sufficiently protected o users become lazy o usually cause a slowdown on high-speed networks o their functionality is very useful for interrupting the ongoing attack o application proxies: o risk of faults (e.g., false virus detection) o the importance of privacy protection 1. Network Security Spring 2011 109 / 128 Network & Data Protection - Maintaining the Availability Intrusion Detection Systems Intrusion Detection Systems (IDS) I. o network perimeter security technologies (i.e., firewalls) and anti-malicious software technologies (i.e., antiviruses, see later) cannot stop attackers if they obtain authenticated access to target computers and log on to them as if they are legitimate users o (i.e., they had obtained login information of a legitimate user) it is desirable (and often necessary) to detect intrusion activities by monitoring ingress packets that have passed through firewalls and analyze how users use their computers o == Intrusion Detection Systems (IDS) and Honeypots Intrusion Detection Systems (IDS) o a system used to detect unauthorized intrusions into computer systems and networks o based on an assumption that the behavior of the intruder differs from that of a legitimate user they collect information from a variety of system and network sources and look for attack signatures o = specific patterns that usually indicate malicious or suspicious intent Ludek Matyska (FIMU) 1. Network Security Spring 2011 110/128 Network & Data Protection - Maintaining the Availability Intrusion Detection Systems Intrusion Detection Systems (IDS) II. Classification IDS classification: o different ways of classifying o IDSs based on detection model: anomaly detection signature based misuse (misuse detection) hybrid o IDSs based on scope: host-based multihost-based network-based IDSs based on operation: o offline - inspect system logs at set intervals o online - monitor the system continuously 1. Network Security Spring 2011 111 / 128 Network & Data Protection - Maintaining the Availability Intrusion Detection Systems Intrusion Detection Systems (IDS) III. Anomaly Detection Anomaly Detection IDSs: o model the normal usage of the network as a noise characterization o anything distinct from the noise (atypical behavior) is assumed to be an intrusion activity o e.g., flooding a host with lots of packet o the primary strength is its ability to recognize novel attacks o drawbacks: o assume, that intrusions will be accompanied by manifestations that are sufficiently unusual generate many false alarms □ == compromise the effectiveness of the IDS 1. Network Security Spring 2011 112 / 128 Network & Data Protection - Maintaining the Availability Intrusion Detection Systems Intrusion Detection Systems (IDS) III. Misuse Detection Misuse Detection IDSs: o recognize known attacks based on signatures o a set of attack signatures has to be defined (and updated) if an action matching a signature is detected, it is considered to be an attack drawbacks: o unable to detect novel attacks o suffer from false alarms have to be programmed again for every new pattern to be detected 1. Network Security Spring 2011 113 / 128 Network & Data Protection - Maintaining the Availability Intrusion Detection Systems Intrusion Detection Systems (IDS) III. Host-based & Multihost-based IDSs I. Host-based IDSs: o host operating system (or an application) logs in the audit information o e.g., use of identification and authentication mechanisms (logins, etc.), file opens and program executions, admin activities, etc. o the audit is then analyzed to detect trails of intrusion Multihost-based IDSs: audit information is analyzed from multiple hosts o analysis architecture: o centralized - all data shipped to a central location for analysis o hierarchical - data is analyzed as it passed up through the layers o distributed - distributed analysis of the data 1. Network Security Spring 2011 114 / 128 Network & Data Protection - Maintaining the Availability Intrusion Detection Systems Intrusion Detection Systems (IDS) III. Host-based & Multihost-based IDSs II. Host-based & Multihost-based IDSs: cont'd. o advantages: o can detect data that are encrypted during transmissions o do not need special hardware devices o check system logs and so can analyze system behavior more accurately disadvantages: o are installed in the target systems, and so they require extra system managing may consume extra computing resources on the systems o might become affected by attacks that affect the host computers/servers they are installed in 1. Network Security Spring 2011 115 / 128 Network & Data Protection - Maintaining the Availability Intrusion Detection Systems Intrusion Detection Systems (IDS) III. Network-based IDSs Network-based IDSs: o look for attack signatures in network traffic via a promiscuous interface o a filter is usually applied to determine which traffic will be discarded or passed on to an attack recognition module o to filter out known un-malicious traffic o advantages: q low cost - usually small number of selected points to monitor the entire network o no interference - packets are monitored passively (it does not interfere normal network traffic) o intrusion resistent - usually a small system, which can be easily made to resist an intrusion disadvantages: o may not be able to analyze encrypted packets o may not be able to handle large volume of network traffics in time o some intrusion activities (e.g., fragmentation-attack) are hard to identify hard to determine, whether the intrusion activity has been successfully carried out Ludek Matyska (FIMU) 1. Network Security Spring 2011 116/128 Network & Data Protection - Maintaining the Availability Intrusion Detection Systems Intrusion Detection Systems (IDS) IV. Concluding Remarks o Intrusion Detection Systems are only one piece of the whole security puzzle o they must be supplemented by other security and protection mechanisms o they are a very important part of security architecture but do not solve all the potencial problems Spring 2011 117 / 128 Network & Data Protection - Maintaining the Availability Intrusion Detection Systems Honeypots Honeypot o a system designed to teach how intruders probe for and exploit a system o by learning their tools and methods, one can better protect her network and systems o usually used for: o diverting an attacker from accessing critical systems • collecting information about the attacker's activity o encouraging the attacker to stay on the system long enough for administrators to respond o based on virtual or real systems 1. Network Security Spring 2011 118 / 128 Network & Data Protection - Maintaining the Availability Intrusion Detection Systems Honeypots "Tracking Their Moves" I. "Tracking Their Moves" o do not log information on the honeypot itself you can easily loose the information o the fewer modification you make to the honeypot, the better the more changes you make, the better the chance an intruder will discover something is up track in layers, do not depend on a single source of information o first layer of tracking is the firewall logs second layer is the system logs o third layer of tracking is to use a sniffer o it picks up all keystrokes and screen captures o run, e.g., the Tripwire on the honeypot o to discover what binaries have been altered on a compromised system 1. Network Security Spring 2011 119 / 128 Network & Data Protection - Maintaining the Availability Intrusion Detection Systems Honeypots "Tracking Their Moves" II. "Tracking Their Moves" cont'd. o do not mindlessly reinstall the compromised system!!! • otherwise you'll lose the information about the security hole the intruder had exploited o if possible, do not reboot the compromised system running malicious programs may not automatically start after the reboot if possible, do not disconnect the compromised system from the network the system, once being disconnected from the network, may close all the active network connections o better way is to cut off the system on the closest firewall o or disconnect it behind first network element (switch, router, etc.) 1. Network Security Spring 2011 120 / 128 Network & Data Protection - Maintaining the Availability attacks Denial of Service (DoS) & Distributed DoS (DDoS) I. Denial of Service (DoS) attack: o an attack that causes a loss of a service to users o typically the loss of network connectivity and services by consuming the bandwidth of the victim's network or overloading the computational resources of the victim's system o the flood of incoming messages essentially forces the target system to shut down (thus denying the service) o attack lead from a single source o not too dangerous - can be stopped on the closest active network element o attack lead from many sources = Distributed Denial of Service (DDoS) attack o a synchronized attack from many sources (e.g., Botnets) o hard to discover - all the requests appear to be sent by legitimate users much more dangerous o stopping requires a cooperation in the network o stopping in active networks — consecutive cut of flows against their direction 1. Network Security Spring 2011 121 / 128 Network & Data Protection - Maintaining the Availability Virusses & Worms Virusses & Worms I. Computer virus a self-propagating computer program designed to alter or destroy a computer system resource a self-replicating program, similar to a computer virus - a virus attaches itself to, and becomes part of, another executable program; however, a worm is self-contained and does not need to be part of another program to propagate itself (through security holes of a networked system) Virus/Worm attacks: • some sort of trigger will activate the attack phase, and the virus will then "do something" • trigger = a specific date, or the number of times the virus has been replicated, or anything similar • "do something" = anything from printing a silly message on the screen to erasing all of your data Ludek Matyska (FIMU) 1. Network Security Spring 2011 123 / 128 Network & Data Protection - Maintaining the Availability Virusses & Worms Virusses & Worms II. Protection from virus/worm attacks: run a secure operating system with access rights o security features keep viruses away run virus protection software o in end-nodes and/or application gateways avoid programs from unknown sources educating the users is a must o = computer hygiene 1. Network Security Spring 2011 124 / 128 Network & Data Protection - Maintaining the Availability Network & Data Protection - Concluding Remarks Network & Data Protection - Concluding Remarks o attacks/intrusions - an effort to acquire an access to a network or its services • reasons range from boyish fun ("testing neighbor's pears") to military/terroristic actions o usage: o private data access/modification o source platform for subsequent activity (e.g., DDoS) o protection: access control on all possible levels o regular maintanance (patches, upgrades, etc.) o network traffic monitoring o monitoring of processes running on the servers/end-nodes o users' education 1. Network Security Spring 2011 125 / 128 Conclusion Lecture overview 1 Introduction Motivation • Network Security Elements 1 Cryptography Introduction 9 Symmetric Cryptography Asymmetric Cryptography Network Security Mechanisms Entity Authentication 9 Message Confidentiality (Security) Message Integrity Message Authentication Digital Signature 9 Key Management and Distribution 1 Example Protocols Ensuring Network Security in the Internet • Application-layer Security • Transport-layer Security Network-layer Security • Link-layer Security Network & Data Protection - Maintaining the Availability • Firewalls Intrusion Detection Systems 9 Denial of Service (DoS) & Distributed Denial of Service (DDoS) attacks 9 Virusses & Worms • Network & Data Protection - Concluding Remarks Conclusion Ludek Matyska (FI MU) 1. Network Security Spring 2011 126 / 128 2 3 4 6 Conclusion Network Security - Recapitulation • "Security is not a product; it's a process." (B. Schneider) o AAA mechanisms + secured communication mechanisms + data/services protection/availability o features of a secured communication network: o Confidentiality - encryption o Integrity - hash functions o Non-repudiation - digital signatures o symmetric (shared key) and asymmetric (key pair - private and public) cryptography • symmetric - DES, 3DES, AES, etc. o asymmetric - RSA, Diffie-Hellman key exchange, etc. o secured communication mechanisms can be provided on various ISO/OSI layers (application, transport, network, data link) o network & data protection o firewalls, IDSs, etc. 1. Network Security Spring 2011 127 / 128 Conclusion Network Security - Further Information o FI courses: o PV017: o PV079: o PV080: o PV157: Information Technology Security (doc. Staudek) Applied Cryptography (prof. Matyáš et al.) Protection of Data and Information Privacy (prof. Matyaš) Authentication and Accešš Control (prof. Matyáš and dr. Říha) o PV210: Security analysis of network traffic (RNDr. Vykopal) o etc. o (Used) Literature: o J. M. Kizza: A Guide to Computer Network Security. Springer-Verlag, 2009. o W. Stallings: Network Security Essentials - Applications and Standards. Prentice Hall, 2003. q W. Stallings: Cryptography and Network Security Principles and Practices, 4th edition. Prentice Hall, 2005. o B. Schneier: Applied Cryptography, 2nd edition. John Wiley & Sons, 1996. q J. Wang: Computer Network Security - Theory and Practice. Springer-Verlag, 2009. • R. Lehtinen: Computer Security Basics, 2nd edition. O'Reilly Media, 2006. etc. 1. Network Security Spring 2011 128 / 128