FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
nathan_h
Staff
Staff
Article Id 354664
Description

 

This article describes how to block file upload when an Excel document contains Social Security Number. The firmware version used in this article is v7.2.10.

 

Scope

 

FortiGate.

 

Solution

 

Configuration:

Configure DLP Dictionary:

GUI:

Security Profiles -> Data Leak Prevention -> Dictionaries -> Create new -> Type: ssn-us -> OK -> OK.

 

2024-10-31 16 43 45.png

CLI:

 

config dlp dictionary
    edit "def-ssn-dict"
        config entries
            edit 1
                set type "ssn-us"
            next
        end
    next

end

 

Configure DLP Sensor:

GUI:

 

2024-10-31 16 46 22.png

 

CLI:

 

config dlp sensor
   edit "def-ssn-sensor"
       config entries
           edit 1
               set dictionary "def-ssn-dict"
           next
       end
   next
end

 

Configure DLP Profile:

GUI:

Security Profiles -> Data Leak Prevention -> Profiles -> Create new.

 

2024-11-04 16 16 03.png

 

Type on the Name field -> Select Create new -> Type on the Name field -> Select + on Sensor -> Select def-ssn-sensor -> Select Block under Action -> Select File under Type -> Select on dropdown under File Type -> Select Create.

 

2024-11-04 16 19 07.png

 

Type on the Name field -> Select Create new.

 

2024-11-04 16 30 39.png

 

Type Pattern: Zip -> Filter type: Type -> File Type: zip -> OK.

 

2024-11-04 16 20 32.png

 

Create new -> Type Patter: *.xml -> Filter Type: Pattern -> OK.

 

2024-11-04 16 21 01.png

Select OK -> Check HTTP-POST -> OK.

2024-11-04 16 21 10.png

 

2024-11-04 16 21 27.png

CLI:

 

config dlp filepattern
    edit 4
        set name "Excel-File"
            config entries
                edit "zip"
                    set filter-type type
                    set file-type zip
                next
                edit "*.xml"
                next
            end
    next
end

 

config dlp profile

   edit "Block-Excel"
       config rule
           edit 1
               set name "Excel"
               set proto http-post
               set filter-by sensor
               set file-type 4
               set sensor "def-ssn-sensor"
               set action block
           next
       end
   next
end

 

Configure Firewall Policy:

 

2024-11-04 16 42 22.png

CLI:

 

config firewall policy
    edit 8
        set name "Excel DLP"
        set srcintf "port4"
        set dstintf "port1"
        set action accept
        set srcaddr "all"
        set dstaddr "all"
        set schedule "always"
        set service "ALL"
        set utm-status enable
        set inspection-mode proxy
        set ssl-ssh-profile "custom-deep-inspection"
        set dlp-profile "Block-Excel"
        set nat enable
    next
end

 

Result:

Sample data from dlptest.com.

 

2024-11-04 16 48 04.png

Access dlptest.com and then upload the file.

 

2024-11-04 16 49 06.png

A test result showing the upload failed.

 

2024-11-04 16 51 10.png