Today I would like to present one interesting feature you may find on your Fortigate - Data Leak Prevention. I know there are much better, dedicated solutions on the market but in certain situations the DLP feature available on FortiOS is good enough.
Why you should use it?
This is very important to say: the DLP in such deployment (on Fortigate) can't protect your data against every data leak. Users in your network with his/her mobile can easily take a photo of any document. Why we should still consider it? It is a good (and easy to deploy) method to prevent users' mistakes. It happened hundreds of time when a user attached a wrong file. Sound familiar? Using the DLP you can create policies which stop such leak. Let me show you how you can configure it.
Step #1
First, you have to check if DLP is enabled in a "Feature Visibility" and "Security Features" section:
When you do not see the feature, make sure your Fortigate works in a proxy-based inspection mode:
I know it may be a problem for some of you as a default inspection mode in 5.6 is flow-based (Fortinet introduced NGFW mode in the flow-based inspection mode):
I know in many cases you are not fully aware about such limitation. One of the solution I can recommend is using VDOMs. Your main VDOM can work in flow-based inspection mode, where you can fully use ASIC's capabilities, and second VDOM can work in proxy-based inspection mode where DLP feature is supported.
Step #2
Edit a DLP sensor (profile):
and add a new filter (click +):
What also generate a log entry once it matches string like in my test file. You may notice that only non-encrypted services are on the filter list. You can add SSL full inspection profile to monitor encrypted communication too.
Step #3
In last step you need to attach the new profile (sensor) to a firewall policy:
Now it's time for test when I try to upload my test file using HTTP. This is the warning message I got:
You can test your regex before using here:
https://www.debuggex.com/?flavor=pcre
Why you should use it?
This is very important to say: the DLP in such deployment (on Fortigate) can't protect your data against every data leak. Users in your network with his/her mobile can easily take a photo of any document. Why we should still consider it? It is a good (and easy to deploy) method to prevent users' mistakes. It happened hundreds of time when a user attached a wrong file. Sound familiar? Using the DLP you can create policies which stop such leak. Let me show you how you can configure it.
Step #1
First, you have to check if DLP is enabled in a "Feature Visibility" and "Security Features" section:
When you do not see the feature, make sure your Fortigate works in a proxy-based inspection mode:
I know it may be a problem for some of you as a default inspection mode in 5.6 is flow-based (Fortinet introduced NGFW mode in the flow-based inspection mode):
I know in many cases you are not fully aware about such limitation. One of the solution I can recommend is using VDOMs. Your main VDOM can work in flow-based inspection mode, where you can fully use ASIC's capabilities, and second VDOM can work in proxy-based inspection mode where DLP feature is supported.
Step #2
Edit a DLP sensor (profile):
and add a new filter (click +):
In my example I would like to stop files which contain 11 digits, like this one:
The best method is using a regular expression (PCRE). As you can see my is a quite short: "\d{11}". I set an action to 'block':
Step #3
In last step you need to attach the new profile (sensor) to a firewall policy:
Now it's time for test when I try to upload my test file using HTTP. This is the warning message I got:
And what I see in my logs:
You can also test it using CLI:
Summary
As you can see the feature is very easy to deploy. You can start doing small steps, monitor logs and device performance. Remember your Fortigate has to work in the proxy-based inspection mode.
PCRE resources you can find here:
You can test your regex before using here:
https://www.debuggex.com/?flavor=pcre
Comments
Post a Comment