One of the primary vectors for downloaded malware are "downloader" scripts and macros. While these scripts are not in and of themselves malware, they provide a means by which malware is placed on the target system. One popular mechanism for these downloader scripts is via Javascript attachments to email messages. These attachments can be identified by Messaging Gateway (SMG) as follows.
- Configure at attachment list for Javascript files
- Configure a content fitlering (CF) rule to identify messages with these attachments and act on them
Setting up the Attachment List
- Log into the SMG control center as an admin account with "Manage Policies" access
- Open the Content -> Attachment Lists page
- Click "Add"
- Name the attachment list something meaningful like "Javascript"
- Select the second radio button and add the "If the MIME-type contains javascript" attachment type rule
- Select the second radio button and add the "If the MIME-type contains js" attachment type rule
- Select the second radio button and add the "Extension is js" attachment type rule
- Click "Save"
When complete your attachment list should appear as follows:

Configuring the CF Policy
- Select the Content tab
- Click "Add" to add a new policy
- Select the Blank policy template
- Give the policy a meaningful name like "Javascript: Quarantine"
- Ensure that "Disable decomposition of files" is unchecked
- Apply to "Inbound" messages
- Select Any for the conditions to be met
- Click Add under policy conditions
- Select the "Attachment or Body Part" radio button
- Select the "Is in attachment list" radio button
- Select the new attachment list from the pulldown menu on the right
- Click Add Condition
- The policy condition should appear as follows

- Under Actions click Add
- Configure the desired policy action such as "Hold message in Spam Quarantine"
- Select the desired policy groups to apply the CF rule to
- Click Save
- The final policy should appear as follows
