chapter 10 Flashcards

1
Q

hashing.

A

You can verify integrity with hashing. Hashing is a mathematical algorithm performed on data such as a file or message to produce a fixed-length hexadecimal string of characters called a hash. The hash is used to verify that data is not modified, tampered with, or corrupted. In other words, you can verify the data has maintained integrity.

Hashing verifies integrity for data such as email, downloaded files, and files stored on a disk. A hash is a hexadecimal number created with a hashing algorithm.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Hash Versus Checksum

A

Hashes and checksums are similar, but there are some differences. In general, hashes are much longer numbers and used in strong cryptographic implementations. A checksum is typically a small piece of data, sometimes only 1 or 2 bits, and is used to quickly verify the integrity of data.

Checksums are not intended to be cryptographically secure. Instead, they give a quick indication when data integrity has been lost.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

MD5

A

Message Digest 5 (MD5) is a common hashing algorithm that produces a 128-bit hash value. Hashes are commonly shown in hexadecimal format instead of a stream of 1s and 0s. For example, an MD5 hash is displayed as 32 hexadecimal characters instead of 128 bits. Hexadecimal characters are composed of 4 bits and use the numbers 0 through 9 and the characters a through f.

MD5 has been in use since 1992. Experts discovered significant vulnerabilities in MD5 in 2004 and later years. As the processing power of computers increased, it became easier and easier to exploit these vulnerabilities. Security experts now consider MD5 cracked and discourage its use as a cryptographic hash.

However, it is still sometimes used to verify the integrity of files as a quick checksum. This includes email, files stored on disks, files downloaded from the Internet, executable files, and more.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Secure Hash Algorithms

A

Secure Hash Algorithms (SHA) are a group of hashing algorithms with variations grouped into four standards— SHA-0, SHA-1, SHA-2, and SHA-3:

SHA-0 is flawed and not used.

SHA-1 is an updated version that creates 160-bit hashes. It is similar to the MD5 algorithm. Weaknesses were discovered and it is no longer approved for most cryptographic uses.

SHA-2 improved SHA-1 to overcome potential weaknesses. It includes four versions. SHA-256 creates 256-bit hashes and SHA-512 creates 512-bit hashes. SHA-224 (224-bit hashes) and SHA-384 (384-bit hashes) create truncated versions of SHA-256 and SHA-512, respectively.

SHA-3 (previously known as Keccak) is an alternative to SHA-2. The U.S. National Security Agency (NSA) created SHA-1 and SHA-2. SHA-3 was created outside of the NSA and was selected in a non-NSA public competition. It can create hashes of the same size as SHA-2 (224 bits, 256 bits, 384 bits, and 512 bits).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

HMAC

A

Another method used to provide integrity is with a Hash-based Message Authentication Code (HMAC). An HMAC is a fixed-length string of bits similar to other hashing algorithms such as MD5 and SHA-256 (known as HMAC-MD5 and HMAC-SHA256, respectively). However, HMAC also uses a shared secret integrity key to add some randomness to the result and only the sender and receiver know the secret key.

HMAC-MD5 is secure if the secret key is long enough.

Internet Protocol security (IPsec) and Transport Layer Security (TLS) often use a version of HMAC such as HMAC-MD5 and HMAC-SHA256.

Remember This! Hashing is a one-way function that creates an alphanumeric string of characters. You cannot reverse the hash to re-create the original file. Passwords are often stored as hashes instead of storing the actual password. Additionally, applications often salt passwords with extra characters before hashing them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Hashing Files

A

Like a program .exe file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Hashing Messages

A

Hashing provides integrity for messages.

If you can recognize the hashing algorithms such as MD5, SHA, and HMAC, it will help you answer some exam questions. For example, if a question asks what you would use to encrypt data and it lists three hashing algorithms, you can quickly eliminate them because hashing algorithms don’t encrypt data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Understanding Hash Collisions

A

A hash collision occurs when the hashing algorithm creates the same hash from different inputs. This is not desirable.

MD5 is highly susceptible to hash collision attacks, which is why it is no longer recommended as a cryptographic hash.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Understanding Password Attacks

A

Online Password attacks. ncrack is a free tool that can be used to run online brute force password attacks.

Offline password attacks Offline password attacks attempt to discover passwords from a captured database or captured packet scan.

Event ID 4625 indicating failed logon attempts

Remember This! Online attacks guess the password of an online system. Offline attacks guess the password stored within a downloaded file, such as a database. Logs will show a large volume of failed logon attempts as Event ID 4625 and/or several accounts being locked out as Event ID 4740.

Spraying attacks attempt to avoid account lockout policies, but logs will still show a large volume of failed logon attempts, but with a time lapse between each entry.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

dictionary attack

A

A dictionary attack is one of the original password attacks. It uses a dictionary of words and attempts every word in the dictionary to see if it works. A dictionary in this context is simply a list of words and character combinations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Brute Force Attacks

