Capability and System Hardening

Size: px
Start display at page:

Download "Capability and System Hardening"

Transcription

1 P a g e 1 Date Assigned: mm/dd/yyyy Date Due: mm/dd/yyyy by hh:mm Educational Objectives Capability and System Hardening This lab is designed to help you gain a better understanding of system hardening principles and hands-on experiences with common hardening techniques. Lab Environment One Fedora 18 system is needed for this lab. Please turn SELinux in permissive mode (setenforce 0). Resources: Most of the materials in the rest of this lab are derived from the following documents: [1] Guide to the Secure Configuration of Red Hat Enterprise Linux 5, Revision 4.1, February 28, 2011, by Operating Systems Division Unix Team of the Systems and Network Analysis Center, National Security Agency (NSA). [2] Security Configuration Benchmark for Red Hat Enterprise Linux 5, Version 2.0.0, December 16th, 2011, the Center for Internet Security (CIS). Section 1 Introduction to Linux Capabilities Unix/Linux systems use a security system that gives regular users a minimal amount of privilege, while gives root full privileges. Privileged operations are necessary in operating systems. Programs often need root privileges for a single activity, such as binding to a privileged port, or opening a file only root can access. In order to allow regular users to run these programs, the mechanism of Set-UID is introduced. Set-UID programs turn regular users into privileged users temporarily. This is proven dangerous. If the program is compromised, adversaries may obtain root privilege. In most cases, the involved operations usually do not need root privilege. Capabilities divide root privilege into a set of granular privileges. Each of these privileges is called a capability. With capabilities, a common user does not need to be a root to conduct privileged operations. All the user needs is to have the capability that is necessary for the privileged operations. If a privileged program is compromised, adversaries can only obtain limited privilege. The technology of capabilities has been implemented since Linux kernel 2.1 and has been significantly improved since kernel A good introduction can be found from the following link:

2 P a g e 2 Available capabilities and their privileges are given in the following file: /usr/include/linux/capability.h A good example is the command ping. Please perform the following as root before working on the rest of the lab: setcap r /bin/ping chmod u+s /bin/ping In order to make it work for root and a regular user, ping is now a Set-UID program, as shown in the following screenshot: The letter s in the owner s field indicates that ping is a Set-UID program. When a regular user execute ping, his/her effective user id becomes root. If ping is compromised, the entire system can be compromised. The question is whether we can remove this privilege from ping. Let s turn ping into a non-set-uid program by executing the following as a root. chmod u-s /bin/ping Now, log in as a regular user and run ping You will receive the following error: The command does not work for a regular user, although it works for the root (test it). This is because ping uses ICMP that needs to open a RAW socket, which is a privileged operation. That is why ping has to be a Set-UID program. With capabilities, we do not need to give too much privilege to ping. The privilege it needs is to open a RAW socket, which can be granted with the cap_net_raw capability. This capability can be assigned to ping by doing the following as root:

3 P a g e 3 setcap cap_net_raw=ep /bin/ping Now, log in as a regular user and run ping again. The ping succeeds this time, as it is shown below: Please use man pages to study how to use the following commands: setcap getcap The following command displays all Set-UID programs in the system: find / -type f perm print Please find the capabilities needed for a program from the article in the following link: Why some of the capabilities are desired? Please read the following post: Question 1: Choose one of the Set-UID programs you are interested in. Remove the SUID bit from the program and set proper capabilities to the program. Were you able to make it to work for a regular user without SUID bit being set? Please test your solution. a) What is the program you choose? b) Does it work for a regular user without the SUID bit being set? One common use of capabilities is to assign some application programs with desired privileges. Some applications need privileged operations to access certain resources. However, you don t

4 P a g e 4 want to run them as a root for security purposes. In this case, you can assign desired capabilities to such programs. For example, the program shown in Figure 1 needs to open the file /etc/shadow for reading purpose. If the operation is allowed, it shows Reading successful. Otherwise, it shows Reading failed. Figure 1 A simple application program Task 1 You are given an application program shown in Figure 1. You need to configure the program so that a regular user can run it and the result shows Reading successful. For security purpose, you don t want to make it owned by root and be a Set-UID program. In addition, you don t want to make the /etc/shadow file accessible to common users. Then you want to test your configuration to ensure it works as expected. Question 2: What do you need to do to achieve the goals specified in Task 1? Please use screenshots to demonstrate your work and results. Section 2 System-wide hardening Some of common system wide hardening items will be introduced in this section Password complexity In a Linux system, password complexity requirements are defined in the file /etc/login.defs. Please study the file and try to harden your system. Question 3: What changes would you like to make to the Password aging controls section in the /etc/login.defs file in order to harden your system?

5 P a g e Account and password verification To ensure that no accounts have an empty password field, the following command should have no output: awk -F: ($2 == ) {print} /etc/shadow If this generates any output, fix the problem by locking each account or by setting a password for each account. To ensure that no password hashes are stored in /etc/passwd, the following command should have no output: awk -F: ($2!= x ) {print} /etc/passwd The hashes for all user account passwords should be stored in the file /etc/shadow and never in /etc/passwd, which is readable by all users. Question 4: Did you get any outputs by performing the above commands? If you did, please harden your system Group-writable and world-writable files User s home directory should not be writable by others except specific commissions are defined. You don t want to share your privacy with others. For each human user USER of the system, view the permissions of the user s home directory: ls -ld /home/user Ensure that the directory is not group-writable and that it is not world-readable (not worldwritable). If necessary, repair the permissions: chmod g-w /home/user chmod o-rwx /home/user For each human user USER of the system, view the permissions of all dot-files in the user s home directory:

