Enforce HTTP RFC compliance
The Citrix Web Web App Firewall (WAF) complies with HTTP RFC by inspecting the web traffic (both request and response messages) and dropping a message that does not comply to RFC compliance. However, there are scenarios where the appliance might have to bypass a non-RFC compliant web traffic. In such cases, the appliance allows the traffic by bypassing the RFC checks.
In WAF, you can block or bypass web traffic by setting the RFC profile in the Profile Settings section. You can set the RFC profile either in “Block” or “Bypass” mode. By doing this, any invalid traffic that matches the Web App Firewall profile will be either bypassed or blocked accordingly.
When you set the RFC profile in “Bypass” mode, you must make sure you disable the transformation option in the “HTML Cross-Site Scripting Settings” and in the “HTML SQL Injection Settings” sections. If you enable the option and set the rfc profile in “Bypass” mode, the appliance displays a warning message, “Transform cross-site scripts” and “Transform SQL special characters” are both currently ON. Recommend to turn it off when used with APPFW_RFC_BYPASS”.
Also, the appliance displays a warning note, “Appfw Security checks enabled might not be applicable to requests which violates RFC checks when this profile is set. Enabling any transformation setting is not recommended as requests might be partially transformed that contains RFC violations.”
To configure RFC profile in the Web App Firewall profile by using the command line interface
At the command prompt, type the following commands:
set appfw profile <profile_name> -rfcprofile <rfcprofile_name
set appfw profile P1 -rfcprofile APPFW_RFC_BLOCK
By default, the rfc profile is bound to the Web App Firewall profile in “Block” mode.
To configure RFC profile in the Web App Firewall profile by using the GUI
- Navigate to Security > Application Firewall > Profiles.
- In the Profiles page, select a profile and click Edit.
- In the Web App Firewall Profile page, click Profile settings from Advanced Settings section.
- In the HTTP Settings section, set the RFC profile in APPFW_RFC_BYPASS mode. The system displays a warning message, “Appfw Security checks enabled might not be applicable to requests which violates RFC checks when this profile is set. Enabling any transformation setting is not recommended as requests might be partially transformed that contains RFC violations”.
To bypass or block non-RFC compliance invalid HTTP requests
The “malformedReqAction” option in the application firewall global settings enables you to block or bypass non-RFC compliance requests. These are requests that are tagged as “invalid” by the HTTP module.
For example, if there is an incoming HTTP request that has a host header missing, such invalid requests are bypassed or blocked by the “malformedReqAction” feature.
If you disable the “block” option in the “malformedReqAction” parameter, the appliance bypasses the entire app firewall processing for all non-RFC compliance requests and forwards the requests to the next module.
To block or bypass invalid non-RFC complaint HTTP requests by using the command line interface
To block or bypass invalid requests, enter the following command:
set appfw settings -malformedreqaction <action>
set appfw settings –malformedReqAction block
To display malformed request action settings
To display malformed request action settings, enter the following command:
show appfw settings
DefaultProfile: APPFW_BYPASS UndefAction: APPFW_BLOCK SessionTimeout: 900 LearnRateLimit: 400 SessionLifetime: 0 SessionCookieName: citrix_ns_id ImportSizeLimit: 134217728 SignatureAutoUpdate: OFF SignatureUrl:"https://s3.amazonaws.com/NSAppFwSignatures/SignaturesMapping.xml" CookiePostEncryptPrefix: ENC GeoLocationLogging: OFF CEFLogging: OFF EntityDecoding: OFF UseConfigurableSecretKey: OFF SessionLimit: 100000 MalformedReqAction: block log stats Done
To block or bypass invalid non-RFC complaint HTTP requests by using the Citrix ADC GUI
- Navigate to Security > Citrix Web App Firewall.
- In the Citrix Web App Firewall page, click Change Engine Settings under Settings.
- In the Configure Citrix Web App Firewall Settings page, select the Log Malformed Request option as Block, Log or Stats.
- Click OK and Close.
If you unselect the “block” action or do not select any malformed request action, the appliance bypasses the request without intimating the user.