A

A brute force attack attempts to guess all possible character combinations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

password spraying attack

A

A spraying attack loops through a long list of accounts, it takes a while before it hits the same account twice.

However, you’ll still see Event ID 4625 indicating failed logon attempts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Pass the Hash Attacks

A

In a pass the hash attack, the attacker discovers the hash of the user’s password and then uses it to log on to the system as the user. Any authentication protocol that passes the hash over the network in an unencrypted format is susceptible to this attack. It has been widely associated with Microsoft LAN Manager (LM) and NT LAN Manager (NTLM), two older security protocols used to authenticate Microsoft clients. However, this attack has enjoyed success against other protocols, such as Kerberos.

Remember This! Passwords are typically stored as hashes. A pass the hash attack attempts to use an intercepted hash to access an account. These attacks can be detected in Event ID 4624 with a Logon Process of NTLMSSP and/or an Authentication Package of NTLM.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

birthday attack

A

Birthday attacks on hashes are thwarted by increasing the number of bits used in the hash to increase the number of possible hashes. For example, the MD5 algorithm uses 128 bits and is susceptible to birthday attacks. SHA-3 can use as many as 512 bits and is not susceptible to birthday attacks.

Remember This! Birthday attacks exploit collisions in hashing algorithms. A hash collision occurs when the hashing algorithm creates the same hash from different passwords. Salting adds random text to passwords before hashing them and thwarts many password attacks, including rainbow table attacks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Rainbow Table Attacks

A

Rainbow table attacks are a type of attack that attempts to discover the password from the hash. A rainbow table is a huge database of possible passwords with the precomputed hashes for each.

Rainbow table attacks are often performed offline on stolen or compromised databases. In a rainbow table attack, the application simply compares the hash of each password in the database against hashes stored in the rainbow table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Salting Passwords

A

Salting passwords is a common method of preventing rainbow table attacks, along with other password attacks such as brute force and dictionary attacks. A salt is a set of random data such as two additional characters. Password salting adds these additional characters to a password before hashing it. These additional characters add complexity to the password, and result in a different hash than the system would create using only the original password. This causes password attacks that compare hashes with a rainbow table to fail.

17
Q

Key Stretching

A

Key stretching is an advanced technique used to increase the strength of stored passwords. Instead of just adding a salt to the password before hashing it, key stretching applies a cryptographic stretching algorithm to the salted password. The benefit of key stretching is that it consumes more time and computing resources— frustrating attackers who are trying to guess passwords.

Remember This! Bcrypt, PBKDF2, and Argon2 are key stretching techniques that help prevent brute force and rainbow table attacks. They salt the password with additional bits and then send the result through a cryptographic algorithm.

Remember This! Encryption provides confidentiality and helps ensure that data is viewable only by authorized users. This applies to any data at rest (such as data stored in a database) or data in transit being sent over a network.

18
Q

Providing Confidentiality with Encryption

A

Encryption provides confidentiality and prevents unauthorized disclosure of data. Plaintext is human- readable data. An encryption algorithm scrambles the data, creating ciphertext, which is unreadable. Attackers can’t read encrypted traffic sent over a network or encrypted data stored on a system. In contrast, if data is sent in cleartext, an attacker can capture and read the data using a protocol analyzer.

19
Q

Data at rest

A

Data at rest refers to any data stored on media and it’s common to encrypt sensitive data. For example, it’s possible to encrypt individual fields in a database (such as the fields holding customer credit card data), individual files, folders, or a full disk.

20
Q

Data in transit or data in motion

A

Data in transit or data in motion refers to any data sent over a network and it’s common to encrypt sensitive data in transit. For example, e-commerce websites commonly use Hypertext Transfer Protocol Secure (HTTPS) sessions to encrypt transactions that include credit card data. If attackers intercept the transmissions, they only see ciphertext.

21
Q

Data in use

A

Data in use refers to data being used by a computer. Because the computer needs to process the data, it is not encrypted while in use. If the data is encrypted, an application will decrypt it and store it in memory while in use. If the application changes the data, it will encrypt it again before saving it.

22
Q

Symmetric Encryption

A

Symmetric encryption uses the same key to encrypt and decrypt data. In other words, if you encrypt data with a key of three, you decrypt it with the same key of three. Symmetric encryption is also called secret-key encryption or session-key encryption.

Remember This! Symmetric encryption uses the same key to encrypt and decrypt data. For example, when transmitting encrypted data, symmetric encryption algorithms use the same key to encrypt and decrypt data at both ends of the transmission media.

23
Q

Block Versus Stream Ciphers

A

Stream ciphers encrypt data a single bit, or a single byte, at a time in a stream. Block ciphers encrypt data in a specific-sized block such as 64-bit or 128-bit blocks. Stream ciphers are more efficient than block ciphers when encrypting data in a continuous stream.

