• Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Menu
  • Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Search
Close
  • Home
  • 2018
  • July
  • 2
  • Layer 7 Dos: Dissecting Application Layer DDoS Attacks

Layer 7 Dos: Dissecting Application Layer DDoS Attacks

July 2, 2018July 27, 2019 Comments Off on Layer 7 Dos: Dissecting Application Layer DDoS Attacks
ddos attacks and how they work layer 7 ddos layer 7 dos attack prevent ddos attacks what is dos attack

Layer 7 attacks harness the web application logic and aim at exhausting the resources of a web server as it processes “tough” queries, as well as intensive processing functions or memory.

Distributed denial-of-service attacks zeroing in on popular websites are typically deployed using thousands of compromised devices. These onslaughts are mostly aimed at overwhelming the target systems with high-volume traffic that clogs up the communication channel. They are categorized as Layer 3 DoS/DDoS attacks hitting the network layer of the OSI model and featuring a large number of packets being fired at a host. As opposed to these, Layer 7 (application layer DoS/DDoS) attacks target weak links of web applications.

To begin with, here are some statistics based on the findings of Incapsula application delivery platform: from 2016 onwards, application layer DoS/DDoS attacks have been prevailing over classic network layer incursions.

One of the obstacles to identifying these types of attacks is that a web application cannot easily differentiate them from regular traffic. There are many factors underlying this hurdle, but perhaps the key reason is that IP addresses cannot be considered to be clear-cut indicators of compromise. When a network layer attack is underway, it’s possible to detect the rogue traffic and block the offending IP addresses (and only if attackers do not use advanced VPN services). In the case of Layer 7 DoS, though, this objective is more challenging because it presupposes determining the malicious entities without blocking regular users. Furthermore, routine use of a host (not attack-related) can exhaust its resources as well.

 

Main types of DoS/DDoS attacks

Volumetric attacks are aimed at overwhelming the bandwidth capabilities of a host infrastructure’s web application by sending an abnormally high volume of traffic to it. This traffic usually comes in the form of UDP/ICMP flood.

Layer 3 attacks typically exploit weaknesses of TCP protocol stack architecture. The adversary sends packets that overwhelm, distort or destroy connection status information, which causes extra load on the target host’s network processing functions and affects its overall responsiveness. The most common vectors of these attacks include TCP SYN flood, TCP fragmentation, and teardrop.

Layer 7 attacks harness the web application logic and aim at exhausting the resources of a web server as it processes “tough” queries, as well as intensive processing functions or memory.

 

Application capacity

Most web servers can process data simultaneously generated by several hundred regular users. The problem is, one attacker can generate enough traffic from a single host to cause denial-of-service of a web application. Balancing the load isn’t effective in this scenario.

The main concerns here are as follows: CPU utilization – when 99% of CPU capacity is used up, other critical processes will halt; RAM – unacceptable memory allocation, leaks and memory exhaustion cause other critical processes to stop responding; processes and flows – deadlock, forks, race condition; disk – the disk overflow issue.

 

RAM is one of the most important resources of a web server. The following attacks seek to exhaust it:

Recursion. Here’s a good example of recursive code – include (current_file.php). PHP will allocate a new portion of memory for each inclusion and iterate the process until there’s no memory left. This vulnerability can be identified as classic LFI (local file inclusion).

Zip bomb. Web applications that allow uploading compressed files and extracting their contents can be susceptible to such an attack, especially if the application (or library that processes the decompression) doesn’t check the file properly.

XML bomb. These entities can open up in character strings and also in the sequences of other entities. Whereas recursion can be prohibited by the standard, there are no restrictions regarding the permissible nesting depth. This allows for compact rendering of very long text lines – similarly to how archive solutions do it – and poses as the core of the so-called “billion laughs” attack.

Deserialization. Although this is a relatively new type of attack, it was included in OWASP Top 10-2017 A8-Insecure Deserialization. This technique comes down to restoring the initial state of data structure from the bit sequence. It can exhaust memory resources if there is poor user input control in place.

File headers. Manipulating the values of file headers can exhaust a server’s resources, too. This holds true if the computation is performed in the input file, where file size is stored in its header. These can be images, video files, documents, etc. The pixel flood attack makes a good example.

Reading infinite data streams. This technique boils down to reading /dev/zero or /dev/urandom via LFI, using 1TB Speedtest, etc.

 

CPU is another important parameter of a web server, where attacks exhausting available processing capacity can take down a web application.

reDOS – Regular Expression Denial of Service. This is a relatively new type of attack. It was originally discovered at Stack Overflow. It wasn’t pulled off by a rogue player. Instead, it was triggered by a user who included 20,000 blank space symbols in a fragment of code. The regular expression was written in such a way that it instructed the system to check a line consisting of 20,000 symbols in a very large number of backtracking steps (20,000 + 19,000 +… + 2 + 1). If a web application allows regular expressions, it makes sense to scrutinize the input data.

SQL injection. The use of SQL injection can reduce the productivity of a web application considerably, especially via functions like ‘sleep’, ‘benchmark’, etc.

Fork bomb. This attack invokes processes that iterate over and over, using up all resources of the system. The most common process of this sort is ‘:(){ :|:& };:’.

Resource/function abuse. A perpetrator can spot a resource-heavy command in a web application and generate numerous queries to it in order to exhaust available resources. Abusing password hashing functions is a good example.

SSRF. By exploiting Server Side Request Forgery vulnerabilities, a threat actor may be able to exhaust the resources of a targeted server.

 

