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