OSISS Lab file
OSISS Lab file
OSISS Lab file
S NO Practical Remarks
1 Discuss the architecture of the UNIX
operating system including kernel
structure and system calls
2 Explain the structure of an iNODE
and its role in file systems
3 Illustrate process scheduling
concepts and simulate a simple
scheduler
4 Explore inter-process
communication using System V IPC
5 Analyze malware using Honeypot
environment
2. CHMOD()
Working of System Calls
When a user program makes a system call:
1. The control switches to the kernel mode from the user mode.
2. The kernel performs the requested operation.
3. The result is passed back to the user program.
System calls enable secure and controlled interaction with hardware
and system resources.
PRACTICAL – 2
Explain the structure of an inode and its role in file systems
Aim
To study and understand the structure of an inode and its role in file systems.
Objective
To explore the role of inodes in managing files and directories in UNIX-based
file systems and understand their internal structure.
Theory
An inode (index node) is a fundamental data structure used in UNIX-based file
systems like ext3 and ext4 to store metadata about files and directories. Each
file or directory is represented by an inode, which acts as a container for its
attributes.
Structure of an Inode
An inode does not contain the file's name or actual data but stores the
following metadata:
1. File Type: Indicates whether the inode represents a file, directory, or
symbolic link.
2. Permissions: File access permissions (read, write, execute) for the owner,
group, and others.
3. Owner Information: User ID (UID) and group ID (GID) of the file owner.
4. File Size: Total size of the file in bytes.
5. Timestamps:
o Access Time (atime): Last time the file was read.
o Modification Time (mtime): Last time the file's content was
modified.
o Change Time (ctime): Last time the inode metadata was
modified.
6. Link Count: Number of references (hard links) to the file.
Direct Pointers: Point directly to data blocks.
Single Indirect Pointer: Points to a block containing addresses of other
data blocks.
Double Indirect Pointer: Points to a block containing addresses of single
indirect blocks.
Triple Indirect Pointer: Points to a block containing addresses of double
indirect blocks.
This hierarchical structure enables the efficient management of large files.
Objective
To illustrate the principles of process scheduling, including different algorithms, and simulate
a basic scheduling algorithm to observe how processes are allocated CPU time.
Theory
Process Scheduling
Process scheduling is the mechanism by which the operating system allocates the CPU to
different processes. It ensures that system resources are used efficiently and fairly while
maintaining overall system performance.
Scheduling Types
1. Preemptive Scheduling: The scheduler can interrupt a running process and allocate
the CPU to another process (e.g., Round Robin, Shortest Remaining Time First).
2. Non-Preemptive Scheduling: Once a process starts execution, it cannot be
interrupted until it completes (e.g., First Come First Serve, Shortest Job First).
Scheduling Algorithms
3. First Come First Serve (FCFS): Processes are executed in the order they
arrive.
4. Shortest Job First (SJF): The process with the shortest burst time is
executed first.
5. Round Robin (RR): Processes are executed in time slices (quantum) in a cyclic
order.
6. Priority Scheduling: Processes are executed based on their priority levels.
Simulation Example
Objective
To understand how processes can communicate and synchronize using System V IPC and
implement basic examples for each mechanism.
Theory
IPC allows processes to exchange data and synchronize their actions. System V IPC provides
a robust set of tools for this purpose, including message queues, semaphores, and shared
memory.
1. Message Queues
o Allows processes to send and receive messages in a queue structure.
o Messages are stored until a process retrieves them.
2. Semaphores
o Used for synchronization to avoid race conditions.
o A semaphore is a counter used to control access to shared resources.
3. Shared Memory
o The fastest IPC mechanism, allowing multiple processes to share a segment of
memory.
To analyze malware behavior and its impact by deploying and monitoring it in a Honeypot
environment.
Objective
To understand the concept and purpose of a Honeypot in cybersecurity.
To safely capture and study malware in a controlled environment.
To extract insights into the malware's operation, such as its communication channels
and attack vectors.
Theory
Honeypot
Types of Honeypots
1. Low-Interaction Honeypots
o Simulates limited functionality to detect and log malicious activities.
2. High-Interaction Honeypots
o Mimics real systems to engage attackers for detailed analysis.
Implementation Example
Expose the honeypot to the internet by configuring the network. Monitor for incoming
connections or exploit attempts.
To simulate access control mechanisms in an operating system and understand their role in
restricting unauthorized access.
Objective
To understand how access control mechanisms manage user permissions.
To simulate file-based access control using user roles and permissions.
To evaluate the effectiveness of access control in securing system resources.
Theory
Access control mechanisms are policies and procedures that regulate who can access system
resources and what operations they can perform. They ensure that only authorized users can
access sensitive data or perform restricted actions.
Implementation Steps
Tools/Prerequisites
1. Create a File
ChangeOwnership
PRACTICAL – 7
Discuss System security vulnerabilities and create a check list
for secure system configuration
Aim
To discuss system security vulnerabilities and create a comprehensive checklist for secure
system configuration.
Objective
To identify common vulnerabilities in operating systems.
To understand the best practices for mitigating these vulnerabilities.
To create a practical checklist to ensure secure system configuration.
Theory
System vulnerabilities are weaknesses or flaws in an operating system that can be exploited
by attackers to gain unauthorized access or disrupt normal operations.
Types of Vulnerabilities:
1. Unpatched Software
o Outdated software with known vulnerabilities.
2. Weak Authentication
o Weak or default passwords, absence of multi-factor authentication.
3. Misconfigured Systems
o Default settings, excessive permissions, or unused services running.
4. Malware and Viruses
o Exploiting unprotected systems via malicious software.
5. Insufficient Monitoring
o Lack of logs or alerts for unusual activities okkay.
1. System Updates
3. Network Security
5. Malware Protection
Enable logging for authentication attempts, system changes, and network access.
Regularly review logs for anomalies.
Use intrusion detection systems (IDS) like Snort.
7. Encryption
8. Backup
9. Application Security
5. Schedule Backups
Use rsync or a tool like Timeshift for periodic
backups.
Testing
Aim
To explore Windows internals related to sockets and connections, including their structure
and how they enable communication in networked systems.
Objective
To understand how sockets and connections function within the Windows operating
system.
To learn the basics of socket programming in Windows.
To demonstrate the creation of a simple socket program for communication.
Theory
Sockets are endpoints for sending and receiving data across a network. They provide an
interface for programming network communication protocols, enabling processes to
communicate over the network.
Types of Sockets
The Windows operating system uses the Winsock API to manage network
communications.
Winsock supports various protocols, including TCP/IP.
Common Winsock functions include:
o socket(): Creates a socket.
o bind(): Associates a socket with an IP address and port.
o listen() and accept(): Used for server-side connection
handling.
o connect(): Used for client-side connection establishment.
o send() and recv(): Send and receive data.
Implementation
To demonstrate secure configuration practices for the Android mobile operating system to
enhance security and protect user data.
Objective
To understand common security risks associated with Android devices.
To implement secure configurations to mitigate these risks.
To test and verify the security settings for optimal protection.
Theory
Android is an open-source mobile operating system widely used on smartphones, tablets, and
other devices. Its open nature makes it flexible but also introduces potential security
vulnerabilities.
Implementation
Step-by-Step Secure Configuration
Applications
Personal data protection against unauthorized access.
Securing enterprise data in BYOD (Bring Your Own Device) environments.
Preventing cyberattacks like malware infections and data theft.
PRACTICAL – 10
Explain virtualization techniques and their use in secure
system environments
Aim
Objective
To understand different types of virtualization techniques.
To explore how virtualization can enhance security.
To demonstrate practical use cases of virtualization for securing system
environments.
Theory
What is Virtualization?
Types of Virtualization
1. Hardware Virtualization
o Uses a hypervisor to manage VMs running on a physical server.
o Types of hypervisors:
Type 1 (Bare-Metal Hypervisor): Runs directly on the hardware
(e.g., VMware ESXi, Microsoft Hyper-V).
Type 2 (Hosted Hypervisor): Runs on an existing operating system
(e.g., VMware Workstation, VirtualBox).
2. Operating System Virtualization
o Uses a containerized environment to isolate applications and services.
o Examples: Docker, LXC (Linux Containers).
3. Network Virtualization
o Virtualizes network resources to create isolated network environments.
o Examples: VLANs, Software-Defined Networking (SDN).
4. Storage Virtualization
o Abstracts storage resources to improve scalability and management.
o Example: Network-Attached Storage (NAS), Storage Area Network (SAN).
Security Benefits of Virtualization
1. Isolation
o Virtualization provides isolation between virtual machines, meaning one
compromised VM cannot directly affect others.
o It helps prevent cross-contamination of systems in a multi-tenant
environment.
2. Snapshot and Cloning
o Snapshots allow you to save the state of a virtual machine at a particular point
in time, making it easy to roll back to a secure state after a breach or system
failure.
o Cloning allows for rapid creation of identical VMs, useful for rapid recovery
or deploying secure templates.
3. Sandboxing
o Virtualization enables the creation of isolated environments (sandboxes) to
safely test potentially malicious software or configurations.
o This reduces the risk of running untrusted code on a production machine.
4. Security Monitoring and Control
o Virtualization technologies allow for centralized management of security
policies and configurations.
o Hypervisors can monitor VM activities for suspicious behavior and enforce
security policies across all VMs.
5. Access Control
o VMs can be configured with strict access controls, ensuring that only
authorized users and processes can interact with sensitive resources.
o Virtualization tools offer detailed logging of VM activities for auditing
purposes.
Implementation
1. Test Isolation
o Launch multiple VMs with different security configurations (e.g., one
vulnerable, one hardened).
o Simulate an attack on the vulnerable VM and ensure the other VMs remain
unaffected.
2. Snapshot Reversal
o Make a configuration change in a VM (e.g., disable a security feature).
o Roll back to a previous snapshot and verify that the changes are undone.
3. Sandboxing Test
o Run an unknown or untrusted application inside a VM.
o Observe if it can access the underlying system or if it is contained within the
VM.
IES COLLEGE OF TECHNOLOGY, BHOPAL
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
LAB FILE
Roll No : 0177CY221047
Semester : 5TH