<?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 Gr3yG05T on Medium]]></title>
        <description><![CDATA[Stories by Gr3yG05T on Medium]]></description>
        <link>https://medium.com/@gr3yg05t?source=rss-42e42c731162------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Wmq_Knpl7rhxYZqheFuINQ.jpeg</url>
            <title>Stories by Gr3yG05T on Medium</title>
            <link>https://medium.com/@gr3yg05t?source=rss-42e42c731162------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 02:52:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gr3yg05t/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[Business Logic Flaws: A Bug Hunter’s Handbook]]></title>
            <link>https://infosecwriteups.com/business-logic-flaws-a-bug-hunters-handbook-293f6a89a7f4?source=rss-42e42c731162------2</link>
            <guid isPermaLink="false">https://medium.com/p/293f6a89a7f4</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[business-logic]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Gr3yG05T]]></dc:creator>
            <pubDate>Sat, 07 Jun 2025 11:25:02 GMT</pubDate>
            <atom:updated>2025-06-11T07:19:27.932Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Z7HGSv-cbXDwXYDQ0e3JA.png" /></figure><p>Business logic flaws, also known as application logic flaws, occur when an application’s legitimate functionality is misused in ways the developers never intended. Unlike typical code bugs like XSS or SQLi, these are <strong>design-level weaknesses</strong>, not implementation errors. As one recent overview puts it, these are flaws where the application works <em>technically</em> as intended, but not as per the <em>business rules.</em></p><p>In other words, the code might not be insecure in the usual sense, but the design allows users to do things the business never intended. Unlike code-related bugs, logic flaws rely on a creative understanding of the app’s workflows and assumptions. For example, imagine a checkout form that allows users to modify price or quantity fields directly on the client side. If the backend doesn’t revalidate those values, an attacker could quietly alter the final cost, bypassing discounts, limits, or billing checks.</p><p>One famous case involved Stripe, where a researcher exploited a race condition to <strong>redeem a $20,000 discount 30 times in parallel</strong>, gifting himself over <strong>$600,000 in credits </strong>[<a href="https://hackerone.com/reports/1849626">1</a>]. The bug wasn’t in the code’s syntax, but in the <strong>absence of logical locking</strong>. Stripe paid a $5,000 bounty and quickly patched the issue. It stems from wrong assumptions about user behavior or missing checks in workflows. Left unpatched, such flaws can cost companies money, reputation, and regulatory fines. Because logic flaws depend on the <em>intended flow</em> of an app, they require human insight to find. As such, they often evade automated scanners and are prized by bounty programs.</p><p>According to HackerOne,<em> 10% of all vulnerabilities reported to the cryptocurrency and blockchain industry are logical bugs, and 45% of their total bounty payout dollars go to logic bugs</em> [<a href="https://www.hackerone.com/blog/how-business-logic-vulnerability-led-unlimited-discount-redemption">2</a>]. That’s nearly half the budget going toward a class of bugs that most tools can’t detect. In 2025, with surface-level bugs largely patched, more hunters are focusing on logic flaws to make an impact.</p><h3>Common Types of Logic Flaws</h3><p>Real-world logic bugs fall into several broad categories. Here are some frequent patterns seen in bug bounties:</p><ul><li><strong>Client-Side Trust / Tampering:</strong> The app trusts data such as price, role, or other parameters from the browser without re-validating on the server. An attacker simply uses a proxy to modify form values and bypasses rules. These issues “give clients too much control” and let hackers skip checks. Example: In one finding, a hunter was able to get admin access by inserting admin into the userDetails field. [<a href="https://medium.com/@gr3yg05t/business-logic-flaws-a-bug-hunters-handbook-293f6a89a7f4">3</a>]</li><li><strong>Insufficient Data Validation:</strong> Unexpected inputs break workflows. For example, allowing <em>negative </em>or extremely <em>large </em>numbers<strong> </strong>can reverse logic. If a transfer form accepts a negative amount, the app may send money to you instead of from you. Negative quantity or huge discount values can similarly cheat calculations. These cases often slip through since client-side checks can be bypassed.</li><li><strong>Workflow Bypass (Assumption Failures):</strong> The app assumes users <em>follow steps in order</em>. If you skip step 2 or repeat steps out of sequence, unexpected states occur. Attackers skip steps, remove parameters, or trigger functions in odd sequences to confuse the system. Failure to enforce the intended sequence can let users gain privileges or access data they shouldn’t.</li><li><strong>Access Control / ID Issues:</strong> Logic flaws often show up as <strong>authentication/authorization bypasses</strong>. For instance, an IDOR (Insecure Direct Object Reference) where attackers supply a different user’s ID and the server serves another user’s data. Strictly speaking this is a flawed access-control logic, not just a missing check.</li><li><strong>Race Conditions:</strong> Timing issues can subvert logic. The Stripe discount example above was a race condition: rapid, parallel requests let one redemption slip through additional fixes. Any feature that should only happen “once” (single-use coupon, one-time transaction) is a candidate for race-based abuse.</li><li><strong>Domain-Specific Flaws:</strong> These depend on business rules unique to the app. E.g., loyalty points or discounts might not re-validate when cart contents change, letting people abuse promotions. A classic case: apply discount, then remove items, original discount threshold no longer met, but system never checks again. Every industry has its own quirks, so logic bugs are often bespoke but follow similar themes.</li><li><strong>Other Patterns:</strong> ID enumeration, payment logic flaws , and broken rate-limit logic are also logic issues. In short, if it’s about how the app’s processes are supposed to work, there’s potential for logic error.</li></ul><h3>The Hunting Process</h3><p><strong>1. Understand the workflow.</strong> Before testing, use the application like a normal user and map out every step of the user and admin flows. Create a simple diagram or bullet list of the normal flow like how I do it:</p><pre>User adds item to cart → selects shipping → pays via Stripe → order confirmed</pre><p>Take notes in a way that you understand the application logic later you visit the note again.</p><p>Identify all business rules like:</p><ul><li>Limits: The Application assigns one free coupon per user</li><li>subscriptions: Free delivery is only available to premium users</li><li>Promotions: After ordering 10 products, a user gets the top user role, etc</li></ul><p>This stage might involve reading documentation, clicking through the UI, or inspecting a sitemap. Once you understand the application completely, you can start playing with the application and answer your <em>What If</em>?’s</p><p><strong>2. Explore the API and UI in tandem.</strong> Many logic checks happen behind the scenes. Use Burp Suite or a similar proxy to intercept requests as you click through the UI. Note every API endpoint and parameter. Look for endpoints accessible in the frontend vs those hidden or disabled. It often helps to browse the app’s public API documentation or decompile its mobile app for hidden calls. Then test hitting those endpoints manually. For example, if a “Team plan” feature is hidden in the UI for free users, try accessing it directly via a guessed URL or API path.</p><p><strong>3. Tamper and test edge cases.</strong> With Burp Repeater or Postman, start modifying parameters and workflows. Key tactics include:</p><ul><li><strong>Parameter tampering:</strong> Change IDs, flags, prices, etc. For instance, modify a product’s price from $100 to $50 or even -100 to test negative pricing. Alter boolean fields in JSON, such as changing &quot;isAdmin&quot;:false to true. Remove or reorder parameters in a multi-step form.</li><li><strong>Authentication and roles:</strong> Try accessing admin or team features with a normal user by modifying cookies, tokens, or JWT payloads. Look for parameters like role=, user_id=, or session cookies that may grant extra privileges when changed.</li><li><strong>Subscription and premium gating:</strong> Test premium features. For example, after a free user cancels a paid upgrade, check if they still have access (sometimes refunds aren’t fully enforced). Force-browse premium URLs or API endpoints.</li><li><strong>Concurrency:</strong> Use <strong>Turbo Intruder </strong>or your own script to send many requests at once. Race-test operations like coupon redemption, account creation, or refunds. See if parallel requests slip through checks. <em>Example:</em> Stripe’s “accept coupon” call was hit 30 times in parallel, redeeming a $20k discount 30 times.</li><li><strong>Sequential workflows:</strong> Try skipping steps or repeating steps out of order. For example, see if you can jump straight to the post-login page without logging in, or hit a <em>confirm order</em> endpoint twice. Observe how the server responds when expected tokens or states are missing.</li></ul><p>Always monitor the <strong>raw requests and responses</strong>. If the app returns an unusual success or status code, that might indicate a logic hole. Tools like Burp’s <strong>Autorize</strong> extension can automate checking access controls, but logic flaws often need more context-specific scripts. For concurrency, use Turbo Intruder for high-speed requests. For pattern fuzzing, write a small Python script or use Burp Intruder to brute-force critical fields like trying price=0.0 vs price=0, or iterating boolean flags.</p><h3>Case Studies: High-Profile Logic Flaws</h3><h4>Stripe: Unlimited Discount Race-Condition</h4><ul><li><strong>Summary:</strong> A researcher at HackerOne found that Stripe’s fee-discount coupons could be redeemed multiple times due to a race condition. In this case, Stripe offered a $20,000 transaction fee credit to the tester. The tester clicked “Accept” on the Stripe dashboard once (to get the coupon), then <strong>intercepted the underlying API call</strong> and re-sent it dozens of times in parallel using Turbo Intruder. Each call applied the $20k discount anew.</li><li><strong>Impact:</strong> Each time the coupon was reused, Stripe effectively lost 3% in transaction fees. By abusing the $20k coupon 30 times, the tester gave himself $600,000 in fee-free transactions. At scale, this could have cost Stripe ~$600 per redemption. The bug earned a $5,000 bounty.</li><li><strong>Lesson:</strong> This shows how concurrency can violate a business rule (a coupon should only be used once). The fix required enforcing a lock or server-side flag so that the discount cannot be reapplied after the first use. <strong>Testing tip:</strong> Always try making critical state-changing requests in parallel to check for race conditions. [<a href="https://hackerone.com/reports/1849626">1</a>]</li></ul><h4>GitHub: Unicode Password Reset Flaw</h4><ul><li><strong>Summary:</strong> In late 2019, a security researcher discovered that GitHub’s password-reset logic mishandled certain Unicode characters. Specifically, if a user’s email contained the Turkish dotless ‘ı’ (e.g. jıll@example.com), GitHub’s server code would lowercase (toLowerCase) that character and map it to a plain ‘i’ (so jıll became jill). An attacker could register an account or initiate a reset using jıll@example.com. The system would find the valid account jill@example.com after case-folding, but still send the reset email to the <strong>attacker’s</strong> address (jıll@example.com). The attacker thus received a reset link meant for another user.</li><li><strong>Impact:</strong> If the victim did not have two-factor auth enabled, the attacker could set a new password and take over the account. This <em>business logic</em> flaw was fixed by GitHub after disclosure.</li><li><strong>Lesson:</strong> Input normalization (like case-folding) can create equivalence collisions. Bug hunters should test with Unicode characters in authentication or identity fields. For example, try special or accented characters in emails and user names to see if they merge or collide after server-side processing. (<em>Visualization:</em> a <strong>diagram of the reset flow</strong> could highlight how the email parameter is transformed and misdirects the reset.) [<a href="https://chetan-conikee.medium.com/case-study-exploiting-a-business-logic-flaw-with-githubs-forgot-password-workflow-discovered-d4d36ee3dd16">4</a>]</li></ul><h4>Subscription Bypass: Direct API Abuse</h4><ul><li><strong>Summary:</strong> Several bounty reports have shown that web apps sometimes hide premium features on the UI but don’t enforce them on the back end. In one case on a platform (pseudonym “ExamenTry”), free-tier users could bypass Team-tier restrictions by calling internal APIs directly. One researcher manipulated the organization settings endpoint (/api/0/organizations/&lt;org&gt;), setting a JSON flag &quot;codecovAccess&quot;: true. This granted him access to the Team-only “code coverage insights” feature without paying [<a href="https://medium.com/h7w/how-i-earned-469-bounty-bypassing-plan-restriction-58f6d3120b6e#:~:text=Normally%2C%20access%20to%20data%20forwarding,features%20intended%20for%20paying%20subscribers">5</a>]. In another case on the same platform, the researcher used a crafted URL or API call (the Splunk plugin endpoint) to enable a paid “data forwarding” plugin for free accounts. [<a href="https://medium.com/@a13h1/bypass-plan-restriction-get-350-bounty-2df24f406462">6</a>]</li><li><strong>Impact:</strong> In each case, the attacker unlocked a feature reserved for paying customers. The bounties were moderate ($350–$469), but the takeaway is huge: <em>any</em> feature gated by plan can be targeted via API.</li><li><strong>Lesson:</strong> <strong>Don’t trust the UI alone.</strong> Test by capturing normal upgrade or settings-change requests and then sending them manually. Try toggling values or enabling options that the UI normally disables. Check cookies or JSON fields for access flags, and try to modify them. Here, simply setting a flag in a JSON payload bypassed the Team plan requirement. Always enforce plan restrictions on the server, not just in the client.</li></ul><h4>Insurance Portal: Race-Conditioned Duplicate Accounts</h4><ul><li><strong>Summary:</strong> On a business-to-business insurance platform, Abhi Sharma found that the member-creation API had a race condition. The app was supposed to prevent creating two employee profiles with the same email and ID. However, that check only ran in the web layer. By capturing the GraphQL “create profile” request and sending it many times in parallel (using Turbo Intruder), the attacker was able to slip several requests through before the first one completed.</li><li><strong>Impact:</strong> Multiple profiles were created for the same employee, leading to billing and coverage confusion. The bug earned a $500 bounty<a href="https://medium.com/@a13h1/bypassing-business-logic-via-race-condition-a-500-bounty-bug-273396b17ec4#:~:text=Bounty%20%26%20Program%20Response">medium.com</a>. More importantly, it exposed how critical business constraints (email uniqueness) must be enforced at the database level.</li><li><strong>Lesson:</strong> Race conditions can break logic rules. When an action (like signup or coupon redemption) should be one-per-user, test it with concurrent requests. The researcher’s steps were: log in with an attacker account, capture the profile-creation request in Burp, change the payload to reuse a protected email, then push it to Turbo Intruder. Using <strong>Turbo Intruder</strong> (or any fast HTTP tool) for such tests is crucial. Also, always consider how to <em>lock</em> or check in the database to avoid multiple simultaneous insertions causing logic failures. [<a href="https://medium.com/@a13h1/bypassing-business-logic-via-race-condition-a-500-bounty-bug-273396b17ec4">7</a>]</li></ul><h3>Test Ideas &amp; Checklist for Business Logic</h3><p>Approach logic testing like a detective. Be systematic and ask “What if I do X instead of the normal flow?” Here’s a checklist of common ideas and techniques (many inspired by real bounty write-ups) to try on any target:</p><p><strong>Parameter and Input Anomalies:</strong></p><ul><li>Tamper with numeric fields. Change prices, quantities, or points to negative (-100) or fractional values (0.5 * price)</li><li>Try zero, empty, null values, or extremely large numbers. Observe currency or type conversions.</li><li>Test Boolean and flag fields. If a JSON or cookie has &quot;premium&quot;:false, flip it to true and retry the request</li><li>Mass-assign or HTTP parameter-pollute: send multiple values for the same field (e.g. coupon[]=A&amp;coupon[]=B) and see how the server handles it</li></ul><p><strong>Access Control and Role Abuse:</strong></p><ul><li>Change IDs in URLs or payloads. If you see user_id=1001, try 1002, 1003, etc. Can you view or modify another user’s data?</li><li>If you have a “normal user” session, try accessing an admin URL (e.g. /admin/settings) or injecting an admin token. If there’s a numeric or name-based role, try escalating it.</li><li>Test multiple authentication factors or steps. For example, if a password reset or 2FA flow exists, try skipping or repeating steps out of sequence</li></ul><p><strong>Workflow and State:</strong></p><ul><li><strong>Skip steps: </strong>Attempt to jump ahead or call APIs before earlier steps are complete. For instance, submit a purchase order request without setting shipping.</li><li><strong>Retry steps: </strong>Perform a multi-stage operation twice. Submit the final “confirmation” twice or go back and forth between steps with Repeater.</li><li><strong>Omit parameters:</strong> Remove a required form field or header. Sometimes removing a parameter entirely can reveal an alternate code path</li></ul><p><strong>Business-Specific Scenarios:</strong></p><ul><li><strong>Coupons/Discounts:</strong> Apply the same promo code multiple times to see if it can be reused. Use concurrent requests on the redeem action (coupon race). Try adding multiple codes via parameter pollution, even if the UI allows only one.</li><li><strong>Refunds and Refund Abuse:</strong> Buy a paid feature, cancel it, and check if you still have access. Trigger multiple refund/cancel requests (race them) to see if you get extra money back. Try cross-currency purchases/refunds (USD vs. EUR) to exploit exchange rate arbitrage</li><li><strong>Shopping Cart:</strong> Add negative-quantity items or exceed stock quantity. Combine items so total price calculations break (e.g. one item with price +5, another -5).</li><li><strong>Permissions/ACLS:</strong> Look at cookies or tokens for permission bits. Many apps encode roles or feature access in a cookie or JSON (session ID, JWT claims). Toggling those might reveal hidden sections. Use <strong>Burp Intruder</strong> to brute-force such flags (change bits from 0 to 1, Y to N, etc.).</li><li><strong>Comment/Forum functions:</strong> If there’s a “one comment per user” rule, try posting fast concurrent comments to see if you can post multiples. See if privileged actions (like a verified-user badge) can be faked by altering your request.</li></ul><p><strong>Race Conditions:</strong></p><ul><li>Key operations like account creation, transfer of points, or checkout should be tested concurrently. Use Burp’s <strong>Turbo Intruder</strong>: capture a legitimate request, then flood the target with 10s or 100s of parallel copies. Observe if the server ever drops or incorrectly processes duplicates. For each test, try increasing the thread count until the backend shows inconsistent behavior.</li><li>Pay special attention to operations that should be <em>one-time-only</em> (creating a profile, granting a reward, redeeming a coupon).</li></ul><p><strong>Tools to Have On Hand:</strong></p><ul><li><strong>Burp Suite (Free &amp; Pro):</strong> proxy/intercept, Repeater for manual tweaks, Intruder for parameter fuzzing. Use the <strong>Match &amp; Replace</strong> feature to automatically flip values (e.g. toggle true/false in every request).</li><li><strong>Turbo Intruder:</strong> A burp extension, essential for high-speed or concurrent requests that Burp’s Intruder can’t handle.</li><li><strong>Breach-type plugins:</strong> (e.g. Autorize, Auth Matrix) to automate access control checks.</li><li><strong>Scripting:</strong> a quick Python or Go script to manipulate requests in bulk can help, especially for logic checks.</li><li><strong>Session/Cookie tampering tools:</strong> e.g. CookieDoughnut or manual hex editing to spot weakly-signed cookies.</li><li><strong>Workflow visualization:</strong> drawing tools (like diagrams.net) to sketch user flows and find where logic might break. <em>(Suggested Visual: a workflow diagram with branches for “what if user cancels now” or “if two requests race” to plan tests.)</em></li></ul><p>This <strong>checklist</strong> is by no means exhaustive, but covers many common patterns. Always think of the <strong>intended business rule</strong> behind a feature, and then try to violate it with creative input or timing. Use automated tools to explore, but <strong>manual reasoning</strong> is crucial. When you find a weird server response, pause and map it to the business flow: that’s your hint you might be onto a logic flaw.</p><h3>Further Resources</h3><p><a href="https://portswigger.net/web-security/logic-flaws"><strong>PortSwigger Web Security Academy</strong></a>: Business Logic Vulnerabilities. Interactive labs (e.g. “Excessive trust in client-side controls”, “High-level logic flaw”) that walk through real examples. Great for hands-on practice.</p><p><a href="https://pentester.land/writeups/"><strong>Pentester Land</strong></a>: Pentester Land stores various bug bounty write-ups, including tons of business logic write-ups, which are crucial for understanding the bug.</p><p><a href="https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/10-Business_Logic_Testing/README"><strong>OWASP WSTG</strong></a>: Business Logic Testing (v4.2), The official Web Security Testing Guide section provides methodology and test cases for logic flaws</p><p><a href="https://www.hackerone.com/blog"><strong>HackerOne Blog</strong></a><strong> &amp; </strong><a href="https://hackerone.com/hacktivity/overview"><strong>Hacktivity</strong></a>: The “Unlimited Discount” post is a must-read case study. Also browse Hacktivity for logic flaw disclosures.</p><p><a href="https://academy.hackthebox.com/course/preview/parameter-logic-bugs"><strong>Hack The Box Academy</strong></a>: Parameter Logic Bugs, A practical module with code review and labs covering validation logic, unexpected input, and null-safety bugs.</p><p><a href="https://www.legitsecurity.com/aspm-knowledge-base/business-logic-vulnerabilities"><strong>Legit Security Blog</strong></a><strong>:</strong> “Business Logic Vulnerabilities: Examples and Prevention” is a detailed guide with definitions, examples, and best practices.</p><p><a href="https://www.brightsec.com/blog/business-logic-vulnerabilities-busting-the-automation-myth/"><strong>Bright Security Blog</strong></a>: “Business Logic Vulnerabilities: Busting the Automation Myth”, explains why logic bugs are hard and lists common patterns to target.</p><p><strong>OWASP Foundation Articles</strong>: OWASP frequently discusses logic flaw scenarios on their blog and in their top-10 (e.g. BOLA).</p><h3>Conclusion and Next Steps</h3><p>Business logic flaws are among the most challenging and rewarding bugs you can hunt. They force you to think like the designers, question every assumption, and get clever with tools. The reward potential is high precisely because these bugs often have a serious impact and usually <em>only skilled hackers </em>find them.</p><p>If you want to master logic hacking, start by studying published case studies, write-ups, and practicing on purpose-built labs. See the PortSwigger Academy labs on logic flaws (client-side trust, unusual input, etc.). Read Hacktivity write-ups and bounty blogs, for example, the Stripe coupon example and GitHub password-reset flaw are detailed on HackerOne and personal blogs. Follow infosec communities (Medium posts, Bugcrowd University, r/bugbounty) where researchers share business logic hunting tips.</p><p>In summary, think of logic vulnerabilities as puzzles where the business rules are clues. Keep your mindset broad and skeptical: <em>what if the user’s input is something the dev never expected?</em> The next time you poke at a signup form or payment button, remember: the real exploit might not be a crash or overflow, but a subtle twist in the logic. Think Like A Hacker. Happy hunting!</p><p>Hello Im Raduanul Islam Rohan or Gr3y G05T. I didn&#39;t add the introduction part up above because it was killing the vibe of this paper. When I started to learn about Business Logic Flaws, there was an absence of a resource like this, so I decided to build something myself. I’m not the most experienced hunter in that category, but I have poured everything I know into this paper. I will try my best to keep this thing updated and add more info as I grow. When I feel confident enough with the standard, I will publish it in a publication. I’m adding an edit log below to keep track. If you wanna contribute or have some query, you can reach me at <a href="https://x.com/gr3yg05t">@gr3yg05t</a>. Together, we hit harder.</p><p><strong>Edit Log (BST)</strong></p><p>17:23 | 06/07/25 → Published the first draft of the handbook</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=293f6a89a7f4" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/business-logic-flaws-a-bug-hunters-handbook-293f6a89a7f4">Business Logic Flaws: A Bug Hunter’s Handbook</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easiest Bug: Improper Token invalidation.]]></title>
            <link>https://infosecwriteups.com/easiest-bug-improper-token-invalidation-378e1bc60d94?source=rss-42e42c731162------2</link>
            <guid isPermaLink="false">https://medium.com/p/378e1bc60d94</guid>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Gr3yG05T]]></dc:creator>
            <pubDate>Mon, 02 Jun 2025 06:30:33 GMT</pubDate>
            <atom:updated>2025-06-02T06:30:33.146Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HB_2W0lkgVDlL_V-Bm1DaQ.png" /></figure><p>I wasn’t hunting for anything fancy that day. Just poking around, checking how the password reset flow works on the target web app.<br>The usual: fire up the site, enter an email, click “Forgot Password?”, and see what the response looks like. But there was a problem.<br>No matter how many times I tried, there was no password reset email in my mailbox. Is there be a bug? nahh, maybe it’s just some QA issue.. I left my desk to have some coffee.<br>When I came back, my mail box was full of password reset mails I requested earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BXHdccUurWBb3XdeHYzQKQ.jpeg" /></figure><p>The rest link contains a token and looks something like this:</p><pre>https://redacted.com/api/us/2/c/password_reset/1337/T0kEnyDZ</pre><p>Thinking of IDOR? already tested, no result. So let’s continue further.</p><p>I was going through the mails one by one, looking for something interesting. I used all of the reset links to reset my password, nothing seems interesting. Hmmm, but something here doesn’t looks right..<br>Wait, I was able to use all the password reset links to reset my password is pretty weird by itself..<br>When I am done resetting my password, all the other reset tokens should get expired, right? is it a bug? I started searching on Google to find more info, to find similar cases, to find disclosed reports featuring this scenario and found this HackerOne report.</p><p><a href="https://hackerone.com/reports/283550">Infogram disclosed on HackerOne: Password Reset Token Not Expired</a></p><p>The scenario the hunter described there, exactly resembles my finding. I did some more digging and came up with this attack scenario.</p><p>Now let’s imagine this in the wild.<br>An attacker manages to get brief access to the victim’s email , maybe through phishing, maybe from a previously leaked breach.<br>The attacker, let’s call him Retro form now on, didn’t try to log in immediately.</p><p>Instead, he uses “Forgot Password” and receives a reset token through the email.</p><p>He quietly saves it.</p><p>Let’s name our victim Bob.<br>Later, Bob notices something suspicious. He resets his password by generating another token then also secures his email account by resetting it’s password.<br>Now what? Retro lost his access? NAHH</p><p>Remember the reset token he saved? That token is still active and he can use that to get back into Bob’s account.</p><p>This bug doesn’t pose that much of a serious threat as compared to other bugs but its really easy to exploit. This types of bugs comes handy in the post exploitation scenarios, where attackers have already got some level of access and they wanna dig further. This can be used in post exploitation account takeover and backdoor.</p><p>Most programs accepts it, some don’t, it really depends on how you explain the impact and the attack scenario.</p><h4>Hunting Cheat Sheet</h4><p>Step 1: Visit the login page of the target application</p><p>Step 2: Request for password recent multiple times</p><p>Step 3: Reset your password with the latest password token</p><p>Step 4: Now test out the previous password reset tokens, If any of these works then the vulnerability is preset in the application.</p><p>This finding was pretty rare at the time I found it, There not much info were present in the internet (found some more reports later on). I was doubting myself whether its gonna get accepted or not. But just 2 days after submitting the bug, I received a reply, The bug was traiged.</p><p>You can reach out to me anytime at<a href="https://x.com/gr3yg05t"> @gr3yg05t</a></p><p>Until the next hack, <em>Goodbye</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=378e1bc60d94" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/easiest-bug-improper-token-invalidation-378e1bc60d94">Easiest Bug: Improper Token invalidation.</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OSINT Writeups — MIST Cyber Drill 2025]]></title>
            <link>https://osintteam.blog/osint-writeups-mist-cyber-drill-2025-2d1e398a4672?source=rss-42e42c731162------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d1e398a4672</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[osint]]></category>
            <category><![CDATA[ctf-walkthrough]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Gr3yG05T]]></dc:creator>
            <pubDate>Mon, 12 May 2025 17:09:39 GMT</pubDate>
            <atom:updated>2025-05-19T03:14:01.607Z</atom:updated>
            <content:encoded><![CDATA[<h3>OSINT Writeups — MIST Cyber Drill 2025</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-M41WOm1D3QLcU4JNq2kMQ.jpeg" /></figure><p>Hi, I’m Gr3yG05T from team 4GUN7UK. Yea, 4GUN7UK, you are going to hear this name more often as I’m going to cover more CTF stories from now on (it spells ‘Aguntuk’, by the way). There will be some storytelling going on, as I write in a way that resembles my thought process when solving the challenges. Those of you who came just for the solution should head over to the end, where I summarized the findings. So, let’s begin!</p><p>So, MIST Cyber Drill 2025 was a national-level CTF in Bangladesh organized by the Military Institute of Science and Technology (MIST) and the Bangladesh Telecommunications Regulatory Commission (BTRC). This was the first round of the event, and the finale will take place onsite at MIST campus. Yeah, we qualified, securing the 23rd spot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v3gZ8iuQPwF-R3ESvk8P_A.png" /></figure><p>There was a total of 6 OSINT challenges in the preliminary round, where I solved 5 of them. One thing to mention here is that for the first 4 challenges, the description will be the same. Yeah, I know it sounds a bit weird, but according to the organizer, I need to find both the QUESTION and the flag of the challenges, they were like “If you are really good at OSINT go find your flag without any instructions &amp; questions” xD. Organized by a government body, so not that much unexpected! Let’s start the solving :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*cujq2DfYcIgCL9kxJI4v4A.png" /></figure><p>Upon clicking the link provided in the description, it takes us to an email body</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*5YI6XQuSkFzcrkXwVQHDug.png" /></figure><p>It was a blackmail letter, highlighting their bitcoin address, email address, a public key, and a pastebin link. The pastebin link will be our main point of focus. I visited the pastebin and found the breach sample. There was a total of 3 pastes in the account, where one of them being password protected. But there was another thing that caught my eye.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XTXYpe_H0w3Q1PIpGVunJw.png" /></figure><p>The threat actor has posted an X (Twitter) profile in the comment. I visited the link, which took me to a profile named Rayan Walton</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*Rd9XouDtaNtEnupnVVeEaw.png" /></figure><p>I quickly explored the profile to find anything related to our challenges. I came across another pastebin link in the profile, with a comment seems to be some sort of password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*bUPNskyRVjxbLhFY51L7_g.png" /></figure><p>Looks like we are on the right track!</p><p>I visited the link, it was a password-protected pastebin, I inserted the passphrase we found from the X post, and… It didn&#39;t work! I tried multiple times, the outcome was the same. I shifted my focus to something else.</p><p>There was a picture posted on the profile, picture of a landmark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*Q2Ad55mhWXOEvCumVwha0A.png" /></figure><p>I doubted it at the first glance as landmarks posted in any social media OSINT normally lead to a reverse image search to find their name or some Google Maps review containing the flag. This one didn’t seem any different ..</p><p>The name of the hotel was clearly visible in the picture. I Googled the name and went to the Google Maps page of that place. As expected, Found the flag in the reviews.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fz8cx8qpHHNLTFZOf1GKig.png" /></figure><blockquote><strong><em>OSINT 002: WTISD{osint:geo-location}</em></strong></blockquote><p>The review was posted from an account named Cyber Magneto.. umm.. Cyber magneto.. the name sounds familiar. I saw the same name on some of the reposts on the Twitter account that we found earlier. Rayan Walton reposted many posts from a Twitter handle named TheCyberMagneto, The profile picture is the same too! I thought it was randomly reposted at the first time, but now that I know it is connected to our challenge, I started to dig deeper</p><p>Upon exploring, I found a similar post featuring a pastebin link and a pass phrase next to it, just like in the previous profile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*6cdzzBa_NN3Rlzq1Ea3Yzw.png" /></figure><p>I visited the link here again and BOOM! It worked this time. I got access to the pastebin and found the flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yIq7e-luS5WkVg5_9sqDmw.png" /></figure><blockquote><strong><em>OSINT 001: WTISD{osint:paste-site-monitoring}</em></strong></blockquote><p>It was the same pastebin of the attacker’s account that we found locked at the beginning.</p><p>This was the end of my winning streak. I went over the profile many times, checked every post one by one, but didn&#39;t find any logical link. I was thinking about some other way around. Username enumeration didn&#39;t bring anything new to the table, then I started to simply Googling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eRJ9jvmUB8aXmQSKiBQ2Kg.png" /></figure><p>I started with a simple <em>intext:”TheCyberMagneto”</em> query and found a Reddit post in my search results. It was him, TheCyberMagneto.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TIHBhZbOGlR0CCgmGJxLYw.png" /></figure><p>This account didn’t come out through the username enumeration but found the profile through dorks. Found a github profile along with his X(Twitter) linked to the reddit account. The X account was the same as before but the github profile is something that was new. I imediately rushed to the github and found 3 repositories.</p><ul><li>Threat-Report-0001–2025-Public</li><li>CyberABCLab_Breach_by_PhantomCiphers</li><li>Web-Defacement</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*92seP-vQdGgDNIauWVFc2g.png" /></figure><p>I started checking them one by one. Adrenaline rush was going crazy, I was going through everything, and then I found two gems. First one in the <em>Threat-Report-0001–2025-Public</em> repo. If you visit the repo and go to the file named <em>Initial Access Vector Identified in PhantomCiphers Ransomware Campaign Targeting CyberABCLab, </em>You will found our 3rd flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jkqamQWTp8U68MarZE3Zdw.png" /></figure><blockquote><strong><em>OSINT 003: WTISD{osint:social-media-analysis}</em></strong></blockquote><p>Also our 4th flag was in the next repository named<em> CyberABCLab_Breach_by_PhantomCiphers</em>, within it’s<em> Internal Project Document Snippet</em> directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e8f6_OX3dacXI-c7lXmH0g.png" /></figure><blockquote><strong><em>OSINT 002: WTISD{osint:branch-analysis}</em></strong></blockquote><p>Now, the cherry on top— the last challenge</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*xtgghZQabqNEPoErlD5nyQ.png" /></figure><p>Umm, a name? a real name? a real person’s name? We came across many names in our investigation, but most of them are codenames like PhantomCipher, TheCyberMagneto, JonathanMeyer etc, Only one name felt like a real name to me, RAYAN WALTON, yeah, the first Twitter account that we found. I thought of Jonathan Meyer before it, but honestly, the profile picture was a fake hacker image that didn’t give me a legit vibe. On the other hand, I misused all three attempts of the first challenge and was not ready to lose more. So I submitted Rayan Walton in the flag format wrapping, and.. it was CORRECT! This last challenge had the most amounts of points, with surprisingly the lowest difficulty.</p><blockquote><strong><em>OSINT 06: WTISD{osint:rayan-walton</em></strong><em>}</em></blockquote><h4>Summary</h4><p>I started with a ransom mail which led me to a pastebin. From the pastebin comment, I found a Twitter account (RayanWalton) that had a picture of a hotel posted. In the Google Maps review of that hotel, I found my first flag <strong>[2]</strong>, the account that posted the review had a Twitter account (TheCyberMagneto) where I found another pastebin link posted alongside a password. This pastebin gave us our next flag <strong>[1]</strong>. Found a GitHub account from a Reddit account associated with the TheCyberMagneto username. In that GitHub account, I found our next 2 flags <strong>[3]</strong> &amp; <strong>[4]</strong>. The last flag was the name of our first found Twitter account <strong>[6]</strong></p><p>This is the end. I hope you liked my write-up! Be sure to check my other papers out. I just started my writing journey, a follow would be much appreciated. You can always reach me through <a href="https://x.com/gr3yg05t">@Gr3yG05T</a> anytime.</p><p>Until the next hack, <em>Goodbye </em>:3</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d1e398a4672" width="1" height="1" alt=""><hr><p><a href="https://osintteam.blog/osint-writeups-mist-cyber-drill-2025-2d1e398a4672">OSINT Writeups — MIST Cyber Drill 2025</a> was originally published in <a href="https://osintteam.blog/">OSINT Team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I was able to delete a production backend server in my first finding.]]></title>
            <link>https://infosecwriteups.com/how-i-was-able-to-delete-a-production-backend-server-in-my-first-finding-5dcce8aa093c?source=rss-42e42c731162------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dcce8aa093c</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[info-sec-writeups]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <dc:creator><![CDATA[Gr3yG05T]]></dc:creator>
            <pubDate>Mon, 30 Dec 2024 04:21:07 GMT</pubDate>
            <atom:updated>2025-05-13T05:42:15.341Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dv1U6RmillW7OvFsQDMTRA.png" /><figcaption>Generated by cgdream.ai</figcaption></figure><p>Hello folks, in this article I will tell you about my journey of finding a CSRF and using that to delete a backend php server in my first triaged finding</p><h4><strong>First, A bit back backstory</strong></h4><p>I found this bug back in December 2023. Wrote this blog but actually didn’t publish it back then, so just turning everything in past tense and publishing it now :)</p><p>Hi, I am Raduanul Rohan, a nerdy kid from Bangladesh. I was mostly a CTF player back then until December 2023, when I decided to start hunting out of nowhere. It was a tough decision for me because of the anxiety and perfectionism I had. “I need to learn everything before jumping”, “There are hackers out there better than me”, “I&#39;m not capable enough”, but started it anyway</p><p>Caterpillar was a big scope program. Literally, everything they own was in scope. Started my recon watching <a href="https://x.com/NahamSec">Nahamsec</a>’s <a href="https://www.youtube.com/playlist?list=PLKAaMVNxvLmAkqBkzFaOxqs3L66z2n8LA">live recon videos</a> and collected well over 100 valid root domains. I was discovering new things and was learning and testing them. <br>Back then, I didn’t know how to fully automate everything nor I was capable of hunting manually. So I was just checking those domains one by one myself, looking for some weird web pages that I could target.</p><p>catwatches.com was a site for selling Caterpillar branded watches and stuff like that. while exploring, I came across a subdomain like something.catwatches.com . It felt pretty weird, just a blank page displaying its DNS name and mentioning something related to a server control panel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*1acn18FyHPzJ0He131bg3A.png" /></figure><p>So I was kinda sure that it might be some sort of admin portal or something. So I started fuzzing with some commonly used admin portal names. <a href="https://github.com/ffuf/ffuf">Ffuf </a>hit a 200 response code, there was a phpMyAdmin login page behind the site</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PFTJb-RY5F9Dgl-DZjtrHg.png" /></figure><p>As I told you earlier, I was mostly a CTF player back then. In CTFs first thing we do is check the HTML and JS code looking for some clues or actual flags. With this CTFer instinct, I opened up the source code. The source code can be full of juicy stuff sometimes, which is rare nowadays but not back then. I was lucky, the PMA version was disclosed in the HTML source, It was running on phpMyAdmin 4.6.6</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PaSYeZdRHgt5jrRtkdbRiQ.png" /></figure><p>Sounds a bit old right? Yes, it was outdated and vulnerable to two CVEs<br>The first one was an RCE CVE-2016-5734, Which seemed like patched some way, when I sent the request containing the payload, it just kept timing out, and I got no response back from the server even after trying like 15 to 17 times. Then I started to shift my focus a bit, When I started testing for the second one, things started to get interesting..</p><p><strong>CVE-2019–12922</strong></p><p>CSRF in phpMyAdmin allows an attacker to trigger a CSRF attack against a phpMyAdmin user deleting any server in the Setup page.<br>The payload was quite a simple request to this endpoint:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*kNDbe2QX1UGVsuDRlUba3w.png" /></figure><p>So was the POC page:</p><pre>&lt;p&gt;Deleting Server 1&lt;/p&gt;<br>&lt;img src=&quot;<br>http://server/phpmyadmin/setup/index.php?page=servers&amp;mode=remove&amp;id=1&quot;<br>style=&quot;display:none;&quot; /&gt;</pre><p>I fired up my proxy and visited the POC page. Yes, the response indicates that the exploit was executed perfectly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*IPoHQS0jxPLDj6RvETM6IA.png" /></figure><p>But why a 401? It was an expected behavior. As I wasn’t logged in as an admin, I got a 401. There is no way I could have managed any admin cookie for proper testing, I left the rest of the testing in the triager’s hand.</p><p>He asked for more info, I provided, The report went under program review and finally was triaged as a medium (6.5) by a Caterpillar staff and they sent my report to the app owner for remediation. Seems everything fine right? No, they updated my report as informative stating:</p><blockquote>Closing report as informative as Caterpillar does not own this domain. Finding forwarded to dealer/licensee</blockquote><p>I mean what the heck? You sent the report to the app owner and after fixing telling me it was not owned by you, is it a joke or something? I tried to argue back, but didn’t work</p><p>So here am I today. Gone through some ups and downs but wasn’t able to keep the consistency for a whole 1 year. It was my first ever accepted bug at the same time it was not. But I still remember the joy I had seeing the triaging notification in my mailbox..</p><p>Until the next one..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5dcce8aa093c" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/how-i-was-able-to-delete-a-production-backend-server-in-my-first-finding-5dcce8aa093c">How I was able to delete a production backend server in my first finding.</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bug Chain: pre-auth takeover to permanent access.]]></title>
            <link>https://infosecwriteups.com/bug-chain-pre-auth-takeover-to-permanent-access-4d92829ed816?source=rss-42e42c731162------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d92829ed816</guid>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[business-logic-flaw]]></category>
            <dc:creator><![CDATA[Gr3yG05T]]></dc:creator>
            <pubDate>Fri, 27 Dec 2024 23:11:50 GMT</pubDate>
            <atom:updated>2025-05-13T05:42:28.094Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*am-RC5JqpgU8b4NQxxYeDA.png" /></figure><p>Grey here! In this blog, I’ll share how I escalated a normal pre-authentication account takeover into a permanent access backdoor. Let’s dive in!</p><p>So, the main story began when I was testing a booking application where businesses can sign up to offer their services for customers to browse and book them. A few minutes after I just started testing the application, a weird behavior caught my eye. The application creates an account from the provided email on the free trial application form without verifying the ownership. What does that mean? Can I create an account with any email address I want? Doesn’t it sound like a pre-auth takeover? I tested the possibility and every time I was successful at taking over.</p><p>Now what? What&#39;s the impact here? Even If I can take over an account before the victim does, One password reset is enough to overthrow my access, what else can I do here? Down the rabbit hole we go, so I started to dig deeper. I was trying to escalate it’s impact somehow. This digging led me to another vulnerability with a higher impact. I was able to block users from accessing the platform by exploiting a logic flaw in the invitation feature.</p><p><a href="https://gr3yg05t.medium.com/logic-flaw-turning-an-invitation-function-into-a-revenue-blocker-b4523dc46dde">Logic Flaw: Using Invitation Function to Block Other Accounts</a></p><p>After that finding, I learned that there were multiple roles in the business portal. Out of curiosity, I started to test the authorization. I tried adding a member as the owner and tried to execute the same function with a low-privilege cookie, I started a service as a manager and then tried the same from a basic staff account. Out of all these authorization-associated functions, one particular function caught my attention. owner and manager can delete other classes of accounts, the owner can delete the manager’s account but the owner can’t delete his own account. Yes, there was no self account deletion function as a general.. But, can another owner account delete my one? There is no option to invite others as an owner on the platform. All the roles that can be invited are: Manager, Reception, Staffer, and Basic Staffer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pefsdh2USbG8cSRVYtiFbw.png" /></figure><p>But there was no option to invite an owner. Therefore I started testing for it.</p><p>I invited an email as a manager and captured it’s HTTP request. There was a string named staff_access_level in the request, this string determines the access level of the invited user.</p><pre>POST /core/v2/business_api/me/businesses/1380404/resources<br>Host: subdomain.redacted.com<br><br>{<br>  &quot;name&quot;: &quot;Attacker2ndEmail&quot;,<br>  &quot;staff_cell_phone&quot;: &quot;&quot;,<br>  &quot;staff_email&quot;: &quot;secondmail@attacker.com&quot;,<br>  &quot;staff_access_level&quot;: &quot;manager&quot;,<br>  &quot;description&quot;: &quot;&quot;,<br>  &quot;position&quot;: &quot;&quot;,<br>  &quot;send_invitation&quot;: true,<br>  &quot;services&quot;: [],<br>  &quot;staff_user_exists&quot;: false,<br>  &quot;photo&quot;: null,<br>  &quot;type&quot;: &quot;S&quot;<br>}</pre><p>I replaced the value of staff_access_level string with owner and forwarded the request</p><p>To my surprise, it actually worked! the inviting restriction was only implemented in the front end, there was no such prevention in the back end. But the main question is still unanswered, Can you delete an owner account with another owner account?</p><p>The answer is NO. The application was intended to run with a single owner for each business. With a couple of owners in the same business, the application logic was breached. There was no delete button..</p><p>What does all of this have to do with pre-auth takeover escalation? If you can add another owner to the business that the owner yourself can’t delete afterward, what does that mean? everything clicked in my mind at this moment..</p><p>If I create an account using the victim’s email address and then add another email I control as an owner to the platform, it answers all the questions. The victim can’t remove my other owner account due to the logic flaw and I would have a permanent backdoor to the victim’s business.</p><p>I put this theory to the test. Created an account with the victim’s email as an attacker. Invited my second email with owner privilege exploiting the misconfiguration. Finally recovered the password of the victim’s account to see if could still access the business. And yeah! The access was there! the victim cannot disrupt my backdoor either.</p><p>Thanks to this bug, I’m basically the co-owner now. I can peek, poke, and prod around — no take-backs, no escape. It’s my business too :3</p><p>Until next one..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d92829ed816" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/bug-chain-pre-auth-takeover-to-permanent-access-4d92829ed816">Bug Chain: pre-auth takeover to permanent access.</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Logic Flaw: Using Invitation Function to Block Other Accounts]]></title>
            <link>https://infosecwriteups.com/logic-flaw-turning-an-invitation-function-into-a-revenue-blocker-b4523dc46dde?source=rss-42e42c731162------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4523dc46dde</guid>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[business-logic-flaw]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Gr3yG05T]]></dc:creator>
            <pubDate>Fri, 27 Dec 2024 02:34:35 GMT</pubDate>
            <atom:updated>2025-05-13T05:42:41.711Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QSFCo2hM0IkehXaO5QJOrA.png" /></figure><p>In this blog, I&#39;m gonna tell you a story, a story about an application logic flaw that let me block new enrollments of the target application. Sounds interesting? lets begin..</p><p>The target was a service booking app. Businesses could register by enrolling in a subscription to offer their services on the platform. On the flip side, customers could browse and book these services. I will refer this platform as <em>redacted </em>platform throughout the writeup</p><p>So I started poking around.. after a few minutes of testing, I noticed a weird behavior. When I applied for their free trial, the application created an account from the provided email address but no verification was done. Interesting, huh? Doesn’t that sound like a pre-authentication takeover? Oh yes, it does! So, naturally, I tested it with a few other email addresses. And guess what? It worked every single time. So it is a bug, but how impactful? Not much, as victims can easily reset the account’s password and kick me away. Reporting this standalone isn&#39;t enough. Developers would probably brush it off with their golden line XD</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*GxyOD16DQtrT6Vly7KsRVQ.jpeg" /><figcaption>source: imgflip.com</figcaption></figure><p>So I kept this weak point in mind and started exploring other parts of the application. I was looking for the functionalities where the email address is being used so that I can escalate the impact. Some features such as account updates, password changes, email changes, etc commonly use email addresses in their workflow. Unfortunately, there were no such options in the account settings.. Then I started to use the application like a normal user to better understand it. I found some potential IDORs along the way but didn&#39;t work. Then, I found something interesting: a <strong>staff invitation pa<em>ge</em></strong><em>.</em> This feature allowed business owners to invite someone by email to join their team</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L-ZgRC6e0D7Jwpf6P6GK-Q.png" /></figure><p>Out of all the inputs and controls of that page, one section caught my eyes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*YkfhEpGeIkx5NgIjaF2u4g.png" /></figure><p>Umm.. Invite and create a <em>redacted </em>account? you really mean “Create”? another pre-auth takeover scenario? No, This time I looked at the thing in a different way, as I knew a standalone pre-auth takeover won&#39;t bring me anything.</p><p>Creating an account typically requires a password, but the invitation process skipped this entirely. No password was requested, nor was any generated password sent in the invitation email. Instead, the app sent an access link to the invited email address, and clicking this link granted the access to the account.</p><p>This made me wonder:</p><ul><li>Does the account only activate when the user clicks the invitation link?</li><li>Can the invitation directly grant access to the account associated with the invited mail, even without victim interaction?</li><li>And since the platform doesn’t verify account creation, Can I preemptively create an account with the victim’s email before they activate it? Maybe after that when the victim clicks and activates the account, I would have the same access to the target business as they have.?</li></ul><p>There are 3 possibilities:</p><ol><li>I create account with the invited email and get access directly</li><li>I create account with the invited email but I get access only after the victim clicks the link</li><li>I fail, can’t access anything</li></ol><p>With these questions circulating in my head, I decided to put them to the test.</p><p>I logged into my business portal and invited the victim as a staff.. before I access the invitation link as a victim, I tried to create an account with the victim’s email as an attacker and I.. FAILED..</p><p>Turns out, the app reserved the email as soon as the invitation was sent. Whether the victim clicked the link or not didn’t matter, the email was locked, nobody can create an account with it. At this point, It was very exhausting for me.</p><p>So I stepped back for a break, got some fresh air, spent a bit time with family and took a little nap.</p><p>Im back again, with a fresh mind and a cup of coffee. I started using the application as the invited staff. This time, switching my focus toward CSRFs. I generally thought of testing account deletion and the organization leave function. But.. As I mentioned before, there is no function for changing the email or password, nor is there any feature to leave the business or delete your account. Something clicked in my mind, the same previous scenario but a different perspective.</p><p>If an business owner invite you to their business as a staff, a account is already created for you. You cant leave the business nor you can delete the account.</p><p>What if you are a legitimate customer? You are planning move to the <em>redacted </em>platform soon. If the attacker invites you to their business, you can’t sign up for your business by any chance! You can&#39;t create an account, as an account with your email is already created along with the invitation. Thinking of accepting the invite and then leaving the attacker-controlled business? No my guy, that’s not possible, neither you can delete the account. You are basically stuck.</p><p>It’s a bit ironic here. The main purpose of the invitation function is to bring people to the platform. In this case, if someone invites you to the platform, you can’t join it :3</p><h4>Attack Scenario</h4><p>On the <em>redacted </em>platform, the attacker creates an account as a business. Invites the victim as staff, blocking them from the platform. Now the victim who is a potential customer of the <em>redacted </em>platform, can’t create an account for their business. Frustrated, they move to a competitor platform of the <em>redacted </em>platform, shortening revenue for the<em> redacted </em>platform.</p><p>What did you think? eh, it&#39;s just another low impact bug.. blocking other’s account creation.. not even a takeover.. blah.. blah..</p><p>But here comes the main impact. The easy to exploit nature of this bug makes it a dangerous weapon. all you need is to send a post request to the invitation endpoint and the email address you wanna block as the payload and that’s it. As a worst possible state, there is no rate limiting either. Imagine there is an attacker waiting for you with this wordlist..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*bucggYZkN5AntxvAUPmSLw.png" /></figure><h4>Final Thoughts</h4><p>I know I could’ve written a shorter blog. But I wanted to take you on the same journey I went through during testing — the highs, the lows, and the “aha” moments.</p><p>Sometimes, a bug is more impactful than it seems at first glance. It’s all about perspective.</p><p>Checkout my next writeup, where I escalated the pre-auth takeover mentioned above</p><p><a href="https://gr3yg05t.medium.com/bug-chain-pre-auth-takeover-to-permanent-access-4d92829ed816">Bug Chain: pre-auth takeover to permanent access.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4523dc46dde" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/logic-flaw-turning-an-invitation-function-into-a-revenue-blocker-b4523dc46dde">Logic Flaw: Using Invitation Function to Block Other Accounts</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Business logic: I can order anything from your account without paying for it]]></title>
            <link>https://infosecwriteups.com/business-logic-i-can-order-anything-from-your-account-without-paying-for-it-86ef070e01dd?source=rss-42e42c731162------2</link>
            <guid isPermaLink="false">https://medium.com/p/86ef070e01dd</guid>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[business-logic-flaw]]></category>
            <category><![CDATA[infosec-write-ups]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <dc:creator><![CDATA[Gr3yG05T]]></dc:creator>
            <pubDate>Wed, 25 Dec 2024 03:36:03 GMT</pubDate>
            <atom:updated>2025-05-13T05:42:04.869Z</atom:updated>
            <content:encoded><![CDATA[<h3>Business logic flaw: I can order anything from your account without paying for it.</h3><p>In this writeup, I will share my first finding of an application logic flaw, which I found in a e-commerce platform provider (like Shopify).</p><p>The bug is not resolved yet, so let&#39;s call it example.com . So all the subdomains under *.example.com were in scope. As I recently started learning about logic related bugs, I started playing around with the main application.</p><p>The application lets you create your own shop. All the shop that you create goes under example.com/{shop-name} directory and you can control them from web.example.com . So my methodology here was to implement a feature as an admin and then try to exploit them as a normal user, implement a restriction as an admin, and try to bypass them with a low-privileged user, you got the point. So I created a basic store and started playing with it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QJP9_lfGjsmUhKUWDlRlXA.png" /><figcaption>ignore the ironic pictures and spelling errors :)</figcaption></figure><p>My first goal was to sniff out some IDORs. I fired up my proxy and started using the application like a normal user. I used every function, clicked every button, and then opened by burp history to check what kinda request it was sending. I saw some possible IDOR entry points such as /api/order/buyer/853f-42aa/order/ and /api/store/seller/1337 . So I thought of creating another account to test the possible IDORs, and from here the main story begins..</p><p>It was an OTP based authentication, I verified my second email and created an account. Then I logged in, only to find… an order already sitting in my <strong>My Orders</strong> section. Wait, what? I had just created the account, so why was there an order already there? Umm, interesting…</p><p>Turns out, during some unauthenticated testing earlier, I had placed an order and used my second email as the contact email during checkout.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cK8FuYszBgRvfxEdZySeTA.png" /></figure><p>So it created the account with the contact mail and handled the order through that account. My hacker sense started tingling.. I created an account with victim@email.address . In my second browser, I placed an order and in the checkout, I provided the victim@email.address as contact mail and BOOM! — The order was associated with the victim&#39;s account.</p><p><strong>Backend Logic</strong></p><p>When someone places an order, the application first checks, if the user is authenticated or not. If authenticated → handle the order through the authenticated account. If not authenticated → the application takes the contact mail from the checkout and checks if any account already exists with this email or not. If exists → associate the order with the existing account and handle through it. if doesn&#39;t exist → create an account with the contact mail then associate and handle the order through it.</p><p><strong>The flaw in the logic</strong></p><p>While handling an unauthenticated user’s order, the application takes the contact mail from the checkout and handles the order with it, but it doesn&#39;t check whether the user providing the contact mail actually owns the email address or not. As a result, An attacker can use the victim’s email address as a contact mail in the checkout to place an order from the victim’s account.</p><p><strong>Escalation</strong></p><p>There is a pointing feature in the control panel. If turned on, users will get certain points for specific amounts of spending as cashback, which they can use in later orders. If this feature is enabled in any shop, the attacker can use the same exploit steps and choose Purchase with points in the checkout to deal some big financial loss to the victim.</p><p>Suddenly I felt a superpower in my hands, I could order whatever I wanted without paying for it! or troll my friends by ordering them some weird t-shirts from their own account — If I were an attacker XD. I reported the issue immediately without further testing and now waiting for the bug to be fixed.</p><p>It was my first finding related to logical flaws and also my first ever writeup, lemme know your thoughts. Got questions? Hit me up on <a href="https://x.com/gr3yg05t">X</a> and let&#39;s have a chat!</p><p>Until the next one, keep hacking!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*F1rY-ih5qqzCyeJQwQOYWg.gif" /><figcaption>Source: Giphy.com</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86ef070e01dd" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/business-logic-i-can-order-anything-from-your-account-without-paying-for-it-86ef070e01dd">Business logic: I can order anything from your account without paying for it</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>