2024 D385 SOFTWARE SECURITY AND TESTING / WGU
D385 SOFTWARE SECURITY AND TESTING REAL EXAM
WITH ACTUAL EXAM QUESTIONS AND CORRECT
DETAILED ANSWERS (VERIFIED ANSWERS) NEWEST
UPDATED VERSION LATEST 2024 |ALREADY GRADED A+
(BRAND NEW!!)
What hash function should you use for most general purpose cryptographic hashing?
- ANSWER: SHA-256
What hash function should you consider using for high security environments,
though it may have less support? - ANSWER: SHA3-256
What hash function should you use for very large messages? - ANSWER: BLAKE2
What two hash functions should you avoid, as they're now considered unsecure? -
ANSWER: MD5 and SHA1
What is the difference between hash functions and checksum functions? - ANSWER:
Hash functions have stronger collision resistance, checksums are faster. Checksums
are not useful for security.
What module do you use for cryptographic hashing in Python? - ANSWER: hashlib
What 3 properties characterize hash functions? - ANSWER: 1. Deterministic behavior
2. Fixed-length hash values 3. Avalanche effect
What is the logging numeric value for DEBUG? - ANSWER: 10
What does logging.DEBUG indicate? - ANSWER: Detailed information, typically only
of interest to a developer trying to diagnose a problem.
What is the logging numeric value for INFO? - ANSWER: 20
What does logging.INFO indicate? - ANSWER: Confirmation that things are working
as expected
What is the logging numeric value for WARNING? - ANSWER: 30
What does logging.WARNING indicate? - ANSWER: Something unexpected
happened, or that a problem might occur in the near future. Software is still working
as expected.
What is the logging numeric value for ERROR? - ANSWER: 40
, What does logging.ERROR indicate? - ANSWER: Software has not been able to
perform some function due to a more serious problem.
What is the logging numeric value for CRITICAL? - ANSWER: 50
What does logging.CRITICAL indicate? - ANSWER: A serious error, indicating that the
program itself may be unable to continue running.
Should you use the secrets or random module for generating secure random
numbers? - ANSWER: secrets
What do keyed hash functions do? - ANSWER: Hash functions using different keys
produce different hash values of the same message. Hash functions using the same
key produce matching hash values of the same message. Ensures data
authentication.
What are HMAC functions? - ANSWER: A generic way to use any ordinary hash
function as though it were a keyed hash function, since most hash functions don't
support keys natively. Takes 3 inputs: message, key, ordinary cryptographic hash
function.
What is a timing attack? - ANSWER: Attacker obtains hints about private information
by measuring the time a system takes to perform an operation (ex: string
comparison)
How can you avoid a timing attack with the hmac module? - ANSWER: You can use
compare_digest in place of ==. This always compares all characters before it returns
thus preventing timing attack vulnerabilities.
What is a side channel attack? - ANSWER: Derives unauthorized information by
measuring any physical side channel (such as time sound, power consumption,
electromagnetic radiation, radio waves, and heat)
Python has no native encryption API, so what might you use instead? - ANSWER:
cryptography or pycryptodome packages
When using the high level "recipes layer" API of cryptography, what protocol/class
will you be interacting with? - ANSWER: Fernet
How is a fernet token created? - ANSWER: The Fernet.encrypt method encrypts the
plaintext and then also hashes the ciphertext with HMAC-SHA256.
What class is used in combination with Fernet to implement key rotation? -
ANSWER: MultiFernet class
D385 SOFTWARE SECURITY AND TESTING REAL EXAM
WITH ACTUAL EXAM QUESTIONS AND CORRECT
DETAILED ANSWERS (VERIFIED ANSWERS) NEWEST
UPDATED VERSION LATEST 2024 |ALREADY GRADED A+
(BRAND NEW!!)
What hash function should you use for most general purpose cryptographic hashing?
- ANSWER: SHA-256
What hash function should you consider using for high security environments,
though it may have less support? - ANSWER: SHA3-256
What hash function should you use for very large messages? - ANSWER: BLAKE2
What two hash functions should you avoid, as they're now considered unsecure? -
ANSWER: MD5 and SHA1
What is the difference between hash functions and checksum functions? - ANSWER:
Hash functions have stronger collision resistance, checksums are faster. Checksums
are not useful for security.
What module do you use for cryptographic hashing in Python? - ANSWER: hashlib
What 3 properties characterize hash functions? - ANSWER: 1. Deterministic behavior
2. Fixed-length hash values 3. Avalanche effect
What is the logging numeric value for DEBUG? - ANSWER: 10
What does logging.DEBUG indicate? - ANSWER: Detailed information, typically only
of interest to a developer trying to diagnose a problem.
What is the logging numeric value for INFO? - ANSWER: 20
What does logging.INFO indicate? - ANSWER: Confirmation that things are working
as expected
What is the logging numeric value for WARNING? - ANSWER: 30
What does logging.WARNING indicate? - ANSWER: Something unexpected
happened, or that a problem might occur in the near future. Software is still working
as expected.
What is the logging numeric value for ERROR? - ANSWER: 40
, What does logging.ERROR indicate? - ANSWER: Software has not been able to
perform some function due to a more serious problem.
What is the logging numeric value for CRITICAL? - ANSWER: 50
What does logging.CRITICAL indicate? - ANSWER: A serious error, indicating that the
program itself may be unable to continue running.
Should you use the secrets or random module for generating secure random
numbers? - ANSWER: secrets
What do keyed hash functions do? - ANSWER: Hash functions using different keys
produce different hash values of the same message. Hash functions using the same
key produce matching hash values of the same message. Ensures data
authentication.
What are HMAC functions? - ANSWER: A generic way to use any ordinary hash
function as though it were a keyed hash function, since most hash functions don't
support keys natively. Takes 3 inputs: message, key, ordinary cryptographic hash
function.
What is a timing attack? - ANSWER: Attacker obtains hints about private information
by measuring the time a system takes to perform an operation (ex: string
comparison)
How can you avoid a timing attack with the hmac module? - ANSWER: You can use
compare_digest in place of ==. This always compares all characters before it returns
thus preventing timing attack vulnerabilities.
What is a side channel attack? - ANSWER: Derives unauthorized information by
measuring any physical side channel (such as time sound, power consumption,
electromagnetic radiation, radio waves, and heat)
Python has no native encryption API, so what might you use instead? - ANSWER:
cryptography or pycryptodome packages
When using the high level "recipes layer" API of cryptography, what protocol/class
will you be interacting with? - ANSWER: Fernet
How is a fernet token created? - ANSWER: The Fernet.encrypt method encrypts the
plaintext and then also hashes the ciphertext with HMAC-SHA256.
What class is used in combination with Fernet to implement key rotation? -
ANSWER: MultiFernet class