Skip to content

Use cases

Bernardo Damele A. G. edited this page Apr 23, 2015 · 1 revision

Use cases

Unix-privesc-check support several use cases (--type switch):

--type	select from one of the following check types:
all
attack_surface
quick
sdl
test

Each --type causes unix-privesc-check to run one or more modules (also known as checks).

The scan types are simply directories under lib/checks/enabled:

$ ls -l lib/checks/enabled/
total 20
drwxr-xr-x 3 root root 4096 2012-10-18 19:47 all
drwxr-xr-x 3 root root 4096 2012-10-18 19:47 attack_surface
drwxr-xr-x 3 root root 4096 2012-10-18 19:47 quick
drwxr-xr-x 3 root root 4096 2012-10-18 19:47 sdl
drwxr-xr-x 3 root root 4096 2012-10-18 19:47 test

And the contents of each directory are the modules that will be run within that scan type (symlink files to the checks under lib/checks/). For example the scan type all is defined as follows:

$ ls -l lib/checks/enabled/all/
total 0
lrwxrwxrwx 1 root root 19 2012-10-18 19:47 binary_banned -> ../../binary_banned
lrwxrwxrwx 1 root root 30 2012-10-18 19:47 binary_change_privileges -> ../../binary_change_privileges
lrwxrwxrwx 1 root root 19 2012-10-18 19:47 binary_chroot -> ../../binary_chroot
lrwxrwxrwx 1 root root 23 2012-10-18 19:47 binary_dependency -> ../../binary_dependency
lrwxrwxrwx 1 root root 16 2012-10-18 19:47 binary_pie -> ../../binary_pie
lrwxrwxrwx 1 root root 18 2012-10-18 19:47 binary_rpath -> ../../binary_rpath
lrwxrwxrwx 1 root root 16 2012-10-18 19:47 binary_ssp -> ../../binary_ssp
[...]

To run a particular scan type, do like this:

$ ./upc.sh --type all

You can define your own scan types by creating a directory inside lib/checks/enabled and symlinking therein from lib/checks/ each module you want to be run when you type:

$ ./upc.sh --type 
Clone this wiki locally