SOFSEC1 – Software Security
Module 2: Operating System Security
Prof. Justin Pineda
Jan 2026
Learning Strategy
“You don’t need to understand how an engine is built to understand why removing the brakes is dangerous.”
Learning Objectives
Motivation Question
If your application code is secure, but the OS is vulnerable — are you actually secure? Why or why not?
What Is OS Security?
OS vulnerabilities = system-wide compromise
Definition
The Operating System (OS) is the manager of your computer.
OS as the ATC
The OS is the airport control tower
Apps are airplanes. Without the tower, planes crash.
Why OS Security Matters
If someone controls the OS, what can they control?
Memory
Memory Attacks: Buffer Overflow
Buffer Overflow Result
Other Memory Attacks
Memory Protections
Security features like:
Security guards that:
Other Memory Protection
CPU and Processes
CPU = Brain of the computer
It decides:
CPU and Processes
Attackers aim to:
CPU-Level Attacks
CPU Attacks
Some attacks:
I/O (Input / Output)
Input: Keyboard, mouse, USB
Output: Screen, printer, network
I/O (Input / Output)
High-risk areas:
I/O Attacks
I/O Exploitation Examples
OS Security Failures in Real Incidents
Perspectives
From a defender’s view:
From an attacker’s view:
Attacker vs Defender Mindset
Attacker thinks:
“What controls everything?”
Defender thinks:
“How do I limit damage if one thing breaks?”
Connecting OS Security to Software Security
Even perfectly written software can be broken if the OS is weak.
This is why:
must work together
Summary
Knowledge Check 1
ASLR primarily defends against which attack type?
Knowledge Check 2
Why are device drivers high-risk?
Knowledge Check 3
Which OS component is most commonly targeted for privilege escalation?
Knowledge Check 4
Which is an example of a CPU-level vulnerability?
A. SQL injection
B. Buffer overflow
C. Spectre-type attack
D. Cross-site scripting
Knowledge Check 5
True or False:
If application code is secure, OS vulnerabilities no longer matter.
Key Takeaways
What part of OS security surprised you the most, and why?
References
Group Exercise 2: Simulating OS Vulnerabilities Using bWAPP
Exercise Objectives
At the end of this lab, students will be able to:
Lab Environment
Pre-Requisites