Rule ID
SV-289074r1317991_rule
Version
V1R1
CCIs
Invalid user input occurs when a user inserts data or characters into an application's data entry fields and the application is unprepared to process that data. This results in unanticipated application behavior potentially leading to an application or information system compromise. Invalid input is one of the primary methods employed when attempting to compromise an application. NetScaler Gateway has the functionality to perform application layer inspection which may be leveraged to validate data content of network communications. Checking the valid syntax and semantics of information system inputs (e.g., character set, length, numerical range, and acceptable values) verifies that inputs match specified definitions for format and content. Software typically follows well-defined protocols that use structured messages (i.e., commands or queries) to communicate between software modules or system components. Structured messages can contain raw or unstructured data interspersed with metadata or control information. If network elements use attacker-supplied inputs to construct structured messages without properly encoding such messages, then the attacker could insert malicious commands or special characters that can cause the data to be interpreted as control information or metadata. Consequently, the module or component that receives the tainted output will perform the wrong operations or otherwise interpret the data incorrectly. Prescreening inputs prior to passing to interpreters prevents the content from being unintentionally interpreted as commands. Input validation helps to ensure accurate and correct inputs and prevent attacks such as cross-site scripting and a variety of injection attacks. This requirement applies to NetScaler Gateways that perform content inspection.
Verify the NetScaler Gateway checks the validity of all data inputs by enforcing strict HTTP validation and applying a Web App Firewall (WAF) profile. Method 1: GUI Verification 1. Log in to the NetScaler GUI. 2. Navigate to System >> Settings and select "Change HTTP Parameters". 3. Verify the "Drop Invalid HTTP Requests" checkbox is selected. 4. Navigate to Security >> Citrix Web App Firewall. 5. Under the "Policy Manager" section in the main panel, select "Citrix Web App Firewall Policy Manager". 6. From the "Bind Point" drop-down menu, select "Default Global", ensure the "Protocol" is set to "HTTP", and select "Continue". 7. Verify an active WAF policy is bound in the list. Method 2: CLI Verification 1. Log in to the NetScaler CLI. 2. Run the following command to verify HTTP validation: show ns httpParam 3. Verify "Drop invalid HTTP requests" is set to "ON". 4. Run the following command to verify WAF binding: show appfw global 5. Verify that a WAF policy is globally bound under the "Default Global" (REQ_DEFAULT) section. If "Drop Invalid HTTP Requests" is not enabled, or if a WAF policy is not globally bound to inspect traffic, this is a finding.
Configure the NetScaler Gateway to check the validity of all data inputs by enforcing strict HTTP validation and binding a WAF profile. Method 1: GUI Configuration 1. Log in to the NetScaler GUI. 2. Navigate to System >> Settings and select "Change HTTP Parameters". 3. Select the "Drop Invalid HTTP Requests" checkbox and select "OK". 4. Navigate to Security >> Citrix Web App Firewall. 5. Under the "Policy Manager" section in the main panel, select "Citrix Web App Firewall Policy Manager". 6. From the "Bind Point" drop-down menu, select "Default Global", ensure the "Protocol" is set to "HTTP", and select "Continue". 7. If presented with a list of bindings, select "Add Binding". 8. In the "Policy Binding" section, choose "Select to select" and select the active WAF policy. 9. Assign a unique priority and select "Bind". 10. Select "Done" and save the configuration. Method 2: CLI Configuration 1. Log in to the NetScaler CLI. 2. Run the following command to enable strict HTTP validation: set ns httpParam -dropInvalReqs ON 3. Run the following command to bind the WAF policy to the Default Global bind point: bind appfw global <policy_name> <priority_number> -type REQ_DEFAULT 4. Run the following command to save the configuration: save ns config