<?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 0vulns 🇸🇩 on Medium]]></title>
        <description><![CDATA[Stories by 0vulns 🇸🇩 on Medium]]></description>
        <link>https://medium.com/@0vulns?source=rss-b0dfe0d66373------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FoovrEU1geBRScFSYtS-eA.png</url>
            <title>Stories by 0vulns 🇸🇩 on Medium</title>
            <link>https://medium.com/@0vulns?source=rss-b0dfe0d66373------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 18:42:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@0vulns/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[A Deep Dive into a Critical Vulnerability in Clockwork]]></title>
            <link>https://0vulns.medium.com/a-deep-dive-into-a-critical-vulnerability-in-clockwork-f68ddb5ec48c?source=rss-b0dfe0d66373------2</link>
            <guid isPermaLink="false">https://medium.com/p/f68ddb5ec48c</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[laravel-telescope]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security-research]]></category>
            <dc:creator><![CDATA[0vulns ]]></dc:creator>
            <pubDate>Thu, 24 Jul 2025 22:28:01 GMT</pubDate>
            <atom:updated>2025-07-24T22:28:01.962Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Hello, readers! Today, I want to share a fascinating journey I embarked on, uncovering a critical vulnerability in a popular PHP development tool called Clockwork. This isn’t just any story; it’s about how a seemingly small oversight can lead to significant security implications, especially in a staging environment like that of Patchstack.</p><h3>Overview</h3><p>Imagine you’re working late at night, digging through lines of code, and suddenly, you stumble upon something unexpected. That’s exactly what happened to me. I discovered a vulnerability that allowed unauthorized access to debugging information. This wasn’t just any information; it was the kind that could potentially expose sensitive details about the system.</p><p>The vulnerability I found was related to bypassing localhost restrictions in Clockwork. For those who might not be familiar, Clockwork is an essential tool for PHP developers, providing insights and debugging information. However, this powerful tool had a flaw that could be exploited, particularly in Patchstack’s staging environment.</p><h3>Vulnerability Details</h3><p>Imagine finding a backdoor in a supposedly secure building. That’s essentially what this vulnerability is like. It’s classified as an <strong>Access Control Bypass and Information Exposure</strong>, affecting specific methods within Clockwork, namely isEnabled() and hasLocalHost(). The implications are severe, with potential impacts including unauthorized access to debugging information, session hijacking, and even a full site takeover. The severity? Critical.</p><h3>Technical Analysis</h3><h4><strong>Clockwork’s </strong><strong>isEnabled() Method</strong></h4><p>Clockwork has a method called isEnabled(), which acts like a gatekeeper, deciding whether Clockwork should be active based on the configuration and where the request is coming from. If the request seems to come from a trusted source, like a localhost or a common development domain, Clockwork springs into action.</p><pre>public function isEnabled()<br>{<br>    return $this-&gt;getConfig(&#39;enable&#39;)<br>        || $this-&gt;getConfig(&#39;enable&#39;) === null &amp;&amp; $this-&gt;app[&#39;config&#39;]-&gt;get(&#39;app.debug&#39;)<br>            &amp;&amp; ($this-&gt;incomingRequest()-&gt;hasLocalHost() || $this-&gt;app-&gt;runningInConsole());<br>}</pre><p><strong>Key Points:</strong></p><ul><li>If enable is set to true, Clockwork is enabled.</li><li>If enable is not set, Clockwork is enabled only if the app is in debug mode and the request seems to come from a trusted source.</li></ul><h4>Clockwork’s hasLocalHost() Method</h4><p>The hasLocalHost() method is like a bouncer checking IDs. It verifies if the request&#39;s host matches common local development domains, such as localhost or 127.0.0.1.</p><pre>public function hasLocalHost()<br>{<br>    $segments = explode(&#39;.&#39;, $this-&gt;host);<br>    $tld = $segments[count($segments) - 1];<br>    return $this-&gt;host == &#39;127.0.0.1&#39;<br>        || in_array($tld, [ &#39;localhost&#39;, &#39;local&#39;, &#39;test&#39;, &#39;wip&#39; ]);<br>}</pre><p><strong>Key Points:</strong></p><ul><li>The method checks if the Host header matches trusted domains.</li><li>This check can be tricked by crafting an HTTP request with a Host header set to a trusted domain.</li></ul><h4>Exploitation Technique</h4><p>An attacker can exploit this vulnerability by:</p><ol><li><strong>Identifying the Origin IP:</strong> Using tools to find the server’s origin IP address.</li><li><strong>Crafting a Malicious Request:</strong> Sending an HTTP request with a Host header set to a trusted domain.</li><li><strong>Accessing Clockwork Endpoint:</strong> Gaining access to sensitive debugging information.</li></ol><p><strong>Example Testing Using </strong><strong>curl:</strong></p><pre>curl http://ip/__clockwork/latest -H &quot;Host: 127.0.0.1&quot;</pre><ul><li><strong>Explanation:</strong> The Host header is set to 127.0.0.1, tricking the server into enabling Clockwork and granting access to debugging information.</li></ul><h3>Case Study: Testing Patchstack’s Staging Environment</h3><h4>Discovery of Patchstack’s Staging Environment</h4><p>While exploring Patchstack’s infrastructure, I noticed something interesting. The production VDP API was sending a specific header in all responses, which hinted at other environments. Using this clue, I crafted a query to identify these environments:</p><pre>services.http.response.headers: (key: `Access-Control-Allow-Origin` and value.headers: &quot;*patchstack.com&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wswx-GkrB6YcWIfApPTOIA.png" /></figure><p>This query led me to discover several environments, including a staging environment that became the focus of my investigation.</p><h4>Scanning Patchstack Infrastructure</h4><p>Using a tool called ffuf, I scanned the identified infrastructure for the Clockwork endpoint. This scan helped me pinpoint where the vulnerability could be exploited.</p><pre>ffuf -w ips.txt:IP -u http://IP/__clockwork/latest -H &quot;Host: 127.0.0.1&quot; -mc 200</pre><h4>Analyzing the VDP API</h4><p>The staging environment had three critical endpoints that were particularly interesting:</p><ol><li><strong>/magic-link:</strong> Sends a unique token to a user&#39;s email for login.</li><li><strong>/login:</strong> Creates a session using the token from /magic-link.</li><li><strong>/researchers:</strong> Returns a list of researchers without requiring authentication.</li></ol><p><strong>Step 1: Retrieving Researcher Emails<br></strong>By accessing the /researchers endpoint, I obtained a list of researchers and their email addresses. This information was crucial for understanding the potential attack surface.</p><p><strong>Step 2: Sending a Magic Link<br></strong>Using the /magic-link endpoint, I demonstrated how an attacker could send a magic link to an admin&#39;s email. This link contains a unique token for logging in.</p><p><strong>Step 3: Extracting the Token from Clockwork Logs<br></strong>Since Clockwork logs all requests and responses, I showed how an attacker could access these logs to retrieve the token sent to the admin’s email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nXRY63Z4AassW3-PbbDfvw.png" /></figure><p><strong>Step 4: Logging in Using the Token<br></strong>With the token in hand, I illustrated how an attacker could use the /login endpoint to create a session for the admin account, effectively hijacking the session.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HL-CUN7M9Ist5NCeIZqalQ.png" /></figure><p><strong>Step 5: Demonstrating Access to Laravel Telescope<br></strong>With the admin session hijacked, I demonstrated access to Laravel Telescope, a powerful debugging tool. This tool provides detailed insights into the application’s runtime, including request data, database queries, log entries, queued jobs, and rendered views.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zjd4PqC8RqeJArB6tgo5yg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f68ddb5ec48c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RIP Cloudflare: Bypass IP Whitelisting Restrictions]]></title>
            <link>https://0vulns.medium.com/rip-cloudflare-bypass-ip-whitelisting-restrictions-bce6e3a5fa91?source=rss-b0dfe0d66373------2</link>
            <guid isPermaLink="false">https://medium.com/p/bce6e3a5fa91</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[cloudflare]]></category>
            <dc:creator><![CDATA[0vulns ]]></dc:creator>
            <pubDate>Sat, 18 Jan 2025 22:08:17 GMT</pubDate>
            <atom:updated>2025-01-18T22:08:17.538Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to the <strong>“RIP Cloudflare”</strong> series, where we poke holes in Cloudflare’s shiny armor and dig up the origin IPs it’s hiding like buried treasure. Businesses and devs love to slap Cloudflare on their sites like it’s a “Keep Out” sign, forgetting that their backend might still be held together with duct tape. In this series, I’ll show you how to sneak past Cloudflare’s bouncers and crash the origin server’s party. Let’s see what’s really going on behind the curtain!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2KnEkcbFppCu2GK_x5nvNQ.png" /></figure><p>In this part, we’ll discuss a common scenario: you’ve discovered the origin IP address, but you’re met with a <strong>403 Forbidden</strong> error or find that the port is closed. This typically happens because the server is configured to only allow traffic from Cloudflare’s IP ranges, blocking all other connections. This restriction is often enforced using tools like <strong>iptables</strong>, <strong>nginx configurations</strong>, or <strong>.htaccess</strong> files.</p><p>For example, here’s a typical nginx configuration that restricts access to Cloudflare IPs only:</p><pre># /etc/nginx/conf.d/cloudflare-only.conf<br><br># Cloudflare IP ranges (IPv4 and IPv6)<br>allow 173.245.48.0/20;<br>allow 103.21.244.0/22;<br>allow 103.22.200.0/22;<br>allow 103.31.4.0/22;<br>allow 141.101.64.0/18;<br>allow 108.162.192.0/18;<br>allow 190.93.240.0/20;<br>allow 188.114.96.0/20;<br>allow 197.234.240.0/22;<br>allow 198.41.128.0/17;<br>allow 162.158.0.0/15;<br>allow 104.16.0.0/13;<br>allow 104.24.0.0/14;<br>allow 172.64.0.0/13;<br>allow 131.0.72.0/22;<br>allow 2400:cb00::/32;<br>allow 2606:4700::/32;<br>allow 2803:f800::/32;<br>allow 2405:b500::/32;<br>allow 2405:8100::/32;<br>allow 2a06:98c0::/29;<br>allow 2c0f:f248::/32;<br><br># Deny all other IPs<br>deny all;</pre><p>When faced with this restriction, there are a couple of methods to bypass it. Let’s explore two effective techniques.</p><h4>Method 1: Using Cloudflare Workers:</h4><p>Cloudflare Workers is a serverless execution environment that allows you to run code on Cloudflare’s global network. Since Workers operate within Cloudflare’s infrastructure, they can be used to bypass IP whitelisting restrictions.</p><p>Here’s how you can use a Cloudflare Worker as a reverse proxy:</p><ol><li>Go to the <a href="https://workers.cloudflare.com/playground">Cloudflare Workers Playground</a>.</li><li>Use the following code to create a reverse proxy:</li></ol><pre>export default {<br>  async fetch(request, env, ctx) {<br>    const targetUrl = &quot;https://rip.cloudflare&quot;;<br><br>    try {<br>      // Clone the incoming request to forward it to the target URL<br>      const forwardedRequest = new Request(targetUrl, {<br>        method: request.method,<br>        headers: new Headers([...request.headers].filter(([key]) =&gt; key.toLowerCase() !== &quot;host&quot;)),<br>        body: request.method !== &quot;GET&quot; &amp;&amp; request.method !== &quot;HEAD&quot; ? request.body : null,<br>      });<br><br>      // Forward the request to the target server<br>      const response = await fetch(forwardedRequest);<br><br>      // Clone the response to return it to the client<br>      const responseHeaders = new Headers(response.headers);<br>      const responseBody = await response.text();<br><br>      return new Response(responseBody, {<br>        status: response.status,<br>        headers: responseHeaders,<br>      });<br>    } catch (error) {<br>      console.error(&quot;Error during reverse proxying:&quot;, error);<br>      return new Response(&quot;Internal Server Error&quot;, { status: 500 });<br>    }<br>  },<br>};</pre><p>3. Click <strong>Go</strong> to execute the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HS3ZmzamMNyiFu0aCjCMVA.png" /><figcaption>Bypassed :p</figcaption></figure><p>This Worker acts as a middleman, forwarding your requests through Cloudflare’s network, effectively bypassing the IP whitelisting restrictions.</p><h4>Method 2: Adding a DNS Record in Cloudflare Dashboard</h4><p>Another straightforward method is to add a new DNS record in your Cloudflare dashboard. Here’s how:</p><ol><li>Log in to your Cloudflare dashboard.</li><li>Add a new <strong>A record</strong> with the origin IP address.</li><li>Enable the <strong>Proxy</strong> option (orange cloud icon).</li><li>Save the changes.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DIfLS7GMdjx6PG0nh6wAxQ.png" /></figure><p>Once the DNS record is active, you can access the origin server through the new domain, effectively bypassing the IP whitelisting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U3eaWQiVMc4eEDBz4V59nA.png" /><figcaption>Bypassed :p</figcaption></figure><p>While Cloudflare provides robust security features, it’s not foolproof. By leveraging tools like Cloudflare Workers or manipulating DNS settings, you can bypass IP whitelisting restrictions and access the origin server. However, it’s important to note that these techniques should only be used for ethical purposes, such as penetration testing or security research.</p><p>Stay tuned for the next part in the “RIP Cloudflare” series, where we’ll explore more advanced techniques to uncover and bypass Cloudflare’s defenses.</p><p><strong>Happy Hacking!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bce6e3a5fa91" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bypassing KonyLab Code Protection: Hooking vs. Memory Dumping with Frida]]></title>
            <link>https://0vulns.medium.com/bypassing-konylab-code-protection-hooking-vs-memory-dumping-with-frida-9e15b6bc05b3?source=rss-b0dfe0d66373------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e15b6bc05b3</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[mobile-security]]></category>
            <dc:creator><![CDATA[0vulns ]]></dc:creator>
            <pubDate>Fri, 03 Jan 2025 20:18:36 GMT</pubDate>
            <atom:updated>2025-01-03T20:56:11.616Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cT9ibKg6BCJ3g6rL5r_xIA.png" /></figure><p>In the realm of mobile application security, reverse engineering and bypassing code protection mechanisms are essential skills. Kony Visualizer, a popular cross-platform development framework, employs several techniques to protect its JavaScript code from being easily reverse-engineered. In this blog, we’ll explore two methods to bypass KonyLab’s code protection: <strong>hooking the </strong><strong>loadFilesToVM function</strong> and <strong>memory dumping using Frida</strong>. Both methods have their strengths and limitations, and we’ll dive into the technical details of each approach. This blog builds on the work of Mahmoud Mosbah, who documented his journey in bypassing KonyLab’s protection via hooking the loadFilesToVM function. However, in my case, the hooking method didn’t work, so I turned to memory dumping as an alternative.</p><h3>Understanding KonyLab Code Protection</h3><p>Kony Visualizer is a powerful IDE that allows developers to create cross-platform mobile applications using a single codebase. One of its key features is the ability to package JavaScript code into the app, which is then loaded at runtime. To protect this code, Kony employs encryption and compression techniques, making it challenging to reverse engineer.</p><h3>How Kony Works</h3><ul><li><strong>Code Packaging:</strong> JavaScript files are compressed into a ZIP file and encrypted.</li><li><strong>Runtime Execution:</strong> The encrypted files are decrypted and decompressed at runtime by the libkonyjsvm.so library.</li><li><strong>Protection Mechanisms:</strong> Kony uses AES encryption and LZF compression to obfuscate the JavaScript code.</li></ul><p>Mahmoud Mosbah’s <a href="https://medium.com/@xmosb7/how-bypassed-konylab-code-protection-cac53da01ad1">blog post</a> details how he bypassed this protection by hooking the loadFilesToVM function using Frida. However, in my case, this approach didn’t yield the desired results, so I had to explore an alternative method: memory dumping.</p><h3>Method 1: Hooking the loadFilesToVM Function</h3><p>Mahmoud Mosbah’s approach involved hooking the loadFilesToVM function, which is responsible for loading and decrypting the JavaScript files at runtime. Here’s a summary of his method:</p><h3>Step-by-Step Guide to Hooking loadFilesToVM</h3><ol><li><strong>Identify the Target Function:</strong> The loadFilesToVM function in libkonyjsvm.so is responsible for decrypting and loading the JavaScript files.</li><li><strong>Hook the Function Using Frida:</strong> Use Frida to hook the loadFilesToVM function and intercept the decrypted files.</li><li><strong>Save the Decrypted Files:</strong> Once the files are intercepted, save them to disk for further analysis.</li></ol><p>Here’s the Frida script used by Mahmoud to hook the loadFilesToVM function:</p><pre>Java.perform(() =&gt; {<br>    var inc = 0;<br>    <br>    function waitForLibrary(name, callback) {<br>        var lib = null;<br>        var interval = setInterval(() =&gt; {<br>            try {<br>                lib = Module.ensureInitialized(name);<br>                console.log(`[+] ${name} is loaded`);<br>                clearInterval(interval);<br>                callback();<br>            } catch (e) {<br>                console.log(`[+] Waiting for ${name} to be loaded...`);<br>            }<br>        }, 100);  // Check every 100ms<br>    }<br>    waitForLibrary(&quot;libkonyjsvm.so&quot;, () =&gt; {<br>        Interceptor.attach(Module.getExportByName(&quot;libkonyjsvm.so&quot;, &quot;lzf&quot;), {<br>            onEnter: function(args) {<br>                console.log(&quot;[+] Hooked zip files!&quot;);<br>                this.zipfiles = args[2];<br>                this.ziplength = args[3];<br>            },<br>            onLeave: function(retval) {<br>                send(&quot;================&quot;);<br>                console.log(&quot;zip files length&quot;, this.ziplength);<br>                var readzipfiles = Memory.readByteArray(this.zipfiles, this.ziplength.toInt32());<br>                var file = new File(&quot;/data/data/com.victim.app/&quot; + inc + &quot;.zip&quot;, &quot;w&quot;);<br>                inc += 1;<br>                file.write(readzipfiles);<br>            }<br>        });<br>    });<br>});</pre><h3>Challenges with Hooking</h3><p>While this method worked for Mahmoud, it didn’t work in my case. Possible reasons include:</p><ul><li><strong>Function Changes:</strong> The loadFilesToVM function might have been modified or obfuscated in newer versions of Kony.</li><li><strong>Timing Issues:</strong> The decrypted files might only exist in memory for a short period, making it difficult to intercept them via hooking.</li></ul><h3>Method 2: Memory Dumping with Frida</h3><p>When hooking the loadFilesToVM function didn’t work, I turned to memory dumping as a way to extract the decrypted JavaScript files directly from the app’s memory. This method involves using Frida to dump the memory of the running process and then searching for the decrypted code.</p><h3>Step-by-Step Guide to Memory Dumping</h3><ol><li><strong>Set Up Frida:</strong> Install Frida on your system and the target device.</li><li><strong>Identify the Target Process:</strong> Use Frida to identify the process you want to dump.</li><li><strong>Dump Memory with Fridump:</strong> Use Fridump to dump the memory of the target process.</li><li><strong>Analyze the Dumped Memory:</strong> Search for decrypted JavaScript files in the dumped memory.</li></ol><p>Here’s how to use Fridump to dump the memory of a Kony app:</p><pre># Clone the Fridump repository<br>git clone https://github.com/Nightbringer21/fridump.git<br>​<br># Run Fridump on the target process<br>python fridump.py -U com.victim.app -o dump</pre><h3>Analyzing the Dumped Memory</h3><p>Once the memory is dumped, search for patterns such as eval( or function( to identify the JavaScript code. You can use tools like strings or grep to search through the dumped files:</p><pre>strings dump/* | grep &quot;function(&quot;</pre><h3>Advantages of Memory Dumping</h3><ul><li><strong>Direct Access:</strong> Memory dumping allows you to access the decrypted code directly from the app’s runtime memory.</li><li><strong>Bypass Hooking Limitations:</strong> If hooking specific functions fails, memory dumping provides an alternative way to extract the code.</li><li><strong>Comprehensive Extraction:</strong> This method can capture all decrypted files, including those that might not be accessible via hooking.</li></ul><h3>Comparing the Two Methods</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/55aa2b234459d0f105a440ba1d9bd6f0/href">https://medium.com/media/55aa2b234459d0f105a440ba1d9bd6f0/href</a></iframe><h3>Conclusion</h3><p>Bypassing KonyLab’s code protection mechanisms is a challenging but rewarding task. While hooking the loadFilesToVM function is a common approach, it doesn’t always work, as I discovered. In such cases, memory dumping with Frida provides a viable alternative. By dumping the app’s memory and analyzing it, you can extract the decrypted JavaScript code and uncover hidden secrets.</p><p>Both methods have their strengths and limitations, and the choice between them depends on the specific scenario. If hooking works, it’s a more efficient and precise method. However, if hooking fails, memory dumping can serve as a reliable fallback.</p><p>This blog builds on the foundational work of Mahmoud Mosbah and others in the security community. If you’re interested in learning more, I highly recommend checking out Mahmoud’s <a href="https://medium.com/@xmosb7/how-bypassed-konylab-code-protection-cac53da01ad1">blog post</a> for additional insights.</p><h3>References</h3><ol><li>Mahmoud Mosbah, <a href="https://medium.com/@xmosb7/how-bypassed-konylab-code-protection-cac53da01ad1">How Bypassed KonyLab Code Protection</a></li><li>Frida Documentation, <a href="https://frida.re/docs/">https://frida.re/docs/</a></li><li>Fridump GitHub Repository, <a href="https://github.com/Nightbringer21/fridump">https://github.com/Nightbringer21/fridump</a></li></ol><p>By combining these techniques, you can effectively bypass KonyLab’s code protection and gain access to the underlying JavaScript code. Whether you’re a security researcher or a developer, understanding these methods is crucial for securing mobile applications in today’s threat landscape.</p><p><strong>Happy hacking!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e15b6bc05b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[$500 Bounty for Account Takeover on European Bug Bounty Platform]]></title>
            <link>https://0vulns.medium.com/500-bounty-for-account-takeover-on-european-bug-bounty-platform-cd5af3edb1ec?source=rss-b0dfe0d66373------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd5af3edb1ec</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[0vulns ]]></dc:creator>
            <pubDate>Fri, 15 Nov 2024 03:05:11 GMT</pubDate>
            <atom:updated>2024-11-15T06:38:05.130Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*VCFeOgL2rS5CEGHLAMTbBA.gif" /></figure><h3>TL;DR</h3><p>A critical vulnerability in the password reset functionality of a popular European bug bounty platform allowed attackers to perform an account takeover by submitting an empty reset code. This flaw could lead to full site compromise, including data breaches and privilege escalation. After further investigation and an appeal to the platform, I was awarded a <strong>$500 bounty</strong> for the finding, despite the platform’s decision not to reassess the severity.</p><h4>Background:</h4><p>Bug bounty platforms are essential for uncovering vulnerabilities in the digital ecosystem. They allow ethical hackers to report security flaws, helping organizations patch vulnerabilities before malicious actors can exploit them. In this particular case, I discovered a vulnerability on a European bug bounty platform that could lead to severe consequences, including unauthorized account access and full site compromise.</p><h4>Vulnerability Details:</h4><p>I discovered a flaw in the password reset functionality of a platform’s plugin that allows attackers to bypass the reset code validation. Here’s a breakdown of the issue:</p><ol><li><strong>Attacker initiates password reset:</strong> The attacker visits the password reset page and submits their own email address.</li><li><strong>Reset link is sent:</strong> The platform sends a password reset link to the attacker’s email address.</li><li><strong>Attacker visits the reset link:</strong> The attacker clicks on the reset link to navigate to the password change page.</li><li><strong>Attacker intercepts the request:</strong> The attacker modifies the reset password request, setting the user body parameter to the victim&#39;s username and leaving the code body parameter empty (e.g., code=).</li><li><strong>Account takeover:</strong> Since the platform doesn’t properly validate the reset code, the attacker can set a new password for the target user’s account, successfully taking control.</li></ol><h4><strong>Technical Details and PoC:</strong></h4><p>To discover and confirm this vulnerability, I did a bit of unconventional research. I was able to locate the platform’s plugin/theme source code online (LOL). I downloaded and set up a testing lab on my local machine by installing the plugin and thoroughly reviewing the source code. My findings, which I believe warrant a <strong>CVE</strong>, are detailed below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GnAMpo0qB9FoqWKqpchtkw.png" /><figcaption>Proof of Concept (PoC)</figcaption></figure><p><strong>Key Findings:</strong></p><ul><li>The vulnerability occurs because the platform fails to properly validate the reset code, allowing attackers to bypass the password reset process and set a new password for any user.</li><li>The request can be intercepted and manipulated, with an empty reset code (code=) used to successfully reset the victim&#39;s password.</li></ul><h4><strong>Source Code Analysis:</strong></h4><p>Upon reviewing the source code, I discovered the following vulnerability in the plugin responsible for handling password resets. Specifically, the code for resetting passwords does not properly handle empty or invalid reset codes. The vulnerable code snippet is:</p><pre><br>static function can_reset_password($user_name, $code) {<br>    $current_user = wp_get_current_user();<br>    $user = get_user_by(&#39;login&#39;, $user_name);<br>    if ($user &amp;&amp; (!$current_user-&gt;ID || $current_user-&gt;user_login == $user_name)) {<br>        $reset_code = get_user_meta($user-&gt;ID, &#39;resetpass_code&#39;, true); // vulnerable line<br>        if ($reset_code === $code) {<br>            return true;<br>        }<br>    }<br><br>    return false;<br>}</pre><p>The code doesn’t validate that the reset code isn’t empty, which allows the attacker to bypass the reset process by simply submitting an empty code.</p><h4><strong>Impact:</strong></h4><p>This vulnerability could have serious consequences if exploited:</p><ul><li><strong>Data breaches:</strong> Attackers could gain access to private user data such as usernames, emails, and passwords, or even sensitive content.</li><li><strong>Privilege escalation:</strong> Attackers gaining access to user accounts may escalate privileges, leading to administrative access.</li><li><strong>Full site compromise:</strong> If an attacker compromises an admin account, they could upload malicious scripts or shells, disable security plugins, and create backdoors for persistent access.</li><li><strong>Financial loss:</strong> Compromised accounts could be used for unauthorized transactions or data theft.</li><li><strong>Reputation damage:</strong> Such a vulnerability erodes trust, and users may lose confidence in the platform’s ability to protect their information.</li><li><strong>Legal ramifications:</strong> Data protection regulations may be violated if user data is exposed due to this flaw.</li></ul><h4>Fix and Recommendations:</h4><p>To address this vulnerability, I recommend the following actions:</p><ul><li><strong>Improve reset code validation:</strong> Ensure that the reset code is not empty or null before allowing any password reset action.</li><li><strong>Implement additional security layers:</strong> Consider introducing two-factor authentication (2FA) for an added layer of protection during sensitive operations such as password resets.</li></ul><h4>Platform’s Response to My Appeal:</h4><p>After submitting the vulnerability and appealing for a higher severity rating, the platform’s team responded as follows:</p><blockquote>Hi!<br>Sorry for the late response. The vulnerability is still being considered as High, you can read in the program’s scope that under High severity are Vulnerable authentication and Privilege escalation which is the exact scenario you have described before.<br>Please let us know your PayPal account so we can proceed with the payment.<br>Thanks!</blockquote><p>Despite my request for a reassessment, the platform did not revise the severity of the vulnerability, keeping it classified as “High” rather than “Critical.” Nonetheless, they acknowledged the validity of the finding and awarded me a <strong>$500 bounty</strong> for my discovery.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd5af3edb1ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>