The Hidden IDOR That Took Down Redirected.com šŸ¤Æ

Goutham A S
3 min readSep 21, 2024

--

Ah, IDOR vulnerabilities ā€” what are they good for? Unauthorized access to someone elseā€™s to-do list? Meh, boring. But what if I told you that an IDOR could lead to complete domination of an entire web app? šŸš€ Buckle up, because today, Iā€™m going to take you on a wild ride through an IDOR vulnerability that snowballed into full-blown ownership of Redirected.com (totally a real app, I swear! šŸ˜œ). If youā€™re thinking ā€œIDORs are easy!ā€ ā€” well, think again.

Phase 1: The Gateway to Chaos

So, there I was, casually testing Redirected.com, a massive SaaS platform handling user accounts, roles, and admin features. Everything seemed tightā€¦ until I stumbled upon an innocent-looking endpoint:

/account/modify/<uuid>/transfer

This endpoint was meant to allow admins to transfer accounts between users. Exceptā€¦ something smelled fishy šŸŸ (and not the good sushi kind). It turns out, the API didnā€™t strictly enforce access control checks. Like, at all. šŸ¤¦ā€ā™‚ļø

The First Sign of Trouble: Metadata Galore

Time to poke around! I crafted a request to transfer an adminā€™s account to my lowly user account. But Redirected.comā€™s server responded with an error. At first, I thought, ā€œPfft, this app is smarter than I thought.ā€

But thenā€¦ šŸ’” I realized the error response was leaking sensitive metadata ā€” specifically, internal role IDs and account UUIDs of admin users! These juicy tidbits were about to become my golden ticket šŸŽŸļø.

Phase 2: The Role Swap That Shouldnā€™t Be Possible

Using the leaked metadata, I found an orphaned endpoint /role/modify/<uuid>. This endpoint should have required strict permissions for role modification. But surprise! The developers never actually put those checks in place. šŸ˜¬

Now, I didnā€™t just want access to another userā€™s account ā€” I wanted admin privileges! šŸ’¼ So, I tweaked the request to modify the adminā€™s role andā€¦ šŸŽ‰ BAM! My user account was now sporting shiny new admin rights. I was living the dream! (Well, at least the hackerā€™s dream.)

Phase 3: Session Fixation FTW

At this point, I was feeling pretty powerful. But, like any responsible hacker, I knew admin privileges werenā€™t enough. What if they revoked my access? šŸ˜± Not on my watch!

The app had a critical flaw: session fixation. This allowed me to lock my session in place before authentication even happened. It was like getting the keys to the adminā€™s mansion šŸ° and changing all the locks. Even if they figured out something was wrong, they couldnā€™t kick me out. Cue evil laughter šŸ¦¹ā€ā™‚ļø.

Phase 4: SSO ā€” The Achillesā€™ Heel

But wait, thereā€™s more! Redirected.com used Single Sign-On (SSO), and I was curious: Could I break in even further? šŸ¤” (Of course I could!)

Hereā€™s where it gets juicy šŸ‰: The SSO trusted user-provided tokens without actually verifying them with the Identity Provider (IDP). Whoops. Now, using my newly acquired admin access, I forged an SSO token that let me impersonate the super-admin ā€” basically the god of all accounts. šŸŽ©

In doing so, I gained access to the entire platform, including settings, user data, and admin privileges galore. If I wanted, I couldā€™ve turned off the whole siteā€¦ but thatā€™s just mean. šŸ˜‡

Conclusion: How an Innocent IDOR Escalated Into Full-On App Takeover šŸšØ

Most people think of IDORs as harmless little flaws that maybe let you peek at someone elseā€™s data. But this saga shows that an IDOR ā€” when combined with metadata leaks, orphaned endpoints, session fixation, and SSO misconfigurations ā€” can lead to total system compromise. šŸ™Œ

So, what have we learned?

  • Always validate permissions server-side. šŸ”’
  • Never assume UUIDs make you invulnerable. šŸ§©
  • Fix your session fixation issues, seriously. šŸ› ļø
  • Test your SSO like your life depends on it. āš ļø

Because if you donā€™t, someone like me might come along, chain these flaws together, and own your entire platform. šŸ’„

Happy Hacking, Cheers šŸ»šŸ»

--

--

Goutham A S
Goutham A S

Written by Goutham A S

Assistant Manager - Information Security | Ethical Hacker | Penetration Tester | Blogger | SAST | DAST | API Security | AWSOps | AZ-500 | Reverse Engineering

No responses yet