24
Q

Common Symmetric Algorithms

A
  1. AES The Advanced Encryption Standard (AES) is a strong symmetric block cipher that encrypts data in 128-bit blocks.
  2. 3DES Although 3DES is a strong algorithm, it isn’t used as often as AES today. AES is much less resource intensive.

Remember. AES is a strong symmetric block cipher that encrypts data in 128-bit blocks. AES uses 128-bit, 192-bit, or 256-bit keys. 3DES is a block cipher that encrypts data in 64-bit blocks. 3DES was originally designed as a replacement for DES, but NIST selected AES as the current standard. However, 3DES is still used in some applications, such as when legacy hardware doesn’t support AES.

25
Asymmetric Encryption
Asymmetric encryption uses two keys in a matched pair to encrypt and decrypt data—a public key and a private key. There are several important points to remember with these keys: If the public key encrypts information, only the matching private key can decrypt the same information. If the private key encrypts information, only the matching public key can decrypt the same information. Private keys are always kept private and never shared. Public keys are freely shared by embedding them in a shared digital certificate. Although asymmetric encryption is strong, it is also very resource intensive. It takes a significant amount of processing power to encrypt and decrypt data, especially when compared with symmetric encryption. Most cryptographic protocols that use asymmetric encryption only use it for key exchange. Remember This! Digital certificates are an important part of asymmetric encryption. Digital certificates include public keys along with details on the owner of the certificate and on the Certificate Authority (CA) that issued the certificate. Certificate owners share their public key by sharing a copy of their digital certificate.
26
Key Exchange
Key exchange is a cryptographic method used to share cryptographic keys between two entities. In this context, asymmetric encryption uses key exchange to share a symmetric key. The cryptographic protocol then uses the symmetric encryption to encrypt and decrypt data because symmetric encryption is much more efficient.
27
The Rayburn Box
Remember This! Only a private key can decrypt information encrypted with a matching public key. Only a public key can decrypt information encrypted with a matching private key. A key element of several asymmetric encryption methods is that they require a digital certificate and a PKI.
28
Ephemeral Keys
Ephemeral refers to something that lasts a short time. In the context of cryptography, an ephemeral key has a short lifetime and is re-created for each session. In contrast, a static key is semipermanent and stays the same over a long period of time.
29
Perfect forward secrecy
Perfect forward secrecy indicates that a cryptographic system generates random public keys for each session, and it doesn’t use a deterministic algorithm to do so. In other words, given the same input, the algorithm will create a different public key. This helps ensure that systems do not reuse keys. The result is that the compromise of a key does not compromise any past keys.
30
Elliptic Curve Cryptography
Elliptic curve cryptography (ECC) doesn’t take as much processing power as other cryptographic methods. It uses mathematical equations to formulate an elliptical curve. It then graphs points on the curve to create keys. A key benefit is that ECC keys can be much smaller when compared with non-ECC keys. ECC is often considered with common use cases of low power devices. For example, ECC is sometimes used with small wireless devices because it doesn’t take much processing power to achieve the desired security.
31
Key Length
Because the algorithm always stays the same, the way that any individual algorithm is strengthened is by increasing the length of a key.
32
Obfuscation
Obfuscation is the act of deliberately making something unclear, confusing, or difficult to understand.
33
Steganography
Steganography hides data inside other data, or, as some people have said, it hides data in plain sight. Not encrypted.
34
Audio Steganography
Audio steganography takes advantage of the limitations of a human ear.
35
Image Steganography
Image steganography is the practice of hiding data within image files such as a .jpeg or .gif file. Two common ways this is done is by manipulating the bits of a file or by hiding data in the white space.
36
Video Steganography
Video steganography is an extension of image steganography and it embeds messages into videos.
37
Tokenization
Tokenization is an obfuscation technique that involves replacing sensitive data with non-sensitive placeholders or tokens. These tokens retain essential information about the original data without revealing any sensitive information. Tokenization is commonly used in the context of payment processing and securing Personally Identifiable Information (PII). The goal is to reduce the risk of unauthorized access or data breaches while still allowing systems to function with the non-sensitive tokens.
38
Masking
Masking is another obfuscation technique used to protect sensitive data by partially or fully concealing it with characters, symbols, or other data. The primary goal of masking is to prevent unauthorized users from viewing or accessing sensitive information while still allowing authorized users to access and work with the data as needed. Another example of masking is in password fields, where the characters entered are replaced by dots or asterisks to prevent anyone from seeing the actual password being typed. Remember This! Steganography, tokenization, and masking are examples of obfuscation techniques used to protect sensitive data. Steganography hides messages or data within other files. Tokenization replaces sensitive sensitive data with non-sensitive tokens, retaining essential information without revealing sensitive details. Masking partially or fully conceals sensitive data with characters, symbols, or other data.