This section describes how to configure antivirus.
The FW has a default antivirus profile named default, which defines the default action in the upload or download direction of each protocol, as shown in the following figure. You cannot modify or delete the default profile.
You can run the display profile type av name default command on the CLI to view the configuration information about the default profile. IF you use the CLI to reference the default profile in a security policy, you must enter the complete profile name (such as default). Otherwise, the profile fails to be referenced. To view the configuration result, run the display current-configuration command. Then you can view that the security policy references the default profile, but the configuration information about the default profile is not displayed.
Name |
Protocol |
Virus Detection in the Upload Direction |
Virus Detection in the Download Direction |
Default Action |
|---|---|---|---|---|
default |
HTTP |
Enable |
Enable |
Block |
FTP |
Enable |
Enable |
Block |
|
SMTP |
Enable |
- |
Alert |
|
POP3 |
- |
Enable |
Alert |
|
IMAP |
Enable |
Enable |
Alert |
|
NFS |
Enable |
Enable |
Alert |
|
SMB |
Enable |
Enable |
Block |
|
Attack Evidence Collection: disabled Application Exception List: not configured Virus Exception List: not configured |
||||
The FW supports user-defined profiles. You can specify the action for each protocol.
av scan-mode { full | quick }
Full-text scanning: After this mode is enabled, in-depth content detection is performed on files. This mode features a high detection rate of virus files but a low detection speed and high performance consumption.
Quick scanning: After this mode is enabled, fast content detection is performed on files. This mode features a high detection speed and low performance consumption but a relatively low detection rate of virus files.
By default, the antivirus scan mode is full-text scanning. To switch to the quick scanning mode, run the av scan-mode quick command in the system view to enable the quick scanning mode.
av full-scan-mode { max-file-number max-file-number | max-file-size max-file-size }
By default, in full-text scanning mode, a maximum of 10 files can be detected concurrently by the IAE on each CPU, and the maximum size of a single file detected by the IAE is 2048 KB.
When the antivirus scan mode is full-text scanning, you can run the av full-scan-mode max-file-number command to set the maximum number of files that can be detected concurrently by the IAE on each CPU in full-text scanning mode. When the device supports IAE running on multiple CPUs, the maximum number of files detected concurrently by the device is equal to the value of max-file-number multiplied by the number of CPUs. If the number of files to be concurrently detected by the device exceeds the maximum value, the excess files will not be detected. You can run the av full-scan-mode max-file-size command to set the maximum size of a single file detected by the IAE in full-text scanning mode. If the size of a file to be detected exceeds the maximum size, the file will not be detected.
av submit-detected-file enable
By default, this function is disabled, and the device does not send detected virus files to the cloud sandbox.
In full scan mode, you can enable the function of sending virus files to the cloud sandbox so that the device can send detected virus files to the cloud sandbox for further analysis and source tracing.
profile type av name name
description description
collect-attack-evidence enable
The attack evidence collection function relies on hard disks and available only when the hard disks are installed.
You are advised to run the debugging collect-attack-evidence max-session-size max-session-size command to increase the threshold for the maximum data volume of attack evidence that the device can collect for a single session. The recommended threshold is 2000 KB.
Attack evidence collection is for troubleshooting only. Because attack evidence collection compromises system performance, you must enable it only when necessary and disable it immediately after you finish attack evidence collection.
This command takes effect only in antivirus quick scanning mode. It does not take effect in full-text scanning mode.
If a file is detected to be risky as a suspected virus file, the environment that has high security requirements can enable the antivirus heuristic detection function.
The antivirus heuristic detection secures network environment and minimizes risks but compromises the antivirus detection performance and may increase false positives. Therefore, antivirus heuristic detection is disabled by default.
Protocol |
Command |
|---|---|
HTTP |
http-detect direction { both | download | upload } [ action { alert | block } ] |
FTP |
ftp-detect direction { both | download | upload } [ action { alert | block } ] |
SMTP |
smtp-detect [ action { alert | declare | delete-attachment } ] |
POP3 |
pop3-detect [ action { alert | declare | delete-attachment } ] |
IMAP |
imap-detect direction { both | download | upload } [ action { alert | declare | delete-attachment } ] |
NFS |
nfs-detect direction { both | download | upload } |
SMB |
smb-detect direction { both | download | upload } [ action { alert | block } ] |
exception application name name [ action { alert | allow | block } ]
exception av-signature-id av-signature-id [ action { allow | block-source-ip [ timeout timeout ] } ]
The device supports configuring response actions for exception signatures, including allow and blacklist (directly add the source or destination addresses of traffic that matches exception signatures to a blacklist). In addition, the timeout parameter can be used to configure the timeout period of the blacklist.
whitelist { host host-text | url url-text | source-address { ip-address | range start-ip-address end-ip-address } | destination-address { ip-address | range start-ip-address end-ip-address } }
For details on how to configure the security policy, see Configuring a Security Policy.
The created or modified antivirus profile does not take effect immediately. You need to commit the configuration to activate the configuration. To save time, commit the configuration after you complete all operations on the antivirus profile.
After the antivirus log aggregation function is enabled, the system will aggregate multiple same antivirus logs generated in a short period into one log.
In antivirus quick scanning mode, if the complete hash value needs to be extracted from the PE file, you need to configure the av extract hash enable command. In full-text scanning mode, the complete hash value is extracted from the PE file by default. Therefore, you do not need to configure this command.
In a scenario where the function of extracting the complete hash value from the PE file is enabled, if the FW detects viruses in a PE file, and the response action is alert or declare, the antivirus log displays the complete hash value.
After configuring the antivirus profile, adjust it as follows: