IS3440 Linux Security Unit 7 Securing the Linux Kernel

Slides:



Advertisements
Similar presentations
Drivers and the kernel1-1 Drivers and the kernel UNIX system has three layers: m The hardware m The operating system kernel m The user-level programs Kernel.
Advertisements

Chapter Nine NetWare-Based Networking. Objectives Identify the advantages of using the NetWare network operating system Describe NetWare’s server hardware.
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 2: Managing Hardware Devices.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 1 Introduction to Managing the SUSE Linux Enterprise Server.
Cambodia-India Entrepreneurship Development Centre - : :.... :-:-
Installing software on personal computer
© 2010 VMware Inc. All rights reserved VMware ESX and ESXi Module 3.
The Operating System The operation system (OS) is a set of programs that coordinates: Hardware functions Interaction between application software and computer.
© 2013 Jones and Bartlett Learning, LLC, an Ascend Learning Company All rights reserved. Security Strategies in Linux Platforms and.
Hands-On Microsoft Windows Server 2008
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
Tutorial 11 Installing, Updating, and Configuring Software
Modifying Network Packet Buffering in Network Layer CS518 Final Presentation and Instruction Guide Li Zhang.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 2: Managing Hardware Devices.
Guide to Linux Installation and Administration, 2e 1 Chapter 9 Preparing for Emergencies.
CIS 191 – Lesson 2 System Administration. CIS 191 – Lesson 2 System Architecture Component Architecture –The OS provides the simple components from which.
University of Management & Technology 1 Operating Systems & Utility Programs.
Chapter 8: Operating Systems and Utility Programs Catherine Gifford Dan Falgares.
Chapter Nine NetWare-Based Networking. Introduction to NetWare In 1983, Novell introduced its NetWare network operating system Versions 3.1 and 3.1—collectively.
1 What is a Kernel The kernel of any operating system is the core of all the system’s software. The only thing more fundamental than the kernel is the.
Guide to Linux Installation and Administration, 2e1 Chapter 10 Managing System Resources.
Chapter Two Exploring the UNIX File System and File Security.
Condor and DRBL Bruno Gonçalves & Stefan Boettcher Emory University.
Troubleshooting and Performance
Guide to Linux Installation and Administration1 Chapter 4 Running a Linux System.
Linux Kernel Management. Module 9 – Kernel Administration ♦ Overview The innermost layer of Linux operating system is the kernel, which is a thin layer.
Computer Literacy for IC 3 Unit 1: Computing Fundamentals © 2010 Pearson Education, Inc. | Publishing as Prentice Hall.1 Chapter 4: Identifying Software.
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
CSC190 Introduction to Computing Operating Systems and Utility Programs.
Chapter 8: Installing Linux The Complete Guide To Linux System Administration.
Implementation of Embedded OS
Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 - OS Kernel 2014/10/21/ 16 1.
Embedded Real-Time Systems Introduction to embedded software development Lecturer Department University.
Rebuilding Linux Kernel Dedicated to penguin lovers everywhere 26 September 20161Rebuilding kernel by Visakh M R.
Introduction to Operating Systems Concepts
SQL Database Management
DISCOVERING COMPUTERS 2018 Digital Technology, Data, and Devices
Operating System Kernel Compilation
Topic 2: Hardware and Software
Development Environment
CHAPTER 1: Computers and Systems
Operating System Review
Chapter 5: Using System Software
Chapter 4 – Introduction to Operating System Concepts
Drivers and the kernel UNIX system has three layers: Kernel
Introduction to Computers
More Scripting & Chapter 11
IS3440 Linux Security Unit 3 User Account Management
IS3440 Linux Security Unit 6 Using Layered Security for Access Control
Operating System Review
Operating System Kernel Compilation
Networking for Home and Small Businesses – Chapter 2
Exploring the UNIX File System and File Security
IS3440 Linux Security Unit 9 Linux System Logging and Monitoring
IS3440 Linux Security Unit 4 Securing the Linux Filesystem
IS4680 Security Auditing for Compliance
Chapter 2: System Structures
IS3440 Linux Security Unit 2 Securing a Linux Platform―Core Components
Chapter 2: The Linux System Part 1
IS3440 Linux Security Unit 8 Software Management
Memory Management Tasks
Complete CompTIA A+ Guide to PCs, 6e
SUSE Linux Enterprise Desktop Administration
Linux Architecture Overview.
Networking for Home and Small Businesses – Chapter 2
Operating Systems Lecture 1.
Operating Systems Networking for Home and Small Businesses – Chapter 2 – Introduction To Networking.
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Operating System Kernel Compilation
Presentation transcript:

IS3440 Linux Security Unit 7 Securing the Linux Kernel

Class Agenda 4/27/16 Covers Chapter 10 Quiz 7.1 Quiz 3 Learning Objectives Discussion on Lab Activities. Lab will be perform in class. Break Times as per School Regulations.

Learning Objective and Key Concepts Assess the architecture of the Linux kernel and techniques used to enact a more secure kernel. Key Concepts Linux kernel architecture Tuning, installing, and upgrading the Linux kernel Options to consider in a stock versus custom kernel scenario Steps to build a custom kernel

Linux Kernel Architecture Monolithic Loadable kernel module (LKM)

Explore-Group work Find about Linux Kernels and Kernel versions. List 10 Linux distribution What is meant by compiling or recompiling Linux Kernel What are some of advantages of compiling Linux Kernels. The different between recompiling and remastering. Find 5 Linux remastering tool

