Creating Web App Firewall profiles
-
Grammar-based SQL injection
-
Grammar-based CMD injection
-
Cross-site scripting
-
Buffer overflow
-
Block keywords
-
HTML. Protects standard HTML-based websites.
-
XML. Protects XML-based web services and websites.
-
Web 2.0 (HTML XML). Protects websites that contain both HTML and XML elements, such as ATOM feeds, blogs, and RSS feeds.
To create a Web App Firewall profile by using the command line interface
-
add appfw profile <name> [-defaults ( basic | advanced | core | cve)] -
set appfw profile <name> -type ( HTML | XML | HTML XML ) -
set appfw profile <name> -comment "<comment>" -
save ns config
Example
pr-basic, with basic defaults, and assigns a profile type of HTML. This is the appropriate initial configuration for a profile to protect an HTML website.
add appfw profile pr-basic -defaults basic -comment "Simple profile for websites."
set appfw profile pr-basic -type HTML
save ns config
To create a Web App Firewall profile by using the GUI
-
Navigate to Security > NetScaler Web App Firewall > Profiles.
-
In the details pane, click Add.
-
In the Create Web App Firewall Profile page, set the following basic parameters:
-
Name
-
Profile Type
-
Comments
-
Defaults
-
Description
-
-
Click OK.
-
Select the profile that you created and click Edit.
-
In the Advanced Settings section, complete the following configurations:
-
Security Checks
-
Profile Settings
-
Dynamic Profiling
-
Relaxation Rules
-
Deny Rules
-
Learned Rule
-
Extended Logging
-
-
In the Security Checks section, select a security protection and click Action Settings.
-
In the security check page, set the parameters.Note:The Active Rule setting is available only for HTML SQL Injection check to activate relaxation rule or deny rule for SQL injection check. For more information, see Relaxation and Deny Rules topic.
-
Click OK and Close.
-
In the Profile Settings section, set the profile parameters. For more information, see Configure Web App Firewall Profile settings topic. For configuring Verbose Log Level, see Ease of troubleshooting with Web Application Firewall logs.
-
In the Dynamic Profiling section, select a security check to add dynamic profile settings. For more information, see Dynamic Profile topic.
-
In the Relaxation Rules section, click Edit to add a relaxation rule for a security check. For more information, see Relaxation Rule for details.
-
In the Deny Rules section, add a deny rule for the HTML SQL Injection check. For more information, see HTML Deny Rules topic.
-
In the Learnt Rule section, set the learning settings. For more information, see Web App Firewall Learning topic.
-
In the Extended logging section, click Add for masking sensitive data. For more information, see Extended logging topic.
-
Click Done, and then click Close.
Configure fake account detection rules
-
Enable fake account detection feature
-
Bind fake account rules
Enable fake account detection feature
add/set appfw profile <name> -FakeAccountDetection ( ON | OFF )
add appfw profile profile1 -FakeAccountDetection ON
Bind fake account rules
bind appfw profile <name> -FakeAccount (string|expression) isFieldNameRegex (ON|OFF) -tag <TagExpression> ([-formUrl <FormURL>]| [-formExpression <FormExpression>)]) –state (ENABLED|DISABLED)
-
formUrl: HTTP form action URL. formExpression: Form expression to be evaluated. -
fakeaccount: Name of the fake account. tag: Tag expression. -
isFieldNameRegex: Specifies whether the fieldName is regex. Default value OFF.
bind appfw profile profile1 -FakeAccount john -formURL “/signup.php" -tag "smith" bind appfw profile profile2 -FakeAccount Will -formExpression "HTTP.REQ.HEADER(\"Authorization\").CONTAINS(\"/test_accounts\").NOT && HTTP.REQ.URL.CONTAINS(\"/login.php\")" -fieldName -tag "smith"
example.com signup page.
| S.no | Input | Example |
|---|---|---|
| 1 | Signup HTTP POST request endpoint URL | https://webapi.example.com/account/api/v1.0/contacts/ |
| 2 | Email Field name in HTTP post request | Email address |
| 3 | First name Field name in HTTP post request | First name |
| 4 | Last name Field name in HTTP post request | Last name |
Configure Web App Firewall fake account detection rule by using the GUI
-
Navigate to Configuration > Security > NetScaler Web App Firewall > Profile.
-
Select a profile and click Edit.
-
In the NetScaler Web App Firewall Profile page, click Security Checks from Advanced Settings.
-
In the Checks Integrated with Citrix Cloud™ section, select a fake account rule and click Edit.
-
In the AppFirewall Fake Account Binding slider, select a rule to edit or click Add.
-
In the Fake Account rule page, set the following parameters:
-
Enabled. Select to activate the fake account rule.
-
Fake Account Name. Name of the fake account rule.
-
Tag. First name in the fake account registration form.
-
Is Field Name Regex? Select if the form field is a regular expression.
-
Form Expression. Regular expression that defines the fake account.
-
Form URL. Enter the fake account detection URL.
-
Comments. A brief description about the fake account detection rule.
-
-
Click Create.