Use Agents to Detect SYN AttacksA SYN attack is a common denial-of-service (DoS) technique in which an attacker sends multiple SYN packets to a specific host. For each SYN packet received, the target host sends an acknowledgement (SYN-ACK) to the source IP address. Because the target host doesn't receive a response from the attacking machine, it repeatedly attempts to resend the SYN-ACK. When an attacker uses this technique repeatedly, the target host eventually runs out of resources and is unable to handle any more connections, thereby denying service to legitimate users. When a SYN attack is occurring, there will be hosts with failed flows as well as a high number of new flows per minute. Adaptive response offers several agent templates that monitor flows to/from hosts to help in the detection of SYN attacks:
After you have set up one or more of these agents, the adaptive response feature will alert you when a possible SYN attack is in process. The standard alert is a red indicator on the info tab (PacketWise) or configuration tab (PolicyCenter). In addition, you can have an email, SNMP trap, or syslog message sent to you; this method requires that you create an action file a text file of PacketWise commands. The action file can include any CLI command that can run without additional user input. See Action File Overviews for more information. In order to use this feature, the adaptive response feature must be enabled. If you want to use the preconfigured SYN Attack agent but want to review or modify the settings, refer to Modify the Syn Attack - Failed Flow Agent Settings, below. If you want to create your own agent based on either the NFPM Failed Flow or Failed Flow Ratio template, see Add a New Adaptive Response Agent for instructions on creating a new agent. Note: These agents have two host lists associated with them: exception and violating. In the exception host list, you can add the IP addresses of the hosts you don't want to trigger the agent (such as servers). The violating host list contains the IP addresses of the hosts that exceed the threshold set for the agent; adaptive response automatically adds hosts to this list when they are in violation. Create an Exception Host ListIn order to prevent your servers and other valid hosts from triggering false alarms, you will want to create an exception host list for your agents. If you want a single exception host list to apply to all host agents, you can add exception hosts to the default host list that is automatically created for you: exceptionHosts. If you want different host lists for different agents, you will need to create hosts lists with unique names. 1. Access the command-line interface. 2. Type hl show to see the host list names. 3. To create a new host list, use the hl
new command. For example: 4. To add hosts to an existing host list, use the
hl
add command. You can add multiple addresses by separating each with
a space. For example: 5. When modifying the agent (below), make sure to specify this host list name for the ExceptionHosts parameter. Modify the Syn Attack - Failed Flow Agent SettingsBy default, the Syn Attack - Failed Flow agent checks every minute to see if a host has exceeded 100,000 failed flows per minute. You'll want to set the number of failed flows threshold to a value that makes sense for your network. You may also want to change the evaluation interval (for instance, to every 10 minutes). Note: In order for the agent to work properly, you must set the FlowsThreshold to a value that is appropriate for your network traffic patterns.
After creating the agent, you will want to monitor it to see whether any hosts have been in violation. Check the Agent StatusTo check the status of the SYN attack agent(s):
Create an Action File that Sends an Email NotificationIf you would like to be notified by email when a SYN attack might be occurring, you can create a command file that contains a single line: the send email command. By designating this command file as the red action file, an email will be sent when the red threshold is crossed. Note: In order to send email notification, you must configure an SMTP server in PacketWise. To create an action file that sends an email notification: 1. If the info tab is currently displayed, click the Settings link; otherwise, go to the setup tab and click the Adaptive Response Settings link. 2. Click the edit button next to the SYN attack agent. 3. Click the browse files button. The File Browser window opens and shows the contents of the 9.258/agent/cmd directory (where action files need to be stored). 4. Click the new cmd file button. A command file window opens. 5. In the File Name field, enter a unique name for your action file up to eight characters long, including 0-9, a-z, AZ, -,_, and . (period). Spaces are not allowed. Example: synattak 6. In the Contents area, enter the following commands: 7. Click save. 8. Enter the name of your action file in the Red Action File field (for example, synattak.cmd). 9. Click OK. After the next evaluation interval, an email will be sent if and when the agent's red threshold is crossed. If you like, you can create a green action file to notify you when the agent returns to a green status. Restrict Bandwidth for Violating HostsOnce you know the IP addresses of hosts that might be involved in a SYN attack, what is your next step? One possibility is to automatically restrict the bandwidth of the violating hosts until you have a chance to research the hosts. To implement this strategy, you create traffic classes that are based on the violating host list, and then apply appropriate policies and/or partitions to these classes. 1. In Inbound, create a class with a name such as HostViolators. 2. In the Host List drop-down list for Inside, select violatingHosts (or the name you specified for the ViolatingHosts parameter). 3. Repeat step 2 for Outside. 4. Click add class to create the class. 5. Repeat the above steps to create an Outbound class named HostViolators. 6. Apply appropriate policies and/or partitions to restrict the violating hosts' bandwidth. One strategy might be:
|
PacketGuide™ for PacketWise® 8.1