What is the Wordfence Web Application Firewall?
The Wordfence Web Application Firewall is a PHP based, application level firewall that filters out malicious requests to your site. It is set up to run at the beginning of WordPress' initialization to filter any attacks before plugins or themes can run any potentially vulnerable code.
What it Protects Against
The Wordfence WAF protects against a number of common web-based attacks:
- SQL Injection: Unsanitized SQL code that can compromise a database system.
- Malicious File Upload: Unsanitized files containing malicious code that can be uploaded to and executed by the web server.
- Directory Traversal: Unsanitized path names that can be used to trick the web server into serving files containing credentials or other potentially sensitive information.
- Local File Inclusion: Unsanitized path/file names that can be used to execute potentially malicious code available to the web server's file system.
- External Entity Expansion (XXE): A "feature" of XML that can be used to trick the web server into serving files containing credentials or other potentially sensitive information.
How is Learning Mode used?
Details about using Learning Mode are available by clicking here.
The Wordfence Web Application Firewall has a number of rules that match known attacks, i.e. attacks commonly seen and exploited in the wild. The patterns for these attacks are specific and require minimal processing in determining if the request matches. The WAF also uses a number of generic rules that use pattern matching to determine if the request looks malicious. These are designed to prevent 0-days for known types of attacks from being exploited.
Wordfence will automatically update the Firewall rules from our servers in our network operations center without having to update Wordfence. Free users receive the community version of the rules which are updated weekly. As new threats emerge, the rules used by the Firewall to protect you are updated in real-time for Premium members. Premium users receive an additional layer of protection: when new rules are added, our servers will "ping" your site to prompt Wordfence to pull down the latest rules, so you are automatically protected from attackers as new threats emerge.
- Enabled and Protecting: In this mode, the Wordfence Web Application Firewall is actively blocking requests matching known attack patterns, and is actively protecting your site from attackers.
- Learning Mode: In this mode, the Wordfence Web Application Firewall is whitelisting any requests that would normally be blocked by the firewall. Some requests contain data that may match patterns the firewall uses to detect attacks (such as an article about SQL injection that contains SQL code). While in Learning Mode, these requests will be whitelisted, excluding them from tripping the same rules once the firewall is enabled. Use this mode to prevent false positives on your site.
- Disabled: In this mode, the Wordfence Web Application Firewall is functionally turned off and does not run any of its rules or analyze the request in any way.
The WAF uses pattern matching to identify malicious requests, and sometimes the content in the request may mistakenly match one of the rules and trigger the WAF to block the request. This is considered a false positive. Wordfence provides a way to exclude this particular URL and parameter from the WAF rules, so they may be whitelisted. They are typically added while the firewall is in Learning Mode, or by an admin in the Web App Firewall admin menu, or in the blocked response page.