IS Unit 2 Notes
IS Unit 2 Notes
•Program security refers to the techniques used to protect software or applications from being
hacked, misused, or crashed.
•Programs can have bugs or vulnerabilities. Hackers can use these weaknesses to:
1. Steal data
2. Control your system
3. Crash the program
4. Install malware
1. Buffer Overflow: Too much data is written to a memory area, causing the program to crash or
give control to a hacker.
3. Input Validation Issues: Program doesn’t properly check user input (e.g., login forms), allowing
attacks like SQL injection.
4. Trojan Horse Programs: A program that seems safe but does harmful things in the background.
Real-Life Example:
•A bank’s login app must be secure. If the program has weak security, a hacker could:
•Steal passwords
•Transfer money
•Delete accounts
Security in Operating System (OS Security) –
•Operating System Security means protecting the computer system and its resources (like files,
memory, CPU, and programs) from unauthorized access, malware, and attacks.
The Operating System controls everything in your computer. If it’s not secure:
3. Availability – System and data must be available to authorized users when needed
•Malware/Viruses
Example:
•If security is weak, students might install harmful apps or delete others’ work
Secure Programs –
•Secure programs are software applications that are designed and written carefully to prevent
hacking, data theft, or misuse.
A secure program:
1. Input Validation:-
•Checks all user input to prevent harmful code (like SQL injection).
2. Authentication:-
•Verifies the identity of the user (e.g., using username & password or OTP).
3. Access Control:-
•Gives users only the permissions they need (not full control).
4. Error Handling:-
5. Regular Updates:-
6. Encryption:-
Example:
1. Buffer Overflow:-
When a program tries to store more data in a memory space (buffer) than it can hold.
This can overwrite other data or crash the program.
Example: Entering 100 characters into a field that only supports 50.
2. Memory Leak:-
When a program keeps using memory but doesn’t release it after use.
Over time, the system runs out of memory and slows down or crashes.
Common in poorly written applications.
3. Uninitialized Variable:-
4. Race Condition
Happens when two parts of a program try to access/change the same data at the same
time.
The result depends on which one runs first – very unpredictable.
6. Integer Overflow/Underflow:-
7. Off-by-One Error:-
A small mistake where loops or array indexes go one step more or less.
Very common in loops.
Example: Looping from 0 to 5 instead of 0 to 4.
The program does not check if the user’s input is correct or safe.
Hackers can use this to break into systems.
Example: Allowing letters where only numbers should be entered.
•Malicious code (also called malware) is any software created to harm, damage, steal, or disrupt
computers or data.
1. Computer Virus:-
2. Worm:-
A trojan looks like a normal or useful program but contains hidden harmful code.
It can steal passwords, open backdoors, or allow hackers to control your computer.
4. Spyware:-
5. Adware:-
6. Ransomware:-
Locks or encrypts your files and demands payment (ransom) to unlock them.
It’s very dangerous and growing rapidly.
7. Logic Bomb:-
Malicious code that activates when a certain condition is met (like a date or action).
It can delete or corrupt data.
8. Rootkit:-
•Targeted malicious code is harmful software that is specifically designed to attack a particular
person, organization, system, or network.
•It is not random like normal viruses — it is planned and customized to steal data, spy, damage
systems, or take control.
Key Features:
Goal-based: Made for a specific purpose (like stealing bank data or hacking a company).
Stealthy: Often hidden and hard to detect.
Customized: Designed for a specific target like a bank, government, or company.
2. Stuxnet:-
3. Spear Phishing:-
A fake email or message sent to a specific person to steal their login info or infect their
system.
4. Custom Trojans:-
•To protect a computer or system from malicious code (malware), we use certain methods and
security practices called controls.
1. Antivirus Software:-
2. Firewalls:-
4. Access Controls:-
Developers should write clean and secure code to avoid errors like buffer overflows.
Helps reduce non-malicious and malicious errors.
7. Regular Backups:-
8. User Awareness:-
Train users to avoid clicking unknown links, attachments, or pop-ups.
Educated users are the first line of defense.
9. Sandboxing:-
Examples:
Windows
Linux
macOS
Ubuntu
Main Features:
Protection in General-Purpose OS
Protection means safeguarding system resources (like memory, files, and CPU) from unauthorized
access or damage.
1. User Authentication:-
2. Access Control:-
3. File Permissions
4. Memory Protection
Prevents one program from using another program’s memory (avoids crashes or hacking).
5. Process Isolation
7. Firewall
8. Encryption
Protects data by converting it into unreadable form (only authorized users can decode).
9. Audit Logs
•In an operating system, protected objects are the important system resources that need security
and controlled access to prevent misuse or damage.
•These objects are protected using access control, permissions, and security policies.
2. Memory:-
3. Processes:-
Running programs.
Protection: Process isolation, ensures one process can’t interfere with another.
5. I/O Devices:-
7. Network Resources:-
•Memory protection ensures that one process (program) cannot access or damage the memory of
another process or the operating system.
Each program is given a starting address (base) and a maximum range (limit).
If the program tries to access memory outside this range, the OS blocks it.
2. Segmentation:-
3. Paging:-
4. Virtual Memory:-
6.protection keys:-
7. Address Binding:-
The Administrator (Admin) is a powerful user account that can install software, manage settings,
access all files, and make system-wide changes.
So, protecting the admin account is very important to keep the system safe from misuse,
malware, or hackers.
1. Strong Passwords
Even if the password is stolen, login needs a code from your phone or email.
5. Access Control
6. Security Updates
These mechanisms help keep data secure and private on a computer system.
1. Access Control
2. File Permissions
3. User Authentication
4. Encryption
Only those with the decryption key can access the real contents.
5. File Attributes
6. File Locking
Prevents multiple users or programs from changing a file at the same time.
Users are given access based on their role (e.g., admin, student, guest).
User Authentication
•User Authentication is the process of verifying the identity of a user before allowing access to a
computer system, website, or application.
•It ensures that only authorized users can access sensitive data or features.
Types of Authentication:
1. Password-Based Authentication:-
3. Biometric Authentication:-
4. Token-Based Authentication:-
5. Smart Cards:-
•To design a secure and trusted authentication system, follow these key principles:
Prevent brute force attacks by locking accounts after multiple failed attempts.
5. Secure Communication
6. Session Management
8. User Feedback
Inform users if login fails or if their account is accessed from a new location.
•Security policies in an operating system are rules and guidelines designed to protect the system
from unauthorized access, misuse, or attacks.
•These policies help maintain confidentiality, integrity, and availability of the system.
Types of Security Policies:
1. Authentication Policy
2. Authorization Policy
Decides what resources a user can access and what actions they can perform.
Example: Read-only access to files, admin privileges for specific users.
Types:
4. Audit Policy
•Definition:
The Bell-LaPadula Model is a confidentiality-focused security model that prevents unauthorized
reading or writing of sensitive data.
Main Rules:
Example:
A "Secret"-level user can't read a "Confidential" file (No Read Down) or write to a "Top Secret" file
(No Write Up).
2. Biba Model:-
•Definition:
The Biba Model is an integrity-focused security model that ensures data is not modified by
unauthorized or lower-integrity users.
•Main Rules:
Example:
A "Manager" can't write to an "Intern's" report (No Write Down) and an "Intern" can't read the
Manager’s report (No Read Up).
3. Clark-Wilson Model:-
•Definition:
A model that ensures data integrity through well-formed transactions and separation of duties.
•Key Rules:
Example:
A bank employee can update customer accounts only through authorized software, not directly.
•Definition:
A privacy-based security model that prevents conflict of interest in environments like consulting or
auditing.
Rule:
•Access is dynamic — changes based on what the user accessed before.
Example:
If a consultant views Coca-Cola files, they cannot access Pepsi files afterward.
•Definition:
A general model that uses a matrix format to define who (subject) can access what (object) and in
what way (permissions).
•Structure:
Example:
•Rules:
Example:
Only a “Top Secret” user can access “Top Secret” data.
Definition:
A model where file owners have control over who can access their files.
Rules:
•Users can grant or deny access to others.
Example:
You can give your friend read-only access to your folder in Windows.
Definition:
Access rights are assigned based on a user’s role in the organization, not the individual user.
Rules:
Example:
•A Trusted Operating System is one that provides secure and reliable protection for data and
processes.
•It is designed to enforce strict security policies, ensuring that only authorized users and programs
can access system resources.
Goals of a Trusted OS
3. User Authentication
6. Trusted Path
Provides a secure method for users to communicate with the OS (e.g., login screens).
7. Security Kernel
It must be:
Tamper-proof
Always invoked
Small enough to be verified
Examples of Trusted OS
•Assurance means how sure or confident we are that the security of the operating system is
working properly and that it cannot be easily broken or misused.
It is well-designed
Securely implemented
Properly tested
Reliable for protecting data and users
•Even if an operating system has good security features, we need to make sure:
These features are working correctly
They are protecting us from real threats
Hackers cannot bypass them
1. Design Assurance
2. Implementation Assurance
3. Operational Assurance