<?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 ShiftLeftSec on Medium]]></title>
        <description><![CDATA[Stories by ShiftLeftSec on Medium]]></description>
        <link>https://medium.com/@WillWorkForMe?source=rss-97e9aabbcbf7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*5TsNRwotjIqeiaHm</url>
            <title>Stories by ShiftLeftSec on Medium</title>
            <link>https://medium.com/@WillWorkForMe?source=rss-97e9aabbcbf7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 09:54:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@WillWorkForMe/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[Cross Site Request Forgery — labs]]></title>
            <link>https://medium.com/@WillWorkForMe/cross-site-request-forgery-658cf49bbbec?source=rss-97e9aabbcbf7------2</link>
            <guid isPermaLink="false">https://medium.com/p/658cf49bbbec</guid>
            <category><![CDATA[csrf]]></category>
            <category><![CDATA[burpsuite]]></category>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[appsec]]></category>
            <category><![CDATA[crosssiterequestforgery]]></category>
            <dc:creator><![CDATA[ShiftLeftSec]]></dc:creator>
            <pubDate>Tue, 13 Jan 2026 16:36:28 GMT</pubDate>
            <atom:updated>2026-01-14T09:26:28.550Z</atom:updated>
            <content:encoded><![CDATA[<p>The Portswigger labs</p><p><strong>Portswigger CSRF — lab 1 — CSRF with no defences</strong></p><p>This was really just to get people used to using the Burp CSRF exploit form</p><p>Log into the application using the provided details and with the site proxied, change the email address</p><p>In Burp, find the updateEmail request and right click it and generate the exploit form</p><p>Copy and paste the html content produced into the Burp exploit server at the top of the lab and submit it to solve the lab</p><p><strong>Portswigger CSRF — lab 2 — Where token request depends on request method</strong></p><p>I won’t spend long on this- do the same as above, except in the exploit server, change the request to GET, only POST requests are validated for the CSRF token in this lab</p><p><strong>Portswigger CSRF — lab 3 — Where token validation depends on token being present</strong></p><p>This was a really easy lab — when you know how, the idea is to bypass the CSRF token which prevents CSRF from being allowed on the update email form so that an attacker can maliciously change the email address</p><p>I tested out the update email functionality while proxied and captured the POST request:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_3wcq2FeZ0ZJDCsxw-TFCg.png" /></figure><p>Next right click that request and generate a CSRF POC and copy the code it produces</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*9KvKkBDtWKmZ0Mdu95kubg.png" /></figure><p>Copy and paste that code into the exploit server Burp provide for the lab:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t9krq5WnaeOkiv-W4kZMEA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BOHxZxNmyeX2RYQvTVCOaA.png" /></figure><p>(Make sure the email address is unique and not already used)</p><p>Finally, remove the CSRF value from the exploit completely — this line:</p><pre>&lt;input type=&quot;hidden&quot; name=&quot;csrf&quot; value=&quot;USsRf5hc5L2toFWFy7H1d6IjGaNkS8ba&quot; /&gt;</pre><p>Then deliver the exploit to solve the lab</p><p><strong>Portswigger CSRF — lab 4 — CSRFF token not tied to user</strong></p><p>For this lab, there are two users, one is yours (the attacker) the other is the person whose email you need to change</p><p>The idea is to use your valid CSRF token to place in the exploit in place of the users token that has expired</p><p>First off, log in as the user and change their email address and generate the exploit, copy and paste that onto the exploit server Burp provide</p><p>Now log in as the other user (I don’t think it matters which user you use for which role) and view the source of the update email form to get the fresh CSRF token (search for it with CTRL +F)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*_OsdyAP6EE6mvlngaF9BZw.png" /></figure><p>Copy and paste this token into the exploit on the server and deliver the exploit to solve the lab</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yuT5UV7kLVgSE_peOD6Tfg.png" /></figure><p><strong>Portswigger CSRF — lab 5 — CSRF where token is tied to a non-session cookie</strong></p><p>This lab has a couple of moving parts that a short write up won’t do justice too — but this youtube video explains it much better than I could so watch this:<br><a href="https://youtu.be/p8DZL0xTgyE">https://youtu.be/p8DZL0xTgyE</a></p><p><strong>Portswigger CSRF — lab 6 — CSRF where token validation depends on token being present — will be added soon</strong></p><p><strong>Portswigger CSRF — lab 7 — CSRF where token duplicated in cookie</strong></p><p>Another one where its worth following the community lab solution Burp show on their site:<br><a href="https://youtu.be/Hqr0qkvP6rY">https://youtu.be/Hqr0qkvP6rY</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=658cf49bbbec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cross Site Request Forgery (CSRF)]]></title>
            <link>https://medium.com/@WillWorkForMe/cross-site-request-forgery-csrf-f51dd5444880?source=rss-97e9aabbcbf7------2</link>
            <guid isPermaLink="false">https://medium.com/p/f51dd5444880</guid>
            <category><![CDATA[appsec]]></category>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[csrf]]></category>
            <category><![CDATA[crosssiterequestforgery]]></category>
            <category><![CDATA[burpsuite]]></category>
            <dc:creator><![CDATA[ShiftLeftSec]]></dc:creator>
            <pubDate>Tue, 13 Jan 2026 16:34:18 GMT</pubDate>
            <atom:updated>2026-01-13T16:34:18.416Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we’ll break down what CSRF is, how it works, why it’s dangerous, and how modern applications try (and sometimes fail) to defend against it</p><h4>Understanding CSRF - how a Simple Click Can Compromise Your Account</h4><p>CSRF is one of those web vulnerabilities that sounds complex but relies on something surprisingly simple, trust. Specifically, a website’s trust that a request coming from your browser is actually something you intended to do. What can be tricky is building the exploit, see the labs page for a little more on that (when I publish it!)</p><h4>What Is CSRF anyway?</h4><p>CSRF is a web security vulnerability that allows an attacker to trick a user into performing actions they never intended to perform</p><p>CSRF exploits the way browsers automatically include cookies, such as session cookies with requests</p><p>If a user is authenticated to a vulnerable website, an attacker can potentially cause that user’s browser to send malicious requests on their behalf and without their knowledge or consent</p><h4>Why Is CSRF Dangerous?</h4><p>In a successful CSRF attack, the victim performs an action chosen by the attacker but doesn’t realise it. Depending on the application, this action could include:</p><ul><li>Changing an email address</li><li>Updating a password</li><li>Transferring funds</li><li>Modifying account permissions</li></ul><p>If the attacker can change credentials, they may gain full control of the victim’s account. The situation becomes even more serious if the compromised user has administrative or privileged access — at that point, the attacker may gain control over the entire application and its data</p><h4>How Does a CSRF Attack Work?</h4><p>For CSRF to be possible, three key conditions must exist:</p><h4>1. A Relevant Action</h4><p>The application must expose an action that the attacker has a reason to try to abuse like:</p><ul><li>A privileged action (e.g, changing user roles)</li><li>Any action affecting user-specific data (e.g, updating profile details)</li></ul><h4>2. Cookie-Based Session Handling</h4><p>The application relies solely on cookies (such as session cookies) to identify the authenticated user. There are no additional verification mechanisms, like request tokens to confirm that the request was intentional</p><h4>3. No Unpredictable Request Parameters</h4><p>The request does not include parameters that the attacker cannot guess or obtain. For example, if changing a password requires the current password, the attack becomes significantly harder</p><p>When all three conditions are met, CSRF becomes a real threat</p><h3>How CSRF Attacks Are Delivered</h3><p>Typically, an attacker hosts malicious HTML on a website they control and then lures victims into visiting it. This might happen via:</p><ul><li>A link sent through email or social media, embedded in a forum post or comment section</li><li>An advertisement or third-party content</li></ul><p>In some cases, the attacker doesn’t even need an external site. If the vulnerable action can be performed using a GET request, a single malicious URL may be enough</p><p>For example, if changing an email address is possible via GET</p><pre>&lt;img src=&quot;https://vulnerable-website.com/email/change?email=pwned@evil-user.net&quot;&gt;</pre><p>Simply loading this image — without clicking anything — could trigger the action.</p><h4>Common Defenses Against CSRF</h4><p>Modern web applications deploy several defences to mitigate CSRF attacks:</p><h4>CSRF Tokens</h4><p>A CSRF token is a unique, secret, and unpredictable value generated by the server and shared with the client. Any request performing a sensitive action must include this token. If the token is missing or invalid, the request is rejected</p><p>Because attackers cannot predict or read the token, crafting a valid malicious request becomes extremely difficult</p><h4>SameSite Cookies</h4><p>SameSite is a browser feature that restricts when cookies are sent with cross-site requests</p><p>Since authenticated actions usually require session cookies, enforcing appropriate SameSite policies can prevent CSRF attacks altogether. As of 2021, Chrome enforces SameSite = Lax by default, and other browsers are following suit</p><h4>Referer-Based Validation</h4><p>Some applications check the Referer HTTP header to ensure requests originate from the same domain. While helpful, this approach is less reliable than CSRF tokens and can sometimes be bypassed or disabled</p><h4><strong><em>If you have always wondered though, why a user might leave a site logged in to click on a malicious link elsewhere, read on..</em></strong></h4><p>This is actually very normal behaviour — imagine a user logged into bank.com, but sometimes they check email, read news, browse social media, click a link in an email or message etc</p><p>Meanwhile their bank.com session is still active and their browser still has bank.com cookies, being logged in does not mean “I must stay on this site and never open another page”. It only means “The browser has valid cookies for bank.com”</p><p>Cookies are attached to any requests to the bank.com site, but these are based on the destination site, not the source site, which may be malicious</p><p>The browser is simply saying, “I’m sending a request to bank.com..do I have cookies for bank.com?..yes…attach them”</p><p>The browser doesn’t care, where the request originated from, whether it was a link, image, form, script, iframe etc, or whether the user intended that action</p><h4><strong>A CSRF Example</strong></h4><p>Imagine the victim is logged into bank.com, the browser will store a session cookie (sessionid=abc123) and the victim clicks a malicious email link</p><p>Click here to see your invoice<br><a href="https://evil.com/invoice.html">https://evil.com/invoice.html</a></p><p>The user clicks and the page opens in a browser, this malicious page auto-submits a request like the below:</p><p>evil.com/invoice.html might contain:</p><p>&lt;form action=”<a href="https://bank.com/transfer">https://bank.com/transfer</a>&quot; method=”POST”&gt;<br> &lt;input type=”hidden” name=”to” value=”attacker”&gt;<br> &lt;input type=”hidden” name=”amount” value=”1000&quot;&gt;<br>&lt;/form&gt;</p><p>&lt;script&gt;<br> document.forms[0].submit();<br>&lt;/script&gt;</p><p>The browser sends the request and sees the destination: <a href="https://bank.com/">https://bank.com</a> and therefore automatically attaches the cookie (sessionid=abc123), from the bank’s perspective, an authenticated user just made a legitimate transfer, the user never saw the malicous request and the attack succeeds</p><p>Note that the session cookie was never exposed to evil.com, the attacker never stole the cookie, the browser just helpfully included it</p><p>CSRF works because browsers can automatically attach cookies to cross-site requests, and servers trust cookies too much</p><h4>Final Thoughts</h4><p>CSRF is a powerful reminder that authentication alone is not enough. Just because a request comes from an authenticated browser doesn’t mean it was authorised by the user</p><p>When implemented correctly, defences like CSRF tokens and SameSite cookies are highly effective, but misconfigurations in implementation can open the door to serious attacks</p><p>Understanding CSRF isn’t just about security theory. It’s about understanding how users, browsers, and trust really work on the web</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f51dd5444880" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OWASP top 10 2025 — Authentication failures]]></title>
            <link>https://medium.com/@WillWorkForMe/owasp-top-10-2025-authentication-failures-43eca39b24e5?source=rss-97e9aabbcbf7------2</link>
            <guid isPermaLink="false">https://medium.com/p/43eca39b24e5</guid>
            <category><![CDATA[appsec]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[owasp]]></category>
            <category><![CDATA[broken-authentication]]></category>
            <category><![CDATA[owasp-top-10-2025]]></category>
            <dc:creator><![CDATA[ShiftLeftSec]]></dc:creator>
            <pubDate>Mon, 12 Jan 2026 09:01:52 GMT</pubDate>
            <atom:updated>2026-01-12T09:01:52.909Z</atom:updated>
            <content:encoded><![CDATA[<h3>OWASP top 10 2025 — Authentication failures</h3><h3>Why broken login mechanisms still break applications</h3><p>Authentication is the process of verifying the identity of a user or client. and because web applications are exposed to the internet, authentication is one of the most critical security controls. When authentication fails, attackers can gain unauthorised access to user accounts, sensitive data, and even full administrative control</p><h3>Authentication vs Authorisation</h3><p>Authentication asks<br><strong><em> </em></strong><em>“Who are you?”</em><br>Authorisation asks<br><em>“What are you allowed to do?”</em></p><p>An application must first authenticate a user (confirm their identity) before authorisation logic determines what actions or data that user can access</p><h3>Common Causes of Authentication Failures</h3><ul><li>Weak protections against brute-force attacks, allowing attackers to guess credentials at scale</li><li>Logic flaws or poor implementation, enabling attackers to bypass authentication entirely, even small logic errors frequently result in high-impact vulnerabilities</li></ul><h3>Impact of Authentication Failures</h3><ul><li>Attackers can take over user accounts and access all associated data and functionality</li><li>Compromising privileged accounts (e.g., administrators) can lead to full application takeover and access to internal systems</li><li>Even low-privilege accounts can expose sensitive business data or internal application functionality, expanding the attack surface</li></ul><h3>Password-Based Authentication Weaknesses</h3><p>Most applications rely on usernames and passwords as proof of identity, but this model fails when attackers can guess, steal, or reuse credentials</p><h3>Brute-Force Attacks</h3><p>Attackers automate login attempts using word-lists and credential combinations. These attacks become more effective when attackers are able to leverage predictable usernames, weak password policies, or leaked credentials</p><h3>Username Enumeration</h3><p>Applications often leak whether a username exists through</p><ul><li>Different error messages</li><li>Different HTTP status codes</li><li>Measurable response time differences</li></ul><p>Inferences from these can reduce the effort required to brute-force accounts and is a common contributor to authentication issues</p><h3>Flawed Brute-Force Protections</h3><ul><li>Account lockouts can enable denial-of-service attacks or be bypassed by spreading attempts across many accounts</li><li>IP-based rate limiting can be evaded using proxies, distributed attacks, or request manipulation</li><li>Credential stuffing attacks bypass many controls by testing stolen username/password pairs only once per account</li></ul><p>These weaknesses directly map to authentication failures caused by insufficient defence-in-depth</p><h3>Risks in Multi-Factor Authentication (MFA)</h3><p>Multi-factor authentication significantly improves security — but only when implemented correctly — common MFA failures include</p><ul><li>Treating email-based codes as true MFA - they verify the same knowledge factor twice because of <br><em>Password reuse: Users reuse passwords across sites, including email<br>Phishing: Attackers commonly steal both application and email credentials<br>Inbox persistence: Email inboxes store verification codes long-term<br>Email compromise = account takeover</em></li><li>Using SMS-based 2FA, which is vulnerable to interception and SIM swapping</li><li>Allowing users to access authenticated pages before completing all authentication steps</li><li>Failing to bind MFA verification to the correct user session, enabling account takeover</li></ul><p>Brute-forcing short MFA codes (e.g., 4–6 digits) without proper rate limiting is another potential issue</p><h3>Supplementary Authentication Features as Attack Surfaces</h3><p>Authentication failures are not limited to login pages. High-risk areas include</p><ul><li><strong>“Remember me” functionality</strong> using predictable or poorly protected cookies</li><li><strong>Password reset mechanisms</strong> that rely on guessable URLs, long-lived tokens, or insecure email delivery</li><li><strong>Password change endpoints</strong> that fail to properly verify the authenticated user</li></ul><p>These secondary flows are commonly overlooked but frequently exploitable</p><h3>Preventing Authentication Failures</h3><ul><li>Protect credentials<br><em>Enforce HTTPS everywhere (use HSTS) and avoid leaking usernames or emails</em></li><li>Prevent enumeration<br><em>Use identical responses, status codes, and timing for all authentication failures</em></li><li>Implement robust rate limiting<br><em>Combine IP-based limits, CAPTCHAs, and anomaly detection</em></li><li>Audit authentication logic thoroughly<br><em>Authentication checks that can be bypassed are equivalent to no checks</em></li><li>Treat password resets and “remember me” tokens as high-risk</li><li>Use “good”MFA options<br><em>Prefer app- or hardware-based authentication and validate MFA flows</em></li></ul><h3>Final Thoughts</h3><p>Authentication failures remain one of the most exploited classes of vulnerabilities because they directly undermine trust in user identity. Strong authentication is not just about adding more controls, but about implementing them correctly and consistently. When authentication fails, everything else fails with it</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43eca39b24e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OWASP Top Ten 2025 for Web Applications]]></title>
            <link>https://medium.com/@WillWorkForMe/owasp-top-ten-2025-for-web-applications-3b885dd21032?source=rss-97e9aabbcbf7------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b885dd21032</guid>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[web-application-security]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[appsec]]></category>
            <category><![CDATA[application-security]]></category>
            <dc:creator><![CDATA[ShiftLeftSec]]></dc:creator>
            <pubDate>Mon, 12 Jan 2026 09:01:29 GMT</pubDate>
            <atom:updated>2026-01-12T09:01:29.836Z</atom:updated>
            <content:encoded><![CDATA[<p>This article gives some examples of vulnerabilities in each category of the OWASP Top Ten for web applications. Its worth noting that web application security issues rarely exist in isolation and often chaining of the vulnerabilities occur to achieve the attackers goal</p><h3>A01 — Broken Access Control</h3><p>Broken access control occurs when an application fails to properly restrict what specific users or types of users are allowed to do in the app, this can lead to:</p><ul><li>Users accessing admin functionality by guessing or discovering URLs</li><li>Horizontal access issues, where users can access other users’ data (often called IDORs)</li><li>Vertical privilege escalation, where a normal user gains elevated privileges</li><li>Path traversal vulnerabilities allow users to access files they were never intended to read</li></ul><h3>A02 — Security Misconfiguration</h3><p>Security misconfiguration refers to unsafe default settings, overly permissive behaviour, or inconsistent security controls across environments like:</p><ul><li>Exposed administrative interfaces</li><li>Trusting requests from localhost or internal IPs</li><li>Insecure file permissions</li><li>Overly verbose error messages</li></ul><p>A common problem in this category is that Many systems are configured to trust internal traffic without verification</p><h3>A03 — Software Supply Chain Failures</h3><p>Modern applications rely heavily on third-party components, libraries, frameworks, and services and its possible that:</p><ul><li>Dependencies contain vulnerabilities</li><li>Update mechanisms are compromised</li><li>Build or deployment pipelines are tampered with</li></ul><p>Vulnerabilities like insecure file uploads or deserialisation issues may also originate from third-party components rather than custom code</p><h3>A04 — Cryptographic Failures</h3><p>Cryptographic failures happen when sensitive data is inadequately protected due to weak, broken, or improperly implemented cryptography common issues are:</p><ul><li>Storing passwords improperly</li><li>Weak hashing or encryption algorithms</li><li>Poor key management</li><li>Exposing secrets via configuration files or backups</li></ul><h3>A05 — Injection</h3><p>Injection flaws occur when untrusted input is not properly sanitised or encoded and is then interpreted as code or commands by a back-end system leading to:</p><ul><li>SQL injection</li><li>OS command injection</li><li>Injection into system interpreters or APIs</li></ul><p>Attackers might be able to alter application logic, access unauthorised data, or execute commands on the underlying server</p><h3>A06 — Insecure Design</h3><p>Insecure design focuses on architectural weaknesses rather than implementation bugs like:</p><ul><li>Relying on client-side checks for security decisions</li><li>Using predictable identifiers for sensitive objects</li><li>Assuming authenticated users are trusted</li><li>Designing workflows that can be bypassed or reordered</li></ul><p>Many issues stem from insecure assumptions made during the design phase, no amount of secure coding can fix a fundamentally insecure design</p><h3>A07 — Authentication Failures</h3><p>Authentication failures allow attackers to impersonate legitimate users by allowing:</p><ul><li>Brute-force of login endpoints</li><li>Username enumeration</li><li>Weak password policies</li><li>Flawed multi-factor authentication flows</li><li>Improper session handling</li></ul><p>Authentication failures often serve as the <em>entry point</em> for further exploitation, including access control bypasses and data exposure</p><h3>A08 — Software or Data Integrity Failures</h3><p>These failures happen when there’s a lack of strong checks on the authenticity and origin of software components, plugins, or data, making systems vulnerable to unseen alterations.</p><ul><li>Unrestricted or weakly validated file uploads</li><li>Executable uploads leading to web shells</li><li>Trusting client-supplied metadata (such as MIME types)</li></ul><p>Once integrity is compromised, attackers may gain persistent control over the application or server</p><p><strong>Why it matters</strong><br> Integrity failures often convert a single vulnerability into long-term compromise</p><h3>A09 — Security Logging &amp; Alerting Failures</h3><p>Many attacks succeed not because defences don’t exist, but because attacks and failures go unnoticed in the system when there are gaps like:</p><ul><li>No logging for authentication failures</li><li>Missing alerts for privilege escalation</li><li>Lack of visibility into suspicious back-end requests</li></ul><p>Without proper logging, organisations often discover breaches months after they occur — if at all, you can’t respond to attacks you don’t know are happening</p><h3>A10 — Mishandling of Exceptional Conditions</h3><p>Exceptional conditions include errors, edge cases, and unexpected states like:</p><ul><li>Revealing stack traces or sensitive details in error messages</li><li>Inconsistent validation during error handling</li></ul><p>Attackers often intentionally cause errors hoping for incorrect/incomplete error handling to observe how systems behave under stress</p><h3>Final Thoughts</h3><p>The OWASP Top 10:2025 is a useful guide to explaining the different classes of issues a web application could have</p><p>However, quite a few vulnerabilities often share common root causes, so don’t get too hung up over what fits in what category, some of these could go over more than one category, depending on your point of view/context for example</p><ul><li>Over-trusting users or systems</li><li>Poorly defined trust boundaries</li><li>Insecure defaults</li><li>Missing visibility and monitoring</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b885dd21032" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The use of an Open Redirect in Server Side Request Forgery (SSRF) — A Portsw]]></title>
            <link>https://medium.com/@WillWorkForMe/the-use-of-an-open-redirect-in-server-side-request-forgery-ssrf-a-portsw-e26168bb9ac7?source=rss-97e9aabbcbf7------2</link>
            <guid isPermaLink="false">https://medium.com/p/e26168bb9ac7</guid>
            <category><![CDATA[ssrf]]></category>
            <category><![CDATA[ssrf-attack]]></category>
            <category><![CDATA[open-redirect]]></category>
            <category><![CDATA[burp]]></category>
            <category><![CDATA[appsec]]></category>
            <dc:creator><![CDATA[ShiftLeftSec]]></dc:creator>
            <pubDate>Thu, 08 Jan 2026 13:48:42 GMT</pubDate>
            <atom:updated>2026-01-08T13:48:42.386Z</atom:updated>
            <content:encoded><![CDATA[<h3>The use of an Open Redirect in Server Side Request Forgery (SSRF)</h3><h4>A Portswigger lab</h4><p>In previous articles, we’ve already covered what Server-Side Request Forgery (SSRF) is. In this post, we’ll look at how open redirects can be chained with SSRF to bypass filtering controls and reach internal systems that should never be exposed.</p><h4>What Is an Open Redirect?</h4><p>An open redirect is a vulnerability that allows an application to redirect a user to an arbitrary URL without validating where that redirect will ultimately lead.</p><p><strong>A simple way to think about it:<br></strong><em>It’s like airport security checking your departure city, but never verifying your final destination.</em></p><p>Attackers can use this to illicit data from the site under attack, or to send users to malicious sites</p><p>At a high level, the approach is:</p><ol><li>Proxy the application using Burp Suite or ZAP</li><li>Identify any request that accepts a URL or path parameter</li><li>Test whether that parameter can be manipulated to redirect to:</li></ol><ul><li>An internal service, or</li><li>An attacker-controlled external address</li></ul><p>4. Check whether the back-end follows that redirect automatically</p><p>If it does, you may have the ingredients for an SSRF bypass</p><p><strong>Portswigger SSRF Lab — 4<br></strong>(see my other stories for earlier labs)</p><p>WWe’ll continue using the PortSwigger labs and the familiar stockAPI parameter.</p><p>In this lab, the stock checker request has been hardened:</p><ul><li>It can only access internal application paths</li><li>Direct requests like the following are rejected:<br><em>stockAPI=http://192.168.0.12/admin</em></li></ul><p>At first glance, this looks like the SSRF vulnerability has been fixed</p><p>The lab then hints that you should find an open redirect elsewhere in the application, which can be confusing initially…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*OCEimm0uadgDA7C2fwAoRw.png" /></figure><p>Above is the place in the app where the open redirect occurs Looking closely at the response, you’ll see a redirection that uses a path parameter Importantly:</p><ul><li>The path parameter accepts user-controlled values</li><li>It can point to a relative or absolute URL</li><li>The server does not validate where the redirect ends up</li></ul><p>At this point, we have:</p><ul><li>A trusted internal endpoint: <em>/product/nextProduct</em></li><li>A user-controlled redirect target: <em>path</em></li></ul><p>But how do we make this relate to the stockCheck api call on the<br><em>POST /product/stock</em> request we need to use for the lab?</p><p>Open redirect simply says:<br>“Go to this <em>trusted endpoint</em>, which will then tell you where to go next.”</p><p>We already know from the lab that:</p><ul><li>stockApi is only allowed to access internal paths</li><li>/product/nextProduct is a valid internal path</li></ul><p>So instead of pointing stockApi directly at the admin interface, we point it at the open redirect:<br><em>stockCheck=/product/nextProduct?path=http://192.168.0.12:8080/admin</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ul9boHlBflKjJ3sTiUnNGA.png" /></figure><p><strong>What happens next?</strong></p><ol><li>The stock checker validates the URL and allows it (it’s an internal path)</li><li>The back-end requests <em>/product/nextProduct</em></li><li>The open redirect triggers</li><li>The back-end follows the redirect to the internal admin interface</li></ol><p>The response now contains the admin page, including the endpoint required to delete the target user so update the stockApi as below and send the request and the lab will be solved<br><em>/product/nextProduct?path=http://192.168.0.12:8080/admin/delete?username=carlos</em></p><p>To stop this happening, the stockApi url value should be decoded and validated before execution so only the intended path value. There is also no check on the back-end of the path parameter before the redirect to the admin interface occurs</p><h4>Final Thoughts</h4><p>Open redirects are often dismissed as low-risk. This lab demonstrates why that’s a mistake. When chained with SSRF, an open redirect can do some damage</p><p>Understanding how vulnerabilities interact is just as important as understanding them in isolation</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e26168bb9ac7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blind Server Side Request Forgery — A Portswigger]]></title>
            <link>https://medium.com/@WillWorkForMe/blind-server-side-request-forgery-a-portswigger-10ea6b3a05d5?source=rss-97e9aabbcbf7------2</link>
            <guid isPermaLink="false">https://medium.com/p/10ea6b3a05d5</guid>
            <category><![CDATA[appsec]]></category>
            <category><![CDATA[burp]]></category>
            <category><![CDATA[ssrf-attack]]></category>
            <category><![CDATA[burpsuite]]></category>
            <category><![CDATA[ssrf]]></category>
            <dc:creator><![CDATA[ShiftLeftSec]]></dc:creator>
            <pubDate>Thu, 08 Jan 2026 13:48:25 GMT</pubDate>
            <atom:updated>2026-01-08T13:48:25.918Z</atom:updated>
            <content:encoded><![CDATA[<h3>Blind Server Side Request Forgery</h3><h3>A Portswigger lab</h3><p>We have already looked at Server-Side Request Forgery (SSRF) and found that exploitation usually relied on one key advantage: <strong>visibility</strong>;<strong> </strong>the attacker could see the server’s response reflected back in the client application</p><p>Blind SSRF changes the rules entirely.</p><p>With blind SSRF, you can still control where the server sends a request — but you never see the response. This raises an important question:<br><em>If there’s no response, how do we know the application is vulnerable at all?</em></p><ul><li>Whilst we can control the destination of the request and the server still makes the request we get no direct feedback so all evidence of exploitation is indirect</li></ul><p>Because of this, blind SSRF must be tested using out-of-band techniques.</p><h3>Seeing in the Dark: Using Burp Collaborator</h3><p>To test blind SSRF, we need a way to observe server-side behavior without relying on application responses. This is where Burp Collaborator becomes invaluable.</p><p>Burp Collaborator allows you to generate unique payloads and monitor for:</p><ul><li>DNS lookups</li><li>HTTP requests</li><li>Other network interactions</li></ul><p>In a sense, Burp Collaborator makes us <em>less blind</em></p><p>If you haven’t used Collborator before, try this guide:<br><a href="https://appsec.guide/docs/web/burp/guide/manual-work/collaborator/"><em>https://appsec.guide/docs/web/burp/guide/manual-work/collaborator/</em></a></p><h3>What Does Success Look Like?</h3><p>In a blind SSRF scenario:</p><ul><li>The back-end server attempts to connect to your Collaborator domain</li><li>The request may be partially blocked by firewalls</li><li>You may only see DNS lookups rather than full HTTP requests</li></ul><p>Even a single DNS lookup can be enough to confirm SSRF, because it proves the server attempted to resolve and connect to a destination you control</p><p>Blind SSRF remains difficult though because the response from the back-end generally is not in the http request reaching Collaborator so there is an element of inference to looking for issues</p><p>The referrer header in a request is often used to track a request originated from, this data is often captured for analytics (SEO etc) and the sites in the referrer header are often visited for analytics systems to scrape, this is a common way to find a potential blind SSRF</p><p><strong>Portswigger lab — 4</strong></p><p>Lets have a look at a blind SSRF in action using the lab</p><p>Here, we see a standard web request being made to the lab application</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*ejb8I70wpCoaEy8MSqcPIA.png" /></figure><p>Note the referrer header, then send this to the Burp repeater and change the referrer by right click on the header value and clicking “Insert Collaborator Payload”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-R5KXcmQ-0BwDfFMyoc4lQ.png" /></figure><p>We haven’t changed anything else on the request, the app will still behave as expected, but if there is potential for SSRF, we will see evidence in the Colloborator that the application back-end has processed the request and reached out to the referrer site</p><p>Send the request and after a few moments look in the Burp Collaborator tab</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*kQvJpbXEAZ7bfaDLWupzkg.png" /></figure><p>Here we can see two DNS lookups and a http request has been made as a result of the referrer change we made and the lab is solved</p><p>Detecting blind SSRF is only the first step, the difficult part of using that knowledge and crafting a payload now begins, but for some, the existence of it is enough…</p><p>Read an example of one found in a bug bounty here:<br><a href="https://shahjerry33.medium.com/blind-ssrf-the-hide-seek-game-da9d0ecef2fb">https://shahjerry33.medium.com/blind-ssrf-the-hide-seek-game-da9d0ecef2fb</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10ea6b3a05d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[File upload vulnerabilities]]></title>
            <link>https://medium.com/@WillWorkForMe/file-upload-vulnerabilities-335298721009?source=rss-97e9aabbcbf7------2</link>
            <guid isPermaLink="false">https://medium.com/p/335298721009</guid>
            <category><![CDATA[burp]]></category>
            <category><![CDATA[burpsuite]]></category>
            <category><![CDATA[appsec]]></category>
            <category><![CDATA[file-upload-vulnerability]]></category>
            <dc:creator><![CDATA[ShiftLeftSec]]></dc:creator>
            <pubDate>Wed, 07 Jan 2026 13:45:22 GMT</pubDate>
            <atom:updated>2026-01-07T13:45:22.715Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Portswigger lab</h4><p>File upload vulnerabilities occur when a web application allows users to upload files without properly validating their properties like:</p><ul><li>name</li><li>type</li><li>size</li><li>contents</li><li>etc</li></ul><p>When these checks are weak or missing, attackers can upload malicious files instead of the type expected by the application for normal everyday operations</p><p><strong>Why File Upload Vulnerabilities Are Dangerous</strong></p><p>malicious file uploads can cause:</p><ul><li>Overwriting of important files by abusing filename handling</li><li>Uploading of files to unexpected locations using directory traversal</li><li>Exhausting of server disk space, causing denial-of-service (DoS) conditions</li><li>Control of the server by uploading a server-side script that functions as a web shell.</li></ul><p><strong>How These Vulnerabilities Happen</strong></p><p>Most modern applications attempt to restrict file uploads, but these defences are often flawed. Common mistakes include:</p><ul><li>Relying on blacklists that miss dangerous or uncommon file types</li><li>Trusting file extensions or MIME types that attackers can easily manipulate</li><li>Inconsistent validation across different directories or servers</li></ul><p><strong>Portswigger file upload — lab 1</strong></p><p>This lab takes advantage of the server not validating the file type that is uploaded, so it abuses a upload expecting png or other imgage format and allows upload of a php command instead</p><p>After logging in and uploading an avatar, send the image upload request to Burp repeater</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*83ho3ZPX6mQgKb1vytW5CQ.png" /></figure><p>Next, Burp provide a one liner php which you save on your system as exploit.php containing the following:</p><pre>&lt;?php echo file_get_contents(&#39;/home/carlos/secret&#39;); ?&gt;</pre><p>Upload this file to your avatar, note there is no error stating “invalid file type” or something similar to prevent the upload and modify the request in the repeater to point to that file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*JbJTn1UNTcE8ess87QgbdQ.png" /></figure><p>Now send the request, the request will successfully load exploit.php and will execute it to give a response containing a secret:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*NFcmRkWblVN-Rzwv6Bqq7Q.png" /></figure><p>Submit the secret into the lab and you will have completed it</p><p><strong>Portswigger file upload — lab 2</strong></p><p>This time, its not possible to upload the .php file through the avatar interface because of the file type</p><p>I tried a couple of things here, renaming the file exploit.php to exploit.png allowed the file through, but when I tried to execute it the code wouldn’t run</p><p>I then tried to intercept the upload request and change the Accept: header to include image/php before the request reached the server, thinking that might work, no, I had the GUI error message about wrong file type</p><p>I stopped and had another look at the requests and saw a POST with a 403 when I tried to upload, that had the multipart form body in it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*YZd14vC_zGz5XVCznUJswg.png" /></figure><p>I changed Content-Type on this request from application/x-php to image/jpeg and sent the request which was then a 200 response indicating the exploit had been uploaded</p><p>The rest of the lab was the same as lab 1 at this point — submit the GET request for the exploit instead of a proper image file and get the secret in the response</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sBattTfayc7Ozkm_AC0Jxw.png" /></figure><p>I submitted the secret to complete the lab</p><p><strong>Portswigger file upload — lab 3</strong></p><p>The lab follows the same methods as the first one, you are allowed to upload exploit.php. There is a tip in the preamble about changing the location of the file in the multipart form so I started with that</p><p>The learning of this lab is that while the directory where images are expected to be uploaded to is often locked down to prevent execution of code in this way, other directories may not be — if you can reach them and put your exploit there.</p><p>Once I had uploaded my exploit to what I thought would be a different dir I chose at random for a first go:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*NVhMwrkHezIxen84aJuRqA.png" /></figure><p>I checked the response…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*iw2d5SZaOSXSFQEUOyfmUw.png" /></figure><p>but while the image was uploaded, I couldn’t see my ../ in the file path</p><p>It was then I remembered encoding…</p><p>the “/” is encoded as “%2f” so I tried that instead and this time the file path I chose was preserved</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gXAs4GK06pUkwVnRIc-wuA.png" /></figure><p>Now it was just a matter of sending the usual request, but making sure the filepath matched where the exploit was</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hitcGPS-q77WhIUqPBFBjQ.png" /></figure><p>I submitted the secret and the lab was solved</p><p><strong>Portswigger file upload — lab 4</strong></p><p>I didn’t do this lab — it was too contrived for me, but the underlying takeaway <strong>for all web technologies</strong> from it was (IMO):</p><p><strong>“What decides execution here — the app or the server?”</strong></p><p>If its the server (yes) then malicious modification of the .htaccess file (in the case of Apache) will allow the exploit to be run. Other tech will of course have other conflict than can be exploited</p><p><strong>Portswigger file upload — lab 5</strong></p><p>This was quite interesting although the preamble before reaching the lab went on a bit. The way to solve this centres around an encoded null byte (%00)</p><p>I did some digging as I didn’t want to take this as face value so here is whats going on in the lab</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H41CzCY7rHXUAhioX72BUg.png" /></figure><p>The act of adding %00.jpg into the filename means that the filename is accepted because the null byte is removed by the server as is the .jpg after it. Submission of this request shows the file to be uploaded</p><p><strong>Why does this work? and how do we just “know” to use a null byte this way?</strong></p><p>So it seems that a lot of programming languages a null byte can terminate the string, but its can’t be sent in a http request unless encoded as %00, so to the application the string is “valid” but to the server the null byte added isn’t a string and it causes truncation leading to exploit.php being processed</p><p><strong>Portswigger file upload — lab 6</strong></p><p>You need an additional tool to do this lab:</p><pre>sudo apt install libimage-exiftool-perl</pre><p>This is a lab worth just following tbh, the lab provides a command using the tool above to add a script in the comment field of the jpg file</p><pre>exiftool -Comment=&quot;&lt;?php echo &#39;START &#39; . file_get_contents(&#39;/home/carlos/secret&#39;) . &#39; END&#39;; ?&gt;&quot; &lt;YOUR-INPUT-IMAGE&gt;.jpg -o polyglot.php</pre><p>When the jpg is uploaded via the GUI, to all intents and purposes, it is a valid jpg file</p><p>However, when the image is called via a get request, the image is returned in the request body, but instead of the comment also being returned as plain text, the comment is executed as php and the secret is returned, neat huh?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6nlDu3VI1qpO-nstNIeROw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Nu69258BdwLctVt8k8RAQ.png" /></figure><p><strong>Final thoughts</strong></p><p>These aren’t the only way to manipulate file uploads, here are some alternative ideas for you to try in addition to null byte:</p><ul><li>Change extension (.php.jpg)</li><li>Double extension (.jpg.php)</li><li>Case tricks (.PhP)</li><li>MIME type mismatch</li><li>Path tricks (../)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=335298721009" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Testing file uploads]]></title>
            <link>https://medium.com/@WillWorkForMe/testing-file-uploads-ce135a661010?source=rss-97e9aabbcbf7------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce135a661010</guid>
            <category><![CDATA[burp]]></category>
            <category><![CDATA[appsec]]></category>
            <category><![CDATA[file-upload]]></category>
            <category><![CDATA[burpsuite]]></category>
            <dc:creator><![CDATA[ShiftLeftSec]]></dc:creator>
            <pubDate>Wed, 07 Jan 2026 13:44:20 GMT</pubDate>
            <atom:updated>2026-01-07T13:44:20.830Z</atom:updated>
            <content:encoded><![CDATA[<p>Notes from the Portswigger Academy</p><p>This serves as a checklist of things to think about, some may need more research and be technology dependant, but its a good starting point</p><p><strong>1. Entry Points</strong></p><ul><li>Identify all upload features (GUI, API, PUT, URL-based uploads)</li><li>Test authenticated and unauthenticated uploads</li><li>Send OPTIONS to detect PUT / PATCH support</li></ul><p><strong>2. File Type Validation</strong></p><ul><li>Upload executable files (.php, .jsp, .asp, .aspx, .py)</li><li>Try alternate extensions (e.g. .php5)</li><li>Modify Content-Type header</li><li>Verify server checks content, not just extension or Content-Type</li></ul><p><strong>3. Extension Obfuscation</strong></p><ul><li>Double extensions (shell.php.jpg)</li><li>Case variations (shell.pHp)</li><li>Trailing characters (shell.php.)</li><li>URL encoding / double encoding (shell%2e.php)</li><li>Null bytes / semicolons (shell.php%00.jpg, shell.php;.jpg)</li><li>Recursive stripping bypass (shell.p.phphp)</li></ul><p><strong>4. File Content Checks</strong></p><ul><li>Non-image content labelled as image</li><li>Polyglot files (image + script in metadata)</li></ul><p><strong>5. Filename Handling</strong></p><ul><li>Directory traversal (../, %2e%2e%2f)</li><li>Overwrite existing files</li><li>Absolute / relative path injection</li><li>Confirm filenames are randomised</li></ul><p><strong>6. Storage &amp; Execution</strong></p><ul><li>Identify upload directory</li><li>Attempt upload to unexpected directories</li><li>Upload .htaccess / web.con</li></ul><p><strong>7. Size &amp; DoS</strong></p><ul><li>Upload oversized files</li><li>Flood storage with multiple uploads</li></ul><p><strong>8. Race Conditions</strong></p><ul><li>Try to get server to access file before validation completes</li><li>Test temporary file locations</li><li>URL-based upload timing attacks</li><li>Brute-force predictable temp names</li></ul><p><strong>10. Client-Side Attacks</strong></p><ul><li>Upload HTML / SVG with JavaScript</li><li>Stored XSS via uploads</li><li>Same-origin policy validation</li></ul><p><strong>11. File Parsing Attacks</strong></p><ul><li>XML / Office files for XXE</li><li>Parser crashes or external requests</li></ul><p><strong>12. PUT Uploads</strong></p><ul><li>Upload files via PUT</li><li>Test execution and access controls</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce135a661010" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Endpoints to Exploits: API Security Notes]]></title>
            <link>https://medium.com/@WillWorkForMe/from-endpoints-to-exploits-api-security-notes-35cddc040310?source=rss-97e9aabbcbf7------2</link>
            <guid isPermaLink="false">https://medium.com/p/35cddc040310</guid>
            <category><![CDATA[application-security]]></category>
            <category><![CDATA[appsec]]></category>
            <category><![CDATA[api-security]]></category>
            <category><![CDATA[web-application-security]]></category>
            <category><![CDATA[api-security-testing]]></category>
            <dc:creator><![CDATA[ShiftLeftSec]]></dc:creator>
            <pubDate>Tue, 06 Jan 2026 13:09:57 GMT</pubDate>
            <atom:updated>2026-01-06T13:09:57.046Z</atom:updated>
            <content:encoded><![CDATA[<p>Notes from PortSwigger’s API Security Labs <em>(not exhaustive)</em></p><p><strong>1. API Recon Fundamentals<br></strong><em>Goal: Identify and understand the API attack surface</em></p><p><strong>API Endpoints:<br></strong><em>URLs where APIs receive requests for resources</em></p><p><strong>Examples:<br></strong>GET /api/all-users<br>GET /api/all-users/students<br>GET /api/users/{id}</p><p><strong>Recon Ideas:<br></strong><em>For each endpoint, determine:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*ji-F4qU4gaAf5K9O6Be_LQ.png" /></figure><p><strong>2. API Documentation<br></strong><em>Will reveal endpoints, parameters, methods, and schemas and often publicly accessible for external APIs</em></p><ul><li>Human-readable: Guides, examples, usage instructions</li><li>Machine-readable: OpenAPI / Swagger (JSON or YAML)</li></ul><p><strong>3. Techniques to discover API Endpoints</strong></p><ul><li>Crawl with Burp/Zap Scanner</li><li>Manual browsing using Burp/Zap</li><li>Inspect JavaScript files for hidden endpoints</li></ul><p><strong>4. Interacting with APIs</strong></p><p>Use the proxy tool of your choice for:</p><ul><li>Manual testing &amp; behavioural analysis</li><li>Automated fuzzing &amp; enumeration</li></ul><p><strong>What to Test:</strong></p><ul><li>Change the HTTP method used by the API</li><li>Change the content type used by the API</li><li>Error messages (often leak useful info)</li><li>Reformat body or request</li><li>Replace parts of paths or request bodies with payloads instead for enumeration</li></ul><p><strong>Also look out for:</strong></p><ul><li>Errors</li><li>Differences in timings indicating silent success or fail of a request</li><li>Possible ways to get application logic bypasses</li><li>Injection opportunities</li></ul><p><strong>5. Identify Supported HTTP Methods with OPTIONS — commonly:<br></strong>GET — Read data<br>POST — Create data<br>PATCH — Partial updates<br>DELETE — Remove data<br>OPTIONS — Discover allowed methods</p><p><strong>Examples:</strong><br>GET /api/users<br>POST /api/users/status<br>DELETE /api/users/{id}</p><p><strong>6. Identifying Supported Content Types</strong><br>Different parsers can encoded or handle data differently, giving different vulnerabilities (JSON/XML most common)</p><p><strong>7. Finding Hidden Endpoints</strong></p><ul><li>Use word lists</li><li>API naming conventions</li><li>Include technology-specific terms</li></ul><p><strong>8. Finding Hidden Parameters<br>Methods</strong></p><ul><li>Add or replace parameters using Payloads</li><li>Guess parameter names with Param Miner (Burp addon)</li><li>Discover unlinked content with Content Discovery (Burp addon)</li></ul><p><strong>9. Mass Assignment Vulnerabilities</strong><br><em>Frameworks automatically bind request parameters to object fields</em></p><p><strong>Risk:</strong></p><ul><li>Attackers can modify sensitive fields not intended for user control</li></ul><p><strong>Example:</strong></p><p>PATCH request allows:<br><em>{ “user”: “longj”, “friendlyname”: “</em><a href="/service/mailto:wiener@example.com"><em>j</em></a><em>eff” }</em></p><p>GET response reveals hidden fields:<br><em>{ “id”: 8657, “email”: “jeff</em><a href="/service/mailto:john@example.com"><em>@a</em></a><em>bc.co.uk”, “hasWrite”: false }</em></p><p><strong>Testing Steps:</strong></p><ul><li>Identify and add hidden parameters</li><li>Send invalid value</li><li>Send valid malicious value and causing “hasWrite”: true</li></ul><p><strong>Impact</strong></p><ul><li>Privilege escalation</li><li>Account takeover</li></ul><p><strong>10. Server-Side Parameter Pollution (SSPP)</strong><br><em>User input is embedded into internal API requests without proper encoding</em></p><p><strong>Possible Impacts:</strong></p><ul><li>Override parameters</li><li>Access unauthorised data</li><li>Bypass application logic</li></ul><p><strong>11. SSPP in Query Strings</strong></p><p><strong>Try truncation:</strong></p><ul><li>Inject URL-encoded “#”<br><em>student=jeff%23something</em></li></ul><p><strong>Parameter Injection:</strong></p><ul><li>Inject URL-encoded “&amp;”<br><em>student = jeff%26email=something</em></li><li>Parameter Override<br><em>name=jeff%26name=[other possibly valid name]</em></li></ul><p><strong>Backend Behavior Differences exist</strong></p><ul><li>PHP Last parameter wins</li><li>ASP.NET Parameters combined</li><li>Node.js First parameter wins</li></ul><p><strong>12. SSPP in REST Paths</strong></p><p><strong>Example:</strong><br><em>/api/all/users/jeff</em><br>but instead send:<br><em>/api/all/users/jeff%2f..%2fadmin</em></p><p>May be changed by server to:<br><em>/api/all/users/admin</em></p><p><strong>13. SSPP in Structured Data (JSON / XML)</strong><br>Injection via Form Data<br><em>name=jeff”,”access_level”:”administrator</em></p><p>Injection via JSON<br><em>{“name”:”peter\”,\”access_level\”:\”administrator”}</em></p><p><strong>Impact:</strong></p><ul><li>Privilege escalation</li><li>Unauthorised access</li></ul><p><strong>15. Prevention Best Practices</strong></p><ul><li>Secure API documentation if possible</li><li>Keep documentation accurate</li><li>Allow list HTTP methods</li><li>Enforce correct content types</li><li>Use generic error messages</li><li>Secure all API versions</li><li>Prevent Mass Assignment</li><li>Allow list editable properties</li><li>Block list sensitive fields</li></ul><p><strong>Prevent SSPP:</strong></p><ul><li>Encode all user input</li><li>Enforce strict input formats</li><li>Allow list safe characters only</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35cddc040310" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Server Side Request Forgery (SSRF)]]></title>
            <link>https://medium.com/@WillWorkForMe/server-side-request-forgery-ssrf-6b86edad70d9?source=rss-97e9aabbcbf7------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b86edad70d9</guid>
            <category><![CDATA[appsec]]></category>
            <category><![CDATA[ssrf-attack]]></category>
            <category><![CDATA[burpsuite]]></category>
            <category><![CDATA[ssrf]]></category>
            <category><![CDATA[burp]]></category>
            <dc:creator><![CDATA[ShiftLeftSec]]></dc:creator>
            <pubDate>Tue, 06 Jan 2026 13:09:42 GMT</pubDate>
            <atom:updated>2026-01-07T09:26:24.033Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Portswigger lab</h3><p>Server-Side Request Forgery (SSRF) is one of those vulnerabilities that can feel abstract until you see it in action. If you’ve ever wanted a straightforward, beginner-friendly example, the first PortSwigger lab in the SSRF learning path is a perfect place to start</p><p>Before diving into the lab itself, let’s take a moment to understand what SSRF actually is — and why it’s dangerous</p><h4>What Is SSRF?</h4><p>At its core, SSRF allows an attacker to manipulate a server-side application into making unintended requests on their behalf. These requests are often made to internal systems or protected resources that the attacker would not normally be able to access directly</p><p>The danger comes from <strong>trust relationships</strong>. Internal services often trust requests originating from the main application server, assuming they’re safe. SSRF abuses that trust</p><h4>A Simple SSRF Scenario</h4><p>Imagine a web application that needs to check a user’s status. For security reasons, user status information is stored on a back-end server rather than being exposed directly to the client.</p><p>The web app sends a request to the back-end like this:<br><em>POST /user/update<br></em>with a request body like this:<br><em>userStatus=</em><a href="http://mybackendapp.com/user/status/%7Bid"><em>http://mybackendapp.com/user/status/{id</em></a><em>}</em></p><p>So far, so good — the application is simply asking the back-end for a user’s status</p><p>Now imagine an attacker intercepts this request (for example, using a proxy like Burp Suite). With minimal effort, they modify the request body to:<br><em>userStatus=</em><a href="http://mybackendapp.com/user/delete/%7Bid"><em>http://mybackendapp.com/user/delete/{id</em></a><em>}<br></em>(assuming that endpoint is valid)</p><p><strong>The Portswigger lab</strong></p><p>The first SSRF lab on PortSwigger is intentionally directive, making it an excellent introduction to the vulnerability</p><p>With Burp Suite open, intercept the stock check request</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vHSyoQm0-I1COq30hIVvdg.png" /></figure><p>Notice the “stockAPI” in body, so the client request is sending a further request to the backend application</p><p>Send the request to the Burp Repeater and swap out that link for this one: <br>http://localhost/admin and you will get a 200 response back</p><p>In that response you will find the endpoint you need for the next stage:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ndnjlmtSuSC2JSjwHdfGgg.png" /></figure><p>Now append the following to the same stockAPI URL:<br><em> /delete?username=carlos</em><br>and resend the request again, you will receive a 302 and the lab is solved</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oC7oYxPcCqddozfILUIeIw.png" /></figure><p><strong>The Portswigger lab — 2</strong></p><p>The next lab is similar, but different</p><p>Using the same endpoint as above:<br><em>POST /product/stock<br></em>Change the stockAPI value to <br><em>http:/192.168.0.1:8080<br></em>The lab says that we have to scan through the range of IP’s to find the admin interface, but we also know from the previous lab that the admin interface can be found at<em> /admin</em></p><p>Make the stockAPI value as below:<br><em>http:/192.168.0.1:8080<br></em>and send it to the Burp Intruder and a payload placement in the body as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0u8MnNIiezNxjtoUaYI8-w.png" /></figure><p>We are now going to search through <em>192.168.0.1–192.168.0.255 </em>in increments (steps) of 1 so start the attack:</p><p>Here we can see the result — sorted by Status code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OSidcgiwWVU2b5ur1yhSgQ.png" /></figure><p>The admin interface responds with a 200 on <em>192.168.0.221 </em>so that’s the endpoint we need</p><p>The final part of the lab is similar, go back to Burp and send the <em>/product/stock</em> request to the repeater this time</p><p>Amend the body of the <em>stockAPI=http://192.168.0.221:8080/admin/delete?username=carlos </em>and resend the request to complete the second lab with a 302 found</p><p><strong>The Portswigger lab — 3</strong></p><p>This lab follows the same pattern as the previous 2, except this time the url must be obscured to get through server defences. As there are a million ways to do this, the best thing to do is show the Portswigger solution here as its very concise to be fair:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*EfAB9pFZhS7pO5nBAZEiUw.png" /><figcaption>Portswigger solution for lab 3</figcaption></figure><p>Note the truncation of the IP address and also the double url encoding of “a” in the above solution</p><p>There is a Decoder tab in Burp you can use to try this:<br>Take <em>%2561</em> and url decode that and it will give you <em>%61, </em>url decode <em>%61</em> and you will get “<em>a”</em> which then preserves the endpoint address in the above solution</p><p>At first this seems a bit convoluted, but its a good way to hide input from server defences — defences may initially just decode once meaning that <em>%61</em> is allowed through and appears harmless. If another component exists and acts on that <em>%61</em> to decode it then “a” will appear and the malicious url in the example has passed through the defences unscathed to be executed</p><p><strong>To prevent this, when dealing with input, validate it after its fully decoded, but <em>before</em> its executed</strong></p><p>By extension, a way to defend this attack might be to whitelist the url in the stockApi call so that we can’t send <em>stockApi=http://192.168.0.221/admin</em> for example, but if the url in this sort of call is passed as an unchecked parameter instead and the back-end api allows re-directions (open redirect vulnerability) then its game on. More on this in a future article</p><h4>Final Thoughts</h4><p>These labs are a good demonstration of why SSRF is so powerful — and so dangerous. With just a small amount of input control, an attacker can pivot from a harmless feature to full administrative actions on internal systems</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b86edad70d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>