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