waf file-list
Use this command to configure a File List policy that allows FortiWeb to match uploaded files by MD5 or SHA256 hash. File List entries can be used to either trust or block specific files based on their cryptographic fingerprint. Enforcement actions are applied through the File Security module.
When a file is uploaded, FortiWeb computes both its MD5 and SHA256 digests and compares them to entries in the configured File List policy. Matching logic behaves as follows:
-
If a Block File match is found, FortiWeb sets the internal
file_list_flagtoBLOCK, and enforcement is delegated to the File Security module. The action defined in the File List policy is applied, such as deny, block-period, or client-ID block. An attack log entry is generated with the type Block File Using Hash. -
If a Trust File match is found, FortiWeb sets the
file_list_flagtoTRUST, and the file bypasses checks from:-
File Security
-
Web Shell Detection
-
Data Loss Prevention (DLP)
-
The File List module does not perform enforcement directly. To apply block actions, the File Security module must be enabled in the active Web Protection Profile. Trust File matches are honored across all three modules without additional configuration.
This module replaces the legacy File Exception feature, which only supported trusted MD5 hashes. File List introduces:
-
Support for SHA256
-
Support for Block File entries
-
A shared matching backend to reduce redundant processing across modules
Configuration is available through both GUI and CLI. Existing File Exception entries are automatically migrated to Trust File entries in the File List module.
Syntax
config waf file-list
edit <policy_name>
set action {alert | alert_deny | deny_no_log | block-period | client-id-block-period}
set severity {High | Medium | Low | Info}
config members
edit <entry_index>
set type {trust-file | block-file}
set comment <optional_comment>
next
end
next
end