Enforce HTTP RFC compliance
Block or bypass non-RFC compliant requests at global level
malformedReqAction option in the application firewall global settings.
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
set appfw settings -malformedreqaction <action>
set appfw settings –malformedReqAction block
To display malformed request action settings
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 NetScaler GUI
-
Navigate to Security > NetScaler Web App Firewall.
-
In the NetScaler Web App Firewall page, click Change Engine Settings under Settings.
-
In the Configure NetScaler Web App Firewall Settings page, select the Log Malformed Request option as Block, Log, or Stats.
-
Click OK and Close.
Block or bypass non-RFC compliant requests at profile level
-
Invalid GWT-RPC requests
-
Invalid content type headers
-
Invalid Multipart requests
-
Invalid JSON requests
-
Duplicate cookie name value pair checks
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 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 turning it off when used with APPFW_RFC_BYPASS.
To configure an RFC profile in the Web App Firewall profile by using the command line interface
set appfw profile <profile_name> -rfcprofile <rfcprofile_name
Example
set appfw profile P1 -rfcprofile APPFW_RFC_BLOCK
RFC profile is bound to the Web App Firewall profile in Block mode.
To configure an RFC profile in the Web App Firewall profile by using the GUI
-
Navigate to Security > NetScaler Web App Firewall > Profiles.
-
In the Profiles page, select a profile and click Edit.
-
In the Web App Firewall Profile page, click Profile settings from the Advanced Settings section.
-
In the HTML Settings section, set the
RFCprofile inAPPFW_RFC_BYPASSmode. 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".