6 P a g e 6 ls -ld /home/user /.[A-Za-z0-9]* Ensure that none of these files are group- or world-writable. Correct each mis-configured file FILE by executing: chmod go-w /home/user /FILE Question 5: Why would you perform the above checks in practice? 2.4. Verify that all world-writable directories have sticky bits set Locate any directories in current partition which are world-writable and do not have their sticky bits set. The following command will discover and print those directories if any. Run it once for each partition: find / -xdev -type d \( -perm a! -perm \) -print Question 6: Did you see any output when running the above command? If this command produces any output, fix each reported directory /dir using the command: chmod +t /dir When the so-called sticky bit is set on a directory, only the owner of a given file may remove that file from the directory. Without the sticky bit, any user with write access to a directory may remove any file from that directory. Setting the sticky bit prevents users from removing each other s files Find unauthorized SUID/SGID system executables The following command discovers and prints any setuid or setgid files on local partitions. Run it once for each local partition: find / -xdev \( -perm o -perm \) -type f -print If the file does not require a setuid or setgid bit set, then these bits can be removed by running the command: chmod -s filename

7 P a g e 7 System executables that need setuid or setgid bits set are listed in the security configuration guide. You may also be able to find this list in a manual or a system specification. In addition, replacing the setuid and setgid bits with proper capabilities will always limit the damage to the system when the program is compromised. Un-owned files are not directly exploitable, but they are generally a sign that something is wrong with some system process. They may be caused by an intruder, by incorrect software installation or incomplete software removal, or by failure to remove all files belonging to a deleted account. The files should be repaired so that they will not cause problems when accounts are created in the future, and the problem which led to un-owned files should be discovered and addressed. The following command will discover and print any files on local partitions which do not belong to a valid user and a valid group. Run it once for each local partition: find / -xdev \( -nouser -o -nogroup \) -print If this command shows any results, investigate each reported file. Then, either assign it to an appropriate user and group or remove it. Locate any directories in local partitions which are world-writable and ensure that they are owned by root or another system account. The following command will discover and print those directories (assuming that only system accounts have a uid lower than 500). Run it once for each local partition: find / -xdev -type d -perm uid print If this command produces any output, investigate why the current owner is not root or another system account. Allowing a user account to own a world-writable directory is undesirable because it allows the owner of that directory to remove or replace any files that may be placed in the directory by other users. Question 7: How many system executables that have setuid or setgid bits set are there on your system? Give the command that you would use to obtain this number Ensuring system is not acting as a network sniffer The system should not be acting as a network sniffer. The file /proc/net/packet should contain exactly one header line, with entries similar to: sk RefCnt Type Proto Iface R Rmem User Inode

8 P a g e 8 If numbers appear in a row below this header, then a sniffing process is using the interface and this should be investigated. Please perform the above check to find whether your system is acting as a network sniffer. Question 8: Is your system acting as a network sniffer? In what case do you want a computer to function as a sniffer? Why you don t want your computer to act as a network sniffer? 2.7. Disabling all unneeded services at boot time Running as few services as possible on a system is one of the guidelines for hardening a system. Before you can take this hardening step, you need to determine which services are needed. Then you need to know which services are running on your system. The following command will tell you which services are enabled at boot: chkconfig --list grep :on The first column of the output is the names of services which are currently enabled at boot. Review each listed service to determine whether it can be disabled. If it is appropriate to disable some service srvname, do so using the command: chkconfig srvname off Please perform the above command and study the services that are enabled at boot on your system. Question 9: What are some of the services that you are enabled at boot? 2.8. Using group Help Desk Six software engineers are working on a project. They create a number of files. They want to make the files accessible (read and write) by the group members only (including root). Question 10: Sketch an approach to meeting the requirements specified in Help Desk. Section 3 Bonus (4%)

9 P a g e 9 In order to receive bonus points, you need to pick four (4) items from the security guide and/or hardening benchmark documents that you think are interesting and were not included in the previous section. Construct four questions, practice/test them on your computers and answer the questions in the format similar with those in the previous section. Put your questions and answers in your answer sheet as Bonus Questions. Your questions and answers will be verified and tested while grading. Four Questions (B01 B04) of your choices Survey Questions Questions in this section will not be graded, but will make your suggestions and voice heard by your instructor. GQ 1. What changes would you like to make to this lab? GQ 2. How much time did you spend to finish this lab? GQ 3. Do you learn anything new or gain a better understanding of class lecture by finishing this lab? Well, you have completed another lab for this class. Hope you enjoyed doing this lab. Please let me know if you have any comments.

10 P a g e 10 Answer Sheet ========================== Required Questions =========================== Question 1: Choose one of the Set-UID programs you are interested in. Remove the SUID bit from the program and set proper capabilities to the program. Were you able to make it to work for a regular user without SUID bit being set? Please test your solution. c) What is the program you choose? d) Does it work for a regular user without the SUID bit being set? Question 2: What do you need to do to achieve the goals specified in Task 1? Please use screenshots to demonstrate your work and results. Question 3: What changes would you like to make to the Password aging controls section in the /etc/login.defs file in order to harden your system? Question 4: Did you get any output by performing the above commands? Question 5: Why would you perform the above checks in practice? Question 6: Did you see any output when running the above command? Question 7: How many system executables that have setuid or setgid bits set are there on your system? Give the command that you would use to obtain this number. Question 8: Is your system acting as a network sniffer? In what case do you want a computer to function as a sniffer? Why you don t want your computer to act as a network sniffer? Question 9: What are some of the services that you are enabled at boot?

