Manage SELinux Security Flashcards

1
Q

What does SELinux stand for?

A

Security Enhanced Linux

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

What are SElinux three operator operational modes?

A

Enforcing, Permissive, and Disabled

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

What are SELinux policies?

A

Security rules that define how specific processes access relevant files, directories, and ports.

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

What do SELinux labels have?

A

User, role, type and security level.

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

What resource listing commands use the -Z option to manage SELinux contexts?

A

ps, ls, cp, mkdir

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

What command is used to view the current SELinux mode?

A

getenforce

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

What command is used to set the SELinux mode?

A

setenforce

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

What is used to configure SELinux persistently?

A

/etc/selinux/config

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

What command is used to manage the SELinux policy rules that determine the default context for files and directories?

A

semanage fcontext

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

What command is used to apply the context defined by the SELinux policy to files and directories?

A

restorecon

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

What command preserves the file attributes where possible?

A

cp -p

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

What command preservers only SELinux contexts, during copying?

A

cp –preserve=context

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

What commands are used to manage SELinux context on files?

A

semanage fcontext, restorecon, & chcon

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

What command changes the SELinux context directly on files, without referencing the system’s SELinux policy?

A

chcon

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

What command lists all the file context policy rules?

A

semanage fcontext -l

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

What are the semanage fcontext command options to add, remove, or list SELinux file context policies?

A

–add, –delete, –list

17
Q

What is the most common extended regular expression when viewing policies?

A

(/.*)?

18
Q

Where are service specific booleans are documented?

A

service_selinux man page

19
Q

What command lists available Booleans for the targeted policies on the system, and current Boolean status?

A

getsebool -a

20
Q

What command enables or diables the running state of these behaviors?

A

setsebool

21
Q

What option makes the setsebool command persistent by writing to the policy file?

A

-P

22
Q

What do you do when a common application or service fails, and the service is known to have a working SELinux policy?

A

First see the service’s _selinux man page to verify the correct context type label. Then view the affected process and file attributes to verify that the correct labels are set.

23
Q

Where is an Access Vector Cache (AVC) from a denied SELinux action stored?

A

/var/log/audit/audit.log

24
Q

After SELinux troubleshooting service monitors for AVC events where does it send an event summary?

A

/var/log/messages

25
Q

What command is used to view the comprehensive report details for a specific event by using the UUID from an AVC summary?

A

sealert -l UUID

26
Q

What command is used to view all existing events from the AVC summary?

A

sealert -a /var/log/audit/audit.log

27
Q
A