Notes, summaries, assignments, exams, and problems for Computer science

Set-UID Security and Buffer Overflow Exploitation

Computer science3.95 KB

Set-UID Privilege Management

The Set-UID approach provides the following:

  • Fine-grained access control.
  • Normal users run special programs to gain privileges and conduct privileged operations.
  • No need for a background process; therefore, it offers better performance.
  • A larger attack surface, as environment variables come from the user process.
  • A Set-UID process does not always run with root privileges; it runs with the program owner's privileges.

Process Inheritance and Shell Variables

Environment Variables in fork() and execve()

  • In the case of fork(), all environment variables from the parent process are inherited by the child process.
  • In the case of execve(), the inherited environment variables are decided based on the parameters provided to the execve(
...
Continue reading "Set-UID Security and Buffer Overflow Exploitation" »

Operating System Fundamentals and Network Addressing Concepts

Computer science3.53 KB

Operating System Fundamentals

Kernel and Core Components

1. The memory resident part of an operating system is called the kernel. The kernel manages hardware resources and enforces access control. The parts are loaded when the system starts up and stay running as long as the system is on.

2. API stands for Application Programming Interface, which allows different applications to communicate and work together.
3. Device Drivers control communication between devices and operating systems, such as network adapters and graphic cards. Device drivers also provide a layer that allows the operating system to send commands to hardware devices.
4. A process is an execution instance of a program. A process executes instructions in memory, while a program has
...
Continue reading "Operating System Fundamentals and Network Addressing Concepts" »

Developing Logical and Mathematical Thinking in Children

Computer science3.73 KB

What is Mathematical Logical Thinking?

These are the skills students develop associated with logical and mathematical concepts, reasoning, comprehension, and exploration of the world through real proportions, thus strengthening more abstract aspects of thought.

Geometry with Dinosaurs

This activity involves cutting out various geometric shapes with EVA rubber. Children will then create their own dinosaurs using these shapes. Through this activity, they can learn geometric shapes, count the number of elements used in each dinosaur (like the sides of the shapes), and create new geometric shapes from the ones they already have.

Logical Reasoning with Chupa Chups

This activity consists of creating logically structured material and playing with it using...

Continue reading "Developing Logical and Mathematical Thinking in Children" »

Operating System Memory and File Structures

Computer science3.91 KB

Understanding Operating System Memory and File Structures

Virtual Memory Concepts

Virtual memory is a fundamental concept in modern operating systems, offering several key advantages:

  1. There are many cases where an entire program is not needed in main memory at a given time.
  2. Even when the entire program is needed, it may not all be required simultaneously.
  3. Application programs always perceive the availability of a contiguous working address space due to the concept of virtual memory.
  4. Actually, this working memory can be physically fragmented and may even overflow onto disk storage.
  5. This technique makes programming of large applications easier and utilizes real physical memory more efficiently than systems without virtual memory.
  6. Although an executing
...
Continue reading "Operating System Memory and File Structures" »

Presidency University Website

Computer science2.83 KB

{ "titl":"Presidency University Websit", "tag": [ "HTM", "CS", "JavaScrip", "Bootstra", "AngularJ", "jQuer" ], "conten":"

Problem Statement:

Mr. Kiran Student of Presidency University wants to create an attractive web page for Presidency University using HTML and CSS with following specifications.

  •   Split the web page into two parts using frames, top section 20% and bottom section 80%.

  •   Place your college logo at the top of the page withmenu’s (About, Academic, Admission,

    Facilities, etc). Createhyperlink for all menus.

  •   Create a web page about the college linked at the bottom of the frame.

  •   Create a web page about the Academic linked at the bottom of the frame.

  •   Create a web page about the admission, list out the departments,

...
Continue reading "Presidency University Website" »

Java Programs: Character Frequency, Inheritance, Palindrome, Matrix Multiplication & Polymorphism

Computer science5.03 KB

Character Frequency

FREQUENCY

import java.util.Scanner;
class Test2 {
public static void main(String args[]) {
Scanner s = new Scanner(System.in);
System.out.print("ENTER THE STRING:");
String abc = s.nextLine();
System.out.println("Enter The Character for checking:");
char ch = s.nextLine().charAt(0);
int count = 0;
for(int i = 0; i < abc.length(); i++) {
if(ch == abc.charAt(i)) {
count++;
}
}
System.out.println("The given character repeats " + count + " times");
} }

OUTPUT

ENTER THE STRING: MALAYALAM
Enter The Character for checking:
M
The given character repeats 2 times

Inheritance Example

import java.util.Scanner;
class Employee {
String name = "Name";
String address = "Address";
int age = 23, phn_no = 123456789, salary = 500000;
void printsalary() {
System.out.println(

...
Continue reading "Java Programs: Character Frequency, Inheritance, Palindrome, Matrix Multiplication & Polymorphism" »

Network Types, MAC Addresses, and OSI Model Explained

Computer science2.86 KB

Network Classification by Device Roles

Networks can be classified based on the roles of the devices within them:

  • Client-Server: This is the most common type. A powerful server provides services to multiple clients and is always available. Example: A web server.
  • Peer-to-Peer: In this model, all computers have equal roles and share resources directly. Example: BitTorrent.

Router Functions in Home Networks

Routers provided by Internet Service Providers (ISPs) often integrate the functions of multiple devices, including:

  • Hub
  • Modem
  • Access Point

MAC Address Translation

The MAC address 08-2E-5F-14-93-A0 in decimal is 8-46-95-20-147-160.

Switches and the OSI Model

Switches operate at Level 2 (Data Link Layer) of the OSI model. Other devices that work at this level...

Continue reading "Network Types, MAC Addresses, and OSI Model Explained" »

Essential Sorting Algorithms and String Processing

Computer science2.29 KB

Sorting Fundamentals

  • Stable sorting: Relative order is preserved.
  • In-place: Input and output occupy the same memory space.
  • Lower bound: N lg N for any comparison-based algorithm.

Common Sorting Algorithms

  • Insertion Sort
  • Merge Sort
  • Quick Sort: Often cited as the most important algorithm of the 21st century.
    • Recursive approach; processes data after the work is done.
    • Uses a random pivot to partition the list into two unsorted sublists, which are then sorted recursively.
  • Bubble Sort: A simple, greedy approach to sorting.
  • Heap Sort

String Sorting Techniques

Specific properties of strings allow for faster sorting than general-purpose algorithms.

Strings in Java

  • Strings are immutable sequences of 16-bit characters.
  • Operations: Length (1), Indexing (1), Concatenation
...
Continue reading "Essential Sorting Algorithms and String Processing" »

Framing and Bit Stuffing in Computer Networks

Computer science764 bytes

Framing bit stuffing:

Framing in Computer Network. Data link layer is responsible for something called Bit Stuffing in Computer Network. It is the division of stream of bits from network layer into manageable units (called frames). Frames could be of fixed size or variable size. Bit stuffing is the insertion of non-information bits into data.

framing: A frame is a digital data transmission unit in computer networking and telecommunication.

Bit Stuffing: Bit stuffing is the process of inserting non-information bits into data to break up bit patterns to affect the transmission of the network.

Byte Stuffing: It is a process that transforms a sequence of data bytes that may contain illegal or reserved values.

Cybersecurity Fundamentals: Principles and Practices

Computer science7.68 KB

**CIA Triad: Core Security Principles**

The CIA Triad consists of Confidentiality, Integrity, and Availability. These are the fundamental goals of information security.

**Threat Modeling: Proactive Security**

Threat modeling involves system decomposition and emphasizes security by design.

**Kerckhoffs's Principle: System Security**

Kerckhoffs's Principle states that:

  1. Security should not depend on the secrecy of the system's design, but only on the secrecy of the key.
  2. The system should be usable.
  3. Keys must be easy to change.

**One-Time Pad: Unbreakable Encryption**

A One-Time Pad is an algorithm that XORs the message with a randomly generated key of equal length. It is secure if:

  1. The key is truly random.
  2. The key is as long as the message.
  3. Each key is used
...
Continue reading "Cybersecurity Fundamentals: Principles and Practices" »