Lab #1

Topics: Computer, Personal computer, Computer program, Operating system, Computer software, Software engineering / Pages: 9 (2039 words) / Published: Jul 18th, 2011
Computer science department
Data security – Lab # 1

Lab Description
Set-UID is an important security mechanism in Unix operating systems. When a Set-UID program is run, it assumes the owner’s privileges. For example, if the program’s owner is root, then when anyone runs this program, the program gains the root’s privileges during its execution. Set-UID allows us to do many interesting things, but unfortunately, it is also the culprit of many bad things. Therefore, the objective of this lab is two-fold: • Appreciate its good side: understand why Set-UID is needed and how it is implemented. • Be aware of its bad side: understand its potential security problems.

Lab Tasks

This is an exploration lab. Your main task is to ”play” with the Set-UID mechanism in Linux, and write a lab report to describe your discoveries. You are required to accomplish the following tasks in Linux: 1) Figure out why “passwd”, “chsh”, and “su” commands need to be Set-UID programs. What will happen if they are not? If you are not familiar with these programs, you should first learn what they can do by reading their manuals.

2) Run Set-UID shell programs in Linux, and describe and explain your observations. • Login as root, copy /bin/zsh to /tmp, and make it a set-root-uid program with permission 4755. Then login as a normal user, and run /tmp/zsh. Will you get root privilege? Please describe your observation. If you cannot find /bin/zsh in your operating system, please use the following command to install it:

• Instead of copying /bin/zsh, this time, copy /bin/bash to /tmp, make it a set-root-uid program. Run /tmp/bash as a normal user. will you get root privilege? Please describe and explain your observation.

3) (Setup for the rest of the tasks) As you can find out from the previous task, /bin/bash has certain built-in protection that prevent the abuse of the Set-UID mechanism. To see the life before such a protection

You May Also Find These Documents Helpful

  • Lab 1 1
  • Lab 1
  • Lab 1
  • Lab 1
  • lab 1
  • Lab 1
  • lab 1
  • lab 1
  • Lab 1
  • lab 1