Disk space is a critical characteristic of a web server, too.

Uploading large files onto a server. This is the most obvious method to flood a system with data. If a web application doesn’t have appropriate restrictions in place, an adversary can keep uploading data onto the system until the web server runs out of resources.

Flooding system logs. In a scenario where no log rotation function is in effect, an attacker can flood system logs or cause a huge number of these logs to be generated, which will ultimately exhaust disk space.

 

Web application testing tools

We will deliberately skip highly specialized utilities like LOIC (Low Orbit Ion Cannon) and HOIC (High Orbit Ion Cannon), which are aimed at destabilizing the work of specific web applications.

Malicious use of these tools is forbidden and can be subject to legal prosecution in your country of residence. Be sure to only use them for stress testing your own servers or the ones being stress tested with the official consent of their owner.

  • Slowloris is a well-known denial-of-service attack tool. There is also a corresponding NSE script for nmap.
  • HULK (HTTP Unbearable Load King) – this one generates a sizeable flow of unique queries that consumes a maximum of the web server’s resources. In order to tangle the flow filtering routine, HULK leverages different user agent values for each query, obfuscates the referrer, uses no-cache and keep-alive attributes, as well as unique URLs in these queries.
  • OWASP DoS HTTP POST is a tool by the OWASP community that generates “slow” HTTP requests.
  • The GoldenEye HTTP Denial of Service Tool is a Python app that exploits HTTP Keep-Alive + NoCache attack vector.

 

Prevention

   One of the most effective ways to protect a web application is to stress test it. The goal of this technique is to evaluate system response under high or peak load that exceeds its routine parameters. This practice allows you to analyze the productivity of a system in abnormal load scenarios, identify the weak links of your web application and reduce the risk of application downtime in the future.

 

Post navigation

The OSINT Omnibus
Fix Could not get lock /var/lib/dpkg/lock – Resource temporarily unavailable

Related Articles

UFONet – Toolkit Designed to launch DDoS and DoS attacks.

- Denial of service
July 24, 2019July 23, 2019

DHCP Starvation: DoS Attacks to the DHCP Server

- Denial of service, Hacking Tutorials
April 23, 2019July 27, 2019

Xerxes – DoS Tool Enhanced

- Denial of service, Hack Tools
March 22, 2019July 27, 2019
hacker gadgets
hacker phone covers

Recent Posts

CVE-2023-28326: Critical Vulnerability in Apache OpenMeetings

CVE-2023-28326: Critical Vulnerability in Apache OpenMeetings

March 28, 2023
Decider - A Web Application That Assists Network Defenders, Analysts, And Researcher In The Process Of Mapping Adversary Behaviors To The MITRE ATT&CK Framework

Decider – A Web Application That Assists Network Defenders, Analysts, And Researcher In The Process Of Mapping Adversary Behaviors To The MITRE ATT&CK Framework

March 28, 2023
Android app from China exploited 0-day CVE-2023-20963 flaw

Android app from China exploited 0-day CVE-2023-20963 flaw

March 28, 2023
Geogramint: OSINT Geolocalization tool for Telegram

Geogramint: OSINT Geolocalization tool for Telegram

March 28, 2023
Polaris: open source policy engine for Kubernetes

Polaris: open source policy engine for Kubernetes

March 27, 2023
ThunderCloud - Cloud Exploit Framework

ThunderCloud – Cloud Exploit Framework

March 27, 2023

Social Media Hacking

SocialPath – Track users across Social Media Platforms

SocialPath – Track users across Social Media Platforms

- Social Media Hacking
October 16, 2019October 16, 2019

SocialPath is a django application for gathering social media intelligence on specific username. It checks for Twitter, Instagram, Facebook, Reddit...

SocialScan – Check Email Address and Username Availability on Online Platforms

SocialScan – Check Email Address and Username Availability on Online Platforms

June 17, 2019
Shellphish – Phishing Tool For 18 Social Media Apps

Shellphish – Phishing Tool For 18 Social Media Apps

June 10, 2019July 27, 2019
WhatsApp Hacking using QRLJacking

WhatsApp Hacking using QRLJacking

May 2, 2019May 19, 2019
How to Hack any Facebook Account with Z-Shadow

How to Hack any Facebook Account with Z-Shadow

April 26, 2019June 29, 2020
hacker buffs

About Us

Haxf4rall is a collective, a good starting point and provides a variety of quality material for cyber security professionals.

Join Our Community!

Please wait...
Get the latest News and Hacking Tools delivered to your inbox.
Don't Worry ! You will not be spammed

Active Members

Submit a Tool

Hackers Handbook 2018


Grab your copy here

ABOUT US

Haxf4rall is a collective, a good starting point and provides a variety of quality material for cyber security professionals.

Our primary focus revolves around the latest tools released in the Infosec community and provide a platform for developers to showcase their skillset and current projects.

COMPANY
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • LANC Remastered
  • PCPS IP Puller
  • Privacy Policy
  • Sitemap
  • Submit your Tool
Menu
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • LANC Remastered
  • PCPS IP Puller
  • Privacy Policy
  • Sitemap
  • Submit your Tool
Live Chat
RESOURCES
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Menu
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Get Started
TOOLBOX
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Menu
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Tools Directory

2014 – 2020 | Haxf4rall.com               Stay Connected:

Facebook Twitter Google-plus Wordpress
Please wait...

Join Our Community

Subscribe now and get your free HACKERS HANDBOOK

Don't Worry ! You will not be spammed
SIGN UP FOR NEWSLETTER NOW