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

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.


FortiWeb 7.0.3, 6.4.2, 6.3.20.


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.



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, ''.


- 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.


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


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:



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.


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.



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

This will apply the MiTB Protection Policy rules.


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



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.