<?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"><channel><title><![CDATA[Waqas Zaka]]></title><description><![CDATA[Behind the Exploits]]></description><link>https://waqaszaka.me</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Apr 2026 18:46:06 GMT</lastBuildDate><atom:link href="https://waqaszaka.me/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Full Account Takeover Leading to RCE Remote Code Execution]]></title><description><![CDATA[Introduction
Hey fellow hackers,My name is Waqas, and I am currently working as a cybersecurity enthusiast, Last year, my friend Zeeshan M. and I worked on a project called redacted. The company is a service-based company where we had to test their d...]]></description><link>https://waqaszaka.me/account-takeover-via-reset-password-functionality</link><guid isPermaLink="true">https://waqaszaka.me/account-takeover-via-reset-password-functionality</guid><category><![CDATA[Authentication Bypass]]></category><category><![CDATA[Remote Code Execution]]></category><category><![CDATA[pentesting]]></category><dc:creator><![CDATA[Waqas Zaka]]></dc:creator><pubDate>Wed, 23 Apr 2025 13:44:13 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1748185304797/2b3a7660-8615-4001-afee-b5d97f17f117.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-introduction">Introduction</h3>
<p>Hey fellow hackers,<br />My name is Waqas, and I am currently working as a cybersecurity enthusiast, Last year, my friend <a target="_blank" href="https://www.linkedin.com/in/zeeshanm0x0/">Zeeshan M.</a> and I worked on a project called redacted. The company is a service-based company where we had to test their domains, subdomains, and acquisitions, which were included within the scope..</p>
<h3 id="heading-scope">Scope:</h3>
<p>The scope is an <strong>External Blackbox</strong>, where we are able to pull multiple domains and subdomains using <strong>Google dorks</strong> and <strong>Crunchbase</strong>.</p>
<h3 id="heading-interesting-functionality">Interesting Functionality</h3>
<p>One of the functionalities I found particularly interesting was the <strong>Single Sign-On (SSO) across subdomains</strong>, also known as <strong>Shared Cookie Authentication</strong>. This means that once a user logs in on one subdomain, the session remains valid across all other subdomains. This is achieved by setting a shared authentication cookie for the main domain.</p>
<h3 id="heading-full-account-takeover-via-reset-password-functionality">Full Account Takeover via Reset Password Functionality</h3>
<p>During the assessment, we stumbled upon a subdomain, for example: <a target="_blank" href="http://wv.target.com"><code>v.target.com</code></a></p>
<p>The target I mentioned above, e.g., <a target="_blank" href="http://wv.target.com">v.target.com</a>, has two major functionalities: Login/Single Sign-On and Forget Password functionality.</p>
<p>Well in the start I was looking for the SQL injection on their login pages and Forget password functionality. However, during the first two days, I wasn’t able to identify any interesting vulnerabilities. I always focus on finding vulnerabilities that can be chained together to achieve a critical impact.</p>
<p>The interesting part about the Forgot Password functionality was that it required a valid username. If the username had security features enabled, the user was given two options: either to receive a password reset link or to proceed with answering security questions</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748177261655/98b25510-e6a6-43cf-8d6c-697d2d40e2e2.png" alt class="image--center mx-auto" /></p>
<p>By guessing common usernames, I was able to identify valid ones in most cases. Usernames like <code>admin</code>, <code>support</code>, and <code>root</code> were found to be working, The username we identified as <code>support</code> is now blurred because, on the second day, that account was deactivated</p>
<p>Now clicking on continue button it lead to page where we have two options</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748177222880/1b409efa-9195-48f0-bdad-86498d53d8f0.png" alt class="image--center mx-auto" /></p>
<p>At that point, I attempted an SQL injection, but it was unsuccessful.</p>
<p>we captured the following <strong>POST request</strong> that is sent when verifying security questions:</p>
<pre><code class="lang-plaintext">POST /Login/********/VerifySecurityQuestions HTTP/1.1
Host: v.redacted.com
Cookie: ai_user=...; ASP.NET_SessionId=...; TS0179559a=...; &lt;other session tokens&gt;
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0
Content-Type: application/json; charset=utf-8
X-Requested-With: XMLHttpRequest
Referer: https://v.redacted.com/login/********/ForgotPassword
Origin: https://v.redacted.com
Connection: keep-alive