11 P a g e 11 Question 10: Sketch an approach to meeting the requirements specified in Help Desk. ========================= Bonus Questions (4%) ========================== Four Questions (B01 B04) of your choices =========================== Survey Questions =========================== GQ1. Would you like to make any changes to this lab? GQ2. How long did it take you to complete this lab? GQ3. Do you learn anything new or gain a better understanding of class lecture by finishing this lab?

Linux Capability Exploration Lab

Linux Capability Exploration Lab Laboratory for Computer Security Education 1 Linux Capability Exploration Lab Copyright c 2006-2009 Wenliang Du, Syracuse University. The development of this document is funded by the National Science

More information

Files (review) and Regular Expressions. Todd Kelley CST8207 Todd Kelley 1

Files (review) and Regular Expressions. Todd Kelley CST8207 Todd Kelley 1 Files (review) and Regular Expressions Todd Kelley kelleyt@algonquincollege.com CST8207 Todd Kelley 1 midterms (Feb 11 and April 1) Files and Permissions Regular Expressions 2 Sobel, Chapter 6 160_pathnames.html

More information

Linux Capabilities & Set-UID Vulnerability

Linux Capabilities & Set-UID Vulnerability Copyright: The development of this document is funded by Higher Education of Academy. Permission is granted to copy, distribute and /or modify this document under a license compliant with the Creative

More information

CS/CIS 249 SP18 - Intro to Information Security

CS/CIS 249 SP18 - Intro to Information Security Lab assignment CS/CIS 249 SP18 - Intro to Information Security Lab #2 - UNIX/Linux Access Controls, version 1.2 A typed document is required for this assignment. You must type the questions and your responses

More information

Privileges: who can control what

Privileges: who can control what Privileges: who can control what Introduction to Unix May 24, 2008, Morocco Hervey Allen Goal Understand the following: The Unix security model How a program is allowed to run Where user and group information

More information

Outline. UNIX security ideas Users and groups File protection Setting temporary privileges. Examples. Permission bits Program language components

Outline. UNIX security ideas Users and groups File protection Setting temporary privileges. Examples. Permission bits Program language components UNIX security Ulf Larson (modified by Erland Jonsson/Magnus Almgren) Computer security group Dept. of Computer Science and Engineering Chalmers University of Technology, Sweden Outline UNIX security ideas

More information

Introduction to Unix May 24, 2008

Introduction to Unix May 24, 2008 Introduction to Unix May 24, 2008 Exercises: Privileges REFERENCE Reference: Shah, Steve, "Linux Administration: A Beginner's Guide", 2nd. ed., Osborne press, New York, NY. If you look at files in a directory

More information

5/8/2012. Encryption-based Protection. Protection based on Access Permission (Contd) File Security, Setting and Using Permissions Chapter 9

5/8/2012. Encryption-based Protection. Protection based on Access Permission (Contd) File Security, Setting and Using Permissions Chapter 9 File Security, Setting and Using Permissions Chapter 9 To show the three protection and security mechanisms that UNIX provides To describe the types of users of a UNIX file To discuss the basic operations

More information

To find all files on your file system that have the SUID or SGID bit set, execute:

To find all files on your file system that have the SUID or SGID bit set, execute: File System Security Checks There are certain files whose presence in the Linux file system can present a security risk and should be remedied as soon as possible. When the SUID (set user ID) or SGID (set

More information

Chapter 8: Security under Linux

Chapter 8: Security under Linux Chapter 8: Security under Linux 8.1 File and Password security Linux security may be divided into two major parts: a) Password security b) File security 8.1.1 Password security To connect to a Linux system

More information

find Command as Admin Security Tool

find Command as Admin Security Tool find Command as Admin Security Tool Dr. Bill Mihajlovic INCS-620 Operating Systems Security find Command find command searches for the file or files that meet certain condition. like: Certain name Certain

More information

Introduction to Computer Security

Introduction to Computer Security Introduction to Computer Security UNIX Security Pavel Laskov Wilhelm Schickard Institute for Computer Science Genesis: UNIX vs. MULTICS MULTICS (Multiplexed Information and Computing Service) a high-availability,

More information

Data Security and Privacy. Unix Discretionary Access Control

Data Security and Privacy. Unix Discretionary Access Control Data Security and Privacy Unix Discretionary Access Control 1 Readings for This Lecture Wikipedia Filesystem Permissions Other readings UNIX File and Directory Permissions and Modes http://www.hccfl.edu/pollock/aunix1/filepermissions.htm

More information

RED HAT ENTERPRISE LINUX 6 SECURITY TECHNICAL IMPLEMENTATION GUIDE (STIG) OVERVIEW Version 1, Release 2. 3 June 2013

RED HAT ENTERPRISE LINUX 6 SECURITY TECHNICAL IMPLEMENTATION GUIDE (STIG) OVERVIEW Version 1, Release 2. 3 June 2013 RED HAT ENTERPRISE LINUX 6 SECURITY TECHNICAL IMPLEMENTATION GUIDE (STIG) OVERVIEW Version 1, Release 2 3 June 2013 Developed by Red Hat, NSA, and DISA for the DoD Trademark Information Names, products,

More information

6.858 Lecture 4 OKWS. Today's lecture: How to build a secure web server on Unix. The design of our lab web server, zookws, is inspired by OKWS.

6.858 Lecture 4 OKWS. Today's lecture: How to build a secure web server on Unix. The design of our lab web server, zookws, is inspired by OKWS. 6.858 Lecture 4 OKWS Administrivia: Lab 1 due this Friday. Today's lecture: How to build a secure web server on Unix. The design of our lab web server, zookws, is inspired by OKWS. Privilege separation

