<?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 Mostafa Muhammed on Medium]]></title>
        <description><![CDATA[Stories by Mostafa Muhammed on Medium]]></description>
        <link>https://medium.com/@0xmostafa?source=rss-dbd484fe6b3b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_x22UHvYG4Vr3oumdzY_Ag.jpeg</url>
            <title>Stories by Mostafa Muhammed on Medium</title>
            <link>https://medium.com/@0xmostafa?source=rss-dbd484fe6b3b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 16:06:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@0xmostafa/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[Mass Assignment: How a Simple Maintenance Role Gained Admin Control Over Cloud Backups [P2]]]></title>
            <link>https://0xmostafa.medium.com/mass-assignment-how-a-simple-maintenance-role-gained-admin-control-over-cloud-backups-p2-693a5f678b05?source=rss-dbd484fe6b3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/693a5f678b05</guid>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Mostafa Muhammed]]></dc:creator>
            <pubDate>Thu, 05 Feb 2026 19:02:12 GMT</pubDate>
            <atom:updated>2026-02-11T13:10:38.682Z</atom:updated>
            <content:encoded><![CDATA[<h3>قَالُوا سُبْحَانَكَ لَا عِلْمَ لَنَا إِلَّا مَا عَلَّمْتَنَا ۖ إِنَّكَ أَنتَ الْعَلِيمُ الْحَكِيمُ<br>[ <a href="https://surahquran.com/2.html">البقرة</a>: 32]</h3><p><strong>During a Bug Hunting</strong> of a SaaS cloud platform I found a critical <strong>Mass Assignment</strong> vulnerability. A “Maintenance” user — restricted to scheduling updates — could bypass UI limits to gain full control over service configs. By manipulating the PUT request, I could disable backups, delete snapshots, and modify IP whitelists.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*XqwHxS7VzGQp8Lo-Gpck9Q.jpeg" /><figcaption>اللهم صلي وسلم وزد وبارك على سيد ولد آدم أجمعين</figcaption></figure><h3>Background: The Target Profile</h3><p>The target is a modern <strong>SaaS Cloud Management Platform</strong> providing managed database instances Their RBAC model is structured into:</p><ul><li><strong>Admin:</strong> Full administrative control.</li><li><strong>Maintenance:</strong> Restricted role for managing <em>Service Windows</em> (patches/upgrades).</li></ul><p>On the Dashboard (UI), the Maintenance user is strictly forbidden from seeing or touching backups, forks, or networking.</p><h3>The Technical Deep Dive: Step-by-Step</h3><h4>1. The Normal Action</h4><p>I started by doing exactly what a maintenance user is supposed to do: updating the maintenance schedule. I captured the request in Burp Suite.</p><p><strong>Request:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hf3M7re5pITTilYftB4JCg.png" /></figure><p>The response was quite strange… the server returned the <strong>entire service object!</strong> It contained sensitive details about backups, IP filters, and even credentials.</p><blockquote><strong>I asked myself:</strong> “Why is this API so ‘chatty’? Since it’s disclosing all these internal configurations in the response, would it be vulnerable enough to accept them if I sent them back in my request?”</blockquote><h3>2. Testing the Logic:</h3><p>While the UI had everything locked down, the API was telling a completely different story. As I began analyzing the JSON response, I noticed several highly sensitive fields that should have been restricted, such as service_name_persistence, ip_filter, fork, migrations, and snapshots.</p><blockquote>I thought to myself: “What happens if I try to change the persistence method to ‘off’ and manipulate these other sensitive fields? In theory, I could literally purge all data, stop all backups, and reconfigure the most critical parts of the infrastructure. Would the server actually have the balls to say ‘no’ to me?”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*-XLRH_R9hEYj8fZ3vyNdZQ.jpeg" /><figcaption>Hmmm🤔</figcaption></figure><h4>3. The Exploit:</h4><p>I modified the request by including the sensitive fields the <em>chatty </em>API had leaked to me during the first step. <strong>My TARGETS</strong> Were clear: stop all backups, and reconfigure the most critical parts of the infrastructure.<br> <br><strong>The Crafted Request:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*dzPrC4iAfsfmqPKKh6Dtwg.png" /></figure><h4>4. Victory My Lord!</h4><p><strong>Alhamdulillah</strong>, The server responded with a confident 200 OK and a simple message: {“message”: “updated”}.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kx_9rBt9L6cVG77aMVFabw.png" /></figure><blockquote><strong>The Moment of Truth:</strong> Masha Allah! … did the server actually just accept those changes?</blockquote><blockquote>- I immediately sent a GET request to verify the service status, and the results were a security nightmare:</blockquote><blockquote><strong>- Firewall Breached:</strong> The ip_filter was set to 0.0.0.0/0 — the database was now wide open to the entire world.<br><br>- <strong>Data Purged:</strong> Automated backups were gone because persistence was now off.</blockquote><blockquote>- <strong>Total Control:</strong> All existing snapshots were deleted, `tech_emails` were updated to my attacker-controlled address, and I had successfully triggered a full data fork.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*dUjQGgUekh9fxlOznRGzIw.jpeg" /></figure><h4>Impact</h4><ul><li><strong>Critical Data Loss:</strong> Disabling persistence ensures total data loss upon the next service restart.</li><li><strong>Full Takeover:</strong> Combining the leaked credentials with the wide-open firewall allows anyone to hijack the database.</li><li><strong>Integrity Breach:</strong> Modifying project_to_fork_from allows attackers to manipulate data migration sources.</li></ul><h4>Lessons Learned</h4><p>This vulnerability wasn’t just a bug; it was a reminder of several fundamental security principles:</p><ul><li><strong>Deep Response Analysis:</strong> Never ignore the data returned by the server. A “Chatty” or verbose API response is often the first thread you pull to uncover critical vulnerabilities like Mass Assignment.</li><li><strong>Response-to-Request Manipulation:</strong> Any field that appears in a Response is a potential target for the next Request.</li><li><strong>Leverage Existing Privileges:</strong> Privilege escalation doesn’t always start from a “locked door.” Sometimes, it begins at the “open door” you already have access to — the key is testing how much control you can exert beyond your intended scope.</li><li><strong>The UI is a Canvas, the API is the Truth:</strong> Never trust client-side restrictions. UI limitations are just “decorations”; the real security testing begins when you interact directly with the API endpoints.</li><li><strong>Hunting for “Developer Blind Spots”:</strong> Always look for areas where the developer assumed trust. In this case, the trust was placed in the role-based access at the endpoint level, while completely forgetting to secure the object attributes themselves.<br> — -</li></ul><p><strong>Shoutout to Gemini </strong>for helping me craft this write-up</p><p><strong>X (Twitter):</strong> <a href="http://twitter.com/0xsir_RedGuy">@0xsir_RedGuy</a></p><p><strong>Alhamdulillah</strong>, Thanks for reading! I hope you found this write-up helpful and insightful. See you in the next one! 🚀</p><h4>و السَّلامُ عَلَيْكُم ورَحْمَةُ اللهِ وَبَرَكاتُه والصلاة والسلام على سيد ولد آدم</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=693a5f678b05" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BAC (Privilege Escalation): How a Simple Method Swap Exposed Sensitive Admin Data]]></title>
            <link>https://0xmostafa.medium.com/bac-privilege-escalation-how-a-simple-method-swap-exposed-sensitive-admin-data-30b241057088?source=rss-dbd484fe6b3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/30b241057088</guid>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Mostafa Muhammed]]></dc:creator>
            <pubDate>Thu, 01 Jan 2026 02:29:57 GMT</pubDate>
            <atom:updated>2026-02-16T01:15:51.429Z</atom:updated>
            <content:encoded><![CDATA[<h3>قَالُوا سُبْحَانَكَ لَا عِلْمَ لَنَا إِلَّا مَا عَلَّمْتَنَا ۖ إِنَّكَ أَنتَ الْعَلِيمُ الْحَكِيمُ<br>[ <a href="https://surahquran.com/2.html">البقرة</a>: 32]</h3><p>Access control is the backbone of any SaaS platform. When it fails, even the most robust-looking systems can leak private data. During my recent security research on a cloud platform (let’s call it<strong> free.gaza</strong>), I discovered a classic yet critical <strong>Broken Access Control</strong> vulnerability.</p><p>Here is how I went from a restricted user to viewing sensitive Super Admin PII by simply questioning how the API handles HTTP methods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*oIgNL_clzvdQhIPXQMhkXg.png" /><figcaption>GET Coming With Admin’s Info</figcaption></figure><h4><strong>The Setup: Two Levels of Defense</strong></h4><p>Before diving into the exploit, it’s important to understand the target’s defense mechanism. The platform uses a two-tier privilege system:</p><p>1.<strong> Project Level:</strong> Controls what you can do within a specific project (Admin, Developer, or Read-Only).<br> <br>2. <strong>Service Level:</strong> Controls access to the core infrastructure and administrative management pages.</p><p>I used <strong>pwnFOX </strong>to manage my sessions, allowing me to swap between a high-privileged and low-privileged state seamlessly without clearing cookies.</p><h4>Step 1:</h4><p>I started my journey as a <strong>Super Admin</strong>. While navigating the user management dashboard, I captured a specific API request used to update user profiles:</p><p>/v1/organization/{org_id}/user/{user_id}?include_application_users=false</p><p>At this stage, everything worked as intended. I could see the data, and I could modify it. I saved this request in my Burp Suite Repeater for later.</p><h4><strong>Step 2: The Downgrade</strong></h4><p>To test the authorization logic, I downgraded my account. I was stripped of my Super Admin status and assigned a restricted <strong>Logs Read-Only </strong>role.</p><p><strong>The Result:</strong></p><ul><li><strong>UI Level</strong>: The “Admin Users” page disappeared from my sidebar. Attempting to visit the URL directly resulted in a 403 Forbidden or a redirect.</li><li><strong>Service Level: </strong>I no longer had any permission to view who the admins were or what their emails were.</li></ul><p>The gates were closed. Or so it seemed.</p><h4><strong>Step 3: The “Aha!” Moment</strong></h4><p>I went back to my captured PATCHrequest. I tried to send it again as the restricted user.</p><p>Response:403 Forbidden</p><p>The server correctly identified that I didn’t have the right to _modify_ the admin user. But then, I asked myself a simple question:</p><blockquote>”The UI is hiding the information, and the PATCH method is blocked… but is the API actually checking my identity for READ operations on this specific endpoint?”</blockquote><p>I decided to try a “Method Swap.” I changed the HTTP verb from PATCH to GET:</p><h4>Step 4: Expanding the Scope</h4><p>While analyzing the successful GET request, I noticed a query parameter: include_application_users=false. I wondered: <em>&quot;What if I ask the system to show me everything?&quot;</em></p><p>I manually modified the request to:</p><p>HTTP</p><p>GET /v1/organization/{org_id}/user/{user_id}?include_application_users=true</p><h4><strong>The Attack Vector</strong></h4><p><strong>Original (Blocked):</strong></p><p>HTTP</p><pre>PATCH /v1/organization/{org_id}/user/{user_id}?include_application_users=false<br>Content-Type: application/json<br>{ <br> “job_title”: “Hacker” <br>}```</pre><p><strong>Modified (The Bypass):</strong></p><p>HTTP</p><pre>GET /v1/organization/{org_id}/user/{user_id}?include_application_users=true</pre><h4><strong>The Payload: Data Leakage Confirmed</strong></h4><p>The moment I hit Send on the GET request, the server didn’t throw a 403. Instead, it gave me a <strong>200 OK</strong> and a beautiful JSON response filled with sensitive data I should never have seen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*t1SHg6mKFHnOPbXu0PCseQ.jpeg" /><figcaption>AHH !</figcaption></figure><p><em>The system didn’t just return the admin’s data; it now included details for </em><strong><em>Internal Application Users</em></strong><em> and service accounts. I could now see administrative data and internal system users that are normally strictly hidden from restricted accounts.</em></p><h4>The Vulnerable Response (Redacted)</h4><p>JSON</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*-UX8-8NFEOv_DlkuXcoSTg.png" /><figcaption>The Vulnerable Response</figcaption></figure><p>By simply changing the method, I bypassed the <strong>Service Level</strong> restrictions. I could now enumerate every admin in the organization, see their real names, their private emails, and even track their last activity timestamps.</p><p>— -</p><h4>Impact</h4><ul><li>This vulnerability demonstrates a common pitfall: <strong>relying on UI-based restrictions.</strong></li><li><strong>PII Exposure:</strong> Real names and emails are gold for targeted phishing (Social Engineering).</li><li><strong>Privilege Escalation Awareness:</strong> Knowing exactly who the Super Admins are allows an attacker to map out high-value targets within a company.</li><li><strong>The Lesson:</strong> Authorization must be checked for _every_ HTTP method (GET, POST, PATCH, DELETE) at the API layer, regardless of what the UI shows.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*l3gjvhrzel5kDHHKIkN9nA.png" /></figure><p><strong>Shoutout to Gemini</strong> for helping me craft this write-up</p><ul><li><strong>X (Twitter):</strong> @0xsir_RedGuy</li></ul><p>Thanks for reading! I hope you found this write-up helpful and insightful. See you in the next one! 🚀</p><h4>و السَّلامُ عَلَيْكُم ورَحْمَةُ اللهِ وَبَرَكاتُه</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30b241057088" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Race condition — Limits? What limits? — Webhook quota cracked (10 → 81)]]></title>
            <link>https://0xmostafa.medium.com/race-condition-limits-what-limits-webhook-quota-cracked-10-81-3336afdd8ab4?source=rss-dbd484fe6b3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3336afdd8ab4</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[business-logic-bug]]></category>
            <dc:creator><![CDATA[Mostafa Muhammed]]></dc:creator>
            <pubDate>Thu, 30 Oct 2025 06:05:02 GMT</pubDate>
            <atom:updated>2025-10-30T06:11:19.356Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Race condition — </strong>Limits? What limits? — Webhook quota cracked (10 → 81)</h3><h3>قَالُوا سُبْحَانَكَ لَا عِلْمَ لَنَا إِلَّا مَا عَلَّمْتَنَا ۖ إِنَّكَ أَنتَ الْعَلِيمُ الْحَكِيمُ<br>[ <a href="https://surahquran.com/2.html">البقرة</a>: 32]</h3><p><em>While testing the Create Webhook flow, I found a race condition: the server accepts parallel POST </em><em>/api/workspaces/&lt;workspaceId&gt;/webhooks/ requests and returns 201 Created, allowing a regular user to create far more than the advertised per-user limit of 10 (I reached 81).</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*grWFbzMcltn0uYqVASGZ2Q.png" /><figcaption>Reaction</figcaption></figure><p><strong>Environment &amp; Tools</strong></p><ul><li>Target endpoint (observed): <br> <strong>POST </strong>/api/workspaces/&lt;workspaceId&gt;/webhooks/ (HTTP/2)</li><li>Observed response for successful creation: HTTP/2 201 Created</li><li>Accounts used: two test accounts created for the experiment (all test accounts are under my control)</li><li>attacker_user (Red — regular user — used to send batch requests)</li><li>victim_user (used only for verification of created webhooks in UI)</li></ul><p><strong>Tools</strong>:</p><ul><li>Firefox + Pwnfox: used to isolate multiple browser contexts (two tabs) for test accounts.</li><li><strong>FoxProxy / Burp Suite</strong>: proxy to intercept and capture the create-webhook request.</li><li><strong>Burp Suite Pro</strong>: used to replay requests in parallel (script shown below).</li></ul><h4>Exact Request (captured)</h4><p>&gt; Endpoint:POST /api/workspaces/&lt;workspaceId&gt;/webhooks/ <br>&gt; Method: POST <br>&gt; Protocol: HTTP/2</p><h4>Captured request body</h4><p>POST /api/workspaces/&lt;workspaceId&gt;/webhooks/ HTTP/2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*tXfDBWHd999nk-GW-eHopg.png" /><figcaption>Request Create (POST)</figcaption></figure><h4>Response</h4><p>For most replayed requests, the API returned:<br>HTTP/2 201 Created<br>Content-Type: application/json</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*r8GcPU5_0ar1bfpgYZaD9Q.png" /></figure><p>— -</p><h4>How I tested (scenario)</h4><ol><li>Prepared two test accounts in the same workspace using Firefox + Pwnfox (separate tab contexts). Both accounts are under my control.</li></ol><p>2. From the attacker account, used the UI to create webhooks until the UI displayed the “limit reached” message at 10 webhooks. (UI shows the user has reached the per-user quota.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*szpfFGUjQnneD6v0sfQh9w.png" /><figcaption>Limit Is Reached After Create 10 Webhooks</figcaption></figure><p>3. Intercepted the create webhook request using FoxProxy/Burp and exported the single POST request payload and headers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*GyTod2jvxqYBeVJsSdT9cQ.png" /></figure><p>4. Observed the server returning 201 Created for most <strong>parallel group</strong> <strong>requests</strong>. I counted <strong>+100 </strong>webhook objects created in the target workspace for the same user &amp; different name webhook before the server began rejecting further requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6iYQrfCsndyCYK0RRe7L6g.png" /><figcaption>I Created 81 Webhooks</figcaption></figure><p>5. Confirmed the webhooks were active/registered (able to view list in UI for my test workspace). No verification handshake was required to create + activate the webhook.</p><h4>Key observations</h4><ul><li>The UI blocks further creation and displays a message after <strong>10 webhooks</strong></li><li>The back-end accepted additional requests when the same POST payload was replayed in parallel —<strong> server returned</strong> 201 Created for the majority of these.</li><li>is handled server-side but not atomically, allowing concurrent requests to exceed the intended limit (classic race condition).</li><li>There is no pre-activation verification handshake for webhook targets ( webhooks become active immediately on creation).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*dcerRc374GOEjYLsx0hQ-Q.png" /><figcaption>السلام عليكم ورحمة الله وبركاته</figcaption></figure><p>Thanks for reading, and I hope you found this write-up helpful.</p><p><strong>X (Twitter):</strong> 0xsir_RedGuy</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3336afdd8ab4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>