AZ-700 · Domain 5: Design and implement Azure network security services · 18% of the exam
Task 5.3: Design and implement a Web Application Firewall (WAF) deployment
WAF features and deployment design, detection and prevention modes, rule sets for WAF on Front Door and on Application Gateway, and creating and associating WAF policies.
Study it
Web Application Firewall policies, modes and rule sets
Try each one before opening the answer. Every option is explained, with the Microsoft documentation page that proves it.
Question 1 · choose 1
An Azure Front Door WAF policy shows: Policy state: Disabled; Policy mode: Prevention. The WAF must start evaluating every request and record the rule matches, without blocking any request. What should you do?
AEnable the policy and switch it to detection mode
BKeep the policy disabled and switch it to detection mode
CEnable the policy and keep prevention mode
DKeep the policy disabled, since a disabled policy logs matches without acting
Show the answer and why
AEnable the policy and switch it to detection mode
Correct
An enabled policy inspects requests, and in detection mode it only monitors and logs the matches.
BKeep the policy disabled and switch it to detection mode
Incorrect
While the policy is disabled, requests bypass the WAF and aren't evaluated.
CEnable the policy and keep prevention mode
Incorrect
In prevention mode the WAF takes the action of a matching rule, so requests can be blocked.
DKeep the policy disabled, since a disabled policy logs matches without acting
Incorrect
A disabled policy pauses inspection; requests go to the back ends without being evaluated.
A Front Door WAF policy can be enabled or disabled; when it's disabled, requests bypass the WAF. An enabled policy in detection mode monitors and logs matches, and in prevention mode takes the rules' actions.
An Application Gateway WAF policy in prevention mode uses Default Rule Set 2.2 with these settings: Enforce request body inspection: On; Enforce maximum request body limit: On; Enforce maximum file upload limit: On. Users upload large video files as multipart/form-data, and the WAF rejects them for size. No upload may be rejected for size, and other request bodies must still be inspected and blocked when they match a rule. What should you turn off?
AEnforce request body inspection
BEnforce maximum request body limit
CEnforce maximum file upload limit
DPrevention mode, by switching the policy to detection mode
Show the answer and why
AEnforce request body inspection
Incorrect
With CRS 3.2 and newer, inspection is set independently of the size limits, and turning it off stops body inspection.
BEnforce maximum request body limit
Incorrect
The request body limit excludes file uploads; multipart uploads with a file name fall under the file upload limit.
CEnforce maximum file upload limit
Correct
With CRS 3.2 and newer, turning off this enforcement stops the WAF from rejecting uploads for being too large.
DPrevention mode, by switching the policy to detection mode
Incorrect
Detection mode stops all blocking, including attacks that other bodies must still be checked for.
With CRS 3.2 or newer, request body inspection, the maximum request body size enforcement and the maximum file upload size enforcement are separate settings. File uploads are multipart/form-data parts with a file name, and only the file upload limit applies to them.
The security team created the WAF policy waf-central in subscription Sub-Sec in West Europe. Application gateways agw-weu (West Europe) and agw-neu (North Europe) run in subscription Sub-App. Both gateways must use the rules in waf-central. What should you do?
AAssociate waf-central with both gateways
BCreate a copy of the policy in Sub-App in each gateway's region and associate it
CAssociate waf-central with agw-weu, which is in the same region
DMove both gateways into Sub-Sec, and then associate waf-central with both of them
Show the answer and why
AAssociate waf-central with both gateways
Incorrect
A WAF policy must be in the same region and subscription as the gateway it's associated with.
BCreate a copy of the policy in Sub-App in each gateway's region and associate it
Correct
Each copy then shares the region and subscription of its gateway, which association requires.
CAssociate waf-central with agw-weu, which is in the same region
Incorrect
The region matches, but the subscription doesn't.
DMove both gateways into Sub-Sec, and then associate waf-central with both of them
Incorrect
agw-neu would still be in a different region from the policy.
A WAF policy can be associated with an Application Gateway only when both are in the same region and subscription, so a shared rule set needs a policy copy per region and subscription.
An Application Gateway WAF policy in prevention mode must block every request from 198.51.100.0/24, and also every request whose User-Agent header contains badbot, wherever it comes from. Which custom rule setup does that?
AOne custom rule that holds both match conditions, with action Block
BTwo custom rules, one per condition, both at priority 10 so they act as one
CTwo custom rules, one per condition, each with action Block and its own priority
DTwo custom rules, one per condition, each with action Log
Show the answer and why
AOne custom rule that holds both match conditions, with action Block
Incorrect
Conditions in one rule are combined with and, so only badbot requests from that range would be blocked.
BTwo custom rules, one per condition, both at priority 10 so they act as one
Incorrect
A custom rule's priority must be unique across all custom rules.
CTwo custom rules, one per condition, each with action Block and its own priority
Correct
To combine two conditions with or, they must be in different rules.
DTwo custom rules, one per condition, each with action Log
Incorrect
Log writes to the log and lets the rest of the rules run instead of blocking the request.
Match conditions within one custom rule are always combined with and; to use or between two conditions, put them in different rules. Each custom rule needs a priority that is unique across the policy's custom rules, and the Block action blocks the request in prevention mode.
Users reach Azure Front Door through their company's proxy servers, which add the X-Forwarded-For header. A WAF geo-filtering rule must act on the users' own locations. Which match variable should the rule use?
ASocketAddr
BRequestUri
CRequestHeader Host
DRemoteAddr
Show the answer and why
ASocketAddr
Incorrect
SocketAddr is the source IP the WAF sees, which is usually the proxy's.
BRequestUri
Incorrect
Geo-filtering rules match on a client address variable, not the URI.
CRequestHeader Host
Incorrect
The Host header names the site, not the client's location.
DRemoteAddr
Correct
RemoteAddr is the original client IP, usually sent in the X-Forwarded-For header.
A geo-filtering rule's match variable is RemoteAddr or SocketAddr. RemoteAddr is the original client IP, usually from X-Forwarded-For; SocketAddr is the address WAF sees, often a proxy's.