More information

Exercise 4: Access Control and Filesystem Security

Exercise 4: Access Control and Filesystem Security Exercise 4: Access Control and Filesystem Security Introduction Duration: 90 min Maximum Points: 30 Note: The solutions of theorethical assignments should be handed out before the practical part in the

More information

Announcements. is due Monday April 1 needs to include a paragraph write-up about the results of using the two different scheduling algorithms

Announcements. is due Monday April 1 needs to include a paragraph write-up about the results of using the two different scheduling algorithms Announcements Reading Chapter 11 (11.1-11.5) Programming Project #3 is due Monday April 1 needs to include a paragraph write-up about the results of using the two different scheduling algorithms Midterm

More information

Processes are subjects.

Processes are subjects. Identification and Authentication Access Control Other security related things: Devices, mounting filesystems Search path Race conditions NOTE: filenames may differ between OS/distributions Principals

More information

Discretionary Access Control

Discretionary Access Control Operating System Security Discretionary Seong-je Cho ( 조성제 ) (sjcho at dankook.ac.kr) Fall 2018 Computer Security & Operating Systems Lab, DKU - 1-524870, F 18 Discretionary (DAC) Allows the owner of the

More information

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers

Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers Review of the Linux File System and Linux Commands 1. Introduction Becoming adept at using the Linux OS requires gaining familiarity

More information

Unix Basics. UNIX Introduction. Lecture 14

Unix Basics. UNIX Introduction. Lecture 14 Unix Basics Lecture 14 UNIX Introduction The UNIX operating system is made up of three parts; the kernel, the shell and the programs. The kernel of UNIX is the hub of the operating system: it allocates

More information

Processes are subjects.

Processes are subjects. Identification and Authentication Access Control Other security related things: Devices, mounting filesystems Search path TCP wrappers Race conditions NOTE: filenames may differ between OS/distributions

More information

CST8207: GNU/Linux Operating Systems I Lab Ten Boot Process and GRUB. Boot Process and GRUB

CST8207: GNU/Linux Operating Systems I Lab Ten Boot Process and GRUB. Boot Process and GRUB Student Name: Lab Section: Boot Process and GRUB 1 Due Date - Upload to Blackboard by 8:30am Monday April 16, 2012 Submit the completed lab to Blackboard following the Rules for submitting Online Labs

More information

Race Condition Vulnerability Lab

Race Condition Vulnerability Lab Concordia Institute for Information Systems Engineering - INSE 6130 1 Race Condition Vulnerability Lab Copyright c 2006-2012 Wenliang Du, Syracuse University. The development of this document is funded

More information

Optional Labs. 0Handouts: 2002 ProsoftTraining All Rights Reserved. Version 3.07

Optional Labs. 0Handouts: 2002 ProsoftTraining All Rights Reserved. Version 3.07 0Handouts: Optional Lab 1-1: Understanding the /etc/securetty file In this lab, you will examine a PAM component, the /etc/securetty file. 1. Boot into Linux as root. Open a Telnet client and attempt to

More information

LAB #7 Linux Tutorial

LAB #7 Linux Tutorial Gathering information: LAB #7 Linux Tutorial Find the password file on a Linux box Scenario You have access to a Linux computer. You must find the password file on the computer. Objective Get a listing

More information

Find out where you currently are in the path Change directories to be at the root of your home directory (/home/username) cd ~

Find out where you currently are in the path Change directories to be at the root of your home directory (/home/username) cd ~ CIS 105 Working with directories You have using directories in a Windows environment extensively. Often in Windows we are calling them folders. They are important in order to organize our files. It is

More information

Exercise Sheet 2. (Classifications of Operating Systems)

Exercise Sheet 2. (Classifications of Operating Systems) Exercise Sheet 2 Exercise 1 (Classifications of Operating Systems) 1. At any given moment, only a single program can be executed. What is the technical term for this operation mode? 2. What are half multi-user

More information

Operating system hardening

Operating system hardening Operating system Comp Sci 3600 Security Outline 1 2 3 4 5 6 What is OS? Hardening process that includes planning, ation, uration, update, and maintenance of the operating system and the key applications

More information

Role-Based Access Control (RBAC) Lab Minix Version

Role-Based Access Control (RBAC) Lab Minix Version Laboratory for Computer Security Education 1 Role-Based Access Control (RBAC) Lab Minix Version Copyright c 2006-2009 Wenliang Du, Syracuse University. The development of this document is funded by the

More information

CSE 565 Computer Security Fall 2018

CSE 565 Computer Security Fall 2018 CSE 565 Computer Security Fall 2018 Lecture 13: Operating System Security Department of Computer Science and Engineering University at Buffalo 1 Review Previous topics access control authentication session

More information

CST8207: GNU/Linux Operating Systems I Lab Six Linux File System Permissions. Linux File System Permissions (modes) - Part 1

CST8207: GNU/Linux Operating Systems I Lab Six Linux File System Permissions. Linux File System Permissions (modes) - Part 1 Student Name: Lab Section: Linux File System Permissions (modes) - Part 1 Due Date - Upload to Blackboard by 8:30am Monday March 12, 2012 Submit the completed lab to Blackboard following the Rules for

More information

3/7/18. Secure Coding. CYSE 411/AIT681 Secure Software Engineering. Race Conditions. Concurrency

