Technical Tip: SSL VPN Certificate Man in the Middle (MitM) attack mitigation for SMEs
Description
This article has been raised due to the highlighted problem and complexity of managing SSL certificates referenced in these articles:
Fortinet VPN with Default Settings Leave 200,000 Businesses Open to Hackers.
https://thehackernews.com/2020/09/fortigate-vpn-security.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+TheHackersNews+%28The+Hackers+News+-+Cyber+Security+Blog%29
Breaching The Fort.
https://securingsam.com/breaching-the-fort/
FortiGate VPN Default Config Allows MitM Attacks.
https://threatpost.com/fortigate-vpn-default-config-mitm-attacks/159586/
When access to Fortinet SSLVPN with a self-signed certificate is made, the user will receive a certificate warning alert to inform the user that the certificate is untrusted or unknown and ask the user to confirm if they would like to accept this certificate.
The common message from FortiClient (Fortinet VPN Client):

The following instructions describe how to mitigate SSL Man in the Middle (MitM) attacks when connecting to SSL VPN and are aimed especially at small-medium businesses who regularly have a work-from-home routine and now require near-enterprise grade security, but unfortunately do not have the resources and expertise to maintain enterprise-level security systems.
The common message in a browser is:

Solution

2) With a DNS entry for the INTERNET Facing WAN connection go to Step 3) or create a valid Dynamic DNS for the public IP address.

- Use the public IP address as otherwise DDNS will register the internally mapped IP.

- Enter the Unique Location, i.e. the location of the FortiGate, try to use short internal prefixes
- Select 'Apply'.
- Purchase an SSL certificate package from a Certificate Authority (CA).
- SSL certificate packages can be purchased from any CA, such as Comodo, GoDaddy, or GlobalSign.
- Create an account with the chosen vendor, or use the account used to purchase the domain.
- Locate the SSL Certificates page.
- Purchase a basic SSL certificate for domain validation only.
- After purchasing the certificate, the CA will direct to setup the certificate so that it can be verified.
- If the CA needs a Certificate Signing request (CSR),follow these steps, other wise go to Setup the SSL certificate.
If necessary, a CSR can be quickly created from the FortiGate GUI.
- Select Generate in the toolbar.
- Enter the required information in the Generate Certificate Signing Request screen:
- Ensure that the certificate has a unique name. e.g. branch.float-zone.com-cert
- Select Domain Name in the ID Type field. - branch.float-zone.com
- Ensure that the Key Size is set to 2048 Bit.
- Set the Enrollment Method to File Based.
- Select OK to create the CSR.

The CSR file can be opened in any text editor and should resemble the
following:
-----BEGIN CERTIFICATE REQUEST-----MIIDDjCCAfYCAQAwgZcxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhOZXcgWW9yazEV
………
WP2WDWfUp8zx1jYQJpgOjBmW
-----END CERTIFICATE REQUEST------
- Find the newly purchased certificate and select Manage to open the Certificate page.
- Select Setup.
- If a CSR generated by the FortiGate is used:
b. Copy the file contents
c. Paste it into the text box.

- Select Download to download the signed certificate, as a Zip file, to your computer. – The server type can be set to Other.
There should be two .CRT files: a CA certificate with bundle in the file name, and a local certificate.
- Select Import - > Local Certificate to import the local certificate.
- In the Connection Settings section, locate the Server Certificate field.
- Select the new certificate from the Server Certificate drop-down menu.
- Select Apply to configure SSL VPN to use the new certificate.
