Security
v1.8.0
Security
- Updates and support included for 12 months
- License key delivered immediately by email
- 30-day money-back guarantee
- Full documentation included
- Compatible with Hyvä themes
- Composer-ready installation
Wimakeit Security
Uw Magento admin en webshop worden dagelijks aangevallen — bots overspoelen zoekroutes, scannen REST- en GraphQL-endpoints, scrapen inhoud, testen gestolen creditcardnummers en proberen credentials-lijsten uit. Één aanhoudende aanval verzadigt uw php-fpm pool en legt de volledige winkel plat. Deze module stopt dat, volledig binnen de applicatie — geen toegang tot de webserverconfiguratie vereist, geen infrastructuurwijzigingen.
De module is ontworpen na een echt incident: een gedistribueerd botnet van ~2.000 IP-adressen, elk één zoekopdracht per minuut, verzadigde een pool van 52 php-fpm workers en veroorzaakte een volledige site-uitval. De module handelt dit scenario nu af in milliseconden per geblokkeerd verzoek, voordat de zoekmachine überhaupt geïnstantieerd wordt.
Voor wie
- Handelaars op gedeelde of beheerde hosting waar de nginx/Apache-configuratie vergrendeld is — alle bescherming draait op PHP-niveau.
- Webshops die te maken hebben gehad met zoekoverstromingen, REST API-scans (CMS-endpoint scrapers), carding-bots op de gastafrekening, of brute force-pogingen op de admin-loginpagina.
- Bureaus die één configureerbare module willen die alle veelvoorkomende botbedreigingen en adminbeveiliging dekt, met fail2ban-integratie en edge-config-export.
- Operations-teams die actionable logs en een beveiligingschecklist nodig hebben — niet alleen een firewallregel.
Belangrijkste voordelen
- Bescherming tegen zoekoverstromingen — rate limiting per IP (standaard 30 verz./60s) plus een sitewijde circuit breaker: wanneer de globale zoeksnelheid een drempel overschrijdt, worden alleen echte browsers (session-gebonden form_key cookie) bediend. De enige beveiliging die werkt tegen gedistribueerde botnets van ~1 verzoek/IP.
- REST & GraphQL guards — throttle of volledige blokkade op CMS-endpoint-scans, carding-bots op
/V1/guest-cartsen al het GraphQL-verkeer; beslissingen worden genomen vóór routing, authenticatie en query-parsing. - Bad Bot Guard — bant op User-Agent over alle frontend-routes: kwaadaardige scanners (sqlmap, nikto…), e-mailharvesters, agressieve SEO-scrapers en AI-crawlers. Vier onafhankelijke categorieën met een dry-run modus om lijsten te valideren vóór activering.
- Admin Email OTP — na een succesvolle wachtwoordlogin wordt een 6-cijferige code gemaild naar het geregistreerde e-mailadres van de admin. Gestolen credentials alleen zijn niet voldoende om toegang te krijgen tot het adminpanel. Geen authenticator-app nodig, geen QR-code te scannen.
- Admin Login Guard — registreert elke inlogpoging, bant automatisch IP-adressen die de drempel voor mislukte pogingen overschrijden (progressieve TTL: 5 min → 1u → 24u), verstuurt brute force-waarschuwingen.
- IP-banbeheer — persistente banlijst met admin-grid (filterbaar, mass-unban), exports elke 5 minuten naar nginx / Apache / plain formaat voor blokkade op edge-niveau. Volledige fail2ban-integratie inbegrepen.
- Security Checker — 16-puntsaudit (admin-credentials, 2FA, HTTPS, cache, blootgestelde bestanden, SMTP-configuratie, OTP-status…) beschikbaar in de admin-UI, via CLI (
wimakeit:security:check) en als dagelijkse cron. - Honeypot — onzichtbare footerlink die elke crawler die hem volgt bant, met vrijwel geen impact op legitiem verkeer.
Compatibiliteit
- Magento 2.4.x / Mage-OS
- PHP 8.1, 8.2, 8.3, 8.4
- Vereist
wimakeit/module-core^3.0 - Aanbevolen:
wimakeit/module-smtpvoor betrouwbare Admin Email OTP-bezorging (werkt ook met de native Magento SMTP-instellingen) - Compatibel met Redis, OpenSearch, Varnish Full Page Cache
- Werkt met Luma- en Hyvä-frontends
Installeer deze module via Composer. Zorg ervoor dat uw auth.json is geconfigureerd met uw Wimakeit-inloggegevens.
$ composer require wimakeit/module-security:^1.8.0
$ bin/magento setup:upgrade
$ bin/magento setup:di:compile
Installation notes
The standard composer require + setup:upgrade + setup:di:compile flow applies. The points below cover what's specific to this module.
Required dependency
This module requires wimakeit/module-core ^3.0. Composer will pull it automatically from the Wimakeit registry as long as the registry is declared in your project's composer.json.
Recommended dependency
For reliable Admin Email OTP delivery, install wimakeit/module-smtp. Without a working SMTP transport, OTP codes may not be delivered and the admin could be effectively locked out after enabling the feature. The module works with native Magento SMTP settings too (Stores → Configuration → Advanced → System → Mail Sending Settings).
ACL permissions
Six ACL resources are created under System → Permissions → User Roles:
| Resource | Default |
|---|---|
Wimakeit_Security::overview (Security Overview page) | Administrator only |
Wimakeit_Security::stress (Under Attack mode — arm/release) | Administrator only |
Wimakeit_Security::bans (IP Bans grid + mass unban) | Administrator only |
Wimakeit_Security::login_log (Admin Login Log grid) | Administrator only |
Wimakeit_Security::checker (Security Checker page) | Administrator only |
Wimakeit_Security::config (module configuration) | Administrator only |
Configuration
All config is under Stores → Configuration → Wimakeit → Security. Defaults are safe for production — change only what you need.
General
| Setting | Default |
|---|---|
| Enable Search Guard | Yes |
| IP Whitelist | (empty) — one entry per line, supports exact IP, wildcard (203.0.113.*), IPv4/IPv6 CIDR |
| Trust Verified Search Engine Bots | Yes — Googlebot, Bingbot, etc. are exempt after forward-confirmed reverse DNS |
| Enable Debug Logging | No — leave off in production; blocked requests always log to wimakeit_security.log |
Per-IP Rate Limit
| Setting | Default |
|---|---|
| Enable | Yes |
| Max Requests per Window | 30 |
| Window (seconds) | 60 |
Sitewide Circuit Breaker (Stress Mode)
| Setting | Default |
|---|---|
| Enable | Yes |
| Global Threshold (requests/minute) | 120 — total search requests across all IPs |
| Stress Mode Duration (seconds) | 600 — auto-extended while the flood lasts |
| Alert Email | (empty) — leave empty to disable alert emails |
REST API Guard
| Setting | Default |
|---|---|
| Enable | Yes |
| Guarded Path Fragments | /V1/cmsPage, /V1/cmsBlock, /V1/guest-carts |
| Block Guarded Paths Entirely | No — throttle mode (note: full-block on /V1/guest-carts breaks guest checkout) |
| Max Requests per Window (per IP) | 20 |
| Window (seconds) | 60 |
GraphQL Guard
| Setting | Default |
|---|---|
| Enable | Yes |
| Max Requests per Window (per IP) | 60 — generous for headless/PWA storefronts |
| Window (seconds) | 60 |
Auto-Ban
| Setting | Default |
|---|---|
| Enable | Yes |
| Violations Before Ban | 3 |
| Violation Window (seconds) | 600 |
Honeypot
| Setting | Default |
|---|---|
| Enable | No — add Disallow: /wsecurity/ to robots.txt before enabling |
Admin Login Guard
| Setting | Default |
|---|---|
| Enable | Yes |
| Max Failed Attempts | 5 |
| Window (seconds) | 600 |
Admin Login OTP
| Setting | Default |
|---|---|
| Enable Admin Email OTP | Yes |
| Code Validity (seconds) | 300 (5 minutes) |
| Max Invalid Attempts (dropdown: 3 / 5 / 10) | 5 |
| Bypass OTP for Whitelisted IPs | Yes |
To use Admin Email OTP, each admin user must have a valid email address set in System → Permissions → All Users. Users without an email address will be logged in normally (with a warning in the security log) rather than being locked out.
Bad Bot Guard
| Setting | Default |
|---|---|
| Enable | Yes |
| Block Malicious Scanners | Yes — sqlmap, nikto, nmap, masscan… |
| Block Email/Content Harvesters | Yes — apache-badbots list |
| Block Aggressive Scrapers / SEO Bots | No — AhrefsBot, SemrushBot, MJ12bot… |
| Block AI Crawlers | No — GPTBot, ClaudeBot, CCBot… |
| Custom User-Agent Patterns | (empty) — one substring per line |
| Dry-Run (log only, do not ban) | No |
Query Validation
| Setting | Default |
|---|---|
| Enable | Yes |
| Max Query Length (characters) | 128 — set 0 to disable |
| Max Word Count | 12 — set 0 to disable |
Cron jobs (registered automatically)
| Job | Schedule | Purpose |
|---|---|---|
wimakeit_security_export_bans | every 5 min | Export active bans to var/wimakeit_security/ (nginx / Apache / plain) |
wimakeit_security_daily_check | daily 4 AM | Run security checklist, log degraded items |
wimakeit_security_daily_maintenance | daily 3:30 AM | Purge login log and stats older than 90 days; delete expired ban rows |
No setup needed — just make sure Magento cron is running.
Optional: fail2ban integration
A ready-to-use fail2ban filter and jail example are included in docs/fail2ban/. fail2ban tails var/log/wimakeit_security.log and bans attacking IPs at the iptables/nftables level before they hit PHP. Recommended when the module's in-application bans are insufficient (e.g. the attacking IP has already consumed a full php-fpm slot before being blocked).
Optional: edge configuration export
Run bin/magento wimakeit:security:edge-config to generate nginx / .htaccess snippets that mirror the current module configuration (banned IPs, guarded paths, honeypot route). Paste these into your vhost for kernel-level enforcement independent of PHP.
- Versie
- v1.8.0
- Licentie
- Jaarabonnement
- Ondersteuning
- 12 maanden
- Last updated
- 16 jun. 2026
- Magento
- Magento 2.4.4 Magento 2.4.5 Magento 2.4.6 Magento 2.4.7 Mage-OS 2.0 Mage-OS 2.1
- PHP
- PHP 8.1 PHP 8.2 PHP 8.3
- Hyvä
- Compatibel
- Pakket
-
wimakeit/module-security
Compatibility checker
Pick your stack to see if this module fits.
Changelog
Categories: Security, Feature, Fix, Perf, Admin, Deps.
[1.7.1] - 2026-06-15
Fix
- The Admin OTP verification page now displays as a clean, centered login card. It previously rendered with a broken layout and an on-screen error because it loaded the full admin dashboard chrome on a mid-login page.
[1.7.0] - 2026-06-15
Feature
- Admin Email OTP is now enabled by default, with code validity shortened to 5 minutes (was off / 10 minutes) — new installs get post-login email verification out of the box, provided a working SMTP transport is configured.
Admin
- Max Invalid Attempts is now a dropdown (3 / 5 / 10) instead of a free-text field. Shipped defaults: OTP enabled, code validity 300s, max attempts 5.
Fix
- Admin OTP verification form could not be displayed: it failed with a fatal error on every load, so an admin with OTP enabled could never enter their code. The verification form now renders correctly, including the "incorrect code" message on a wrong attempt.
[1.6.0] - 2026-06-15
Feature
- Admin Email OTP: after a correct password login, a 6-digit code is emailed to the admin's registered address before access is granted. Stolen credentials alone can no longer access the admin panel — the attacker would also need the admin's mailbox.
- Code is cryptographically random, stored SHA-256-hashed with a configurable TTL (default 10 min). After a configurable number of wrong attempts (default 3), the code is invalidated and the admin is logged out.
- Whitelisted IPs (General → IP Whitelist) can optionally bypass OTP, useful for trusted office networks.
- Admin users without a registered email address are logged in normally with a warning — no lock-out scenario.
Admin
- New config group Stores → Configuration → Wimakeit → Security → Admin Login OTP: enable toggle, code validity (seconds), max invalid attempts, whitelist bypass option.
- Security Checker gains two new items: Admin Email OTP enabled (WARN when off) and SMTP configured (WARN when OTP is active but no SMTP transport is detected).
[1.5.2] - 2026-06-12
Security
- ACL privilege separation: the Under Attack mode (stress enable/disable) and the Overview page now have dedicated ACL resources, so a sub-permission no longer implicitly grants the ability to arm or release stress mode.
Fix
- Search route double-block fixed: a bad-bot User-Agent on a search URL was blocked by the Bad Bot Guard and then again by the Search Guard, overwriting the response and double-counting the ban hit.
- "Blocked While Banned" hit counter now only increments against currently active bans, not expired rows.
- Log sanitizer applied consistently to the
action=field and caught DB exception messages.
Admin
- Bad Bot Guard config group now has a unique sortOrder; removed the misleading "(UTC)" suffix from IP Bans grid date columns (the UI already renders them in the admin timezone).
[1.5.1] - 2026-06-12
Admin
- Security Overview page rebuilt with native Magento admin components: status pills (
grid-severity-*),admin__page-sectionblocks, message notices, anddata-gridtables instead of inline-styled custom HTML. - Security Checker and Admin Login Log status badges now use native PASS/WARN/FAIL pills.
[1.5.0] - 2026-06-12
Feature
- IP Bans grid: replaced the static bans table with a full Magento UI component listing — per-column filters (IP, provenance, date ranges), sorting, pagination, column controls, bookmarks, and a mass Unban action (CSRF-safe via UI framework). Expired bans are now visible too, with an active/expired status column.
- Provenance column: shows the ban reason (search throttle, REST/GraphQL, admin brute force, honeypot, bad-bot category) as a filterable select.
- Blocked While Banned counter: a persistent hit count per ban row, incremented each time an already-banned IP is rejected — shows how hard a banned IP keeps hammering.
[1.4.0] - 2026-06-12
Feature
- Bad Bot Guard: site-wide predispatch guard across all frontend routes that bans bots by User-Agent. Four switchable categories: malicious scanners (sqlmap, nikto, nmap…), email/content harvesters (apache-badbots list, modernised), aggressive SEO scrapers (AhrefsBot, SemrushBot, MJ12bot…), AI crawlers (GPTBot, ClaudeBot, CCBot…). Each category is an independent admin toggle.
- Scanners are banned 24h immediately; other categories use the progressive TTL. Bans feed into the existing export pipeline and fail2ban log.
- Custom User-Agent substrings (one per line) on top of built-in categories.
- Dry-Run mode: logs matches (
BAD-BOT-DRYRUN) without blocking — validate a list against real traffic before arming it. - Verified search engines and whitelisted IPs are never banned regardless of User-Agent.
[1.3.2] - 2026-06-12
Fix
- Hotfix:
setup:di:compilefailed because Block classes redeclared a$formKeyproperty already defined inMagento\Backend\Block\Template. Removed the redundant injection; the base class already providesgetFormKey().
[1.3.1] - 2026-06-11
Security
- Log-injection / fail2ban spoofing fixed: CR/LF in a search query, user agent, or username was written verbatim into the fail2ban-parsed log, letting an attacker forge a log line and have fail2ban ban an arbitrary IP. All logged fields now pass through a sanitizer; query validation rejects control characters (HTTP 400).
- Array request params (
?q[]=) handled: array values are now treated as empty instead of casting to the string "Array" and bypassing validation. - CSRF hardening: the Under Attack enable/disable and IP Unban actions are now POST + form key instead of GET links.
- Email alert escaping: attacker-supplied username in the brute-force alert email is HTML-escaped.
- Honeypot abuse mitigated: embedded sub-resource requests (
Sec-Fetch-Dest: image) no longer trigger a ban, preventing a third-party<img>tag from banning your visitors.
Perf
- No session start on the guard hot path: the trusted-client check no longer forces a session, avoiding a Redis session-write storm under flood and fixing breakage in the stateless GraphQL area.
- Reverse-DNS flood protection: a per-minute budget caps blocking DNS lookups so spoofed-crawler floods cannot tie up workers.
AlertMaileris now lazy-loaded via Proxy so the mail stack is not instantiated on every guarded request.
Fix
banned_untilcolumn changed todatetime(removes the year-2038 ceiling on ban expiry).- GraphQL now returns 403 (not 429) for banned IPs, matching the semantics of the other guards.
- Admin login ban now triggers on the configured Nth failure (was N+1).
- Expired-ban purge moved to the daily maintenance cron (was the 5-minute export cron).
[1.3.0] - 2026-06-11
Feature
- GraphQL Guard: plugin on the GraphQL front controller (before query parsing and schema generation) — per-IP rate limit on all
/graphqlrequests (default 60/60s), auto-ban on repeat offenders. Search-shapedproducts(search:)queries also feed the sitewide circuit breaker and are rejected during stress mode. - Advanced search guarded: predispatch observer added on
catalogsearch/advanced/result(same engine cost as standard search, obvious fallback target). - Carding protection:
/V1/guest-cartsadded to the REST API Guard default paths — bots loop onpayment-informationto test stolen card numbers. Default API limit raised to 20/60s so a legitimate guest checkout never trips it. - IPv6 support: whitelist CIDR matching now handles IPv6 (binary comparison via inet_pton); verified-bot forward confirmation resolves AAAA records.
- Client IP resolution checker: detects the proxy/CDN misconfiguration trap where per-IP limits and bans would target the proxy itself instead of the real client.
[1.2.0] - 2026-06-11
Feature
- Admin Login Guard: every login attempt (success and failure) logged to a dedicated table, browsable under Wimakeit → Security → Admin Login Log. IPs exceeding the failure threshold (default 5 / 10 min) are auto-banned (progressive TTL) and blocked with HTTP 429 at predispatch. Alert email on ban. Whitelisted IPs are never banned.
- Block statistics: hourly aggregated counters shown on the Security Overview page — 24h bar chart and 7-day totals by reason (throttled, stress-blocked, banned, REST/GraphQL, honeypot, admin brute force, bad-bot…).
- Under Attack mode: one-click manual stress mode activation (1h) from the Overview page, before the automatic threshold trips; release button when active.
Admin
- Daily maintenance cron purges the login log and statistics older than 90 days.
[1.1.0] - 2026-06-11
Feature
- REST API Guard: throttles or fully blocks configured REST paths — defaults
/V1/cmsPageand/V1/cmsBlock(recurring bot probing targets) — via a plugin on the webapi front controller, before routing, authentication, and deserialization. - Auto-ban: repeat throttle offenders get persistent bans with progressive TTL (5 min → 1h → 24h), stored in
wimakeit_security_ban(cache-first hot path). - Ban exports (cron, every 5 min):
var/wimakeit_security/banned_ips_nginx.conf,banned_ips_apache.conf,banned_ips.txt. - Honeypot (off by default): invisible
rel="nofollow"footer link to/wsecurity/trap; followers are banned 24h. Verified bots and whitelisted IPs are exempt. - Security Checker: 13 checks covering admin usernames, 2FA, admin URL, secret keys, anonymous Web API access, template symlinks, production mode, cache types, HTTPS, HttpOnly cookies, search_query table bloat, exposed files, and guard status. Available in admin UI, CLI (
wimakeit:security:check), and as a daily cron. - CLI
wimakeit:security:edge-config: ready-to-paste nginx/.htaccess snippets matching the current module configuration.
[1.0.0] - 2026-06-11
Feature
- Initial release — Search Guard designed after the 2026-06-10 botnet flood on
catalogsearch/result. - Predispatch guard on the native search results page and Wimakeit Search autocomplete.
- Per-IP rate limit (fixed window, cache-backed) with HTTP 429 and
Retry-After. - Sitewide circuit breaker (stress mode): above a global req/min threshold, only clients with a session-bound form_key cookie are served — stops distributed botnets at ~1 request/IP.
- Query validation (control characters, max length, max word count) with HTTP 400.
- IP whitelist (exact IP, wildcard, IPv4 CIDR).
- Verified search engine bot exemption (forward-confirmed reverse DNS, cached 24h).
- Dedicated parsable log
var/log/wimakeit_security.log(fail2ban-ready). - CRITICAL log entry and optional alert email on stress mode activation.
Een bug gevonden? Laat het ons weten.
Een kort formulier opent in een nieuw tabblad — de modulenaam en uw taal zijn al ingevuld. Beschrijf wat u probeerde, wat misging, en wij komen binnen één werkdag bij u terug.
Een bug melden voor SecurityHulp nodig?
Ons team helpt u graag met de integratie.