=== Atlant Security === Contributors: xorred Donate link: https://atlantsecurity.com Tags: security, firewall, malware scanner, two-factor authentication, brute force Requires at least: 6.0 Tested up to: 7.0 Requires PHP: 8.0 Stable tag: 1.1.13 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Enterprise-grade WordPress security: WAF, brute force protection, malware scanner, 2FA, honeypots, AI crawler control, and post-breach recovery. == Description == **Atlant Security** is a comprehensive WordPress security plugin that provides enterprise-grade protection through 17 integrated security modules organized in a 5-layer defense architecture. = 5-Layer Defense Architecture = 1. **Pre-WordPress WAF** - Firewall, rate limiter, and IP blocking run before WordPress processes the request. 2. **Application-Aware** - Login security, custom login URL, two-factor authentication, session hardening, cron monitoring, and REST API policies. 3. **Content & Config** - WordPress hardening, security headers, AI crawler management, and honeypot traps. 4. **Outbound & Data** - SSRF prevention, malware scanning (files and database). 5. **Response & Recovery** - Post-breach recovery, notifications, visitor log, and audit log. = Key Features = **Web Application Firewall (WAF)** Inspects every request against 28+ attack pattern families including SQL injection, XSS, remote code execution, path traversal, PHP object injection, and WordPress-specific attacks. Block or log-only mode. Triple URL decoding prevents evasion. **Brute Force Protection** Progressive lockout system (5 min > 30 min > 24 hours) with configurable thresholds. Generic login error messages prevent username enumeration. Author enumeration blocking. **Malware Scanner** Local file and database scanner with 38 malware signatures. Detects backdoors, webshells (WSO, c99, r57), crypto miners, credit card skimmers, and obfuscated code. Quarantine system with web access blocking. **Two-Factor Authentication (2FA)** TOTP (Google Authenticator, Authy) and email OTP. Per-role enforcement, 10 recovery codes, 5-minute challenge timeout, replay attack prevention. **Honeypot Traps** Zero-false-positive bot detection: hidden link traps, fake login pages, comment honeypots, and Contact Form 7 integration. 3-layer safe bot protection ensures Googlebot, Bingbot, and allowed AI crawlers are never blocked. **AI Crawler Management** Control 20+ known AI/LLM training crawlers (GPTBot, ClaudeBot, Google-Extended, Bytespider, and more). Per-crawler toggles, robots.txt integration, and 403 enforcement. Block training crawlers while allowing browsing bots. **Security Headers** Manage HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, CSP, CORP, and COOP. Letter-grade scoring system. Remove X-Powered-By and Server headers. **Session Security** Cookie hardening (HttpOnly, Secure, SameSite). Session binding via IP + User-Agent fingerprint detects hijacking. Concurrent session limits. Idle timeout. Optional admin bypass for all session restrictions. **Rate Limiter** Sliding-window rate limiting across 11 endpoint categories: frontend, login, search, feed, REST API, WooCommerce checkout, XML-RPC, and cron. **REST API Policies** Per-route access control with authentication requirements, HTTP method restrictions, rate limits, and IP whitelists. 5 built-in policies protect user enumeration, search, and write endpoints. **Cron Guard** Monitors wp-cron.php for flood attacks. Detects suspicious scheduled tasks via baseline comparison. System cron migration helper. **Outbound Monitor (SSRF Prevention)** Monitors all outgoing HTTP requests. Blocks requests to private/internal IP ranges including cloud metadata endpoints. Domain allowlist with wildcard support. Caller detection traces requests to specific plugins. **Post-Breach Recovery** 12 emergency actions: terminate sessions, force password reset, rotate secret keys, emergency lockdown, reinstall core, reinstall plugins, audit admin accounts, clear caches, malware scan, disable plugins, and downloadable incident report. **Real-Time Dashboard** Live visitor monitoring with 15-second auto-refresh. Stat cards, traffic charts, top IPs with VirusTotal integration, browser distribution, and IP detail modals. **Visitor Log & Audit Log** Complete request history with filters (IP, URL, bots, blocked, time range). Tamper-resistant admin action audit trail. **Notifications** Email alerts (HTML formatted, color-coded severity), Slack webhooks, custom JSON webhooks, and daily digest. Configurable severity threshold with 5-minute deduplication. **WordPress Hardening** One-click toggles: disable XML-RPC, hide WordPress version, block REST API user enumeration, block author enumeration, disable file editor, block PHP execution in uploads. = What Makes Atlant Security Different = * **Pre-WordPress WAF** - Blocks attacks via auto_prepend_file before WordPress even loads * **Outbound HTTP Monitor** - Detects SSRF attacks and unauthorized outbound connections * **Database Backdoor Scanner** - Scans wp_options and wp_posts for eval(), base64, and hidden backdoors * **Client-Side Bot Detection** - JavaScript challenges and browser fingerprinting catch sophisticated bots * **AI/LLM Crawler Blocking** - Identify and block AI training crawlers scraping your content * **Honeypot Traps** - Hidden links, fake login pages, invisible form fields that only bots trigger * **Cron Guard** - Monitors wp-cron for unauthorized scheduled tasks planted by malware * **Post-Breach Recovery** - Guided recovery toolkit with 12 emergency actions in one place * **Session Fingerprint Binding** - Binds sessions to IP + User-Agent so stolen cookies are useless * **Real-Time Visitor Dashboard** - Live visitor feed updated every 15 seconds * **Smart Password Policy** - Minimum length, complexity, common-password blocking, and passphrase support * **Granular REST API Policies** - Per-endpoint control, not just a global on/off switch * **Safe Mode Override** - One constant in wp-config.php disables all blocking features instantly * **Deactivation Data Control** - Choose to keep or wipe all security data when deactivating * **Zero phone-home** - No telemetry, no tracking, fully GDPR-compliant (external services used only when explicitly enabled by the admin - see External Services section) = Why Atlant Security? = * **All-in-one** - Replaces 5-6 separate security plugins * **No external dependencies** - Core security features run locally on your server * **Zero phone-home** - No telemetry, no tracking (optional features like GeoIP use external services only when explicitly enabled - see External Services section) * **GDPR-friendly** - No external fonts, no CDN resources * **Setup wizard** - Configure core security in under 2 minutes * **Clean uninstall** - Removes all database tables and options when deleted (opt-in) * **Safe Mode** - Emergency override if you get locked out of your site == Installation == 1. Upload the `atlant-security` folder to `/wp-content/plugins/`. 2. Activate the plugin through the **Plugins** menu in WordPress. 3. Navigate to **Atlant Security** in the admin sidebar to access the dashboard. 4. Optionally run the **Setup Wizard** from the sidebar to configure core security settings quickly. The Setup Wizard configures your WAF, login protection, hardening, visitor logging, and notifications. You can run it at any time from the inner sidebar navigation. = Minimum Requirements = * WordPress 6.0 or higher * PHP 8.0 or higher = Safe Mode = If you ever get locked out of your site, add this line to `wp-config.php`: `define( 'ASWP_SAFE_MODE', true );` This disables all blocking features (custom login URL, IP blocking, WAF, rate limiting) while keeping the admin interface accessible so you can fix settings. == Frequently Asked Questions == = I locked myself out with the Custom Login URL = Add `define( 'ASWP_SAFE_MODE', true );` to your `wp-config.php`. This disables all blocking features while keeping the admin accessible. Alternatively, rename the plugin folder via FTP to `atlant-security-disabled`, log in normally, rename it back, then whitelist your IP. = The WAF is blocking my page builder (Elementor, Divi) = Switch WAF to **Log Only** mode, reproduce the issue, then check the **Audit Log** for the triggered rule. Page builders may trigger false positives due to base64-encoded content in their save payloads. = Users keep getting logged out unexpectedly = This is caused by Session Binding with IP binding enabled. Go to **Session Security** and disable "Bind to IP" while keeping "Bind to User-Agent" enabled. Mobile and VPN users frequently change IPs. You can also enable "Exempt Administrators" to bypass all session restrictions for admin users. = Will this slow down my site? = No. The WAF runs at `init` priority 0 with optimized pattern matching. Rate limiting uses APCu when available for microsecond lookups. The visitor log is a single lightweight INSERT per request. = Email notifications are not arriving = WordPress default `wp_mail()` uses PHP mail() which many hosts block. Install an SMTP plugin like **WP Mail SMTP** or **FluentSMTP** to route emails through a proper mail provider. = The malware scan is running slowly = Reduce "Files per Batch" to 20-30 on shared hosting. The scanner processes files in AJAX batches to avoid timeouts. Files larger than 5 MB are automatically skipped. = How does the honeypot protect legitimate crawlers? = Three layers of protection: (1) Trap URLs are added as Disallow rules in robots.txt, (2) hidden links use rel="nofollow", and (3) 35+ known-good bot user agents (Googlebot, Bingbot, etc.) are pattern-matched and receive a 404 instead of a ban. AI crawlers marked "allowed" in your settings are also protected. = Does this plugin work with multisite? = The plugin is designed for single-site WordPress installations. Multisite support is planned for a future release. = What happens to my data when I deactivate the plugin? = Nothing is deleted on deactivation. When you delete the plugin, a dialog asks whether to keep or remove all data. You can also control this in Settings > "Delete data on uninstall". == External Services == This plugin connects to the following third-party services under specific conditions: = Cloudflare IP Ranges = When Cloudflare integration is enabled, the plugin periodically fetches the current list of Cloudflare edge IP ranges from Cloudflare's official endpoints. This is used to correctly identify visitor IP addresses behind the Cloudflare proxy and to whitelist Cloudflare edge servers. * Data sent: No user data is sent. The plugin fetches publicly available IP range lists. * When: Once per week via a scheduled cron job (aswp_refresh_cloudflare_ips), only when Cloudflare integration is enabled. * Endpoints: https://www.cloudflare.com/ips-v4 and https://www.cloudflare.com/ips-v6 * [Cloudflare Terms of Use](https://www.cloudflare.com/terms/) * [Cloudflare Privacy Policy](https://www.cloudflare.com/privacypolicy/) = MaxMind GeoLite2 GeoIP Database = When GeoIP country detection is enabled and a MaxMind license key is configured, the plugin downloads the GeoLite2-Country database from MaxMind. This database is stored locally and used to resolve visitor IP addresses to country codes for display in the visitor log and dashboard. * Data sent: Your MaxMind license key is sent to authenticate the download request. No visitor data is sent to MaxMind. * When: On initial setup and once per week via a scheduled cron job (aswp_update_geoip_db), only when GeoIP is enabled and a license key is configured. * Endpoint: https://download.maxmind.com/app/geoip_download * [MaxMind End User License Agreement](https://www.maxmind.com/en/geolite2/eula) * [MaxMind Privacy Policy](https://www.maxmind.com/en/privacy-policy) = Google IP Ranges = When Google integration is enabled in the IP Whitelist, the plugin periodically fetches the current list of Google IP ranges from Google's official endpoint. This is used to automatically whitelist known Google infrastructure IPs (Googlebot, Google Cloud, etc.) so legitimate Google traffic is never blocked. * Data sent: No user data is sent. The plugin fetches a publicly available JSON file containing Google IP ranges. * When: Once per week via a scheduled cron job (aswp_refresh_google_ips), only when Google integration is enabled. * Endpoint: https://www.gstatic.com/ipranges/goog.json * [Google Terms of Service](https://policies.google.com/terms) * [Google Privacy Policy](https://policies.google.com/privacy) = Microsoft / Bing IP Ranges = When Microsoft integration is enabled in the IP Whitelist, the plugin periodically fetches the current list of Bing bot IP ranges from Microsoft's official endpoint. This is used to automatically whitelist known Bing crawler IPs so legitimate Bing traffic is never blocked. * Data sent: No user data is sent. The plugin fetches a publicly available JSON file containing Bing bot IP ranges. * When: Once per week via a scheduled cron job (aswp_refresh_microsoft_ips), only when Microsoft integration is enabled. * Endpoint: https://www.bing.com/toolbox/bingbot.json * [Microsoft Services Agreement](https://www.microsoft.com/en-us/servicesagreement/) * [Microsoft Privacy Statement](https://privacy.microsoft.com/en-us/privacystatement) = WordPress.org Core Checksums API = The Malware Scanner verifies the integrity of WordPress core files by comparing their MD5 hashes against the official checksums published by WordPress.org. Files that match are skipped during pattern scanning (vendor-verified, safe by definition). Files that mismatch are flagged as critical "core_modified" findings. * Data sent: WordPress version number and locale. No site data, no visitor data, no PII. * When: Once per WordPress version (cached for 24 hours), only when the Malware Scanner runs and the "Use core checksums" setting is enabled. * Endpoint: https://api.wordpress.org/core/checksums/1.0/ * [WordPress.org Terms of Service](https://wordpress.org/about/domains/) * [WordPress.org Privacy Policy](https://wordpress.org/about/privacy/) = WordPress.org Secret Key API = The Post-Breach Recovery module can generate new WordPress secret keys and salts using the official WordPress.org API. This is used when an administrator manually triggers the "Rotate Secret Keys" emergency action after a security breach. * Data sent: No user data is sent. The plugin fetches randomly generated keys from the API. * When: Only when an administrator manually triggers the "Rotate Secret Keys" action in the Post-Breach Recovery module. * Endpoint: https://api.wordpress.org/secret-key/1.1/salt/ * [WordPress.org Terms of Service](https://wordpress.org/about/domains/) * [WordPress.org Privacy Policy](https://wordpress.org/about/privacy/) = Slack Webhooks = When Slack notifications are enabled and a Slack webhook URL is configured, the plugin sends security alert messages to the specified Slack channel. This allows administrators to receive real-time security notifications in Slack. * Data sent: Security alert messages containing the alert subject, description, severity level, site URL, and the IP address that triggered the alert. No visitor personal data or cookies are sent. * When: Only when a security event occurs (e.g., brute force attempt, WAF block, honeypot trip) and Slack notifications are enabled. * Endpoint: Administrator-configured Slack Incoming Webhook URL (e.g., https://hooks.slack.com/services/...) * [Slack Terms of Service](https://slack.com/terms-of-service) * [Slack Privacy Policy](https://slack.com/privacy-policy) = Custom Webhooks = When webhook notifications are enabled and a webhook URL is configured, the plugin sends security alert payloads in JSON format to the specified endpoint. This allows integration with any external monitoring or alerting system. * Data sent: JSON payload containing the alert subject, description, severity level, site URL, timestamp, and the IP address that triggered the alert. No visitor personal data or cookies are sent. * When: Only when a security event occurs and webhook notifications are enabled. * Endpoint: Administrator-configured webhook URL. * Terms and privacy: Determined by the third-party service the administrator configures. = Google reCAPTCHA = When CAPTCHA bot protection is enabled and the provider is set to "Google reCAPTCHA v2" or "Google reCAPTCHA v3", visitor browsers load Google's reCAPTCHA library and the server verifies submitted tokens with Google. This is OPT-IN - disabled by default. * Data sent (browser → Google): visitor IP address and standard reCAPTCHA telemetry that Google uses to score human-vs-bot likelihood. Google's reCAPTCHA library is loaded from www.google.com/recaptcha/api.js. * Data sent (server → Google): the verification token returned by the visitor's browser, the configured secret key, and the visitor's IP address (`remoteip` field), to https://www.google.com/recaptcha/api/siteverify. * When: only when the configured provider is reCAPTCHA AND the visitor reaches /wp-login.php, the WordPress registration form, or the lost-password form (per-form toggle). * Endpoints: https://www.google.com/recaptcha/api.js and https://www.google.com/recaptcha/api/siteverify * [Google reCAPTCHA Terms of Service](https://policies.google.com/terms) * [Google Privacy Policy](https://policies.google.com/privacy) = Cloudflare Turnstile = When CAPTCHA bot protection is enabled and the provider is set to "Cloudflare Turnstile", visitor browsers load Cloudflare's Turnstile library and the server verifies submitted tokens with Cloudflare. This is OPT-IN - disabled by default. Turnstile is the privacy-respecting alternative to reCAPTCHA - Cloudflare states it does NOT track users across sites. * Data sent (browser → Cloudflare): visitor IP address and standard Turnstile telemetry. The Turnstile library is loaded from challenges.cloudflare.com/turnstile/v0/api.js. * Data sent (server → Cloudflare): the verification token returned by the visitor's browser, the configured secret key, and the visitor's IP address (`remoteip` field), to https://challenges.cloudflare.com/turnstile/v0/siteverify. * When: only when the configured provider is Cloudflare Turnstile AND the visitor reaches /wp-login.php, the WordPress registration form, or the lost-password form (per-form toggle). * Endpoints: https://challenges.cloudflare.com/turnstile/v0/api.js and https://challenges.cloudflare.com/turnstile/v0/siteverify * [Cloudflare Terms of Service](https://www.cloudflare.com/terms/) * [Cloudflare Privacy Policy](https://www.cloudflare.com/privacypolicy/) == Screenshots == 1. Security Dashboard - real-time visitor monitoring, stat cards, traffic charts, top IPs, and browser distribution. 2. Web Application Firewall (WAF) - overview with attack stats, mode toggle, and rule category summary. 3. WAF Rules - 28+ attack pattern families with per-rule enable/disable and log/block controls. 4. IP Block List - blocked IPs with reasons, durations, hit counts, and VirusTotal integration. == Changelog == = 1.1.13 - Timezone Fix = * Fixed: admin times displayed several hours off on non-UTC sites - the display layer double-converted stored timestamps. New FortressWP\Time helper; the admin JavaScript now shows times in the site timezone, not the visitor's browser. * Fixed: GeoIP "last updated", the brute-force lockout countdown, and the 08:00 daily digest schedule now all use the correct timezone. = 1.1.12 - Quarantine Review Ritual = * New: quarantine now opens a review modal - file details, a forensic download button, VirusTotal / Hybrid-Analysis links, and three required acknowledgment checkboxes (also enforced server-side). * Improved: CSV export includes confidence and matched-signature columns. = 1.1.11 - Conservative Quarantine = * New: per-signature fidelity ratings and per-finding confidence; quarantine is gated to HIGH confidence and single ambiguous hits are review-only. * New: regex matches inside string literals or comments are treated as data, not malware - eliminates self-match false positives. = 1.1.10 - Critical: Self-Quarantine Lockout Fix = * Fixed (critical): the scanner could quarantine its own files and take the whole site offline; it now hard-excludes known security plugin directories. * Fixed (critical): the plugin bootstrap survives a missing module file instead of fataling the site. = 1.1.8 - Default-Allow Policy for Vendor Bots = * Fixed: AI crawler defaults flipped to "allow" - legitimate vendor bots (Google, OpenAI, Anthropic, Bing) are never blocked unless the operator opts in. * Fixed: the Honeypot reverse-DNS check now fails open, so a transient DNS error can't ban a real Googlebot. = 1.1.7 - Critical Audit Hardening = Fixes for 14 critical and 12 high-severity issues found during a full external audit. Recommended upgrade for everyone. * Fixed (critical): fatal-at-login bug in concurrent-session enforcement; IPv4-mapped-IPv6 IP-block bypass; outbound SSRF DNS-rebinding race; CIDR trusted-proxy parsing; over-broad Cloudflare auto-whitelist; web-accessible quarantine directory and wp-config key backups; a WAF-rule ReDoS; plaintext Custom Login URL recovery token; unvalidated plugin-restore input. * Fixed (high): 2FA enrollment-session bypass and cross-user nonce reuse; 2FA disable without re-authentication; racy IP blocking; Googlebot user-agent-spoof honeypot exemption; notification webhook SSRF; scan symlink escape; WAF encoded-escape and capability bypasses; and more. = 1.1.6 - Scanner Accuracy = * Fixed: malware scanner false-positive flood on fresh installs - WordPress core checksum verification, a known-safe path allowlist, and tightened signatures. * New: "Mark as False Positive" and Undo on file findings, recorded to the audit log. = 1.1.5 = * New: CAPTCHA on the login, registration, and lost-password forms - reCAPTCHA v2, reCAPTCHA v3, and Cloudflare Turnstile, with per-form toggles and a theme picker. = 1.1.4 = * New: CSV export of full, untruncated scan findings; white-label filters for the Enterprise add-on. Tested up to WordPress 7.0. = 1.1.3 - Security Hardening = * Security: HMAC-signed Custom Login URL grace cookie; enforced 2FA for required roles; webhook-secret redaction in the outbound log; always-on SSRF blocking of private ranges; IPv6 DNS checks. * New: trusted proxy IP setting and a weekly cron schedule. = 1.1.2 = * New: About page with defense architecture and feature overview. * Fixed: setup wizard no longer auto-redirects on activation. = 1.1.1 = * Improved: visitor log layout and filter bar spacing. = 1.1.0 = * Improved: denser, more compact admin layout. * Fixed: session timeout now respects the "Exempt Administrators" setting. = 1.0.9 = * Improved: compact sidebar, shorter table headers, and denser global spacing. = 1.0.8 = * Fixed: visitor log and dashboard table column widths. = 1.0.7 = * New: inner sidebar navigation - all plugin pages in one persistent panel with a single WordPress menu entry. = 1.0.6 = * Improved: no-cache headers on admin pages; Top IPs / Top Pages widget fixes. = 1.0.5 = * Fixed: HTML entity rendering bug in the admin JavaScript. = 1.0.4 = * New: GeoIP country resolution, Custom Login URL, Password Policy, Force SSL Admin, and auto-update toggles. * Internal: codebase prefix migration to aswp_ with automatic database migration on upgrade. = 1.0.3 = * New: Honeypot, Security Headers, Two-Factor Authentication, and Notifications modules. = 1.0.2 = * New: AI Crawlers, REST API Policies, Session Security, Outbound Monitor, and Cron Guard modules. = 1.0.1 = * New: Setup Wizard and IP Detail Modal. = 1.0.0 = * Initial release: 17 security modules - WAF, brute-force protection, malware scanner, post-breach recovery, IP blocking, visitor log, audit log, hardening, rate limiter, and real-time dashboard. == Upgrade Notices == = 1.1.8 = Restores the policy: legitimate vendor bots (Google, Anthropic, OpenAI, Bing) are NEVER blocked unless the site operator explicitly opts in. Two fixes - AI crawler defaults flipped to "allow", and the Honeypot reverse-DNS check now fails open so transient DNS issues can't ban real Googlebots. Recommended for everyone running an SEO-sensitive site. = 1.1.7 = Critical security release. Fixes 14 CRITICAL and 12 HIGH issues found during a full external audit, including a fatal-at-login bug, IP-block bypass via IPv6-mapped addresses, an SSRF DNS-rebinding race in the outbound monitor, and a wp-config-backup-leaks-old-keys flaw. Recommended upgrade for every install. = 1.1.6 = Big scanner-accuracy improvement. Verified WordPress core files are now skipped (MD5-matched against the official api.wordpress.org checksums), tightened iframe/base64 signatures, fixed an over-broad path match, and added a "Mark as False Positive" button. Recommended upgrade for everyone running scans. = 1.1.5 = Adds CAPTCHA support on login / registration / lost-password forms. Three providers: reCAPTCHA v2, reCAPTCHA v3, and Cloudflare Turnstile. Configure in **Login Security → Bot Protection (CAPTCHA)**. = 1.1.4 = Adds CSV export on the Malware Scanner (per Reddit community suggestion) - download full untruncated File + Database Findings before committing to Quarantine. Compatibility declared through WP 7.0. = 1.1.3 = Security hardening release. Fixes custom-login-URL cookie bypass, 2FA enforcement, SSRF log-only default, session-limit token/verifier mix, and adds real wp-config.php rewriting for key rotation. Existing 2FA recovery codes generated before 1.1.3 may not verify - regenerate them from your user profile after upgrading. = 1.1.2 = New About page consolidates defense architecture and competitive features. Setup wizard no longer auto-redirects on activation. Dashboard is cleaner with focus on operational data. = 1.0.7 = Major UI overhaul: inner sidebar navigation replaces 23 WordPress submenu items with a clean, persistent sidebar panel. All page URLs remain the same - bookmarks still work. = 1.0.4 = Adds GeoIP country flags in visitor log, custom login URL, password policy enforcement, and Force SSL Admin setting. Internal prefix migration runs automatically - no action required. = 1.0.3 = Adds honeypot traps, security headers management, two-factor authentication, and notification channels. Fixes IP management and status code logging. Recommended update. = 1.0.0 = Initial release. Run the Setup Wizard after activation to configure your site's security.