FortiWeb
A FortiWeb can be configured to join a Security Fabric through the root or downstream FortiGate.
fomar
Staff
Staff
Article Id 229694
Description

This article describes how to configure protection policy to prevent Man-in-the-Browser (MiTB) attacks.

 

Man-in-the-Browser (MiTB) attacks utilize a Trojan horse that infects a web browser and manipulates calls between the browser and its security mechanisms by taking advantage of browser vulnerabilities to modify web pages, changing content or inserting additional data to ongoing transactions.

Scope

FortiWeb 7.0.3, 6.4.2, 6.3.20.

Solution

FortiWeb implements security rules including obfuscation, encryption, anti-keylogger, and an AJAX request whitelist.

Step 1: Create an (MiTB) Protection Rule:


1) Navigate to Web Protection -> Advanced Protection -> Man in the Browser Protection in the GUI.

 

2) Select the Man in the Browser Protection Rule tab.

 

3) Select Create New.


1.png

 

4) Configure the following settings:

 

- Name: Enter a name that other parts of the configuration can reference.

 

- Host Status: Enable checking the hostname of the protected website. The rule will only apply when the hostname matches (optional).

 

- Host: Set the hostname of the protected application. For example, 'www.example.com'.

 

- URL Type: Choose from one of the following options.

Simple String: The field is a string that the request URL must match exactly.

Regular Expression: The field is a regular expression that defines a set of matching URLs.

 

- Request URL: The URL that hosts the web page containing the user input fields you want to protect. In this example, the request URL (login URL) is /dvwa/login.php.

 

- Post URL: This is the URL when the user inputs (e.g. username, password) posted to the web server. In this example, POST URL is same with Request URL.

 

- Action: Select an action for FortiWeb to take when it detects a violation of the rule.


2.png 

5) Configure the Protected Parameter Table. Add the 'Parameter Names' that should be obfuscated and/or encrypted from the HTML page:


3.png


The username/password parameter names can be identified from the Elements view of the developer tools in the browser of the protected application login web page. See the example from the DVWA application below:


4.png

 

6) Create the (MiTB) Protection Policy. Navigate to Web Protection -> Advanced Protection -> Man in the Browser Protection, select the Man in the Browser Protection Policy tab, then select Create New.


5.png


7) In the new Man in the Browser Rule pane, select the MiTB rule created in the previous steps. 
Multiple MiTB protection rules can be added to one MiTB policy.


6.png

 

8 ) Assign the MiTB Protection Policy to the Web Protection Profile.

This will apply the MiTB Protection Policy rules.


7.png

9) Before applying the policy, the username and password were explicit as shown below:


before.png

 

10) The result after applying the policy would show the username and password obfuscated as shown in the green frame, and the encrypted password is in the red frame.


after.png