Skip to Content

Solved: How do I configure protection policy to prevent Man-in-the-Browser (MiTB) attacks?

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: Navigate to Web Protection > Advanced Protection > Man in the Browser Protection in the GUI.

Step 2: Select the Man in the Browser Protection Rule tab

Step 3: Select Create New.

Create an (MiTB) Protection Rule

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

Configure the (MiTB) Protection Rule settings

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

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:

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.

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

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.

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

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.

Step 8: Assign the MiTB Protection Policy to the Web Protection Profile. This will apply the MiTB Protection Policy rules.

Assign the MiTB Protection Policy to the Web Protection Profile. This will apply the MiTB Protection Policy rules.

Alex Lim is a certified IT Technical Support Architect with over 15 years of experience in designing, implementing, and troubleshooting complex IT systems and networks. He has worked for leading IT companies, such as Microsoft, IBM, and Cisco, providing technical support and solutions to clients across various industries and sectors. Alex has a bachelor’s degree in computer science from the National University of Singapore and a master’s degree in information security from the Massachusetts Institute of Technology. He is also the author of several best-selling books on IT technical support, such as The IT Technical Support Handbook and Troubleshooting IT Systems and Networks. Alex lives in Bandar, Johore, Malaysia with his wife and two chilrdren. You can reach him at [email protected] or follow him on Website | Twitter | Facebook

    Ads Blocker Image Powered by Code Help Pro

    Your Support Matters...

    We run an independent site that is committed to delivering valuable content, but it comes with its challenges. Many of our readers use ad blockers, causing our advertising revenue to decline. Unlike some websites, we have not implemented paywalls to restrict access. Your support can make a significant difference. If you find this website useful and choose to support us, it would greatly secure our future. We appreciate your help. If you are currently using an ad blocker, please consider disabling it for our site. Thank you for your understanding and support.