<?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 Mohammed Ehab on Medium]]></title>
        <description><![CDATA[Stories by Mohammed Ehab on Medium]]></description>
        <link>https://medium.com/@mohammad.ehab7760?source=rss-a8121c8ce626------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zv15KYoMRREzHiK6BluH_A.png</url>
            <title>Stories by Mohammed Ehab on Medium</title>
            <link>https://medium.com/@mohammad.ehab7760?source=rss-a8121c8ce626------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 10:37:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mohammad.ehab7760/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[One Overlooked Query Parameter: How a Single Line of Unsanitized Input Can Undo a Platform’s Entire…]]></title>
            <link>https://medium.com/@mohammad.ehab7760/one-overlooked-query-parameter-how-a-single-line-of-unsanitized-input-can-undo-a-platforms-entire-9a1742755550?source=rss-a8121c8ce626------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a1742755550</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[xss-attack]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Mohammed Ehab]]></dc:creator>
            <pubDate>Sun, 13 Sep 2026 21:38:25 GMT</pubDate>
            <atom:updated>2026-09-13T21:38:25.424Z</atom:updated>
            <content:encoded><![CDATA[<h3>One Overlooked Query Parameter: How a Single Line of Unsanitized Input Can Undo a Platform’s Entire Trust Model</h3><p><em>A field note from a penetration tester on discovering — and responsibly disclosing — a reflected XSS vulnerability on a live job-search platform.</em></p><p>Every once in a while, you stumble onto a vulnerability while doing absolutely nothing sophisticated. No custom tooling, no exotic bypass chain, no zero-day research. Just… browsing. That’s exactly how this one happened.</p><p>I wasn’t hunting. I was job-hunting — literally scrolling through listings on a public job-search platform used by startups and job seekers alike. Somewhere between filtering locations and skimming postings, something in the URL bar caught my eye: a search parameter that looked a little too trusting of whatever I typed into it.</p><p>So I typed something into it.</p><p><strong>A JavaScript alert box popped up.</strong></p><p>That’s the moment every penetration tester knows well — the small, almost comedic “it actually worked” jolt that turns a casual afternoon into a disclosure timeline.</p><h3>What Actually Went Wrong</h3><p>The vulnerability itself is a textbook case of <strong>Reflected Cross-Site Scripting (XSS)</strong> — one of the oldest and most well-documented vulnerability classes on the web, and yet still one of the most common findings in real-world bug bounty programs today, more than two decades after it was first described.</p><p>Here’s the core issue, stripped down to its essence: a value the user types into a search field gets echoed back into the page — into the visible content, and in this case even into the browser tab’s title — without the platform properly encoding special characters like &lt;, &gt;, or &quot; first. Normally, a browser treats those characters as inert text. But if a server reflects them back <em>unescaped</em>, the browser instead interprets them as live HTML and JavaScript. In other words, one specially-crafted link is enough to make your browser execute code that came from someone else, while still believing it came from a trusted site.</p><p>While digging around the platform a bit further, I also noticed a second, related weak point: a user-facing profile field that appeared to store special characters without proper sanitization either. Two independent findings pointing to the same underlying gap is rarely a coincidence — it usually means input handling wasn’t treated as a first-class security concern across the codebase, not just in one form.</p><h3>Why “Just an Alert Box” Is Never Just an Alert Box</h3><p>A JavaScript alert() popping up looks harmless — almost like a party trick. But it&#39;s a proof-of-concept, not the actual attack. In the hands of someone with different intentions, that same injection point could instead be used to:</p><ul><li><strong>Steal session cookies or authentication tokens</strong>, especially if they aren’t protected with the HttpOnly flag — turning a single clicked link into a full account takeover.</li><li><strong>Perform actions on behalf of the victim</strong> without their knowledge — editing content, submitting forms, or triggering account changes silently in the background.</li><li><strong>Overlay a convincing fake login form</strong> on top of a page the user already trusts, harvesting credentials directly.</li><li><strong>Silently redirect victims</strong> to phishing pages or malware, all while the address bar still shows the legitimate domain.</li></ul><p>This is precisely why reflected XSS, despite requiring “just” a crafted link and a click, is consistently rated as a serious — sometimes critical — vulnerability class. The browser’s entire security model is built around trusting content that comes from a given origin. Reflected XSS breaks that trust from the inside.</p><h3>The Disclosure</h3><p>I did what responsible disclosure is supposed to look like: I stopped at proof-of-concept. No session hijacking, no data exfiltration, no attempts to pivot the finding into something bigger than it needed to be to prove impact. I documented:</p><ul><li>The technical root cause</li><li>Step-by-step reproduction instructions</li><li>A realistic assessment of business impact</li><li>Concrete remediation guidance (output encoding, a stricter Content-Security-Policy, and hardened cookie flags)</li></ul><p>…and sent the full report directly to the platform’s support team, requesting it be routed to whoever owns security there.</p><p>At the time of writing, the report is still under review, which is exactly why you won’t find the platform’s name, its URL, or the exact payload anywhere in this article. Publishing exploit-ready details for a vulnerability that hasn’t been fixed yet doesn’t help anyone — it just hands a working attack to whoever reads it first. If and when the issue is resolved, that’s a conversation for a different, more detailed follow-up.</p><h3>The Lesson, for Builders and Breakers Alike</h3><p>If you’re building web applications: <strong>never trust a “we’ll just skip it, it’s a small field” moment.</strong> Every place user input touches your rendered HTML — a search box, a profile name, a comment field, even something as unassuming as a page title — is a potential injection point. Output encoding isn’t a “nice to have” bolted on later; it has to be the default behavior for anything user-controlled.</p><p>If you’re breaking web applications for a living (or for fun, responsibly): don’t underestimate the boring-looking parameters. Some of the most impactful findings I’ve come across didn’t need custom tooling or novel research — they needed someone to actually look at what a query parameter does with what you give it.</p><p>Sometimes the most dangerous line of code isn’t the one doing something complex. It’s the one that was never told <em>not</em> to trust you.</p><p><em>I’m a penetration tester focused on web application security and Active Directory attack simulation. If you’re a platform owner reading this and think this might be about you — reach out to your own security team first. Chances are, you already know the fix.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a1742755550" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From a Single Permission to Forest Compromise: Lessons from an Active Directory Attack Path]]></title>
            <link>https://medium.com/@mohammad.ehab7760/from-a-single-permission-to-forest-compromise-lessons-from-an-active-directory-attack-path-4078d5974931?source=rss-a8121c8ce626------2</link>
            <guid isPermaLink="false">https://medium.com/p/4078d5974931</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[red-teaming]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Mohammed Ehab]]></dc:creator>
            <pubDate>Mon, 15 Jun 2026 17:45:51 GMT</pubDate>
            <atom:updated>2026-06-15T17:45:51.753Z</atom:updated>
            <content:encoded><![CDATA[<p>Active Directory remains the backbone of identity and access management in countless enterprise environments. It is also one of the most attractive targets for attackers.</p><p>During a recent Active Directory assessment simulation, I encountered an attack path that perfectly demonstrated how a series of seemingly low-risk misconfigurations can be chained together into a complete forest compromise.</p><p>This article is not a step-by-step walkthrough of a specific lab or certification environment. Instead, it focuses on the methodology, thought process, and lessons learned while navigating a complex Active Directory attack path.</p><h3>The Goal Was Never Domain Admin</h3><p>One of the biggest mistakes newcomers make during Active Directory engagements is focusing exclusively on obtaining Domain Admin privileges as quickly as possible.</p><p>In reality, successful assessments rarely follow a direct path.</p><p>Modern Active Directory environments are built around relationships, permissions, delegated administration, and trust boundaries. The objective is not to find a single critical vulnerability but to identify how multiple small weaknesses interact with each other.</p><p>The key question becomes:</p><blockquote><em>What can I do with the permissions I already have?</em></blockquote><h3>Phase One: Enumeration Changes Everything</h3><p>The assessment began with extensive enumeration.</p><p>Rather than immediately targeting privileged accounts, I focused on understanding the environment itself:</p><ul><li>User and computer relationships</li><li>Delegated permissions</li><li>Group memberships</li><li>Trust relationships</li><li>Certificate infrastructure</li><li>Service accounts</li></ul><p>Graph-based analysis quickly revealed an interesting object control relationship.</p><p>A machine account possessed delegated permissions over another object.</p><p>At first glance, the finding seemed insignificant.</p><p>It wasn’t.</p><p>This single permission became the starting point for the entire attack chain.</p><h3>Looking Beyond Local Administrator Access</h3><p>When object-level permissions are discovered, it is important to think beyond traditional privilege escalation techniques.</p><p>Questions that guided the assessment included:</p><ul><li>Can this permission be abused for delegation?</li><li>Does it allow impersonation?</li><li>Can it influence authentication flows?</li><li>Does it provide a path toward credential access?</li></ul><p>After evaluating several possibilities, Resource-Based Constrained Delegation (RBCD) emerged as the most promising route.</p><p>By abusing the existing trust relationship, it became possible to impersonate a privileged user and gain access to a management system.</p><p>This phase reinforced an important lesson:</p><blockquote><em>In Active Directory, object permissions are often more valuable than local administrator rights.</em></blockquote><h3>Privileges Hidden in Plain Sight</h3><p>Once access to additional systems was established, new opportunities began to appear.</p><p>Credential material alone was not enough.</p><p>The real value came from understanding how those credentials interacted with the surrounding permission model.</p><p>Further analysis uncovered indirect privilege relationships that allowed controlled group membership changes and access expansion.</p><p>This demonstrated a fundamental principle of Active Directory security:</p><p>Attack paths are rarely linear.</p><p>Instead of:</p><blockquote><em>User → Domain Admin</em></blockquote><p>The reality of modern enterprise environments often looks like a highly chained path. For instance, a typical complex Active Directory attack vector follows this blueprint:</p><blockquote><em>Machine Account ➔ Delegation Abuse ➔ Credential Access ➔ Group Abuse ➔ ADCS ➔ Domain Admin ➔ Forest Trust</em></blockquote><p>Understanding these relationships is where graph-based analysis becomes invaluable.</p><h3>When Traditional Paths End, Look at ADCS</h3><p>Eventually, the attack path appeared to reach a dead end.</p><p>No obvious privilege escalation routes remained.</p><p>This is where Active Directory Certificate Services (ADCS) changed everything.</p><p>Certificate templates, enrollment permissions, and trust relationships introduced an entirely new attack surface.</p><p>By combining certificate enrollment rights with template misconfigurations, it became possible to escalate privileges and ultimately achieve domain dominance.</p><p>ADCS continues to be one of the most underestimated attack surfaces in enterprise environments.</p><h3>Beyond the Domain: Understanding Forest Trusts</h3><p>Compromising a single domain is often not the end goal.</p><p>Many enterprise environments rely on trust relationships between multiple domains and forests.</p><p>After achieving domain-level administrative access, trust enumeration revealed additional opportunities for expansion.</p><p>By understanding how authentication flows across trust boundaries, it became possible to extend access beyond the initial environment.</p><p>This final stage highlighted an important reality:</p><p>Forest trusts significantly increase the impact of a compromise.</p><h3>Key Takeaways</h3><p>This assessment reinforced several important lessons:</p><ul><li>Small permissions can lead to major compromises.</li><li>Machine accounts deserve the same attention as user accounts.</li><li>Delegation misconfigurations can create unexpected attack paths.</li><li>Group membership changes can be as dangerous as credential theft.</li><li>ADCS misconfigurations can provide direct paths to domain dominance.</li><li>Trust relationships must be continuously reviewed and monitored.</li></ul><p>Most importantly:</p><p>Attack paths in Active Directory rarely depend on a single critical weakness.</p><p>They emerge from the combination of multiple low-risk findings that, when chained together, create significant security impact.</p><h3>Final Thoughts</h3><p>Technical knowledge is essential in Active Directory security assessments.</p><p>However, successful engagements rely just as much on understanding relationships, permissions, and trust boundaries.</p><p>The most valuable skill is not memorizing tools or commands.</p><p>It is learning how to think in attack paths.</p><p>Because in Active Directory, compromise is often just one overlooked permission away.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4078d5974931" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How a Simple MFA Test Turned Into an Interesting Authentication Research Case]]></title>
            <link>https://medium.com/@mohammad.ehab7760/how-a-simple-mfa-test-turned-into-an-interesting-meta-authentication-research-case-e39a4ef6990f?source=rss-a8121c8ce626------2</link>
            <guid isPermaLink="false">https://medium.com/p/e39a4ef6990f</guid>
            <category><![CDATA[meta]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Mohammed Ehab]]></dc:creator>
            <pubDate>Sat, 13 Jun 2026 02:42:23 GMT</pubDate>
            <atom:updated>2026-10-14T05:49:42.743Z</atom:updated>
            <content:encoded><![CDATA[<p>Like many security researchers, I occasionally spend time reviewing authentication flows on platforms that I personally use. Most of the time, nothing interesting happens. This time was different.</p><p>What started as a simple observation during a routine MFA (Multi-Factor Authentication) review on a popular social platform eventually led me down a rabbit hole involving OTP validity, authentication state management, and rate-limiting behavior. I tested everything exclusively on my own account and followed a responsible disclosure process after completing my research.</p><h3>The First Thing That Caught My Attention</h3><p>The investigation started with something relatively simple. While reviewing the platform’s MFA verification flow, I noticed that the verification page appeared to tolerate a large number of incorrect submissions without introducing meaningful restrictions.</p><p>Normally, modern authentication systems rely on multiple protective mechanisms:</p><ul><li>Rate limiting</li><li>Temporary lockouts</li><li>Progressive delays</li><li>Challenge expiration</li><li>Automated abuse detection</li></ul><p>At first glance, it seemed that some of those controls were either missing or not operating as aggressively as I expected. Initially, I believed this was the entire story. It wasn’t.</p><h3>Looking at the Authentication State</h3><p>After spending more time analyzing the flow, I became curious about how long the verification process remained active. Instead of focusing on the code itself, I started looking at the lifecycle of the authentication challenge.</p><ul><li>Would the challenge expire quickly?</li><li>Would older verification codes become invalid?</li><li>Would requesting a newer code invalidate previous ones?</li></ul><p>The answers turned out to be more interesting than I expected.</p><h3>An Unexpected Observation</h3><p>During testing, I observed that previously generated verification codes remained usable for a surprisingly long period of time. In some situations, codes that had been generated more than 24 hours earlier were still accepted by the authentication process.</p><p>Even more interestingly, multiple previously generated codes appeared to remain valid simultaneously. As long as none of those codes had been successfully redeemed, older codes could still be accepted by the system.</p><p>Once a successful verification occurred, the remaining unused codes were invalidated. This behavior immediately raised questions about how the authentication state was being managed behind the scenes.</p><h3>Why This Was Interesting</h3><p>The security of MFA is not determined solely by the randomness of a six digit code. The surrounding controls are equally important.</p><p>When evaluating authentication systems, researchers often focus on questions such as:</p><ul><li>How long should a verification code remain valid?</li><li>Should generating a new code invalidate older ones?</li><li>How long should an authentication challenge remain active?</li><li>How many attempts should be allowed before restrictions are applied?</li></ul><p>These questions may seem minor individually. However, authentication security is often shaped by the interaction between multiple small design decisions rather than a single obvious vulnerability.</p><h3>The Bigger Lesson</h3><p>One of the most valuable lessons from this research was realizing how important authentication lifecycle management really is.</p><p>Developers often focus on generating secure verification codes, but code generation is only one piece of the puzzle. Authentication systems must also manage:</p><ul><li>Expiration policies</li><li>Challenge lifetimes</li><li>Session state</li><li>Retry controls</li><li>Abuse prevention mechanisms</li></ul><p>Even when the underlying authentication technology is secure, weaknesses in surrounding controls can change the overall security posture of the system.</p><h3>Responsible Disclosure</h3><p>After documenting my findings and collecting supporting evidence, I submitted a report through the platform’s responsible disclosure program. The report was reviewed by the security team, and after roughly three months of follow-up, the underlying behavior was fixed.</p><p>While the initial behavior was not considered an immediate security issue, I still found the research process valuable because it provided a real-world example of how large-scale authentication systems handle OTP lifecycle management and verification state persistence.</p><p>Not every security report results in a bounty or a confirmed vulnerability. Sometimes the most valuable outcome is the learning experience itself.</p><h3>Final Thoughts</h3><p>Security research is often portrayed as a search for critical vulnerabilities and dramatic account takeovers. In reality, much of the work involves understanding how systems behave under unusual conditions and questioning assumptions about how security controls should operate.</p><p>This particular case reminded me that authentication security is rarely defined by a single component. Instead, it emerges from the interaction between code validity, challenge management, session handling, expiration policies, and abuse prevention controls.</p><p>Sometimes, the most interesting discoveries emerge not from exploits, but from patiently mapping the boundaries of established infrastructure logic.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e39a4ef6990f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>