Linux Kernel Architecture (Continued) Subsystems Process scheduler Memory management Virtual filesystem (VFS) Network interface Inter-process communication (IPC)

Linux Kernel Architecture (Continued) Process Scheduler Controls access to the central processing unit (CPU) Interacts with the CPU Determines which process will have access to the CPU Interacts with the memory manager

Linux Kernel Architecture (Continued) Memory Management Consists of a virtual memory interface to the hardware memory Controls access to random access memory (RAM) Restricts access to user processes Allows user processes to consume and release storage as well as memory maps for input and output

Linux Kernel Architecture (Continued) VFS Loads programs or an executable Mounts a filesystem on the hardware Manages all filesystems that are mounted Provides a common interface for all processes

Linux Kernel Architecture (Continued) Network Interface Allows Linux to access other networks Supports many network cards and protocols Provides a common interface from the hardware to other subsystems Allows a network card to interface with software and hardware Interacts with the VFS and process scheduler subsystems

Linux Kernel Architecture (Continued) IPC Sends signals to processes Sends signals in the following ways: Message queues Semaphores Shared memory

Patching the Linux Kernel (Version 2.6.35.4 ) 11/30/2018 Patching the Linux Kernel (Version 2.6.35.4 ) Step 1 From the source tree (/usr/src/linux), download the patch from the Internet using the following command: [root@is418 linux]# wget http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.35.4.bz2 Step 2 Extract the file in the source tree using the following command: [root@is418 linux]# bunzip2 patch-2.6.35.4.bz2 Applying a patch to a custom kernel requires compiling the kernel again but this time with the new patch. The patch should be placed where the Linux source tree is located, which is usually in the /usr/src/linux directory. Applying a kernel patch to a binary kernel that is part of a distribution: The package management software usually takes care of this process. Once the software applies and updates the patch, a new kernel version is placed in the /boot directory and an option to boot from it is added in the GRUB menu. The older kernel version is purposely left intact and should NOT be removed until the new patch starts working as expected, which could take several weeks or months. (c) ITT Educational Services, Inc.

Patching the Linux Kernel (Version 2.6.35.4 ) (Continued) Step 3 Apply the patch using the following command: root@is418 linux]#patch -p1 < patch-2.6.35.4 Step 4 Proceed to build the kernel as described in the textbook.

Persisting a Kernel Parameter Change Step 1 Open the /etc/sysctl.conf file in a text editor. Step 2 Find the directive net.ipv4.tcp_syncookies by using the directive net.ipv4.tcp_syncookies = 0

Persisting a Kernel Parameter Change (Continued) Step 3 Change the directive's value by using the directive net.ipv4.tcp_syncookies = 1 Step 4 Save and exit.

Process to Compile a Kernel 11/30/2018 Process to Compile a Kernel Login as root and change directory to /usr/src. Download the latest stable kernel from www.kernel.org. Extract the compressed source tree into the /usr/src directory and create a symbolic link from the extracted directory to /usr/src/linux. Configure what needs to be compiled into the kernel and then change into the /usr/src/linux directory by typing cd /usr/src/linux. Type make menuconfig. If any errors occur when issuing the make menuconfig command, it probably means that the ncurses libraries are not installed on the computer system. (c) ITT Educational Services, Inc.

Process to Compile a Kernel (Continued) Save the options selected when exiting out of the menu interface. Type make. Type make modules. Type make modules_install. Type make install.

Linux System Administrator Configures kernel parameters for optimal security Ensures all LKMs are necessary and tested Manages kernel updates Monitors the operating system for any kernel changes

Use of LKM in Securing Linux System Advantages Allows Linux to be a monolithic kernel Loads modules as needed Removes or unloads unneeded modules Performs changes in hardware or any new module without recompiling the kernel

Use of LKM in Securing Linux System (Continued) Disadvantages Has access to kernel space and a poorly written LKM can impact the performance of the operating system Is a source of rootkits and other malicious software that could gain access to kernel space

EXPLORE: RATIONALE

Linux Kernel Architecture Assessing the Linux kernel architecture helps to: Examine how memory and swap space are managed Examine how modules interact with the kernel Analyze the risks involved when adding new modules Explore how networks interact with the kernel and the drivers and protocols that are available for use Understand how filesystems are mounted and managed

Vendor-Supplied and Custom Kernel Vendor-Supplied Kernel Pros Easier to apply patches and updates, easier to maintain, and has a system to address security issues Cons Has generic builds that are not optimized for the specific hardware that will run the kernel Often times contains more features and modules than are needed

Vendor-Supplied and Custom Kernel (Continued) Pros Optimized for specific hardware More secure because only the needed features and modules are compiled into the kernel Cons Need to recompile when patches are available Requires a Linux system administrator to manage kernel updates

Benefits of Installing a New Kernel Installing is less riskier than upgrading because a computer system can become unstable or even unbootable after an upgrade. If the new kernel causes the computer system to become unbootable or unstable, the older kernel will still be available to run the system until the issue is resolved.

Summary In this presentation, the following concepts were covered: Vendor-supplied and custom Linux kernel Process to patch and compile a Linux kernel Role of a Linux system administrator in securing the Linux kernel Use of LKM to secure the Linux kernel Benefits of installing a new kernel

Unit 7 Assignments Quiz 7.1 Quiz 3 Lab 7.2 Apply Hardened Security for the Linux Kernel Project 7.3 Project Part 2: Executive Summary