Lab 01 โ Docker Basics & the CIA Triad¶
Course: SCIA-120 ยท Introduction to Secure Computing
Topic: InfoSec Fundamentals
Difficulty: โญ Beginner
Estimated Time: 45โ60 minutes
Related Reading: Chapter 1 โ Introduction to Information Security
Overview¶
In this lab you will install and run your first Docker containers while connecting hands-on actions to the three foundational principles of information security: Confidentiality, Integrity, and Availability (the CIA Triad). You will see how containers provide isolation (Confidentiality), how file hashing verifies data has not changed (Integrity), and how a running service demonstrates Availability.
Learning Objectives¶
By the end of this lab, you will be able to:
- Pull and run a Docker container from Docker Hub.
- Explain what process isolation means in container terms.
- Demonstrate Confidentiality using container namespace isolation.
- Demonstrate Integrity by hashing a file and detecting changes.
- Demonstrate Availability by running and health-checking a web service.
Prerequisites¶
- A computer running Windows 10/11, macOS, or Linux.
- Docker Desktop installed (https://www.docker.com/products/docker-desktop).
- A terminal (PowerShell on Windows, Terminal on macOS/Linux).
Tip: Open your terminal and run
docker --versionto confirm Docker is installed before starting.
Part 1 โ Your First Container¶
Step 1.1 โ Pull the Ubuntu Image¶
You should see Docker downloading layers. This is the base Linux image you will use throughout the lab.
Expected output:
๐ธ Screenshot checkpoint: Take a screenshot showing the completed pull output.
Step 1.2 โ Run Your First Container¶
This starts an interactive Ubuntu shell inside a container. You are now inside the container. Notice you are root โ but only inside this isolated environment.
Expected output:
๐ธ Screenshot checkpoint: Take a screenshot of the container shell showing whoami and hostname output.
Type exit to leave the container.
Part 2 โ Confidentiality: Container Isolation¶
Confidentiality means information is accessible only to those authorized to see it. Containers enforce confidentiality through process namespace isolation โ processes inside one container cannot see processes in another.
Step 2.1 โ Start a Background Container¶
In Terminal 1, run:
Step 2.2 โ Check What a Second Container Can See¶
In Terminal 2, run a second container and try to inspect the first:
Inside this second container:
Observe: You will see only processes inside this container. The sleep 3600 process from the first container is not visible. This is namespace isolation enforcing Confidentiality.
๐ธ Screenshot checkpoint: Take a screenshot of the ps aux output showing only container-local processes.
Type exit to leave the second container.
Step 2.3 โ Clean Up¶
Part 3 โ Integrity: Detecting Tampering with File Hashing¶
Integrity means data has not been altered without authorization. One practical way to verify integrity is cryptographic hashing โ if even one character changes, the hash changes completely.
Step 3.1 โ Create a File and Hash It¶
Inside the container:
Expected output (example):
Copy down the hash value โ this is your "known good" fingerprint.
Step 3.2 โ Tamper with the File and Re-Hash¶
Observe: The hash is completely different, even though the file looks similar. This is how integrity verification works โ any change produces a detectable difference.
๐ธ Screenshot checkpoint: Take a screenshot showing both hash outputs side by side, clearly different.
Type exit to leave the container.
Part 4 โ Availability: Running a Web Service¶
Availability means systems and data are accessible when needed by authorized users. A web server that responds to requests demonstrates Availability.
Step 4.1 โ Run an Nginx Web Server Container¶
Step 4.2 โ Verify It Is Available¶
Expected output:
Or open your browser and navigate to http://localhost:8080. You should see the Nginx welcome page.
๐ธ Screenshot checkpoint: Take a screenshot of either the curl output or the browser showing the Nginx welcome page.
Step 4.3 โ Simulate Unavailability¶
Stop the container:
Try to access it again:
Observe: The service is now unavailable โ curl will fail with a connection refused error. This simulates a denial-of-service scenario.
๐ธ Screenshot checkpoint: Take a screenshot of the failed curl command.
Part 5 โ Review: Mapping Actions to CIA¶
Fill out the table below as part of your submission:
| CIA Principle | What You Did in This Lab | Why It Demonstrates That Principle |
|---|---|---|
| Confidentiality | ||
| Integrity | ||
| Availability |
Cleanup¶
Remove any remaining containers and images:
Lab Assessment¶
Screenshot Submission Checklist¶
Submit all of the following screenshots to the course LMS:
- [ ]
screenshot-01aโ Docker pull completed for ubuntu:22.04 - [ ]
screenshot-01bโ Container shell showingwhoamiandhostname - [ ]
screenshot-01cโps auxinside isolated container (Part 2) - [ ]
screenshot-01dโ Both SHA-256 hash values (original and tampered) - [ ]
screenshot-01eโ Nginx welcome page or successfulcurloutput - [ ]
screenshot-01fโ Failedcurlafter container stopped
Reflection Questions¶
Answer the following questions in 3โ5 sentences each and submit with your screenshots:
- In your own words, what is the CIA Triad and why does it matter in information security?
- How does Docker container isolation relate to the principle of Confidentiality? Give a specific example from this lab.
- Why is hashing useful for detecting data tampering? What would happen if an attacker changed a single character in a file and re-hashed it?
- A web server that goes down during peak hours violates which CIA principle? What are some real-world consequences of this?
Grading Rubric
- Screenshots complete and clearly labeled: 40 points
- CIA Triad mapping table completed: 20 points
- Reflection questions answered thoughtfully: 40 points
- Total: 100 points