Chris PeBenito 0fbfa5
#DESC Nessus network scanning daemon
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Author:  Russell Coker <russell@coker.com.au>
Chris PeBenito 0fbfa5
# X-Debian-Packages: nessus
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#################################
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Rules for the nessusd_t domain.
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# nessusd_exec_t is the type of the nessusd executable.
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
daemon_domain(nessusd)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
etc_domain(nessusd)
Chris PeBenito 0fbfa5
typealias nessusd_etc_t alias etc_nessusd_t;
Chris PeBenito 0fbfa5
type nessusd_db_t, file_type, sysadmfile;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
type nessus_port_t, port_type;
Chris PeBenito 0fbfa5
allow nessusd_t nessus_port_t:tcp_socket name_bind;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#tmp_domain(nessusd)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Use the network.
Chris PeBenito 0fbfa5
can_network(nessusd_t)
Chris PeBenito 0fbfa5
can_ypbind(nessusd_t)
Chris PeBenito 0fbfa5
allow nessusd_t self:unix_stream_socket create_socket_perms;
Chris PeBenito 0fbfa5
#allow nessusd_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# why ioctl on /dev/urandom?
Chris PeBenito 0fbfa5
allow nessusd_t random_device_t:chr_file { getattr read ioctl };
Chris PeBenito 0fbfa5
allow nessusd_t self:{ rawip_socket packet_socket } create_socket_perms;
Chris PeBenito 0fbfa5
allow nessusd_t self:capability net_raw;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# for nmap etc
Chris PeBenito 0fbfa5
allow nessusd_t { bin_t sbin_t }:dir search;
Chris PeBenito 0fbfa5
allow nessusd_t bin_t:lnk_file read;
Chris PeBenito 0fbfa5
can_exec(nessusd_t, bin_t)
Chris PeBenito 0fbfa5
allow nessusd_t self:fifo_file { getattr read write };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# allow user domains to connect to nessusd
Chris PeBenito 0fbfa5
can_tcp_connect(userdomain, nessusd_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow nessusd_t self:process setsched;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow nessusd_t proc_t:file { getattr read };
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Allow access to the nessusd authentication database
Chris PeBenito 0fbfa5
create_dir_file(nessusd_t, nessusd_db_t)
Chris PeBenito 0fbfa5
allow nessusd_t var_lib_t:dir r_dir_perms;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# read config files
Chris PeBenito 0fbfa5
allow nessusd_t { etc_t etc_runtime_t }:file r_file_perms;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
logdir_domain(nessusd)