HTTP Time Bandit
Vaagn Toukharian (Qualys)
BruCON 0x05 · Day 1
Overview
In "HTTP Time Bandit," Vaagn Toukharian from Qualys, presenting research co-developed with Tigran Kevorkian, unveils a novel method and accompanying tool designed to identify and exploit server-side resource consumption bottlenecks in web applications. The talk redefines the concept of a Layer 7 Denial of Service (DoS) attack, moving beyond brute-force traffic generation to a more surgical, analytical approach. Rather than overwhelming a server with sheer volume, the "HTTP Time Bandit" method pinpoints specific "heavy" web resources – those that demand significant CPU or database processing – and then targets them efficiently.

Key moments
- 2:00 Why develop a 'time machine' for websites
- 4:20 Limitations of traditional and smarter DoS attacks
- 10:20 Method for detecting critical, CPU-intensive web resources
- 20:00 Live demo: 5 threads max out powerful web server
- 29:20 Apache config tweaks: ModSecurity and Modevasive mitigation
- 37:40 Economic DoS: Forcing cloud providers to bill victims
- 40:00 Tool's unique focus: Time-based transfer analysis
HTTP Time Bandit
Speakers: Vaagn Toukharian, Security Researcher, Qualys
Conference: BruCON
YouTube: https://www.youtube.com/watch?v=nZc_hiv6sO8
Overview
In "HTTP Time Bandit," Vaagn Toukharian from Qualys, presenting research co-developed with Tigran Kevorkian, unveils a novel method and accompanying tool designed to identify and exploit server-side resource consumption bottlenecks in web applications. The talk redefines the concept of a Layer 7 Denial of Service (DoS) attack, moving beyond brute-force traffic generation to a more surgical, analytical approach. Rather than overwhelming a server with sheer volume, the "HTTP Time Bandit" method pinpoints specific "heavy" web resources – those that demand significant CPU or database processing – and then targets them efficiently.
The core innovation lies in its ability to predict a web application's vulnerability to DoS by analyzing the transfer times of its various resources. By treating this analysis as a "time machine" that offers insights into future server performance under stress, the researchers demonstrate how even a handful of concurrent requests to these identified critical resources can bring a powerful server to its knees. This approach drastically shifts the asymmetry of a DoS attack, enabling an attacker to achieve significant impact with minimal resources, while simultaneously providing defenders with a powerful diagnostic tool to fortify their applications against such sophisticated threats.
This presentation is crucial for anyone involved in web application security, system administration, or development, offering deep insights into a practical and effective method for both launching and defending against targeted Layer 7 DoS attacks. It highlights the often-overlooked vulnerabilities residing within application logic and resource handling, challenging conventional wisdom that focuses primarily on network-level or high-volume attacks.
Background
▶ Watch: Why develop a 'time machine' for websites (2:00)
Denial of Service (DoS) attacks have long plagued the internet, evolving from simple network floods to sophisticated application-layer assaults. Despite their prevalence, the challenge of effectively mitigating them remains a complex, multi-faceted problem. Toukharian begins by contextualizing DoS within Antoine Chobaki's taxonomy, which broadly categorizes attacks into those that crash systems, those that consume resources (at network, infrastructure, protocol, or application layers), and those that exploit business logic flaws. This talk specifically focuses on the application layer, where many modern, subtle, and often more damaging DoS attacks reside.
Traditional application-layer DoS often involved brute-force GET or POST requests, attempting to overwhelm servers through sheer volume. However, these methods are frequently expensive for the attacker, offer little feedback, and often result in near-symmetrical resource consumption, meaning the attacker's client suffers almost as much as the target server. The evolution of DoS led to "smarter" attacks like Slowloris or Slow HTTP Read/Write, which prolong connections or reserve server resources without immediately using them, thereby starving legitimate users. Other vectors include costly PKI operations or cryptographical API calls, SQL wildcards that can overheat databases (with mentions of genetic algorithms for more potent injections), and even misconfigured WebSockets that inadvertently keep connections alive, aiding slow attacks. Business logic flaws, such as allowing too many items in a shopping cart or overwhelming a logging infrastructure, also present avenues for service degradation.
The critical insight underpinning "HTTP Time Bandit" is that while these methods exist, there's a gap in identifying specific, inherently "heavy" application resources that, when targeted, offer a highly asymmetrical attack advantage. The objective is to move beyond generic flooding or complex protocol manipulations and instead pinpoint the specific URLs or endpoints that, by their very nature, demand disproportionate server resources upon request. This problem exists because many web applications, particularly complex CMSs, are developed without a full understanding of the server-side cost of processing each request, leading to "CPU hogs" or "database hogs" that are ripe for exploitation.
Key Findings
▶ Watch: Method for detecting critical, CPU-intensive web resources (10:20)
The central discovery of the "HTTP Time Bandit" research is that a highly effective and asymmetrical Layer 7 DoS attack can be mounted not by brute-forcing a server, but by intelligently identifying and repeatedly requesting specific "heavy" web resources. The method is described as a "smarter GET flooding" approach, eschewing complex techniques like genetic algorithms or slow-start attacks. Its primary goal is to amplify the asymmetrical nature of the HTTP protocol, making it significantly more resource-intensive for the server than for the client.
The process of identifying these critical resources involves:
- Crawling: A web crawler systematically explores the target website to discover all accessible resources (URLs). The current tool, while not exhaustive, provides a solid starting point and can integrate data from other crawlers.
- Continuous Requesting and Timing: Each discovered resource is requested multiple times. The transfer time – specifically, the duration from the request being sent to the last byte of the response being received – is meticulously measured for each iteration. The speaker explicitly states that client-side rendering time or fuzzing parameters are not considered; only the raw network transfer time is relevant.
- Speed Assumption: The core assumption is that resources exhibiting slower average transfer speeds are inherently "heavy" on the server side. This slowness is attributed to intensive CPU or database operations, not merely the size of the resource, as the speed for standard resources is expected to be relatively constant regardless of size.
- Statistical Analysis: To refine the identification process, statistical methods are applied. The tool calculates the mean transfer speed and standard deviation for each resource across multiple requests. Resources with a high standard deviation (meaning their response times are highly variable) are discarded. This filtering step ensures higher confidence in the identified "heavy" resources, focusing on those that consistently perform slowly. The ideal targets are those with low standard deviation and slow speed, indicating a consistently resource-intensive operation.
The key finding is the dramatic asymmetry achieved: the presentation demonstrated that sometimes only 5 to 10 connections to these identified heavy resources were sufficient to significantly degrade or even take down a powerful server. This contrasts sharply with traditional DoS methods that require thousands or millions of concurrent requests. The method effectively provides "information from the future" about a website's state under load, enabling highly targeted and efficient attacks.
Technical Deep Dive
▶ Watch: Live demo: 5 threads max out powerful web server (20:00)
The "HTTP Time Bandit" method is embodied in a tool, also named HTTP Time Bandit, which is publicly available on GitHub. This tool orchestrates the entire process of resource identification and targeted stress testing.
The workflow of the tool involves two main phases: analysis and attack simulation.
Analysis Phase (Resource Identification):
- Crawling and Iterative Measurement: The tool takes a target URL and a
depthparameter (e.g.,depth=3to crawl three levels deep) to explore the website. For each discovered resource (URL), it performs a specifiedcountof iterations. In each iteration, it sends an HTTP GET request and precisely measures the transfer time. This transfer time is defined as the duration from the moment the request is sent to the moment the last byte of the response is received. The critical underlying assumption here is that the request sending time is constant across a large number of samples, and any significant variance in the total transfer time is primarily due to the server's processing load. - Data Collection and Output: For every resource, the tool collects raw transfer times. After all iterations, it calculates the mean speed (average transfer time) and the standard deviation for each resource. This data is then outputted into an XML file, listing each resource along with its calculated mean speed and standard deviation.
- Statistical Filtering for Confidence: This is a crucial step for identifying truly "heavy" resources. The tool employs a statistical filter to discard resources that exhibit a high standard deviation. Resources with highly variable response times are considered less reliable for targeted attacks, as their "heaviness" might be inconsistent or dependent on other factors. By focusing on resources with a low standard deviation and slow mean speed, the tool identifies those that consistently impose a significant load on the server. This is visually represented in a four-quadrant graph, where the bottom-left quadrant (low standard deviation, slow speed) contains the most confident "heavy hitters." Examples of commonly identified heavy resources include
sitemapgeneration pages or complexloginauthentication endpoints, which often involve database lookups or intensive computations.
Attack Simulation Phase (Stress Testing):
Once the XML file containing the statistically validated heavy resources is generated, the tool can be used to simulate a stress test. It takes the identified resources and repeatedly requests them. The demonstration showed running the tool with a configuration that sends requests to these heavy resources a specified number of times (e.g., 1000 times) using a small number of concurrent threads or processes (e.g., five threads of five processes, with five simultaneous requests).
The technical elegance of the "HTTP Time Bandit" lies in its simplicity. It doesn't rely on complex application-layer exploits, specific CVEs, or high-volume traffic. Instead, it leverages basic HTTP request timing combined with statistical rigor to pinpoint the Achilles' heel of a web application's performance. The tool's ability to operate effectively with such minimal concurrent connections highlights the significant asymmetrical amplification it achieves, making it a potent weapon in the hands of an attacker and an indispensable diagnostic for defenders.
Demo / Proof of Concept
▶ Watch: Economic DoS: Forcing cloud providers to bill victims (37:40)
The talk included a compelling recorded demo that showcased both the analysis and attack simulation phases of the HTTP Time Bandit tool.
Analysis Phase Demonstration:
The speaker first demonstrated the tool's crawling and analysis capabilities. A command similar to crawl localhost depth=3 count=X was executed, instructing the tool to explore a local web application up to three levels deep and perform X iterations of requests for each discovered resource. The output was an XML file containing a list of resources, each accompanied by its calculated mean transfer speed and standard deviation.
During the demo, the initial output for a generic local setup showed highly scattered standard deviations, ranging from near zero to over 300, indicating inconsistent resource performance. However, when run against a specific installation of a commercial CMS, the tool successfully identified critical "heavy" resources. Examples given included sitemap generation pages and login endpoints, which often involve database queries or complex processing. The demo also displayed a scatter plot visualization, illustrating how resources with consistently slow speeds and low standard deviations (the "bottom-left quadrant") are confidently identified as server-side resource hogs. The speaker clarified that the tool internally runs multiple iterations of requests for each resource (e.g., index.html being run multiple times) before performing the statistical analysis to consolidate results.
Attack Simulation Phase Demonstration:
The most striking part of the demo was the attack simulation. Using the XML output from the analysis phase, the tool was configured to stress-test the target server. The attack setup was minimal: the tool was run five times in a row, effectively initiating five threads of five processes, with only five requests being done simultaneously to the identified heavy resources (e.g., repeatedly requesting the sitemap or login page thousands of times).
The impact on the target server was immediate and severe. The server, a relatively powerful machine equipped with four cores, 8GB of RAM, and an i7 CPU, was brought almost completely down, with its CPU idle time plummeting to a mere 1%. In stark contrast, the attacking client, an Ubuntu box, showed only 9% CPU utilization, with most of that attributed to the graphical user interface running top. This stark difference vividly illustrated the asymmetrical amplification of the attack. The "HTTP Time Bandit" successfully demonstrated that a handful of well-chosen, targeted requests could overwhelm a robust server, proving the effectiveness of identifying and exploiting specific resource bottlenecks rather than relying on sheer traffic volume.
The tool itself is available on GitHub, allowing interested parties to download and experiment with the method.
Defensive Implications
▶ Watch: Tool's unique focus: Time-based transfer analysis (40:00)
The "HTTP Time Bandit" method, while presented as an attack vector, offers profound defensive implications for web application security. Toukharian emphasizes that defending against sophisticated Layer 7 DoS is a monumental task, but the tool provides critical insights for strengthening web applications.
1. Proactive Resource Identification and Optimization (QA Tool):
The primary defensive use of the HTTP Time Bandit tool is as a Quality Assurance (QA) instrument. By running it against one's own web application infrastructure, defenders can:
- Identify CPU/Memory Hogs: Pinpoint specific URLs or endpoints that consistently consume disproportionate server resources.
- Optimize Code and Fix Bugs: Once identified, developers can analyze the code paths for these heavy resources, optimize database queries, refactor inefficient logic, or fix underlying bugs that contribute to high resource consumption. This is a direct application of the "time machine" concept – understanding future performance by analyzing current resource costs.
- Manual Intervention: For areas like SQL wildcard injection vectors, the tool can highlight potentially vulnerable fields that require manual security review and input filtering.
2. Leveraging Traditional DoS Mitigation (with Caveats):
The talk reviews common DoS mitigation strategies, acknowledging their limitations against intelligent attacks:
- Load Balancers: Commercial solutions often promise DoS protection through rate limiting, content filtering, and source IP checks. However, they can be costly, may degrade legitimate user experience if configured too aggressively, and are often bypassable by smart attackers who understand their thresholds and filtering logic (as highlighted by a Black Hat talk on bypassing DoS mitigation).
- Cloud-based DDoS Protection Services (e.g., Cloudflare): These offer similar features to load balancers, often including WAF capabilities and specific defenses against slow-loris attacks. Like load balancers, they are costly, can impact user experience, and are susceptible to bypass by adaptive attackers.
3. Apache Configuration Tweaks and Modules:
The speaker explored several Apache modules and configuration directives that can help mitigate GET flood attacks, though no single "standard catholic measure" was found to be fully effective:
mod_security: A Web Application Firewall (WAF) that can be configured with per-IP limits to block violators. It can cut down CPU usage but risks blocking legitimate users from shared IPs (e.g., corporate networks) or "slow consumers." An advanced idea proposed was a server-sidemod_securityextension that intelligently identifies and blocks requests to heavy resources based on real-time server load.mod_evasive: An easier-to-use module that sets aMaxConnPerIPlimit, effectively cutting down CPU usage. It's considered a good, quick solution for small businesses.mod_qos: A more complex module offering rate limiting with a "credit" notion, allowing some burst traffic before limiting. It also helps mitigate slow-loris attacks. Despite its complexity, it's considered a robust solution.mod_throttle: Mentioned but disliked by the speaker due to compilation issues.- Apache Directives: Directives like
TimeoutandKeepAliveTimeoutcan help against slow-loris type attacks by closing idle connections faster. mod_antiloris: A promising module that uses Project Honeycomb to collect and blacklist attacker IPs.
The core message for defenders is to understand their own application's vulnerabilities first. Before investing in expensive commercial solutions, it's advisable to utilize tools like HTTP Time Bandit to perform internal stress testing and optimize specific resource-intensive parts of the application. The ideal future state envisioned is for the tool to automatically generate configuration files (e.g., for mod_security) to protect identified heavy resources, although this remains a theoretical goal. Ultimately, continuous analysis and optimization, combined with intelligent application-layer controls, are crucial for robust defense against targeted DoS.
Key Takeaways
- Smarter, Asymmetrical DoS: The "HTTP Time Bandit" method enables highly asymmetrical Layer 7 DoS attacks by targeting specific, server-side resource-intensive web application endpoints, requiring minimal attacker resources for significant impact.
- Resource Identification through Timing and Statistics: The accompanying tool identifies "heavy" web resources by crawling, iteratively measuring HTTP transfer times (request sent to last byte received), and applying statistical analysis (mean speed, low standard deviation) to confidently pinpoint consistent resource hogs.
- Potent Attack Vector: The demonstration showed that as few as 5-10 concurrent connections to these identified heavy resources could drive a powerful server (four cores, 8GB RAM, i7 CPU) to 1% idle CPU, while the attacking client used only 9% CPU.
- Invaluable QA and Stress Testing Tool: Defenders can use the HTTP Time Bandit tool as a proactive QA instrument to identify CPU and database bottlenecks in their own applications, enabling targeted optimization, bug fixes, and code refactoring before an attack occurs.
- Limitations of Generic DoS Mitigation: While load balancers, cloud-based DDoS protection, and Apache modules (like
mod_security,mod_evasive,mod_qos) offer some defense, they are often costly, can degrade user experience, and may be bypassable by intelligent attackers who understand their thresholds and filtering mechanisms. - Focus on Application-Layer Optimization: Effective defense against this type of targeted DoS requires a deep understanding of an application's internal resource consumption. Prioritizing code optimization for identified heavy resources and implementing intelligent application-layer controls is more crucial than relying solely on network-level or brute-force mitigation.
About the Speaker(s)
Vaagn Toukharian is a security researcher at Qualys, where his primary focus is on "breaking stuff" – identifying vulnerabilities and weaknesses in systems. He co-developed the "HTTP Time Bandit" method and tool with his colleague, Tigran Kevorkian. Beyond his professional interests in security research, Vaagn shares a passion for "time travel" (a metaphor for predicting system states and vulnerabilities) and enjoys triathlons, including swimming, biking, and running. While Tigran Kevorkian contributed significantly to the research, Vaagn Toukharian presented the findings at BruCON.