<?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 0xmosshead on Medium]]></title>
        <description><![CDATA[Stories by 0xmosshead on Medium]]></description>
        <link>https://medium.com/@suryaprakashgeesala?source=rss-763947504a7a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*VrKJ-qD5v019_Qiub_XReQ.jpeg</url>
            <title>Stories by 0xmosshead on Medium</title>
            <link>https://medium.com/@suryaprakashgeesala?source=rss-763947504a7a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 02:37:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@suryaprakashgeesala/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[5 Surprising Lessons from the World of AppSec]]></title>
            <link>https://medium.com/@suryaprakashgeesala/5-surprising-lessons-from-the-world-of-appsec-1141ddf3256e?source=rss-763947504a7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1141ddf3256e</guid>
            <category><![CDATA[application-security]]></category>
            <category><![CDATA[appsec]]></category>
            <category><![CDATA[web-application-security]]></category>
            <dc:creator><![CDATA[0xmosshead]]></dc:creator>
            <pubDate>Tue, 14 Oct 2025 13:51:14 GMT</pubDate>
            <atom:updated>2025-10-24T13:15:30.191Z</atom:updated>
            <content:encoded><![CDATA[<p>When we think of cybersecurity, our minds often jump to cinematic images: shadowy hackers in dark rooms, complex digital fortresses under siege, and high-stakes virtual battles. This perception paints a picture of security as a dramatic, technology-driven conflict fought on the digital frontier.</p><p>While those scenarios exist, the most critical principles of modern application security are often less about fending off dramatic attacks and more about psychology, process, and the surprising realities of how software is built today. The truth is that our intuition about digital risk can be deeply flawed, and the most effective security strategies are often counter-intuitive.</p><p>This article reveals five truths from the world of application security that challenge common assumptions. Understanding them is essential for anyone involved in building, managing, or protecting modern software.</p><ol><li><strong>Your Brain Is Terrible at Assessing Digital Risk</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/0*iOd7BWH1jVvQSn8A.png" /></figure><p>Consider two potential threats: a grizzly bear and a simple set of stairs. Most people experience a visceral, immediate fear of the bear, while viewing the stairs as a mundane part of daily life. Yet, statistics tell a different story. On average, 12,000 people die from falling down stairs each year, while only a few dozen are killed by bears.</p><p>Our brains fixate on the bear because it represents a high-impact, terrifying event. But true risk assessment is a function of both impact and likelihood. Most people who fall down the stairs may get right back up with some bumps and bruises, while the off chance of being attacked by a bear is likely to be much more fatal. The stairs are a low-impact, high-likelihood threat; the bear is a high-impact, low-likelihood one.</p><p>This cognitive bias applies directly to application security. We tend to fear the “Hollywood” attack from an “advanced persistent threat (APT),” a sophisticated, well-funded adversary. While concerning, the reality is that most organizations should be more worried about “the daily noise that comes from automated attacks and less sophisticated attackers.” Effective security requires allocating resources to defend against the most <em>likely</em> threats, not just the most <em>frightening</em> ones. But assessing risk accurately depends on having good information, which brings us to the tools we rely on to find threats in the first place.</p><p><strong>2. The Most Dangerous Threat Is the One Your Tools Don’t See</strong></p><p>In security, automated analysis tools produce two types of errors. A “false positive” occurs when a tool flags a non-issue as a vulnerability. A “false negative” is the opposite and far more dangerous: the tool fails to identify a real, existing security issue.</p><p>False positives are a well-known problem. They create “noise” that can overwhelm teams and “grind teams down” with the effort required to investigate and dismiss them. The source text warns of a deeper organizational consequence: “a large number of false positives will reduce the confidence in the tools being used, and by extension, the confidence of the security team.” When the security team’s credibility erodes, their guidance is ignored and the entire program suffers. However, the more profound danger comes from false negatives, which create a deceptive sense of safety.</p><p><strong>NOTE : </strong>Make no mistake, false negatives can be as bad as, if not worse than, false positives. Whereas false positives will grind teams down with the amount of work that is required to filter out the issues, false negatives have the result of giving the organization a false sense of security.</p><p>When a tool fails to detect a genuine vulnerability, it gives the organization the illusion that its application is secure when it is not. Blindly trusting security tools without understanding their limitations is a major pitfall. This challenge is magnified when we realize that our tools aren’t just scanning our own code, but a complex web of code from countless other sources.</p><p><strong>3. Most of “Your” Code Isn’t Actually Yours</strong></p><p>One of the most surprising facts about modern software development is that “a small percentage of code is actually written by a developer.” Instead of writing everything from scratch, developers build applications by integrating numerous third-party and open-source libraries and packages. This process is much like building a car, which is assembled from countless individual components and complex electronic systems sourced from many suppliers.</p><p>This reality is managed through a process called <strong>Software Composition Analysis (SCA)</strong>, which scans an application’s codebase to identify all its open-source components. The challenge is that this creates a complex software supply chain. A “<strong>direct dependency</strong>” is a library your team adds to a project. A “<strong>transitive dependency</strong>” is a library that your direct dependency relies on, which in turn might rely on others. A critical vulnerability can be hidden several layers deep in this chain.</p><p>This creates a practical nightmare. Fixing a deep-seated vulnerability is rarely a simple swap. As the source text asks, “What if the library requires you to upgrade other libraries or change your code?” A single fix can trigger a cascade of difficult and time-consuming engineering work. This fundamentally changes the job of application security. It’s no longer just about securing the code you write in-house; it’s about vetting, managing, and securing a vast, interconnected ecosystem of code written by others. Since we can’t possibly secure this vast ecosystem on our own, the most forward-thinking companies have adopted a radical new strategy: they invite outsiders to help.</p><p><strong>4. Sometimes, the Best Defense Is a Good Invitation</strong></p><p>The traditional “fortress” mentality of security involves building impenetrable digital walls to keep adversaries out. However, a more modern and effective strategy is to actively invite trusted outsiders to find your weaknesses before malicious actors do. This is accomplished through <strong>Vulnerability Disclosure Programs (VDPs)</strong> and Bug Bounty Programs (BBPs).</p><p>These programs create a safe and legal channel for external security researchers to find and report vulnerabilities “without the fear of retribution.” Beyond the philosophical shift, a VDP solves a critical logistical problem: it “simplifies the process of getting this security information to the right team.” Well-meaning researchers no longer have to guess who to contact or risk having their reports lost in a general support inbox. A BBP goes a step further by offering financial incentives for valid findings, turning a global community of security experts into allies.</p><p>This represents a significant mindset shift. Instead of viewing all external researchers as adversaries, this collaborative approach treats them as valuable partners. It acknowledges that no internal team can find every flaw and that inviting more eyes to inspect your systems makes them stronger.</p><h3>Conclusion: Security Is a Conversation, Not a Checklist</h3><p>The common thread connecting these truths is that effective application security is nuanced, often counter-intuitive, and relies as much on human process and critical thinking as it does on technology. It’s about understanding our own psychological biases, acknowledging the limitations of our tools, managing complex supply chains, and fostering collaboration instead of confrontation.</p><p>Moving from a checklist mentality to a conversational one is the single most important competitive advantage for a modern software organization. A culture that treats security as a continuous, collaborative dialogue rather than a final, bureaucratic gate builds more resilient software. It empowers teams to ship features faster with confidence, fosters innovation, and ultimately attracts and retains top talent who thrive in an environment of shared ownership and trust. Security isn’t a problem to be solved; it’s a process to be managed, together.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1141ddf3256e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Authentication Mechanisms]]></title>
            <link>https://medium.com/@suryaprakashgeesala/authentication-mechanisms-d1d9cb97f36e?source=rss-763947504a7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1d9cb97f36e</guid>
            <category><![CDATA[oauth]]></category>
            <category><![CDATA[authentication]]></category>
            <dc:creator><![CDATA[0xmosshead]]></dc:creator>
            <pubDate>Fri, 06 Jun 2025 23:21:57 GMT</pubDate>
            <atom:updated>2025-06-06T23:21:57.277Z</atom:updated>
            <content:encoded><![CDATA[<p>You must know who is connecting to your system. Authentication is verifying the identity of the entity connecting to your system, and is often the first line of defense. So, how do you authenticate two services, or better, how do you authenticate two different requests following a stateless protocol like HTTP in this zero-trust world? Well, I’m going to describe four ways it is done below</p><p>I. Accepting a username passed in a URL parameter</p><p><em>/service?username=admin</em></p><p>This is how authentication used to happen when everyone was considered a saint and lying was considered a sin. The problem with accepting something through a URL parameter, especially something like a GET request, is that no encryption is involved, and everything goes as plain text over the wire.</p><p>II. Presenting a pre-shared secret</p><p><em>Set-Cookie: sessionid=abc123</em></p><p>The server sets a cookie, and the client returns it in subsequent requests. This is how the origin server introduces some kind of state into the browser. So, how do you ensure there is a secure transmission of secrets between the server and the browser without a bad actor intercepting the request?</p><p><em>Set-Cookie: sessionid=abc123;HttpOnly,Secure</em></p><p>To secure cookies effectively, it’s important to set the<strong> HttpOnly </strong>and <strong>Secure</strong> flags. The HttpOnly flag prevents client-side scripts from accessing the cookie, which helps protect against XSS attacks. The Secure flag ensures that the cookie is only transmitted over HTTPS, safeguarding it from being intercepted on insecure networks.</p><p>In addition to these flags, enabling HTTP Strict Transport Security (<strong>HSTS</strong>) is a best practice. HSTS instructs the browser to always use HTTPS for the domain and blocks any attempts to downgrade to HTTP, protecting against protocol downgrade attacks and ensuring encrypted communication.</p><p>III. Mutual TLS (mTLS)</p><p>Mutual TLS is a secure, bidirectional authentication protocol where the server and client both authenticate each other. In an industry where there’s a shift towards containers from dedicated servers, mTLS becomes crucial for each service to authenticate against the other. Also this is widely used for service-to-service authentication in Kubernetes, internal microservices.</p><p>So, how does mTLS work.</p><ol><li>Client initiates a TLS connection to the server.</li><li>The server presents its certificate.</li><li>Client validates the server’s certificate:</li></ol><ul><li>Is it signed by a trusted CA?</li><li>Is it valid (not expired)?</li><li>Does its subject match the domain?</li></ul><ol><li>The server asks for a <strong>client certificate</strong>.</li><li>The client presents its certificate.</li><li>The server validates the client’s certificate.</li><li>Connection is established with<strong> mutual trus</strong>t.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*Yjp_VXxkNGx8s4u5cwNcnQ.png" /></figure><p>IV. OpenID Connect</p><p>OAuth is generally used for granting authorization rather than filling identification. But OpenID Connect solves this by adding an authentication layer on top (to know the user’s email address from the identity provider).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*wHOv6oe-SYuHMbc8AxUhSQ.png" /></figure><p>OAuth 2.0 is a framework that is often used when access is required for a user’s resources on a different application. Consider the following scenario</p><p>Client: A photo-editing app.<br>Resource Owner: A user with photos on Google Photos.<br>Authorization Server: Google’s OAuth 2.0 server.<br>Resource Server: Google Photos API server.</p><p>Flow:</p><p>The app (Client) redirects the user (Resource Owner) to Google’s login page (Authorization Server).<br>The user authenticates and approves access, receiving an authorization code.<br>The app exchanges the code for a bearer token from Google’s Authorization Server.<br>The app sends the bearer token to the Google Photos API (Resource Server).<br>The API validates the token and returns the user’s photos.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1d9cb97f36e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OSCP Journey and Everything else!]]></title>
            <link>https://medium.com/@suryaprakashgeesala/oscp-journey-and-everything-else-c7b806906f5b?source=rss-763947504a7a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7b806906f5b</guid>
            <category><![CDATA[oscp-preparation]]></category>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[oscp-certification]]></category>
            <category><![CDATA[active-directory]]></category>
            <dc:creator><![CDATA[0xmosshead]]></dc:creator>
            <pubDate>Fri, 10 Jan 2025 21:01:00 GMT</pubDate>
            <atom:updated>2025-01-10T21:01:00.880Z</atom:updated>
            <content:encoded><![CDATA[<p>I finally obtained one of my favourite certifications today, and what makes it even more special is the fact that I learned a lot during my preparation.</p><p>One fine morning, I woke up feeling motivated to take on a challenging certification, which is how my journey toward the OSCP began.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*4GwPmlwrWtcZ7snF.jpg" /></figure><p>Finding time to study during work was difficult, but I managed to create a schedule. I finished the course in 2.5 months and completed 5 out of 6 Challenge Labs in the next 15 days. However, I felt underprepared and realized I needed more time to study. I started practising pg-practice boxes and worked on HTB boxes from Lainkusanagi’s list. I took the exam in January once I felt confident enough.</p><p>How similar are the Challenge Labs and pg-practice labs to the exam?</p><p>The exam is stressful and challenging, primarily because you need to enumerate a lot of different services. There were 12–15 different ports, and at times, I felt clueless. However, attention to detail proved to be an invaluable skill; the closer I examined the services, the better I understood how the application worked behind the scenes.</p><p>What is the preparation plan for Active Directory?</p><p>Active Directory (AD) wasn’t entirely new to me, but understanding the authentication protocols was key to attacking and compromising AD. I’m glad I spent enough time learning how Kerberos works. The PWK material on Kerberos was excellent, and three specific blog posts from <a href="https://www.tarlogic.com/blog/how-kerberos-works/">Tarlogic</a> were particularly helpful.</p><p>Which machines should one tackle to be well-prepared?</p><p>I recommend using either Lain’s or TJ Null’s list. I focused more on grasping the concepts rather than spending excessive hours stuck on each box. If you get stuck, open the walkthrough, note down anything important, and then move on. There’s no point in wasting five hours trying to solve a single box.</p><p>What changed in the new exam format?</p><p>The new exam format presents an assumed breach scenario where you receive a set of credentials for initial access. This approach is definitely better than black-box, but it does involve more enumeration than before. Get comfortable using commands like `find`, `tree`, and `gci`, as they can save a lot of time during manual enumeration.</p><p>Should I opt for the 3-month plan or the Annual Learn One subscription?</p><p>It depends on your familiarity with Windows and Linux, as well as the amount of time you can dedicate to studying. I recommend purchasing the Learn One subscription during Black Friday when there’s a 20% discount.</p><p>Thoughts on the usage of Metasploit in the exam?</p><p>Offensive Security allows you to use Metasploit on only one machine. I suggest preparing to exploit vulnerabilities without relying on it; this approach helps you understand how the exploit works. While automation is convenient, it only takes you so far in grasping the inner workings.</p><p>What tools can I use in the exam?</p><p>Offensive Security permits automated enumeration but not automated exploitation. Tools like ‘sqlmap’ and ‘Burp Suite Pro’ are out of scope. All the tools you need are included in the PWK course. I recommend getting comfortable with ‘Netexec’ or ‘Crackmapexec’. Enumerating Active Directory without worrying about compatibility issues with `Sharphound` made my job much easier.</p><p>What did exam day look like?</p><p>I scheduled my exam for around 2 PM. In hindsight, I wish I had scheduled it earlier since I struggled to stay awake before the exam :( The Offsec proctors were incredibly helpful; I faced some internet connection issues, and they kindly added 30 minutes to compensate for the lost time. After setting up the VPN and everything else, I finally started my exam.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/0*f7ZpidCAJmeKoPHe.jpg" /></figure><p>I began with the AD section, and thanks to the initial credentials, gaining a foothold was relatively straightforward, allowing me to get my first flag quickly. However, I became increasingly stressed and was unable to find anything for the next four hours. I decided to stop enumerating AD and shift my focus to the stand-alone machines.</p><p>I managed to get initial access to the first stand-alone machine within five minutes and completely compromised the box in the next 50 minutes. Moving on to the second stand-alone machine, I gained initial access fairly quickly but struggled for the next three hours without making much progress. I took a break to reassess my situation. By then, I had accumulated 40 points (10 from AD, along with two local.txts and one proof.txt). I determined that my best bet was to revisit AD.</p><p>Restarting from where I had left off, I simplified my approach, and suddenly everything clicked into place. I fully compromised AD, which felt like a huge relief. After four months of preparation, my hard work was finally paying off. I took a short break to stretch after burning myself for 14 hours.</p><p>Upon returning from my break, I dived back into enumeration. I quickly achieved privilege escalation on the second stand-alone machine. I moved on to the third machine but spent an hour enumerating without any success and started to feel burnt out. With 80 points in hand, I reviewed my screenshots and decided to end the exam.</p><p>I submitted my report the following day and received my passing score within 2 days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*40ISs5luNhX9FJ4h.jpg" /></figure><p>General Tips for the exam:</p><ol><li>If you’re feeling stuck. move on to the next box. keep the time factor always on the back of your mind</li><li>Take good screenshots. Especially the proof and local flags along with IP. No point in working so hard, if you don’t fulfil the objectives of the documentation</li><li>There’s no magical number of pg boxes that’ll get you your OSCP. but make sure you do boxes rated as medium and hard by the community</li><li>Use Ligolo for Pivoting. Makes your job a lot easier than you think.</li><li>Watch Derron C’s 3 AD attack paths on YouTube. I would also recommend Hacktheclown’s videos.</li><li>Follow r/oscp community on Reddit. They’re awesome.</li></ol><p>That’s pretty much it. You got this. Go for it!!!</p><p>Key Learnings from OSCP:</p><ol><li>Pentesters make their bread cause patch management is difficult for every organization. There’s always an unpatched Apache or WordPress instance waiting to be exploited</li><li>People can be stupid than what you assume. There’s no point in picking a 16-character password if you use the same password across 15 different sites. your password is lying there on one of those breach forums or pwned password databases.</li><li>Improper Input Validation and Output sanitization are culprits 9 times out of 10.</li></ol><p>Resources that helped me during my preparation:</p><p>Kerberos Working and Attacks:</p><p><a href="https://www.tarlogic.com/blog/how-kerberos-works/"><strong>Kerberos (I): How does Kerberos work? — Theory</strong></a></p><p>Exploiting Windows based on protocols and credentials in hand:</p><p><a href="https://wadcoms.github.io/"><strong>WADComs</strong></a></p><p>Generating Reverse shells Payloads:</p><p><a href="https://www.revshells.com/"><strong>Online — Reverse Shell Generator</strong></a></p><p>AD Attack paths:</p><p><a href="https://www.youtube.com/watch?v=gY_9Dncjw-s&amp;list=PLT08J44ErMmb9qaEeTYl5diQW6jWVHCR2">https://www.youtube.com/watch?v=gY_9Dncjw-s&amp;list=PLT08J44ErMmb9qaEeTYl5diQW6jWVHCR2</a></p><p>Game of Active Directory :</p><p><a href="https://www.youtube.com/watch?v=mpYJkurzjOA&amp;list=PL08nYpWQJ_zM4JxekcckBVjglpVWgg2u0">https://www.youtube.com/watch?v=mpYJkurzjOA&amp;list=PL08nYpWQJ_zM4JxekcckBVjglpVWgg2u0</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7b806906f5b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>