Rule ID
SV-289076r1317997_rule
Version
V1R1
Data mining is the analysis of large quantities of data to discover patterns and is used in intelligence gathering. Failure to prevent attacks launched against organizational information from unauthorized data mining may result in the compromise of information. Injection attacks allow an attacker to inject code into a program or query or inject malware onto a computer to execute remote commands that can read or modify a database, or change data on a website. Web applications frequently access databases to store, retrieve, and update information. An attacker can construct inputs that the database will execute. This is most commonly referred to as a code injection attack. This type of attack includes XPath and LDAP injections. Compliance requires the ALG to have the capability to prevent code injections. Examples include a WAFs or database application gateways. Satisfies: SRG-NET-000318-ALG-000014, SRG-NET-000318-ALG-000152, SRG-NET-000076-ALG-000045
Verify the NetScaler Gateway implements Application WAF protections against SQLi attacks. Method 1: GUI Verification 1. Log in to the NetScaler GUI. 2. Navigate to System >> Settings >> Configure Advanced Features. 3. Verify that "Web App Firewall" is checked (enabled). 4. Navigate to Security >> Citrix Web App Firewall >> Profiles. 5. Select the AppFw Profile bound to the active Gateway Virtual Server and select "Edit". 6. In Advanced Settings menu on the right, select "Security Checks". 7. In the main panel, verify "SQL Injection" has "Block" enabled. Method 2: CLI Verification 1. Log in to the NetScaler CLI. 2. Run the following command to verify the WAF feature is enabled: show ns feature 3. Verify the output shows "AppFw" as "ON". 4. Run the following command to identify the active WAF policy and profile: show appfw global 5. Run the following command to view the profile settings (replace <profile_name> with the active profile): show appfw profile <profile_name> 6. Verify the output displays the following parameter: sqliAction: block If the Web App Firewall feature is not enabled, or if SQL Injection protection is not set to block, this is a finding.
Configure the NetScaler Gateway Application WAF to protect against SQLi attacks. Method 1: GUI Configuration 1. Log in to the NetScaler GUI. 2. Navigate to System >> Settings >> Configure Advanced Features, check the box for "Web App Firewall", and select "OK". 3. Navigate to Security >> Citrix Web App Firewall >> Profiles. 4. Select "Add" to create a new profile (or select an existing profile and select "Edit"). 5. In Advanced Settings menu on the right, select "Security Checks". 6. In the main panel, locate "SQL Injection" and check the box in the "Block" column. Select "OK". 7. Navigate to Security >> Citrix Web App Firewall >> Policies >> Firewall. Select "Add". 8. Name the policy, select the profile configured in Step 6 as the action, enter "true" as the expression, and select "Create". 9. Navigate to Security >> Citrix Web App Firewall >> Policies >> Firewall. 10. Select "Policy Manager". 11. Select "Default Global" from the Bind Point drop-down menu and select "Continue". 12. Select "Add Binding", select the policy created in Step 8, assign a unique priority, and select "Bind". 13. Save the running configuration. Method 2: CLI Configuration 1. Log in to the NetScaler CLI. 2. Run the following command to enable the Application Firewall feature: enable ns feature AppFw 3. Run the following command to create or update an Application Firewall profile with the required SQLi inspection features: add appfw profile <profile_name> -sqliAction block log stats 4. Run the following command to create an AppFw policy linking to the profile: add appfw policy <policy_name> true <profile_name> 5. Run the following command to bind the AppFw policy globally: bind appfw global <policy_name> <priority_number> -type REQ_DEFAULT 6. Run the following command to save the configuration: save ns config