<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gonzalo Carrasco on Medium]]></title>
        <description><![CDATA[Stories by Gonzalo Carrasco on Medium]]></description>
        <link>https://medium.com/@gonzalocarrascosec?source=rss-cadbbab61c4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*AgYKFW9Y-OXU3YdYy2-qhQ.jpeg</url>
            <title>Stories by Gonzalo Carrasco on Medium</title>
            <link>https://medium.com/@gonzalocarrascosec?source=rss-cadbbab61c4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 00:16:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gonzalocarrascosec/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Fuzzing + IDOR = Admin TakeOver]]></title>
            <link>https://medium.com/@gonzalocarrascosec/fuzzing-idor-admin-takeover-5343bb8f436e?source=rss-cadbbab61c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/5343bb8f436e</guid>
            <category><![CDATA[idor]]></category>
            <category><![CDATA[account-takeover]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Gonzalo Carrasco]]></dc:creator>
            <pubDate>Mon, 09 Aug 2021 20:41:02 GMT</pubDate>
            <atom:updated>2021-08-14T17:34:29.942Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everyone, this is my first post. I’ve been thinking about writing about my findings for a while, so here we go.</p><p>Please let me know if you notice any spelling errors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*LQs9X1JxNXHYyNaNlq2bUQ.jpeg" /><figcaption><a href="https://pixabay.com/es/photos/m%c3%a1quina-de-escribir-mec%c3%a1nica-retro-407695/">https://pixabay.com/es/photos/m%c3%a1quina-de-escribir-mec%c3%a1nica-retro-407695/</a></figcaption></figure><p>We will call the victim web “<strong>example.com</strong>”. This objective has 6 well defined user roles. The user with low privileges I call it “<strong>Low Privilege</strong>” and the one with higher privileges I call it “<strong>Super Admin</strong>”.</p><h4>Step 01</h4><p>I love the fuzz, so first of all I started with fuzzing against the endpoint “<strong>/api/FUZZ</strong>” without login in the app, using the tool <a href="https://github.com/ffuf/ffuf">ffuf</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nSLgC7xvmYjFqw60WI_MYw.png" /></figure><p>I found <strong>4</strong> endpoints, <strong>2</strong> of them are important here:</p><ul><li><strong>user/users</strong></li><li><strong>user/updateuser</strong></li></ul><h4>Step 02</h4><p>I make a request against the found endpoint and I can see that the server only accepts the <strong>POST </strong>method:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/1*ZklLtrA7mvGJLx8fZeTjCg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*ppk9U65Ddt0n7lrqZEq2wA.png" /></figure><h4>Step 03</h4><p>I change the method to <strong>POST</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*3SF2Ij3Yv4skPUuUeguaNA.png" /></figure><p>And I can see that a message is displayed for <strong>lack </strong>of <strong>authorization </strong>to interact with the resource (endpoint):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*m5nztWwZwiSy2vJ2PLyRaA.png" /></figure><h4>Step 04</h4><p>At this point, I need an <strong>authorization token</strong>. To obtain it, I log in to the application with my “<strong>Low Privilege</strong>” user account:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/181/1*ITwIYpS6b9JsU3YlNLT8hQ.png" /></figure><p>I click on any request and <strong>intercept </strong>the <strong>valid request </strong>on the backend, which attaches the “<strong>Authorization</strong>” header with the <strong>JWT</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*Wv6je-MMTYqPlDYWcedfVA.png" /></figure><h4>Step 05</h4><p>From the endpoint “<strong>/api/vehicle/getLoggedInUserBookings</strong>” I can see a header “<strong>Authorization: Bearer [token]</strong>”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QNpRDdQAPSvsH1FTJbRPOg.png" /></figure><h4>Step 06</h4><p>I copy and paste this header in my request from <strong><em>Step 03</em></strong>. I add the “<strong>Authorization</strong>” header with the token that I <strong>captured previously </strong>and make the request. At this point I noticed a <strong>new error message</strong> returned by the application:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aH6INf4ZOzvAnETtHs3oBg.png" /></figure><h4>Step 07</h4><p>Now, the first thing I think about is “<strong>balancing” the request </strong>to get a clean response from the server. This got me thinking about changing some headers like “<strong>Content Type</strong>” and “<strong>Accept</strong>”. Also, I always add a <strong>random parameter</strong> (JSON format) in the request with a random value to determine how the server reacts:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MtmjHDCl4f8wPAMYZzfRnA.png" /></figure><h4>Step 08</h4><p>My first thought when faced with a new <strong>API </strong>is to <strong>save every single parameter</strong> I come across along the way. Continuing with this thought, I use the parameters I found in the request from <strong><em>Step 05</em></strong> to debug the responses and <strong>try </strong>to get an <strong>accurate </strong>HTTP <strong>200 OK</strong> response:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EXYMaw4V_JVRojmkzO5dlw.png" /></figure><p>The message “<strong>User details fetch successfully</strong>” tells me that everything is fine!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F3oz8xQQP4ahKiyuxHy%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F3oz8xQQP4ahKiyuxHy%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F3oz8xQQP4ahKiyuxHy%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="319" frameborder="0" scrolling="no"><a href="https://medium.com/media/9967ac4de5583f64367922bafe667108/href">https://medium.com/media/9967ac4de5583f64367922bafe667108/href</a></iframe><h4>Step 09</h4><p>It is an important point in the exploitation, since I <strong>must look </strong>for one or more <strong>parameters </strong>that allow me to <strong>obtain more information</strong>.</p><p>Okay, using <strong>fuzzing </strong>techniques again, I find a valid parameter. This parameter was found with the name of ‘<strong>“role: 1”</strong>’:</p><p>The <strong>correct syntax </strong>to get the correct result with <strong>ffuf </strong>is as follows:</p><pre>ffuf -w g0ld3n-api.txt -u https://vulnerable.com/api/endpoint -X POST --data &#39;{&quot;param1&quot;:value1,&quot;param2&quot;:value2,&quot;FUZZ&quot;:6}&#39; -H &#39;Authorization: Bearer JWT&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Q6ShfI6ygcV_sx1rQ37DQ.png" /></figure><h4>Step 10</h4><p>Then I send the request with this new parameter (<strong>role</strong>) and the server returns me <strong>confidential information</strong> <strong>about all the users</strong> with the “<strong>role</strong>” equal to “<strong>6</strong>” corresponding to the <strong>Low Privilege</strong> role:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WB2vnXv5oyrl1eH9NJRm_Q.png" /></figure><h4>Step 11</h4><p>At this point I can <strong>detect </strong>that the <strong>API </strong>is vulnerable to <strong>IDOR </strong>in its functionality to view user information. Now, will it also be true for the “<strong>update user</strong>” endpoint found previously in <strong><em>Step 01</em></strong>?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FpuOukoEvH4uAw%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FpuOukoEvH4uAw%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FpuOukoEvH4uAw%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="482" frameborder="0" scrolling="no"><a href="https://medium.com/media/882960c09e73142840c92d3efafa1646/href">https://medium.com/media/882960c09e73142840c92d3efafa1646/href</a></iframe><p>I use the parameters found in<strong> <em>Step 10</em></strong> and start <strong>debugging </strong>to find a valid response from the server against the endpoint “<strong>/user/updateuser</strong>”. Once I achieve the “<strong>balance</strong>” to make the correct request, I change the value of the parameter ‘<strong>”role “: 6</strong>’ to ‘<strong>“role”: 1</strong>’:</p><ul><li><strong>Role 6 = Low Privilege</strong></li><li><strong>Role 1 = Super Admin</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-bz0gFKEylwLIEeh4bsRvA.png" /></figure><p>I log in again with my user and I see that I am now <strong>Super Admin</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*U_9AknOn8jNeR13hTWM1GQ.png" /></figure><p>Thank you very much for reading and please let me know if you notice any errors or inconsistencies.</p><p>I leave my git and twitter in case you want to take a look at it:</p><ul><li><a href="https://www.linkedin.com/in/gonzalo-carrasco-3a2727158/">https://www.linkedin.com/in/gonzalo-carrasco-3a2727158/</a></li><li><a href="https://github.com/0xCGonzalo/Golden-Guide-for-Pentesting">https://github.com/0xCGonzalo/</a></li><li><a href="https://twitter.com/0xCGonzalo">https://twitter.com/0xCGonzalo</a></li></ul><p>Take care!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FUUzjHVJX8XNXMDuWal%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FUUzjHVJX8XNXMDuWal%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FUUzjHVJX8XNXMDuWal%2Fgiphy-downsized-large.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/f8c38b8b2bb1924f3db8b23aff3b9172/href">https://medium.com/media/f8c38b8b2bb1924f3db8b23aff3b9172/href</a></iframe><p>Gifs Source: <a href="https://giphy.com/">https://giphy.com/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5343bb8f436e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>