Courseiva
Cryptography and Malware AnalysismediumMultiple ChoiceObjective-mapped

CEH Cryptography and Malware Analysis Practice Question

You are a security analyst for a medium-sized company. The company uses a custom web application for internal project management. The application uses AES-256-CBC for encrypting sensitive data stored in the database. Recently, the company experienced a data breach where an attacker exfiltrated the entire database. Although the data was encrypted, the attacker was able to decrypt some records. Investigation reveals that the encryption key is stored in a configuration file on the same server, and the initialization vector (IV) is hardcoded in the application code. Additionally, the application uses the same key for all records. Which of the following is the most effective remediation to prevent future decryption of stolen encrypted data?

⚠ Common exam trap

The trap here is that candidates often focus on key storage or rotation (options B and C) as the primary solution, overlooking that the real vulnerability is the reuse of a single key across all records, which allows an attacker to decrypt the entire dataset with a single key compromise.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Implement per-record encryption keys derived from a master key combined with a unique salt

Using per-record encryption keys derived from a master key combined with a unique salt ensures that even if an attacker exfiltrates the entire database, each encrypted record requires a separate key derivation operation. Without the unique salt per record, the attacker cannot decrypt all records even if they compromise the master key. This approach mitigates the risk of a single key compromise leading to bulk decryption, which is the core vulnerability in the current setup where the same AES-256-CBC key and hardcoded IV are reused across all records.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Change the encryption mode from CBC to GCM to provide authentication

    Why it's wrong here

    Changing to GCM mode provides authenticated encryption, offering both confidentiality and integrity, which is an improvement over CBC alone. However, if the same encryption key is reused across multiple records, a compromise of that single key would still allow an attacker to decrypt and potentially tamper with all records encrypted with it. GCM does not inherently solve the fundamental problem of widespread data exposure resulting from a single key's compromise when that key is applied universally.

  • Store the encryption key in a hardware security module (HSM) and use the same key

    Why it's wrong here

    While storing the encryption key in a Hardware Security Module (HSM) significantly enhances the security of the key itself by protecting it from extraction and unauthorized access, it does not mitigate the risk if the *same key* is used for *all* records. Should this single key ever be compromised, whether through a sophisticated attack on the HSM's operational interface or a flaw in the application's key usage, every record encrypted with it would become vulnerable. The issue lies in the scope of impact from a single key's compromise, not solely its storage location.

  • Rotate the encryption key every 24 hours

    Why it's wrong here

    Key rotation is a valuable security practice that limits the amount of data encrypted with any single key and reduces the window of opportunity for an attacker to exploit a compromised key. However, it primarily protects *new* data encrypted with the freshly rotated key. If an *old* key is compromised, all records previously encrypted with that specific key remain vulnerable to decryption, regardless of subsequent key rotations. This approach fails to limit the 'blast radius' of a key compromise on existing, historical data.

  • Implement per-record encryption keys derived from a master key combined with a unique salt

    Why this is correct

    Implementing per-record encryption keys derived from a master key combined with a unique salt is the most robust solution. This method ensures that each individual record is encrypted with a distinct, cryptographically unique key generated using a Key Derivation Function (KDF). Consequently, if one derived record key is ever compromised, only that specific record is affected, leaving all other records protected by their respective unique keys and the secure master key. This significantly limits the impact of any single key compromise, enhancing overall data security.

Quick reference

Symmetric Encryption Algorithm Comparison

AlgorithmKey SizeBlock SizeStatusNotes
AES-128128-bit128-bitCurrent standardNIST approved; WPA3, TLS
AES-256256-bit128-bitCurrent standardPreferred for sensitive / govt data
3DES112-bit effective64-bitDeprecated (2023)Replaced by AES
DES56-bit64-bitBrokenCracked in < 24 h; never deploy
ChaCha20256-bitStream cipherCurrentTLS 1.3, WireGuard

About these practice questions

This CEH question is part of Courseiva's 870-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CEH practice question is part of Courseiva's free EC-Council certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CEH exam.