Chapter 7 Flashcards

0
Q

What does the unix security focuses on?

A

Focus on:

  • protecting users from each other.
  • protecting against attacks from the network.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

Who manages security in unix ?

A

Security managed by skilled administrator, not by user.

Example: command line tools and scripting.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the secure versions of unix indicate?

A

Support of multi-level security.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is principles called?

A

User identifiers (UID) and group identifiers (GID).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is UID/GID ?

A

A UID/GID is a 16-bit numbers. UID values differ from system to system. Root UID is always zero.
(Example, 0:root 1:bin 2:daemon…)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Where is information about principals stored?

A

User accounts and home directories.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Where is user accounts stored?

A

/etc/psswd file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the format of user account?

A

Username:password:UID:GID:name:homedir:shell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the user account details?

A

Username: up to eight characters long
Password: stored “encrypted”
User ID: user identifier for access control
Group ID: user’s primary group
ID string: user’s full name
Home directory
Login shell: program started after successful log in

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Define superuser.

A

The superuser is a special privileged principal with UID 0 and usually the user name root.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the restrictions on the superuser?

A

1) all security checks are turned off for superuser.
2) the superuser can become any other user.
3) the superuser can change the system clock.
4) superuser cannot write to a read-only file system but can remount it as writable.
5) superuser cannot decrypt passwords but can reset them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Where does every user belong to?

A

Primary group.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Where is the GID of the primary group is stored in?

A

/etc/passwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Where is the list of all groups stored? And what is the format of the entries stored?

A

/etc/group

Format: groupName:password:GID:listOfUsers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is collecting users in groups mainly convenient for?

A

Access control decisions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is subjects in unix? How can they be generated?

A

The subjects in unix are processes; a process has a process ID (PID). Processes have a real UID/GID and an effective UID/GID. New processes are generated with exec or fork.

16
Q

Define real UID/GID and effective UID/GID.

A

Real UID/GID: inherited from the parent; typically UID/GID of the user logged in.

Effective UID/GID: inherited from the parent process or from the file being executed.

17
Q

Where is passwords stored? How are they encrypted?

A

Passwords stored in /etc/passwd “encrypted” with the algorithm crypt(3).

18
Q

How does crypt(3) function?

A

Cryot(3) is a one-way function:

Slightly modified DES algorithm repeated 25 times with all-zero block as start value and the password as key.

19
Q

What is salting?

A

Password encrypted together with a 12-bit random “salt” that is stored in the clear.

20
Q

How do you disable a user account ?

A

To disable a user account, let the password field starts with an asterisk; applying the one-way function to a password can never result in an asterisk.

21
Q

What is shadow password files?

A

Passwords are not stored in /etc/passwd but in a shadow file that can only be accessed by root. This file can also be used for password aging and automatic account locking.

22
Q

What are the file entries of a shadow password file?

A
Username
User password
Days since password was changed
Days left before user may change password
Days left before user is forced to change password
Day to "change password" warning
Days left before password is disabled
Days since the account has been disabled
Reserved
23
Q

How are resources organized?

A

In a tree-structured file system.

24
Q

What does a file entry in a directory point to?

A

Inode.

25
Q

What are the fields in an inode?

A
Mode: type of file and access rights
UID: username of the owner
GID: owner group
Atime: access time
Mtime: modification time
Itime: inode alteration time
Block count: size of file
Physical location
26
Q

What fields does the directory listing include?

A

File type: first character
- file, d directory, b block device file, c character device file, s socket
File permission: next nine characters
Link counter: the number of links (directory entries pointing to the file)
Username: of the owner; usually the user that has created the file.
Group: depending on the version of unix, a newly created file belongs to its creator’s group or to its directory’s group.
File size: modification time, file name.
Time and date (mtime)
Name of the file.

27
Q

How is file permission is presented?

A

The file permission (permission bits) are grouped in three triples that define read(r), write(w), execute(x) access for owner, groups, and other respectively. A ‘-‘ indicates that a right is not granted.