3/7/18. Secure Coding. CYSE 411/AIT681 Secure Software Engineering. Race Conditions. Concurrency Secure Coding CYSE 411/AIT681 Secure Software Engineering Topic #13. Secure Coding: Race Conditions Instructor: Dr. Kun Sun String management Pointer Subterfuge Dynamic memory management Integer security

More information

CSE 127: Computer Security. Security Concepts. Kirill Levchenko

CSE 127: Computer Security. Security Concepts. Kirill Levchenko CSE 127: Computer Security Security Concepts Kirill Levchenko October 3, 2014 Computer Security Protection of systems against an adversary Secrecy: Can t view protected information Integrity: Can t modify

More information

Course 144 Supplementary Materials. UNIX Fundamentals

Course 144 Supplementary Materials. UNIX Fundamentals Course 144 Supplementary Materials UNIX Fundamentals 1 Background to UNIX Command Fundamentals This appendix provides a overview of critical commands and concepts Prerequisite knowledge attendees should

More information

Filesystem Hierarchy and Permissions

Filesystem Hierarchy and Permissions and Linux Prepared by Steven Gordon on 19 April 2017 Common/Reports/linux-file-permissions.tex, r1417 1/15 Multiuser and Server Operating System Linux systems are commonly used as a multi-user system E.g.

More information

Operating systems fundamentals - B10

Operating systems fundamentals - B10 Operating systems fundamentals - B10 David Kendall Northumbria University David Kendall (Northumbria University) Operating systems fundamentals - B10 1 / 12 Introduction Basics of protection and security

More information

CST8207: GNU/Linux Operating Systems I Lab Seven Linux User and Group Management. Linux User and Group Management

CST8207: GNU/Linux Operating Systems I Lab Seven Linux User and Group Management. Linux User and Group Management Student Name: Lab Section: Linux User and Group Management 1 Due Date - Upload to Blackboard by 8:30am Monday April 2, 2012 Submit the completed lab to Blackboard following the Rules for submitting Online

More information

Case Studies in Access Control

Case Studies in Access Control Joint software development Mail 1 / 38 Situations Roles Permissions Why Enforce Access Controls? Unix Setup Windows ACL Setup Reviewer/Tester Access Medium-Size Group Basic Structure Version Control Systems

More information

bash startup files Linux/Unix files stty Todd Kelley CST8207 Todd Kelley 1

bash startup files Linux/Unix files stty Todd Kelley CST8207 Todd Kelley 1 bash startup files Linux/Unix files stty Todd Kelley kelleyt@algonquincollege.com CST8207 Todd Kelley 1 midterms (Feb 27 and April 10) bash startup files More Linux Files review stty 2 We customize our

More information

CIS Operating Systems File Systems Security. Professor Qiang Zeng Fall 2017

CIS Operating Systems File Systems Security. Professor Qiang Zeng Fall 2017 CIS 5512 - Operating Systems File Systems Security Professor Qiang Zeng Fall 2017 Previous class File and directory Hard link and soft link Mount Layered structure File system design Naïve: linked list

More information

This is Worksheet and Assignment 12. Disks, Partitions, and File Systems

This is Worksheet and Assignment 12. Disks, Partitions, and File Systems This is Worksheet and Assignment 12 This is a combined Worksheet and Assignment.. Quizzes and tests may refer to work done in this Worksheet and Assignment; save your answers. You will use a checking program

More information

User Management. René Serral-Gracià Xavier Martorell-Bofill 1. May 26, Universitat Politècnica de Catalunya (UPC)

User Management. René Serral-Gracià Xavier Martorell-Bofill 1. May 26, Universitat Politècnica de Catalunya (UPC) User Management René Serral-Gracià Xavier Martorell-Bofill 1 1 Universitat Politècnica de Catalunya (UPC) May 26, 2014 Lectures 1 System administration introduction 2 Operating System installation 3 User

More information

Protection Kevin Webb Swarthmore College April 19, 2018

Protection Kevin Webb Swarthmore College April 19, 2018 Protection Kevin Webb Swarthmore College April 19, 2018 xkcd #1200 Before you say anything, no, I know not to leave my computer sitting out logged in to all my accounts. I have it set up so after a few

More information

Security Enhanced Linux

Security Enhanced Linux Security Enhanced Linux Bengt Nolin beno9295@student.uu.se October 13, 2004 Abstract A very brief introduction to SELinux; what it is, what is does and a little about how it does it. 1 1 Background 1.1

More information

SELinux. Don Porter CSE 506

SELinux. Don Porter CSE 506 SELinux Don Porter CSE 506 MAC vs. DAC By default, Unix/Linux provides Discretionary Access Control The user (subject) has discretion to set security policies (or not) Example: I may chmod o+a the file

More information

Case Study: Access Control. Steven M. Bellovin October 4,

Case Study: Access Control. Steven M. Bellovin October 4, Case Study: Access Control Steven M. Bellovin October 4, 2015 1 Case Studies in Access Control Joint software development Mail Steven M. Bellovin October 4, 2015 2 Situations Small team on a single machine

More information

Information System Audit Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000)

Information System Audit Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) Information System Audit Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) armahmood786@yahoo.com alphasecure@gmail.com alphapeeler.sf.net/pubkeys/pkey.htm http://alphapeeler.sourceforge.net pk.linkedin.com/in/armahmood

More information

CIS 5373 Systems Security

CIS 5373 Systems Security CIS 5373 Systems Security Topic 3.2: OS Security Access Control Endadul Hoque Slide Acknowledgment Contents are based on slides from Ninghui Li (Purdue), John Mitchell (Stanford), Bogdan Carbunar (FIU)

More information

User accounts and authorization

