SpiderLabs Blog

LOIC DDoS Analysis and Detection

Written by Ryan Barnett | Jan 28, 2011 6:05:00 AM

Submitted By Rodrigo Montoro

LOIC (Low Orbit Ion Cannon) DDoS/DoS Analysis

The LOIC tool has been in the news for quite some time now. Many still remember the attacks on Paypal, Mastercard, and Visa, which used this tool. We've had the chance to analyze two versions of LOIC, which use four different approaches. These four approaches allow you to attack a website using both a standalone tool, and a web-only version which utilizes JavaScript. More details about this tool can be found at:

http://www.simpleweb.org/reports/loic-report.pdf

JS Version Analysis

This version of LOIC allows an individual to contribute to a "DDoS Attack" using JavaScript embedded in a webpage. The following shows an example request generated by this tool:

GET /app/?id=1292337572944&msg=BOOM%2520HEADSHOT! HTTP/1.1Host: www.example.comUser-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-us,en;q=0.5Accept-Encoding: gzip,deflateAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7Keep-Alive: 115Connection: keep-alive

For this version of LOIC, the following three items stand out:

  1. id field
  2. msg field
  3. Lot of connection with id and msg in short period .

Based on this information we created the follow snort rule:

alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"SLR - LOIC DoS ToolJS Version"; flow: established,to_server ; uricontent:"id="; uricontent:"msg="; threshold: type threshold, track by_src, count 20 , seconds 5; reference: url, www.simpleweb.org/reports/loic-report.pdf ; classtype:misc-activity; sid:1234568; rev:1;)

Binary Version

The binary version of LOIC has three methods of attack as you can see at this image below:

UDP Attack

To use UDP version a user must select the UDP option as seen in the image shown above.

For UDP, the following two behaviors were noticed

  1. UDP traffic at port 80 (you can change the port)
  2. Many connections in a short time

Based on the above criteria, we created the following Snort rule:

alert udp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"SLR - LOIC DoS Tool (UDP Mode)  - Behavior Rule (tracking/threshold)"; threshold: type threshold, track by_src, count 100 , seconds 5; reference: url, www.simpleweb.org/reports/loic-report.pdf ; classtype:misc-activity;  sid:1234590; rev:1;)

# snort -c snort-test.conf -A console -q -r /LABS2/LOIC/PCAP/LOIC-udp.pcap -O

01/27-11:58:38.849802  [**] [1:1234590:1] SLR - LOIC DoS Tool (UDP Mode)  - Behavior Rule (tracking/threshold) [**] [Classification: Misc activity] [Priority: 3] {UDP} xxx.xxx.xxx.xxx:59022 -> xxx.xxx.xxx.xxx:8001/27-11:58:38.952511  [**] [1:1234590:1] SLR - LOIC DoS Tool (UDP Mode)  - Behavior Rule (tracking/threshold) [**] [Classification: Misc activity] [Priority: 3] {UDP} xxx.xxx.xxx.xxx:59022 -> xxx.xxx.xxx.xxx:8001/27-11:58:39.024253  [**] [1:1234590:1] SLR - LOIC DoS Tool (UDP Mode)  - Behavior Rule (tracking/threshold) [**] [Classification: Misc activity] [Priority: 3] {UDP} xxx.xxx.xxx.xxx:59022 -> xxx.xxx.xxx.xxx:80

TCP
This method works quite similar to the UDP version as you can set any payload you want. Because of this, detection based on a keyword is quite difficult.

The following behavior was noticed when this version of LOIC was run:

  1. ACK TCP flag set
  2. Packet size of 1448

The following screenshot shows this behavior:



Based on this criteria, we created the following Snort rule:

[REMOVED 01/16/2013 - This rule generated too many false posisiives]

# snort -c snort-test.conf -A console -q -r /LABS2/LOIC/PCAP/LOIC-tcp.pcap –

01/27-11:59:11.405063  [**] [1:123456:1] SLR - LOIC DoS Tool (TCP Mode)  - Behavior Rule (tracking/threshold) [**] [Classification: Misc activity] [Priority: 3] {TCP} xxx.xxx.xxx.xxx:55331 -> xxx.xxx.xxx.xxx:8001/27-11:59:11.996198  [**] [1:123456:1] SLR - LOIC DoS Tool (TCP Mode)  - Behavior Rule (tracking/threshold) [**] [Classification: Misc activity] [Priority: 3] {TCP} xxx.xxx.xxx.xxx:55331 -> xxx.xxx.xxx.xxx:8001/27-11:59:12.318804  [**] [1:123456:1] SLR - LOIC DoS Tool (TCP Mode)  - Behavior Rule (tracking/threshold) [**] [Classification: Misc activity] [Priority: 3] {TCP} xxx.xxx.xxx.xxx:55332 -> xxx.xxx.xxx.xxx:80

HTTP

This version is the easiest to detect since it generates a malformed GET request as shown:

GET  /HTTP/1.0\r\n

This anomalous request was used in order to fingerprint a LOIC HTTP attack occurring. It is likely that a web application firewall (WAF) or http_inspect may detect this as well.

Based on this, we created the follow snort rule:

alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"SLR - LOIC DoS Tool (HTTP Mode)"; flow: established,to_server; content:"|47 45 54 20 20 48 54 54  50 2f 31 2e 30 0d 0a 0d 0a 0d 0a|"; threshold: type threshold, track by_src, count 10 , seconds 10; reference: url, www.simpleweb.org/reports/loic-report.pdf ; classtype:misc-activity; sid:1234569; rev:1; )

# snort -c snort-test.conf -A console -q -r /LABS2/LOIC/PCAP/LOIC-http.pcap -O

01/27-11:57:52.977537  [**] [1:1234569:1] SLR - LOIC DoS Tool (HTTP Mode) [**] [Classification: Misc activity] [Priority: 3] {TCP} xxx.xxx.xxx.xxx:55178 -> xxx.xxx.xxx.xxx:8001/27-11:57:54.184679  [**] [1:1234569:1] SLR - LOIC DoS Tool (HTTP Mode) [**] [Classification: Misc activity] [Priority: 3] {TCP} xxx.xxx.xxx.xxx:55188 -> xxx.xxx.xxx.xxx:8001/27-11:57:55.111591  [**] [1:1234569:1] SLR - LOIC DoS Tool (HTTP Mode) [**] [Classification: Misc activity] [Priority: 3] {TCP} xxx.xxx.xxx.xxx:55198 -> xxx.xxx.xxx.xxx:80

Some notes

  • A firewall rule can easily be made to detect the UDP and TCP versions of LOIC
  • Maybe we can add some alert limit to the above rules since one attack will generate lot of alerts. However, this high number of alerts will also help indicate that there is not a false positive.

We are still researching this tool and any news or modifications will be published on our blog. Keep an eye out for a post showing how you can identify and combat LOIC types of attacks using web application firewalls as well.