Learn How Your ISA Server Helps Block W32/Bagle.B Traffic

Note

This page was first published on Friday, March 08, 2004.

The first course of action taken against W32.W32.Bagle.B .B (Alua) must be protecting and patching all affected computers. Find out what you should know about the Bagle worm.

The following information explains how to use Microsoft Internet Security and Acceleration (ISA) Server 2000 to help block malicious traffic created by Bagle and its variants and to possibly prevent computers on internal networks from additional infection. Servers running ISA Server in cache mode cannot restrict Bagle traffic.

The first section of this article contains technical details about Bagle:

  • Affected Ports

In addition, this article details three scenarios where ISA Server can mitigate a Bagle attack:

  • Protecting internal networks from external attack with ISA Server
  • Helping to prevent outbound Bagle attacks through ISA Server
  • Protecting the computer running ISA Server from Bagle attacks

This article also discusses:

  • How to make sure that ISA Server is correctly configured

Disclaimer

Microsoft makes no warranties about this information. In no event shall Microsoft be liable for any damages whatsoever arising out of or with the use or spread of this information. Any use of this information is at the user's own risk.

Affected Ports

Table 1 lists affected ports known to be used by Bagle. You should block those ports. This data is current as of 12:28:09, Monday, March 8th 2004.

# Port Number IP Protocol Known to Be Used by Bagle ?

1

8866

TCP

Yes

Protecting Internal Networks from External Attack with ISA Server

By default, servers running ISA Server in firewall or integrated modes effectively help protect against Bagle by blocking the external attacks on the affected ports.

For the network protected by a server running ISA Server to be vulnerable, specific rules would need to be written to allow traffic on these ports.

  • DO enable Internet protocol (IP) packet filtering.

Note

Customers who have not enabled IP packet filtering should review the packet filtering section of this page.

Warning

Do not create server publishing rules using the ports listed in Table 1.

Helping to Prevent Outbound Bagle Attacks Through ISA Server

Default installations of ISA Server in firewall or integrated mode prevent the spread of Bagle to external networks. However, if your ISA Server is configured with an "allow all" policy for outbound traffic, then you must create protocol rules to block Bagle on its known ports.

To help prevent outbound attacks through ISA Server:

  • DO create protocol rules that block traffic on all ports listed in Table 1.

Note

Customers who have not blocked this traffic should review the block outbound traffic procedure on this page.

  • DO disable the Firewall Client for malicious W32.Bagle.B processes, if the Firewall Client is being used in your environment. If all outbound access is authenticated, this will prevent the worm from acting as a Firewall Client through ISA Server.

Note

For instructions how to do this, review the disable malicious Bagle processes section on this page.

Protecting the Computer Running ISA Server from Bagle Attacks

A computer that has ISA Server installed is only vulnerable to attack by the Bagle worm if:

  1. You use an e-mail client on the ISA Server itself.
  2. You execute an e-mail attachment delivered by Bagle.

Warning

To help protect the ISA Server computer itself from a Bagle attack, do not use the computer running ISA Server as a workstation.

How to Make Sure that ISA Server Is Correctly Configured

To enable IP packet filtering:

  1. In ISA Management, expand Servers and Arrays, <ISA Server name>, Access Policy.
  2. Right-click IP Packet Filters and select Properties.
  3. Check the Enable Packet Filtering box.
  4. Click OK.

To verify that no server publishing rules use Bagle ports:

  1. In ISA Management, expand Servers and Arrays, <ISA Server name>, Publishing Rules.
  2. Click Protocol Definitions.
  3. In the right-side pane, click the Port Number column header to sort the list by port number.
  4. Write down the names of any protocol definitions that include the port and protocol combination as listed in Table 1.
  5. In the left pane, expand Publishing.
  6. Click Server Publishing Rules.
  7. Examine all the server publishing rules. If anything in the Protocol column matches the name of a protocol definition that you wrote down in Step 4, that server publishing rule must be disabled or deleted.

If you are using an "allow all" policy for outbound traffic, protocol definitions need to be created for all ports listed in Table 1. You should create a protocol definition for each port to be blocked, where:

  • <port number> is the number of the port from the second column of Table 1
  • <IP protocol> is TCP

Note

Isatools.org hosts a block Bagle script that can automate some of the following manual tasks.

To block outbound traffic on known Bagle ports listed in Table 1:

  1. In ISA Management, expand Servers and Arrays, <ISA name Server>, Policy Elements.
  2. Right-click Protocol Definitions, point to New, and then click Definition.
  3. Type Bagle (<port number>, <ip protocol>) in the Protocol Definition Name dialog box and then click Next.
  4. Type <port number> in the Port Number dialog box.
  5. Select <protocol type> in the Protocol Type drop-down list.
  6. Select Outbound from the Direction dialog box.
  7. Click Next.
  8. Select No from the Do you want to use secondary connections? option, and then click Next.
  9. Click Finish.

To prevent traffic on known Bagle ports:

  1. In the left pane, expand Access Policy.
  2. Right-click Protocol Rules, point to New, and then click Rule.
  3. Type Block W32.Bagle in the Protocol Rule Definition Name dialog box and then click Next.
  4. Select Deny from the Response to client requests to use this protocol option.
  5. Select Selected protocols from the Apply this rule drop-down list.
  6. In Protocols, check the boxes for the newly created protocol definitions in Steps 1–9.
  7. Click Next.
  8. Select Always from the Use this schedule drop-down list and then click Next.

The malicious Bagle process operates as au. A Firewall Client rule must be created to disallow access by these processes through the Firewall Client.

To disable the Firewall Client for malicious Bagle processes:

  1. In ISA Management, expand Servers and Arrays, <ISA Server name>.
  2. Click Client Configuration.
  3. In the right pane, right-click Firewall Client and then click Properties.
  4. Click the Application Settings tab.
  5. Click New.
  6. Type au in the Application dialog box.
  7. Select Disable from the Key drop-down list.
  8. Select 1 from the Value drop-down list.
  9. Click OK.
  10. Click OK.

Disabling the Firewall Client for the malicious process only prevents the malicious processes on an infected LAT host from acting as a Firewall Client. If the host is also configured as a SecureNAT client, then this setting may have no effect. (To prevent SecureNAT client access across ISA Server, make sure that no anonymous Site and Content or Protocol rules exist.)