User accounts and authorization User accounts and authorization Authentication vs authorization Authentication: proving the identity of someone Authorization: allowing a user to access certain resources 1 Government authorization documents

More information

5/20/2007. Touring Essential Programs

5/20/2007. Touring Essential Programs Touring Essential Programs Employing fundamental utilities. Managing input and output. Using special characters in the command-line. Managing user environment. Surveying elements of a functioning system.

More information

CST8207: GNU/Linux Operating Systems I Lab Seven Linux User and Group Management. Linux User and Group Management

CST8207: GNU/Linux Operating Systems I Lab Seven Linux User and Group Management. Linux User and Group Management Student Name: YOUR NAME Lab Section: 011 012 013 or 014 Linux User and Group Management 1 Due Date - Upload to Blackboard by 8:30am Monday April 2, 2012 Submit the completed lab to Blackboard following

More information

CENG 334 Computer Networks. Laboratory I Linux Tutorial

CENG 334 Computer Networks. Laboratory I Linux Tutorial CENG 334 Computer Networks Laboratory I Linux Tutorial Contents 1. Logging In and Starting Session 2. Using Commands 1. Basic Commands 2. Working With Files and Directories 3. Permission Bits 3. Introduction

More information

Filesystem Hierarchy and Permissions

Filesystem Hierarchy and Permissions 2 and Prepared by Steven Gordon on 19 April 2017 Common/Reports/linux-file-permissions.tex, r1417 1 Multiuser and Server Operating System systems are commonly used as a multi-user system E.g. multiple

More information

Capabilities. Linux Capabilities and Namespaces. Outline. Michael Kerrisk, man7.org c 2018 March 2018

Capabilities. Linux Capabilities and Namespaces. Outline. Michael Kerrisk, man7.org c 2018 March 2018 Linux Capabilities and Namespaces Capabilities Michael Kerrisk, man7.org c 2018 mtk@man7.org March 2018 Outline 4 Capabilities 4-1 4.1 Overview 4-3 4.2 Process and file capabilities 4-8 4.3 Shell commands

More information

Some Ubuntu Practice...

Some Ubuntu Practice... Some Ubuntu Practice... SANOG 10 August 29 New Delhi, India 1. Get used to using sudo 2. Create an inst account 3. Learn how to install software 4. Install gcc and make 5. Learn how to control services

More information

Hardware. Ahmet Burak Can Hacettepe University. Operating system. Applications programs. Users

Hardware. Ahmet Burak Can Hacettepe University. Operating system. Applications programs. Users Operating System Security Ahmet Burak Can Hacettepe University abc@hacettepe.edu.tr Computer System Components Hardware Provides basic computing resources (CPU, memory, I/O devices). Operating system Controls

More information

Computer Security. 04r. Pre-exam 1 Concept Review. Paul Krzyzanowski. Rutgers University. Spring 2018

Computer Security. 04r. Pre-exam 1 Concept Review. Paul Krzyzanowski. Rutgers University. Spring 2018 Computer Security 04r. Pre-exam 1 Concept Review Paul Krzyzanowski Rutgers University Spring 2018 February 15, 2018 CS 419 2018 Paul Krzyzanowski 1 Key ideas from the past four lectures February 15, 2018

More information

CYSE 411/AIT681 Secure Software Engineering Topic #13. Secure Coding: Race Conditions

CYSE 411/AIT681 Secure Software Engineering Topic #13. Secure Coding: Race Conditions CYSE 411/AIT681 Secure Software Engineering Topic #13. Secure Coding: Race Conditions Instructor: Dr. Kun Sun 1 Secure Coding String management Pointer Subterfuge Dynamic memory management Integer security

More information

Operating System Security

Operating System Security Operating System Security Ahmet Burak Can Hacettepe University abc@hacettepe.edu.tr 1 Computer System Components Hardware Provides basic computing resources (CPU, memory, I/O devices). Operating system

More information

Fall 2014:: CSE 506:: Section 2 (PhD) Securing Linux. Hyungjoon Koo and Anke Li

Fall 2014:: CSE 506:: Section 2 (PhD) Securing Linux. Hyungjoon Koo and Anke Li Securing Linux Hyungjoon Koo and Anke Li Outline Overview Background: necessity & brief history Core concepts LSM (Linux Security Module) Requirements Design SELinux Key elements Security context: identity

More information

Secure Architecture Principles

Secure Architecture Principles Computer Security Course. Secure Architecture Principles Slides credit: Dan Boneh What Happens if you can t drop privilege? In what example scenarios does this happen? A service loop E.g., ssh Solution?

More information

Everything about Linux User- and Filemanagement

Everything about Linux User- and Filemanagement Everything about Linux User- and Filemanagement Lukas Prokop 20. April 2009 Inhaltsverzeichnis 1 Who I am 2 1.1 whoami..................................... 3 1.2 passwd......................................

More information

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester

Linux Essentials. Programming and Data Structures Lab M Tech CS First Year, First Semester Linux Essentials Programming and Data Structures Lab M Tech CS First Year, First Semester Adapted from PDS Lab 2014 and 2015 Login, Logout, Password $ ssh mtc16xx@192.168.---.--- $ ssh X mtc16xx@192.168.---.---

More information

Computer Security Operating System Security & Access Control. Dr Chris Willcocks

Computer Security Operating System Security & Access Control. Dr Chris Willcocks Computer Security Operating System Security & Access Control Dr Chris Willcocks Lecture Content Access Control ACMs ACLs Introduction to *NIX security - we ll cover this more due to server popularity -

More information

Practical Techniques to Obviate Setuid-to-Root Binaries