{
  "Questions": "1,445:3,4545:2,5454:",
  "UName": "support"
}
</code></pre>
<p>Let's first understand the JSON format. For the first answer, the value will be <code>445</code>; for the third question, it will be <code>44545</code>; and for the second security question, the value is <code>5454</code></p>
<p>Now, after every colon (<code>:</code>) symbol, I tried SQL Injection again, but it was still unsuccessful.</p>
<p>Now, after removing the data for the question, the JSON format looks like this:</p>
<pre><code class="lang-plaintext">{
  "Questions": "",
  "UName": "support"
}
</code></pre>
<p>When i forward the request, It redirected me to a page where I was given the option to reset the password.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748177108322/b15eef3c-f48a-4184-920d-7b8c400def55.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748177013768/d1f976f7-5542-4e35-92c0-b364a5223897.png" alt class="image--center mx-auto" /></p>
<p>Now i quickly reset the password and got the notification</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748176951509/d337fcf3-03b2-4828-99b3-ec163328854c.png" alt class="image--center mx-auto" /></p>
<p>After that i quickly login and it redirected me the dashboard</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748177178960/805202ca-e080-447c-9fe5-59d82905dbf1.png" alt class="image--center mx-auto" /></p>
<p>As mentioned earlier in the blog post, Single Sign-On (SSO) across subdomains was enabled, which allowed me to gain access to other subdomains as well, such as <a target="_blank" href="http://qre.redacted.com"><code>q.redacted.com</code></a> and <a target="_blank" href="http://identity.redacted.com"><code>identity.redacted.com</code></a>. Interestingly, I was also able to take over their Zendesk account. From there, I conducted further enumeration and was able to find credentials belonging to their employees. We had very limited time, so unfortunately, I missed taking a screenshot.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748176751434/c471df75-08c8-4869-94a8-e5c8b6669520.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-remote-code-execution-rce">Remote Code Execution (RCE)</h3>
<p>On that day, I shared the above vulnerability with <a target="_blank" href="https://www.linkedin.com/in/zeeshanm0x0/">Zeeshan M</a>. The next day, I took a day off from the office, and when I woke up, I received a message: "Hey buddy, got the RCE as well—we can take over the other domains too." Zeeshan also managed to take over the <strong>SMTP server</strong> as well.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748175788151/2f2fe758-d679-41a4-9d1e-e31968fbe0bf.png" alt class="image--center mx-auto" /></p>
<p>Zeeshan then logged in using the <code>support</code> account on <a target="_blank" href="http://login.redacted.com"><code>login.redacted.com</code></a>. During further enumeration, he discovered a subdomain when he clicked on <strong>Quality Rule Engine</strong>. It opened in a new tab with the subdomain name <a target="_blank" href="http://qre.redacted.com"><code>q.redacted.com</code></a>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748175684586/0c3c7bb7-a67a-42b5-b7b3-2ca8ae207d13.png" alt class="image--center mx-auto" /></p>
<p>When we clicked on the <strong>Add Measure</strong> functionality, we were presented with a file upload option along with multiple input parameters.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748175650144/c6e53703-0ad0-4957-b577-a58b952a26f8.png" alt class="image--center mx-auto" /></p>
<p>As we knew the backend was ASPX, we uploaded an ASPX shell, and in the response, we received the full path to the shell.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748175611044/0310c6e0-d530-42fd-a16b-fe2a11cca4fd.png" alt class="image--center mx-auto" /></p>
<p>Through further enumeration, we discovered that impersonation was enabled. However, we were restricted from performing any further exploitation.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748175565122/71a6e14c-47b0-4525-ad15-5505b82d25f1.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748175520634/b34ff155-b433-41f6-9f20-92f66c260888.png" alt class="image--center mx-auto" /></p>
<p>As shown in the image above, virtual hosting is enabled, and we could potentially take over other domains. However, we were restricted and limited by time. Somehow, I was later able to find different subdomains with the same code functionality, where I also discovered remote code execution vulnerabilities.</p>
<h2 id="heading-key-points">Key points</h2>
<h3 id="heading-understand-the-flow-of-the-application">Understand the Flow of the Application</h3>
<ul>
<li>Analyze how the application functions and how different components interact.</li>
</ul>
<h3 id="heading-look-for-vulnerabilities-that-can-be-chained">Look for Vulnerabilities That Can Be Chained</h3>
<ul>
<li><p>Focus on identifying bug classes that can be chained together.</p>
</li>
<li><p>For example, a <strong>SQL Injection</strong> vulnerability—depending on the context—could potentially be escalated and chained to achieve <strong>Remote Code Execution (RCE)</strong>.</p>
</li>
</ul>
<h3 id="heading-final-thoughts">Final Thoughts</h3>
<p>Pen testing isn't just about running tools or guessing payloads—it's about <strong>understanding the application inside out</strong>.<br />By taking the time to analyze how components interact and focusing on vulnerabilities that can be chained, you're more likely to uncover critical issues that automated scans might miss.</p>
<p>✅ Don’t just <strong>pray and spray</strong>—be strategic.<br />✅ Understand the flow, identify chaining opportunities, and <strong>think like an attacker with a plan</strong>.</p>
<p>Remember:<br /><strong><em>Rome wasn’t built in a day.</em></strong><br />Deep understanding, persistence, and context-driven testing are what truly lead to impactful findings.</p>
]]></content:encoded></item></channel></rss>