Scarica Information systems security e più Prove d'esame in PDF di Information Technology Management solo su Docsity!
Collection of exams
of
Information Systems Security
Chapter 1
Introduction to the security of networks
and information systems
1. 1. Talk about sniffing, spoofing and hijacking attacks and describe the appropriate security measures. By sniffing we mean the detection of packets in transit in a network and their analysis to steal sensitive information; packet encryption is required to counteract it. Spoofing is the falsification of an IP address in order to access resources and systems; the countermeasure is not to use addresses for authentication. Hijacking (or Man In The Middle) is the hijacking of a connection by a part of an individual by manipulating or deleting packets; in order to counter it, confidentiality, authentication and package integrity are required 2. 2. Explain what social engineering is, give an example of this attack, indicate the countermeasures that a company can take to defend itself. By social engeniiring we mean a type of attack that does not hit the "IT" side of a company / organization, but the human side, exploiting the psychological and social weaknesses of people in prominent positions. A very relevant and widespread example is the phishing mail which consists in sending fake emails that push the user to click on malicious links. The best countermeasure a company can employ in this regard is to educate its employees about these risks. 3. Describe a phishing attack and what are the measures to limit it. The phishing mail consists in sending fake emails that push the user to click on malicious links; some variations are whaling (which attacks big shots) and spear phishing (which uses personal information to increase the chances of success). The best countermeasure a company can employ in this regard is to educate its employees about these risks. 4. Explain what a connection hijacking attack is, how it can be conducted and what countermeasures can be taken.
9. Explain what DoS means and give examples; why it is difficult to detect a DoS attack; how to defend against these attacks. In a DoS attack the functioning of a server is prevented or limited by various methods, such as the physical destruction of the connections or a flooding of requests to the servers in order to overload them; discovering this type of attack is difficult because it is often not easy to identify whether it is actually an attack or a simple malfunction (not to mention the fact that the inaccessibility of the service makes it difficult to diagnose it); being a predominantly brute force attack, there is no simple method to protect against it other than by increasing the agility and flexibility of the system in question, perhaps by increasing the number of servers and connections or by improving the efficiency of security software 10. What is Stuxnet? How does it work and what lessons can we draw from it? Stuxnet is a malware which is a combination of worm + virus for Windows systems. It constitutes the prototype of a new type of attack, because it was the first known case of an attack on SCADA systems, which are systems used to control industrial plants. Since the computers weren't connected to the Internet, the first vehicle of infection was probably a maintenance technician's USB stick, and then the malware spread through shared network drives unprotected. 11. Say what the window of exposure is and where you can act to reduce it The exposure window is the length of time the system is exposed to a security threat: 1. Discovery phase: an attacker exploits an unknown vulnerability: (a) an attacker discovers a new vulnerability; (b) the attacker develops an attack program, called an exploit, which exploits this vulnerability; (c) the attacker begins to carry out attacks, causing the vulnerability to become public;
- Publishing stage: people try to limit the damage: (a) the victim of the attack informs the producer of the vulnerability; (b) the manufacturer informs all its customers of the existence of this problem; (c) customers update defense tools (eg IDS signatures), pending a patch; (d) the manufacturer releases a patch;
- protection phase: customers apply the countermeasure: (a) the patch is made available to all customers; (b) only when everyone installs the patch can the problem be considered solved. To reduce it, periodic security checks can be carried out to detect vulnerabilities in advance, and notify the public as soon as possible in the event of an attack so as to minimize damage. 12. Bruce Scheiner wrote "security is a process, not a product" explaining the meaning of this statement and providing a practical example of its implementation with technical elements. Buying a single product to make security is not enough to make a system protected as the single product is not free from bugs, but it is necessary to design your own security system using multiple systems in parallel, possibly from different manufacturers in order to guarantee a major defense. The most practical example is to use a firewall from a manufacturer and an identification system from a second manufacturer (IDS), so in the event of a bug with the first product, the second takes over to stem the damage. 13. Define the terms threat, vulnerability and security control, then explain what relationships exist between them and provide an example for each term in the case of a related triad Vulnerability: weakness of an IT asset
Its shape is HMAC = H (K 'XOR opad || H (K' XOR ipad || data)) Where is it: -ipad: 0x36 repeated B times -opad: 0x5c repeated B times -K 'calculated as follows: take a key K (| K |> = L) if (| K |> B) then K '= H (K) else K' = K if (| K '| In total 1300 without HSM, 1172 with HSM (which keeps the key in its memory)
19. What do the following acronyms mean: DSA, RC-4, RIPEMD? -DSA: is an asymmetric cryptography algorithm that does exponential on one side and logarithm on the other; it is used only for digital signature (therefore no encryption), since the function it uses if applied on plaintext would cause data loss -RC-4: stream-type symmetric encryption algorithm, which is applied to a continuous bit stream: the basic operation is that source and destination agree on a seed used to encrypt and decrypt -RIPEMD: cryptographic hash algorithm; considered excellent but hardly used 20. Give a brief description of: RC4, RSA, RIPEMD. -RSA: is an asymmetric block cipher algorithm that generates its keys using two exponents; the choice of these exponents is fundamental for the quality of the final result (in particular, the product of the two exponents must be less than the size of the block to be encrypted) -RC-4: stream-type symmetric encryption algorithm, which is applied to a continuous bit stream: the basic operation is that source and destination agree on a seed used to encrypt and decrypt -RIPEMD: cryptographic hash algorithm; considered excellent but hardly used 21. RC-4 stream stream-type symmetric encryption algorithm, which is applied to a continuous bit stream: the basic operation is that source and destination agree on a seed used to encrypt and decrypt 22. Difference between stream and block algorithms The algorithms encrypt the main file by dividing it into blocks and encrypting each in a more or less separate way with the key according to the chosen algorithm (for example, ECB encrypts each block separately, while CBC encrypts each block n after the first by XORing it with the result of step n-1); stream algorithms apply to a continuous bit stream: the basic operation is that source and destination agree on a seed used to encrypt and decrypt (some examples are RC4, Salsa20 and ChaCha20) Stream algorithms tend to be faster than block algorithms since they perform a simple XOR, but require constant synchronization between sender and receiver (this does not make them good for internet transmissions); by
initialization vector IV is used, which in transmission can be sent hidden or even in clear) Advantages and disadvantages:
- No swapping attacks
- No known plain text attacks
- Propagation of errors in case of loss and error in transmission of a block
- No CPU parallelization CTR is a method for transmitting files smaller than a block size: data is divided into groups, and each group is mixed with a nonce + counter which is incremented for each group (the nonce must be identical to the destination) The main disadvantage is that clearing a block causes the counter to be desynchronized 29. Two users wish to exchange a series of ASCII (.TXT) documents over the network. Suggest what operations should be performed on these documents before transmitting them to resist attacks on the (insecure) network. Please note that the documents do not contain confidential information. Note: Do not use complex protocols or data formats. Express the solution by formula (using appropriate terms, such as aes (k, d) rather than enc (k, d)) n = nonce + counter k = DH digest = hmac_sha256 (k, P || n) c = P || digest || n 30. User A wants to send a secret and authenticated message to users B and C, all three have a pair of RSA keys each. Describe the format of the data block to send the message with the required security properties. You have to encrypt with the public keys of B and C and sign with your private and distribute the public key of A, then: -C receives: AES_128 (Kpub; c, M) || HMAC-SHA256 (AES_128 (Kpub; c, M), Kpri; a) || Kpub; a -B receives: AES_128 (Kpub; b, M) || HMAC-SHA256 (AES_128 (Kpub; b, M), Kpri; a) || Kpub; a 31. Talk about the keyed digest mechanism (what it is, when and how to use it, advantages and disadvantages).
In a solution of this type, a digest calculated not only on the data, but also on a secret (key) is sent and only those who know K can calculate the digest on the received data and compare it with the transmitted digest. This solution is widely used in the network environment. Security Properties:
- integrity: if the plaintext data are modified, the kdR keyed-digest calculated on the received data will be different from the received kdF keyed- digest;
- authentication: only those who know the secret key can have generated a keyed-digest corresponding to the data;
- confidentiality: the data are sent in clear text;
- non-repudiation: it is not possible to determine which peer generated the data. Advantages and disadvantages:
- amount of data transmitted: the keyed-digest is very small compared to the data;
- computation time: hash algorithms are quick to execute;
- implementation: a single hash algorithm is sufficient to ensure both confidentiality and authentication.
- partial integrity: collisions can occur, since it is theoretically impossible to identify all possible changes 32. Talk about the keyed-digest and digital signature, what are their properties, advantages and disadvantages? Keyed-digest: a digest calculated not only on the data, but also on a secret (key) is sent and only those who know K can calculate the digest on the data received and compare them with the digest transmitted. This solution is widely used in the network environment. Security Properties:
- integrity: if the plaintext data is modified, the kdR keyed-digest calculated on the received data will be different from the received kdF keyed-digest;
- authentication: only those who know the secret key can have generated a keyed-digest corresponding to the data;
- confidentiality: the data are sent in clear text;
- non-repudiation: it is not possible to determine which peer generated the data. Advantages and disadvantages:
- integrity: if the unencrypted data is modified, the MDR digest calculated on the received data will be different from the received and decrypted MDF digest;
- authentication: only those who know the private key can have generated a digital signature corresponding to the data;
- confidentiality: the data are sent in clear text;
- non-repudiation: the sender cannot deny having signed the data, as long as his public key is provided by a public key certificate. Advantages and disadvantages:
- little additional data
- inapplicable to a real time data flow 35. Why is the SHA-1 algorithm deprecated? Suggest a viable alternative and motivate why this is better than SHA-1. SHA-1 was an overall good algorithm, but also extremely attached. In fact, a group of Chinese researchers managed to find collisions with only 2 ^ 69 calculations. SHA-2 was later popularized. As a quick fix after the SHA- attack, the SHA-2 family was created by lengthening the digest, similar to what happened between DES and 3DES. 36. Sort the following algorithms from fastest to slowest: SHA, AES_ECB, AES_CBC, RC SHA, RC4, AES_ECB, AES_CBC 37. Given the following encryption algorithms, sort them from slowest to fastest: AES, DES, RC4, 3DES. 3DES, DES, AES, RC 38. Describe elliptic curve cryptography. Elliptic Curve Cryptography (ECC) uses two-dimensional elliptic curve arithmetic, instead of one-dimensional modular arithmetic. From a conceptual point of view, instead of using numbers (which are points on a straight line) we take the Cartesian space, and the values that are valid are only the points that satisfy the equation of an elliptic curve. The discrete logarithm problem on a curve is more complex to solve for bad guys than the discrete logarithm problem in modular arithmetic, so the keys for ECC can be shorter (about 1/10) for a comparable level of security , reducing the storage requirements on embedded devices. Some examples of use are the ECDSA (Elliptic Curve DSA) for digital signature, and the ECDH (Elliptic Curve DH) for the key agreement. 39. Say the two main advantages of ECC-based algorithms The problem of the discrete logarithm on a curve is more complex to solve for bad guys than the problem of the discrete logarithm in modular arithmetic, therefore:
- The keys for the ECC can be shorter (about 1/10) for a comparable level of security
- For the good ones all the algorithms require only two elementary operations that give as result of the points
40. Describe the CBC-MAC keyed-digest algorithm. The MAC consists of the last block of ciphertext resulting from the application of a symmetric block cipher algorithm in CBC mode, with null initialization vector IV (confidentiality is not necessary): all ciphertext blocks are thrown away except the last one, which is taken as MAC) the recipient can encrypt the received data with the same encryption algorithm and compare the last resulting ciphertext block with the received ciphertext block. 41. One of the first methods to encrypt data? Electronic Code Book (ECB), which consisted of: 1. divide the plain text to be encrypted into basic blocks of fixed size; 2. apply the encryption algorithm on each i-th block, regardless of the other blocks: Ci = enc (K, Pi) 3. concatenate the resulting blocks to produce the ciphertext. The decryption takes place by reversing the sequence of operations: Pi = enc − 1 (K, Ci) Now obsolete as it was subject to various types of attacks, including mainly swapping and known-plain text 42. On embedded systems, ECDSA is often preferred over RSA: why? Because the keys to the ECC can be shorter (about 1/10) for a comparable level of security, reducing the storage requirements on embedded devices. 43. What is the main advantage of the CTR encryption mode? The ability to parallelize the CPU in the calculation, as any group can be encrypted without having to encrypt the previous groups (random access). 44. Indicate which integrity attack is possible if data D is protected with a MAC calculated as follows (k is the key and h is the hash function): MAC = h (k || D). If you concatenate another block in the queue, the digest will be different and the coupon will not notice it, so the digest will be changed in some way without knowing the shared key. 45. Advantages and disadvantages of encryption made with enc (enc (p, k1), k2) with k1 and k2 different keys but of equal length A double application of encryption algorithms is generally never used, which is why it is avoided, as it would not significantly increase the level of security. Furthermore, the double application of encryption algorithms is subject to a known-plaintext attack, called meet-in-the-middle, which allows data to be decrypted with at most 2N + 1 attempts (for N-bit keys). In short, it doubles the computation time but the key length increases by just one bit. 46. Describe the ECB cryptographic technique identifying its advantages and disadvantages. The Electronic Code Book (ECB), which consists of: 1. divide the plain text to be encrypted into basic blocks of fixed size;
51. Having to encrypt a 12-character password with 2 bytes of salt with AES, is it better to use ECB, CBC or CTR? Aes has 128bit block, 12 ascii characters then 8bit each is 96bit plus 16bit salt is 112bit, so less than block which would lead me to use CTR 52. Digital signature with SHA256 digest, RSA-2048 private key on a 10MB file. What is the size of the signature? Since an RSA-2048 private key is used the signature size will be 2048bit 53. How can two guys who share a password send a file Through symmetric key algorithms, using the password as the key 54. A 10MB document must be signed with SHA-1 digest and RSA key. How big exactly is the document signature? It depends on the size of the RSA key. Assuming it is 2048 bits, the signature will also be 2048 bits long 55. What algorithms can be used to exchange secret keys? Those with an asymmetric key (such as RSA), since no secret must be sent to make them work 56. What algorithms can be used to communicate a certain secret key to a counterparty? Those with an asymmetric key (such as RSA), since no secret must be sent to make them work **57. Hash to compute the password starting from a seed.
- For which application was the CTS invented?** The ciphertext stealing (CTS) technique allows you to use block algorithms in ECB or CBC mode without resorting to padding. 59. Explain what the CTS operating mode is, what is the main idea on which its implementation is based and why it is becoming increasingly important CTS is a technique that allows you to use block algorithms without padding. The bytes of the previous block are added to the last block, removing them from the penultimate block. To avoid standard padding, a part of the ciphertext already encrypted is used as padding. That is, for large files, it is not dramatic, as it only affects the last two blocks. It is useful when you cannot / want to increase the size of the data after encryption. 60. Why don't you use 2DES and prefer 3DES? A double application of encryption algorithms such as 2DES is generally never used, which is why it is avoided, as it would not significantly increase the level of security. Furthermore, the double application of encryption algorithms is subject to a known-plaintext attack, called meet-in-the-middle, which allows data to be decrypted with at most 2N + 1 attempts (for N-bit keys). In short, it doubles the computation time but increases the key length by just one bit. 3DES does not have these problems. 61. Calculate how much data must be saved on disk to decrypt and authenticate a 1 kB large file with SHA-1 digest and 1024-bit RSA key.
1Kb_file + 1Kb_PublicKey + 160bit_storedDigest = 2208 bit: to decrypt the file we need it and the public key. To authenticate it, you need the digest and the public key to verify it
62. What basic algorithms (not complex data structures) can be used to ensure the **confidentiality of a file located on a server that you do not trust?
- Explain the term security through obscurity. Explain why some say it's good and** others don't. Attempting to maintain or increase the security of a system by keeping the design or construction of a security mechanism secret. Some do not consider it a good defense method because in an open system it is easier to find and announce possible vulnerabilities. 64. Explain authenticated encryption. Authenticated encryption (AE) algorithms combine encryption and keyed-digest in a single operation:
- confidentiality and authentication (and integrity) with a single algorithm and a single key;
- higher speed;
- lower risk of implementation errors. AE is becoming an increasingly growing need at the application level (eg. For e-mail messages). AE algorithms can be:
- AEAD or not: some authenticated data can be left unencrypted;
- single-pass or double-pass: a double-pass algorithm needs to store the results of the first pass for further calculations) it is at least twice slower than a one-pass algorithm if implemented in software;
- on-line or off-line: the data can be taken as it arrives from the wire or all must first be saved. Normal encryption schemes are prone to chosen-ciphertext (oracle) attacks when used online:
- the attacker modifies a ciphertext;
- the attacker observes whether the receiver reports an error or not. 65. CBC and CTR mode: explain, advantages and disadvantages. CBC is a block cipher algorithm that encrypts each block n after the first by XORing it with the result of step n-1 (for the first step, instead, an initialization vector IV is used, which in transmission can be sent hidden or even in clear) Advantages and disadvantages:
- No swapping attacks
- No known plain text attacks
- Propagation of errors in case of loss and error in transmission of a block
- No CPU parallelization CTR is a method for transmitting files smaller than a block size: data is divided into groups, and each group is mixed with a nonce + counter which is incremented for each group (the nonce must be identical to the destination)
disadvantages: key distribution
- asymmetrical: disadvantages: slow, key generation, key distribution
Chapter 3
Authentication systems
71. Symmetrical Challenge Authentication Systems, Advantages and Disadvantages. A challenge system is an authentication process that verifies an identity by requesting that the correct authentication information be provided in response to a challenge; the symmetric version requires that the response to the challenge is calculated with the common key shared with the server Pros and cons: + no sniffing + no replay (challenge contains a nonce) - client side, the user must have a hash function to calculate the response (not always possible) - the server cannot store the hash of the passwords, but must know them in clear text in order to calculate the hash of the solution - the challenge goes clear 72. Symmetric authentication, what it is, how it works, advantages, weaknesses. A challenge system is an authentication process that verifies an identity by requesting that the correct authentication information be provided in response to a challenge; the symmetric version requires that the response to the challenge is calculated with the common key shared with the server. Authentication procedure 1. identification: the client sends its UID; 2. request for proof: the server generates a nonce and random number n and sends it as a challenge;
- test: the client computes the keyed-digest on the challenge received, using the shared secret k as the key d = H (k, n) and transmits the keyed-digest d calculated as a solution to the challenge;
- check: the server performs the same calculation of the solution using the generated challenge and the shared secret, and compares the proof received with the calculated solution: if (d = H (k, n)) then OK else ALARM Pros and cons:
- no sniffing
- no replay (challenge contains a nonce)
- client side, the user must have a hash function to calculate the response (not always possible)
- the server cannot store the hash of the passwords, but must know them in clear text in order to calculate the hash of the solution
- the challenge goes clear 73. Kerberos is said to be a TTP authentication system. Explain why it is classified in this way and what risks clients and application servers face if the third party does not behave correctly. TTP stands for Third Thrusted Party, and kerberos has this definition because its authorization system also uses an intermediate ticket issuing server between pretender and verifier. 74. Kerberos: Explain what trusted third party means. TTP stands for Third Thrusted Party, and kerberos has this definition because its authorization system also uses an intermediate ticket issuing server between pretender and verifier. 75. Explain what the dictionary attack is: under what hypotheses it can be conducted and what countermeasures to adopt. A dictionary attack is a type of brute force attack with the purpose of detecting one