IDOR Attacks

IDOR Attacks

When it comes to web application security, we often focus on the more "technical" vulnerabilities. Things like XSS, CSRF, SSRF, Serialization attacks, RCE, etc. However, more often than not, there are a multitude of vulnerabilities hiding in the business logic layer. An excellent example of this is Insecure Direct Object Reference (IDOR) attacks.

IDOR is a fancy name for a simple concept in web application security. Imagine the following endpoint in a web application.

/push.php?name=friendly_name&id=42496

This example demonstrates a simple API endpoint that takes two GET parameters, "name" and "id". The concern here is the "id" exposed to the user. What would happen if we could change this value? Could we submit data under a different id? Could we retrieve data? The threat of IDOR comes when the application does not properly check that the current user has the authority to modify or use that object.

How do we prevent this type of attack? Your first thought may be to use a UUID. UUIDs make it difficult to guess values (if the variable is 100, an attacker may try similar values; 99, 101, 102, etc.) and serve as an excellent abstraction from the actual object. The key issue here is that an attacker may attempt to leak this value through other attack vectors in your application.

While it may be a good idea to use some kind of abstractive value, the real solution is to validate that the current session has the access to make the request submitted. This way even if an attacker guesses another user's object reference, steals the abstracted value, or even steals the real one, their malicious request will not be processed.

When performing a penetration test or an application security assessment of a web application, IDOR attacks will often reveal themselves when using a proxy (like Burp Suite). If you notice a parameter that may be used to reference or control a query, you should test to ensure it cannot be used in an IDOR attack.

To view or add a comment, sign in

More articles by Nick Frichette

  • Bypass GuardDuty PenTest Alerts

    GuardDuty is Amazon Web Service’s (AWS) built in solution for detecting attacks against your environment using machine…

  • Hijacking IAM Roles and Avoiding Detection

    A common problem when building secure infrastructure is authentication. How do you allow your server to authenticate…

    1 Comment
  • Security Headers: Content Security Policy

    One of the most common (and most annoying) web application vulnerabilities is XSS (Cross Site Scripting). Depending on…

    2 Comments
  • Angular Universal: Some Insights

    Single Page Applications (SPA) have some of the best user experiences on the web. They are fast, work well with mobile,…

  • OSCP Review

    Dedication: To my incredible girlfriend who put up with the craziness of these past few months and made sure I stayed…

    16 Comments
  • What Is OPSEC?

    "Operations Security (OPSEC) is a process that identifies critical information to determine if friendly actions can be…

  • FireTraffic

    Project source code can be found here I’ve been a user of GitHub Pages for a long time. It’s a really great service.

  • XSS Attacks

    "Cross-site scripting (XSS) is a type of computer security vulnerability typically found in web applications. XSS…

  • Streisand VPN

    "The Streisand effect is the phenomenon whereby an attempt to hide, remove, or censor a piece of information has the…

  • FCC, ISPs, and You

    [Note]: This article was originally published on my website. For more articles on programming, security, and…

Others also viewed

Explore content categories