Practical Techniques to Obviate Setuid-to-Root Binaries Operating Systems, Security, Concurrency and Architecture Research Practical Techniques to Obviate Setuid-to-Root Binaries Bhushan Jain, Chia-Che Tsai, Jitin John, Donald Porter OSCAR Lab Computer Science

More information

Lab 2A> ADDING USERS in Linux

Lab 2A> ADDING USERS in Linux Lab 2A> ADDING USERS in Linux Objective In this lab, student will learn how to create user accounts using the Linux operating system. Scenario The XYZ Company has just installed a server running Linux.

More information

Keys and Passwords. Steven M. Bellovin October 17,

Keys and Passwords. Steven M. Bellovin October 17, Keys and Passwords Steven M. Bellovin October 17, 2010 1 Handling Long-Term Keys Where do cryptographic keys come from? How should they be handled? What are the risks? As always, there are tradeoffs Steven

More information

Cray Security Administration: Tricks of the Trade T3D128 YMP8E. Bonnie Hall Senior System Specialist Exxon Upstream Technical Computing

Cray Security Administration: Tricks of the Trade T3D128 YMP8E. Bonnie Hall Senior System Specialist Exxon Upstream Technical Computing Cray Security Administration: Tricks of the Trade YMP8E T3D128 Bonnie Hall Senior System Specialist Exxon Upstream Technical Computing Overview General discussion of controls What are they? Why do I need

More information

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one]

This lab exercise is to be submitted at the end of the lab session! passwd [That is the command to change your current password to a new one] Data and Computer Security (CMPD414) Lab II Topics: secure login, moving into HOME-directory, navigation on Unix, basic commands for vi, Message Digest This lab exercise is to be submitted at the end of

More information

CSE 303 Lecture 4. users/groups; permissions; intro to shell scripting. read Linux Pocket Guide pp , 25-27, 61-65, , 176

CSE 303 Lecture 4. users/groups; permissions; intro to shell scripting. read Linux Pocket Guide pp , 25-27, 61-65, , 176 CSE 303 Lecture 4 users/groups; permissions; intro to shell scripting read Linux Pocket Guide pp. 19-20, 25-27, 61-65, 118-119, 176 slides created by Marty Stepp http://www.cs.washington.edu/303/ 1 Lecture

More information

Advanced Systems Security: Ordinary Operating Systems

Advanced Systems Security: Ordinary Operating Systems Systems and Internet Infrastructure Security Network and Security Research Center Department of Computer Science and Engineering Pennsylvania State University, University Park PA Advanced Systems Security:

More information

Module 4: Access Control

Module 4: Access Control Module 4: Access Control Dr. Natarajan Meghanathan Associate Professor of Computer Science Jackson State University, Jackson, MS 39232 E-mail: natarajan.meghanathan@jsums.edu Access Control In general,

More information

Protection. CSE473 - Spring Professor Jaeger. CSE473 Operating Systems - Spring Professor Jaeger

Protection. CSE473 - Spring Professor Jaeger.   CSE473 Operating Systems - Spring Professor Jaeger Protection CSE473 - Spring 2008 Professor Jaeger www.cse.psu.edu/~tjaeger/cse473-s08/ Protection Protect yourself from untrustworthy users in a common space They may try to access your resources Or modify

More information

Securing Unix Filesystems - When Good Permissions Go Bad

Securing Unix Filesystems - When Good Permissions Go Bad Securing Unix Filesystems - When Good Permissions Go Bad Introduction Unix has a very elegant and flexible permission system at the heart of its filesystem security. These permissions allow and/or disallow

More information

Basic File Attributes

Basic File Attributes Basic File Attributes The UNIX file system allows the user to access other files not belonging to them and without infringing on security. A file has a number of attributes (properties) that are stored

More information

Basic Linux Security. Roman Bohuk University of Virginia

