CEH · M01

CIA and security controls: define what needs protection

Confidentiality, integrity and availability are different protection goals. Start with assets and impact, then choose controls whose effect you can verify.

After this lesson, you can
  • Distinguish all three CIA goals using concrete scenarios.
  • Explain what a hash comparison establishes and what it does not.

Prerequisites: Ethical hacking starts with authorization, scope and stop conditions

Start with the asset and the consequence

A research dataset may need restricted reading, protection from incorrect changes and access for authorized researchers when needed. Describe the data, users and task, then ask what happens if it is exposed, altered or unavailable.

Confidentiality concerns unauthorized disclosure. Integrity concerns improper modification or destruction. Availability concerns reliable access for authorized use when needed. One incident can affect more than one goal.

Further reading: NIST FIPS 199: Security Categorization

Connect controls to threats and observable results

Access controls constrain who can read and write. Version history and verifiable backups support tracing and recovery. Redundancy and recovery drills support availability. A control’s effectiveness requires evidence in the stated scenario, not merely evidence that a product is installed.

Controls can create tradeoffs. Shutting a system down may prevent immediate network access while also stopping legitimate work. A decision should preserve the task, impact assumptions and acceptable recovery time rather than optimize one measure alone.

Matching hashes do not establish trusted origin

SHA-256 maps input bytes to a fixed-length digest. Comparing a file with a trusted expected digest checks whether its contents match that expectation. Comparing two locally generated digests demonstrates a change in the example, but does not authenticate a sender.

If a file and its digest come from the same compromised location, both may have been replaced. Integrity checking therefore also asks how the reference is trusted. The cryptography module distinguishes encryption, hashing and digital signatures.

Further reading: Python: hashlib

Example: a missing zero in a research table

A public synthetic dataset contains a value of 100, later changed to 10. Readers can still download it, and it contains no private data.

The central problem is an unexpected content change, so the main concern is integrity. Change history is needed to distinguish malice from error. Successful downloading supports availability at that moment, not correctness.

Conclusion: Compare a trusted version, trace the change and correct it. Do not automatically label this example a data disclosure.

Offline exercise: compare SHA-256 for synthetic data

Use local Python 3. The program hashes bytes defined inside it, reads no personal files, writes no files and makes no network connections.

  1. Download integrity_demo.py, read its two synthetic strings and predict the equal and changed comparisons.
  2. Run python3 integrity_demo.py and inspect the equal and changed booleans.
  3. Write one sentence about what the output supports and one about what it does not establish.
from hashlib import sha256
a = b'sample=100'
b = b'sample=10'
print('equal=' + str(sha256(a).digest() == sha256(a).digest()))
print('changed=' + str(sha256(a).digest() != sha256(b).digest()))

Download the exercise

Expected result

equal=True and changed=True. Identical bytes have matching digests; changing a character in this example changes the digest.

Check your work

Can you explain why this result establishes neither encryption nor sender authentication?

Finish and clean up

The program creates no files. Keep your explanation; retain or delete the downloaded demonstration as you prefer.

Q&A · Check your reasoning

Choose an answer and confidence, then read every explanation. Answers stay in this browser.

ceh-m01-cia-q1 · Original practice

Data is accidentally altered but remains downloadable. Which goal is primarily affected?

Data is accidentally altered but remains downloadable. Which goal is primarily affected?
ceh-m01-cia-q2 · Original practice

A file and digest are downloaded from the same untrusted location and match. What can you conclude?

A file and digest are downloaded from the same untrusted location and match. What can you conclude?
ceh-m01-cia-q3 · Original practice

A backup exists, but restore has never been tested. Which statement is most accurate?

A backup exists, but restore has never been tested. Which statement is most accurate?

Connect the next idea

Terms: CIA triad·Hash·Evidence boundary

Sources & scope

These sources support the technical principles. Examples, questions and exercises are original to this series.