Cloud Data Security

A team stores audit logs and their SHA-256 digests in the same cloud bucket. An attacker with write access could replace a log and recompute its digest. Which control lets the team detect such tampering?

Show the answer

Correct answerB. An HMAC-SHA-256 of each log using a key held in the KMS

AWhy not this: Encryption protects confidentiality; it does not by itself prove the log was left unmodified.

BWhy this is right: The secret key means a forged log cannot get a matching value, so changes are detected even by an attacker with write access.

CWhy not this: Tokenization substitutes sensitive values and gives no integrity check on the log as a whole.

DWhy not this: Anyone with write access can recompute a plain digest after altering the log, so it detects only accidental corruption.

An HMAC is a keyed hash, so an attacker without the key cannot produce a valid value for altered logs. A plain digest stored beside the log can be recomputed by anyone with write access, so it detects accidental change but not deliberate tampering.