XML external entities (XXE) Attack Protection
The XML external entities (XXE) attack protection examines if an incoming payload has any unauthorized XML input regarding entities outside the trusted domain where the web application resides. The XXE attack occurs if you have a weak XML parser that parses an XML payload with input containing references to external entities.
In a Citrix ADC appliance, if the XML parser is improperly configured, the impact of exploiting the vulnerability can be dangerous. It allows an attacker to read sensitive data on the web server. Perform the denial of service attack and so forth. Therefore, it is important protect the appliance from XXE attacks. Web Application Firewall is able to protect the appliance from XXE attacks as long as the content-type is identified as XML. To prevent a malicious user from bypassing this protection mechanism, WAF blocks an incoming request if the “inferred” content-type in the HTTP headers does not match with the content-type of the body. This mechanism prevents the XXE attack protection bypass when a whitelisted default or non-default content-type is used.
Some of the potential XXE threats that affect a Citrix ADC appliance are:
- Confidential data leaks
- Denial-of-service (DOS) attacks
- server side forgery requests
- Port scanning
Configure XML external entities (XXE) injection protection
To configure XML external entities (XXE) check by using the command interface: In the command line interface, you can add or modify the application firewall profile command to configure theXXEsettings. You can enable the block, log, and stats actions.
At the command prompt, type:
set appfw profile
Note:
By default, the XXE action is set as “none.”
Example:
set appfw profile profile1 -inferContentTypeXmlPayloadAction Block
Where, action types are:
Block: The request is blocked without any exception to the urls in the request.
Log: If a mismatch between content-type in an HTTP request header and payload occurs, information about the violating request must be contained in the log message.
Stats: If a mismatch in the content-types is detected, the corresponding statistics for this violation type is incremented.
None: No action is taken if mismatch in content-types is detected. None cannot be combined with any other action type. Default action is set to None.
Configure XXE injection check by using Citrix ADC GUI
Complete the following steps to configure the XXE injection check.
- Navigate toSecurity > Citrix Web App Firewall > Profiles.
- On theProfilespage, select a profile and clickEdit.
On theCitrix Web App Firewall Profilepage, go to theAdvanced Settingssection and clickSecurity Checks.
- In theSecurity Checkssection, selectInfer Content Type XML Payloadand clickActionsettings.
In the Infer Content Type XML Payload Settings page, set the following parameters:
- Actions. Select one or more actions to perform for XXE injection security check.
ClickOK.
Viewing XXE injection traffic and violation statistics
The Citrix Web App Firewall Statistics page shows security traffic and security violation details in a tabular or graphical format.
To view security statistics by using the command interface.
At the command prompt, type:
stat appfw profile profile1
Viewing XXE injection statistics by using the Citrix ADC GUI
Complete the following steps to view the XXE injection statistics:
- Navigate toSecurity > Citrix Web App Firewall > Profiles.
- In the details pane, select a Web App Firewall profile and clickStatistics.
- TheCitrix Web App Firewall Statisticspage displays the XXE command injection traffic and violation details.
- You can selectTabular Viewor switch toGraphical Viewto display the data in a tabular or graphical format.