UPI Study › Courses › Introduction to Operating Systems › Free lessons › Lesson 9.7 Free with a free account
Operating System Security Features
Introduction to Operating Systems · Chapter 9: Computer Security and Threat PreventionSection 9.7 · lesson 75 of 838 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Introduction to Operating Systems.
Lesson complete
Earn the 3 college credits for Introduction to Operating Systems
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: User Access Control →← System HardeningNext lesson: User Access Control →
A free account plays all of Chapter 1 and 3 more lessons of Introduction to Operating Systems. Create a free account →
In this lesson
Built-in protections from kernel mode to secure boot and code signing.
- Explain user mode, kernel mode, and the role of system calls
- Describe how memory protection, DEP, and ASLR block attacks
- Explain how sandboxes limit what apps can touch
- Describe how secure boot and code signing build a chain of trust
Free study notes
Get this lesson's notes by email
The key points and 4 practice questions with answers, in your inbox. One email, free.
One email. Unsubscribe in one click.
Transcript
Everything said in the video, section by section (1,169 words). Read along, or search it.
Opening Analogy
An Airport's Layout Does the Work
An airport has locks on its doors. But its real safety comes from the layout. You can't walk from the check-in hall to a plane without passing the scanners. And only badge holders may enter the baggage area. An operating system is designed the same way. Long before you install any security program, it already keeps programs apart, keeps ordinary code away from the hardware, and checks who made the software it runs.
Privilege Levels
User Mode and Kernel Mode
The processor can run at two privilege levels. In kernel mode, code may do anything: touch any memory, talk to any device, change any setting. The kernel, from lesson 1.4, runs here. In user mode, code is limited. It can't touch hardware directly, and it can't read memory that belongs to others. Your browser, a game, and a spreadsheet run here. Think of a library where the librarian sits at a desk. You don't walk into the back office and rewrite the catalog. You ask, and the librarian decides. When a user-mode program wants to read a file, it makes a system call, from lesson 2.3: a polite request across the border. The kernel checks whether this program is allowed, then does the work, or refuses.
Memory Protection
Each Process Keeps Its Own Slice
Every running program has its own private slice of memory, as lessons 4.5 and 4.6 showed. The operating system and the processor enforce memory protection together: a process may use its own slice, and nothing else. If it reaches for memory that isn't its own, the hardware raises an error, and the system stops the offender. That crash is called a segmentation fault. So one program's bug, or one program's bad intent, can't quietly read or change another program.
Exploit Defenses
No-Execute Pages and Random Addresses
Attackers have long tried to sneak their own instructions into a program's memory, then trick the program into running them. Modern systems add two protections. The first is the N X bit, for no execute. Windows calls the feature Data Execution Prevention, or D E P. Each page of memory is marked as data, or as code, never both. A page holding text that a user typed may be read and written, but not run. If a flaw makes the program jump into it, the processor refuses. The second is A S L R: address space layout randomization. It puts the parts of a program at different, random addresses each time it starts. An attacker who needs to know exactly where something sits has to guess. Picture a bank that moves its vault to a different room every morning. Both are on by default in today's Windows, macOS, Linux, Android, and iOS. You never see them, unless a program crashes trying something it shouldn't.
Quick Check
A Learned Address That Misses
Quick check. An attacker studies a program on their own computer, and learns the exact address of a useful piece of code. On the victim's computer, the same jump lands on nothing useful, and the program simply crashes. Which protection spoiled the attack? Pause, and decide. Address space layout randomization: A S L R. The program's parts sat at different, random addresses on the victim's machine, so the address learned at home was wrong. Memory protection keeps one process out of another, but this jump stayed inside one program. And code signing checks files before they run, not addresses while they run.
Sandboxing
Apps Fenced Inside a Sandbox
A sandbox is a fenced area where a program may run, with strict limits on what it may touch. A child can build anything in a sandbox, but the sand stays in the box. An app in a sandbox gets its own folder. It may use the camera, the contacts, or the network, only if the system grants it. Phone apps work this way, as lesson 1.6 showed: the weather app can't read your messages. Browsers fence off each tab and extension. And virtual machines, in lesson 10.1, are an even bigger sandbox. A sandbox doesn't assume the program is good. It assumes it might be buggy or hostile, and limits the damage in advance. That's least privilege, applied to software. The common mistake is saying yes to every permission prompt. A flashlight app that asks for your contacts wants something its job doesn't need.
Secure Boot
A Chain of Trust from Startup
All of these protections assume the operating system itself is genuine. What if something swapped it for a fake, before it even started? That's the job of secure boot. When the computer starts, the firmware checks that the bootloader carries a valid digital signature from a known maker. The bootloader then checks the kernel, and the kernel checks its drivers. Each step proves the next, one link after another. This is a chain of trust. If a link has been tampered with, its check fails, and the start-up stops there, or warns you. On Apple's own chips, the chain starts in read-only code built into the chip.
Code Signing
Signatures Prove Who and Unchanged
Code signing uses the same idea for ordinary programs. A publisher signs its software with a secret key. The system checks the signature with the matching public key, the idea from lesson 7.5. If even one byte of the program has changed since signing, the check fails, and the system warns you, or refuses to run it. A valid signature tells you two things: who published the software, and that nobody changed it afterward. It doesn't promise the software is harmless. Only that it's exactly what the publisher shipped.
Quick Check
An Installer with Extra Code
Quick check. Sam, who runs a small online bakery, wants an accounting app. The download page names the real publisher. But a stranger has added extra code to the installer file. Sam double-clicks it. What does the system do? Pause, and decide. It warns, or refuses. The signature was made over the original file, so added code means it no longer matches. A famous name doesn't help: the signature proves the file is unchanged, and this one isn't. And a sandbox limits what a program may touch. It doesn't catch a changed file.
Real Example
An Unverified Recipe Organizer
Earlier, Sam had downloaded a free recipe organizer, and the laptop warned that the publisher could not be verified. Sam almost clicked past it. Ivy, who looks after the computers at a school, explained the warning. The file carried no valid signature, so nothing proved who made it, or that it was unchanged. So Sam got the app from the official store instead, where programs are checked, and run inside a sandbox.
Summary
Layout Does Most of the Work
Back to the airport. Its layout does most of the work: scanners on the only path, and badges for the back rooms. Your operating system does the same, with user and kernel mode, memory protection, D E P and A S L R, sandboxes, and a chain of trust from the very first instruction.
Key Takeaways
Built-In Protections Reviewed
To recap. Ordinary programs run in user mode, and must ask the kernel through system calls. Memory protection keeps each process in its own memory. And D E P and A S L R make injected code hard to run. Sandboxes limit, in advance, what an app may touch. And secure boot and code signing check who made the software, and that it hasn't changed.
About Introduction to Operating Systems at UPI Study
Introduction to Operating Systems (Computer Science 354) is a self-paced online course of 83 video lessons in 10 chapters, from what an operating system does and process scheduling to concurrency, memory, devices, file systems, networks, the internet, security and virtual machines. It carries a NCCRS credit recommendation for 3 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus All Computer Science courses Every course with PRO →
Compare: Linux vs Operating Systems
Why take it here
Why students take Introduction to Operating Systems with UPI Study
Where the credit goes
Universities that work with NCCRS
Introduction to Operating Systems carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About Operating System Security Features
How does the split between user mode and kernel mode protect a computer?
How do DEP and ASLR protect against attacks?
What is secure boot?
Does a valid code signature mean software is safe?
About the Introduction to Operating Systems course
How many college credits is Introduction to Operating Systems?
How much does Introduction to Operating Systems cost and what is included?
Which universities accept UPI Study credits?
How long does Introduction to Operating Systems take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 3 credits in Introduction to Operating Systems.
83 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
Updated
3 credits · NCCRSEnroll →