<?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 Imran on Medium]]></title>
        <description><![CDATA[Stories by Imran on Medium]]></description>
        <link>https://medium.com/@0xnul1byt3?source=rss-b0ef733c3019------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wQV_JPWFe2pFRd8YyJRNHw.png</url>
            <title>Stories by Imran on Medium</title>
            <link>https://medium.com/@0xnul1byt3?source=rss-b0ef733c3019------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 12:10:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@0xnul1byt3/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[DVAPI Walkthrough: Mastering the OWASP API Security Top 10 (2023)]]></title>
            <link>https://0xnul1byt3.medium.com/dvapi-walkthrough-mastering-the-owasp-api-security-top-10-2023-c2448ac59614?source=rss-b0ef733c3019------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2448ac59614</guid>
            <category><![CDATA[dvapi]]></category>
            <category><![CDATA[web-api-security]]></category>
            <category><![CDATA[owasp-api-security-top-10]]></category>
            <category><![CDATA[api-security-testing]]></category>
            <category><![CDATA[api-security]]></category>
            <dc:creator><![CDATA[Imran]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 12:14:28 GMT</pubDate>
            <atom:updated>2026-11-13T13:08:13.560Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bZkrbMqVuuHl6Ts0UqK8ng.png" /></figure><p>APIs are the backbone of modern applications, but they are also one of the most heavily targeted attack surfaces. Reading about the OWASP API Security Top 10 is a great start, but to truly understand how these vulnerabilities work, you have to exploit them yourself.</p><p>That’s exactly what I set out to do with DVAPI (Damn Vulnerable API). It’s a self-hostable lab created by Payatu that intentionally mimics the OWASP API Top 10 (2023) scenarios.</p><p>In this write-up, I’ll walk through my entire methodology, from setting up the lab to exploiting all ten modern vulnerabilities and capturing the flags.</p><h3>Lab Setup &amp; Methodology</h3><p>Environment: I hosted the lab on a local Docker instance. My primary tools were Postman, Burp Suite and jwt_tool</p><p>First, clone the repository and spin up the Docker containers:</p><pre>git clone https://github.com/payatu/DVAPI.git<br>cd ./DVAPI/<br>docker compose up -d<br>docker ps # Verify containers are running</pre><p>The lab is now accessible locally at <a href="http://127.0.0.1:3000/">http://127.0.0.1:3000/</a></p><p>Prerequisites:<br>Before diving into the challenges, visit http://127.0.0.1:3000/register to create a new user account, and then log in at <a href="http://127.0.0.1:3000/login.">http://127.0.0.1:3000/login</a></p><p>Let’s solve the challenges and find the flags.</p><h3>API 1 : Broken Object Level Authorization (BOLA)</h3><p>Severity: High | CVSS: 8.1<br>Affected Endpoint: GET /api/getNote?username={username}</p><p>The Flaw:<br>The getNote endpoint returns a user&#39;s saved progress note by taking the username directly from the query parameter. It lacks a server-side check to verify that the authenticated caller actually owns that username.</p><p>Steps to Reproduce:</p><ul><li>Log in as a normal user and capture the GET /api/getNote?username=nullbyte request in Burp Suite.</li><li>Send it to Burp Repeater and confirm it returns your own note.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*lS-kUusAhAy8f0lkPthn-w.png" /></figure><ul><li>Change the username parameter value to admin and send the request.</li><li>Observe that the server returns the admin’s private note containing the flag.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*pkzz1JcJItnvtt2qk8WS9Q.png" /></figure><p>🎯 The flag is: flag{bola_15_ev3rywh3r3}</p><p>Remediation: Derive the resource owner from the authenticated session token; never trust a client-supplied parameter. Use non-guessable identifiers (UUIDs) alongside strict server-side ownership checks.</p><h3>API 2 : Broken Authentication (Weak JWT Secret)</h3><p>Severity: Critical | CVSS: 9.8<br>Affected Endpoint: GET /api/profile (JWT-protected)</p><p>The Flaw:<br>DVAPI issues JWTs signed with HS256 using a weak, dictionary-crackable secret. An attacker can capture a valid JWT, brute-force the HMAC secret offline, and forge a new token with administrative privileges.</p><p>Steps to Reproduce:</p><ul><li>Capture your JWT token from the HTTP headers while browsing your profile. Note that it contains an isAdmin: false claim.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bqB0EZ0MppLeI60-Oqaf-w.png" /></figure><ul><li>Use jwt_tool to crack the secret using a common wordlist: jwt_tool &quot;eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2YWY2ZGQ3OGEyMzc2NzA3ZTIxNDJkZWQiLCJ1c2VybmFtZSI6Im51bGxieXRlIiwiaXNBZG1pbiI6ImZhbHNlIiwiaWF0IjoxNzk0NTYzNDYxfQ.B9kcLcwy2ZAJPhUEF7-PoSB5IS4CbfHKfDsl-YKhhwE&quot; -C -d /usr/share/seclists/Passwords/scraped-JWT-secrets.txt</li><li>The tool reveals the secret is secret123</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CikRgV26mivbATSN2trXjA.png" /></figure><ul><li>Open Burp Suite’s JWT Editor extension. Change the username to admin and set isAdmin to true. Sign the token using the recovered secret.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*insxBSC5YGz-1kQ2v6Q0mg.png" /></figure><ul><li>Send the forged token to GET /api/profile. The server accepts it and returns the flag.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zNx1yTBsMpl_H_go-CH45Q.png" /></figure><p>🎯 The flag is: flag{aBus1ng_w34K_s3cR3TTT}</p><p>Remediation: Generate JWT secrets using a cryptographically secure random source with high entropy. Prefer asymmetric algorithms (RS256/ES256) and never trust role claims from the token alone.</p><h3>API 3 : Broken Object Property Level Authorization (Mass Assignment)</h3><p>Severity: High | CVSS: 7.5<br>Affected Endpoint: POST /api/register</p><p>The Flaw:<br>The registration endpoint binds the entire incoming JSON body to the backend user model without a field allow-list. By sending an extra score property, a user can directly manipulate their leaderboard position.</p><p>Steps to Reproduce:</p><ul><li>Open <a href="http://127.0.0.1:3000/scoreboard.">http://127.0.0.1:3000</a>/api/register and Create a account</li><li>Intercept the user registration request in Burp Suite.</li><li>Add an extra parameter to the JSON body: &quot;score&quot;: 999999, and forward the request.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D5-vGfsTP62uMcqL-Aq7cA.png" /></figure><ul><li>Log in and navigate to <a href="http://127.0.0.1:3000/scoreboard.">http://127.0.0.1:3000/scoreboard</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KA6Z6GDd6XOKPlSS6YgMTA.png" /></figure><ul><li>Check the GET /api/scores request in Burp HTTP history. Your newly created user is now the top scorer.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QvdMgiAYUwoY2t7utSL0Uw.png" /></figure><p>🎯 The flag is: flag{br0k3n_oBj3cT_Pr0p3rTy_L3v3L_Auth0RiS4Ti0N}</p><p>Remediation: Use an explicit allow-list (DTO) per endpoint to define exactly which fields a client is permitted to set. Keep sensitive fields (score, isAdmin, balance) strictly controlled by server-side logic.</p><h3>API 4 : Unrestricted Resource Consumption</h3><p>Severity: Medium | CVSS: 6.5<br>Affected Endpoint: Profile Picture Upload</p><p>The Flaw:<br>The profile picture upload function does not enforce any maximum file size or content-type validation. A user can upload an arbitrarily large file, exposing the application to disk-exhaustion risks.</p><p>Steps to Reproduce:</p><ul><li>Navigate to your profile (http://127.0.0.1:3000/profile) and select a massive image file (e.g., 100MB) to upload.</li><li>Capture the POST /api/profile/upload request in Burp Suite.</li><li>Wait a few moments for the server to process the oversized file.</li><li>Observe the HTTP response; once the server consumes enough resources processing the upload, the flag is revealed.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6vYisgRtzd30oI9bi5_Knw.png" /></figure><p>🎯 The flag is: flag{file_size_is_important}</p><p>Remediation: Enforce a strict maximum upload size at both the web-server and application layers. Apply per-user storage quotas and monitor for abnormal upload volume.</p><h3>API 5 : Broken Function Level Authorization (BFLA)</h3><p>Severity: Critical | CVSS: 9.1<br>Affected Endpoint: DELETE /api/user/{username}</p><p>The Flaw:<br>The /api/user/{username} resource allows the DELETE method for any authenticated user, not just admins or the resource owner. A low-privilege token is sufficient to delete an arbitrary account.</p><p>Steps to Reproduce:</p><ul><li>Authenticate as a normal user and capture the GET /api/user/Bob request. Send it to Repeater.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1lX5d97Ekzh20qFIa_NIvw.png" /></figure><ul><li>Browse the scoreboard (/scoreboard) to identify a victim account like Bob</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*4UaKwSOByhuD6bywG7gZWQ.png" /></figure><ul><li>In Repeater, change the username in the path to Boband change the HTTP method from GET to DELETE.</li><li>Send the request. The server deletes the user without authorization and returns the flag.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*E39tz0NhiyQ60CTZkXsBGQ.png" /></figure><p>🎯 The flag is: flag{n0_fUncTi0N_L3v3L_aUtH???}</p><p>Remediation: Implement explicit role-based access control (RBAC) and enforce it server-side on every state-changing method (POST/PUT/DELETE). Default-deny destructive operations unless the admin role is verified.</p><h3>API 6 : Unrestricted Access to Sensitive Business Flows</h3><p>Severity: Medium | CVSS: 5.3<br>Affected Endpoint: POST /api/addTicket</p><p>The Flaw:<br>The support-ticket submission flow has no rate limiting or abuse detection. An authenticated user can script repeated submissions to flood the support system.</p><p>Steps to Reproduce:</p><ul><li>Click the ticket icon to create a new support ticket, and capture the POST /api/addTicket request in Burp Suite.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WWkjfRkX_xsw0ZLgysuOCA.png" /></figure><ul><li>Send the request to Burp Intruder. Set up a Sniper attack using null payloads and configure it to “continue indefinitely.”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7EtBMm1qVMjUCWmX8kvsKQ.png" /></figure><ul><li>Start the attack. This floods the server with ticket creation requests.</li><li>Monitor the response lengths. When the length changes, check that request; the flag is revealed due to the lack of rate limiting.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fy2J00rRSYugLAJN86uk8A.png" /></figure><p>🎯 The flag is: flag{n0_r4t3_L1m1T?}</p><p>Remediation: Apply rate limiting/throttling per user and per IP on sensitive business-flow endpoints. Add abuse-detection (CAPTCHA, exponential backoff) for ticket creation.</p><h3>API 7 : Server Side Request Forgery (SSRF)</h3><p>Severity: High | CVSS: 8.6<br>Affected Endpoint: POST /api/addNoteWithLink</p><p>The Flaw:<br>The “SecretNote via URL” feature fetches a user-supplied URL server-side with no validation or allow-listing. The server will connect to arbitrary internal addresses, confirming the backend can be used as a proxy.</p><p>Steps to Reproduce:</p><ul><li>Visit your profile and update the note with a link</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*3LVGFAFygbc-tzKgn_R-KQ.png" /></figure><ul><li>capturing the POST /api/addNoteWithLink request in Burp Suite.</li><li>Send it to Burp Intruder. Change the URL payload to <a href="http://127.0.0.1/">http://127.0.0.1:1234</a></li><li>Perform a Sniper attack fuzzing the port number using a common ports wordlist :<a href="https://github.com/danielmiessler/SecLists/blob/master/Discovery/Infrastructure/common-http-ports.txt">https://github.com/danielmiessler/SecLists/blob/master/Discovery/Infrastructure/common-http-ports.txt</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-xMOUl4COaUmTY8aNX-47w.png" /></figure><ul><li>Notice that ports 3000 and 8443 are open. The flag is revealed in the HTTP response for port 8443</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*il6DOSrtMg9cqWUhf61x2Q.png" /></figure><p>🎯 The flag is: flag{55RF_c4n_wR3AK_h4v0c}</p><p>Remediation: Maintain a strict allow-list of destinations the server is permitted to fetch. Block outbound requests to private IP ranges, loopback addresses, and cloud metadata IPs.</p><h3>API 8 : Security Misconfiguration</h3><p>Severity: Medium | CVSS: 5.3<br>Affected Endpoint: Any JWT-protected endpoint (e.g., GET /api/profile)</p><p>The Flaw:<br>Sending a deliberately malformed/corrupted JWT causes the server to fail parsing in an unhandled way, returning a full technical stack trace directly in the HTTP response.</p><p>Steps to Reproduce:</p><ul><li>Browse the challenges page and capture any authenticated request (e.g., GET /api/profile) in Burp Suite.</li><li>Send the request to Repeater. Remove the JWT signature and send the request.</li><li>Observe that the server throws a detailed stack trace error, and the flag is hidden within the error message.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I60OZhjKViUa_RNPKxZDWw.png" /></figure><p>🎯 The flag is: flag{St4cK_tR4c3_eRR0R}</p><p>Remediation: Centralize error handling and always return a generic, non-technical error message to the client. Log full technical details server-side only.</p><h3>API 9 : Improper Inventory Management</h3><p>Severity: Medium | CVSS: 5.3<br>Affected Endpoint: POST /api/allChallenges</p><p>The Flaw:<br>The challenges-listing endpoint accepts a released parameter intended for internal use. Supplying an undocumented value like unreleased causes the server to return hidden challenges.</p><p>Steps to Reproduce:</p><ul><li>Visit http://127.0.0.1:3000/challenges and capture the request in the Burp Suite.</li><li>View the page source code in your browser. Search for /api/allChallenges and discover a hidden parameter: unreleased: 1.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bfQL0EYg2GP8HhTtq7MioQ.png" /></figure><ul><li>In Burp Repeater, change the JSON body from &quot;released&quot;: 1 to &quot;unreleased&quot;: 1 and send the request.</li><li>Observe that the API returns hidden challenges (Challenge 11 and 12). The description for Challenge 12 contains the flag.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h8p538zh6-t6x8X-qk1beg.png" /></figure><p>🎯 The flag is: flag{a553Ts_m4N4g3m3NT_g0n3_wR0ng}</p><p>Remediation: Maintain a complete inventory of all API endpoints and parameters. Remove or properly gate unreleased functionality behind strict environment checks.</p><h3>API 10 : Unsafe Consumption of APIs (NoSQL Injection)</h3><p>Severity: Critical | CVSS: 9.8<br>Affected Endpoint: POST /api/login</p><p>The Flaw:<br>The login endpoint passes the username and password fields directly into a MongoDB query without sanitization. Submitting a MongoDB query operator (e.g., $ne) as the password value bypasses the password check entirely.</p><p>Steps to Reproduce:</p><ul><li>Log out and attempt to log in as admin while capturing the POST /api/login request in Burp Suite.</li><li>Send the request to Repeater. Modify the JSON body to inject a NoSQL operator:<br>{&quot;username&quot;:&quot;admin&quot;,&quot;password&quot;:{&quot;$ne&quot;:&quot;123&quot;}}</li><li>Send the request. The $ne (not equal) operator makes the query evaluate to true.</li><li>Observe that authentication is successful and the flag is returned in the response.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZF8vpO0HL7tOD9bVxmqsLA.png" /></figure><p>🎯 The flag is: flag{eZ_n0SQLi_pWn}</p><p>Remediation: Never pass raw, untyped client JSON directly into a NoSQL query. Enforce strict schema validation on all request bodies and explicitly cast expected types (e.g., string) before querying.</p><h3>Final Thoughts</h3><p>Working through the DVAPI lab was a fantastic hands-on experience. It highlights that the OWASP API Top 10 (2023) is heavily focused on modern, complex flaws — like unrestricted resource consumption, unsafe API consumption, and business logic abuse.</p><p>By setting up the lab locally and testing these scenarios, I gained a much clearer perspective on how small misconfigurations or missing authorization checks can lead to significant compromises. A big thanks to Payatu for creating and maintaining this resource for the community.</p><p>If you are preparing for API security certifications or just want to sharpen your pentesting skills, I highly recommend spinning up DVAPI and trying it out yourself. Happy hacking!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2448ac59614" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[vAPI Walkthrough : Hacking the OWASP API Security Top 10 (2019)]]></title>
            <link>https://0xnul1byt3.medium.com/vapi-walkthrough-hacking-the-owasp-api-security-top-10-2019-ed39637b27d8?source=rss-b0ef733c3019------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed39637b27d8</guid>
            <category><![CDATA[vapi]]></category>
            <category><![CDATA[api-security]]></category>
            <category><![CDATA[web-api-security]]></category>
            <category><![CDATA[owasp-api-security-top-10]]></category>
            <category><![CDATA[api-security-testing]]></category>
            <dc:creator><![CDATA[Imran]]></dc:creator>
            <pubDate>Wed, 11 Nov 2026 16:11:04 GMT</pubDate>
            <atom:updated>2026-11-13T13:04:42.200Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TPTHCeZUc7qWeAJzsOwejw.png" /></figure><p>APIs are the backbone of modern applications, but they are also one of the most heavily targeted attack surfaces. Reading about the OWASP API Security Top 10 is a great start, but to truly understand how these vulnerabilities work, you have to exploit them yourself.</p><p>That’s exactly what I set out to do with vAPI (Vulnerable Adversely Programmed Interface). It’s a self-hostable lab created by roottusk that intentionally mimics the OWASP API Top 10 (2019) scenarios.</p><p>In this write-up, I’ll walk through my entire methodology, from setting up the lab to exploiting all ten vulnerabilities and the three bonus “Arena” challenges.</p><h3>Lab Setup &amp; Methodology</h3><p><strong>Environment:</strong> I used a local Docker instance to host the lab. My primary tools were Postman and Burp Suite.</p><p>First, I cloned the repository and spun up the Docker containers:</p><pre>git clone https://github.com/roottusk/vapi.git<br>cd vapi<br>sudo docker compose up -d<br>docker ps # Verify containers are running</pre><p>The lab is now accessible locally at <a href="http://127.0.0.1:8000/vapi.">http://127.0.0.1:8000/vapi</a></p><p><strong>Postman Setup:</strong> I imported the vAPI.postman_collection.json and vAPI_ENV.postman_environment.json files provided in the repo. Don&#39;t forget to update the host variable in your Postman environment to 127.0.0.1:8000, and enable &quot;Use custom proxy configuration&quot; in Postman&#39;s settings to route traffic through your proxy tool if needed.</p><h3>API 1 : Broken Object Level Authorization (BOLA)</h3><p><strong>Severity:</strong> High | <strong>CVSS:</strong> 8.1</p><p><strong>The Flaw:</strong> The Get User and Update User endpoints take the user ID directly from the URL path with no server-side check to verify that the authenticated caller actually owns that ID.</p><p><strong>Steps to Reproduce:</strong></p><ul><li>Register a new account and note your assigned sequential ID.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HPwzWnKSO6esvnPh9Ntt4w.png" /></figure><ul><li>Send a request to GET /vapi/api1/user/8 using your auth token to confirm it returns your own profile.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pc6m-Qgb2s2m3Cvucp84bw.png" /></figure><ul><li>Change the user ID in your Postman request URL to 1 (GET /vapi/api1/user/1) and send it.</li><li>Observe that the server returns user 1’s full profile data, including their flag hidden in the course field.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6sdscyUMndC9ENwqcFsT9g.png" /></figure><ul><li>Send a PUT request to the same endpoint using another user&#39;s ID to confirm unauthorized profile modification is also possible.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SPDhI7nQa4r_vB0jcdXfgw.png" /></figure><p>🎯<strong> The flag is: </strong>flag{api1_d0cd9be2324cc237235b}</p><p><strong>Remediation:</strong> Derive the resource owner from the authenticated session token; never trust a client-supplied ID alone. Use non-sequential, non-guessable identifiers (UUIDs) alongside server-side ownership checks.</p><h3>API 2: Broken Authentication</h3><p><strong>Severity:</strong> Critical | <strong>CVSS:</strong> 9.1</p><p><strong>The Flaw:</strong> The login endpoint has no lockout, CAPTCHA, or rate limiting. Worse, the lab ships with a creds.csv file containing candidate email/password pairs right inside the application&#39;s own Resources folder.</p><p><strong>Steps to Reproduce:</strong></p><ul><li>Locate and download the creds.csv file from the lab&#39;s Resources folder.</li><li>Open your terminal, navigate to the folder containing the file. Since it contains comma-separated values, use awk to print the columns directly to your screen (without saving to a new file).</li><li>To print the emails: awk -F&#39;,&#39; &#39;{print $1}&#39; creds.csv</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*fzaJOMXklFXJZ1orDKoMBw.png" /></figure><ul><li>To print the passwords: awk -F&#39;,&#39; &#39;{print $2}&#39; creds.csv</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*igah9QUvTPLD_lFifUAS8A.png" /></figure><ul><li>Take the POST /vapi/api2/user/login request and set up a <strong>Pitchfork</strong> attack in Burp Intruder, using the printed emails and passwords as your two separate payload lists.</li><li>Run the attack to identify valid credentials.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jwESpcY9t0898iM6OYHmbQ.png" /></figure><ul><li>Log in with these credentials in Postman.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ou05jkprQlAL-VFWfrIwUQ.png" /></figure><ul><li>Use the returned token against GET /vapi/api2/user/details.</li><li>Observe that the token isn’t scoped to just your user — it returns the details of all registered users.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lDC8vprMvsuNRw6T8kY2nw.png" /></figure><p>🎯<strong> The flag is:</strong> flag{api2_6bf2beda61e2a1ab2d0a}</p><p><strong>Remediation:</strong> Never bundle credentials in application resources. Implement strict rate limiting, account lockouts, and ensure authentication tokens are properly validated and scoped to the specific user.</p><h3>API 3 : Excessive Data Exposure</h3><p><strong>Challenge Description:</strong> This vulnerability occurs when an API returns more data than the client application actually requires, often exposing sensitive information to anyone who inspects the raw network traffic. For this exercise, the target is the mobile application provided in the lab’s Resources folder.</p><p>I decided to bypass this specific challenge for the write-up. To extract the flag, you need to decompile and modify the provided Android APK file. Since I didn’t have a dedicated Android Studio environment or emulator configured at the time, I moved on to the next challenges.</p><h3>API 4 : Lack of Resources &amp; Rate Limiting</h3><p><strong>Severity:</strong> High | <strong>CVSS:</strong> 7.5</p><p><strong>The Flaw:</strong> The mobile login flow uses a 4-digit OTP (10,000 possible combinations) and places zero limits on verification attempts.</p><p><strong>Steps to Reproduce:</strong></p><ul><li>Request an OTP via the Mobile Login endpoint in Postman.</li><li>Capture the POST /vapi/api4/otp/verify request. Since you don&#39;t have the SMS, you can fuzz the otp parameter.</li><li>Send the request to Burp Intruder and brute-force the 4-digit code from 0000 to 9999.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ILgfYVSN4M4Yd_CqcwY3yA.png" /></figure><ul><li>Within minutes, identify the correct OTP (1872)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bJ-qmOS_2zxJmSaO7yRLFg.png" /></figure><ul><li>Use this valid OTP in Postman to retrieve a valid authentication token.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YQfGczHzpQquIlfqLm-dHQ.png" /></figure><ul><li>Send a request to GET /vapi/api4/user with the token to retrieve the flag.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sjRUGDs4ToDIRfFerFjU0g.png" /></figure><p>🎯<strong> The flag is:</strong> flag{api4_ce696239323ea5b2d015}</p><p><strong>Remediation:</strong> Enforce a strict maximum number of attempts per OTP (3–5) and invalidate the OTP after that. Use rate limiting/exponential backoff per IP and account.</p><h3>API 5 : Broken Function Level Authorization (BFLA)</h3><p><strong>Severity:</strong> Critical | <strong>CVSS:</strong> 8.6</p><p><strong>The Flaw:</strong> While direct admin endpoints are protected, a bulk listing function is exposed to low-privilege users.</p><p><strong>Steps to Reproduce:</strong></p><ul><li>Create a normal user via POST /vapi/api5/user in Postman and note the low-privilege ID.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dDa3arVski0OOlMeIpGZRA.png" /></figure><ul><li>Attempt to access individual admin endpoints (e.g., GET /vapi/api5/user/1) and confirm they return a 403 Forbidden</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J3FpSosRyj21OxLpHKL5yQ.png" /></figure><ul><li>Change the path to the bulk listing function: GET /vapi/api5/users</li><li>Send the request using the normal user’s token.</li><li>Observe that the server returns a complete dump of every user in the application, including flags.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cnwi6tQShpUWK1K5wCYQMg.png" /></figure><p>🎯<strong> The flag is:</strong> flag{api5_76dd990a97ff1563ae76}</p><p><strong>Remediation:</strong> Implement explicit Role-Based Access Control (RBAC) on every function. Default-deny access to bulk listing endpoints unless an admin role is verified server-side.</p><h3>API 6 : Mass Assignment</h3><p><strong>Severity:</strong> High | <strong>CVSS:</strong> 7.5</p><p><strong>The Flaw:</strong> The Create User endpoint blindly binds the incoming JSON body to the backend user model without an allow-list.</p><p><strong>Steps to Reproduce:</strong></p><ul><li>Create a new user via POST /vapi/api6/user in Postman and confirm the default credit balance is 0</li><li>Send another Create User request, but add an extra parameter to the JSON body: &quot;credit&quot;: 1000</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*41IwTnFKW53o53fzp6EOtA.png" /></figure><ul><li>Query the user details (GET /vapi/api6/user/me).</li><li>Observe that the account was created with an attacker-controlled balance of 1000 credits, revealing the flag.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dyfIipbjkUnQ1Y50DAEiQg.png" /></figure><p>🎯<strong> The flag is:</strong> flag{api6_afb969db8b6e272694b4}</p><p><strong>Remediation:</strong> Use an explicit allow-list (DTO) per endpoint to define exactly which fields a client is permitted to set. Keep sensitive fields like credit, role, or isAdmin strictly controlled by server-side logic.</p><h3>API 7 : Security Misconfiguration (CORS)</h3><p><strong>Severity:</strong> High | <strong>CVSS:</strong> 7.1</p><p><strong>The Flaw:</strong> The API responses include both Access-Control-Allow-Origin: * and Access-Control-Allow-Credentials: true. This combination is a severe security risk, as it allows any origin to make credentialed requests.</p><p><strong>Steps to Reproduce:</strong></p><ul><li>Log in and grab the GET /vapi/api7/user/key request in Postman.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e5K3WfTrsoL5mhQFsyZ_HQ.png" /></figure><ul><li>Add a custom header directly in Postman: Origin: <a href="http://evil.com/">http://evil.com</a></li><li>Send the request and observe that the server accepts it, reflects the origin, and returns sensitive data along with the flag.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7rXqVRlB8JoiJUWiNFfPGg.png" /></figure><p>🎯<strong> The flag is:</strong> flag{api7_e71b65071645e24ed50a}</p><p><strong>Remediation:</strong> Never combine wildcard origins with credentials. Maintain a strict allow-list of trusted domains and reflect only those.</p><h3>API 8 : Injection (SQL Injection)</h3><p><strong>Severity:</strong> Critical | <strong>CVSS:</strong> 9.8</p><p><strong>The Flaw:</strong> User input in the login flow is concatenated directly into backend SQL queries.</p><p><strong>Steps to Reproduce:</strong></p><ul><li>Submit a single quote (&#39;) in the username field of the login request in Postman.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ozdziR0wpGyPyusebBJr2Q.png" /></figure><ul><li>Observe the verbose SQL syntax error, confirming the injection point.</li><li>Inject the payload admin&#39; OR 1=1 -- - into the username field to bypass authentication.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qG_lpChGgb7kJP1A8nT4dQ.png" /></figure><ul><li>Now use the authkey and send GET request to /vapi/api8/user/secret and we get the flag on secret</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-PcB8jzB0z0lZqPzWvrdOA.png" /></figure><p><strong>🎯 The flag is:</strong> flag{api8_509f8e201807860d5c91}</p><p><strong>Remediation:</strong> Always use parameterized queries/prepared statements. Suppress verbose database errors in production and apply strict input validation.</p><h3>API 9 : Improper Assets Management</h3><p><strong>Severity:</strong> High | <strong>CVSS:</strong> 7.5</p><p><strong>The Flaw:</strong> The current v2 API has rate limiting enabled (visible via X-Ratelimit-Remaining headers), but the deprecated v1 API is still active and lacks these protections.</p><p><strong>Steps to Reproduce:</strong></p><ul><li>Send an invalid login attempt to the v2 API (POST /vapi/api9/v2/user/login) and observe the rate limit kick in after 5 tries.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f5ySLNpIBCr2wiaUf_GYoQ.png" /></figure><ul><li>Change the path to the deprecated v1 API: POST /vapi/api9/v1/user/login</li><li>Send the request to FFUF and sequentially brute-force the 4-digit pin parameter.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0lldwIGtkOq3SRU0l4zCuA.png" /></figure><ul><li>Identify the correct PIN (1655).</li><li>Use this PIN in Postman to log in successfully and retrieve the flag.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BxwfBWzLaldXJgOrTRZmaQ.png" /></figure><p>🎯<strong> The flag is:</strong> flag{api9_81e306bdd20a7734e244}</p><p><strong>Remediation:</strong> Maintain a complete inventory of all API versions. Decommission old versions once superseded, or ensure they are protected by the exact same security controls (like an API Gateway) as the current version.</p><h3>API 10 : Insufficient Logging &amp; Monitoring</h3><p><strong>Severity:</strong> Medium | <strong>CVSS:</strong> 5.3</p><p><strong>The Flaw:</strong> The application lacks logging and monitoring for sensitive actions.</p><p><strong>Steps to Reproduce:</strong></p><ul><li>Locate the Get Flag request in the Postman collection.</li><li>Send the GET /vapi/api10/user/flag request as-is.</li><li>Observe that the flag is returned immediately in the response, with no indication that the action was logged, flagged, or alerted on.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kon53R4fdYBgFQ9ZYW8CVw.png" /></figure><p>🎯<strong> The flag is:</strong> flag{api10_5db611f7c1ffd747971f}</p><p><strong>Remediation:</strong> Log all authentication attempts, authorization failures, and access to sensitive data. Configure real-time alerts for suspicious patterns and regularly test that your alerting actually fires.</p><h3>Bonus Arena Challenges</h3><h4>Arena 1: JustWeakToken (JWT Tampering)</h4><p><strong>Severity:</strong> Critical | <strong>CVSS:</strong> 9.4</p><p><strong>Steps to Reproduce:</strong></p><ul><li>Log in with a normal user account and capture the issued JWT.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0v7Gtk9bRbF-K56yNAT0mg.png" /></figure><ul><li>Inspect the token payload on JWT editor</li><li>Manipulate the token, changing &quot;role&quot;: &quot;user&quot; to &quot;role&quot;: &quot;admin&quot;.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UFENXBR1lEetDg-P7ME7wQ.png" /></figure><ul><li>Resend the request with this modified token to gain administrative access.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EwB3PVbbks8KJEREK6Pl-g.png" /></figure><p>🎯<strong> The flag is:</strong> flag{jwt_qnopkkt3owsxndk083v1}</p><h4>Arena 2: ServerSurfer (SSRF)</h4><p><strong>Severity:</strong> High | <strong>CVSS:</strong> 8.2</p><p><strong>Steps to Reproduce:</strong></p><ul><li>Take the GET request that fetches a url parameter (/vapi/serversurfer?url=...).</li><li>Replace the url parameter value with a local file path using the file:// wrapper to test for Local File Inclusion. For example: file:///var/www/html/vapi/.env</li><li>Send the request and observe the server fetching the local file and returning its contents base64-encoded in the JSON response.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rjy6OquU-mYc4g8V9Rh5Ig.png" /></figure><ul><li>Copy the base64 string from the data field. You can decode it quickly using your terminal with a command like echo &quot;&lt;paste_base64_here&gt;&quot; | base64 -d</li><li>Observe the decoded output, which reveals the contents of the server’s .env file. This proves a full SSRF primitive capable of reading sensitive internal files.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BRduGX3xTG3koAlzLVuBPQ.png" /></figure><p><em>(Note: This challenge does not have a flag).</em></p><h4>Arena 3: StickyNotes (Stored XSS)</h4><p><strong>Severity:</strong> Medium | <strong>CVSS:</strong> 6.1</p><p><strong>Steps to Reproduce:</strong></p><ul><li>Send a POST request in Postman to store a note containing the payload: &lt;img src=x onerror=alert(1)&gt;</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1xpVPXcjqh-sAXQd7wJsRA.png" /></figure><ul><li>Request the notes using the format=html parameter (GET /vapi/stickynotes?format=html).</li><li>View the response in a browser and observe that the script executes, confirming Stored XSS.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rJUpCmWW6waQFnhqJEhQJg.png" /></figure><ul><li>The flag is revealed in the response.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CioyctjZkBOCmmWVQIhBDg.png" /></figure><p>🎯<strong> The flag is:</strong> flag{xss_e2rghxe4164cc2472xwb}</p><h3>Final Thoughts</h3><p>vAPI is an excellent lab that proves one recurring point: <strong>the server must never blindly trust client-supplied input.</strong> Whether it’s an object ID, an extra JSON field, a token claim, or an HTTP Origin header, failing to validate that input against the authenticated session is the root cause of almost every vulnerability on the OWASP API Top 10.</p><p>If you’re studying for API security certifications or just want to level up your testing skills, I highly recommend spinning up vAPI and working through it. A big thanks to <strong>roottusk</strong> for maintaining this resource.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed39637b27d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>