Chris PeBenito 17de1b
Chris PeBenito 0251df
policy_module(nessus,1.2.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type nessusd_t;
Chris PeBenito 17de1b
type nessusd_exec_t;
Chris PeBenito 17de1b
init_daemon_domain(nessusd_t,nessusd_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type nessusd_db_t;
Chris PeBenito 17de1b
files_type(nessusd_db_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type nessusd_etc_t;
Chris PeBenito 17de1b
files_config_file(nessusd_etc_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type nessusd_log_t;
Chris PeBenito 17de1b
logging_log_file(nessusd_log_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type nessusd_var_run_t;
Chris PeBenito 17de1b
files_pid_file(nessusd_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow nessusd_t self:capability net_raw;
Chris PeBenito 17de1b
dontaudit nessusd_t self:capability sys_tty_config;
Chris PeBenito 17de1b
allow nessusd_t self:process { setsched signal_perms };
Chris PeBenito 17de1b
allow nessusd_t self:fifo_file { getattr read write };
Chris PeBenito 17de1b
allow nessusd_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow nessusd_t self:udp_socket create_socket_perms;
Chris PeBenito 17de1b
allow nessusd_t self:rawip_socket create_socket_perms;
Chris PeBenito 17de1b
allow nessusd_t self:packet_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# Allow access to the nessusd authentication database
Chris PeBenito c0868a
manage_dirs_pattern(nessusd_t,nessusd_db_t,nessusd_db_t)
Chris PeBenito c0868a
manage_files_pattern(nessusd_t,nessusd_db_t,nessusd_db_t)
Chris PeBenito c0868a
manage_lnk_files_pattern(nessusd_t,nessusd_db_t,nessusd_db_t)
Chris PeBenito 17de1b
files_list_var_lib(nessusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow nessusd_t nessusd_etc_t:file { getattr read };
Chris PeBenito 17de1b
files_search_etc(nessusd_t)
Chris PeBenito 17de1b
Chris PeBenito c0868a
manage_files_pattern(nessusd_t,nessusd_log_t,nessusd_log_t)
Chris PeBenito 17de1b
logging_log_filetrans(nessusd_t,nessusd_log_t,{ file dir })
Chris PeBenito 17de1b
Chris PeBenito c0868a
manage_files_pattern(nessusd_t,nessusd_var_run_t,nessusd_var_run_t)
Chris PeBenito 17de1b
files_pid_filetrans(nessusd_t,nessusd_var_run_t,file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(nessusd_t)
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(nessusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# for nmap etc
Chris PeBenito 17de1b
corecmd_exec_bin(nessusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corenet_non_ipsec_sendrecv(nessusd_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_generic_if(nessusd_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_generic_if(nessusd_t)
Chris PeBenito 17de1b
corenet_raw_sendrecv_generic_if(nessusd_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_nodes(nessusd_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_nodes(nessusd_t)
Chris PeBenito 17de1b
corenet_raw_sendrecv_all_nodes(nessusd_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(nessusd_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(nessusd_t)
Chris PeBenito 17de1b
corenet_tcp_bind_all_nodes(nessusd_t)
Chris PeBenito 17de1b
corenet_tcp_bind_nessus_port(nessusd_t)
Chris PeBenito 17de1b
corenet_tcp_connect_all_ports(nessusd_t)
Chris PeBenito 17de1b
corenet_sendrecv_all_client_packets(nessusd_t)
Chris PeBenito 17de1b
corenet_sendrecv_nessus_server_packets(nessusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(nessusd_t)
Chris PeBenito 17de1b
dev_read_urand(nessusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(nessusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(nessusd_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(nessusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(nessusd_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(nessusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
libs_use_ld_so(nessusd_t)
Chris PeBenito 17de1b
libs_use_shared_libs(nessusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(nessusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(nessusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_read_config(nessusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(nessusd_t)
Chris PeBenito 17de1b
userdom_dontaudit_search_sysadm_home_dirs(nessusd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
ifdef(`targeted_policy',`
Chris PeBenito 17de1b
	term_dontaudit_use_unallocated_ttys(nessusd_t)
Chris PeBenito 17de1b
	term_dontaudit_use_generic_ptys(nessusd_t)
Chris PeBenito 17de1b
	files_dontaudit_read_root_files(nessusd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	nis_use_ypbind(nessusd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(nessusd_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(nessusd_t)
Chris PeBenito 17de1b
')