A new user interface for you! Read more...

File dba-apache2-mod_security-crs-300.spec of Package dba-apache2-mod_security-crs-300

%define version	3.0.0
%define vers    300
%define real_name modsecurity-crs
%define prefix	/DBA/apache/modsecurity-crs/%{version}

Name:           dba-apache2-mod_security-crs-%{vers}
Summary:        OWASP ModSecurity Core Rule Set Project V3.0.0
Version:        %{version}
Release:        1
License:        GPL
Url:            https://www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project
Source0:        https://github.com/SpiderLabs/owasp-modsecurity-crs/archive/v%{version}.tar.gz
Source1:        mod_security-crs-rpmlintrc
Source2:        filter-requires-mod_security-crs.sh
Group:          Productivity/Networking/Web/Servers
BuildArch:	noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%if 0%{?suse_version} >= 1110
BuildRequires:  -post-build-checks
%endif

# Requires:	perl(Acme::Comment) perl(Data::Types) perl(Data::Validate::URI) perl(XML::Smart)

%define _use_internal_dependency_generator 0
%define __find_requires %{SOURCE2}


%description
ModSecurity. is a web application firewall engine that provides very little protection on its own. In order to become useful, ModSecurity. must be configured with rules. In order to enable users to take full advantage of ModSecurity. out of the box, Trustwave's SpiderLabs is providing a free certified rule set for ModSecurity. 2.x. Unlike intrusion detection and prevention systems, which rely on signatures specific to known vulnerabilities, the Core Rules provide generic protection from unknown vulnerabilities often found in web applications, which are in most cases custom coded. The Core Rules are heavily commented to allow it to be used as a step-by-step deployment guide for ModSecurity..

Core Rules Content

In order to provide generic web applications protection, the Core Rules use the following techniques:

    HTTP Protection - detecting violations of the HTTP protocol and a locally defined usage policy.
    Real-time Blacklist Lookups - utilizes 3rd Party IP Reputation
    Web-based Malware Detection - identifies malicious web content by check against the Google Safe Browsing API.
    HTTP Denial of Service Protections - defense against HTTP Flooding and Slow HTTP DoS Attacks.
    Common Web Attacks Protection - detecting common web application security attack.
    Automation Detection - Detecting bots, crawlers, scanners and other surface malicious activity.
    Integration with AV Scanning for File Uploads - detects malicious files uploaded through the web application.
    Tracking Sensitive Data - Tracks Credit Card usage and blocks leakages.
    Trojan Protection - Detecting access to Trojans horses.
    Identification of Application Defects - alerts on application misconfigurations.
    Error Detection and Hiding - Disguising error messages sent by the server. 


%prep
%setup -q -n owasp-modsecurity-crs-%{version}

%{__chmod} +x %{SOURCE2}


%build


%install
%{__mkdir_p} %{buildroot}%{prefix}

# Fix dependency on /opt/local/bin/perl
%{__perl} -pi.orig -e 's|/opt/local/bin/perl|/usr/bin/perl|g' util/*.pl
%{__perl} -pi.orig -e 's|/opt/local/bin/perl|/usr/bin/perl|g' util/*/*.pl
find . -type f -name "*.orig" -exec rm -f {} \;

%{__chmod} 0644 util/av-scanning/runAV/*.c util/av-scanning/runAV/*.h

%{__cp} -av documentation id_renumbering rules util crs-setup.conf.example %{buildroot}%{prefix}/


%post
cd %{prefix}/..
%{__ln_s} -f %{version} latest


%clean
%{__rm} -rf %{buildroot};


%files
%defattr(-,root,root,-)
%doc CHANGES IDNUMBERING INSTALL KNOWN_BUGS LICENSE README.md
%dir %{prefix}
%{prefix}/*


%changelog
* Thu Dec  1 2016 Holger Manthey <holger.manthey@bertelsmann.de>
- initial build