Wednesday, January 8, 2014

SEED Lab - Set-UID Privileged Program

Background

  • UID: the ID for each user.
  • effective UID: the ID assigned to program. Determine what a process can do and what it cannot
  • Set-UID Program: this kind of program has a unique bit set in the file attribute. When this program is executed, it will be granted UID. E.g. "passwd" has two IDs: eUID = 0, and real ID = 5000 (user's ID). However, For "ls", the eUID = 5000 and real ID = 5000. (ls is not set-UID program)
  • How to make a program Set-UID:
    chmod 4777 /folder name (4 will enable set-UID)
  • How to change the linux