Basic Linux Security. Roman Bohuk University of Virginia Basic Linux Security Roman Bohuk University of Virginia What is Linux? An open source operating system Project started by Linus Torvalds kernel Kernel: core program that controls everything else (controls

More information

INSE 6130 Operating System Security. Overview of Design Principles

INSE 6130 Operating System Security. Overview of Design Principles INSE 6130 Operating System Security Design Principles Prof. Lingyu Wang 1 Overview of Design Principles Design principles Time-proven guidelines For implementing security mechanisms/systems Rooted in simplicity

More information

User Commands chmod ( 1 )

User Commands chmod ( 1 ) NAME chmod change the permissions mode of a file SYNOPSIS chmod [-fr] absolute-mode file... chmod [-fr] symbolic-mode-list file... DESCRIPTION The chmod utility changes or assigns the mode of a file. The

More information

TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control

TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control TEL2821/IS2150: INTRODUCTION TO SECURITY Lab: Operating Systems and Access Control Version 1.0, Last Edited 09/20/2005 Name of Students: Date of Experiment: Part I: Objective The objective of the exercises

More information

Files and Directories

Files and Directories CSCI 2132: Software Development Files and Directories Norbert Zeh Faculty of Computer Science Dalhousie University Winter 2019 Files and Directories Much of the operation of Unix and programs running on

More information

General Access Control Model for DAC

General Access Control Model for DAC General Access Control Model for DAC Also includes a set of rules to modify access control matrix Owner access right Control access right The concept of a copy flag (*) Access control system commands General

More information

UNIX File Hierarchy: Structure and Commands

UNIX File Hierarchy: Structure and Commands UNIX File Hierarchy: Structure and Commands The UNIX operating system organizes files into a tree structure with a root named by the character /. An example of the directory tree is shown below. / bin

More information

Users, Groups and Permission in Linux

Users, Groups and Permission in Linux Users, Groups and Permission in Linux A small company is using Linux as the main operating and has hired you as a consultant. You completed a site walk through and also met with various individuals for

More information

Linux Kung Fu. Stephen James UBNetDef, Spring 2017

Linux Kung Fu. Stephen James UBNetDef, Spring 2017 Linux Kung Fu Stephen James UBNetDef, Spring 2017 Introduction What is Linux? What is the difference between a client and a server? What is Linux? Linux generally refers to a group of Unix-like free and

More information

CSE 390a Lecture 3. Multi-user systems; remote login; editors; users/groups; permissions

CSE 390a Lecture 3. Multi-user systems; remote login; editors; users/groups; permissions CSE 390a Lecture 3 Multi-user systems; remote login; editors; users/groups; permissions slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson http://www.cs.washington.edu/390a/ 1

More information

Linux & Shell Programming 2014

Linux & Shell Programming 2014 Unit -1: Introduction to UNIX/LINUX Operating System Practical Practice Questions: Find errors (if any) otherwise write output or interpretation of following commands. (Consider default shell is bash shell.)

More information

CSE 390a Lecture 4. Persistent shell settings; users/groups; permissions

CSE 390a Lecture 4. Persistent shell settings; users/groups; permissions CSE 390a Lecture 4 Persistent shell settings; users/groups; permissions slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson http://www.cs.washington.edu/390a/ 1 2 Lecture summary

More information

22-Sep CSCI 2132 Software Development Lecture 8: Shells, Processes, and Job Control. Faculty of Computer Science, Dalhousie University

22-Sep CSCI 2132 Software Development Lecture 8: Shells, Processes, and Job Control. Faculty of Computer Science, Dalhousie University Lecture 8 p.1 Faculty of Computer Science, Dalhousie University CSCI 2132 Software Development Lecture 8: Shells, Processes, and Job Control 22-Sep-2017 Location: Goldberg CS 127 Time: 14:35 15:25 Instructor:

More information

Permissions and Links

Permissions and Links Permissions and Links The root account Setuid and Setgid Permissions Setting Setuid and Setgid with chmod Directory Access Permissions Links o Two Types of Links o The ln command o Removing a link The

More information

CSE 390a Lecture 4. Persistent shell settings; users/groups; permissions

CSE 390a Lecture 4. Persistent shell settings; users/groups; permissions CSE 390a Lecture 4 Persistent shell settings; users/groups; permissions slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson http://www.cs.washington.edu/390a/ 1 2 Lecture summary

More information

We ve seen: Protection: ACLs, Capabilities, and More. Access control. Principle of Least Privilege. ? Resource. What makes it hard?

We ve seen: Protection: ACLs, Capabilities, and More. Access control. Principle of Least Privilege. ? Resource. What makes it hard? We ve seen: Protection: ACLs, Capabilities, and More Some cryptographic techniques Encryption, hashing, types of keys,... Some kinds of attacks Viruses, worms, DoS,... And a distributed authorization and

More information

bash Scripting Introduction COMP2101 Winter 2019

bash Scripting Introduction COMP2101 Winter 2019 bash Scripting Introduction COMP2101 Winter 2019 Command Lists A command list is a list of one or more commands on a single command line in bash Putting more than one command on a line requires placement

More information

cs642 /operating system security computer security adam everspaugh

cs642 /operating system security computer security adam everspaugh cs642 computer security /operating system security adam everspaugh ace@cs.wisc.edu principles Principles of Secure Designs Compartmentalization / Isolation / Least privilege Defense-in-depth / Use more

More information

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions Lanka Education and Research Network Linux Architecture, Linux File System, Linux Basic Commands 28 th November 2016 Dilum Samarasinhe () Overview History of Linux Linux Architecture Linux File System

More information

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm

Operating Systems. Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) alphapeeler.sf.net/pubkeys/pkey.htm Operating Systems Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000) armahmood786@yahoo.com alphasecure@gmail.com alphapeeler.sf.net/pubkeys/pkey.htm http://alphapeeler.sourceforge.net pk.linkedin.com/in/armahmood

More information

Outline. Operating System Security CS 239 Computer Security February 23, Introduction. Server Machines Vs. General Purpose Machines

Outline. Operating System Security CS 239 Computer Security February 23, Introduction. Server Machines Vs. General Purpose Machines Outline Operating System Security CS 239 Computer Security February 23, 2004 Introduction Memory protection Interprocess communications protection File protection Page 1 Page 2 Introduction Why Is OS Security

More information

CTEC1863/2018F Bonus Lab Page 1 of 5

CTEC1863/2018F Bonus Lab Page 1 of 5 CTEC1863/2018F Bonus Lab Page 1 of 5 Bonus Lab: OpenSUSE Linux Rescue In this lab, we will install an OpenSUSE virtual machine. However, both the non-root user and the root passwords are unknown. To fix

More information

CSCI 2132 Software Development. Lecture 5: File Permissions

CSCI 2132 Software Development. Lecture 5: File Permissions CSCI 2132 Software Development Lecture 5: File Permissions Instructor: Vlado Keselj Faculty of Computer Science Dalhousie University 14-Sep-2018 (5) CSCI 2132 1 Files and Directories Pathnames Previous

More information

Secure Architecture Principles

Secure Architecture Principles Secure Architecture Principles Isolation and Least Privilege Access Control Concepts Operating Systems Browser Isolation and Least Privilege Original slides were created by Prof. John Mitchel 1 Secure

More information