Kuboid
Open Luck·Kuboid.in

Paywall Optional: Recursive Request Exploits

DEFCONConference1,017 views20:186 months ago

This talk introduces Recursive Request Exploits (RRE), a methodology for automating the discovery of sensitive data leaks by tracing interdependent API calls in reverse. The technique targets web applications that rely on weak authentication and insecure direct object references (IDOR) to protect digital assets. By leveraging Shannon entropy to identify potential 'magic parameters' within API chains, the speaker demonstrates how to bypass paywalls and access restricted content. The presentation includes a custom Burp Suite extension that automates this recursive tracing process.

Automating API Chain Exploitation with Recursive Request Tracing

TLDR: Recursive Request Exploits (RRE) is a new methodology for automating the discovery of sensitive data leaks by tracing interdependent API calls in reverse. By using Shannon entropy to identify high-value parameters within complex API chains, researchers can bypass authentication and access restricted content without manual trial and error. This approach turns what was once a time-consuming manual task into a scalable, automated process for identifying broken access control vulnerabilities.

Modern web applications are rarely monolithic. They are built on complex, asynchronous API chains where a single request might trigger a cascade of internal calls. When developers prioritize user experience over security, they often pass sensitive identifiers—like video IDs or account tokens—down these chains without verifying authorization at every hop. This creates a massive, often overlooked attack surface. If you can identify the "magic parameter" that unlocks a resource, you can often bypass the entire authentication layer.

The Mechanics of Recursive Request Exploits

The core of the RRE methodology is the AppSec Principle of First Reference. In any user workflow, there is a point where a sensitive value is introduced. If that value is generated by an upstream API call that lacks proper authorization checks, the entire downstream chain is compromised.

The challenge for a pentester is that these chains are often deep, nested, and asynchronous. Manually tracing them is a high-effort, low-reward task. RRE solves this by automating the reverse-tracing process. Instead of guessing which parameter matters, the RRE tool analyzes the HTTP history and uses Shannon entropy to score parameters. High-entropy values, like random tokens or GUIDs, are flagged as potential keys, while low-entropy values are treated as potential identifiers.

Once a candidate parameter is identified, the tool recursively walks the API chain to find the originating call. If that originating call is accessible without authentication, you have found a path to exploit the entire chain.

Technical Implementation and Entropy Scoring

The RRE tool, which is available as a Burp Suite extension, automates this by hooking into the Burp Proxy history. The entropy calculation is straightforward but effective. By measuring the randomness of parameter values, the tool can distinguish between static identifiers and dynamic, high-value secrets.

The following logic snippet demonstrates how the tool evaluates these parameters during the trace:

# Simplified entropy check for parameter identification
def calculate_entropy(data):
    if not data: return 0
    entropy = 0
    for x in range(256):
        p_x = float(data.count(chr(x)))/len(data)
        if p_x > 0:
            entropy += - p_x * math.log(p_x, 2)
    return entropy

By setting a tunable threshold, you can filter out the noise of standard application traffic and focus on the parameters that actually control access. During a recent engagement, this technique allowed for the enumeration of over 1,800 internal company meeting videos simply by identifying the ID parameter that the search API leaked. The search API was public, but the video stream API it fed into was supposed to be protected. Because the stream API trusted the ID provided by the search API without re-validating the user's session, the entire paywall was rendered useless.

Real-World Impact and Testing

You will encounter this pattern most frequently in streaming services, news portals, and any application that uses a "gateway" API to aggregate data from multiple microservices. The impact is significant. In many cases, this is not just a simple Broken Access Control issue; it is a systemic failure of the authorization model.

When testing, start by mapping the application's API surface. Look for requests that return large JSON blobs containing multiple IDs. Use the RRE extension to trace those IDs back to their source. If you find an ID that, when passed to a different endpoint, returns a 200 OK instead of a 403 Forbidden, you have a high-impact finding. The beauty of this technique is that it works even when the application uses complex, non-sequential IDs, because the tool does the heavy lifting of mapping the relationship between the parameters.

Defensive Strategies

Defending against RRE requires moving away from the assumption that internal API calls are inherently safe. Every service in your chain must enforce strong authentication and authorization. Do not rely on "security by obscurity" or the hope that an attacker won't find the right ID.

If you are building a streaming or content-delivery platform, implement short-lived, scoped tokens that are bound to the user's session. Even if an attacker discovers a valid video ID, they should not be able to use it without a valid, time-bound authorization token. Furthermore, audit your API responses to ensure they do not leak internal identifiers that can be used to query other, more sensitive endpoints.

Stop treating your internal APIs as a trusted zone. If an attacker can reach your search endpoint, they can reach your entire data chain. Start auditing your API dependencies today, or someone else will do it for you.

Talk Type
research presentation
Difficulty
advanced
Category
web security
Has Demo Has Code Tool Released


DEF CON 33 Main Stage Talks

98 talks · 2025
Browse conference →
Premium Security Audit

We break your app before they do.

Professional penetration testing and vulnerability assessments by the Kuboid Secure Layer team. Securing your infrastructure at every layer.

Get in Touch
Official Security Partner
kuboid.in