<?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 RayofHope on Medium]]></title>
        <description><![CDATA[Stories by RayofHope on Medium]]></description>
        <link>https://medium.com/@arayofhope7?source=rss-a1f9c8754880------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pb6R-58-0JIs9DggdPv4MA.jpeg</url>
            <title>Stories by RayofHope on Medium</title>
            <link>https://medium.com/@arayofhope7?source=rss-a1f9c8754880------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 14:22:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arayofhope7/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[Steel Plant best Practice Purdue Model]]></title>
            <link>https://arayofhope7.medium.com/steel-plant-best-practice-purdue-model-03deb59f7fbd?source=rss-a1f9c8754880------2</link>
            <guid isPermaLink="false">https://medium.com/p/03deb59f7fbd</guid>
            <dc:creator><![CDATA[RayofHope]]></dc:creator>
            <pubDate>Tue, 07 Jul 2026 06:57:28 GMT</pubDate>
            <atom:updated>2026-07-07T06:57:28.404Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Steel Plant best Practice Purdue Model</strong></p><p><strong>1)</strong> <strong>Level 0 — Physical Process (Actual Plant Equipment)</strong></p><p>a. Temperature sensor measures furnace temperature, Valve opens gas line., Pumps, Motor rotates a roller, blast furnace, etc.</p><p><strong>2)</strong> <strong>Level 1 — Basic Control: PLC (Programmable Logic Controller), RTU (Remote Terminal Unit)</strong></p><p>a. <strong>Sensor reports temperature</strong> = 1200°C.</p><p>b. <strong>PLC checks programmed logic</strong> (Furnace PLC, Rolling Mill PLC, Crane PLC, Water Treatment PLC)</p><p><strong>c.</strong> <strong>PLC decides:</strong></p><p>i. Open cooling valve</p><p>ii. Start pump</p><p>iii. Stop motor</p><p><strong>d.</strong> <strong>Cybersecurity controls:</strong></p><p>i. PLC password management</p><p>ii. PLC firmware management</p><p>iii. Disable unused ports</p><p>iv. Backup PLC logic</p><p>v. Change management</p><p><strong>3)</strong> <strong>Level 2 — Supervisory Control:</strong></p><p><strong>a.</strong> <strong>Main systems:</strong></p><p>i. SCADA</p><p>ii. HMI</p><p>iii. DCS stations</p><p>iv. Operator consoles</p><p><strong>b.</strong> <strong>An operator sees:</strong></p><p>1. Furnace temperature</p><p>2. Motor status</p><p>3. Alarm messages</p><p>4. Production values</p><p><strong>c.</strong> <strong>Operator can:</strong></p><p>1. Start equipment</p><p>2. Stop equipment</p><p>3. Acknowledge alarms</p><p><strong>d.</strong> <strong>Cybersecurity controls:</strong></p><p>1. Operator authentication</p><p>2. Strong passwords</p><p>3. Session timeout</p><p>4. Antivirus (if supported)</p><p>5. Application whitelisting</p><p><strong>4)</strong> <strong>Level 3 — Manufacturing Operations:</strong></p><p><strong>a.</strong> <strong>Plant management systems.</strong></p><p>1. MES (Manufacturing Execution System)</p><p>2. Historian</p><p>3. Production Reporting</p><p>4. Quality Systems</p><p>5. Batch Servers</p><p><strong>5)</strong> <strong>Level 3.5 — Industrial DMZ (Cybersecurity Layer): — </strong>Located between OT and IT.</p><p>1. Firewalls</p><p>2. Jump Servers</p><p>3. Bastion Hosts</p><p>4. Patch Servers</p><p>5. AV Update Servers</p><p>6. Remote Access Gateways</p><p>7. Data Transfer Servers.</p><p>Best practice:</p><p>IT Network: — Firewall: — DMZ: — Firewall: — OT Network.</p><p><strong>6)</strong> <strong>Level 4 — Business IT: — </strong>Office and business systems.</p><p>1. SAP ERP</p><p>2. Active Directory</p><p>3. Finance Systems</p><p>4. HR Systems</p><p>5. Procurement</p><p>6. Inventory</p><p>7) <strong>Level 5 — Enterprise: </strong>Corporate and global systems.</p><p>1. Corporate SOC</p><p>2. Cloud</p><p>3. Internet</p><p>4. Data Centers</p><p>5. Corporate Dashboards</p><p>6. Global Reporting.</p><p><strong>Best Practices to be followed and point of contact.</strong></p><p>1) <strong>OT environment architecture and the latest OT network diagram?</strong></p><p>a. Number of plants</p><p>b. Number of OT networks</p><p>c. Number of firewalls</p><p>d. Number of PLC vendors</p><p>e. Remote access methods</p><p>2) <strong>Complete and up-to-date OT asset inventory?</strong></p><p>a. Asset Name</p><p>b. IP Address</p><p>c. Location</p><p>d. Vendor</p><p>e. Model</p><p>f. Firmware Version</p><p>g. Owner for the Assest</p><p>h. Criticality</p><p>3) <strong>Network segmentation b/w OT and IT and Firewall Security.</strong></p><p>a. Is OT separated from IT?</p><p>b. Is there an Industrial DMZ (Level 3.5)?</p><p>c. Are there firewalls at OT/IT boundaries?</p><p>d. Are communications restricted to business needs only?</p><p>e. Can users from IT directly reach PLCs or SCADA systems?</p><p>4) <strong>One can remote access to the OT environment controlled, approved, and monitored?</strong></p><p>a. Remote access process</p><p>b. VPN architecture</p><p>c. Vendor access procedure</p><p>d. Jump server configuration</p><p>e. MFA implementation</p><p>f. Access approval records</p><p>g. Remote access logs.</p><p>Ø No direct access from Internet to OT</p><p>Ø Vendors connect through VPN + MFA</p><p>Ø Vendors land on a DMZ Jump Server</p><p>Ø Access is approved before use (Firewall)</p><p>Ø Activities are logged and monitored</p><p>Ø Access is disabled when not required</p><p>5) <strong>User accounts, privileged accounts, and administrator access managed in the OT environment?</strong></p><p>a. Local administrator accounts and AD Members (who all has local admin right and why)</p><p>b. SCADA user list (Who all can access SCADA)</p><p>c. DCS user list (How many users and their privileges)</p><p>d. Engineering workstation accounts (Who all can access it)</p><p>e. PLC programming accounts (Who all can modify PLC Logic)</p><p>f. Service accounts (service accounts inventoried and monitored)</p><p>g. Privileged access management process</p><p>h. Vendor accounts (is it being disabled when not in used)</p><p>Ø User access matrix</p><p>Ø Admin account list</p><p>Ø AD group membership report</p><p>Ø Quarterly access review records</p><p>Ø Joiner/Mover/Leaver records</p><p>Ø Privileged account inventory</p><p>6) <strong>Changes to OT systems controlled, approved, tested, and documented</strong></p><p>a. Change Management Procedure (Who requests the change and who approved)</p><p>b. Recent OT change records (Testing was performed before implementation)</p><p>c. PLC logic changes records (changes are logged?)</p><p>d. Firewall rule change records (was it approved)</p><p>e. SCADA/DCS change records</p><p>f. Emergency change records</p><p>Ø Last 10 OT changes</p><p>Ø Last PLC logic modification record</p><p>Ø Last firewall rule change</p><p>Ø CAB (Change Advisory Board) approvals</p><p>Ø Engineering workstation logs</p><p>7) <strong>Backup and disaster recovery arrangements exist for critical OT systems, and have recovery tests been performed?</strong></p><p>a. OT Backup Policy</p><p>b. PLC backup files</p><p>c. SCADA backup reports</p><p>d. DCS backup reports</p><p>e. Historian backup records</p><p>f. MES backup records</p><p>g. Recovery testing evidence</p><p>Ø Backup schedules</p><p>Ø Backup reports</p><p>Ø Recovery test reports</p><p>Ø PLC backup inventory</p><p>Ø Disaster Recovery procedures</p><p>Ø Last recovery exercise results</p><p>8) <strong>How are vulnerabilities, security patches, and firmware updates managed for OT assets?</strong></p><p>a. OT Patch Management Policy</p><p>b. Vulnerability Management Procedure</p><p>c. Patch deployment records</p><p>d. PLC firmware update records</p><p>e. SCADA/DCS patch records</p><p>f. Exception/Risk acceptance records</p><p>9) <strong>How often Security monitoring performed in the OT environment, and how are cyber incidents detected and responded to.</strong></p><p>a. Unauthorized access</p><p>b. Malware/ransomware</p><p>c. Suspicious network activity</p><p>d. Firewall violations</p><p>e. Failed login attempts</p><p>f. Changes to critical OT systems</p><p>Ø Last 3 OT security incidents</p><p>Ø SIEM screenshots</p><p>Ø Firewall logs</p><p>Ø Alert reports</p><p>Ø SOC investigation records</p><p>Ø Incident response reports</p><p>10) <strong>Third party vendor list and their access privileges to the OT environment.</strong></p><p>a. Vendor access list &amp; logs</p><p>OT Cyber Control Audit Best Practice w.r.t each layer</p><p>Physical Layer layer 0</p><p>1: See if PLC Cabinates, Control Room, other sensitve area are securly locked or not <br>2: What prevents physical damage if PLC sends incorrect commands?</p><p>: — — — — — Show me the control that prevents this next step.<br>3: Figure out the most critical equipment whose failure can stop production and Validate if there is any Gap</p><p>Basic Control — PLC/RTU/Controller Layer 1</p><p>1 If I bring a laptop and connect to level 1 switch, can I discover this PLC? Can I upload Logic, Stop Production? <br>2 Can this PLC verify that the engineering software connecting to it is authorized?<br>3 Show me the last PLC logic change made on this controller</p><p>Show me the control that prevents this next step.</p><p>4 Show me the PLC Firmware versions 5 Who has authorised to upload PLC logic</p><p>SCADA / HMI / DCS — Layer 2</p><p>1 How many local admins exists in the environment <br>2 Can SCADA launch powershell directly <br>3 Anyone can insert the USB devices</p><p>Show me the control that prevents this next step.</p><p>4 Application are whitelisted or not 5 Can a operator directly access the windows</p><p>Manufacturing Operations/MES — Layer 3</p><p>1 Can MES communicate with corporate IT? Yes or No : — Vefify if No <br>2 Where is Historian data stored: Check if Security Stored or not <br>3 MES can access AD?</p><p>Show me the control that prevents this next step.</p><p>4 Can MES established the connection to level 2 5 IF MES compromised 6 1) Can I move to SCADA?<br> 2) Can I reach HMIs?<br> 3) Can I manipulate production reporting</p><p>Industrial DMZ (Cybersecurity Layer): — Located between OT and IT — Layer 3.5 <br>1 Check for All Firewall Rules based review <br>2 Check for all firewall configuration review <br>3 Check for all the issues related to firewall version <br>4 Check all jump server (Share Jump Account)</p><p>Show me the control that prevents this next step.</p><p>5 RDP Status <br>6 Can IT user reach to OT network here? If yes that is OK if not verify it <br>7 Also check if OT AD is seperated from IT AD or not <br>8 Are there any trust btw IT and OT Ads <br>9 If IT and OT connectivity is there — verify which vendor can connect remotly <br>10 Do they have permanent access <br>11 Are their session recorded (Review a vendor session recording) <br>12 Show me every person who connected remotely during the last 30 days. 13 Can a vendor reach PLCs directly or only through a jump server? <br>14 What happens if a vendor account is compromised? <br>15 What Controls you have enabled to prevents ransomware from reaching SCADA Mostly</p><p>These 0 to 3.5 layers are important as a part of Core OT Audit. Audit for layer 4 and 5 will come under ITGC and Cloud</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03deb59f7fbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 7: Reflected XSS into attribute with angle brackets HTML-encoded: Zero to Hero Series —…]]></title>
            <link>https://infosecwriteups.com/day-7-reflected-xss-into-attribute-with-angle-brackets-html-encoded-zero-to-hero-series-8b0c775fc7b5?source=rss-a1f9c8754880------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b0c775fc7b5</guid>
            <category><![CDATA[cyber-security-awareness]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[reflected-xss]]></category>
            <dc:creator><![CDATA[RayofHope]]></dc:creator>
            <pubDate>Wed, 02 Jul 2025 06:38:42 GMT</pubDate>
            <atom:updated>2025-07-02T06:38:42.864Z</atom:updated>
            <content:encoded><![CDATA[<h3>Day 7: Reflected XSS into attribute with angle brackets HTML-encoded: Zero to Hero Series — Portswigger</h3><p>Hi, my fellow hackers. This is <strong>Rayofhope</strong>. I have over 5 years of experience and am currently working as a consultant with a Big 4 firm.</p><p>It’s Day 23 of posting all the PortSwigger labs, not just the solutions. I’ll break down <strong><em>why</em> </strong>we take each step, because once the <strong><em>‘why’ is clear, the ‘how’ becomes easy.</em></strong></p><p><strong>Let’s Start:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/0*ZgPD086XWmk_YxfP.jpeg" /></figure><blockquote><strong>Video Walkthrough</strong> — You can watch the video or read the blog, totally up to you. But if you ask me, start with the video, then read the blog to connect all the dots.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fc7_MsKgkAQ4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dc7_MsKgkAQ4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fc7_MsKgkAQ4%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c57b2bce64d232b0765d7f84fd1873e8/href">https://medium.com/media/c57b2bce64d232b0765d7f84fd1873e8/href</a></iframe><p><em>This is what the lab looks like: we have a search function field.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yyKMxt2PrrYb6LhmGthHLw.png" /></figure><p>Let&#39;s search for rayofhope</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aeEpusObETFectvg1QQFDw.png" /></figure><p><em>The value of </em><em>search is taken directly from user input (</em><em>?search=...) and inserted into the </em><em>value=&quot;...&quot; field without escaping.</em></p><p>Let&#39;s try to use a script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n0mTcx8lz454Edbi9L8ipg.png" /></figure><p>Here, the payload (“) breaks out of an existing attribute and injects a new attribute (onmouseover).</p><p><strong><em>Boom! Lab solved. And hey, if you learned something and didn’t break your brain in the process, that’s a win-win!</em></strong></p><p>Happy Hunting — Do hit a like and follow for the best content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/0*RnlUFXDURBv9l8v2.jpeg" /></figure><p><strong>My Social:</strong></p><p>LinkedIn: <a href="https://www.linkedin.com/in/ray-of-hope/">https://www.linkedin.com/in/ray-of-hope/</a></p><p>YouTube Channel: <a href="http://www.youtube.com/@arayofhope7">www.youtube.com/@arayofhope7</a></p><p>Twitter: <a href="https://x.com/ray_of_hope7">https://x.com/ray_of_hope7</a></p><p>Instagram: <a href="https://www.instagram.com/a_rayofhope7/">https://www.instagram.com/a_rayofhope7/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b0c775fc7b5" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/day-7-reflected-xss-into-attribute-with-angle-brackets-html-encoded-zero-to-hero-series-8b0c775fc7b5">Day 7: Reflected XSS into attribute with angle brackets HTML-encoded: Zero to Hero Series —…</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 8:Stored XSS into anchor href attribute with double quotes HTML-encoded : Zero to Hero Series…]]></title>
            <link>https://infosecwriteups.com/day-8-stored-xss-into-anchor-href-attribute-with-double-quotes-html-encoded-zero-to-hero-series-f4bcab7d9b8f?source=rss-a1f9c8754880------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4bcab7d9b8f</guid>
            <category><![CDATA[cyber-security-awareness]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[stored-xss]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <dc:creator><![CDATA[RayofHope]]></dc:creator>
            <pubDate>Sun, 29 Jun 2025 19:40:37 GMT</pubDate>
            <atom:updated>2025-07-01T10:27:52.768Z</atom:updated>
            <content:encoded><![CDATA[<h3>Day 8:Stored XSS into anchor href attribute with double quotes HTML-encoded : Zero to Hero Series — Portswigger</h3><p>Hi, my fellow hackers. This is <strong>Rayofhope</strong>. I have over 5 years of experience and am currently working as a consultant with a Big 4 firm.</p><p>It’s Day 24 of posting all the PortSwigger labs, not just the solutions. I’ll break down <strong><em>why</em> </strong>we take each step, because once the <strong><em>‘why’ is clear, the ‘how’ becomes easy.</em></strong></p><p><strong>Let’s Start:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/0*1TLarQzoD45LTUny.jpeg" /></figure><blockquote><strong><em>Video Walkthrough</em></strong><em> — You can watch the video or read the blog, totally up to you. But if you ask me, start with the video, then read the blog to connect all the dots.</em></blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F6o_EXAFuUTk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D6o_EXAFuUTk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F6o_EXAFuUTk%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d26a670727c40b2141ad893b8e8ce9c/href">https://medium.com/media/2d26a670727c40b2141ad893b8e8ce9c/href</a></iframe><blockquote><strong>Lab:</strong> This lab contains a stored cross-site scripting vulnerability in the comment functionality. To solve this lab, submit a comment that calls the alert function when the comment author name is clicked.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ayRPlI8NIYQlUprmFG4PnQ.png" /></figure><p><em>This is what the lab looks like, and we can see that there are no input fields here. However, we have an option to view the post.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ORacKmFnJbhiKiJoWkZYOQ.png" /></figure><p><em>We have an input field to leave a comment. Let’s fill it out with normal details and observe how it responds.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8y5p-TZwgHWOnomfiT6HSQ.png" /></figure><p>Let’s Submit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v_V-8MEnxlWMNDl_YFoc0w.png" /></figure><p>Comments have been submitted</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*35t4xDPyChSkzutjOWQPKw.png" /></figure><p><em>The comment has been posted, and we can see a hyperlink in it. Let’s click on ‘RayofHope’ and see where it redirects.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eVTSeu4Jv6xq9ioQOu5Drg.png" /></figure><p><em>It redirected to nobody.com. Let’s look at the code to analyze why this happened.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yckzv2vIWs0PoVnPcg6yvw.png" /></figure><p><em>The application is </em><strong><em>automatically wrapping the username or comment</em></strong><em> (</em><em>&quot;RayofHope&quot;) in an </em><em>&lt;a&gt; tag, and assigning it a </em><strong><em>default </em></strong><strong><em>href of </em></strong><strong><em>https://nobody.com</em></strong><em>, likely as a </em><strong><em>placeholder</em></strong><em> or default profile link for anonymous users or non-registered commenters.</em></p><p>Let’s try injecting javascript:alert(1)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vE13kdC3KTVFh30pGGIwmQ.png" /></figure><p><em>The script has been submitted and the lab is now solved. Let’s go back to the blog to check if any popup appears.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vpJOo1I1zElKFHyiEefTig.png" /></figure><p><em>As expected, clicking on the comment successfully triggered the XSS payload, resulting in a pop-up. Let’s now analyze the code to understand why it was executed.</em></p><p>In this case, the href attribute of the anchor tag is set to a javascript: URI scheme. When the user clicks on the link labeled &#39;ray&#39;, the browser interprets and executes the embedded JavaScript (alert(1)), confirming an XSS vulnerability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P2Kl8H3OhFGpFEQhjkP7Qg.png" /></figure><p><strong><em>Boom! Lab solved. And hey, if you learned something and didn’t break your brain in the process, that’s a win-win!</em></strong></p><p>Happy Hunting — Do hit a like and follow for the best content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/0*5FTkMbiilD5gn5TC.jpeg" /></figure><p><strong>My Social:</strong></p><p><strong>My Social:</strong></p><p>LinkedIn: <a href="https://www.linkedin.com/in/ray-of-hope/">https://www.linkedin.com/in/ray-of-hope/</a></p><p>YouTube Channel: <a href="http://www.youtube.com/@arayofhope7">www.youtube.com/@arayofhope7</a></p><p>Twitter: <a href="https://x.com/ray_of_hope7">https://x.com/ray_of_hope7</a></p><p>Instagram: <a href="https://www.instagram.com/a_rayofhope7/">https://www.instagram.com/a_rayofhope7/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4bcab7d9b8f" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/day-8-stored-xss-into-anchor-href-attribute-with-double-quotes-html-encoded-zero-to-hero-series-f4bcab7d9b8f">Day 8:Stored XSS into anchor href attribute with double quotes HTML-encoded : Zero to Hero Series…</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 6:DOM XSS in jQuery selector sink using a hashchange event : Zero to Hero Series — Portswigger]]></title>
            <link>https://infosecwriteups.com/day-6-dom-xss-in-jquery-selector-sink-using-a-hashchange-event-zero-to-hero-series-portswigger-f80367168d95?source=rss-a1f9c8754880------2</link>
            <guid isPermaLink="false">https://medium.com/p/f80367168d95</guid>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[dom-xss]]></category>
            <dc:creator><![CDATA[RayofHope]]></dc:creator>
            <pubDate>Sun, 29 Jun 2025 18:37:16 GMT</pubDate>
            <atom:updated>2025-07-02T06:38:34.615Z</atom:updated>
            <content:encoded><![CDATA[<h3>Day 6:DOM XSS in jQuery selector sink using a hashchange event : Zero to Hero Series — Portswigger</h3><p>Hi, my fellow hackers. This is <strong>Rayofhope</strong>. I have over 5 years of experience and am currently working as a consultant with a Big 4 firm.</p><p>It’s Day 22 of posting all the PortSwigger labs, not just the solutions. I’ll break down <strong><em>why</em> </strong>we take each step, because once the <strong><em>‘why’ is clear, the ‘how’ becomes easy.</em></strong></p><p><strong>Let’s Start:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/0*8ZsWOnBQPp95N_F9.jpeg" /></figure><p><strong>Before you go for this blog, make sure to read the Previous one<br></strong><a href="https://arayofhope7.medium.com/day-5-dom-xss-in-jquery-anchor-href-attribute-sink-using-location-search-afc598397e24">https://arayofhope7.medium.com/day-5-dom-xss-in-jquery-anchor-href-attribute-sink-using-location-search-afc598397e24</a></p><blockquote><strong>Video Walkthrough</strong> — You can watch the video or read the blog, totally up to you. But if you ask me, start with the video, then read the blog to connect all the dots.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FJNvBb6jIEPU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DJNvBb6jIEPU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FJNvBb6jIEPU%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e634a7068ba4ec26fe1b8e3a0c2eeaf4/href">https://medium.com/media/e634a7068ba4ec26fe1b8e3a0c2eeaf4/href</a></iframe><blockquote><strong>LAB: </strong>This lab contains a DOM-based cross-site scripting vulnerability on the home page. It uses jQuery’s $() selector function to auto-scroll to a given post, whose title is passed via the location.hash property.</blockquote><blockquote>To solve the lab, deliver an exploit to the victim that calls the print() function in their browser.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zoY-uShiFU6GM41jDTQVuQ.png" /></figure><p><em>This is what the lab looks like.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fiYBMK2tpNlj4ykgM-RYjw.png" /></figure><p><em>A </em><strong><em>hash</em></strong><em> is the part of the URL that comes </em><strong><em>after the </em></strong><strong><em># symbol</em></strong><em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2XVIRE0LVZHGUVPTj_uXbA.png" /></figure><p><em>This confirms that the application is vulnerable to </em><strong><em>DOM-based XSS</em></strong><em> due to the unsanitized use of </em><em>window.location.hash in a </em><em>hashchange event listener.</em></p><p><em>We can see that there is an exploit server available. Let’s deliver the payload through it.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Ex2kQ1DKanJBlV2ntQ0RQ.png" /></figure><p><em>In here, the </em><em>iframe&#39;s </em><em>src attribute points to the vulnerable page with an empty hash value. When the </em><em>iframe is loaded, an XSS payload is appended to the hash, causing the </em><em>hashchange event to fire.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_AyVroD52QcoQ-U50q89DQ.png" /></figure><p><strong><em>Boom! Lab solved. And hey, if you learned something and didn’t break your brain in the process, that’s a win-win!</em></strong></p><p>Happy Hunting — Do hit a like and follow for the best content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/0*Z4c0-49UVFoBxEl7.jpeg" /></figure><p><strong>My Social:</strong></p><p><strong>My Social:</strong></p><p>LinkedIn: <a href="https://www.linkedin.com/in/ray-of-hope/">https://www.linkedin.com/in/ray-of-hope/</a></p><p>YouTube Channel: <a href="http://www.youtube.com/@arayofhope7">www.youtube.com/@arayofhope7</a></p><p>Twitter: <a href="https://x.com/ray_of_hope7">https://x.com/ray_of_hope7</a></p><p>Instagram: <a href="https://www.instagram.com/a_rayofhope7/">https://www.instagram.com/a_rayofhope7/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f80367168d95" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/day-6-dom-xss-in-jquery-selector-sink-using-a-hashchange-event-zero-to-hero-series-portswigger-f80367168d95">Day 6:DOM XSS in jQuery selector sink using a hashchange event : Zero to Hero Series — Portswigger</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 5: DOM XSS in jQuery anchor href attribute sink using location.search]]></title>
            <link>https://infosecwriteups.com/day-5-dom-xss-in-jquery-anchor-href-attribute-sink-using-location-search-afc598397e24?source=rss-a1f9c8754880------2</link>
            <guid isPermaLink="false">https://medium.com/p/afc598397e24</guid>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[ethical-hacking-training]]></category>
            <category><![CDATA[dom-xss]]></category>
            <category><![CDATA[cross-site-scripting]]></category>
            <category><![CDATA[xs]]></category>
            <dc:creator><![CDATA[RayofHope]]></dc:creator>
            <pubDate>Wed, 28 May 2025 04:51:12 GMT</pubDate>
            <atom:updated>2025-05-28T04:51:12.309Z</atom:updated>
            <content:encoded><![CDATA[<h3>Day 5: DOM XSS in jQuery anchor href attribute sink using location.search source: Zero to Hero Series — Portswigger</h3><p>Hi, my fellow hackers. This is <strong>Rayofhope</strong>. I have over 5 years of experience and am currently working as a consultant with a Big 4 firm.</p><p>It’s Day 20 of posting all the PortSwigger labs, not just the solutions. I’ll break down <strong><em>why</em> </strong>we take each step, because once the <strong><em>‘why’ is clear, the ‘how’ becomes easy.</em></strong></p><p><strong>Let’s Start:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/0*lbn1usqKfmC1dj7U.jpeg" /></figure><p><strong>Before you go for this blog, make sure to read the Previous one<br></strong><a href="https://arayofhope7.medium.com/day-3-dom-xss-in-innerhtml-sink-using-source-location-search-zero-to-hero-series-portswigger-3795cf43eab7">https://arayofhope7.medium.com/day-3-dom-xss-in-innerhtml-sink-using-source-location-search-zero-to-hero-series-portswigger-3795cf43eab7</a></p><blockquote><strong>Video Walkthrough</strong> — You can watch the video or read the blog, totally up to you. But if you ask me, start with the video, then read the blog to connect all the dots.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F3bHP-XZilOo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D3bHP-XZilOo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F3bHP-XZilOo%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cbc53c4d90d7202b08f18facf7420f5e/href">https://medium.com/media/cbc53c4d90d7202b08f18facf7420f5e/href</a></iframe><p><em>This is what the lab looks like: we have a parameter called </em><em>returnPath and some input fields as well. Since we&#39;re testing for DOM XSS, the first step is to identify the source and sink in the code. Based on that, we can craft an appropriate payload.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0IcsxwIvO3hfneGjodG5zg.png" /></figure><p><em>In the Inspect Element panel, we can see an </em><em>href attribute. The value is directly set as the </em><em>href attribute of the </em><em>#backLink element without any validation or sanitisation.</em></p><p>Note:</p><p><em>The </em><em>href attribute can contain different URI schemes: </em><em>https:, </em><em>mailto:, </em><em>tel: and </em><em>javascript:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wWc-xf1NRrdmBlzGzTQuAA.png" /></figure><p><em>Here, I supplied a regular value in the </em><em>returnPath parameter, and upon inspecting the DOM, it&#39;s clearly reflected directly into the </em><em>href attribute of the </em><em>#backLink element without any sanitisation. This indicates a potential DOM XSS vector, as user-controlled input is being inserted into a sensitive sink.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IALmxXFvnKjXZd4Cp88QLQ.png" /></figure><p><em>I used the payload </em><em>javascript:alert(document.cookie) in the </em><em>returnPath parameter. While no alert pop-up appeared, the payload was correctly injected into the </em><em>href attribute of the </em><em>#backLink element, and the code was executed when the link was clicked. This confirms the presence of a DOM XSS vulnerability</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9h0mzp-katJvhubU5R0z1Q.png" /></figure><p><em>Once the ‘Back’ button is clicked, the payload executes and the alert pops up, confirming that this is a DOM XSS vulnerability. Since the user-controlled </em><em>returnPath parameter is reflected directly into the </em><em>href attribute without sanitisation, which can be exploited by crafting a malicious link that executes JavaScript when the element is interacted with.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JlnrX7TZSmQ82R4AJUJrNg.png" /></figure><p><strong><em>Boom! Lab solved. And hey, if you learned something and didn’t break your brain in the process, that’s a win-win!</em></strong></p><p>Happy Hunting — Do hit a like and follow for the best content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/0*NRNVnF82lKSD5dx3.jpeg" /></figure><p><strong>My Social:</strong></p><p>LinkedIn: <a href="https://www.linkedin.com/in/ray-of-hope/">https://www.linkedin.com/in/ray-of-hope/</a></p><p>YouTube Channel: <a href="http://www.youtube.com/@arayofhope7">www.youtube.com/@arayofhope7</a></p><p>Twitter: <a href="https://x.com/ray_of_hope7">https://x.com/ray_of_hope7</a></p><p>Instagram: <a href="https://www.instagram.com/a_rayofhope7/">https://www.instagram.com/a_rayofhope7/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afc598397e24" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/day-5-dom-xss-in-jquery-anchor-href-attribute-sink-using-location-search-afc598397e24">Day 5: DOM XSS in jQuery anchor href attribute sink using location.search</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 4: DOM XSS in innerHTML sink using source location.search: Zero to Hero Series — Portswigger]]></title>
            <link>https://infosecwriteups.com/day-4-dom-xss-in-innerhtml-sink-using-source-location-search-zero-to-hero-series-portswigger-32c993b86584?source=rss-a1f9c8754880------2</link>
            <guid isPermaLink="false">https://medium.com/p/32c993b86584</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[dom-xss]]></category>
            <category><![CDATA[cross-site-scripting]]></category>
            <category><![CDATA[xs]]></category>
            <dc:creator><![CDATA[RayofHope]]></dc:creator>
            <pubDate>Tue, 27 May 2025 07:01:59 GMT</pubDate>
            <atom:updated>2025-05-27T08:18:40.026Z</atom:updated>
            <content:encoded><![CDATA[<h3>Day 4: DOM XSS in innerHTML sink using source location.search: Zero to Hero Series — Portswigger</h3><p>Hi, my fellow hackers. This is <strong>Rayofhope</strong>. I have over 5 years of experience and am currently working as a consultant with a Big 4 firm.</p><p>It’s Day 20 of posting all the PortSwigger labs, not just the solutions. I’ll break down <strong><em>why</em> </strong>we take each step, because once the <strong><em>‘why’ is clear, the ‘how’ becomes easy.</em></strong></p><p><strong>Let’s Start:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/0*VUje8eo6RKNGjRhP.jpeg" /></figure><p><strong>Before you go for this blog, make sure to read the Previous one<br></strong><a href="https://arayofhope7.medium.com/day-3-dom-xss-in-innerhtml-sink-using-source-location-search-zero-to-hero-series-portswigger-3795cf43eab7">https://arayofhope7.medium.com/day-3-dom-xss-in-innerhtml-sink-using-source-location-search-zero-to-hero-series-portswigger-3795cf43eab7</a></p><blockquote><strong>Video Walkthrough</strong> — You can watch the video or read the blog, totally up to you. But if you ask me, start with the video, then read the blog to connect all the dots.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FrftlzyjQRYw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DrftlzyjQRYw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FrftlzyjQRYw%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5ec6a152217d3dc8d376b802f7b77886/href">https://medium.com/media/5ec6a152217d3dc8d376b802f7b77886/href</a></iframe><p><em>We have access to the lab, and although there are no visible parameters, there is one input field to search the data within the application.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LBhxSYPH9FelPVzxpGzfeQ.png" /></figure><p><em>I just searched for</em><strong><em> ‘domxss’ </em></strong><em>and, as expected, there were no results or just one result. Let’s inspect the code and see where it’s being fetched from.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uAGd0XtDtsu0Zi62ci6vXw.png" /></figure><p><em>This is what we get when we inspect it, let&#39;s analyse this</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l8Lot6fA689leH1eAtgcoA.png" /></figure><p><em>Basically, what is happening here is that the application is using an HTML </em><em>&lt;span&gt; element with the ID </em><em>searchMessage, and here </em><em>id=&quot;searchMessage&quot; allows JavaScript to target and modify it.</em></p><p><strong>function doSearchQuery(query):</strong> <em>This defines a function that takes a </em><em>query (user input or search term) as an argument.<br></em><strong>document.getElementById(‘searchMessage’):</strong> <em>This gets the HTML element with the ID </em><em>searchMessage.<br></em><strong>.innerHTML = query:</strong> <em>This inserts the query directly as HTML into the span.<br></em><strong>window.location.search:</strong> <em>This is the source </em><br><strong>new URLSearchParams(…):</strong> T<em>his turns the query string into a readable format like a dictionary.<br></em><strong>.get(‘search’): </strong><em>This extracts the value of the </em><em>search parameter, e.g., </em><em>domxss.<br></em><strong>if(query):</strong> <em>This checks if there’s actually a value in the </em><em>search parameter.<br></em><strong>doSearchQuery(query)</strong>: <em>If there is, it calls the earlier function and inserts it into the page.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8iVwzqtz_M8K7HsEWcuU2Q.png" /></figure><p><em>I used/injected </em><em>&lt;script&gt;alert(&#39;rayofhope&#39;)&lt;/script&gt; in the search field, but it didn&#39;t get executed because when inserted via </em><em>.innerHTML, the </em><em>&lt;script&gt; gets added to the page but doesn&#39;t execute. Browsers ignore </em><em>&lt;script&gt; tags inserted this way for security reasons. They are intentionally designed to not execute </em><em>&lt;script&gt; tags that are added via </em><em>.innerHTML.</em></p><p><em>At this point, forget the rest of the code, we just need a clever little script that doesn’t even mention the word ‘script’. </em>Who needs rules anyway<em>? 😅</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qZ77SePQwJG7KIzEjm2C9Q.png" /></figure><p><em>I used </em><em>&lt;img src=11 onerror=alert(1)&gt; And the pop-up appeared. Let&#39;s understand why this payload works.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r6Lt4TTfoR4TrAsPNd-IKw.png" /></figure><p>Let&#39;s understand in this way: <br><em>&lt;span id=&quot;searchMessage&quot;&gt;&lt;/span&gt; creates an empty </em><em>&lt;span&gt; element in the DOM with the ID </em><em>searchMessage. This ID allows JavaScript to target and modify the element’s content. However, if user-controlled input is inserted into this element without proper sanitisation, especially using </em><em>innerHTMLIt can lead to Cross-Site Scripting (XSS) vulnerabilities. An attacker could exploit this to inject and execute malicious scripts in the browser. Therefore, it&#39;s important to handle dynamic content securely by using </em><em>textContent or properly sanitising input before injecting it into the DOM.</em></p><p><strong><em>function doSearchQuery(query) { document.getElementById(‘searchMessage’).innerHTML = query;<br>} </em></strong><em>Here, this function takes a string query as an argument. It then finds the &lt;span&gt; element in the DOM with the ID searchMessage using document.getElementById(…), and sets its innerHTML to the value of query. The issue here is that innerHTML treats the input as actual HTML, not plain text. If a query contains any HTML tags or JavaScript code (e.g., &lt;script&gt;), the browser will parse and execute it. This makes the function vulnerable to Cross-Site Scripting (XSS) attacks if the input is not properly sanitised.</em></p><p><strong>Mitigation: </strong><br><em>To prevent this, use </em><em>textContent instead, which treats the input as plain text and avoids executing any embedded HTML or scripts </em><strong><em>(document.getElementById(‘searchMessage’).textContent = query)</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-gNzJ5ElgSWYRfSvYUfLow.png" /></figure><p><strong><em>Boom! Lab solved. And hey, if you learned something and didn’t break your brain in the process, that’s a win-win!</em></strong></p><p>Happy Hunting — Do hit a like and follow for the best content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/0*b322057ktFpzBFNx.jpeg" /></figure><p><strong>My Social:</strong></p><p>LinkedIn: <a href="https://www.linkedin.com/in/ray-of-hope/">https://www.linkedin.com/in/ray-of-hope/</a></p><p>YouTube Channel: <a href="http://www.youtube.com/@arayofhope7">www.youtube.com/@arayofhope7</a></p><p>Twitter: <a href="https://x.com/ray_of_hope7">https://x.com/ray_of_hope7</a></p><p>Instagram: <a href="https://www.instagram.com/a_rayofhope7/">https://www.instagram.com/a_rayofhope7/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32c993b86584" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/day-4-dom-xss-in-innerhtml-sink-using-source-location-search-zero-to-hero-series-portswigger-32c993b86584">Day 4: DOM XSS in innerHTML sink using source location.search: Zero to Hero Series — Portswigger</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 3: DOM XSS in innerHTML sink using source location.search: Zero to Hero Series — Portswigger]]></title>
            <link>https://infosecwriteups.com/day-3-dom-xss-in-innerhtml-sink-using-source-location-search-zero-to-hero-series-portswigger-3795cf43eab7?source=rss-a1f9c8754880------2</link>
            <guid isPermaLink="false">https://medium.com/p/3795cf43eab7</guid>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[cross-site-scripting]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[xss-attack]]></category>
            <category><![CDATA[dom-xss]]></category>
            <dc:creator><![CDATA[RayofHope]]></dc:creator>
            <pubDate>Mon, 26 May 2025 13:20:41 GMT</pubDate>
            <atom:updated>2025-06-30T07:44:37.310Z</atom:updated>
            <content:encoded><![CDATA[<h3>Day 3: DOM XSS in document.write sink using source location.search: Zero to Hero Series — Portswigger</h3><p>Hi, my fellow hackers. This is <strong>Rayofhope</strong>. I have over 5 years of experience and am currently working as a consultant with a Big 4 firm.</p><p>It’s Day 20 of posting all the PortSwigger labs, not just the solutions. I’ll break down <strong><em>why</em> </strong>we take each step, because once the <strong><em>‘why’ is clear, the ‘how’ becomes easy.</em></strong></p><p><strong>Let’s Start:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/0*HqOMo716HbJy1MUE.jpeg" /></figure><blockquote><strong>Video Walkthrough</strong> — You can watch the video or read the blog, totally up to you. But if you ask me, start with the video, then read the blog to connect all the dots.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FmSPX6nkAttE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DmSPX6nkAttE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FmSPX6nkAttE%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f1d34fa80a2eb632984a9487465b845b/href">https://medium.com/media/f1d34fa80a2eb632984a9487465b845b/href</a></iframe><p><strong>What is DOM?</strong></p><p><em>DOM stands for Document Object Model; it’s a model that browsers use to render a web page. The DOM represents a web page’s structure; it defines the basic properties and behaviour of each HTML element and helps scripts dynamically access and modify the page’s content, structure, and style.</em></p><p><strong>What is DOM XSS?</strong></p><p><em>A DOM-based XSS attack is possible if the web application writes data to the Document Object Model without proper sanitisation. The attacker can manipulate this data to include XSS content on the web page, for example, malicious JavaScript code.</em></p><p>Note: -</p><h3><strong>Source</strong>:</h3><p><em>It is one of JavaScript&#39;s properties that accepts data, which is controlled by the attacker is known as the source. For instance, location.search property as this property reads input from the query string, which is easy to control by the attacker. </em><br><strong>This means that any property that the attacker can control is a potential source. ( Some of the sources example listed below) <br></strong>document.URL <br>document.documentURI<br>document.URLUnencoded<br>document.baseURI<br>location<br>document.cookie<br>document.referrer<br>window.name<br>history.pushState<br>history.replaceState<br>localStorage<br>sessionStorage</p><h3>Sink:</h3><p><em>Every DOM-based XSS vulnerability has two elements: the source of user input and the target where this user input is written, called a sink.<br></em><strong>Some examples of common sinks.</strong><br>document.write()<br>window.location<br>document.cookie<br>eval()<br>document.domain<br>WebSocket()<br>element.src<br>postMessage()<br>setRequestHeader()<br>FileReader.readAsText()<br>ExecuteSql()<br>sessionStorage.setItem()<br>document.evaluate()<br>JSON.parse()<br>element.setAttribute()</p><p><strong><em>Now that we understand what the DOM is and how it works, let’s go back to the lab and practice it.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BWBrSKuKzjH1Dcriiuc_rA.png" /></figure><p><em>If we look at the application, we don’t see any parameters, but there is a search function that can be considered an input field. Let’s see what we can find here.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rrGZ1CtHyH_5z3craSN6VA.png" /></figure><p><em>I entered a simple payload </em><strong><em>abcd </em></strong><em>and observed that it reflected in two places on the page. Digging deeper into the JavaScript source, I found that the application uses</em><strong><em>document.write</em></strong><em>, which is a known </em><strong><em>DOM sink</em></strong><em>, and the data was being read from</em><strong><em>location.search</em></strong><em>a common </em><strong><em>DOM source</em></strong><em>. This data flow from source to sink is a strong indicator of a potential </em><strong><em>DOM-based XSS vulnerability</em></strong><em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-2KnC2RgnZ4Pj8k-287E0w.png" /></figure><p><em>To test the behaviour, I injected a simple payload: </em><em>onload=alert(1). As soon as the page loaded, a JavaScript alert popped up — a clear sign that the application is </em><strong><em>vulnerable to DOM-based XSS</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B_oIb74q_-ZMciko3LreCg.png" /></figure><p>if you look closely at the source code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*30qy3q_pbLG1f_HpuUgk7A.png" /></figure><p><em>There is a </em><strong><em>Source</em></strong><em>: </em><strong><em>window.location.search</em></strong><em>, which extracts the value of the search parameter from the URL. The value </em><strong><em>onload=alert(1)</em></strong><em> gets assigned to </em><strong><em>query</em></strong><em>. Then, the </em><strong><em>Sink</em></strong><em>: </em><strong><em>document.write</em></strong><em> directly writes raw HTML into the DOM without sanitising </em><strong><em>query</em></strong><em>. This is interpreted by the browser as a valid </em><strong><em>&lt;img&gt;</em></strong><em> tag, and because </em><strong><em>onload </em></strong><em>is an event handler, the JavaScript </em><strong><em>alert(1)</em></strong><em> executes.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JsA0srzAnxXxOFd6Z1cqjQ.png" /></figure><p><strong><em>Boom! Lab solved. And hey, if you learned something and didn’t break your brain in the process, that’s a win-win!</em></strong></p><p>Happy Hunting — Do hit a like and follow for the best content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/0*sRlHdKtnhmXelH85.jpeg" /></figure><p><strong>My Social:</strong></p><p>LinkedIn: <a href="https://www.linkedin.com/in/ray-of-hope/">https://www.linkedin.com/in/ray-of-hope/</a></p><p>YouTube Channel: <a href="http://www.youtube.com/@arayofhope7">www.youtube.com/@arayofhope7</a></p><p>Twitter: <a href="https://x.com/ray_of_hope7">https://x.com/ray_of_hope7</a></p><p>Instagram: <a href="https://www.instagram.com/a_rayofhope7/">https://www.instagram.com/a_rayofhope7/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3795cf43eab7" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/day-3-dom-xss-in-innerhtml-sink-using-source-location-search-zero-to-hero-series-portswigger-3795cf43eab7">Day 3: DOM XSS in innerHTML sink using source location.search: Zero to Hero Series — Portswigger</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 2: Stored XSS into HTML context with nothing encoded: Zero to Hero Series — Portswigger]]></title>
            <link>https://infosecwriteups.com/day-2-stored-xss-into-html-context-with-nothing-encoded-zero-to-hero-series-portswigger-5bf4fbe2366d?source=rss-a1f9c8754880------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bf4fbe2366d</guid>
            <category><![CDATA[stored-xss]]></category>
            <category><![CDATA[vapt]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cross-site-scripting]]></category>
            <dc:creator><![CDATA[RayofHope]]></dc:creator>
            <pubDate>Sat, 24 May 2025 11:13:22 GMT</pubDate>
            <atom:updated>2025-06-30T07:44:53.687Z</atom:updated>
            <content:encoded><![CDATA[<h3>Day 2: Stored XSS into HTML context with nothing encoded: Zero to Hero Series — Portswigger</h3><p>Hi, my fellow hackers. This is <strong>Rayofhope</strong>. I have over 5 years of experience and am currently working as a consultant with a Big 4 firm.</p><p>It’s Day 19 of posting all the PortSwigger labs, not just the solutions. I’ll break down <strong><em>why</em> </strong>we take each step, because once the <strong><em>‘why’ is clear, the ‘how’ becomes easy.</em></strong></p><p><strong>Let’s Start:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/0*L0SSiN_g__M0Ij40.jpeg" /></figure><blockquote><strong>Video Walkthrough</strong> — You can watch the video or read the blog, totally up to you. But if you ask me, start with the video, then read the blog to connect all the dots.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FYrhYC-T6aP0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DYrhYC-T6aP0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FYrhYC-T6aP0%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c3507485e1e2afbbef65bd1814c32ca0/href">https://medium.com/media/c3507485e1e2afbbef65bd1814c32ca0/href</a></iframe><p>What is Stored XSS?</p><blockquote>Stored XSS arises when an application receives data from an untrusted source and includes that data within its later responses in an unsafe way.</blockquote><blockquote>Steal Cookie Info<br>Session ID<br>Dedicated delivery of browser-based attack.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DxYF-6NRaB0LAmcGL_MAaQ.png" /></figure><h3>Let’s solve the lab:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n_TfIjp5si6bYqOjG6In1g.png" /></figure><p><em>This is how the lab appears at first glance. We don’t see any obvious input fields or parameters, but there’s a feature labelled </em><strong><em>“View Post”. </em></strong><em>Let’s see what we can find from it.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dlWssX2To9ozr79nCoc2lg.png" /></figure><p><em>Here, we can see that there’s a parameter in the URL. Let’s scroll down and check if there’s anything else, perhaps an input field or some other interaction point.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jzoaG3TEloGmKondNxct0A.png" /></figure><p><em>We can see a field to post a comment, which suggests that the input might be getting stored. Let’s test it to see if we can exploit it.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jGO7NdlqhCtG7HkswRUwEA.png" /></figure><p><em>In the comment box, I entered </em><strong><em>&lt;script&gt;alert(&#39;rayofhope&#39;)&lt;/script&gt;</em></strong><em>, filled in the other required details and submitted the comment.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fWShRha6Hx927-m_Ngz8_g.png" /></figure><p><em>We can see that the comment has been successfully posted and the lab is marked as solved. However, the alert didn’t pop up immediately. This is because it’s a </em><strong><em>Stored XSS</em></strong><em> vulnerability, the payload gets stored in the application and will execute only when the relevant functionality </em><strong><em>(like viewing the comment)</em></strong><em> is accessed.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z7LN9aJh4MXc2NBil_ZZ5Q.png" /></figure><p>Let&#39;s view the comment</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-f_R9ddUAfdQByXu42ccDQ.png" /></figure><p><strong><em>Boom! Lab solved. And hey, if you learned something and didn’t break your brain in the process, that’s a win-win!</em></strong></p><p>Happy Hunting — Do hit a like and follow for the best content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/0*AcsNRPpHm6lRII9z.jpeg" /></figure><p><strong>My Social:</strong></p><p>LinkedIn: <a href="https://www.linkedin.com/in/ray-of-hope/">https://www.linkedin.com/in/ray-of-hope/</a></p><p>YouTube Channel: <a href="http://www.youtube.com/@arayofhope7">www.youtube.com/@arayofhope7</a></p><p>Twitter: <a href="https://x.com/ray_of_hope7">https://x.com/ray_of_hope7</a></p><p>Instagram: <a href="https://www.instagram.com/a_rayofhope7/">https://www.instagram.com/a_rayofhope7/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bf4fbe2366d" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/day-2-stored-xss-into-html-context-with-nothing-encoded-zero-to-hero-series-portswigger-5bf4fbe2366d">Day 2: Stored XSS into HTML context with nothing encoded: Zero to Hero Series — Portswigger</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 1: Reflected XSS into HTML context with nothing encoded: Zero to Hero Series— Portswigger]]></title>
            <link>https://infosecwriteups.com/day-1-reflected-xss-into-html-context-with-nothing-encoded-zero-to-hero-series-portswigger-8cb15403ba29?source=rss-a1f9c8754880------2</link>
            <guid isPermaLink="false">https://medium.com/p/8cb15403ba29</guid>
            <category><![CDATA[xs]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cross-site-scripting]]></category>
            <category><![CDATA[reflected-xss]]></category>
            <dc:creator><![CDATA[RayofHope]]></dc:creator>
            <pubDate>Sat, 24 May 2025 10:22:16 GMT</pubDate>
            <atom:updated>2025-06-30T07:44:59.836Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi, my fellow hackers. This is <strong>Rayofhope</strong>. I have over 5 years of experience and am currently working as a consultant with a Big 4 firm.</p><p>It’s Day 18 of posting all the PortSwigger labs, not just the solutions. I’ll break down <strong><em>why</em> </strong>we take each step, because once the <strong><em>‘why’ is clear, the ‘how’ becomes easy.</em></strong></p><p><strong>Let’s Start:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/0*76zbowVRUjK7CZ2p.jpeg" /></figure><blockquote><strong>Video Walkthrough</strong> — You can watch the video or read the blog, totally up to you. But if you ask me, start with the video, then read the blog to connect all the dots.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FRTCeu6L-Wq4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DRTCeu6L-Wq4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FRTCeu6L-Wq4%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fdeb2ced97add53ff28a88ef805d0e32/href">https://medium.com/media/fdeb2ced97add53ff28a88ef805d0e32/href</a></iframe><p>What is Reflected XSS?</p><p><strong><em>Reflected XSS</em></strong><em> arises when an </em><strong><em>application </em></strong><em>receives data from an untrusted source and includes that data within immediate responses in an unsafe way.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*52Wa_xHv4gDN2q73shATUQ.png" /></figure><p>Impact of Reflected XSS:</p><blockquote>Reflected XSS can have serious consequences, including but not limited to <strong>Data Theft, Account Hijacking or Malware Installation.</strong></blockquote><blockquote><strong>Data Theft:</strong> Attackers can steal sensitive user information, such as login credentials, credit card details, or personal data.</blockquote><blockquote><strong>Account Hijacking:</strong> By compromising a user’s account, attackers can perform unauthorised actions or steal valuable assets.</blockquote><blockquote><strong>Malware Installation: </strong>Attackers can use XSS to install malicious software, such as viruses, spyware, or ransomware, on the user’s device.</blockquote><p>Mitigating Reflected XSS Attacks:</p><blockquote><strong>Input Validation: </strong>Validate all user inputs by ensuring that they are of the correct type, length, and format.</blockquote><blockquote><strong>Output Encoding: </strong>Encode user-supplied data before it is displayed on the website, preventing it from being interpreted as HTML.</blockquote><blockquote><strong>Content Security Policy (CSP):</strong> Use CSP to control the resources that are allowed to be loaded on the website, restricting the execution of malicious scripts.</blockquote><h3>Let&#39;s solve the lab:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PfHy0aXB1ymCQF98CoBy1A.png" /></figure><p><em>We have a search function, which indicates that there is one input field. Since every input and every parameter can be tested for XSS, let’s try using a basic script: </em><strong><em>&lt;script&gt;alert(&#39;rayofhope&#39;)&lt;/script&gt;</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uPTk1N46BZDgoXRwK2z8ZA.png" /></figure><p><em>And we can see that as a result of the script, the alert with </em><strong><em>‘rayofhope’ </em></strong><em>popped up, which means the application is vulnerable to XSS.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d6aZubDsqyHOdg1UC3zYVg.png" /></figure><p><strong><em>Boom! Lab solved. And hey, if you learned something and didn’t break your brain in the process, that’s a win-win!</em></strong></p><p>Happy Hunting — Do hit a like and follow for the best content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/0*vskWLSUwA5DrWWhG.jpeg" /></figure><p><strong>My Social:</strong></p><p>LinkedIn: <a href="https://www.linkedin.com/in/ray-of-hope/">https://www.linkedin.com/in/ray-of-hope/</a></p><p>YouTube Channel: <a href="http://www.youtube.com/@arayofhope7">www.youtube.com/@arayofhope7</a></p><p>Twitter: <a href="https://x.com/ray_of_hope7">https://x.com/ray_of_hope7</a></p><p>Instagram: <a href="https://www.instagram.com/a_rayofhope7/">https://www.instagram.com/a_rayofhope7/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8cb15403ba29" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/day-1-reflected-xss-into-html-context-with-nothing-encoded-zero-to-hero-series-portswigger-8cb15403ba29">Day 1: Reflected XSS into HTML context with nothing encoded: Zero to Hero Series— Portswigger</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Day 17 Blind SQL injection with out-of-band data exfiltration — Zero to Hero out-of-band —…]]></title>
            <link>https://infosecwriteups.com/day-17-blind-sql-injection-with-out-of-band-data-exfiltration-zero-to-hero-out-of-band-a7f770ab30a0?source=rss-a1f9c8754880------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7f770ab30a0</guid>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[vapt]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[RayofHope]]></dc:creator>
            <pubDate>Sun, 18 May 2025 19:51:33 GMT</pubDate>
            <atom:updated>2025-07-29T07:54:23.516Z</atom:updated>
            <content:encoded><![CDATA[<h3>Day 17 Blind SQL injection with out-of-band data exfiltration — Zero to Hero out-of-band — Portswigger</h3><p>Hi, my fellow hackers. This is <strong>Rayofhope</strong>. I have over 5 years of experience and am currently working as a consultant with a Big 4 firm.</p><p>It’s Day 17 of posting all the PortSwigger labs, not just the solutions. I’ll break down <strong><em>why</em> </strong>we take each step, because once the <strong><em>‘why’ is clear, the ‘how’ becomes easy.</em></strong></p><p><strong>Let’s Start:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/0*wrKcWIe2G9BG15yi.jpeg" /></figure><p><strong>Before you go for this blog, make sure to read the Previous one</strong><br><a href="https://arayofhope7.medium.com/day-16-blind-sql-injection-with-out-of-band-interaction-zero-to-hero-out-of-band-portswigger-80cca693aa03">https://arayofhope7.medium.com/day-16-blind-sql-injection-with-out-of-band-interaction-zero-to-hero-out-of-band-portswigger-80cca693aa03</a></p><blockquote><strong>Video Walkthrough</strong> — You can watch the video or read the blog, totally up to you. But if you ask me, start with the video, then read the blog to connect all the dots.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FQI_sQPWU_iA%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DQI_sQPWU_iA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FQI_sQPWU_iA%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/06e28b4c2428e983bc30fc21888afb8a/href">https://medium.com/media/06e28b4c2428e983bc30fc21888afb8a/href</a></iframe><p>Notes: —</p><p>If you recall from my previous write-ups, I have explained that the Oracle database contains a virtual table named DUAL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*Xy4Qu4i9AdxnzfoDtv9Ovw.png" /></figure><p>We used XXE (XML External Entity) to load external entities and cause an HTTP request, and an OOB (Out-of-Band) channel to extract data through DNS, and that’s how out-of-band exfiltration is possible.</p><p>let’s solve the lab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GnFx0hFbqQ93duBjD7cS3g.png" /></figure><p><em>Refreshed the page and intercepted the request in Burp, as you can see below.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LThlmGX9dn3JBAWgVli9Ow.png" /></figure><p><em>Since we have only one parameter and we know that we are going to perform an OOB attack, I will test the payloads one by one to check if the application is vulnerable to OOB SQL Injection.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7HIUI45uG41ZulJvCMr4NQ.png" /></figure><p><em>I started the Collaborator and copied the Collaborator payload. Now, I will insert it into the parameter in an OOB SQL Injection format.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V94mvuVJIjaTKnU_HMOlIw.png" /></figure><p><em>I used an </em><strong><em>Oracle-based Out-of-Band (OOB) payload</em></strong><em>, and it returned an error. Used CTRL+U to encode it and send it, and it returned 200 OK.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hde1rKzohdUZsq6UBYBApA.png" /></figure><p><em>This confirms the presence of a </em><strong><em>blind SQL injection vulnerability</em></strong><em>, where the payload triggered an OOB interaction via the Burp Collaborator.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*szD92Zxhe9LnQXIi62h2Vg.png" /></figure><p><em>We can see that along with the domain name. We got the password as well.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ygirpfZUXgts-RsDcRX9RA.png" /></figure><p><strong><em>Boom! Lab solved. And hey, if you learned something and didn’t break your brain in the process, that’s a win-win!</em></strong></p><p>Mitigations:</p><ul><li>Disable DTD parsing in XML functions.</li><li>Restrict <strong>network access</strong> from the DB server to the internet.</li><li>Use <strong>firewalls</strong> and <strong>DNS logging</strong> to detect unusual lookups.</li></ul><p>Happy Hunting — Do hit a like and follow for the best content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/0*3zdDcshf-0H7BqVv.jpeg" /></figure><p><strong>My Social:</strong></p><p>LinkedIn: <a href="https://www.linkedin.com/in/ray-of-hope/">https://www.linkedin.com/in/ray-of-hope/</a></p><p>YouTube Channel: <a href="http://www.youtube.com/@arayofhope7">www.youtube.com/@arayofhope7</a></p><p>Twitter: <a href="https://x.com/ray_of_hope7">https://x.com/ray_of_hope7</a></p><p>Instagram: <a href="https://www.instagram.com/a_rayofhope7/">https://www.instagram.com/a_rayofhope7/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7f770ab30a0" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/day-17-blind-sql-injection-with-out-of-band-data-exfiltration-zero-to-hero-out-of-band-a7f770ab30a0">Day 17 Blind SQL injection with out-of-band data exfiltration — Zero to Hero out-of-band —…</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>