Open Source WAF: The Best Web Application Firewall Solutions
The Internet is comparable to the Wild West. When a website goes live, it is immediately inundated with negativity from all angles. The vast majority of this traffic consists of bots (from robots, and automated programs that trawl the internet for vulnerable websites), which do not adhere to speed constraints.
When vulnerabilities are exploited by bots, this can lead to a website being defaced, data being stolen (usernames and passwords, sensitive private information, etc.), or even becoming a zombie bot among other zombie bots that go on to infect other vulnerable websites.
Botnets, with the computing power and internet bandwidth held captive by them, are eventually rented out to the highest bidder on the black market. There, vulnerabilities may inflict a variety of very real-world harms.
If you own an internet business, you must prevent hackers from destroying your website. If your website becomes infected with hacker code, search engines will not link to it. Protect your organization with a firewall for web applications.
So, on top of the regular security best practices to prevent bad things from happening, occasionally a WAF is implemented as a first line of protection.
A web application firewall (WAF) is a form of application firewall that provides visibility and analysis of HTTP(S) traffic to and from an online application. Its purpose is to thwart attacks designed to refuse service and steal data. It grants the administrator direct control over the requests and replies flowing through the system without requiring modification of the backend code. A WAF differs from a conventional firewall in that it protects a particular online application or group of web apps. And it does so without interacting with online apps.
There are several free WAFs to protect your web applications. The most delicate aspect of open-source WAF is the ability to customize the code based on your projects.
Through this article, the pros and cons of using open source WAF solutions, the best open source WAF solutions, must-have WAF solution features, and security concerns with open source WAF solutions will all be covered.
Figure 1. What is a Web Application Firewall (WAF)?
What are the Best Open Source WAFs?
The following open-source Web Application Firewall might be helpful if you are seeking a free alternative to commercial WAF to safeguard your website. Top Free and Open-source WAFs are as follows.
- NAXSI
- WebKnight
- Shadow Daemon
- Coraza
- OctopusWAF
- IronBee
- ModSecurity
- SafeLine
1. NAXSI
NAXSI is an acronym for Nginx Anti XSS and SQL Injection. Technically, it is a third-party Nginx module that is bundled with several UNIX-like systems. By default, this module reads a limited selection of basic (and understandable) rules encompassing 99 percent of known patterns associated with website vulnerabilities.
Naxsi has a basic ruleset and is expandable with user-defined rulesets. The configuration occurs in the context of Nginx. The WAF is adaptable to various contexts and web applications by virtue of scores for individual rules and configurable thresholds for blocking operations.
Naxsi may examine many data, including URLs, request parameters, cookies, headers, and the POST body, and it can be enabled or disabled at the location level in the Nginx configuration. Automatic whitelist generation simplifies upstream firewall deployment and eliminates any false positives. Other applications, such as NX-Utils and Doxi, simplify administration, report production, and ruleset modifications.
NX-utils, which are included with Naxsi, are highly useful for producing whitelists and reports. First, the NX-utils collection consists of intercept mode, which enables Naxsi to record requests stopped by the WAF for future reports and whitelists in a database, and report mode, which visualizes the saved events. A future version of NX-Utils will enable enhanced report processing and filtering in order to evaluate WAF events with greater precision.
NAXSI supports popular reliable server platforms, like NetBSD, FreeBSD, OpenBSD, Debian, and Ubuntu. You can easily utilize a WAF on OPNsense using NAXSI, which is a loadable module for the NGINX web server plugin. NAXSI has two sorts of rules.
-
Main Rules: These rules apply internationally. Blocking code snippets that might be exploited to obtain unauthorized access to the server (such as SQL-/XPATH-injection for data access) or to take control of a foreign client (for example XSS).
-
Basic Rules: These rules are typically used in places to whitelist primary rules by ID or for supplementary rules.
NAXSI, unlike the majority of Web Application Firewalls, does not rely on a signature database like an antivirus, and so cannot be bypassed by an "unknown" attack method. Naxsi means free software (as in freedom) and free to use.
NAXSI works as a DROP-by-default firewall. NAXSI only filters GET and PUT requests, and its default setup acts as a DROP-by-default firewall, thus you must add the ACCEPT rule for it to function properly.
What are the features of NAXSI?
The primary features of NAXSI are listed below.
- Minimum memory footprint and processing time
- Resistance against assaults with hazardous characteristics and expressions that are unknown.
- Easy to administer compared to other WAFs
- Effective learning procedure
NAXSI is best for choosing a WAF that's compatible with NGINX, in light of ModSecurity's EoL.
Figure 2. NAXSI
2. WebKnight
Given the rise in online dangers, protecting a web application is always a challenge. You should investigate every option for protecting your website from hackers. If you wish to secure an IIS-hosted website, you should consider using WebKnight WAF.
AQTRONiX's WebKnight is an open-source web application firewall for IIS web servers. It prevents harmful requests from reaching the IIS by scanning all requests.
All blocked requests are logged by default, and you may modify this to suit your needs. WebKnight 3.0 has an admin web interface for configuring rules and doing administrative chores, including statistics.
What are the features of WebKnight?
Some of the prominent features of WebKnight are given below.
-
Interface for administration - handy for managing WebKnight and statistics
-
Logging - log requests that are blocked or handled by WebKnight
-
Use with WebDAV, Cold Fusion, OWA, Share Point, etc
-
Using brute force against defenses
-
Block IP that is handy for blocking incoming requests from known malicious IP addresses
-
Hotlinking security
-
Robots obstructing
-
Examine both GET and POST payloads
-
Run-time update - there is no need to restart IIS while updating WebKnight
-
SSL session encryption
-
SQLi, XSS, CSRF, and data loss prevention(DLP)
WebKnight is best for protection against SQL injection, directory traversal, character encoding, and buffer overflow.
Figure 3. WebKnight
What are the benefits of WebKnight?
Let's take a look at what benefits it has in addition to the features listed above. Here are some of the benefits of WebKnight.
-
Protects your web application from threats and also stops malicious robots.
-
Provides information about the ongoing attacks and increases the blue team's visibility.
-
Achieve PCI DSS compliance requirements.
-
Open source (GNU GPL) with just support fees.
3. Shadow Daemon
Shadow Daemon is a suite of tools designed to identify, record, and prevent web application attacks. The Shadow Daemon is technically a web application firewall that intercepts requests and removes harmful parameters. It is a modular solution that isolates online applications, analyses, and interfaces in order to boost security, flexibility, and scalability.
Shadow Daemon is a free application. It is offered under the GPLv2 license, meaning the source code can be studied, updated, and distributed by anybody.
The Shadow Daemon is simple to install and maintain using a well-organized web interface that enables in-depth analysis of threats.
The interface includes shell scripts for sending weekly reports via email, rotating logs, and similar tasks.
The Shadow Daemon can identify common attacks such as:
-
SQL injections
-
XML injections
-
Code injections
-
Command injections
-
Cross-site scripting
-
Local/remote file inclusions
-
Backdoor access
Shadow Daemon is supported by in-depth documentation and a vibrant community. This is an easy-to-use and manageable open-source firewall for web applications.
The Shadow Daemon, unlike many other web application firewalls, does not entirely block malicious requests whenever feasible. Instead, it removes just the potentially harmful components of a request before allowing it to proceed. This prevents attacks while not needlessly frustrating visitors in the event of false positives.
Shadow Daemon is best for those who wish to host their own dynamic website without always worrying about vulnerabilities and attacks.
Shadow Daemon is best for those who wish to determine whether and how their website is under attack.
Shadow Daemon is best for those who do not wish to blindly rely on closed-source, expensive, and secretive software.
Figure 4. Shadow Daemon
What are the features of Shadow Daemon?
Some characteristics of Shadow Daemon are listed below.
- Combining blacklists and whitelists allows for accurate detection.
- Extensive coverage with numerous connectors
- Closer to the application for increased safety
- Only block harmful portions of malevolent requests
4. Coraza
Coraza is an open-source, enterprise-grade, high-performance Web Application Firewall (WAF) designed to safeguard your most cherished apps. It is developed in the Go programming language, supports ModSecurity and SecLang rule sets, and is fully compatible with the OWASP Core Rule Set.
Coraza is a drop-in replacement for the soon-to-be-discontinued Trustwave ModSecurity Engine, and it supports SecLang rule sets as an industry standard.
Coraza is one of the best WAFs since it is a community project with a clear continuous development roadmap.
Figure 5. Coraza
What are the features of Coraza?
The main features of Coraza are as follows.
-
Security: Coraza utilizes the OWASP Core Rule Set (CRS) to defend your web applications from a broad variety of threats, including the OWASP Top Ten, with minimal false positives. CRS defends against a variety of typical attack types, including SQL Injection (SQLi), Cross Site Scripting (XSS), PHP & Java Code Injection, HTTPoxy, Shellshock, Scripting/Scanner/Bot Detection, and Metadata & Error Leakages.
-
Extensible: At its heart, Coraza is a library with several connectors for deploying on-premise Web Application Firewall instances. Create your own audit loggers, persistence engines, operators, and actions to expand Coraza as much as you like.
-
Performance: Coraza can manage large websites and tiny blogs with a minimum performance effect.
-
Accessibility: Anyone may comprehend and alter the Coraza source code. It is simple to add additional features to Coraza.
-
Community: Coraza is a community-driven endeavor; contributions are welcome and all suggestions are examined.
A Golang compiler v1.16+ is a prerequisite. Linux distribution (Debian or Centos recommended, Windows not supported yet) is available now.
5. OctopusWAF
OctopusWAF is an open-source Web application firewall written completely in C that makes numerous connections using libevent
. The event-driven design is geared for many concurrent connections (keep-alive), which is essential for AJAX applications with high speed. This tool is quite lightweight. You may use it in any desired manner. This resource is ideal for securing particular endpoints that require customized security.
What are the features of OctopusWAF?
The main features of OctopusWAF are as follows.
-
Reverse proxy capability
-
Detect anomalies using regular expressions and lib PCRE resources
-
Detect security anomalies using string-matching algorithms such as DFA, horspool, and karp-rabin
-
Detect anomalies in security using libinjection
-
Options for log saving
Octopus WAF is best for organizations of all sizes that need to protect their web applications from attacks. It is particularly well-suited for organizations that have a high-profile online presence or that handle sensitive data.