Wikipedia
ModSecurity supplies an array of request filtering and other security features to the Apache HTTP Server, IIS and NGINX. ModSecurity is a web application layer firewall. It is a free software released under the Apache license 2.0.
ModSecurity is one of the Apache server modules that provides website protection by defending from hackers and other malicious attacks. It is a set of rules with regular expressions that helps to instantly ex-filtrate the commonly known exploits. Modsecurity obstructs the processing of invalid data (code injection attacks) to reinforce and nourish server's security.
To detect threats, the ModSecurity engine scans all the requests and relative responses which come to the web server and which are sent from the server respectively, as per its set of rules. If the check gets succeeded, the HTTP request is passed to the website content but if it fails, then it blocks the request and performs following actions-
- Security monitoring and access control
- Virtual patching
- Full HTTP traffic logging
- Security assessment
- Web application hardening
- Passive security assessment
- Simple request or Regular expression based Filtering
- URL Encoding Validation
- Auditing
- IP Reputation
- Null byte attack prevention
- Server identity masking
- Uploads memory limits
- etc.