Implementing the Data Loss Prevention (DLP) WAF Module in FortiADC

Data Loss Prevention
DLP module
prevents sensitive data from leaving or entering your network by scanning for various patterns while inspecting traffic passing through the FortiADCThe DLP module is configured based on the following
components
:DLP Policy
Sensitive Data Type
DLP Sensor
- Note: This DLP component requires the
FortiGuard DLP service
to be enabled.
- Note: This DLP component requires the
DLP Dictionary
- Note: This DLP component requires the
FortiGuard DLP service
to be enabled.
- Note: This DLP component requires the
Note:
Data Loss Prevention can still function without the
FortiGuard DLP service
. You can still configure aDLP Policy
to defend against data loss using onlySensitive Data Type
.In the backend, DLP uses Hyperscan to perform a one-parse algorithm for scanning multiple patterns. This allows DLP to scale up without any performance downgrade.
For more information
To deploy Data Loss Prevention, follow the workflow below:
Configure the DLP Dictionary to define the collection of data type entries to use in the DLP Sensor.
Configure the DLP Sensor to define which dictionary to check.
Configure the Sensitive Data Type to define the type of pattern that DLP is trying to match.
Configure the DLP Policy to define the rules for matching a sensor or sensitive data type.
Apply the DLP Policy to a WAF profile.
FortiGuard DLP service
This
service
allow FortiADC to download DLP signatures directly from FortiGuard to enrich the FortiADCDLP signature data types
.It uses a customizable
database
of more than 500 predefineddata patterns
andpolicies
It has
database
of predefinedDLP patterns
such asdata types
,dictionaries
, andsensors
.
If the
HTTP payload
orfiles
passing through FortiADC contain data that matches the patterns defined in these dictionaries, FortiADC will initiate specified actions to safeguard the data.Note:
To check the version of FortiGuard DLP database
- System > FortiGuard > Data Loss Prevention (DLP)
Configure the DLP Dictionary to define the collection of data type entries to use in the DLP Sensor
A
DLP dictionary
defines the patterns of data. The term "pattern" denotes a set of attributes specific to a givendata type
E.g.,
- Credit card numbers constitute numeric data that follow either the 14-digit or 16-digit patterns associated with credit cards. If the data adheres to these patterns, FortiADC will identify it as a match.
Predefined DLP Dictionary object & FortiGuard Data Types
DLP Dictionary object | FortiGuard Data Types | Description |
aus-abn-dict | aus-abn | Australia Business Number Dictionary |
aus-health_id-dict | aus-health_id | Australia Health account number Dictionary |
aus-pass-dict | aus-pass | Australia Passport Dictionary |
aus-tin-dict | aus-tin | Australia Tax File Number (TFN) Dictionary |
aut-pass-dict | aut-pass | Austria Passport Dictionary |
aut-ssn-dict | aut-ssn | Austria Social Security Number Dictionary |
aut-tin-dict | aut-tin | Austria tax identification number Dictionary |
aut-vatin-dict | aut-vatin | Austria VATIN Dictionary |
balkans-natl_id-umcn-dict | balkans-natl_id-umcn | Unique Master Citizen Number (Various countries in Balkan region [Former Yugoslavia]) |
bel-natl_id-dict | bel-natl_id | Belgium National Identification number Dictionary |
bel-tin-dict | bel-tin | Belgium Tax Identification Number Dictionary |
bel-vatin-dict | bel-vatin | Belgium value added tax number (VATIN) Dictionary |
bgr-ucn_id-dict | bgr-ucn_id | Bulgaria Uniform Civil Number Dictionary |
bra-cnpj-dict | bra-cnpj | Brazil CNPJ Number Dictionary |
bra-cpf-dict | bra-cpf | Brazil Cadastro de Pessoas Físicas (CPF) Number Dictionary |
bra-dl-dict | bra-dl | Brazil Driver's License Number (CNH) Dictionary |
can-bank_account-dict | can-bank_account | Canadian Bank Account Dictionary |
can-dl-dict | can-dl-ab , can-dl-bc , can-dl-mb , can-dl-nb , can-dl-nl-1 , can-dl-nl-2 , can-dl-ns , can-dl-nt , can-dl-nu , can-dl-on , can-dl-pe-1 , can-dl-pe-2 , can-dl-qc , can-dl-sk , can-dl-yt | Canadian Driver's License Dictionary |
can-health_service-dict | can-health_service | Canadian Health Service Dictionary |
can-natl_id-sin-dict | can-natl_id-sin | Canadian SIN Card Number Dictionary |
can-pass-dict | can-pass | Canadian Passport Dictionary |
can-phin-dict | can-phin , can-phin-ab , can-phin-bc , can-phin-mb , can-phin-nb , can-phin-nl , can-phin-ns , can-phin-nt , can-phin-nu , can-phin-on , can-phin-pe , can-phin-qc , can-phin-sk , can-phin-yt | Canadian Personal Health Identification Number Dictionary |
che-natl_id-ahv-dict | che-natl_id-ahv | Swiss Social Security Number (AHV/AVS Number) Dictionary |
chn-dl-dict | chn-dl | China Driver's License Number Dictionary |
chn-license-plate-dict | chn-license-plate | China License Plate Number |
chn-natl_id-dict | chn-natl_id | China National ID Card |
deu-dl-dict | deu-dl | Germany driving license number Dictionary |
deu-tin-dict | deu-tin | Germany tax identification number/ Steuerliche Identifikationsnummer Dictionary |
deu-vatin-dict | deu-vatin | Germany VAT/Umsatzsteuer Identifikationsnummer Dictionary |
dnk-natl_id-dict | dnk-natl_id | Denmark national ID number (CPR) Dictionary |
esp-natl_id-dict | esp-natl_id | Spain national ID number Dictionary |
esp-pass-dict | esp-pass | Spain Passport Dictionary |
esp-tin-cif-dict | esp-tin-cif | Spain Tax Identification Certificate (CIF) Dictionary |
esp-tin-dict | esp-tin | Spain Tax Identification Number Dictionary |
fin-natl_id-dict | fin-natl_id | Finland Personal Identity Codes/Numbers Dictionary |
fin-tin-dict | fin-tin | Finland Tax Identification Number Dictionary |
fra-dl-dict | fra-dl | France Driver's License Number Dictionary |
fra-natl_id-dict | fra-natl_id | France National ID Dictionary |
fra-pass-dict | fra-pass | France Passport Dictionary |
fra-tin-dict | fra-tin | France tax identification number Dictionary |
fra-vatin-dict | fra-vatin | France VAT Dictionary |
gbr-nino-dict | gbr-nino | UK National Insurance Number Dictionary |
glb-cc-dict | glb-cc-amex , glb-cc-bcgl , glb-cc-cabl , glb-cc-dinr , glb-cc-disc , glb-cc-inst , glb-cc-jcb , glb-cc-kloc , glb-cc-lasr , glb-cc-maes , glb-cc-mc , glb-cc-solo , glb-cc-unionpay , glb-cc-visa , glb-cc-vsmc | Global Credit Card Dictionary |
glb-swift-dict | aus-swift , chn-swift , deu-swift , fra-swift , jpn-swift , uk-swift , usa-swift | Global SWIFT Codes Dictionary |
grc-tin-dict | grc-tin | Dictionary for Greece Tax Identification Number (AFM) |
hkg-natl_id-dict | hkg-natl_id | Hong Kong Citizen ID Card Number Dictionary |
hrv-tin-dict | hrv-tin | Croatia tax identification number Dictionary |
hun-tin-dict | hun-tin | Hungary Tax Identification Number dictionary |
idn-tin-dict | idn-tin | Indonesia tax identification number Dictionary |
ind-natl_id-dict | ind-natl_id | Indian National ID Number Dictionary |
irl-tin-ppsn-dict | irl-tin-ppsn | Ireland tax identification number /Personal Public Service Number(PPSN) Dictionary |
irl-vatin-dict | irl-vatin | Ireland VAT/CBL dictionary |
isl-natl_id-dict | isl-natl_id | Iceland Personal Identification Number Dictionary |
isr-natl_id-dict | isr-natl_id | Israel National ID Number (Teudat Zehut) Dictionary |
ita-dl-dict | ita-dl | Italy driving license number Dictionary |
ita-fiscal-code-dict | ita-fiscal-code | Italy Fiscal Code Dictionary |
ita-pass-dict | ita-pass | Italy Passport Dictionary |
jpn-cn-dict | jpn-cn | Japan Corporate Number Dictionary |
jpn-dl-dict | jpn-dl | Japan driving license number Dictionary |
jpn-health_id-dict | jpn-health_id | Japan Health Insurance Number |
jpn-mn-dict | jpn-mn | Japan My Number Dictionary |
jpn-pass-dict | jpn-pass | Japan Passport Dictionary |
jpn-rrn-dict | jpn-rrn | Japan Resident Registration Number Dictionary |
kor-dl-dict | kor-dl | Korea driving license number Dictionary |
kor-natl_id-dict | kor-natl_id | Korean national ID number Dictionary |
kor-pass-dict | kor-pass | South Korea Passport Dictionary |
lux-tin-dict | lux-tin | Luxembourg tax identification number Dictionary |
lux-vatin-dict | lux-vatin | Luxembourg VAT Dictionary |
mex-bank_code-dict | mex-bank_code | Mexico standardized bank code number (CLABE) |
mex-curp-dict | mex-curp | Mexico Unique Population Code (CURP) Dictionary |
mys-natl_id-dict | mys-natl_id | Malaysia national ID number Dictionary |
nld-natl_id-bsn-dict | nld-natl_id-bsn | Netherlands Burgerservicenummer (BSN) Dictionary |
nld-vatin-dict | nld-vatin | Netherland VAT |
nzl-health_id-dict | nzl-health_id | New Zealand National Health Index Number(NHI) |
nzl-tin-dict | nzl-tin | New Zealand tax identification number Dictionary |
per-tin-dict | per-tin | Peru tax identification number Dictionary |
pol-krs-dict | pol-krs | Poland KRS Number |
pol-natl_id-dict | pol-natl_id | Poland national ID number Dictionary |
pol-regon-dict | pol-regon | Poland REGON Number Dictionary |
pol-tin-dict | pol-tin | Poland Tax Identification Number (NIP Number) Dictionary |
prt-tin-dict | prt-tin | Portugal tax identification number/Número de Identificação Fiscal(NIF) Dictionary |
sec-cisco_config | Cisco configuration file dictionary | |
sec-fortigate_config | FortiGate Configuration File Dictionary | |
sgp-natl_id-dict | sgp-natl_id | Singapore National Registration Identity Card (NRIC) Dictionary |
source_code-c | C Source Code Dictionary | |
source_code-go | Golang Source Code Dictionary | |
source_code-java | Java Source Code Dictionary | |
source_code-powershell | Powershell Source Code Dictionary | |
source_code-python | Python Source Code Dictionary | |
swe-natl_id-dict | swe-natl_id | Sweden Personal Identity Number Dictionary |
swe-tin-dict | swe-tin | Sweden Tax Identification Number Dictionary |
tha-natl_id-dict | tha-natl_id | Thai national ID number Dictionary |
twn-natl_id-dict | twn-natl_id | Taiwan ID Number Dictionary |
uk-dl-dict | uk-dl | UK driving license number Dictionary |
uk-pass-dict | uk-pass | UK Passport Dictionary |
usa-aba_rtn-dict | usa-aba_rtn | USA ABA Routing Number Dictionary |
usa-dl-dict | usa-dl-ak , usa-dl-al , usa-dl-ar , usa-dl-az , usa-dl-ca , usa-dl-co , usa-dl-ct , usa-dl-dc , usa-dl-de , usa-dl-fl , usa-dl-ga , usa-dl-hi , usa-dl-ia , usa-dl-id , usa-dl-il , usa-dl-in , usa-dl-ks , usa-dl-ky , usa-dl-la , usa-dl-ma , usa-dl-md , usa-dl-me , usa-dl-mi , usa-dl-mn , usa-dl-mo , usa-dl-ms , usa-dl-mt , usa-dl-nc , usa-dl-nd , usa-dl-ne , usa-dl-nh , usa-dl-nj , usa-dl-nm , usa-dl-nv , usa-dl-ny , usa-dl-oh , usa-dl-ok , usa-dl-or , usa-dl-pa , usa-dl-ri , usa-dl-sc , usa-dl-sd , usa-dl-tn , usa-dl-tx , usa-dl-ut , usa-dl-va , usa-dl-vt , usa-dl-wa , usa-dl-wi , usa-dl-wv , usa-dl-wy | USA Driver's License Dictionary |
usa-mbi-dict | usa-mbi | USA Medicare Beneficiary Identifier Dictionary |
usa-natl_id-ssn-dict | usa-natl_id-ssn | USA SSN Card Number Dictionary |
usa-npi-dict | usa-npi | USA National Provider Identifier (NPI) Dictionary |
usa-pass-dict | usa-pass-1 , usa-pass-2 | USA Passport Dictionary |
usa-tin-itin-dict | usa-tin-itin | USA individual taxpayer identification umber (ITIN) |
Some missing | deu-iban , fra-iban , gbr-health_id , hrv-natl_id , sec-jwt_token , uk-iban , usa-natl_id-prox |
- Setting in FortiADC (Web Applicatin Firewall > Data Loss Prevention > DLP Dictionary)
config security waf dlp-dictionary
config security waf dlp-dictionary
edit <name>
set match-type {any|all}
set description <string>
config entries
edit <name>
set status {enable|disable}
set fg-data-type {uk-iban|can-natl_id-sin|luhn-algo|can-natl_id-prox|can-pass|usa-pass-1|usa-pass-2|uk-pass|aus-pass|fra-pass|jpn-pass|can-health_service|can-phin|glb-cc-amex|glb-cc-bcgl|glb-cc-cabl|glb-cc-dinr|glb-cc-inst|glb-cc-jcb|glb-cc-kloc|glb-cc-lasr|glb-cc-maes|glb-cc-solo|glb-cc-disc|glb-cc-mc|glb-cc-visa|glb-cc-vsmc|usa-natl_id-ssn|can-dl-ab|can-dl-bc|can-dl-mb|can-dl-nb|can-dl-nl-2|can-dl-nl-1|can-dl-nt|can-dl-nu|can-dl-pe-1|can-dl-pe-2|can-dl-qc|can-dl-sk|can-dl-yt|usa-dl-al|usa-dl-ak|usa-dl-az|usa-dl-ar|usa-dl-co|usa-dl-ct|usa-dl-de|usa-dl-dc|usa-dl-fl|usa-dl-ga|usa-dl-hi|usa-dl-id|usa-dl-il|usa-dl-in|usa-dl-ia|usa-dl-ks|usa-dl-ky|usa-dl-la|usa-dl-me|usa-dl-md|usa-dl-ma|usa-dl-mi|usa-dl-mn|usa-dl-ms|usa-dl-mo|usa-dl-ne|usa-dl-nv|usa-dl-nh|usa-dl-nj|usa-dl-nm|usa-dl-ny|usa-dl-nc|usa-dl-oh|usa-dl-ok|usa-dl-or|usa-dl-pa|usa-dl-ri|usa-dl-sc|usa-dl-sd|usa-dl-tn|usa-dl-tx|usa-dl-ut|usa-dl-vt|usa-dl-va|usa-dl-wv|usa-dl-wi|usa-dl-wy|can-bank_account|usa-natl_id-prox|can-dl-ns|can-dl-on|usa-dl-ca|jpn-swift|usa-swift|usa-dl-nd|usa-dl-wa|uk-swift|deu-swift|fra-swift|aus-swift|chn-swift|can-sin}
set repeat {enable|disable}
next
end
next
end
status
- Enable it if you intend to apply this data typeRepeat
- Enable this option if you want to match data exclusively when it appears multiple times. With this option enabled, you can specify the times of occurrence in the DLP Sensor settings.
Configure the DLP Sensor to define which dictionary to check
A
DLP Sensor
defines which dictionaries to check. You can matchany
dictionary orall
dictionaries. It can alsocount
the number of dictionary matches to trigger the sensor.Setting in FortiADC (Web Applicatin Firewall > Data Loss Prevention > DLP Sensor)
count
- Specify the occurrence threshold for the dictionary match. The sensor will be triggered when the dictionary match reaches the specified number of times. Default: 1 Range: 1-255.- For example, if the dictionary applies to credit card numbers and the count is set to 4, the sensor will be triggered when credit card number occurs four times in the HTTP request or response.
config security waf dlp-sensors
config security waf dlp-sensors
edit <name>
set match-type {any|all}
set description <string>
config entries
edit <name>
set status {enable|disable}
set dlp-dictionary <datasource>
set count <integer>
next
end
next
end
Configure the Sensitive Data Type to define the type of pattern that DLP is trying to match
A
Sensitive Data Type
object is referenced as part of theDLP policy
to prevent information, damage and loss by specifyingstrings
assensitive data
.Predefined Sensitive Data Type objects
To define your own
Setting in FortiADC (Web Applicatin Firewall > Data Loss Prevention > Sensitive Data Type > Create New)
You must have a good understanding of Perl-compatible regular expressions (PCRE)
config security waf sensitive-data-type
config security waf sensitive-data-type
edit <name>
set regex <string>
set description <string>
next
end
Configure the DLP Policy to define the rules for matching a sensor or sensitive data type
The Data Loss Prevention (DLP) feature allows the Web Application Firewall (WAF) to prevent information leaks, damage and loss. DLP provides desensitization and warning measures for sensitive information leaks on websites, such as SSN numbers and credit card information, as well as the leakage of sensitive keywords.
You can create a DLP Policy to match a sensor based on file content or an HTTP Payload, and the email protocol being used to attach files. It also allows you to choose the action to allow, log, or block the IP address.
Setting in FortiADC (Web Applicatin Firewall > Data Loss Prevention > DLP Policy)
URI Pattern
- Specify the URI Pattern in the Data Loss Prevention rules. Scanning and receiving anempty value
means this rule isnot working
.Threshold
- The rule will not take effect until the target data exceeds the threshold's specified value. This willnot work
ifMasking is enabled
.
Masking
- Enable masking to replace sensitive data with asterisks(*). Default is disable. When masking is enabled, all target data will be replaced by an asterisk(*) so the threshold value won’t take effect here. Masking only works when the action is alert. The connection will be rejected when the action is set as "deny" or "block," so no target data will be replaced.config security waf data-leak-prevention
config security waf data-leak-prevention
edit <name>
set status {enable|disable}
set masking {enable|disable}
set action {alert|deny|block|silent-deny|captcha|<datasource>}
set severity {high|medium|low}
config rule
edit <name>
set request-uri-pattern <string>
set type {sdt|sensors}
set sensor <datasource>
set sensitive-data-type <datasource>
set threshold <integer>
next
end
next
end
Apply the DLP Policy to a WAF Profile
- Setting in FortiADC (Web Applicatin Firewall > WAF Profile)
Apply the WAF Profile to a Virtual Server
- Setting in FortiADC (Server Load Balance > Virtual Server > Security > WAF Profile)
Subscribe to my newsletter
Read articles from LoGan070raGnaR directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
