Configure malware scans
Malware scan configurations are reusable saved settings that you can apply when configuring anti-malware in a policy or for a computer. A malware scan configuration specifies what types of malware scanning Deep Security performs and which files it scans. Some policy properties also affect the behavior of malware scans.
- Create or edit a malware scan configuration
- Scan for specific types of malware
- Specify the files to scan
- Specify when real-time scans occur
- Configure how to handle malware
- Identify malware files by file hash digest
- Configure notifications on the computer
The Deep Security Best Practice Guide also provides several recommendations for configuration malware scans.
Create or edit a malware scan configuration
Create or edit a malware scan configuration to control the behavior of a real-time, manual, or scheduled scan. (For more information, see Malware scan configurations.) You can create multiple malware scan configurations as required.
- After you create a malware scan configuration, you can then associate it with a scan in a policy or computer (see Select the types of scans to perform)
- When you edit a malware scan configuration that a policy or computer is using, the changes affect the scans that are associated with the configuration.
To create a malware scan configuration that is similar to an existing one, duplicate the existing configuration and then edit it.
You can create two types of malware scan configurations according to the type of scan it controls (see Types of malware scans):
- Real-time scan configuration: Controls real-time scans. Some actions such as Deny Access are only available to real-time scan configurations
- Manual/scheduled scan configuration: Controls either manual or scheduled scans. Some options such as CPU Usage are only available to manual/scheduled scan configurations
Deep Security provides a default malware scan configuration for each type of scan.
- Go to Policies > Common Objects > Other > Malware Scan Configurations.
- To create a scan configuration, click New and then click New Real-Time Scan Configuration or New Manual/Scheduled Scan Configuration.
- Type a name to identify the scan configuration. You see the name in a list when configuring malware scans in a policy.
- (Optional) Type a description that explains the use case for the configuration.
- To view and edit an existing scan configuration, select it and click Properties.
- To duplicate a scan configuration, select it and click Duplicate.
To see the policies and computers that are using a malware scan configuration, see the AssignedTo tab of the properties.
Test malware scans
Before continuing with further Anti-Malware configuration steps, test real-time and manual/scheduled scans to ensure they're working correctly.
Test real-time scans:
- Make sure the real-time scan is enabled and that a configuration is selected.
- Go to the EICAR site and download their anti-malware test file. This standardized file will test the real-time scan's anti-virus capabilities. The file should be quarantined.
- On Deep Security Manager, go to Events & Reports > Anti-Malware Events to verify the record of the EICAR file detection. If the detection is recorded, the Anti-Malware real-time scans are working correctly.
Test manual/scheduled scans:
- Go to Administration.
- Click Scheduled tasks > New.
- Select Scan Computers for Malware from the drop-down menu and select a frequency. Complete the scan configuration with your desired specifications.
- Go to the EICAR site and download their anti-malware test file. This standardized file will test the manual/scheduled scan's anti-virus capabilities.
- Select the scheduled scan and click Run Task Now. The test file should be quarantined.
- On Deep Security Manager, go to Events & Reports > Anti-Malware Events to verify the record of the EICAR file detection. If the detection is recorded, the Anti-Malware manual/scheduled scans are working correctly.
Scan for specific types of malware
- Scan for spyware and grayware
- Scan for compressed executable files (real-time scans only)
- Scan process memory (real-time scans only)
- Scan compressed files
- Scan embedded Microsoft Office objects
See also:
Scan for spyware and grayware
When spyware and grayware protection is enabled, the spyware scan engine quarantines suspicious files when they are detected.
- Open the properties of the malware scan configuration.
- On the General tab, select Enable spyware/grayware protection.
- Click OK.
To identify a file that the spyware scan engine should ignore, see Create anti-malware exceptions.
Scan for compressed executable files (real-time scans only)
Viruses often use real-time compression algorithms to attempt to circumvent virus filtering. The IntelliTrap feature blocks real-time compressed executable files and pairing them with other malware characteristics.
- Open the properties of the malware scan configuration.
- On the General tab, select Enable IntelliTrap.
- Click OK.
Scan process memory (real-time scans only)
Monitor process memory in real time and perform additional checks with the Trend Micro Smart Protection network to determine whether a suspicious process is known to be malicious. If the process is malicious, Deep Security terminates the process. For more information, see Smart Protection in Deep Security
- Open the properties of the malware scan configuration.
- On the General tab, select Scan process memory for malware.
- Click OK.
Scan compressed files
Extract compressed files and scan the contents for malware. When you enable the scan, you specify the maximum size and number of files to extract (large files can affect performance). You also specify the levels of compression to inspect so that you can scan compressed files that reside inside compressed files. Level 1 compression is a single compressed file. Compressed files inside that file are level two. You can scan a maximum of 6 compression levels, however higher levels can affect performance.
- Open the properties of the malware scan configuration.
- On the Advanced tab, select Scan compressed files.
- Specify the maximum size of content files to extract, in MB, the levels of compression to scan, and the maximum number of files to extract.
- Click OK.
Scan embedded Microsoft Office objects
Certain versions of Microsoft Office use Object Linking and Embedding (OLE) to insert files and other objects into Office files. These embedded objects can contain malicious code.
Specify the number of OLE layers to scan to detect objects that are embedded in other objects. To reduce the impact on performance, you can scan only a few layers of embedded objects within each file.
- Open the properties of the malware scan configuration.
- On the Advanced tab, select Scan Embedded Microsoft Office Objects.
- Specify the number of OLE layers to scan.
- Click OK.
Specify the files to scan
To specify the files to scan for malware, identify files and directories to include in the scan and then of those files and directories, identify exclusions. You can also scan network directories:
Inclusions
Specify the directories to scan as well as the files inside the directories to scan.
To identify directories to scan, you can specify all directories or a list of directories. The directory list uses patterns with a specific syntax to identify the directories to scan. (See Syntax for directory lists.)
To identify the files to scan, use one of the following options:
- All files
- File types that are identified by IntelliScan. IntelliScan only scans file types that are vulnerable to infection, such as .zip or .exe. IntelliScan does not rely on file extensions to determine file type but instead reads the header and content of a file to determine whether it should be scanned. Compared to scanning all files, Intelliscan reduces the number of files to scan and improves performance.
- Files that have a file name extension that is included in a specified list: The file extension list uses patterns with a specific syntax. (See Syntax of file extension lists.)
- Open the properties of the malware scan configuration.
- Click the Inclusions tab.
- To specify the directories to scan, select All directories or Directory List.
- If you selected Directory List, from the drop-down menu either select an existing list or select New to create one.
- To specify the files to scan, select either All files, File types scanned by IntelliScan, or File Extension List.
- If you selected File Extension List, from the drop-down menu either select an existing list or select New to create one.
- Click OK.
Exclusions
Exclude directories, files, and file extensions from being scanned. For real-time scans (except when performed by Deep Security Virtual Appliance), you can also exclude process image files from being scanned.
Examples of files and folders to exclude:
- If you are creating a malware scan configuration for a Microsoft Exchange server, you should exclude the SMEX quarantine folder to avoid re-scanning files that have already been confirmed to be malware.
- If you choose to run malware scans on database servers used by Deep Security Manager, exclude the data directory. The Deep Security Manager captures and stores intrusion prevention data that might include viruses, which can trigger a quarantine by the Deep Security Agent, leading to database corruption.
- If you have large VMware images, exclude the directory containing these images if you experience performance issues.
To exclude directories, files, and process image files, you create a list that uses patterns to identify the item to exclude.
- Open the properties of the malware scan configuration.
- Click the Exclusions tab.
- Specify the directories to exclude:
- Select Directory List.
- Select a directory list or select New to create one. (See Syntax for directory lists.)
- If you created a directory list, select it in the directory list.
- Similarly, specify the file list, file extension list, and process image file list to exclude. (See Syntax of file lists, Syntax of file extension lists, and Syntax of process image file lists (real-time scans only):.)
- Click OK.
When Deep Security Agent cannot determine the type of a target file, the Anti-Malware scan engine loads the file to memory to determine if it is a self-extracting file. If many large files are loaded to memory, scan engine performance can be affected. To exclude files over a specific size, you can use the following Deep Security Manager command:
dsm_c -action changesetting -name com.trendmicro.ds.antimalware:settings.configuration.maxSelfExtractRTScanSizeMB -value 512
In the example above, the file-size limitation is set to 512MB for loading target files. The scan engine will not add files larger than the set value to memory and instead scans them directly. To deploy this setting, you need to send the policy to your target Deep Security Agent after running the command in Deep Security Manager.
Test file exclusions
Before continuing with further Anti-Malware configuration steps, test file exclusions to ensure they're working correctly:
- Go to Policies > Common Objects > Other > Malware Scan Configurations.
- Click New > New Real-time Scan Configuration.
- Go to the Exclusions tab, and select New from the directory list.
- Name the directory list.
- Under Directory(s) specify the path of the directory you want to exclude from the scan. For example,
c:\Test Folder\
. Click OK . - Go to the General tab, name the manual scan, and click OK.
- Go to the EICAR site and download their anti-malware test file. Save the file in the folder specified in the previous step. The file should be saved and undetected by the Anti-Malware module.
Syntax for directory lists
Exclusion | Format | Description | Examples |
Directory | DIRECTORY\ | Excludes all files in the specified directory and all files in all subdirectories. | C:\Program Files\
Excludes all files in the "Program Files" directory and all subdirectories. |
Directory with wildcard (*) | DIRECTORY\*\ | Excludes all subdirectories except for the specified subdirectory and the files that it contains. | C:\abc\*\
Excludes all files in all subdirectories of "abc" but does not exclude the files in the "abc" directory. C:\abc\wx*z\ Matches: C:\abc\wxz\ C:\abc\wx123z\ Does not match: C:\abc\wxz C:\abc\wx123z C:\abc\*wx\ Matches: C:\abc\wx\ C:\abc\123wx\ Does not match: C:\abc\wx C:\abc\123wx |
Directory with wildcard (*) | DIRECTORY*\ | Excludes any subdirectories with a matching name, but does not exclude the files in that directory and any subdirectories. | C:\Program Files\SubDirName*\
Excludes any subdirectories with a folder name that begins with “SubDirName”. Does not exclude all files under C:\Program Files\ or any other subdirectories.
|
Environment variable | ${ENV VAR} | Excludes all files and subdirectories defined by an environment variable. For a Virtual Appliance, the value pairs for the environment variable must be defined in Policy or Computer Editor > Settings > General > Environment Variable Overrides. | ${windir}
If the variable resolves to "c:\windows", excludes all the files in "c:\windows" and all its subdirectories. |
Comments | DIRECTORY #Comment | Adds a comment to your exclusion definitions. | c:\abc #Exclude the abc directory |
Syntax of file lists
Exclusion | Format | Description | Example |
File | FILE | Excludes all files with the specified file name regardless of its location or directory. | abc.doc
Excludes all files named "abc.doc" in all directories. Does not exclude "abc.exe". |
File path | FILEPATH | Excludes the single file specified by the file path. | C:\Documents\abc.doc
Excludes only the file named "abc.doc" in the "Documents" directory. |
File path with wildcard (*) | FILEPATH | Excludes all the files specified by the file path. | C:\Documents\abc.co* (For Windows Agent platforms only) Excludes any file that has file name of "abc" and extension beginning with ".co" in the "Documents" directory. |
Filename is a wildcard (*) | FILEPATH\* | Excludes all files under the path, but does not include the files in unspecified subdirectories | C:\Documents\*
Excludes all files under the directory C:\Documents\ C:\Documents\SubDirName*\* Excludes all files within subdirectories with a folder name that begins with “SubDirName”. Does not exclude all files under C:\Documents\ or any other subdirectories. C:\Documents\*\* Excludes all files within all direct subdirectories under C:\Documents. Does not exclude files in subsequent subdirectories. |
File with wildcard (*) | FILE* | Excludes all files with a matching pattern in the file name. | abc*.exe
Excludes any file that has prefix of "abc" and extension of ".exe". *.db Matches: 123.db abc.db Does not match: 123db 123.abd cbc.dba *db Matches: 123.db 123db ac.db acdb db Does not match: db123 wxy*.db Matches: wxy.db wxy123.db Does not match: wxydb |
File with wildcard (*) | FILE.EXT* | Excludes all files with a matching pattern in the file extension. | abc.v*
Excludes any file that has file name of "abc" and extension beginning with ".v". abc.*pp Matches: abc.pp abc.app Does not match: wxy.app abc.a*p Matches: abc.ap abc.a123p Does not match: abc.pp abc.* Matches: abc.123 abc.xyz Does not match: wxy.123 |
File with wildcard (*) | FILE*.EXT* | Excludes all files with a matching pattern in the file name and in the extension. | a*c.a*p
Matches: ac.ap a123c.ap ac.a456p a123c.a456p Does not match: ad.aa |
Environment variable | ${ENV VAR} | Excludes files specified by an environment variable with the format ${ENV VAR}. These can be defined or overridden using Policy or Computer Editor > Settings > General > Environment Variable Overrides. | ${myDBFile}
Excludes the file "myDBFile". |
Comments | FILEPATH #Comment | Adds a comment to your exclusion definitions. | C:\Documents\abc.doc #This is a comment |
Syntax of file extension lists
Exclusion | Format | Description | Example |
File Extension | EXT | Matches all files with a matching file extension. | doc
Matches all files with a ".doc" extension in all directories. |
Comments | EXT #Comment | Adds a comment to your exclusion definitions. | doc #This a comment |
Syntax of process image file lists (real-time scans only):
Exclusion | Format | Description | Example |
File path | FILEPATH | Excludes the Process Image file specified by the file path. | C:\abc\file.exe
Excludes only the file named "file.exe" in the "abc" directory. |
Scan a network directory (real-time scan only)
If you want to scan files and folders in network shares and mapped network drives that reside in a Network File System (NFS), Server Message Block (SMB) or Common Internet File System (CIFS), select Enable Network Directory Scan. This option is available only for real-time scans.
If a virus is detected when scanning a network folder on Windows, the agent may display some "clean failed" (delete failed) events.
Specify when real-time scans occur
Choose between scanning files when they are opened for reading, when they are written to, or both.
- Open the properties of the malware scan configuration.
- On the Advanced tab, select one of the options for the Real-Time Scan property.
- Click OK.
Configure how to handle malware
Configure how Deep Security behaves when malware is detected:
Customize malware remedial actions
When Deep Security detects malware, it performs a remedial action to handle the file. There are five possible actions that Deep Security can take when it encounters malware:
- Pass: Allows full access to the infected file without doing anything to the file. (An Anti-Malware Event is still recorded.)
The remedial action Pass should never be used for a possible virus.
- Clean: Cleans an infected file before allowing full access to it. If the file can't be cleaned, it is quarantined.
- Delete: On Linux, the infected file is deleted without a backup.
On Windows, the infected file is backed up and then deleted. Windows backup files can be viewed and restored in Events & Reports > Events > Anti-Malware Events > Identified Files. - Deny Access: This scan action can only be performed during Real-time scans. When Deep Security detects an attempt to open or execute an infected file, it immediately blocks the operation. The infected file is left unchanged. When the Access Denied action is triggered, the infected files stay in their original location.
Do not use the remedial action Deny Access when Real-Time Scan is set to During Write. When During Write is selected, files are scanned when they are written and the action Deny Access has no effect.
- Quarantine: Moves the infected file to the quarantine directory on the computer or Virtual Appliance. The quarantined file can be viewed and restored in Events & Reports > Events > Anti-Malware Events > Identified Files.
Malware marked as Quarantined on Linux might be marked as Deleted on Windows, despite the malware being identical on both operating systems. In either case, the file can be viewed and restored in Events & Reports > Events > Anti-Malware Events > Identified Files.
On Windows, infected non-compressed files (for example, .txt files) are quarantined, while infected compressed files (for example, .zip files) are deleted. On Windows, both quarantined or deleted files have a backup that can be viewed and restored in Events & Reports > Events > Anti-Malware Events > Identified Files.
On Linux, all infected files (compressed or non-compressed) are quarantined, and can be viewed and restored in Events & Reports > Events > Anti-Malware Events > Identified Files.
The default remediation actions in the malware scan configurations are appropriate for most circumstances. However, you can customize the actions to take when Deep Security detects malware. You can either use the action that ActiveAction determines, or specify the action for each type of vulnerability.
ActiveAction is a predefined group of cleanup actions that are optimized for each malware category. Trend Micro continually adjusts the actions in ActiveAction to ensure that individual detections are handled properly. (See ActiveAction actions.)
- Open the properties of the malware scan configuration.
- On the Advanced tab, for Remediation Actions select Custom.
- Specify the action to take:
- To let ActiveAction decide which action to take, select Use action recommended by ActiveAction.
- To specify an action for each type of vulnerability, select Use custom actions, and then select the actions to use.
- Specify the action to take for Possible Malware.
- Click OK.
ActiveAction actions
The following table lists the actions that ActiveAction takes:
Malware Type | Action |
Virus |
Clean. If a virus cannot be cleaned, it is deleted (Windows) or quarantined (Linux or Solaris). There is an exception to this behavior: On a Linux or Solaris agent, if a virus of type 'Test Virus' is found, access is denied to the infected file. |
Trojans | Quarantine |
Packer | Quarantine |
Spyware/grayware | Quarantine |
Cookie |
Delete
(Does not apply to real-time scans) |
Other threats |
Clean If a threat cannot be cleaned, it is handled as follows:
Also, on a Linux or Solaris agent, if a virus of type 'Joke' is found, it is quarantined immediately. No attempt is made to clean it. |
Possible malware | ActiveAction |
Generate alerts for malware detection
When Deep Security detects malware, you can generate an alert.
- Open the properties of the malware scan configuration.
- On the General tab, for Alert select Alert when this Malware Scan Configuration logs an event.
- Click OK.
Identify malware files by file hash digest
Deep Security can calculate the hash value of a malware file and display it on the Events & Reports > Events > Anti-Malware Events page. Because a particular piece of malware can go by several different names, the hash value is useful because it uniquely identifies the malware. You can use the hash value when looking up information about the malware from other sources.
- Open the policy or computer editor that you want to configure.
- Click Anti-Malware > Advanced.
- Under File Hash Calculation, clear the Default or Inherited check box. (Default is displayed for a root policy and Inherited is displayed for child policies).
When Inherited is selected, the file hash settings are inherited from the current policy's parent policy.
When Default is selected, Deep Security does not calculate any hash values.
- Select the Calculate hash values of all anti-malware events.
- By default, Deep Security will produce SHA-1 hash values. If you want to produce additional hash values, you can select one or both of MD5 and SHA256.
- You can also change the maximum size of malware files that will have hash values calculated. The default is to skip files that are larger than 128MB, but you can change the value to anything between 64 and 512 MB.
Configure notifications on the computer
On Windows-based agents, you might occasionally see onscreen notification messages alerting you of Deep Security actions you must take that are related to the anti-malware and web reputation modules. For example, you might see the message, A reboot is required for Anti-Malware cleanup task. You must click OK on the dialog box to dismiss it.
If you don't want these notifications to appear:
- Go to the Computer or Policy editorYou can change these settings for a policy or for a specific computer. To change the settings for a policy, go to the Polices page and double-click the policy that you want to edit (or select the policy and click Details). To change the settings for a computer, go to the Computers page and double-click the computer that you want to edit (or select the computer and click Details)..
- Click Settings on the left.
- Under the General tab, scroll to the Notifications section.
- Set Suppress all pop-up notifications on host to Yes. The messages still appear as alerts or events in Deep Security Manager. For more information about the notifier, see Deep Security Notifier.