############ Main package "base" ################## Name: ossim-base Version: 1.3.9 Release: 2 Summary: BASE - Basic Analysis and Security Engine Group: Applications/Internet Vendor: SecureIdeas License: GPLv2 URL: http://secureideas.sourceforge.net/ Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Patch0: base.1.3.9.diff BuildArch: noarch Requires: php >= 4.0.4, php-pear >= 1.5.3, php-pear-Image-Color >= 1.0.2 Requires: php-pear-Image-Canvas >= 0.3.1 , php-pear-Image-Graph >= 0.7.2 Requires: php-pear-Numbers-Roman >= 1.0.2, httpd Requires(post): policycoreutils Requires(postun): policycoreutils Provides: base-ossim %description BASE is the Basic Analysis and Security Engine. It is based on the code from the Analysis Console for Intrusion Databases (ACID) project. This application provides a web front-end to query and analyze the alerts coming from a SNORT IDS system. BASE is a web interface to perform analysis of intrusions that SNORT has detected on your network. It uses a user authentication and role-based system, so that you as the security admin can decide which and how much information each user can see. It also has a simple to use, web-based setup program for people who feel not comfortable with editing files directly. BASE is supported by a group of volunteers. They are available to answer any questions you may have or help you out in setting up your system. They are also skilled in intrusion detection systems and make use of that knowledge in the development of BASE. You can contact them through the website http://secureideas.sourceforge.net/ or by emailing them at base@secureideas.net ########### sub package "base-contrib" ############# %package contrib Summary: BASE contrib: Additional perl scripts for importing snort unified log files Group: Applications/Internet License: GPLv2 BuildArch: noarch %description contrib This perl module makes the handling of snort unified log files (version 1) easy. It can reads snort unified log files and different output possibilities: - csv file - syslog - xml file - mysql database %prep %setup -q # Looks like this might have been applied to the tar file already -Scott #%patch0 -p1 %define _php_files_target_dir usr/share/base-%{version} %define _perl_files_target_dir %{_php_files_target_dir} %define _base_conf_header0 "Alias /base \\"/%{_php_files_target_dir}\\"" %define _base_conf_header1 "Alias /base-%{version} \\"/%{_php_files_target_dir}\\"" %define _base_conf_header2 "" %build # Keep it empty as it is %install %__rm -rf %{buildroot} # At first, establish all the directories %__mkdir_p -m 0755 %{buildroot}/%{_php_files_target_dir} %__mkdir_p -m 0755 %{buildroot}/%{_perl_files_target_dir} %__mkdir_p -m 0755 %{buildroot}/%{_sysconfdir}/httpd/conf.d/%{name}.conf %__mkdir_p -m 0755 %{buildroot}%{_docdir}/%{name}-%{version} %__mkdir_p -m 0755 %{buildroot}%{_docdir}/%{name}-%{version}/contrib # Install the sub directories INCLUDING the files inside %__cp -dpR admin %{buildroot}/%{_php_files_target_dir}/ %__cp -dpR contrib %{buildroot}/%{_php_files_target_dir}/ %__cp -dpR help %{buildroot}/%{_php_files_target_dir}/ %__cp -dpR images %{buildroot}/%{_php_files_target_dir}/ %__cp -dpR includes %{buildroot}/%{_php_files_target_dir}/ %__cp -dpR languages %{buildroot}/%{_php_files_target_dir}/ %__cp -dpR scripts %{buildroot}/%{_php_files_target_dir}/ %__cp -dpR setup %{buildroot}/%{_php_files_target_dir}/ %__cp -dpR sql %{buildroot}/%{_php_files_target_dir}/ %__cp -dpR styles %{buildroot}/%{_php_files_target_dir}/ # Install the files in the top level directory %__install -m 0644 index.php %{buildroot}/%{_php_files_target_dir}/ %__install -m 0644 base* %{buildroot}/%{_php_files_target_dir}/ # The docs go to a doc-specific location # And this particular document HAS TO be enclosed by quotation marks # because of the multibyte inside. install -m 0644 "docs/contrib/Snort, Apache, MYSQL, PHP, and BASE instalacioĢn en Slackware.pdf" %{buildroot}%{_docdir}/%{name}-%{version}/contrib/ cp -dpR docs/* %{buildroot}%{_docdir}/%{name}-%{version}/ # and the base.conf for apache still has to be generated #if test -r %{buildroot}/etc/httpd/conf.d/base.conf; then if test -r %{buildroot}/%{_sysconfdir}/httpd/conf.d/%{name}.conf; then #%__mv -u %{buildroot}/etc/httpd/conf.d/base.conf %{buildroot}/etc/httpd/conf.d/base.conf.rpmsave || : %__mv -u %{buildroot}/%{_sysconfdir}/httpd/conf.d/%{name}.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/%{name}.conf.rpmsave || : fi #echo %{_base_conf_header0} > %{buildroot}/etc/httpd/conf.d/base.conf echo %{_base_conf_header0} > %{buildroot}/%{_sysconfdir}/httpd/conf.d/%{name}.conf #echo %{_base_conf_header1} >> %{buildroot}/etc/httpd/conf.d/base.conf echo %{_base_conf_header1} >> %{buildroot}/%{_sysconfdir}/httpd/conf.d/%{name}.conf #echo %{_base_conf_header2} >> %{buildroot}/etc/httpd/conf.d/base.conf echo %{_base_conf_header2} >> %{buildroot}/%{_sysconfdir}/httpd/conf.d/%{name}.conf # Yes, enforcing SSL is commented out deliberately. It's just an # offer to the user. #cat >> %{buildroot}/etc/httpd/conf.d/base.conf << EOT cat >> %{buildroot}/%{_sysconfdir}/httpd/conf.d/%{name}.conf << EOT ##### What is allowed in .htaccess? ###### AllowOverride AuthConfig Limit ##### Which hosts are allowed to access BASE? ###### Order deny,allow Deny from all Allow from 127.0.0.1 ###### Enforce ssl by rewriting the URL: ######## # SSLOptions +FakeBasicAuth +StrictRequire # SSLVerifyClient optional # SSLVerifyDepth 1 # SSLRequire %{SSL_CIPHER_USEKEYSIZE} >= 128 # RewriteEngine on # RewriteCond %{SERVER_PORT} !^443$ # RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} EOT %post if [ $1 -gt 0 ]; then # http://fedoraproject.org/wiki/PackagingDrafts/SELinux?action=fullsearch&value=linkto%3A%22PackagingDrafts/SELinux%22&context=180 # file:///usr/local/doc/selinux/selinux_adding_to_a_package.html # Set SELinux file context in the policy # Apache must be allowed to read and execute the files. # Fall back to httpd_sys_content_t, if first command fails. %define SEMANAGE `which semanage` %define RESTORECON `which restorecon` if test -n "%{SEMANAGE}" -a -x "%{SEMANAGE}"; then if test -n "%{RESTORECON}" -a -x "%{RESTORECON}"; then %{SEMANAGE} fcontext --add -t httpd_user_content_t '/%{_php_files_target_dir}/.*' > /dev/null 2> /dev/null || semanage fcontext --add -t httpd_sys_content_t '/%{_php_files_target_dir}' > /dev/null 2> /dev/null || : # The top directory must be writable for base_conf.php. # Fall back to httpd_sys_content_t, if first command fails. %{SEMANAGE} fcontext --add -t httpd_user_content_rw_t '/%{_php_files_target_dir}' > /dev/null 2> /dev/null || semanage fcontext -f -d --add -t httpd_sys_content_t '/%{_php_files_target_dir}' > /dev/null 2> /dev/null || : # Actually change the context %{RESTORECON} -R '/%{_php_files_target_dir}' > /dev/null 2> /dev/null || : else echo "WARNING: semanage could be found, but restorecon could NOT be found. Omitting selinux related steps." fi else echo "WARNING: semanage could NOT be found. Omitting selinux related steps." echo "PATH = \"$PATH\"" echo "SEMANAGE = \"%SEMANAGE\"" fi # Make base.conf known to an already running apache only. rv=`/sbin/pidof httpd 2> /dev/null` if test $? -eq 0; then /sbin/service httpd reload > /dev/null 2>&1 || : fi fi %preun %__rm -f "/%{_php_files_target_dir}/base_conf.php" || : %postun %define SEMANAGE `which semanage` %define RESTORECON `which restorecon` if test -n "%{SEMANAGE}" -a -x "%{SEMANAGE}"; then if test -n "%{SEMANAGE}" -a -x "%{RESTORECON}"; then # Restore previous SELinux file context. %{SEMANAGE} fcontext --delete -t httpd_user_content_t '/%{_php_files_target_dir}/.*' > /dev/null 2> /dev/null || semanage fcontext --delete -t httpd_sys_content_t '/%{_php_files_target_dir}' > /dev/null 2> /dev/null || : %{SEMANAGE} fcontext --delete -t httpd_user_content_rw_t '/%{_php_files_target_dir}' > /dev/null 2> /dev/null || semanage fcontext -f -d --delete -t httpd_sys_content_t '/%{_php_files_target_dir}' > /dev/null 2> /dev/null || : # Actually change the context %{RESTORECON} -R '/%{_php_files_target_dir}' > /dev/null 2> /dev/null || : else echo "WARNING: semanage could be found, but restorecon could NOT be found. Omitting selinux related steps." fi else echo "WARNING: semanage could NOT be found. Omitting selinux related steps." fi rv=`/sbin/pidof httpd 2> /dev/null` if test $? -eq 0; then /sbin/service httpd reload > /dev/null 2>&1 || : fi %clean %__rm -rf %{buildroot} %files %defattr(0644,apache,apache) %dir %attr(0755,apache,apache) /%{_php_files_target_dir} %dir %attr(0755,apache,apache) /%{_php_files_target_dir}/admin %dir %attr(0755,apache,apache) /%{_php_files_target_dir}/contrib %dir %attr(0755,apache,apache) /%{_php_files_target_dir}/help %dir %attr(0755,apache,apache) /%{_php_files_target_dir}/images %dir %attr(0755,apache,apache) /%{_php_files_target_dir}/includes %dir %attr(0755,apache,apache) /%{_php_files_target_dir}/languages %dir %attr(0755,apache,apache) /%{_php_files_target_dir}/scripts %dir %attr(0755,apache,apache) /%{_php_files_target_dir}/setup %dir %attr(0755,apache,apache) /%{_php_files_target_dir}/sql %dir %attr(0755,apache,apache) /%{_php_files_target_dir}/styles %attr(0644,apache,apache) /%{_php_files_target_dir}/admin/base_roleadmin.php %attr(0644,apache,apache) /%{_php_files_target_dir}/admin/base_useradmin.php %attr(0644,apache,apache) /%{_php_files_target_dir}/admin/index.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_ag_common.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_ag_main.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_common.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_conf.php.dist %attr(0644,apache,apache) /%{_php_files_target_dir}/base_db_common.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_db_setup.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_denied.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_footer.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_graph_common.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_graph_display.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_graph_form.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_graph_main.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_hdr1.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_hdr2.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_logout.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_main.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_maintenance.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_payload.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_qry_alert.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_qry_common.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_qry_form.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_qry_main.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_qry_sqlcalls.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_stat_alerts.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_stat_class.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_stat_common.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_stat_ipaddr.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_stat_iplink.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_stat_ports.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_stat_sensor.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_stat_time.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_stat_uaddr.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_update_db.php %attr(0644,apache,apache) /%{_php_files_target_dir}/base_user.php %attr(0644,apache,apache) /%{_php_files_target_dir}/contrib/base-rss.php %attr(0644,apache,apache) /%{_php_files_target_dir}/contrib/custom_base_footer.php %attr(0644,apache,apache) /%{_php_files_target_dir}/help/base_app_faq.php %attr(0644,apache,apache) /%{_php_files_target_dir}/help/base_help.php %attr(0644,apache,apache) /%{_php_files_target_dir}/help/base_setup_help.php %attr(0644,apache,apache) /%{_php_files_target_dir}/images/button_delete.png %attr(0644,apache,apache) /%{_php_files_target_dir}/images/button_edit.png %attr(0644,apache,apache) /%{_php_files_target_dir}/images/button_exclamation.png %attr(0644,apache,apache) /%{_php_files_target_dir}/images/greencheck.gif %attr(0644,apache,apache) /%{_php_files_target_dir}/images/greencheck.png %attr(0644,apache,apache) /%{_php_files_target_dir}/images/redcheck.gif %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_action.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_auth.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_cache.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_capabilities.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_constants.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_db.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_include.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_log_error.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_log_timing.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_net.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_output_html.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_output_query.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_setup.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_signature.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_state_citems.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_state_common.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_state_criteria.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_state_query.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_template.php %attr(0644,apache,apache) /%{_php_files_target_dir}/includes/base_user.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/index.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/chinese.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/czech.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/danish.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/english.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/finnish.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/french.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/german.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/index.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/indonesian.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/italian.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/japanese.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/norwegian.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/polish.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/portuguese.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/portuguese-PT.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/russian.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/simplified_chinese.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/spanish.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/swedish.lang.php %attr(0644,apache,apache) /%{_php_files_target_dir}/languages/turkish.lang.php %attr(0755,apache,apache) /%{_php_files_target_dir}/scripts/base_maintenance.pl %attr(0644,apache,apache) /%{_php_files_target_dir}/setup/base_conf_contents.php %attr(0644,apache,apache) /%{_php_files_target_dir}/setup/index.php %attr(0644,apache,apache) /%{_php_files_target_dir}/setup/setup1.php %attr(0644,apache,apache) /%{_php_files_target_dir}/setup/setup2.php %attr(0644,apache,apache) /%{_php_files_target_dir}/setup/setup3.php %attr(0644,apache,apache) /%{_php_files_target_dir}/setup/setup4.php %attr(0644,apache,apache) /%{_php_files_target_dir}/setup/setup5.php %attr(0644,apache,apache) /%{_php_files_target_dir}/setup/setup_db.inc.php %attr(0644,apache,apache) /%{_php_files_target_dir}/sql/acid2base_tbls_mssql.sql %attr(0644,apache,apache) /%{_php_files_target_dir}/sql/acid2base_tbls_mysql.sql %attr(0644,apache,apache) /%{_php_files_target_dir}/sql/acid2base_tbls_pgsql.sql %attr(0644,apache,apache) /%{_php_files_target_dir}/sql/create_base_tbls_mssql_extra.sql %attr(0644,apache,apache) /%{_php_files_target_dir}/sql/create_base_tbls_mssql.sql %attr(0644,apache,apache) /%{_php_files_target_dir}/sql/create_base_tbls_mysql.sql %attr(0644,apache,apache) /%{_php_files_target_dir}/sql/create_base_tbls_oracle.sql %attr(0644,apache,apache) /%{_php_files_target_dir}/sql/create_base_tbls_pgsql_extra.sql %attr(0644,apache,apache) /%{_php_files_target_dir}/sql/create_base_tbls_pgsql.sql %attr(0644,apache,apache) /%{_php_files_target_dir}/sql/upgrade_0.9.x_to_1.0-mysql.sql %attr(0644,apache,apache) /%{_php_files_target_dir}/styles/acid_style.css %attr(0644,apache,apache) /%{_php_files_target_dir}/styles/base_black_style.css %attr(0644,apache,apache) /%{_php_files_target_dir}/styles/base_red_style.css %attr(0644,apache,apache) /%{_php_files_target_dir}/styles/base_style.css %attr(0644,apache,apache) /%{_php_files_target_dir}/styles/ossim_style.css %dir %attr(0755,root,root) %{_docdir}/%{name}-%{version}/ %dir %attr(0755,root,root) %{_docdir}/%{name}-%{version}/contrib %doc %attr(0644,root,root) "%{_docdir}/%{name}-%{version}/contrib/Snort, Apache, MYSQL, PHP, and BASE instalacioĢn en Slackware.pdf" %doc %attr(0644,root,root) %{_docdir}/%{name}-%{version}/base_faq.rtf %doc %attr(0644,root,root) %{_docdir}/%{name}-%{version}/CHANGELOG %doc %attr(0644,root,root) %{_docdir}/%{name}-%{version}/CREDITS %doc %attr(0644,root,root) %{_docdir}/%{name}-%{version}/GPL %doc %attr(0644,root,root) %{_docdir}/%{name}-%{version}/INSTALL %doc %attr(0644,root,root) %{_docdir}/%{name}-%{version}/INSTALL.rtf %doc %attr(0644,root,root) %{_docdir}/%{name}-%{version}/README %doc %attr(0644,root,root) %{_docdir}/%{name}-%{version}/README.mssql %doc %attr(0644,root,root) %{_docdir}/%{name}-%{version}/TODO %doc %attr(0644,root,root) %{_docdir}/%{name}-%{version}/UPGRADE %config(noreplace) %attr(0644,root,root) /%{_sysconfdir}/httpd/conf.d/%{name}.conf ################ filelist of subpackage "base-contrib" ############### %files contrib %dir %attr(0755,apache,apache) /%{_perl_files_target_dir}/contrib/SnortUnified %dir %attr(0755,apache,apache) /%{_perl_files_target_dir}/contrib/SnortUnified/SnortUnified %doc %attr(0644,apache,apache) /%{_perl_files_target_dir}/contrib/SnortUnified/LICENSE %attr(0755,apache,apache) /%{_perl_files_target_dir}/contrib/SnortUnified/pcaptodb.pl %attr(0644,apache,apache) /%{_perl_files_target_dir}/contrib/SnortUnified/SnortUnified/Database.pm %attr(0644,apache,apache) /%{_perl_files_target_dir}/contrib/SnortUnified/SnortUnified.pm %attr(0755,apache,apache) /%{_perl_files_target_dir}/contrib/SnortUnified/uf_csv.pl %attr(0755,apache,apache) /%{_perl_files_target_dir}/contrib/SnortUnified/ufdbtest.pl %attr(0755,apache,apache) /%{_perl_files_target_dir}/contrib/SnortUnified/uf_syslog.pl %attr(0755,apache,apache) /%{_perl_files_target_dir}/contrib/SnortUnified/uftester.pl %attr(0755,apache,apache) /%{_perl_files_target_dir}/contrib/SnortUnified/uf_xml.pl %changelog