CVE-2024-3400: PAN-OS Command Injection Vulnerability in GlobalProtect Gateway. Learn More

CVE-2024-3400: PAN-OS Command Injection Vulnerability in GlobalProtect Gateway. Learn More

Services
Capture
Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

twi-managed-portal-color
Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

twi-briefcase-color-svg
Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

tw-laptop-data
Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

twi-database-color-svg
Database Security

Prevent unauthorized access and exceed compliance requirements.

twi-email-color-svg
Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

tw-officer
Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

tw-network
Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Solutions
BY TOPIC
Offensive Security
Solutions to maximize your security ROI
Microsoft Exchange Server Attacks
Stay protected against emerging threats
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Partners
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats
SpiderLabs Blog

LOIC DDoS Analysis and Detection

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:

11661_c45e4f3c-094d-4e5d-8bc5-21f5485ede7f

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:

10667_93cdd7f2-4b41-42ec-a667-86f87c73533e

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.

10670_93f9e1b5-0018-4dc7-86ce-dbf8626a4e73

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.

Latest SpiderLabs Blogs

EDR – The Multi-Tool of Security Defenses

This is Part 8 in my ongoing project to cover 30 cybersecurity topics in 30 weekly blog posts. The full series can be found here.

Read More

The Invisible Battleground: Essentials of EASM

Know your enemy – inside and out. External Attack Surface Management tools are an effective way to understand externally facing threats and help plan cyber defenses accordingly. Let’s discuss what...

Read More

Fake Dialog Boxes to Make Malware More Convincing

Let’s explore how SpiderLabs created and incorporated user prompts, specifically Windows dialog boxes into its malware loader to make it more convincing to phishing targets during a Red Team...

Read More