OS hardening is the process of securing an operating system by reducing its surface of vulnerability. This includes removing unnecessary software, closing unused ports, and applying security patches.
Click to reveal answer
beginner
Why is it important to keep your OS updated with patches?
Keeping your OS updated with patches fixes security vulnerabilities and bugs that attackers could exploit. Regular updates help protect your system from new threats.
Click to reveal answer
beginner
Name three common OS hardening best practices.
1. Disable or remove unnecessary services and software. 2. Use strong passwords and enable multi-factor authentication. 3. Configure firewalls and limit network access.
Click to reveal answer
beginner
What role does a firewall play in OS security?
A firewall controls incoming and outgoing network traffic based on security rules. It helps block unauthorized access and protects the system from network attacks.
Click to reveal answer
beginner
How does disabling unused user accounts improve OS security?
Disabling unused user accounts reduces the number of entry points attackers can use to access the system. It limits potential unauthorized access.
Click to reveal answer
Which of the following is NOT a common OS hardening practice?
ASharing passwords with colleagues
BDisabling unused services
CInstalling all software updates
DRemoving unnecessary software
✗ Incorrect
Sharing passwords weakens security and is not a recommended practice.
What is the main purpose of applying security patches to an OS?
ATo fix security vulnerabilities
BTo increase system speed
CTo add new features
DTo change the user interface
✗ Incorrect
Security patches fix vulnerabilities that could be exploited by attackers.
Which tool helps control network traffic to and from your OS?
ATask manager
BText editor
CDisk defragmenter
DFirewall
✗ Incorrect
A firewall manages network traffic to protect the system from unauthorized access.
Why should unused user accounts be disabled?
ATo free up disk space
BTo speed up the OS
CTo reduce potential security risks
DTo improve graphics performance
✗ Incorrect
Disabling unused accounts reduces possible entry points for attackers.
Which of these is a strong password practice?
AUsing 'password123' for all accounts
BUsing a mix of letters, numbers, and symbols
CWriting passwords on a sticky note
DSharing passwords with friends
✗ Incorrect
Strong passwords use a mix of characters to make guessing difficult.
Explain what OS hardening means and why it is important.
Think about how making your OS safer helps protect your data.
You got /3 concepts.
List and describe three best practices for securing an operating system.
Consider what steps you would take to keep your computer safe from hackers.
You got /4 concepts.
Practice
(1/5)
1. What is the main goal of OS hardening in computer systems?
easy
A. To increase the number of installed applications
B. To reduce security vulnerabilities by tightening system settings
C. To make the system run faster by removing hardware
D. To allow all users full access to system files
Solution
Step 1: Understand OS hardening purpose
OS hardening means making the system more secure by reducing weak points.
Step 2: Evaluate options
Only To reduce security vulnerabilities by tightening system settings describes reducing vulnerabilities by tightening settings, which matches OS hardening.
Final Answer:
To reduce security vulnerabilities by tightening system settings -> Option B
Quick Check:
OS hardening = reduce vulnerabilities [OK]
Hint: OS hardening means making system safer, not faster or more open [OK]
Common Mistakes:
Confusing hardening with performance tuning
Thinking hardening means adding more software
Believing hardening allows more user access
2. Which of the following commands is commonly used to update software packages on a Linux system as part of OS hardening?
easy
A. apt-get update
B. rm -rf /
C. mkdir new_folder
D. ping google.com
Solution
Step 1: Identify update command
On Linux, apt-get update refreshes package lists to get latest software versions.
3. Consider this Linux command sequence for OS hardening:
sudo apt-get update && sudo apt-get upgrade -y
What is the expected result after running these commands?
medium
A. The system will remove all unused files
B. The system will restart immediately
C. The system will create a backup of all files
D. The system will update package lists and upgrade installed packages automatically
Solution
Step 1: Analyze apt-get update
This command refreshes the list of available software packages and versions.
Step 2: Analyze apt-get upgrade -y
This command upgrades all installed packages to the latest versions automatically without asking for confirmation.
Final Answer:
The system will update package lists and upgrade installed packages automatically -> Option D
Quick Check:
Update + upgrade = refresh + install latest [OK]
Hint: Update refreshes lists; upgrade installs new versions [OK]
Common Mistakes:
Thinking upgrade deletes files
Assuming commands create backups
Believing system restarts automatically
4. A system administrator tries to disable unused services for OS hardening using this command:
systemctl disable sshd
But the SSH service still starts after reboot. What is the likely mistake?
medium
A. They forgot to mask the service with systemctl mask sshd
B. They should use systemctl stop sshd to stop the service immediately
C. They need to reboot twice for changes to apply
D. The service name is incorrect; it should be ssh instead of sshd
Solution
Step 1: Understand systemctl disable effect
This command prevents the service from starting automatically but does not stop it if already running or mask it.
Step 2: Recognize masking necessity
Masking a service with systemctl mask blocks all attempts to start it, including manual or dependency starts.
Final Answer:
They forgot to mask the service with systemctl mask sshd -> Option A
Quick Check:
Disable ≠ block start; mask blocks start [OK]
Hint: Disable stops auto-start; mask blocks all starts [OK]
Common Mistakes:
Confusing disable with stop
Not knowing mask blocks service fully
Assuming reboot applies all changes immediately
5. You want to harden a Linux server by removing unnecessary user accounts and setting strong password policies. Which combination of actions best achieves this?
hard
A. Keep all default accounts and disable system updates to avoid changes
B. Create new user accounts with simple passwords and disable firewall
C. Delete unused user accounts, enforce password complexity via PAM modules, and set account lockout policies
D. Allow all users to use root privileges and disable password expiration
Solution
Step 1: Remove unused user accounts
Unused accounts increase attack surface; deleting them reduces risk.
Step 2: Enforce strong password policies
Using PAM modules to require complexity and setting lockout policies prevents easy guessing and brute force attacks.
Final Answer:
Delete unused user accounts, enforce password complexity via PAM modules, and set account lockout policies -> Option C