1CAPTEST:(8)             System Administration Utilities            CAPTEST:(8)
2
3
4

NAME

6       captest - a program to demonstrate capabilities
7

SYNOPSIS

9       captest [ --drop-all | --drop-caps | --id ] [ --lock ] [ --text ]
10

DESCRIPTION

12       captest  is  a  program  that  demonstrates  and prints out the current
13       process capabilities. Each option prints the same report. It will  out‐
14       put  current  capabilities.  then  it  will  try  to access /etc/shadow
15       directly to show if that can be done. Then it creates a  child  process
16       that attempts to read /etc/shadow and outputs the results of that. Then
17       it outputs the capabilities that a child process would have.
18
19       You can also apply file system capabilities to this  program  to  study
20       how  they  work.  For example, filecap /usr/bin/captest chown. Then run
21       captest as a normal user. Another interesting test is to  make  captest
22       suid  root  so  that you can see what the interaction is between root's
23       credentials and capabilities. For example, chmod 4755 /usr/bin/captest.
24       When run as a normal user, the program will see if privilege escalation
25       is possible. But do not leave this app setuid root after  you  are  don
26       testing so that an attacker cannot take advantage of it.
27
28

OPTIONS

30       --drop-all
31              This drops all capabilities and clears the bounding set.
32
33       --drop-caps
34              This drops just traditional capabilities.
35
36       --id   This  changes  to uid and gid 99, drops supplemental groups, and
37              clears the bounding set.
38
39       --text This option outputs the effective capabilities  in  text  rather
40              than numerically.
41
42       --lock This  prevents  the ability for child processes to regain privi‐
43              leges if the uid is 0.
44
45

SEE ALSO

47       filecap(8), capabilities(7)
48
49

AUTHOR

51       Steve Grubb
52
53
54
55Red Hat                            June 2009                       CAPTEST:(8)
Impressum