4 of the 7 questions we have for this objective, shown with the answer and the reasoning.
Design and implement a Web Application Firewall (WAF) deployment
Hollins Travel has an Application Gateway WAF_v2 named agw-book whose WAF policy still uses OWASP CRS 3.1. The security team wants to move to the latest Microsoft-recommended managed rule set version for Application Gateway, which uses anomaly scoring and includes the rules developed by the Microsoft Threat Intelligence team, and to add the bot protection rule set so that known bad bots are blocked alongside OWASP-style attacks.
Which managed rule sets should you configure in the WAF policy?
- ADRS 2.2 together with Microsoft_BotManagerRuleSet 1.1.DRS 2.2 is the latest and recommended Application Gateway rule set; it is baselined on OWASP CRS 3.3.4, runs on the anomaly scoring engine, includes the Microsoft Threat Intelligence rule groups, and can be combined with the Bot Manager rule set.
- BOWASP CRS 3.0 together with Microsoft_BotManagerRuleSet 1.0.CRS 3.0 runs on the older engine without anomaly scoring and lacks the Microsoft Threat Intelligence rules; it is far from the latest version.
- CDRS 2.1 together with Microsoft_BotManagerRuleSet 1.1.DRS 2.1 (baselined on CRS 3.3.2) is still supported and also uses anomaly scoring with Microsoft Threat Intelligence rules, but it has been superseded by DRS 2.2, which Microsoft recommends for new policies and upgrades; the scenario asks for the latest version.
- DOWASP CRS 3.2 together with OWASP CRS 3.1 to combine the rule coverage of both versions.A WAF policy can have only one core rule set version active at a time, and neither CRS 3.1 nor CRS 3.2 includes the Microsoft Threat Intelligence rule groups.
Why: Application Gateway WAF supports the OWASP CRS versions 3.0, 3.1 and 3.2 and the Microsoft Default Rule Set versions DRS 2.1 and DRS 2.2. DRS 2.2 is the latest and recommended version: it is baselined on OWASP CRS 3.3.4, runs on the anomaly scoring engine, and includes proprietary rule groups developed by the Microsoft Threat Intelligence team such as MS-ThreatIntel-CVEs. DRS 2.1 (CRS 3.3.2) remains available but Microsoft recommends upgrading existing CRS 3.1, CRS 3.2 and DRS 2.1 policies to DRS 2.2. The Bot Manager rule set (version 1.0 or 1.1) is added alongside the core rule set to allow good bots and block bad ones. Only one core rule set version can be active per policy, so combining CRS versions is not possible. The deciding requirement is the latest recommended version, which pins the answer to DRS 2.2 rather than the still-supported DRS 2.1.
Design and implement a Web Application Firewall (WAF) deployment
Saltmarsh Bank runs its online banking portal behind Azure Front Door Premium with a WAF policy named wafp-fd-bank. Requirements: protect against OWASP-style attacks using the newest Microsoft-managed rules; block requests identified as known malicious bots; block all traffic from countries other than the United Kingdom and Ireland; and limit each client IP address to 100 requests per minute on the path /api/login.
How should you configure wafp-fd-bank?
- AAdd the Microsoft_DefaultRuleSet 2.2 and Microsoft_BotManagerRuleSet 1.1 managed rule sets; add a custom match rule with GeoMatch not in GB or IE with action Block; add a custom rate limit rule on RequestUri contains /api/login with a 100-request threshold per 1 minute and action Block.Front Door WAF supports DRS 2.2 (the newest Default Rule Set, baselined on OWASP CRS 3.3.4) and the Bot Manager rule set as managed rules, geo-filtering through GeoMatch custom rules, and rate limiting as a custom rule type with a per-client threshold.
- BAdd the OWASP_CRS 3.2 and Microsoft_BotManagerRuleSet 1.1 managed rule sets; add a custom rule with GeoMatch for GB and IE with action Block; add a rate limit rule with a 100-request threshold.OWASP CRS 3.2 is an Application Gateway rule set and is not available on Front Door; also, a GeoMatch rule that blocks GB and IE inverts the requirement.
- CAdd the Microsoft_DefaultRuleSet 2.2 managed rule set; enable Front Door caching to absorb excess requests to /api/login; use Azure Firewall Premium web categories to block non-UK traffic.Caching does not enforce a per-client request limit on a login endpoint, and Azure Firewall web categories classify sites by content, not client country.
- DDowngrade to Front Door Standard, add the Microsoft_DefaultRuleSet 2.2 managed rule set, and add rate limit and GeoMatch custom rules to minimize cost.Managed rule sets, including DRS 2.2 and Bot Manager, require Front Door Premium; the Standard tier WAF supports only custom rules.
Why: WAF on Azure Front Door uses the Microsoft_DefaultRuleSet (DRS) family rather than the OWASP CRS versions that Application Gateway also offers. The newest version is DRS 2.2, baselined on OWASP CRS 3.3.4 with additional Microsoft Threat Intelligence rules; DRS 2.1 remains supported but is no longer the latest. Front Door also offers the Microsoft_BotManagerRuleSet (1.1) for classifying good, bad and unknown bots. Geo-filtering is implemented with custom rules using the GeoMatch operator on the RemoteAddr or SocketAddr variable, and rate limiting is a dedicated custom rule type that counts requests per client over a 1-minute or 5-minute window. All managed rule sets require the Premium tier. The deciding details are the four distinct requirements, each of which maps to a specific rule set or custom rule type; the distractors use an Application Gateway-only rule set on Front Door, invert the geo logic, or assume the Standard tier supports managed rules.
Design and implement a Web Application Firewall (WAF) deployment
Pellworth Media has an Application Gateway WAF_v2 named agw-media with one HTTPS listener and a path-based routing rule that sends /api/* to an API backend pool and everything else to a web backend pool. A WAF policy named wafp-default (DRS 2.1, Prevention mode) is associated with the gateway. The API team needs a different policy named wafp-api that disables rule group REQUEST-920-PROTOCOL-ENFORCEMENT for the /api/* traffic only, while all other traffic must continue to use wafp-default. The company wants to avoid deploying additional gateways or listeners.
How should you associate wafp-api?
- AAssociate wafp-api with the /api/* path rule of the path-based routing rule.Application Gateway supports per-URI WAF policies: a policy associated with a path rule overrides the gateway-level policy for requests matching that path only.
- BAssociate wafp-api with the HTTPS listener.A listener-level policy applies to every request arriving on that listener, including the web paths, so all traffic would lose the protocol enforcement rules.
- CAssociate both wafp-default and wafp-api with agw-media at the gateway level and order them so wafp-api is evaluated first for /api/* requests.Only one WAF policy can be associated at a given scope; there is no ordering of multiple gateway-level policies.
- DCreate a second Application Gateway WAF_v2 for the API, associate wafp-api with it, and update DNS so api.pellworth.example resolves to the new gateway.This works but adds a second gateway and DNS change, which the company explicitly wants to avoid when path-rule association achieves the same result.
Why: A WAF policy on Application Gateway can be associated at three scopes: the whole gateway (global), an individual listener, or a path-based rule within a routing rule (per-URI). When policies exist at more than one scope, the most specific one wins for matching requests, so a path-rule policy applies to /api/* while the gateway policy continues to protect everything else. The deciding constraints are that only /api/* should be relaxed and that no new gateways or listeners may be added, which rules out listener-level association (too broad) and a second gateway (too much infrastructure). A gateway can have only one policy per scope, so stacking two gateway-level policies is not possible. Per-URI policies require the WAF_v2 SKU and a WAF policy resource rather than the legacy inline WAF configuration.
Design and implement a Web Application Firewall (WAF) deployment
Mirabel Health runs a patient portal behind an Application Gateway WAF_v2 named agw-portal with a WAF policy named wafp-portal using DRS 2.1 in Prevention mode. Three problems were reported. First, legitimate requests are blocked because a cookie named SessionData contains base64 text that triggers SQL injection rule 942440. Second, the path /account/login is being brute-forced from many IP addresses, each sending about 300 requests per minute. Third, the path /admin must be reachable only from the company office range 198.51.100.0/24. The policy must remain in Prevention mode with the managed rules otherwise unchanged.
Which three changes should you make to wafp-portal? Each correct answer presents part of the solution.
- AAdd a per-rule exclusion for rule 942440 with match variable RequestCookieNames, operator Equals, selector SessionData.A per-rule exclusion removes only the named cookie from inspection by the one rule producing the false positive, keeping all other protection intact.
- BAdd a custom rate limit rule with priority 10 matching RequestUri contains /account/login, grouped by client address, with a threshold of 100 requests per 1 minute and action Block.Rate limit custom rules on Application Gateway WAF v2 block clients that exceed a request threshold per window, which stops the brute-force pattern without affecting normal users.
- CAdd a custom match rule with priority 20 that blocks requests where RequestUri begins with /admin and RemoteAddr is not in 198.51.100.0/24.A custom match rule combining the URI and a negated IP match restricts the admin path to the office range while leaving the rest of the site unaffected.
- DDisable the entire REQUEST-942-APPLICATION-ATTACK-SQLI rule group so the cookie is no longer inspected.Disabling the whole SQL injection rule group removes protection from every request parameter, which is far broader than the single-cookie false positive and violates the requirement to leave managed rules otherwise unchanged.
- ESwitch wafp-portal to Detection mode so the false positive no longer blocks patients.Detection mode stops all blocking, including the brute-force and admin restrictions, and the scenario requires the policy to stay in Prevention mode.
Why: Implementing a WAF policy well means using the narrowest control for each problem. False positives are handled with exclusions, which can be scoped to a single rule, a rule group or the whole rule set and target request header names, cookie names, argument names or (with DRS 2.1) request body values; a per-rule exclusion on the SessionData cookie for rule 942440 is the least-privilege fix. Brute-force traffic is addressed with rate limit custom rules, which are supported on Application Gateway WAF v2 and group counting by client address or geo. Path-based access restriction is a custom match rule combining RequestUri and a negated RemoteAddr IPMatch; custom rules carry priorities 1 to 100 and are evaluated before managed rules. Disabling an entire rule group or dropping into Detection mode solves the false positive by removing protection, which the scenario explicitly forbids.