95–100/100 Lighthouse Speed A+ Security Headers Enforced
Official WP.org Plugins: Pro Licenses from $15/yr or $49 Lifetime! Explore Plugins →

Active Defense: Priority-0 Early-Boot WAF, 429 Bot Rate Limiter & Admin Capability Guard

Block SQLi, XSS, LFI, and bad bots at priority 0 with the Pro Early-Boot Web Application Firewall, throttle scraper floods with the 429 Sliding-Window Rate Limiter, and lock an Approved Administrator Whitelist.

📋 On This Page (Jump to Section)
PRO Edition Guide: The active defense engines covered in this guide require FBS Secure Optimize Pro (v1.1.0+) activated alongside the free core plugin.

While the free plugin provides forensic visibility, hardening, and direct-database remediation, FBS Secure Optimize Pro adds real-time, automated active defense that intercepts exploit payloads and privilege-escalation attempts before they reach vulnerable plugin code.

FBS Secure Optimize Pro Early-Boot WAF, 429 Rate Limiter and Admin Whitelist Guard

1. Priority-0 Early-Boot Web Application Firewall (WAF) #

The Pro WAF (class-fbs-secure-optimize-pro-waf.php) hooks into plugins_loaded at priority 0—inspecting incoming URI paths, query strings, POST bodies, cookies, and User-Agent headers before standard plugins execute:

  • SQL Injection (SQLi) Defense: Blocks unauthorized SQL union queries, boolean/time-based blind injection probes, and database schema extraction payloads.
  • Cross-Site Scripting (XSS) Defense: Intercepts injected script payloads, dangerous URI schemes, and inline DOM event handlers.
  • Local File Inclusion (LFI) & Directory Traversal: Stops relative directory traversal sequences, configuration file probes, and unauthorized PHP stream wrappers.
  • Null-Byte & Malicious Scanner User-Agent Blocking: Drops null-byte truncation exploits and aggressive automated vulnerability scanner user-agents.
  • Custom IP & User-Agent Blacklists: Block specific attacking IP addresses or custom bot signatures directly from the WAF panel.
  • Safe Learning Mode vs. Active Blocking Mode: Test the WAF in Learning Mode (logs matching requests without blocking visitors) before switching to Active Blocking (HTTP 403).
  • 100-Entry Live Security Log: Inspect the latest 100 blocked or logged attack events with Timestamp, Attacking IP, Rule Triggered, Request URI, and User-Agent.

Developer Filter: Customizing Pro WAF Rules #

add_filter( 'fbs_secure_optimize_pro_waf_rules', function( $rules ) {
    // Customize or append custom regex WAF signatures
    return $rules;
} );

2. 429 Anti-Bot Flood Rate Limiter #

Aggressive AI scrapers, credential-stuffing bots, and vulnerability scanners often fire 100+ uncached requests per second—saturating PHP-FPM workers and causing 502 Bad Gateway or 504 Gateway Timeout crashes on WooCommerce stores.

  • Sliding-Window Per-IP Request Throttling: Tracks request velocity per visitor IP across a configurable time window (e.g., max requests per 60 seconds).
  • Clean HTTP 429 Response: When a bot exceeds your threshold, Pro immediately halts execution and returns a lightweight HTTP 429 Too Many Requests response with a standard Retry-After header before expensive database queries run.
  • Admin & Trusted IP Bypass: Automatically exempts logged-in administrators and IPs listed in your Trusted IP Allowlist.

3. Real-Time Admin Capability Whitelist Guard #

Zero-day vulnerabilities in third-party plugins often bypass standard user creation hooks by writing administrator capability rows directly into wp_usermeta. The Real-Time Admin Capability Whitelist Guard stops privilege escalation cold:

  1. When enabled in FBS Optimize → Pro Active Defense, Pro snapshots and locks your Approved Administrator User ID Whitelist (fbsseop_pro_approved_admins).
  2. You can explicitly approve or remove legitimate team administrator accounts inside the whitelist panel at any time.
  3. Automatic Real-Time Disarming: On every request, if any user ID not on your Approved Whitelist gains administrator capabilities in wp_usermeta, Pro immediately strips their administrator role back to subscriber, destroys all of their active session tokens (destroy_all()), and logs a CRITICAL privilege-escalation alert in your Pro Security Log!
Ready to Scale Faster & Safer?

Partner directly with our senior engineering studio. Whether you need hidden malware removed, a 99+ PageSpeed overhaul, a custom WooCommerce plugin, or a Laravel web application, we deliver clean, battle-tested code on a staging copy first.

99+ PageSpeed Score Target
A+ HTTP Security Rating
100% WPCS & Clean OOP Code