<?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 Yogesh Mishra on Medium]]></title>
        <description><![CDATA[Stories by Yogesh Mishra on Medium]]></description>
        <link>https://medium.com/@ygxshh?source=rss-b8d7bb1bc65f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*WNsSbldG5yuNn1Uf</url>
            <title>Stories by Yogesh Mishra on Medium</title>
            <link>https://medium.com/@ygxshh?source=rss-b8d7bb1bc65f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 23 May 2026 16:23:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ygxshh/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[Introduction to DevSecOps]]></title>
            <link>https://medium.com/@ygxshh/introduction-to-devsecops-4d1063c7c72d?source=rss-b8d7bb1bc65f------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d1063c7c72d</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[Yogesh Mishra]]></dc:creator>
            <pubDate>Tue, 16 Dec 2025 09:00:12 GMT</pubDate>
            <atom:updated>2025-12-16T09:00:12.610Z</atom:updated>
            <content:encoded><![CDATA[<h4>Learn about the story of DevSecOps, Software Development Models &amp; Shifting Left.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M_aPjBV9xdDY-mNX8RnADQ.png" /></figure><blockquote><strong>Task 1 Introduction</strong></blockquote><p>This lab introduces the evolution of software development practices and explains why modern development must integrate security from the beginning. As software delivery became faster and more automated, security also needed to evolve to keep pace.</p><p><strong>Why Evolution Matters</strong></p><p>Early software development focused mainly on functionality and speed. Security was often added at the end, which led to vulnerabilities and costly fixes. Over time, practices improved by integrating testing, automation, and collaboration, shaping today’s DevSecOps approach.</p><p><strong>Learning Objectives Explained</strong></p><ol><li><strong>Understanding history:</strong> Learn how software development moved from traditional models to agile and DevOps driven workflows.</li><li><strong>Importance of DevSecOps:</strong> Recognize why security can no longer be isolated and must be part of development and operations.</li><li><strong>DevSecOps culture:</strong> See DevSecOps as both a mindset and a discipline that promotes shared responsibility for security.</li></ol><p><strong>DevSecOps Concept in Simple Terms</strong></p><p>DevSecOps means embedding security into every phase of the software development lifecycle. Security is automated, continuous, and shared across teams instead of being a final checkpoint.</p><p><strong>DevSecOps Learning Path Summary</strong></p><ol><li><strong>Introduction to DevSecOps: </strong>Covers secure SDLC, development environments, and commonly used tools.</li><li><strong>Security of the Pipeline: </strong>Focuses on protecting CI CD pipelines, source code, automated testing, dependency handling, and environment security.</li><li><strong>Security in the Pipeline: </strong>Examines how pipelines can be attacked, how vulnerabilities are exploited, and how they can be defended.</li><li><strong>Infrastructure as Code: </strong>Explores cloud DevOps concepts, secret management, and security issues in tools like Terraform, Vagrant, and Docker.</li></ol><p><strong><em>Answer the questions below</em></strong></p><p><strong><em>I’m ready to start!</em></strong></p><p><strong><em>No answer needed</em></strong></p><blockquote><strong>Task 2 DevOps: A New Hope</strong></blockquote><p>DevOps emerged as a response to long standing inefficiencies in traditional software development models. As systems grew complex and user expectations increased older approaches failed to scale and adapt.</p><p><strong>Waterfall Model Overview</strong></p><ul><li>Originated in the 1970s</li><li>Strict hierarchical structure with isolated roles</li><li>Developers built features</li><li>System administrators handled infrastructure and deployments</li><li>QA teams tested functionality</li></ul><p><strong>Problems with Waterfall</strong></p><ul><li>Teams worked in silos with little collaboration</li><li>Bugs and security flaws were pushed between teams</li><li>Delays due to handoffs and blame culture</li><li>Backlogs increased as releases became frequent</li><li>Poor scalability and communication breakdown</li></ul><p>This model lacked flexibility and created friction as software demands increased.</p><p><strong>Agile Model Overview</strong></p><p>Introduced in the early 2000s to solve waterfall limitations.</p><p><strong>Agile Manifesto Core Values</strong></p><ul><li>Individuals and interactions over processes and tools</li><li>Working software over comprehensive documentation</li><li>Customer collaboration over contract negotiation</li><li>Responding to change over following a fixed plan</li></ul><p><strong>Improvements with Agile</strong></p><ul><li>Focus on collaboration and self organising teams</li><li>Faster feedback cycles</li><li>Greater flexibility and adaptability</li><li>Stronger alignment with customer needs</li></ul><p><strong>Remaining Gap</strong></p><p>Agile improved development speed and collaboration but did not fully address operational challenges like deployment infrastructure and automation.</p><p><strong>Birth of DevOps</strong></p><ul><li>Originated from discussions in 2008 between Andrew Clay and Patrick Debois</li><li>Gained momentum after DevOpsDays event in 2009</li><li>Focused on cultural change rather than only process change</li></ul><p><strong>What DevOps Introduced</strong></p><ul><li>Unified development QA and operations</li><li>Shared responsibility across teams</li><li>Heavy use of automation and integration</li><li>Continuous visibility into systems and workflows</li><li>Engineers expanded skill sets beyond traditional roles</li></ul><p><strong>Why DevOps Matters</strong></p><ul><li>Builds trust and collaboration between teams</li><li>Aligns technical work with business goals</li><li>Enables smaller reversible changes</li><li>Improves delivery speed and reliability</li><li>Enhances communication and accountability</li></ul><p><strong>Modern DevOps Infrastructure Key Points</strong></p><ul><li>Fully automated self service environments</li><li>Developers can provision cloud resources independently</li><li>CI CD automates testing staging and production deployments</li><li>Infrastructure as Code enables repeatable deployments</li><li>Containerised workloads are provisioned dynamically</li></ul><p><strong>Declarative vs Imperative Approaches</strong></p><p><strong>Declarative approach</strong></p><ol><li>Define the desired end state</li><li>System handles configuration automatically</li><li>Minimal human interaction</li></ol><p><strong>Imperative approach</strong></p><ol><li>Define step by step actions</li><li>Changes applied after manual or gated approval</li><li>Higher risk of errors as releases increase</li></ol><p><strong><em>Answer the questions below</em></strong></p><p><strong><em>What methodology relies on self-organising teams that focus on constructive collaboration?</em></strong></p><p><strong><em>agile</em></strong></p><p><strong><em>What methodology relies on automation and integration to drive cultural change and unite teams?</em></strong></p><p><strong><em>DevOps</em></strong></p><p><strong><em>What traditional approach to project management led to mistrust and poor communication between development teams?</em></strong></p><p><strong><em>waterfall</em></strong></p><p><strong><em>What does DevOps emphasize?<br>building trust</em></strong></p><blockquote><strong>Task 3 The Infinite Loop</strong></blockquote><p>DevOps is represented as an infinite loop to show that development operations and feedback never stop. Each phase continuously feeds into the next, ensuring faster delivery better quality and continuous improvement.</p><p><strong>How DevOps Works in Practice</strong></p><p>The infinite loop highlights collaboration automation and constant feedback across the entire lifecycle rather than linear handoffs between teams.</p><p><strong>Key DevOps Concepts and Tools</strong></p><p><strong>CI and CD: </strong>Continuous Integration and Continuous Deployment focus on frequent code merging with automated testing.</p><ul><li>Code is tested as soon as it is pushed or merged</li><li>Bugs are detected early in the development cycle</li><li>Small frequent changes reduce risk</li><li>Easier version control and reliable rollbacks</li><li>Improves maintainability of modular code</li></ul><p><strong>Infrastructure as Code: </strong>Infrastructure is managed and provisioned using code instead of manual setup.</p><ul><li>Enables reusable infrastructure definitions</li><li>Ensures consistency across environments</li><li>Improves speed and reliability of deployments</li><li>Common tools include Terraform and Vagrant</li><li>Forms a foundation for infrastructure security testing</li></ul><p><strong>Configuration Management: </strong>Maintains and enforces the desired state of infrastructure over time.</p><ul><li>Ensures systems remain correctly configured</li><li>Reduces manual intervention</li><li>Saves time and improves visibility</li><li>Often implemented using IaC principles</li></ul><p><strong>Orchestration: </strong>Automates workflows and system coordination.</p><ul><li>Manages resource planning automatically</li><li>Improves system stability</li><li>Enables rapid response to failures</li><li>Works closely with monitoring and automation</li></ul><p><strong>Monitoring: </strong>Focuses on observing system performance and health.</p><ul><li>Collects data on services and infrastructure</li><li>Enables faster incident detection and recovery</li><li>Supports root cause analysis</li><li>Improves visibility across teams</li><li>Can trigger automated responses</li></ul><p><strong>Microservices Architecture: </strong>Applications are broken into smaller independent services.</p><ul><li>Easier scaling of individual components</li><li>Reduced overall complexity</li><li>Flexibility in technology choices</li><li>Better fault isolation</li></ul><p><strong><em>Answer the questions below</em></strong></p><p><strong><em>What helps in adding tests in an automated manner and deals with the frequent merging of small code changes?</em></strong></p><p><strong><em>CI/CD</em></strong></p><p><strong><em>What process focuses on collecting data to analyse the performance and stability of services?</em></strong></p><p><strong><em>Monitoring</em></strong></p><p><strong><em>What is a way to provision infrastructure through reusable and consistent pieces of code?</em></strong></p><p><strong><em>lac</em></strong></p><blockquote><strong>Task 4 Shifting Left</strong></blockquote><p>Shifting left means introducing security as early as possible in the software development lifecycle. DevOps makes this possible by improving visibility automation and collaboration between development operations and security teams.</p><p><strong>Traditional Security Approach</strong></p><ul><li>Security testing was done at the final stages of development</li><li>Security teams acted as gatekeepers before production</li><li>Applications were either approved or sent back for fixes</li><li>Led to long delays stress rollbacks and high costs</li><li>Created friction and blame between teams</li></ul><p><strong>What Shifting Left Changes</strong></p><ul><li>Security is embedded from design and coding stages</li><li>Security testing happens continuously not at the end</li><li>Developers and security teams collaborate closely</li><li>Issues are identified and fixed early</li></ul><p><strong>Why Shifting Left Is Needed</strong></p><ul><li>Modern development is fast and cloud driven</li><li>Infrastructure provisioning is automated and rapid</li><li>Faster releases increase the risk of unnoticed flaws</li><li>Late stage security reviews become bottlenecks</li><li>Fixing issues later becomes expensive and risky</li></ul><p><strong>Key Benefits of Shifting Left</strong></p><ul><li>Early detection of security flaws</li><li>Lower remediation costs</li><li>No last minute rollbacks</li><li>Faster and smoother releases</li><li>Improved trust between teams</li><li>Better product quality and security</li></ul><p><strong>Role of Automation</strong></p><ul><li>Code analysis tools run during development</li><li>Automated security tests integrate into pipelines</li><li>Continuous feedback helps developers fix issues quickly</li></ul><p><strong>Connection to DevSecOps</strong></p><p>Shifting left in DevOps leads directly to DevSecOps. Security becomes a shared responsibility and a built in design principle rather than an afterthought.</p><p><strong>Security as a Design Feature</strong></p><ul><li>Security is not optional</li><li>Security is part of architecture and coding decisions</li><li>Blending security strengthens DevOps practices</li></ul><p><strong>Modern Reality</strong></p><ul><li>Cyber threats are increasing</li><li>Regulations are becoming stricter</li><li>Integrating security early is no longer a choice</li><li>It is a mandatory requirement for modern software development</li></ul><p><strong><em>Answer the questions below</em></strong></p><p><strong><em>What term is it used to describe accounting for security from the earliest stages in a development lifecycle?</em></strong></p><p><strong><em>shift left</em></strong></p><p><strong><em>What is the development approach where security is introduced from the early stages of a development lifecycle until the final stages?</em></strong></p><p><strong><em>DevSecOps</em></strong></p><blockquote><strong>Task 5 DevSecOps Security Strikes Back</strong></blockquote><p>DevSecOps is a culture driven approach that integrates security into every stage of development and operations. Security becomes a shared responsibility and a normal daily activity rather than a separate final step. Automation and platform design play a major role in making this possible.</p><p><strong>Value of DevSecOps</strong></p><ol><li>Reduces vulnerabilities across applications</li><li>Improves security test coverage</li><li>Increases automation of security controls</li><li>Minimizes business risk and economic loss</li><li>Protects brand reputation</li><li>Simplifies auditing monitoring and compliance</li></ol><p><strong>How to Implement DevSecOps Effectively</strong></p><ol><li>Focus on culture first</li><li>Encourage open communication and trust</li><li>Promote shared ownership of security</li><li>Bridge security knowledge gaps between teams</li><li>Provide teams with tools training and guidance</li><li>Enable developers to make secure decisions independently</li></ol><p><strong>Key DevSecOps Challenges</strong></p><p><strong>Security Silos</strong></p><p>Security is often treated as a separate function handled only by specialists.<br>This creates isolation and prevents developers and operators from building security into their work early.<br>This approach does not scale well.<br>Best practice is shared responsibility where security teams act as enablers not blockers.</p><p><strong>Lack of Visibility and Prioritisation</strong></p><p>Security should be treated as a normal part of application development.<br>Developers should work confidently without fear of blame.<br>Security teams should empower autonomy rather than enforce policing.<br>Clear processes help teams understand what matters most from a security perspective.</p><p><strong>Stringent Processes</strong></p><p>Overly rigid security approvals slow down innovation.<br>Not all changes carry the same level of risk.<br>Low risk tasks should follow lightweight processes.<br>High risk changes should go through stricter reviews.</p><p><strong>Use of Sandbox Environments</strong></p><p>Developers need freedom to experiment safely.<br>Sandbox environments provide isolated testing spaces.<br>They are temporary and disconnected from internal networks.<br>They contain no real customer data.</p><p><strong><em>Answer the questions below</em></strong></p><p><strong><em>What DevSecOps challenge can lead to a siloed culture?</em></strong></p><p><strong><em>Security Silos</em></strong></p><p><strong><em>What DevSecOps challenge can affect not prioritizing the right risks at the right times?</em></strong></p><p><strong><em>Lack of visibility</em></strong></p><p><strong><em>What DevSecOps challenge stems from needlessly overcomplicated security processes?</em></strong></p><p><strong><em>Stringent Processes</em></strong></p><blockquote><strong>Task 6 DevSecOps Culture</strong></blockquote><p>DevSecOps culture focuses on shared responsibility trust and collaboration. Security is embedded into everyday work instead of being owned by a single team.</p><p><strong>Promoting Team Autonomy</strong></p><ol><li>Security should be automated and integrated into development pipelines</li><li>Security tests should feel like normal tests such as unit testing</li><li>Engineers should be confident to make secure decisions on their own</li><li>Security teams cannot be part of every discussion</li><li>Security acts as a support function not a control gate</li></ol><p><strong>Role of Education and Guidance</strong></p><ol><li>Use playbooks and runbooks to explain common flaws</li><li>Help teams understand risk and remediation</li><li>Build overlapping knowledge across teams</li><li>Encourage learning instead of dependency on security specialists</li></ol><p><strong>Visibility in DevSecOps</strong></p><ol><li>Teams must see the security state of the services they own</li><li>Dashboards help visualize risks and critical issues</li><li>Visibility helps teams prioritize security work</li><li>Prevents important issues from being lost in backlogs</li></ol><p><strong>Transparency Across Tools and Processes</strong></p><ol><li>Security tools should be accessible to developers</li><li>Alerts should explain what the issue is and where it exists</li><li>Developers should see affected code lines and fixes</li><li>Access to detailed findings promotes learning and autonomy</li><li>Removes the traditional barrier between security and development</li></ol><p><strong>Flexibility Through Understanding and Empathy</strong></p><ol><li>Different teams view risk differently</li><li>Deadlines priorities and pressures vary across roles</li><li>One size solutions do not work for everyone</li><li>Understanding team workflows helps design better security processes</li></ol><p><strong>Building Trust with Teams</strong></p><ol><li>Learn how teams own and operate their services</li><li>Tune security scanners based on real risks</li><li>Avoid excessive false alarms</li><li>Focus on what truly impacts the service</li><li>Demonstrate value instead of enforcing fear</li></ol><p><strong>Practical Example of Empathy</strong><br>A platform team may prioritize service uptime over low impact vulnerabilities. Security processes should reflect this reality by adjusting priorities and triage methods.</p><p><strong><em>Answer the questions below</em></strong></p><p><strong><em>How can you make security scalable so it’s not left behind when start ups face hypergrowth or in large corporations?</em></strong></p><p><strong><em>promote autonomy of teams</em></strong></p><p><strong><em>How can you support teams in understanding risk and educating on security flaws?</em></strong></p><p><strong><em>Visibility and Transparency</em></strong></p><p><strong><em>What are key factors to successfu Ily instill security in the development process by accounting for flexibility?</em></strong></p><p><strong><em>Understanding and Empathy</em></strong></p><blockquote><strong><em>Task 7 Exercise Fuel Trouble</em></strong></blockquote><p>Goal was to reach a planet with the least risk<br>Fuel allowed travel up to 130000 light years<br>Available models were Waterfall Agile and DevOps</p><p><strong>Comic 1 Analysis</strong></p><p>Decision was made early to go to Testooine<br>Once initial tests passed the plan did not change<br>No further feedback or reassessment was considered<br>Even though Testooine was the farthest planet the decision stayed fixed</p><p><strong>Model Used</strong></p><p>Waterfall Model</p><p><strong>Reason</strong></p><p>Waterfall follows a rigid upfront plan<br>Decisions are made once and followed through<br>Late feedback does not influence earlier stages</p><p><strong>Comic 2 Analysis</strong></p><p>Initial tests suggested Testooine<br>Further tests revealed high risk<br>Decision was changed to Hoth after new findings<br>Course was adjusted based on updated test results</p><p><strong>Model Used</strong></p><p>Agile Model</p><p><strong>Reason</strong></p><p>Agile allows responding to change<br>Continuous testing influences decisions<br>Feedback leads to adapting the plan</p><p><strong>Comic 3 Analysis</strong></p><p>Initial analysis suggested Hoth<br>Cost and risk were continuously evaluated<br>Multiple teams contributed insights<br>Trajectory parameters were adjusted<br>Final decision moved to Dagobug after further testing</p><p><strong>Model Used</strong></p><p>DevOps Model</p><p><strong>Reason</strong></p><p>DevOps emphasizes continuous collaboration<br>All teams share responsibility<br>Decisions evolve with constant feedback testing and analysis</p><p><strong>Final Mapping Summary</strong></p><p>Comic 1 Waterfall</p><p>Comic 2 Agile</p><p>Comic 3 DevOps</p><p><strong><em>Answer the questions below</em></strong></p><p><strong><em>What Software Development Model did the team in Comic 1 follow?</em></strong></p><p><strong><em>Waterfall</em></strong></p><p><strong><em>What Software Development Model did the team in Comic 2 follow?</em></strong></p><p><strong><em>Agile</em></strong></p><p><strong><em>What Software Development Model did the team in Comic 3 follow?</em></strong></p><p><strong><em>DevOps</em></strong></p><p><strong><em>What is the flag?</em></strong></p><p><strong><em>THM{ONE_TWO_THREE}</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d1063c7c72d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Weaponizing Vulnerabilities | TryHackMe Walkthrough]]></title>
            <link>https://medium.com/@ygxshh/weaponizing-vulnerabilities-tryhackme-walkthrough-bcebc8e9d44c?source=rss-b8d7bb1bc65f------2</link>
            <guid isPermaLink="false">https://medium.com/p/bcebc8e9d44c</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[weaponization]]></category>
            <category><![CDATA[vulnerability]]></category>
            <dc:creator><![CDATA[Yogesh Mishra]]></dc:creator>
            <pubDate>Mon, 15 Dec 2025 08:41:08 GMT</pubDate>
            <atom:updated>2025-12-15T08:41:08.896Z</atom:updated>
            <content:encoded><![CDATA[<h4>Learn how a vulnerability evolves and methods to weaponize multiple vulnerabilities leading to RCE.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*cSOXwvJejY8DgTvp6zgOhg.png" /></figure><blockquote><strong>Task 1 Introduction</strong></blockquote><p>Weaponizing a vulnerability means converting a known weakness in a system or software into a working exploit that attackers can use for unauthorized access or malicious actions.</p><p>The primary goal is privilege escalation. Attackers take advantage of one or more vulnerabilities to gradually gain higher access within a system or network.</p><p>Modern organizations have a large attack surface. This includes physical devices virtual machines cloud resources and mobile platforms all of which may contain exploitable weaknesses.</p><p>Vulnerability discovery is increasing. Databases like the National Vulnerability Database show a rising number of reported vulnerabilities which gives attackers more opportunities.</p><p>Exploits are often chained together. A single exploit may not be powerful enough but when combined with others it can lead to full system compromise.</p><p>Low impact vulnerabilities still matter. Easy to exploit flaws can act as entry points and allow attackers to move deeper into the environment.</p><p>Multi stage exploitation is a key concept. Attackers first gain initial access then pivot internally and exploit more critical vulnerabilities.</p><p>Defensive understanding is essential. Security engineers must learn how attackers combine vulnerabilities to design better detection prevention and response mechanisms.</p><p>This topic builds foundational knowledge. It explains exploit development concepts and real attack scenarios to strengthen both offensive awareness and defensive security skills.</p><p><strong><em>I have understood the basics and I&#39;m ready to start the room.</em></strong></p><p><strong><em>No answer needed</em></strong></p><blockquote><strong>Task 2 Exploit</strong></blockquote><p>An exploit is a technical method or tool used to take advantage of a vulnerability in a system or software. It allows attackers to execute actions that the system was not designed to permit.</p><p>Exploits can appear in many forms. They may be executable files email attachments malicious links hidden files or payloads delivered through messages removable media or other digital channels.</p><p>Once executed an exploit can enable remote or local control disrupt system operations steal sensitive data install malware or misuse system resources.</p><p>There are two main types of exploits. Local exploits require existing access to a system and are commonly used for privilege escalation. Remote exploits are launched over a network to gain access without prior authorization.</p><p>Exploits are not limited to connected systems. In standalone environments they can be delivered using USB drives or other physical media.</p><p>Different threat actors develop exploits. These include nation states for espionage organized crime groups for financial gain and underground hackers selling exploits on dark web markets.</p><p>An exploit is a means not an end. It is used to achieve larger objectives such as persistence data theft lateral movement or full system compromise.</p><p>Exploit development is complex. It demands advanced security knowledge constant updates and skilled professionals which makes high quality exploits valuable and expensive.</p><p><strong><em>What is the term for an exploit that is used to gain control of a system remotely?</em></strong></p><p><strong><em>remote exploit</em></strong></p><blockquote><strong>Task 3 Vulnerability Lifecycle</strong></blockquote><ul><li>The Vulnerability Lifecycle explains how a security weakness is identified, handled, and resolved.</li><li>The Department of Defense(DoD) uses a Vulnerability Disclosure Program to manage this process through structured stages.</li><li>A VDP focuses on triage, validation, coordination, and mitigation of reported vulnerabilities.</li></ul><p><strong>Key Stages of the Vulnerability Lifecycle</strong></p><p><strong>Stage 1 : Discovery</strong></p><p>A vulnerability is identified by researchers, vendors, or security teams.<br>It may be private or publicly disclosed.<br>A zero day vulnerability is discovered but not yet publicly known.<br>Vendors often start working on fixes before public disclosure.</p><p><strong>Stage 2 : Coordination</strong></p><p>The vulnerability details are shared securely between researchers and the vendor.<br>Disclosure is handled carefully to avoid misuse.<br>This stage ensures responsible reporting and controlled communication.</p><p><strong>Stage 3 : Mitigation</strong></p><p>A proof of concept or exploit may be developed to confirm exploitability.<br>Vendors design solutions to prevent exploitation.<br>Keeping details confidential is critical to stop attackers.</p><p><strong>Stage 4 : Management</strong></p><p>The vendor develops and releases a patch or update.<br>Organizations track affected systems and plan patch deployment.<br>Risk is managed until systems are fully secured.</p><p><strong>Stage 5 : Lessons Learned</strong></p><p>Organizations analyze how the vulnerability occurred.<br>Security controls and development practices are improved.<br>Knowledge gained is used to prevent similar issues in the future.</p><p><strong>Practical Vulnerability Flow</strong></p><ol><li>Product Launch : A hardware or software product is released into the market.</li><li>Vulnerability Discovery : Researchers find weaknesses either privately or publicly.</li><li>Proof of Concept or Exploit : A demonstration is created to show the vulnerability is real.</li><li>Patch Development : The vendor builds a fix to close the security gap.</li><li>Patch Release : The patch is officially made available to customers.</li><li>Patch Installation : Users apply the patch and secure their systems.</li></ol><p><strong><em>A vulnerability not patched by the vendor and unknown to most people is called a?</em></strong></p><p><strong><em>0-day</em></strong></p><p><strong><em>What is a commonly used term for a demonstration that proves the exploitability of a newly discovered vulnerability?</em></strong></p><p><strong><em>Proof of concept</em></strong></p><p><strong><em>What does a product manufacturer typically release to prevent a known vulnerability from being exploited by adversaries?</em></strong></p><p><strong><em>patch</em></strong></p><blockquote><strong>Task 4 Opportunity for Weaponizing Vulnerabilities</strong></blockquote><p>Weaponizing a vulnerability means turning a known weakness into a working exploit. It requires strong technical knowledge of the target software hardware or system. The process varies based on the technology being targeted and its complexity. Time skill and deep understanding are essential to make a vulnerability exploitable.</p><p><strong>Methods Used to Weaponize Vulnerabilities</strong></p><p>Exploits can be developed locally by attackers or security researchers.<br>They can also be bought from underground forums or specialized marketplaces. Both methods aim to create reliable and repeatable exploitation techniques.</p><p><strong>Opportunity Window for Exploitation</strong></p><p>The opportunity period is the time between vulnerability discovery and patch application.</p><p>This window depends on several factors :</p><ul><li>Availability of patches</li><li>Time taken to discover the vulnerability</li><li>Severity and impact of the flaw</li><li>User or organization delay in applying updates</li></ul><p><strong>Zero Day and N Day Exploits</strong></p><p>A zero day vulnerability is unknown to the public and has no available patch. Exploiting zero day vulnerabilities may take days months or even years. Such attacks are usually targeted and require extensive effort. An n day vulnerability refers to a flaw where a patch already exists. Here n indicates the number of days since the patch was released.</p><p><strong>Role of CVE and Public Disclosure</strong></p><ul><li>The exact discovery date of a vulnerability is usually unknown.</li><li>CVE databases record the date of CVE ID assignment and publication.</li><li>CVEs are often published when vendors release patches.</li><li>Attackers can reverse engineer patches to identify the vulnerability.</li></ul><p><strong>Exploit Development Timeline</strong></p><ul><li>Most public exploits appear within the first week after patch release.</li><li>Delaying CVE announcements gives customers more time to update systems.</li><li>Once a CVE is published vulnerability details become publicly accessible.</li></ul><p><strong>Defensive Response</strong></p><p>Security vendors start building detection signatures after CVE release.<br>Prevention and mitigation strategies are deployed to protect systems.<br>Faster patching reduces the exploitation window significantly.</p><p><strong><em>Can it take days, months, or even years to develop a 0-day exploit? (yea/nay)</em></strong></p><p><strong><em>yea</em></strong></p><p><strong><em>An exploit developed once the vendor has released the patch is called?</em></strong></p><p><strong><em>n-day</em></strong></p><blockquote><strong>Task 5 Exploit Chaining</strong></blockquote><p>Exploit chaining also called multi stage exploitation is the technique of combining multiple vulnerabilities to fully compromise a system.<br>Instead of relying on a single flaw attackers link several exploits together.<br>The final objective is usually full Remote Code Execution with the highest privileges.</p><p><strong>Goal of Exploit Chaining</strong></p><ul><li>The main aim is to bypass multiple layers of security.</li><li>Attackers gradually increase their level of access.</li><li>A successful chain gives complete control over the target system or network.</li></ul><p><strong>Chaining Exploits Lifecycle</strong></p><ol><li>Reconnaissance :</li></ol><ul><li>The attacker collects information about the target environment.</li><li>This includes network scanning port scanning and vulnerability scanning.</li><li>The goal is to identify potential weaknesses that can be exploited.</li></ul><p>2. Initial Exploit :</p><ul><li>An unpatched or misconfigured vulnerability is targeted first.</li><li>This exploit provides initial access to the system.</li><li>It is often a low privilege or limited access entry point.</li></ul><p>3. Privilege Escalation :</p><ul><li>Additional vulnerabilities are used to gain higher privileges.</li><li>Attackers may access system files credentials or administrative functions.</li><li>This step is critical for deeper system control.</li></ul><p>4. Persistence :</p><ul><li>The attacker ensures long term access to the system.</li><li>Backdoors scheduled tasks or malicious services may be installed.</li><li>Persistence allows access even if the initial vulnerability is fixed.</li></ul><p>5. Lateral Movement :</p><ul><li>The attacker moves across the network to other connected systems.</li><li>Exploits and stolen credentials are used to compromise more resources.</li><li>This expands control and increases data exposure.</li></ul><p>6. Remote Code Execution :</p><ul><li>The final exploit in the chain enables RCE.</li><li>Attackers can run arbitrary code with maximum privileges.</li><li>This may involve kernel level exploits or malware deployment.</li></ul><p><strong>Why Exploit Chaining Is Effective</strong></p><ul><li>Multiple small weaknesses combine into a major breach.</li><li>Security controls are bypassed step by step.</li><li>Detection becomes harder as each stage looks less severe alone.</li></ul><p><strong>Defensive Measures</strong></p><ul><li>Regular patching and updates reduce exploitable entry points.</li><li>Strong network segmentation limits lateral movement.</li><li>Monitoring logging and least privilege access help disrupt exploit chains.</li></ul><p><strong><em>What is the technique called to string together multiple exploits?</em></strong></p><p><strong><em>Exploit chaining</em></strong></p><p><strong><em>After initial access to the system, the process for gaining higher access within the system is called?</em></strong></p><p><strong><em>Privilege escalation</em></strong></p><p><strong><em>The step in which the adversary tries to maintain long time access to the system is called?</em></strong></p><p><strong><em>persistence</em></strong></p><blockquote><strong>Task 6 Chaining Multiple Vulnerabilities</strong></blockquote><ul><li>This case study explains exploit chaining to achieve complete Remote Code Execution.</li><li>Focus is on understanding how vulnerabilities are linked together rather than tool usage.</li><li>It demonstrates how a small initial flaw leads to full system compromise.</li></ul><p><strong>Target Setup :</strong></p><ul><li>Windows Server used as the target machine.</li><li>A vulnerable web application is hosted on the server.</li><li>AttackBox is used for testing with sqlmap already installed.</li><li>System needs a few minutes after startup to function properly.</li></ul><p><strong>Initial Scenario :</strong></p><ul><li>Bob is a Security Engineer assigned to test a web application.</li><li>Target application is hosted at <a href="http://10.48.144.120/ai">http://10.48.144.120/ai</a>.</li><li>Penetration testing reveals SQL injection and arbitrary file upload issues.</li><li>Goal is to chain these vulnerabilities to gain RCE.</li></ul><p><strong>Finding the Initial Entry Point :</strong></p><ul><li>Web application login page contains email and password fields.</li><li>Bob tests normal input and input with special characters.</li><li>Different responses are observed when a quote character is added.</li><li>This behavior indicates a possible SQL injection vulnerability.</li></ul><p><strong>Confirming SQL Injection :</strong></p><ul><li>Bob intercepts login requests using browser developer tools or Burp Suite.</li><li>The request URL and parameters are identified.</li><li>The email parameter is suspected to be injectable.</li></ul><p><strong>Exploiting SQL Injection with Sqlmap :</strong></p><ul><li>Sqlmap is used to automate exploitation of the SQL injection.</li><li>Tool confirms time based blind SQL injection.</li><li>Backend database is identified as MySQL.</li><li>Operating system is detected as Windows.</li><li>Web server technology is Apache with PHP support.</li></ul><p><strong>Chaining to Arbitrary File Upload :</strong></p><ul><li>Sqlmap uses the SQL injection to upload a malicious file.</li><li>A file stager and backdoor are placed in the web root directory.</li><li>The uploaded file is accessible through the browser.</li></ul><p><strong>Gaining Initial Server Access :</strong></p><ul><li>The malicious PHP file allows command execution on the server.</li><li>Bob now has a foothold on the system.</li><li>This confirms successful chaining of SQL injection to file upload.</li></ul><p><strong>Establishing a Web Shell :</strong></p><ul><li>Bob creates a simple PHP backdoor.</li><li>The backdoor executes system commands via a request parameter.</li><li>The file is uploaded and accessed through the browser.</li></ul><p><strong>Achieving Remote Code Execution :</strong></p><ul><li>The web shell allows arbitrary command execution.</li><li>Bob can run system commands and interact with the server.</li><li>This completes the Remote Code Execution chain.</li></ul><p><strong><em>What is the response when we enter email </em></strong><a href="mailto:test@chatai.com"><strong><em>test@chatai.com</em></strong></a><strong><em>’ as user email and password 123 in the login form?</em></strong></p><p><strong><em>undefined</em></strong></p><p><strong><em>Execute the command whoami, what is the output you receive?</em></strong></p><p><strong><em>nt authority\system</em></strong></p><p><strong><em>Have you noticed the file flag.txt in the web root directory? What is the flag value?</em></strong></p><p><strong><em>THM{010101_PAWNED}</em></strong></p><p><strong><em>How many files are available in the C:\xampp\htdocs\img folder?</em></strong></p><p><strong><em>2</em></strong></p><blockquote><strong>Task 7 Automating Common Tasks</strong></blockquote><p><strong>Purpose of Automation</strong></p><ul><li>Automation helps security engineers reduce manual effort and human error.</li><li>It improves speed accuracy and consistency in security operations.</li><li>Automated processes help detect and fix vulnerabilities faster.</li></ul><p>This reduces the overall risk of successful cyber attacks.</p><p><strong>Why Automation Is Important</strong></p><ul><li>Manual security tasks are time consuming and error prone.</li><li>Automation enables continuous monitoring and faster response.</li><li>It strengthens the overall security posture of an organization.</li></ul><p><strong>Common Ways to Automate Security Tasks</strong></p><p><strong>Scripts</strong></p><ul><li>Scripts are used to automate routine and complex tasks.</li><li>Popular scripting languages include Python PowerShell Bash and PHP.</li><li>Scripts can automate</li><li>Vulnerability scanning</li><li>Log collection and analysis</li><li>Network traffic monitoring</li><li>Incident response steps</li><li>Large data set analysis</li></ul><p><strong>Example Use Case</strong></p><ul><li>A script can scan log files and detect malicious keywords.</li><li>This helps identify suspicious activity early.</li><li>Scripts are flexible and customizable based on needs.</li></ul><p><strong>Scheduling Tools</strong></p><ul><li>Scheduling tools automate when tasks are executed.</li><li>Common tools include cron jobs and Windows Task Scheduler.</li><li>They allow scripts to run at fixed intervals without manual effort.</li></ul><p><strong>Common Uses</strong></p><ul><li>Regular vulnerability scans</li><li>Automated backups</li><li>Scheduled software updates</li><li>Periodic security reports</li></ul><p>Scheduled scanning helps detect new vulnerabilities quickly.<br>Reports can categorize issues by severity and remediation steps.</p><p><strong>SOAR Platforms : </strong>Security Orchestration Automation and Response platforms centralize automation.</p><p>They integrate multiple security tools into one workflow.</p><p><strong>SOAR platforms can automate</strong></p><ul><li>Incident response</li><li>Threat hunting</li><li>Alert handling</li><li>Incident management</li></ul><p><strong>They often integrate with</strong></p><ul><li>Firewalls</li><li>Intrusion Detection Systems</li><li>SIEM solutions</li></ul><p>Examples of SOAR platforms include Splunk and Shuffle.</p><p><strong>Best Practices for Security Automation</strong></p><ol><li><strong>Testing</strong><br>Always test automation in a controlled environment first.<br>Avoid deploying untested scripts in production.</li><li><strong>Documentation</strong><br>Ensure scripts are clearly documented.<br>This makes maintenance and troubleshooting easier.</li><li><strong>Logging and Monitoring</strong><br>Track automated tasks through logs.<br>Monitoring ensures automation behaves as expected.</li><li><strong>Regular Review</strong><br>Review automation workflows periodically.<br>Remove outdated checks and add new ones as threats evolve.</li><li><strong>Updates and Patching</strong><br>Keep scripts and tools updated.<br>Fix security flaws within automation itself.</li></ol><p><strong><em>As a security engineer, is it important to ensure that automated scripts being executed are acquired from legitimate sources? (yea/nay)</em></strong></p><p><strong><em>yea</em></strong></p><blockquote><strong>Task 8 Conclusion</strong></blockquote><p>Strong security depends on understanding both attacker techniques and defensive practices.</p><p>Early detection patching and automation reduce overall risk.<br> Continuous learning is essential in the field of cybersecurity.</p><p><strong><em>I have completed the room.</em></strong></p><p><strong><em>No answer needed</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bcebc8e9d44c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DAST]]></title>
            <link>https://medium.com/@ygxshh/dast-e3ca8750235c?source=rss-b8d7bb1bc65f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3ca8750235c</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[dast]]></category>
            <dc:creator><![CDATA[Yogesh Mishra]]></dc:creator>
            <pubDate>Sun, 14 Dec 2025 11:13:45 GMT</pubDate>
            <atom:updated>2025-12-14T11:13:45.514Z</atom:updated>
            <content:encoded><![CDATA[<h4>Learn about Dynamic Application Security Testing.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*rrDNQlm6fhfyBBQcEPLcPA.png" /></figure><blockquote>Task 1 Introduction</blockquote><p>Dynamic Application Security Testing focuses on evaluating a live application by interacting with it the same way an external attacker would. Instead of reviewing source code, this approach targets a running system to uncover security weaknesses that appear during real use.</p><blockquote>Task 2 Dynamic Application Security Testing (DAST)</blockquote><p>Dynamic Application Security Testing is the practice of testing a live web application to identify weaknesses and vulnerabilities. It follows a black box testing approach where the tester has no prior knowledge of the internal code or architecture. Vulnerabilities are discovered in the same way an external attacker would by interacting with the running application and attempting to exploit flaws manually or with automated tools.</p><p>Because the application is tested from an external perspective, DAST helps uncover issues that are visible and exploitable in real world conditions. These findings are often high priority since attackers can discover them without any insider access. DAST does not replace other security testing techniques but works best when combined with them as part of a secure development lifecycle.</p><p><strong>Manual vs Automated DAST</strong></p><p><strong>Manual DAST</strong><br>A security professional manually tests the application to identify vulnerabilities. This approach is effective for finding complex issues and business logic flaws that automated tools may miss because they lack functional understanding of the application.</p><p><strong>Automated DAST</strong><br>Automated tools scan the application for known vulnerability patterns. This method is fast and efficient and can be run frequently without human involvement. It is ideal for identifying common issues early in development.</p><p>Using both manual and automated DAST together usually provides better coverage than relying on only one method. Manual testing offers depth while automated testing provides speed and consistency.</p><p><strong>DAST in the Secure Software Development Lifecycle</strong></p><p>Automated DAST is commonly used during testing phases of development. These tools are often optimized for speed to give developers quick feedback and catch simple vulnerabilities early. They are not meant to be exhaustive but to identify obvious issues as soon as possible.</p><p>Manual DAST is typically performed less frequently such as weekly or at major milestones to avoid slowing down development. These scans usually involve deeper testing and more aggressive techniques.</p><p>Before an application goes live, performing a full web application penetration test is considered best practice to identify any remaining security flaws.</p><p>Note that many sources refer to automated DAST simply as DAST while manual DAST is often grouped under traditional web application penetration testing.</p><p><strong>DAST Pros and Cons</strong></p><p><strong>Pros</strong></p><ol><li>Identifies vulnerabilities during runtime including deployment specific issues</li><li>Detects issues like HTTP request smuggling, cache poisoning and parameter pollution that static analysis cannot</li><li>Works independently of programming language</li><li>Produces fewer false positives compared to static analysis</li><li>Can sometimes detect business logic flaws depending on the tool</li></ol><p><strong>Cons</strong></p><ol><li>Limited code coverage and may miss edge case scenarios</li><li>Some vulnerabilities are harder to detect compared to static techniques</li><li>Modern JavaScript heavy applications are difficult to crawl</li><li>Limited guidance on how to fix issues due to lack of code context</li><li>Some scans can take a long time</li><li>Requires a running application</li></ol><p>Most DAST tools work by running automated tests that follow two core steps</p><ol><li><strong>Spidering or Crawling</strong> : The tool explores the application to map pages endpoints and parameters that can be tested</li><li><strong>Vulnerability Scanning </strong>: Attack payloads are sent to the identified locations to detect possible vulnerabilities. Users can usually customize which attack types are included.</li></ol><p>In this room ZAP proxy will be used as the demonstration tool. While many enterprise DAST tools are commercial and expensive they operate on the same fundamental principles. Differences usually lie in detection accuracy reporting dashboards and enterprise integrations.</p><p><strong><em>Is DAST a replacement for SAST or SCA? (Yea/Nay)</em></strong></p><p><em>Answer: Nay</em></p><p><strong><em>What is the process of mapping an application’s surface and parameters usually called?</em></strong></p><p><em>Answer: Spidering/Crawling</em></p><p><strong><em>Does DAST check the code of an application for vulnerabilities? (Yea/Nay)</em></strong></p><p><em>Answer: Nay</em></p><blockquote>Task 3 Spiders and Crawlers</blockquote><p><strong>Spidering an application with ZAP</strong><br>Spidering discovers all reachable pages and resources of a running web application by automatically following links from a starting URL. It helps testers understand what parts of the application are accessible before deeper testing.</p><p><strong>Why spidering is important</strong></p><ul><li>Builds a clear map of the application structure.</li><li>Defines the scope of security testing.</li><li>Helps uncover hidden or less obvious endpoints.</li><li>Prepares the application for further active or passive scans.</li></ul><p><strong>Regular spider in ZAP</strong><br>The regular spider works by reading HTML responses and extracting links that are directly present in the source code.</p><p><strong>How it works</strong><br>ZAP starts from a given URL and follows every static link it can detect without executing scripts.</p><ol><li>Open ZAP and go to Tools then Spider.</li><li>Enter the starting URL <a href="http://10.48.143.193:8082/">http://10.48.143.193:8082/</a>.</li><li>Leave Context and User empty and click Start Scan.</li></ol><p><strong>Important options</strong></p><ul><li>Recurse. Enables deep crawling by following links recursively.</li><li>Spider Subtree Only. Restricts crawling to subfolders of the starting URL.</li><li>Advanced Options. Allows fine tuning of crawl behavior.</li></ul><p><strong>Result</strong></p><ul><li>Discovered URLs appear in the Sites tab.</li><li>Out of scope URLs are ignored.</li><li>Only static HTML links are detected.</li></ul><p><strong>Spider limitations</strong></p><p>The regular spider cannot execute javascript. As a result dynamic links created at runtime are missed. For example the nospiders gallery page is visible in the browser but not detected by the regular spider because it is generated using javascript.</p><p><strong>AJAX spider</strong></p><p>The AJAX spider is designed to overcome javascript related limitations of the regular spider.</p><p><strong>How it works</strong></p><p>ZAP controls a real browser such as Firefox or Chrome which renders the page and executes all scripts. ZAP then extracts links from the rendered content.</p><p><strong>Advantages</strong></p><ul><li>Detects javascript generated links.</li><li>Reflects real user interaction with the application.</li><li>Ideal for modern dynamic web applications.</li></ul><p><strong>Using the AJAX spider</strong></p><p><strong>Steps:</strong></p><ol><li>Go to Tools then AJAX Spider.</li><li>Enter the starting URL <a href="http://10.48.143.193:8082/">http://10.48.143.193:8082/</a>.</li><li>Select Firefox as the browser and start the scan.</li></ol><p><strong>Result</strong><br>After the scan completes the Sites tab is updated with additional URLs including the nospiders gallery page which was missed by the regular spider.</p><p><strong>Final takeaway</strong><br>Use the regular spider for quick and simple discovery. Use the AJAX spider when testing modern Javascript heavy applications. Using both provides better coverage during DAST.</p><p><strong><em>ZAP can run an AJAX spider by using browsers without a Graphical User Interface(GUI). What are these browsers called?</em></strong></p><p><em>Answer: headless</em></p><p><strong><em>Analysing the Sites tab, what HTTP parameters can be passed to login.php using the POST method? (In alphabetical order and separated by commas)</em></strong></p><p><em>Answer: pass, user</em></p><p><strong><em>What other .php resource, besides nospiders-gallery.php was found by the AJAX spider but not by the regular spider?</em></strong></p><p><em>Answer: /view.php</em></p><blockquote>Task 4 Scanning for Vulnerabilities</blockquote><p><strong>Configuring a Scan Policy in ZAP</strong></p><p>When performing DAST scans it is important to customize what tests are executed. A tailored scan policy reduces unnecessary payloads, saves time, and produces more relevant results. Since DAST is often used in a white box setup, the technologies used by the application are already known and should guide the scan configuration.</p><p><strong>Application context</strong></p><ul><li>Operating system is Linux.</li><li>Web server is Apache 2.4.</li><li>Programming language is PHP without any framework.</li><li>No database is used.</li></ul><p><strong>Why scan policy customization matters</strong></p><p>If the default scan policy is used, ZAP will attempt irrelevant tests such as SQL injection even though the application has no database. This increases scan time and noise, especially for larger applications. Custom policies help focus only on meaningful attack vectors.</p><p><strong>Scan policy management in ZAP</strong></p><p>To create or modify scan policies, navigate to Analyse then Scan Policy Manager and click Add to create a new policy.</p><p><strong>Scan policy configuration concepts</strong></p><p>Each test category in a scan policy has two key parameters.</p><p><strong>Threshold</strong></p><p>This controls how easily ZAP reports a vulnerability.</p><ul><li>Low threshold produces more findings but increases false positives.</li><li>High threshold reports only high confidence findings but may miss real issues.</li><li>Setting threshold to OFF disables that category entirely.</li></ul><p><strong>Strength</strong></p><p>This controls how aggressively ZAP tests a category.</p><ul><li>Higher strength runs more payloads and tests.</li><li>Higher strength increases scan duration significantly.</li></ul><p>These settings must be tuned per application and improved gradually through testing and validation.</p><p><strong>Policy tuning for this application</strong></p><p>Since the application does not use a database or XML processing, related tests can be safely disabled. Injection categories tied to databases and XML can be turned off. Cross site scripting DOM based checks should also be disabled as they consume significant resources and slow down scans in this environment.</p><p><strong>Running the first active scan</strong></p><p>Once the custom scan policy is ready, start an active scan from Tools then</p><p><strong>Active Scan.</strong></p><ul><li>Select the starting point as <a href="http://10.48.172.35:8082/">http://10.48.172.35:8082/</a>.</li><li>Enable the Recurse option so all discovered pages are scanned.</li><li>Select the newly created scan policy.</li><li>Leave other options as default and start the scan.</li></ul><p><strong>Reviewing scan results</strong></p><p>After the scan completes, findings appear in the Alerts section. Each alert includes a description of the vulnerability and the request and response used to identify it.</p><p><strong>Validating findings</strong></p><p>All results should be reviewed manually. If an alert is incorrect, it can be marked as a false positive by right clicking the alert and selecting Mark as False Positive. This helps keep reports accurate and actionable.</p><p><strong><em>Will disabling some test categories help speed up the scanning phase? (Yea/Nay)</em></strong></p><p><em>Answer: Yea</em></p><p><strong><em>There should be two high-risk alerts in your scan results. One is Path Traversal. What’s the name of the other one?</em></strong></p><p><em>Answer: Cross Site Scripting (Reflected)</em></p><blockquote>Task 5 Authenticated Scans</blockquote><p><strong>Dealing with logins</strong></p><p>So far scans were limited to public areas of the application. Some vulnerabilities exist only behind authentication. Since ZAP does not know credentials by default it cannot test protected areas. To solve this we must teach ZAP how to log in and maintain a valid session.</p><p><strong>Core idea</strong></p><p>ZAP records the login process using a ZEST script. This script replays the same requests during spidering and scanning so authenticated pages can be tested.</p><p><strong>Important preparation</strong></p><p>Disable ZAP HUD from the toolbar before starting. Some features do not work correctly when HUD is enabled.</p><p><strong>Recording authentication</strong></p><p><strong>ZEST script basics</strong></p><p>A ZEST script records and replays a sequence of HTTP requests. For authentication it stores the login flow so ZAP can repeat it automatically.</p><p><strong>Steps to record</strong></p><ol><li>Click Record a New ZEST Script from the toolbar.</li><li>Give the script a name and select type as Authentication.</li><li>Set the prefix to the base URL of the application to avoid recording unrelated traffic.</li><li>Click Start Recording.</li><li>Open a browser using Open Browser from ZAP.</li><li>Navigate to <a href="http://10.48.172.35:8082/login.php">http://10.48.172.35:8082/login.php</a>.</li><li>Log in manually using<br>Username nospiders<br>Password nospiders</li><li>Stop recording after successful login.</li><li>Close the browser if needed.</li></ol><p><strong>Script cleanup and testing</strong></p><p>Only requests required for login should remain in the script. Unnecessary requests can be deleted. ZAP checks status code and response length to verify success.<br>Use the Run button in the Script Console to replay the script. A successful login redirects from login.php to cowsay.php.</p><p><strong>Creating a context</strong></p><p>A context defines which URLs belong together and where authentication rules apply.</p><p><strong>Context creation</strong></p><ol><li>Go to the Sites tab.</li><li>Right click the base URL of the application.</li><li>Select Include in Context then New Context.</li></ol><p><strong>Authentication configuration</strong></p><p>In the Context settings select Authentication.<br>Choose Script based Authentication.<br>Load the recorded ZEST script.</p><p><strong>Users configuration</strong></p><p>At least one user must be defined or ZAP will skip authentication.<br>In this case credentials are already inside the ZEST script so the user entry is only a requirement not actively used.</p><p><strong>Authenticated spidering</strong></p><p>Now that authentication is configured ZAP can discover protected resources.</p><p>Run the spider again and this time select</p><ul><li>The created Context</li><li>The created User</li></ul><p>ZAP should now find additional URLs that require login. New resources can be reviewed in the Added Nodes tab.</p><p><strong>Avoiding logouts</strong></p><p>Some discovered pages such as logout.php can terminate the session if accessed.</p><p><strong>Solution</strong></p><p>Right click logout.php in the Sites tab.<br>Exclude it from the Context.<br>This prevents ZAP from logging itself out during scans.</p><p><strong>Session verification</strong></p><p>To ensure ZAP knows whether it is logged in or not we define indicators.</p><p><strong>Logged in indicator</strong></p><p>Choose a page accessible only after login such as cowsay.php.<br>Select text related to the logout link.<br>Right click and flag it as Authentication Logged in indicator for the Context.</p><p><strong>Logged out indicator</strong></p><p>Choose a page visible when logged out such as aboutme.php.<br>Select the login link HTML.<br>Right click and flag it as Authentication Logged out indicator.</p><p><strong>Verification strategy</strong></p><p>ZAP needs rules on how to check session validity.<br>Select Poll the Specified URL strategy.<br>Configure it to poll aboutme.php every 60 requests to verify login state.</p><p><strong>Final authenticated scan</strong></p><p>Run an Active Scan again.<br>Select the Context and User.<br>ZAP will now scan both public and authenticated areas.</p><p><strong>Outcome</strong></p><p>If configured correctly ZAP discovers a new high risk vulnerability that was previously hidden behind authentication. This confirms authenticated scanning is working correctly.</p><p><strong><em>Which type of script was used to record the authentication process to our site in ZAP?</em></strong></p><p><em>ZEST scripts<br></em><strong><em>What additional high-risk vulnerability was found on the site after running the authenticated scan?</em></strong></p><p><em>Remote OS Command Injection</em></p><blockquote>Task 6 Checking APIs with ZAP</blockquote><p>Modern web applications rely heavily on APIs. Unlike traditional web apps APIs cannot be easily spidered because endpoints do not usually reference each other. Even if an endpoint name is known its parameters and expected behavior are not obvious. Because of this API security testing depends on proper API specifications rather than crawling.</p><p><strong>Core idea</strong></p><p>Instead of discovery through spidering API testing relies on API definition files provided by the development team. These files describe all endpoints parameters methods and responses which allows direct security testing.</p><p><strong>API descriptions</strong></p><p>APIs are commonly documented using standard machine readable formats. These specifications contain everything needed to understand how to interact with the API and are sufficient for security testing.</p><p><strong>Common API specification formats supported by ZAP</strong></p><ul><li>OpenAPI formerly Swagger</li><li>SOAP</li><li>GraphQL</li></ul><p><strong>Understanding an OpenAPI definition</strong></p><p>An OpenAPI file lists all available endpoints under a paths section. For each endpoint it defines</p><ul><li>HTTP methods such as GET or POST</li><li>Required and optional parameters</li><li>Parameter location such as path query or body</li><li>Expected responses</li></ul><p><strong>Example explanation</strong></p><p>The endpoint /asciiart/{art_id}</p><ul><li>Uses the GET method</li><li>Requires a parameter art_id</li><li>art_id is passed in the URL path</li><li>art_id is of type string</li></ul><p>This tells testers exactly how to construct valid requests for the endpoint.</p><p><strong>Swagger UI</strong></p><p>Because API definition files are designed for machines they can be difficult to read. Many APIs provide a graphical interface called Swagger UI that makes exploration easier.<br>The Swagger UI allows</p><ul><li>Viewing endpoints in a readable format</li><li>Sending test requests</li><li>Understanding parameters and responses visually</li></ul><p><strong>Note on production environments</strong></p><p>Production systems may hide API definitions to reduce exposure. In such cases testers should request the specification directly from the development team.</p><p><strong>Importing an OpenAPI definition into ZAP</strong></p><p>ZAP allows importing API definitions either from a local file or directly from a URL.</p><p>Steps to import from a URL</p><ol><li>Go to Import.</li><li>Select Import an OpenAPI definition from a URL.</li><li>Enter <a href="http://10.48.172.35:8081/swagger.json">http://10.48.172.35:8081/swagger.json</a>.</li><li>Click Import.</li></ol><p><strong>Result of import</strong></p><p>All API endpoints and parameters appear in the Sites tab. ZAP treats them like normal web resources and immediately applies passive scanning rules.</p><p><strong>Scanning the API</strong></p><p>Once the API definition is loaded it can be tested like any other target.</p><p><strong>Steps to scan</strong></p><ol><li>Right click the API base URL in the Sites tab.</li><li>Select Attack then Active Scan.</li></ol><p><strong>Outcome</strong></p><p>After the scan completes ZAP reports vulnerabilities found in the API endpoints. These findings can then be reviewed and used to answer task questions or improve API security.</p><p><strong><em>What high-risk vulnerability was found on the /asciiart/generate endpoint?</em></strong></p><p><em>Remote OS Command Injection</em></p><p><strong><em>Read the details on the Path Traversal vulnerability detected. Based solely on the information presented by the scanner, would you categorise this finding as a false positive? (yea/nay)</em></strong></p><p><em>yea</em></p><blockquote>Task 7 Integrating DAST into the development pipeline</blockquote><p>When people talk about DAST in real projects they usually mean automated scanning inside the development pipeline not manual testing. The goal is early visibility of vulnerabilities without slowing developers into misery.</p><p><strong>Why DAST in CI CD is tricky</strong></p><p>Adding DAST sounds simple until reality shows up. A few decisions must be made carefully.</p><p><strong>Key considerations</strong></p><ul><li>Decide at which stages scans should run.</li><li>Decide what triggers a scan such as every commit or scheduled runs.</li><li>Decide scan intensity since full scans can take a long time.</li><li>Balance security coverage with developer productivity.</li></ul><p>No single setup works everywhere. Security and development teams must agree on a setup that finds issues early without breaking the pipeline flow.</p><p><strong>Pipeline overview</strong></p><p>The environment already includes a full CI CD setup.</p><p><strong>Main components</strong></p><ul><li>Gitea repository at <a href="http://10.48.172.35:3000/">http://10.48.172.35:3000/</a> storing application and API code.</li><li>Jenkins instance at <a href="http://10.48.172.35:8080/">http://10.48.172.35:8080/</a> running the pipeline.</li></ul><p><strong>Pipeline behavior</strong></p><p>Whenever a commit is made in Gitea Jenkins automatically</p><ul><li>Pulls the code.</li><li>Builds a Docker image.</li><li>Deploys the application container.</li></ul><p><strong>Automated scanning with zap2docker</strong></p><p>To automate ZAP we use zap2docker which is a Docker version of ZAP built for automation. It removes the pain of manual setup and fits nicely into pipelines.</p><p><strong>Scan types available</strong><br><strong>Baseline scan</strong></p><ul><li>Short spidering only.</li><li>No active scanning.</li><li>Fast and suitable for every commit.</li></ul><p><strong>Full scan</strong></p><ul><li>Full spidering and active scanning.</li><li>Very thorough.</li><li>Very slow and unsuitable for frequent commits.</li></ul><p><strong>API scan</strong></p><ul><li>Targets APIs using OpenAPI GraphQL or SOAP definitions.</li><li>Requires an API specification file.</li></ul><p>In baseline and full scans passive scan results are capped at ten alerts. An AJAX scan can also be enabled if needed.</p><p><strong>Integrating ZAP into Jenkins</strong></p><p>The environment already has zap2docker installed. Jenkins just needs to be told to run it.</p><p><strong>Jenkins project structure</strong></p><p>Inside Jenkins there is an organization called thm.</p><p>It contains two repositories :</p><ul><li>simple webapp</li><li>simple api</li></ul><p>Each repository has a main branch with builds already configured.</p><p><strong>Existing pipeline stages</strong></p><ul><li>Build Docker image.</li><li>Deploy Docker image.</li></ul><p>These stages are defined inside the Jenkinsfile stored in each repository.</p><p><strong>Adding ZAP scanning</strong></p><p>A third stage is already present in the Jenkinsfile but commented out. This stage runs a baseline ZAP scan after the container is built.</p><p><strong>Why baseline scan only</strong></p><p>This scan runs on every commit. Running a full scan here would slow the pipeline badly. The goal is to catch obvious issues early not everything under the sun.</p><p><strong>Enabling the scan</strong></p><ul><li>Open the Jenkinsfile in Gitea.</li><li>Uncomment the ZAP scan stage.</li><li>Commit the changes.</li></ul><p>Jenkins automatically detects the commit and starts a new build.</p><p><strong>Observing the build</strong></p><p>A new stage called Scan with OWASP ZAP appears in the build.<br>The scan takes around five minutes.</p><p>The build fails because vulnerabilities are found. This is expected behavior not a disaster.</p><p><strong>Reviewing scan reports</strong></p><p>To view the results</p><ul><li>Open the failed build in Jenkins.</li><li>Go to the Workspace section.</li><li>Open the zap reports folder.</li></ul><p>Download the report and open it locally. Opening it directly in Jenkins breaks formatting because life is unfair.</p><p><strong>Repeat for the API</strong></p><ol><li>Follow the same process for the simple api repository.</li><li>Enable the ZAP stage.</li><li>Trigger a build.</li><li>Download the API scan report.</li></ol><p><strong>Final takeaway</strong></p><p>Integrating DAST into CI CD gives fast feedback on security issues. Using lightweight scans on every commit keeps developers moving while still catching real problems early. Full scans can wait for later stages when time is less precious.</p><p><strong><em>Download the ZAP report for the simple-webapp repository. How many medium-risk vulnerabilities were found?</em></strong></p><p><em>3</em></p><p><strong><em>Check the main branch of the simple-api repository on Jenkins. One of the builds failed during the Build the Docker image step. What is the number of the pre-existing failed build?</em></strong></p><p><em>4</em></p><p><strong><em>Download the ZAP report for the simple-api repository. What high-risk vulnerability was found?</em></strong></p><p><em>Remote OS Command Injection</em></p><blockquote>Task 8 Conclusion</blockquote><p>This room introduced the fundamentals of Dynamic Application Security Testing and demonstrated how OWASP ZAP can be used for both manual and automated security testing of web applications and APIs.</p><p><strong>Key takeaways</strong></p><ul><li>DAST tests running applications from an external attacker perspective.</li><li>ZAP can perform spidering scanning authenticated testing and API testing.</li><li>DAST works on real deployed applications not source code.</li></ul><p><strong>Role of DAST in security</strong></p><p>DAST is not meant to replace other security testing methods. It provides value by identifying runtime issues that may not be visible in code reviews.</p><p><strong>DAST should be used together with</strong></p><ul><li>SAST for source code level vulnerabilities.</li><li>SCA for vulnerable dependencies and libraries.</li><li>Penetration testing for deep manual exploitation.</li><li>Secure design and threat modeling practices.</li></ul><p><strong>Final thought</strong></p><p>DAST is not a silver bullet. When integrated properly into the software development lifecycle it strengthens overall application security and helps teams detect vulnerabilities early and continuously.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3ca8750235c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SAST | Software security | TryHackMe Walkthrough]]></title>
            <link>https://medium.com/@ygxshh/sast-software-security-tryhackme-walkthrough-94c6e74e0788?source=rss-b8d7bb1bc65f------2</link>
            <guid isPermaLink="false">https://medium.com/p/94c6e74e0788</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <dc:creator><![CDATA[Yogesh Mishra]]></dc:creator>
            <pubDate>Sun, 14 Dec 2025 05:39:31 GMT</pubDate>
            <atom:updated>2025-12-14T05:39:31.664Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Static Application Security Testing in Software Security</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dDd--uffdv_z7vzBfef9JQ.png" /></figure><h3><strong>Task 1 Introduction</strong></h3><p>This room focuses on Static Application Security Testing or SAST which is a technique used to identify security weaknesses during the application development process. It explains how SAST helps detect issues early, its strengths and limitations, and how it works alongside other security practices to improve application security from the start.</p><h3><strong>Task 2 Code Review</strong></h3><p>Code review is a key practice in building secure applications. It involves examining an application’s source code to identify potential security vulnerabilities using a white box approach. Since the reviewer has full access to the code, this method provides wider coverage of application functionality and helps reduce the time needed to discover security flaws.</p><p>If vulnerabilities introduced early in development are not addressed, they often persist until the later stages of a project where fixing them becomes more complex, time consuming, and expensive. Code reviews aim to detect these issues early when they are easier and cheaper to resolve.</p><p><strong>Cost of Defects in Software</strong></p><p>Security defects become more costly to fix as the project progresses through the development lifecycle. Early detection through code review significantly reduces remediation effort and overall cost.</p><p><strong>Manual vs Automated Code Review</strong></p><p>Code reviews are most effective when manual analysis and automated tools are used together. Each approach has distinct advantages at different stages of development.</p><p>Manual code reviews benefit from human judgment and contextual understanding, allowing for deeper and more accurate analysis. However, reviewing very large codebases can be exhausting, increasing the risk of missed vulnerabilities due to human fatigue.</p><p>Automated code review tools are highly efficient at detecting common and well known vulnerabilities quickly. They work consistently regardless of codebase size and save significant time. Their limitation is that they rely on predefined rules, so vulnerabilities outside their rule set may go undetected.</p><p>From a cost perspective, manual reviews are generally more expensive due to the time and expertise required. Automated tools provide faster results at a lower cost.</p><p>For best results, automated code reviews should be run early in the development lifecycle to identify simple and common issues. Manual reviews should be conducted periodically or at key milestones to uncover complex vulnerabilities that automated tools may not detect.</p><blockquote>Are automated code reviews a substitute for manual reviewing? (yea/nay)<br>nay<br>What type of code review will run faster? (Manual/Automated)<br>Automated<br>What type of code review will be more thorough? (Manual/Automated)<br>Manual</blockquote><h3><strong>Task 3 Manual Code Review</strong></h3><p>Before using SAST tools, it is important to understand how manual code review is typically carried out. This makes it easier to see how SAST tools analyse code and detect vulnerabilities.</p><p>In this task, the objective is to identify SQL injection vulnerabilities in the source code of a simple application. Although the application contains multiple security issues, the focus here is only on SQL injection to clearly demonstrate how traditional code reviews work and how these steps relate to SAST analysis techniques.</p><p>Before proceeding, ensure the virtual machine is running by clicking the green Start Machine button for this task. The machine launches in split view. If it is not visible, use the Show Split View button at the top right of the room.</p><p>The source code used in this task is located at<br>/home/ubuntu/Desktop/simple-webapp/</p><p><strong>Searching for Insecure Functions</strong></p><p>The first step in manual code review is identifying potentially insecure functions. Since SQL injection is the target vulnerability, attention should be given to functions that execute database queries.</p><p>As the application uses PHP and MySQL, the following functions are commonly used to send SQL queries and are often starting points for investigation:</p><p>MySQL functions<br>mysqli_query()<br>mysql_query()<br>mysqli_prepare()<br>query()<br>prepare()</p><p>A simple way to find these functions is by using grep to search through the project files recursively. For example, to search for mysqli_query(), navigate to the project directory and run:</p><p>cd /home/ubuntu/Desktop/simple-webapp/html/<br>grep -r -n &#39;mysqli_query(&#39;</p><p>The recursive option searches all files under the directory, while the line number option shows where the match occurs. This search reveals one instance of mysqli_query() in db.php on line 18.</p><p>At this point, the presence of the function alone does not confirm a vulnerability. Further analysis is required.</p><p><strong>Understanding the Context</strong></p><p>Opening db.php shows the following code:</p><pre>function db_query($conn, $query){<br>    $result = mysqli_query($conn, $query);<br>    return $result;<br>}</pre><p>Here, mysqli_query() is wrapped inside a custom function called db_query(), and the query parameter is passed directly without modification. Since functions are often abstracted in this way, analysing a single line is not sufficient. The next step is to trace how db_query() is used across the application.</p><p><strong>Tracing User Input to Vulnerable Functions</strong></p><p>Using grep again to locate calls to db_query():</p><p>grep -r -n &#39;db_query(&#39;</p><p>This reveals three calls within hidden panel.php. Examining the first instance:</p><pre>$sql = &quot;SELECT id, firstname, lastname FROM MyGuests WHERE id=&quot;.$_GET[&#39;guest_id&#39;];<br>$result = db_query($conn, $sql);</pre><p>This is a clear SQL injection vulnerability. The value from the guest_id GET parameter is directly concatenated into the SQL query without sanitisation, allowing an attacker to manipulate the query.</p><p>The remaining two instances are:</p><pre>$sql2 = &quot;SELECT id, logtext FROM logs WHERE id=&#39;&quot;.preg_replace(&#39;/[^a-z0-9A-Z&quot;]/&#39;, &quot;&quot;, $_GET[&#39;log_id&#39;]). &quot;&#39;&quot;;<br>$result2 = db_query($conn, $sql2);</pre><pre>$sql3 = &quot;SELECT id, name FROM asciiart WHERE id=&quot;.preg_replace(&quot;/[^0-9]/&quot;, &quot;&quot;, $_GET[&#39;art_id&#39;], 1);<br>$result3 = db_query($conn, $sql3);</pre><p>At first glance, both appear protected because the input is filtered using preg_replace(). However, each filter must be carefully evaluated.</p><p>In the second query, only alphanumeric characters and double quotes are allowed. Since the value is enclosed within single quotes in the SQL query, the attacker cannot break out of the string. This makes the query safe from SQL injection.</p><p>In the third query, only numeric characters are intended to be allowed. However, the third argument of preg_replace() limits the replacement to a single occurrence. This means only the first invalid character is removed, while any remaining malicious characters are left intact. As a result, this query is vulnerable to SQL injection.</p><p><strong>Conclusion of Manual Review</strong></p><p>Through manual code review, two SQL injection vulnerabilities were identified in the application. While this application is small and easy to analyse, real world applications contain far more complex codebases. Manually tracing functions and data flows in such environments can become time consuming and error prone.</p><p>This highlights why manual code review alone is not scalable and why automated SAST tools are useful. In the next steps, SAST tools will be used to perform similar analysis and evaluate how effectively they detect these vulnerabilities.</p><p><strong>Bonus Exercise</strong></p><p>Continue using manual code review techniques to identify other types of vulnerabilities in the provided project. The guided questions will help structure your analysis.</p><blockquote>Local File Inclusion (LFI) attacks are made possible by the misuse of one of the following functions in PHP:<br>require() include() require_once() include_once()</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*XuGlqt3fOiX-szu_YHtm1w.png" /></figure><blockquote>Answer the following questions using grep to search for LFI vulnerabilities only on the .php files in the html/ directory of the simple-webapp project.<br>No answer needed<br><br>Which of the mentioned functions is used in the project? (Include the parenthesis at the end of the function name)<br>include()</blockquote><blockquote>How many instances of the function found in question 2 exist in your project’s code?<br>9<br><br>Only one of the function’s instances is vulnerable to LFI. Remember that for LFI to be present, the attacker must be able to manipulate a part of what is sent to the vulnerable function. The vulnerable instance must contain some reference to a GET or POST parameter or other manipulable inputs.</blockquote><blockquote>What file contains the vulnerable instance?<br>view.php</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*PwUgolqEwgK-kWp0W2bmdA.png" /></figure><blockquote>What line in the file found on the previous question is vulnerable to LFI?<br>22</blockquote><h3><strong>Task 4 Automated Code Review</strong></h3><h4><strong>Static Application Security Testing</strong></h4><p>Static Application Security Testing or SAST involves the use of automated tools to analyse source code for security vulnerabilities. The purpose of SAST is not to replace manual code reviews but to automate basic and repetitive security checks so vulnerabilities can be detected early without requiring a highly specialised reviewer.</p><p>SAST works alongside other security techniques such as Dynamic Application Security Testing and Software Composition Analysis to provide broader coverage across the development lifecycle. Like all security approaches, SAST has strengths and limitations that must be understood.</p><p><strong>Pros of SAST</strong></p><p>It does not require a running instance of the application<br>It provides wide coverage of application functionality<br>It runs quickly compared to dynamic testing techniques<br>It reports the exact location of vulnerabilities in the source code<br>It is easy to integrate into CI CD pipelines</p><p><strong>Cons of SAST</strong></p><p>Source code may not always be available such as in third party applications<br>It can generate false positives<br>It cannot detect vulnerabilities that depend on runtime behaviour<br>Most tools are language specific and only analyse supported languages</p><p><strong>SAST Under the Hood</strong></p><p>Although SAST tools differ in implementation, most follow two core steps.</p><p>First, the source code is transformed into an abstract model. This is usually done using Abstract Syntax Trees or similar structures. This representation allows the tool to analyse code in a structured way that is independent of the programming language. If a language feature is not correctly represented in the model, related vulnerabilities may be missed.</p><p>Second, the abstract model is analysed for security issues using different analysis techniques. From a user perspective, the focus is on understanding these techniques rather than the modelling process itself.</p><p><strong>Semantic Analysis</strong></p><p>Semantic analysis is similar to manually searching for insecure functions during a code review. It focuses on identifying risky function usage within a local context.</p><p>For example, directly concatenating user input into a SQL query would be flagged as insecure:</p><pre>mysqli_query($db, &quot;SELECT * from users where username=&quot;.$_GET[&#39;username&#39;])</pre><p><strong>Dataflow Analysis</strong></p><p>Dataflow analysis is used when vulnerabilities cannot be identified by examining a function in isolation. Consider the following function:</p><pre>function db_query($conn, $query){<br>    $result = mysqli_query($conn, $query);<br>    return $result;<br>}</pre><p>On its own, this function does not appear vulnerable. Dataflow analysis traces how data moves through the application to determine whether user controlled input reaches a dangerous function without proper sanitisation.</p><p>In this context, user inputs are called sources and dangerous functions are called sinks. If data flows from a source to a sink without adequate filtering, a vulnerability exists.</p><p><strong>Control Flow Analysis</strong></p><p>Control flow analysis examines the order in which operations are executed. It is useful for identifying issues such as race conditions, uninitialized variables, and resource leaks.</p><p>For example:</p><pre>String cmd = System.getProperty(&quot;cmd&quot;);<br>cmd = cmd.trim();</pre><p>If the system property is not defined, the first line returns null and the second line causes a runtime exception.</p><p><strong>Structural Analysis</strong></p><p>Structural analysis evaluates language specific code structures and best practices. This includes detecting dead code, improper exception handling, and weak cryptographic implementations.</p><p>Example:</p><pre>$options = array(&#39;private_key_bits&#39; =&gt; 1024, &#39;private_key_type&#39; =&gt; OPENSSL_KEYTYPE_RSA);<br>$res = openssl_pkey_new($options);</pre><p>Here, RSA is used with a 1024 bit key, which is considered insecure by modern standards.</p><p><strong>Configuration Analysis</strong></p><p>Configuration analysis focuses on application configuration files rather than source code. Many vulnerabilities arise from insecure configuration settings.</p><p>For example, the following PHP settings may expose the application to attacks such as Remote File Inclusion or Server Side Request Forgery:</p><pre>allow_url_include = On<br>allow_url_fopen = On</pre><p>Not every SAST tool implements all of these analysis techniques. However, understanding them provides a useful framework for evaluating and comparing different SAST solutions.</p><blockquote>Does SAST require a running instance of the application for analysis? (yea/nay)</blockquote><blockquote>Answer: <strong>Nay</strong></blockquote><blockquote>What kind of analysis would likely flag dead code segments?</blockquote><blockquote>Answer: <strong>Structural analysis</strong></blockquote><blockquote>What kind of analysis would likely detect flaws in configuration files?</blockquote><blockquote>Answer: <strong>Configuration analysis</strong></blockquote><blockquote>What kind of analysis is similar to grepping the code in search of flaws?</blockquote><blockquote>Answer: <strong>Semantic analysis</strong></blockquote><h3><strong>Task 5 Rechecking Our Application with SAST Tools</strong></h3><p>Now that the basics of SAST are clear, we can apply it to a real application. In this task, a simple PHP web application located in the simple webapp folder on the desktop is analysed using an automated SAST tool.</p><p><strong>Rechecking Our Application with Psalm</strong></p><p>Psalm which stands for PHP Static Analysis Linting Machine is a static analysis tool for PHP. It is already included in the project, so no installation is required.</p><p>Navigate to the project directory in the terminal. At the root of the project, there is a psalm.xml file which defines the tool configuration. This file controls how strict the analysis is and which directories are scanned. In this case, only the html directory is analysed, while the vendor directory is excluded to avoid scanning third party libraries.</p><p>The errorLevel setting determines how strict Psalm is. Lower values result in more reported issues.</p><p>Once inside the project directory, Psalm can be executed using the command provided. When run with default options, Psalm mainly performs structural analysis. It reports coding mistakes such as incorrect operators, type issues, or unsafe coding practices.</p><p>An example error highlights the incorrect use of the assignment operator instead of a comparison operator inside an if condition. While this is not a security vulnerability, it can cause logic errors and unexpected behaviour at runtime. Fixing such issues improves code quality and reliability.</p><p><strong>Running Dataflow Analysis with Psalm</strong></p><p>Psalm also supports taint analysis, which enables dataflow analysis to identify security vulnerabilities. Running Psalm with the taint analysis option produces more security focused results.</p><p>In this case, Psalm detects a vulnerability where user controlled input from a GET parameter is concatenated into a file path passed to the include function. This is a classic Local File Inclusion vulnerability. Psalm provides a full trace showing how the data flows from the input source to the dangerous sink function.</p><p>Dataflow analysis typically produces the most valuable findings from a security perspective. However, structural issues should not be ignored, as they can lead to subtle bugs or business logic flaws.</p><p><strong>False Positives and False Negatives</strong></p><p>All SAST tools produce imperfect results. Two types of errors must always be considered.</p><p>False positives occur when the tool reports a vulnerability that does not actually exist.<br>False negatives occur when the tool fails to report a real vulnerability.</p><p>In the manual review, three potential SQL injection cases were examined. Two were confirmed as vulnerable, and one was deemed safe due to proper filtering. Initially, Psalm only reported one SQL injection issue. This happened because Psalm considered multiple issues to be the same sink, since they all passed through the same database wrapper function.</p><p>By commenting out one vulnerable query, Psalm then reported a different SQL injection. This shows that the tool grouped the findings together instead of treating them separately.</p><p><strong>Improving Results with Annotations</strong></p><p>To help Psalm better understand the application logic, annotations were added to the database wrapper function. By marking the function parameter as a SQL sink and enabling specialisation, Psalm was instructed to treat each call independently and trace tainted input more accurately.</p><p>After adding these annotations and rerunning the analysis, Psalm correctly reported multiple SQL injection paths.</p><p><strong>Comparing Manual Review and Psalm Results</strong></p><p>The final comparison highlights the strengths and limitations of SAST tools.</p><p>The first SQL query was correctly identified as vulnerable by both methods.<br>The second query was flagged by Psalm but was safe in practice, making it a false positive.<br>The third query was vulnerable but not detected by Psalm, making it a false negative.</p><p>This comparison reinforces an important lesson. SAST tools are extremely useful for scaling security analysis and finding issues early, but they are not perfect. Their results must always be reviewed by a human. SAST should be used as a powerful complement to manual code review, not as a replacement.</p><blockquote>What type of error occurs when the tool reports on a vulnerability that isn’t present in the code?<br>false positive</blockquote><blockquote>How many errors are reported after annotating the code as instructed in this task and re-running Psalm?<br>9</blockquote><h3><strong>Task 6 SAST in the Development Cycle</strong></h3><p>Static Application Security Testing is usually introduced very early in the development lifecycle. Since it does not require a running application, it is commonly applied during the coding phase to detect issues as soon as they are introduced.</p><p><strong>Ways to Implement SAST</strong></p><p>Depending on project needs, SAST can be integrated in different ways.</p><p><strong>CI CD Integration</strong></p><p>SAST tools can be integrated into the CI CD pipeline so that every pull request or merge triggers a security scan. This ensures that code entering the main branch has passed basic security checks. In some cases, running SAST only during merges instead of on every pull request helps reduce delays in the pipeline and avoids slowing down developers.</p><p><strong>IDE Integration</strong></p><p>SAST tools can also be integrated directly into developers’ IDEs. This allows issues to be detected while code is being written, enabling developers to fix problems immediately rather than later in the process. Early fixes save time and reduce overall development costs.</p><p>In many projects, using both approaches together is ideal. IDE integrations can focus on fast structural checks and secure coding practices, while CI CD pipelines can run deeper and more time consuming analyses such as taint or dataflow analysis. The exact setup should be chosen based on the project’s requirements and team workflow.</p><p><strong>Integrating SAST in IDEs</strong></p><p>The virtual machine includes VS Code with SAST tools already configured.</p><p><strong>Psalm</strong></p><p>Psalm supports IDE integration through a VS Code plugin available in the Visual Studio Marketplace. It provides real time feedback while coding and highlights structural issues directly in the editor. Taint analysis is not available in the IDE version, so only basic analysis results are shown.</p><p><strong>Semgrep</strong></p><p>Semgrep is another SAST tool available as a VS Code extension. It displays inline alerts and can be customised using user defined rules. The rules used in this project are located in the semgrep rules directory within the project folder. Creating custom rules is outside the scope of this task.</p><p>Both tools display detected issues directly in the code. Semgrep scans the entire project when VS Code starts and reports all findings, while Psalm reports issues only in the file currently being edited.</p><p><strong>Working with SAST Alerts in VS Code</strong></p><p>Detected issues appear inline in the editor. Hovering over a highlighted line provides more details about the problem. A complete list of detected issues can also be viewed through the Problems panel at the bottom of the VS Code interface.</p><p>Using SAST tools directly in the IDE helps developers write cleaner and more secure code, contributing significantly to the overall security of the final application.</p><p>Use both Psalm and Semgrep in the IDE to answer the questions at the end of this task.</p><blockquote>How many problems in total are detected by Semgrep in this project?</blockquote><blockquote>Press enter or click to view image in full size</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*1IZZr5B8S_1YCA8s.png" /></figure><blockquote>Answer: <strong>27</strong></blockquote><blockquote>How many problems are detected in the showrecipe.inc.php file?</blockquote><blockquote>Press enter or click to view image in full size</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*S3fav6_XEOOt4qYL.png" /></figure><blockquote>Answer: <strong>8</strong></blockquote><blockquote>Open showrecipe.inc.php. There are two types of problems being reported by Semgrep in this file. One is identified as “tainted-sql-string” and refers to possible SQL injections.</blockquote><blockquote>What other problem identifier is reported by Semgrep in this file? (Write the id reported by Semgrep)</blockquote><blockquote>Press enter or click to view image in full size</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*5bmzJVMvZi2Bzy3o.png" /></figure><blockquote>Answer: <strong>echoed-request</strong></blockquote><blockquote>What type of vulnerability is associated with the problem identifier on the previous question?</blockquote><blockquote>Answer: <strong>Cross-site Scripting</strong></blockquote><h3>Task 7: <strong>Conclusion</strong></h3><p>SAST is one of the many techniques that help improve application security during the development phase. Using tools such as Psalm demonstrates how automated static analysis can significantly reduce the time and effort required compared to fully manual code reviews. However, like all automated solutions, SAST results must be manually reviewed to confirm their accuracy, since false positives can occur.</p><p>To gain a more complete understanding of application security testing, exploring Dynamic Application Security Testing is recommended, as it complements SAST and further strengthens a secure development process.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94c6e74e0788" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OWASP API Security Top 10–2 | TryHackMe Walkthrough]]></title>
            <link>https://medium.com/@ygxshh/owasp-api-security-top-10-2-tryhackme-walkthrough-7eeb9637dd17?source=rss-b8d7bb1bc65f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7eeb9637dd17</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[owasp]]></category>
            <dc:creator><![CDATA[Yogesh Mishra]]></dc:creator>
            <pubDate>Sat, 13 Dec 2025 08:22:09 GMT</pubDate>
            <atom:updated>2025-12-13T08:22:09.971Z</atom:updated>
            <content:encoded><![CDATA[<h3>Task 1 | Quick Recap</h3><p><strong>Overview</strong><br>This room covers the remaining OWASP API Security principles after the first five studied earlier. The focus is on understanding risks impact and mitigation.</p><p><strong>Key learning objectives</strong><br>a. Identifying security misconfigurations in APIs<br>b. Preventing Denial of Service attacks against APIs<br>c. Ensuring proper logging and monitoring mechanisms</p><p><strong>Learning prerequisites</strong><br>Before starting this room it is recommended to understand<br>a. How websites work<br>b. HTTP protocols and methods<br>c. Basic security principles<br>d. OWASP Top 10 web vulnerabilities</p><p><strong>Machine and environment details</strong><br>a. Operating system used is Windows<br>b. Tool used is Talend API Tester free edition<br>c. Backend application is Laravel based</p><p><strong>Goal</strong><br>Begin hands on learning with the configured environment to understand remaining OWASP API security principles</p><blockquote><strong>TASK 1.1 I can connect and log in to the machine.</strong><br>No answer needed</blockquote><h3>Task 2 | Vulnerability VI — Mass Assignment</h3><p><strong>How it happens</strong><br>Mass assignment occurs when client side input is automatically mapped to server side objects or variables. Attackers study application logic and send crafted requests to modify sensitive fields. This is common in modern frameworks like Laravel and Code Ignitor.</p><p><strong>Example scenario</strong><br>A user profile page allows updates to email name and address.<br>Username is read only on the UI but an attacker modifies it in the request.<br>If the server does not filter fields properly the database gets updated with tampered values.</p><p><strong>Why it is dangerous</strong><br>Server trusts all incoming fields.<br>Hidden or restricted fields can be modified by attackers.<br>Business logic is bypassed.</p><p>Likely impact<br>Data tampering in the database.<br>Privilege escalation from normal user to admin.<br>Unauthorized increase in user benefits such as credits.</p><p><strong>Practical example overview</strong><br>Signup API endpoint is apirule6 user using POST.<br>Input fields are name username and password.<br>Database also has a credit field with default value 50.<br>Developer used mass assignment to store all client data.<br>Attackers can send a higher credit value and it gets stored.</p><p><strong>Core problem</strong><br>No server side filtering is applied.<br>Mass assignment blindly inserts all received fields including credit.</p><p><strong>Secure approach</strong><br>Apply server side filtering using a secure endpoint.<br>Force credit to default value 50 regardless of client input.<br>Only required fields should be accepted from the request.</p><p><strong>Mitigation measures</strong><br>Understand how the framework handles insert and update operations.<br>In Laravel use fillable and guarded arrays.<br>Avoid automatic binding of client input to code variables.<br>Allowlist only necessary properties that can be updated from client side.</p><blockquote><strong>TASK 2.1 Is it a good practice to blindly insert/update user-provided data in the database (yea/nay)?</strong></blockquote><blockquote>Nay</blockquote><blockquote><strong>TASK 2.2 Using /apirule6/user_s, insert a record in the database using the credit value as 1000.</strong></blockquote><blockquote>No answer needed</blockquote><blockquote><strong>TASK 2.3 What would be the returned credit value after performing Question#2?</strong></blockquote><blockquote>50</blockquote><h3><strong>Task 3 | Vulnerability VII — Security Misconfiguration</strong></h3><p><strong>Security Misconfiguration Notes</strong></p><p><strong>How it happens</strong><br>Security misconfiguration occurs when security controls are incorrectly implemented or poorly configured. Common causes include default or incomplete configurations publicly accessible cloud storage misconfigured CORS settings and verbose error messages exposing sensitive details. Attackers exploit these weaknesses to gather information and gain unauthorized access.</p><p><strong>Common sources of misconfiguration</strong><br>a. Public access to API documentation endpoints or logs<br>b. Default credentials left unchanged<br>c. Misconfigured web application firewalls<br>d. Debug mode enabled in production<br>e. Excessive error details returned in responses</p><p><strong>Likely impact</strong><br>Intruders gain deep knowledge of API structure and components.<br>Security mechanisms can be bypassed.<br>Stack traces and error details may expose confidential data file paths and internal logic.<br>This information helps attackers profile the system and plan targeted attacks.</p><p><strong>Practical example overview</strong><br>Company MHT faced server availability issues.<br>Bob created a GET endpoint apirule7 ping v to expose server health status.<br>No error handling was implemented.<br>On failure the API returned full stack traces including controller route function names and file paths.</p><p><strong>Core issue</strong><br>The API leaks sensitive internal information through detailed error responses.<br>Attackers can use this data for reconnaissance and exploitation.</p><p><strong>Secure approach</strong><br>Bob created a secure endpoint apirule7 ping s.<br>Proper error handling was added.<br>Only minimal and required information is shared with the client.<br>Internal details are hidden from responses.</p><p><strong>Mitigation measures</strong><br>Restrict administrative interfaces to authorized users only.<br>Disable default usernames and passwords on public facing systems.<br>Disable directory listing and apply strict file and folder permissions.<br>Remove unnecessary code snippets and error logs.<br>Turn off debugging features in production environments.</p><blockquote><strong>TASK 3.1 Is it an excellent approach to show error logs from the stack trace to general visitors (yea/nay)?</strong></blockquote><blockquote>Nay</blockquote><blockquote><strong>TASK 3.2 Try to use the API call /apirule7/ping_s in the attached VM.</strong></blockquote><blockquote>No answer needed</blockquote><blockquote><strong>TASK 3.3 What is the HTTP response code?</strong></blockquote><blockquote>500</blockquote><blockquote><strong>TASK 3.4 What is the Error ID number in the HTTP response message?</strong></blockquote><blockquote>1401</blockquote><h3>Task 4 | Vulnerability VIII — Injection</h3><p><strong>Overview</strong><br>Injection attacks are one of the oldest and most common web and API attacks. They happen when user input is not properly validated and is directly processed by backend logic or databases.</p><p><strong>How it happens</strong><br>APIs accept user input and embed it directly into queries or system commands.<br>Attackers insert malicious payloads into input fields.<br>The backend executes this input as part of SQL OS or XML processing.<br>Applications built without secure frameworks are more exposed.</p><p><strong>Common types of injection</strong><br>SQL injection targets databases.<br>OS command injection targets operating system commands.<br>XML injection targets XML parsers and configurations.</p><p><strong>Why applications are vulnerable</strong><br>Missing input validation and sanitization.<br>Dynamic query construction.<br>No use of parameterized queries.<br>Custom or legacy frameworks without security protections.</p><p><strong>Likely impact</strong><br>Exposure of sensitive information.<br>Unauthorized account access.<br>Data modification or deletion.<br>Denial of Service conditions.<br>Complete account takeover or remote code execution.</p><p><strong>Practical example summary</strong><br>Users at company MHT faced unexpected account issues.<br>A vulnerable login API endpoint allowed unfiltered input.<br>Attackers used crafted payloads to bypass authentication.<br>Authorization keys were issued without proper checks.</p><p><strong>Secure implementation</strong><br>A secure login endpoint was introduced.<br>Parameterized queries replaced dynamic queries.<br>Framework level input filtering was applied.<br>Malicious payloads were blocked successfully.</p><p><strong>Mitigation measures</strong><br>Validate and sanitize all client provided data on the server side.<br>Always use parameterized queries for database access.<br>Use built in security features of modern frameworks.<br>Apply Web Application Firewall rules to detect and block injection attacks.</p><blockquote><strong>TASK 4.1 Can injection attacks be carried out to extract data from the database (yea/nay)?</strong></blockquote><blockquote>Yea</blockquote><blockquote><strong>TASK 4.2 Can injection attacks result in remote code execution (yea/nay)?</strong></blockquote><blockquote>Yea</blockquote><blockquote><strong>TASK 4.3 What is the HTTP response code if a user enters an invalid username or password?</strong></blockquote><blockquote>403</blockquote><h3>Task 5 | Vulnerability IX — Improper Assets Management</h3><p><strong>Overview</strong><br>Inappropriate asset management occurs when outdated or unused API versions remain active even after newer secure versions are deployed. These older APIs often lack updated security controls and become attractive targets for attackers.</p><p><strong>How it happens</strong><br>Multiple API versions such as v1 and v2 exist simultaneously.<br>The system migrates fully to v2 but v1 is not removed.<br>Older APIs do not include the latest security patches.<br>Shared databases between API versions increase exposure.<br>Poor endpoint tracking and incomplete documentation contribute to the issue.</p><p><strong>Why it is dangerous</strong><br>Outdated APIs expose obsolete features.<br>Security mechanisms are weaker or missing.<br>Attackers can easily identify vulnerabilities.<br>Sensitive data may be leaked through legacy endpoints.</p><p><strong>Likely impact</strong><br>Unauthorized access to confidential data.<br>Excessive data exposure from older endpoints.<br>Possible full system or server compromise.</p><p><strong>Practical example summary</strong><br>Company MHT developed multiple API versions.<br>Old version v1 remained accessible on the server.<br>The endpoint apirule9 v1 user login returned extra user details such as balance and address.<br>The newer v2 endpoint restricted information properly.</p><p><strong>Secure approach</strong><br>Deactivate and remove unused API versions.<br>Allow access only to the latest secure endpoints.<br>Ensure users interact only with the v2 API.</p><p><strong>Mitigation measures</strong><br>Block deprecated APIs at the network level.<br>Separate development QA and production APIs onto different servers.<br>Maintain complete and up to date API documentation.<br>Document authentication error handling CORS policies and rate limiting.<br>Use open standards to automatically generate API documentation.</p><p><strong>TASK 5.1 Is it good practice to host all APIs on the same server (yea/nay)?</strong></p><p>Nay</p><p><strong>TASK 5.2 Make an API call to /apirule9/v1/user/login using the username “Alice” and password “##!@#!!”.</strong></p><p>No answer needed</p><p><strong>TASK 5.3 What is the amount of balance associated with user Alice?</strong></p><p>100</p><p><strong>TASK 5.4 What is the country of the user Alice?</strong></p><p>USA</p><h3>Task 6 | Vulnerability X — Insufficient Logging &amp; Monitoring</h3><p><strong>Overview</strong><br>Insufficient logging and monitoring occurs when malicious activity happens on a system but there is not enough recorded evidence to investigate or trace the attacker. Many organizations focus only on infrastructure logs and ignore detailed API level logging.</p><p><strong>How it happens</strong><br>APIs do not log enough request and response details.<br>Only server or network events are recorded while API activity is ignored.<br>Critical details like IP address accessed endpoints input data and timestamps are missing.<br>Logs are not centralized or monitored regularly.</p><p><strong>Why it is a problem</strong><br>Without proper logs it becomes difficult to detect attacks in real time.<br>Attack patterns cannot be identified or correlated.<br>Forensic investigation after an incident becomes almost impossible.</p><p><strong>Likely impact</strong><br>Inability to identify the attacker or hacker.<br>Delayed detection of ongoing attacks.<br>Higher damage due to lack of visibility and response.</p><p><strong>Practical example summary</strong><br>Company MHT faced repeated attacks in the past.<br>The attackers could not be identified due to missing logs.<br>Bob created an API endpoint apirule10 logging.<br>The endpoint logs user metadata such as IP address and browser details.<br>Logs are stored in the database for analysis.</p><p><strong>Enhanced monitoring approach</strong><br>Logged data is also forwarded to a SIEM solution.<br>SIEM helps correlate events and detect suspicious behavior across systems.</p><p><strong>Mitigation measures</strong><br>Use a SIEM system for centralized log management.<br>Log denied access failed authentication attempts and validation errors.<br>Ensure logs contain enough detail to identify intruders.<br>Treat logs as sensitive data and protect them during storage and transfer.<br>Set up alerts to detect and respond to suspicious activities quickly.</p><p><strong>TASK 6.1 Should the API logs be publically accessible so that the attacker must know they are being logged (yea/nay)?</strong></p><p>Nay</p><p><strong>TASK 6.2 What is the HTTP response code in case of successful logging of user information?</strong></p><p>200</p><h3>Task 7 | Conclusion</h3><p><strong>Overview</strong><br>A large portion of the OWASP API Security Top 10 focuses on authorization authentication and security misconfigurations. These areas remain the most common reasons APIs are compromised in real world systems.</p><p><strong>Key takeaway</strong><br>Most API breaches happen due to weak or broken authentication and authorization controls.<br>Security misconfigurations further increase attack surfaces and simplify exploitation.</p><p><strong>Why APIs are targeted</strong><br>Attackers often focus on well known endpoints.<br>Modules like sign in role based access and user profile management are frequent targets.<br>Poorly secured endpoints provide easy entry points into systems.</p><p><strong>Developer responsibility</strong><br>API developers must follow strong cybersecurity best practices.<br>Critical modules should receive higher security priority.<br>Access control and identity checks must be implemented correctly and consistently.</p><p><strong>Conclusion</strong><br>Secure API development requires continuous attention to authentication authorization and configuration.<br>By applying best practices and learning from OWASP guidelines developers can significantly reduce risks.<br>Building secure APIs is an ongoing process and continuous improvement is essential.</p><blockquote><strong>TASK 7.1 I have completed the room.</strong><br>No answer needed</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7eeb9637dd17" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Phishing — Phishmas Greetings | Advent of Cyber 2025 | TryHackMe Walkthrough & Answers]]></title>
            <link>https://medium.com/@ygxshh/phishing-phishmas-greetings-advent-of-cyber-2025-tryhackme-walkthrough-answers-541e441c5d05?source=rss-b8d7bb1bc65f------2</link>
            <guid isPermaLink="false">https://medium.com/p/541e441c5d05</guid>
            <category><![CDATA[tryhackme-answer]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[advent-of-cyber-2025]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <dc:creator><![CDATA[Yogesh Mishra]]></dc:creator>
            <pubDate>Fri, 12 Dec 2025 16:46:06 GMT</pubDate>
            <atom:updated>2025-12-12T16:46:06.834Z</atom:updated>
            <content:encoded><![CDATA[<h3>Phishing — Phishmas Greetings | Advent of Cyber 2025 | TryHackMe Walkthrough &amp; Answers</h3><h3>Task 1 | Introduction</h3><p><strong>Context Summary</strong><br>After McSkidys disappearance, TBFC security has become weak and the email protection system has stopped working. Since the filtering tool is offline, staff members must check each suspicious email manually. The SOC team believes that Malhares Eggsploit Bunnies are sending phishing mails to steal user credentials and disrupt SOC mas operations. Some of these mails pretend to be routine TBFC communications, volunteer activities or event information, making them harder to detect. Incorrect decisions could help the attackers move closer to their plan.</p><p><strong>Key Points</strong><br>• TBFC defences are currently weakened<br>• Email Protection Platform is unavailable<br>• All suspicious messages must be manually reviewed<br>• Attackers are sending phishing mails disguised as normal work communication<br>• Wrong judgments increase the risk of compromise</p><p><strong>Learning Objectives</strong><br>• Identify phishing mails<br>• Recognise current phishing techniques<br>• Distinguish between spam and phishing</p><blockquote>TASK 1.1 I have access to the Wareville Email Threat Inspector!<br>No answer needed</blockquote><h3><strong>Task 2 | Spotting Phishing Emails</strong></h3><p>Here is your text with all blank line spaces removed while keeping the content exactly the same.</p><p><strong>Overview</strong></p><p>Phishing remains highly effective because it targets people not technology. With TBFC email protection offline and defences weakened since McSkidy went missing, attackers called the Eggsploit Bunnies are sending tailored phishing messages to steal credentials and disrupt SOC celebration plans.</p><p><strong>Main attacker goals</strong></p><p>• Credential theft<br>• Malware delivery via attachments or scripts<br>• Data exfiltration<br>• Financial fraud via fake payroll or invoice changes</p><p><strong>Spam versus phishing</strong></p><p>• Spam is mass unsolicited content meant to annoy or advertise.<br>• Phishing is targeted and deceptive with the aim of gaining access or sensitive data.<br>• Not every unwanted mail is dangerous. identify the intent before acting.</p><p><strong>Common phishing techniques and how to spot them</strong></p><p><strong>Impersonation</strong><br>Sender pretends to be a coworker, manager or internal service.<br>Check sender address for mismatch with company domain.</p><p><strong>Social engineering</strong><br>Uses emotion or pressure words like urgent or immediately to force quick action.<br>Attempts to prevent normal verification by saying do not call or do not reply to usual channels.</p><p><strong>Typosquatting and punycode tricks</strong><br>Domains use lookalike letters or unicode characters that resemble legitimate domains.<br>Inspect full domain and check headers for encoded ACE values.</p><p><strong>Spoofing</strong><br>Display name shows a trusted identity while headers reveal a different origin.<br>Check SPF DKIM DMARC results and the Return Path header. failed checks are strong red flags.</p><p><strong>Malicious attachments</strong><br>Files like html or hta can run scripts outside browser sandboxes.<br>Treat unexpected attachments with extreme caution.</p><p><strong>Legitimate service abuse and fake login pages</strong><br>Attackers use trusted sharing services to host lures that redirect to fake sign in pages.<br>Verify the URL carefully before entering credentials.</p><p><strong>Side channel communications</strong><br>Attackers move the conversation to text apps or calls to avoid company controls.<br>Treat out of band requests as suspicious and verify via known internal channels.</p><p><strong>Trending flow to watch for</strong><br>Email claims a trusted share from Dropbox Drive or OneDrive.<br>Shared item links to a hosted document or a login prompt.<br>Fake login steals credentials or prompts a manual download of a malicious file.</p><p><strong>Triage checklist for each message</strong><br>• Who sent it compare the visible name to the actual email address.<br>• Does the domain match internal standards and company email structure.<br>• Do SPF DKIM DMARC and Return Path look valid in headers.<br>• Is there an unexpected attachment and what is its file type.<br>• Is the message asking for credentials approvals payments or unusual actions.<br>• Are urgency or secrecy cues present that try to stop verification.<br>• Is a trusted third party used to host content and does the destination URL match expected patterns.<br>• Has the request moved to a different communication channel.<br>If multiple checks fail treat the email as phishing and escalate.</p><p><strong>How to mark phishing and earn a flag</strong><br>For every phishing email identify three clear signals such as spoofing impersonation social engineering punycode or malicious attachment. use those signals as evidence when reporting.</p><p><strong>Short memory aids</strong><br>• Verify sender not trust display name.<br>• Inspect headers for authentication failures.<br>• Pause on urgency requests verify by known channels.<br>• Never enter credentials on a page reached from an unsolicited link.</p><blockquote>TASK 2.1 Classify the 1st email, what’s the flag?</blockquote><blockquote>THM{yougotnumberI-keep-it-going)</blockquote><blockquote>TASK 2.2 Classify the 2nd email. What’s the flag?</blockquote><blockquote>THM{nmumber2-was-not-tha-thard!}</blockquote><blockquote>TASK 2.3 Classify the 3rd email. What’s the flag?</blockquote><blockquote>THM{Impersonation-is-areal-thing-keepIt}</blockquote><blockquote>TASK 2.4 Classify the 4th email. What’s the flag?</blockquote><blockquote>THM{Get-back-SOC-mas!!}</blockquote><blockquote>TASK 2.5 Classify the 5th email. What’s the flag?</blockquote><blockquote>THM{It-was-just-a-sp4m!!}</blockquote><blockquote>TASK 2.6 Classify the 6th email. What’s the flag?</blockquote><blockquote>THM{number6-is-the-last-one!-DX!}</blockquote><blockquote>TASK 2.7 If you enjoyed today’s room, you can explore the Phishing Analysis Tools room in detail!</blockquote><blockquote>No answer needed</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=541e441c5d05" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OWASP API Security Top 10–1 | TryHackMe Walkthrough]]></title>
            <link>https://medium.com/@ygxshh/owasp-api-security-top-10-1-tryhackme-walkthrough-9fbb077b916e?source=rss-b8d7bb1bc65f------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fbb077b916e</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[owasp-api-security-top-10]]></category>
            <category><![CDATA[owasp]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <dc:creator><![CDATA[Yogesh Mishra]]></dc:creator>
            <pubDate>Thu, 11 Dec 2025 15:02:07 GMT</pubDate>
            <atom:updated>2025-12-11T15:02:07.171Z</atom:updated>
            <content:encoded><![CDATA[<p>Learn the basic concepts for secure API development (Part 1).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*QFNoUKgnitlSNVUYQcr7EQ.png" /></figure><h3>Task 1 | Introduction</h3><ul><li>The Open Worldwide Application Security Project is a global community focused on improving application security.</li><li>In 2019 the project released the top ten API vulnerabilities list.</li><li>This module covers the first five principles in Part one and the remaining principles in Part two.</li></ul><blockquote><strong>TASK 1.1 I can connect and log in to the machine.</strong></blockquote><blockquote>No answer needed</blockquote><h3>Task 2 | Understanding APIs — A refresher</h3><p><strong>What an API is</strong><br> • A communication layer that lets two software components interact<br> • Uses structured requests and responses<br> • Application means any software with a specific function<br> • Interface means the contract that defines how communication works<br> • Documentation explains how requests and responses must be structured<br> • APIs are core building blocks for modern enterprise applications</p><h4>Major Breaches Linked to API Weakness</h4><p><strong>LinkedIn 2021</strong><br> • Data of more than seven hundred million users scraped through API misuse<br> • Exposed names emails phone numbers locations profile links and work details</p><p><strong>Twitter 2022</strong><br> • More than five point four million user records offered for sale<br> • Zero day in API revealed accounts linked to phone numbers or emails</p><p><strong>Pixlr 2021</strong><br> • Nearly one point nine million users affected<br> • Exposed usernames emails country information and hashed passwords</p><h4>Why It Matters</h4><p>• Insecure APIs can leak sensitive data at massive scale<br> • Breaches damage user trust and increase financial risk<br> • Understanding these incidents prepares you to apply OWASP API Security Top Ten principles</p><blockquote><strong>Task 2.1 In the LinkedIn breach (Jun 2021), how many million records (sample) were posted by a hacker on the dark web?</strong></blockquote><blockquote>1</blockquote><blockquote><strong>Task 2.2 Is the API documentation a trivial item and not used after API development (yea/nay)?</strong></blockquote><blockquote>nay</blockquote><blockquote><strong>Task 2.3 I understand the APIs and am ready to learn OWASP Top 10 Principles.</strong></blockquote><blockquote>No answer needed</blockquote><h3>Task 3 | Vulnerability I — Broken Object Level Authorisation (BOLA)</h3><p><strong>How it happens</strong><br> • API uses object IDs to fetch or update data<br> • If the endpoint does not verify who is requesting the data users can change the ID and access someone else’s information<br> • This is the same concept as IDOR</p><p><strong>Likely impact</strong><br> • Unauthorised access to sensitive data<br> • Possible full account takeover<br> • Major risk to user privacy and company reputation</p><p><strong>Example explained</strong><br> • Endpoint returns user details based only on ID<br> • No check is done to confirm if the caller is authorised<br> • Anyone can request any ID and get confidential data<br> • Adding an authorisation token in the header fixes the issue<br> • Invalid or missing token should return a forbidden response</p><p><strong>Mitigation</strong><br> • Enforce proper authorisation checks at code level<br> • Validate that the logged in user is allowed to access the requested object<br> • Use strong random tokens for reliable access control</p><blockquote><strong>Task 3.1 Suppose the employee ID is an integer with incrementing value. Can you check through the vulnerable API endpoint the total number of employees in the company?</strong></blockquote><blockquote>3</blockquote><blockquote><strong>Task 3.2 What is the flag associated with employee ID 2?</strong></blockquote><blockquote>THM{838123}</blockquote><blockquote><strong>Task 3.3 What is the username of employee ID 3?</strong></blockquote><blockquote>Bob</blockquote><h3>Task 4 | Vulnerability II — Broken User Authentication (BUA)</h3><p><strong>How it happens</strong><br> • Authentication is poorly implemented or incompletely validated<br> • API accepts incorrect or partial credentials like checking only email and ignoring password<br> • Missing security controls such as authorisation headers or tokens<br> • Attackers can abuse weak authentication endpoints to impersonate users</p><p><strong>Likely impact</strong><br> • Attackers can hijack sessions or bypass authentication<br> • Sensitive data becomes easily accessible<br> • Attackers can perform actions as another user including full account takeover</p><p><strong>Example summary</strong><br> • Login endpoint is built to return a token after verifying email and password<br> • Developer checks only the email in the query and ignores the password<br> • Anyone with the victim’s email can obtain a valid token<br> • Fix is to validate both email and password properly in the login logic</p><p><strong>Mitigation</strong><br> • Enforce strong passwords with high entropy<br> • Never expose credentials in requests<br> • Use secure JWTs and proper authorisation headers<br> • Implement MFA, account lockout, captcha to slow brute force attempts<br> • Store passwords with strong hashing not in plain text</p><blockquote><strong>Task 4.1 Can you find the token of hr@mht.com?</strong></blockquote><blockquote>cOC%Aonyis%H)mZ&amp;uJkuI?_W#4&amp;m&gt;Y</blockquote><blockquote><strong>Task 4.2 To which country does sales@mht.com belong?</strong></blockquote><blockquote>China</blockquote><blockquote><strong>Task 4.3 Is it a good practice to send a username and password in a GET request (yea/nay)?</strong></blockquote><blockquote>Nay</blockquote><h3>Task 5 | Vulnerability Ill — Excessive Data Exposure</h3><p><strong>How it happens</strong><br> • API returns more information than necessary<br> • Developers expose all object properties without checking sensitivity<br> • They rely on front end filtering rather than limiting data at the API level<br> • Attackers can intercept responses and extract hidden sensitive fields<br> • Security tools may flag this but cannot judge which data is legitimate to return</p><p><strong>Likely impact</strong><br> • Attackers can access confidential information like phone numbers account details and access tokens<br> • Sensitive tokens in responses can be reused to call other critical endpoints<br> • Data leakage can be large scale if responses consistently include unnecessary fields</p><p><strong>Example summary</strong><br> • A comments portal stores comment text and other internal metadata<br> • Developer creates an endpoint that returns all stored fields including sensitive ones<br> • Front end is expected to hide unnecessary data but the API itself exposes everything<br> • Fix is to create an endpoint that returns only the minimal required fields</p><p><strong>Mitigation</strong><br> • Never depend on front end filtering for sensitive data<br> • Regularly review API responses to ensure only necessary fields are included<br> • Avoid generic serialization methods that expose entire objects<br> • Test API endpoints with different cases to confirm no unintended data is leaked</p><blockquote><strong>Task 5.1 What is the device ID value for post-ID 2?</strong></blockquote><blockquote>iOS15.411</blockquote><blockquote><strong>Task 5.2 What is the username value for post-ID 3?</strong></blockquote><blockquote>hacker#!</blockquote><blockquote><strong>Task 5.3 Should we use network-level devices for controlling excessive data exposure instead of managing it through APIs (programmatically) — (yea/nay)?</strong></blockquote><blockquote>Nay</blockquote><h3>Task 6 | Vulnerability IV — Lack of Resources &amp; Rate Limiting</h3><p><strong>How it happens</strong><br> • API does not restrict how often a client can send requests<br> • No limits on payload size or file uploads<br> • Attackers can spam endpoints or upload massive files<br> • Leads to heavy resource usage across network storage and compute<br> • Can cause denial of service and make the application unavailable<br> • Lack of captcha on login or recovery forms allows automated abuse through scripts</p><p><strong>Likely impact</strong><br> • Direct attack on the availability principle of security<br> • Downtime damages brand reputation<br> • Financial loss due to excessive resource consumption or misuse of paid services</p><p><strong>Example summary</strong><br> • A company uses an email marketing plan with limited monthly emails<br> • Developer creates an OTP endpoint but adds no rate limiting<br> • Attacker can brute force the endpoint and trigger thousands of emails in seconds<br> • Fix is to enforce rate limiting so users must wait before requesting another OTP</p><p><strong>Mitigation</strong><br> • Use captcha to block automated scripts<br> • Implement rate limits for how frequently clients can call the API<br> • Set maximum allowed data size for all parameters and request payloads</p><blockquote><strong>Task 6.1 Can rate limiting be carried out at the network level through firewall etc. (yea/nay)?</strong></blockquote><blockquote>Yea</blockquote><blockquote><strong>Task 6.2 What is the HTTP response code when you send a POST request to /apirule4/sendOTP_s using the email address hr@mht.com?</strong></blockquote><blockquote>200</blockquote><blockquote><strong>Task 6.3 What is the “msg key” value after an HTTP POST request to /apirule4/sendOTP_s using the email address sale@mht.com?</strong></blockquote><blockquote>Invalid Email</blockquote><h3>Task 7 | Vulnerability V — Broken Function Level Authorisation</h3><p><strong>How it happens</strong><br> • A low privilege user bypasses checks and performs actions meant for high privilege roles<br> • Occurs when access control policies are complex or poorly separated between regular and admin functions<br> • Weak role validation lets intruders impersonate privileged users<br> • Similar to IDOR but focused on permissions for functions rather than objects<br> • APIs with many user roles and hierarchical permissions are more vulnerable</p><p><strong>Likely impact</strong><br> • Targets the authorisation and non repudiation principles of security<br> • Intruders may impersonate privileged users<br> • Attackers may gain admin rights and perform sensitive operations</p><p><strong>Example summary</strong><br> • Developer adds an endpoint to fetch all employee data and protects it with a custom isAdmin header<br> • A non admin user can simply set isAdmin to one and access everything<br> • Root cause is trusting client side indicators instead of checking roles in the backend<br> • Fix is to validate the actual user role from the database before allowing admin functions</p><p><strong>Mitigation</strong><br> • Design and test authorisation systems carefully and deny access by default<br> • Allow operations only for users who actually belong to the authorised group<br> • Review all API endpoints for functional authorisation flaws and ensure logic aligns with business role hierarchy</p><blockquote><strong>Task 7.1 What is the mobile number for the username Alice?</strong></blockquote><blockquote>+1235322323</blockquote><blockquote><strong>Task 7.2 Is it a good practice to send isAdmin value through the hidden fields in form requests — yea/nay?</strong></blockquote><blockquote>Nay</blockquote><blockquote><strong>Task 7.3 What is the address flag of username admin?</strong></blockquote><blockquote>THM{3432$@#2!}</blockquote><h3>Task 8 | Conclusion</h3><ul><li>This module covered core API security principles related to authentication, authorisation and data handling<br> • You learned how weak controls can lead to excessive data exposure, privilege misuse and account takeover<br> • Practical examples showed how simple implementation mistakes can create serious vulnerabilities<br> • Part two will cover the remaining five OWASP API security principles</li></ul><blockquote><strong>Task 8.1 I have completed the room (Part 1).</strong></blockquote><blockquote>No answer needed</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fbb077b916e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Authentication Bypass]]></title>
            <link>https://medium.com/@ygxshh/authentication-bypass-e67507e38148?source=rss-b8d7bb1bc65f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e67507e38148</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[basics]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Yogesh Mishra]]></dc:creator>
            <pubDate>Wed, 13 Aug 2025 08:55:08 GMT</pubDate>
            <atom:updated>2025-08-13T08:55:08.787Z</atom:updated>
            <content:encoded><![CDATA[<h3>Authentication Bypass — TryHackMe Walkthrough</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lTDgtFNRIOpRmqCcfeiClg.jpeg" /></figure><h3>Task 2 : Username Enumeration</h3><p>We want to find which usernames already exist on the Acme IT Support website.<br>Why? Because later, these usernames might help us find authentication vulnerabilities (ways to log in without proper permission).</p><p>How do we do it?<br>We notice that if we try to sign up with a username that’s already taken (like admin), the site gives a message:</p><p><em>“An account with this username already exists.”</em></p><p>This is a clue. It means we can test lots of usernames, and whenever we see this message, we know the username is valid and already in the system.</p><p>The tool we’ll use: ffuf</p><ul><li>ffuf is a program that can quickly try many possible usernames from a list.</li></ul><p>We give it:</p><ul><li>A wordlist (a file with many common usernames)</li></ul><p>The URL of the signup page</p><ul><li>The form data that needs to be sent (username=FUZZ&amp;email=x&amp;password=x&amp;cpassword=x)</li><li>FUZZ is a special placeholder — ffuf replaces it with each username from the list, one by one.</li><li>The error message text we’re looking for (username already exists).</li></ul><p>When ffuf runs, it tells us which usernames triggered that exact error message — meaning they already exist.</p><p>What to do next:</p><ul><li>Save those found usernames into a file named valid_usernames.txt.</li><li>We’ll use that file later for another task.</li></ul><blockquote>What is the username starting with si*** ?</blockquote><blockquote>simon</blockquote><blockquote>What is the username starting with st*** ?</blockquote><blockquote>steve</blockquote><blockquote>What is the username starting with ro**** ?</blockquote><blockquote>robert</blockquote><h3>Task 3 : Brute Force</h3><p>Now that we have a list of <strong>real usernames</strong> (valid_usernames.txt from the last task), we’re going to try to guess their passwords using a <strong>brute force attack</strong>.</p><p><strong>What is a brute force attack?</strong><br>It’s when a tool automatically tries many username–password combinations until it finds one that works.</p><p><strong>What we’re doing:</strong></p><ul><li>We’ll test <strong>every username</strong> from valid_usernames.txt</li><li>Against <strong>many common passwords</strong> from a password list (in this case, 10-million-password-list-top-100.txt)</li><li>We’ll use ffuf again to automate the process.</li></ul><p><strong>Breaking down the ffuf command:</strong></p><pre>ffuf -w valid_usernames.txt:W1,/usr/share/wordlists/SecLists/Passwords/Common-Credentials/10-million-password-list-top-100.txt:W2 \<br>-X POST \<br>-d &quot;username=W1&amp;password=W2&quot; \<br>-H &quot;Content-Type: application/x-www-form-urlencoded&quot; \<br>-u http://10.201.77.177/customers/login \<br>-fc 200</pre><ul><li><strong>-w valid_usernames.txt:W1, ... :W2</strong> → We’re using <strong>two</strong> wordlists:</li><li>W1 = usernames from our file</li><li>W2 = passwords from the common password list</li><li><strong>-X POST</strong> → We’re sending a POST request (because it’s a login form).</li><li><strong>-d &quot;username=W1&amp;password=W2&quot;</strong> → This is the login form data. ffuf replaces W1 and W2 with usernames and passwords from our lists.</li><li><strong>-H &quot;Content-Type: application/x-www-form-urlencoded&quot;</strong> → Tells the site we’re sending form data.</li><li><strong>-u http://10.201.77.177/customers/login</strong> → The login page URL.</li><li><strong>-fc 200</strong> → We’re filtering out (ignoring) results that have HTTP status code 200 (which means “OK” but likely means “login failed” here). If we get a different status code, that might mean a <strong>successful login</strong>.</li></ul><p><strong>Goal:</strong><br>Run this and ffuf will tell us the <strong>one correct username–password pair</strong> that works. That’s the answer to the task question.</p><blockquote>What is the valid username and password (format: username/password)?</blockquote><blockquote>steve/thunder</blockquote><h3>Task 4 : Logic Flaw</h3><p>A logic flaw happens when a website’s normal checks can be tricked so that you skip or bypass them. In this case, the password reset feature is built in a way that lets you send the reset link to yourself instead of the real account owner. Normally, you type the account’s email first, then the username, and the system sends a reset link to that account’s email. The problem is the site uses both the email in the URL (GET request) and the email from the form (POST request), but if both exist, it trusts the POST one more.</p><p>That means if you visit the reset page with Robert’s email in the URL, but in the form data you send your own email, the server will ignore Robert’s email and send the reset link to you. If you create your own account first, you can use your account’s special @customer.acmeitsupport.thm email in that POST field. When you do this, the reset link for Robert’s account shows up in your account’s support ticket, letting you log in as Robert and see his private information.</p><blockquote>What is the flag from Robert’s support ticket?</blockquote><blockquote>THM{AUTH_BYPASS_COMPLETE}</blockquote><h3>Task 5 : Cookie Tampering</h3><p>Cookies are little pieces of data a website saves in your browser while you use it. They can store things like whether you’re logged in, your user ID, or even your admin status. If a website isn’t careful with how it uses cookies, you can sometimes change them and get more access than you should.</p><p>In the first example, the website sends two cookies after you log in:</p><pre>logged_in=true<br>admin=false</pre><p>If you change logged_in to true, the site thinks you’re logged in. If you also change admin to true, the site will think you’re an admin and give you full access — even if you’re not supposed to have it. You can test this by sending requests with curl and adding your own Cookie: header to control the values.</p><p>Sometimes cookies don’t store obvious words like true or false but instead have a long, random-looking string. That string could be:</p><ul><li><strong>A hash</strong> (like MD5 or SHA-256) — this is one-way, but you can sometimes look it up in online databases like CrackStation if it’s from a common word.</li><li><strong>Encoded data</strong> (like Base64) — this is reversible. You can decode it to see what it really contains, change the values, then re-encode it.</li></ul><p>For example, if a cookie looks like this:</p><pre>session=eyJpZCI6MSwiYWRtaW4iOmZhbHNlfQ==</pre><p>That’s Base64. Decoding it shows:</p><pre>{&quot;id&quot;:1,&quot;admin&quot;: false}</pre><p>If you change false to true and re-encode it to Base64, the site may think you’re an admin and give you more privileges.</p><p>It’s basically about checking if the site trusts the cookie values too much — and if it does, you can edit them to get more access.</p><blockquote>What is the flag from changing the plain text cookie values?<br>THM{COOKIE_TAMPERING}</blockquote><blockquote>What is the value of the md5 hash 3b2a1053e3270077456a79192070aa78 ?<br>463729</blockquote><blockquote>What is the base64 decoded value of VEhNe0JBU0U2NF9FTkNPRElOR30= ?<br>THM{BASE64_ENCODING}</blockquote><blockquote>Encode the following value using base64 {“id”:1,”admin”:true}<br>eyJpZCI6MSwiYWRtaW4iOnRydWV9</blockquote><p>Reference: <a href="https://tryhackme.com/room/authenticationbypass">https://tryhackme.com/room/authenticationbypass</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e67507e38148" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CyberChef: The Basics | TryHackMe | Walkthrough | Notes and Tasks Answers]]></title>
            <link>https://medium.com/@ygxshh/cyberchef-the-basics-tryhackme-walkthrough-notes-and-tasks-answers-44c3214ca934?source=rss-b8d7bb1bc65f------2</link>
            <guid isPermaLink="false">https://medium.com/p/44c3214ca934</guid>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[Yogesh Mishra]]></dc:creator>
            <pubDate>Tue, 29 Jul 2025 17:20:05 GMT</pubDate>
            <atom:updated>2025-07-29T17:20:05.922Z</atom:updated>
            <content:encoded><![CDATA[<h3>🧪 Task 1: Introduction</h3><ul><li>CyberChef is a web-based tool used for:</li><li>Encoding</li><li>Decoding</li><li>Encrypting</li><li>Extracting and processing data</li><li>Uses <strong>“recipes”</strong> — sequences of operations applied step by step to transform data.</li></ul><h3>🔧 Task 2: Accessing the Tool</h3><ul><li>Can be used <strong>online</strong> in any modern browser.</li><li>Can also be <strong>downloaded for offline use</strong> on Windows or Linux.</li></ul><h3>🧭 Task 3: Navigating the Interface</h3><p>CyberChef interface has 4 key sections:</p><ol><li><strong>Operations</strong> — List of available functions (e.g., “From Base64”)</li><li><strong>Recipe</strong> — Where you build your sequence of operations (core area)</li><li><strong>Input</strong> — Where you paste or upload your data</li><li><strong>Output</strong> — Shows the processed result</li></ol><blockquote><em>In which area can you find “From Base64”?</em></blockquote><blockquote><em>Operations</em></blockquote><blockquote><em>Which area is considered the heart of the tool?</em></blockquote><blockquote><em>Recipe</em></blockquote><h3>🧠 Task 4: Before Anything Else (Your Thought Process)</h3><p>Follow this 4-step approach:</p><ol><li><strong>Define your goal</strong> — What are you trying to decode or find?</li><li><strong>Input the data</strong> — Paste or upload it into CyberChef</li><li><strong>Pick operations</strong> — Try ones like ROT13, Base64, Base85, URL Decode, etc.</li><li><strong>Check output</strong> — If it’s not what you want, change the recipe and try again.</li></ol><blockquote>At which step would you determine, “What do I want to accomplish?</blockquote><blockquote>1</blockquote><h3>🚀 Task 5: Practice, Practice, Practice</h3><p>Examples of common operations:</p><ul><li>Extracted hidden email → hidden@hotmail.com</li><li>Extracted IP ending in .232 → 102.20.11.232</li><li>Found domain starting with “T” → TryHackMe.com</li><li>Decimal 78 to Binary → 01001110</li><li>URL Encode https://tryhackme.com/r/careers → https%3A%2F%2Ftryhackme%2Ecom%2Fr%2Fcareers</li></ul><h3>🍳 Task 6: Your First Official Cook</h3><p>Applied CyberChef to a file and got:</p><ul><li>IP starting and ending with 10 → 10.10.2.10</li><li>Base64 of “Nice Room!” → TmljZSBSb29tIQ==</li><li>URL Decoded version of encoded link → <a href="https://tryhackme.com/r/room/cyberchefbasics">https://tryhackme.com/r/room/cyberchefbasics</a></li><li>Unix timestamp 1725151258 to readable time → Sun 1 September 2024 00:40:58 UTC</li><li>Base85 decoded string &lt;+oue+DGm&gt;Ap%u7 → This is fun!</li></ul><h3>🎯 Task 7: Conclusion</h3><ul><li>CyberChef is a flexible and easy-to-use tool for handling various data formats.</li><li>Perfect for small-scale data tasks like decoding, converting formats, or extracting information.</li><li>While powerful, it may not be ideal for larger or more complex automation tasks.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44c3214ca934" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe | Governance & Regulation | Walkthrough and answers.]]></title>
            <link>https://medium.com/@ygxshh/tryhackme-governance-regulation-walkthrough-and-answers-397e971ba731?source=rss-b8d7bb1bc65f------2</link>
            <guid isPermaLink="false">https://medium.com/p/397e971ba731</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[regulation]]></category>
            <category><![CDATA[governance]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Yogesh Mishra]]></dc:creator>
            <pubDate>Sat, 08 Feb 2025 11:15:28 GMT</pubDate>
            <atom:updated>2025-12-13T08:25:30.341Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Task 1 | Introduction</strong></h3><p>Cybersecurity is constantly changing because hackers try to find weaknesses in important systems to steal data or cause damage. To prevent this, strong rules and security measures are needed. Companies must create strict policies, monitor for threats, and follow regulations to protect their systems from attacks.</p><h3>Learning Goals:</h3><ul><li>Learn why rules and regulations are important in cybersecurity.</li><li>Understand global laws, policies, and security standards.</li><li>Know about Governance, Risk Management, and Compliance (GRC).</li><li>Improve cybersecurity skills using standards like ISO 27001 and NIST 800–53.</li></ul><blockquote><strong>1.1 — No Answers needed</strong></blockquote><h3>Task 2 | Why is it important?</h3><p><strong>Important Terms:</strong></p><ul><li><strong>Governance:</strong> Managing an organization to meet goals while following laws and rules.</li><li><strong>Regulation:</strong> Laws that must be followed to prevent harm.</li><li><strong>Compliance:</strong> Following the rules and laws that apply to a business.</li></ul><h3>Information Security Governance</h3><p>This is about protecting an organization’s information by setting up policies, strategies, and risk management processes. It helps prevent cyber threats, ensures data safety, and follows necessary laws.</p><h4>Key Processes:</h4><ol><li><strong>Strategy:</strong> Making a security plan that fits the company’s goals.</li><li><strong>Policies &amp; Procedures:</strong> Creating rules for handling and protecting data.</li><li><strong>Risk Management:</strong> Identifying and reducing security risks.</li><li><strong>Performance Measurement:</strong> Checking if security measures are working.</li><li><strong>Compliance:</strong> Following cybersecurity laws and industry standards.</li></ol><h3>Information Security Regulation</h3><p>Security regulations are legal rules that organizations must follow to protect data from hacking, theft, and misuse. Examples include:</p><ul><li><strong>GDPR:</strong> Protects the personal data of EU citizens.</li><li><strong>HIPAA:</strong> Protects health-related data in the U.S.</li><li><strong>PCI-DSS:</strong> Ensures the secure handling of credit card data.</li><li><strong>GLBA:</strong> Protects customer financial information in banks and financial institutions.</li></ul><h3>Benefits of Security Governance &amp; Regulation:</h3><ul><li><strong>Stronger Security:</strong> Reduces the risk of cyber attacks.</li><li><strong>Trust &amp; Confidence:</strong> Customers feel safe sharing their data.</li><li><strong>Legal Protection:</strong> Avoids fines and penalties for breaking laws.</li><li><strong>Better Business Alignment:</strong> Ensures security fits business goals.</li><li><strong>Smart Decisions:</strong> Helps leaders make informed security choices.</li><li><strong>Competitive Advantage:</strong> Builds a strong reputation for data protection.</li></ul><p>By following cybersecurity governance and regulations, businesses can protect their data, avoid legal trouble, and gain trust from customers and partners.</p><blockquote><strong>2.1 — Regulation</strong></blockquote><blockquote><strong>2.2 — Healthcare</strong></blockquote><h3><strong>Task 3 | Information Security Frameworks</strong></h3><p>An <strong>Information Security Framework</strong> is a set of documents that guide how an organization protects its data. It includes:</p><ul><li><strong>Policies:</strong> Rules that define security goals and guidelines.</li><li><strong>Standards:</strong> Specific requirements for security processes.</li><li><strong>Guidelines:</strong> Best practices (not mandatory) for improving security.</li><li><strong>Procedures:</strong> Step-by-step instructions for security tasks.</li><li><strong>Baselines:</strong> Minimum security requirements that must be met.</li></ul><h3>Steps to Create Security Documents:</h3><ol><li><strong>Identify Scope &amp; Purpose:</strong> Define what the document will cover (e.g., password policy for strong passwords).</li><li><strong>Research &amp; Review:</strong> Check laws, regulations, and best practices to ensure accuracy.</li><li><strong>Draft the Document:</strong> Write clear and actionable security rules.</li><li><strong>Review &amp; Approve:</strong> Get feedback from experts and senior management.</li><li><strong>Implement &amp; Communicate:</strong> Train employees and ensure they follow the rules.</li><li><strong>Review &amp; Update:</strong> Regularly update policies based on new threats and regulations.</li></ol><h3>Real-World Examples:</h3><ul><li><strong>Password Policy:</strong> Defines rules for creating and managing strong passwords.</li><li><strong>Incident Response Procedure:</strong> Details how to handle security breaches (e.g., malware attack, data theft).</li></ul><h3>Using Existing Security Frameworks:</h3><p>Companies don’t always create their own standards. Instead, they follow industry-specific frameworks:</p><ul><li><strong>Financial Sector:</strong> Uses <strong>PCI-DSS, GLBA</strong> for data security.</li><li><strong>Healthcare:</strong> Follows <strong>HIPAA</strong> for patient data protection.</li><li><strong>Other Industries:</strong> Use standards based on laws and available resources.</li></ul><p>By following these frameworks, organizations can protect sensitive data and meet legal security requirements.</p><blockquote><strong>3.1 — Review and update</strong></blockquote><blockquote><strong>3.2 — Procedure</strong></blockquote><h3><strong>Task 4 | Governance Risk and Compliance (GRC)</strong></h3><p><strong>Governance, Risk, and Compliance (GRC) Framework</strong> helps organizations manage security, reduce risks, and follow legal rules. It ensures the company operates safely and follows industry standards.</p><h3>Three Main Parts of GRC:</h3><ol><li><strong>Governance:</strong> Sets security rules (policies, standards) and tracks performance.</li><li><strong>Risk Management:</strong> Identifies and reduces risks like cyber threats.</li><li><strong>Compliance:</strong> Ensures the company follows laws and industry standards.</li></ol><h3>Steps to Build a GRC Program:</h3><ol><li><strong>Define Goals:</strong> Decide what the GRC program should achieve (e.g., reduce cyber risks by 50% in a year).</li><li><strong>Risk Assessment:</strong> Find security risks and fix weak points.</li><li><strong>Create Security Rules:</strong> Set policies (e.g., strong password rules, logging access).</li><li><strong>Establish Governance:</strong> Form a security team to review risks and make decisions.</li><li><strong>Implement Security Controls:</strong> Use tools like firewalls, training, and monitoring systems.</li><li><strong>Monitor &amp; Measure:</strong> Track performance and update policies as needed.</li><li><strong>Improve Continuously:</strong> Learn from security incidents and refine the system.</li></ol><h3>Example — GRC in Finance:</h3><ul><li><strong>Governance:</strong> Financial policies (e.g., anti-money laundering, fraud prevention).</li><li><strong>Risk Management:</strong> Prevent fraud, phishing, and cyber threats.</li><li><strong>Compliance:</strong> Follow laws like PCI DSS, use SSL/TLS for secure transactions.</li></ul><p>A GRC framework helps businesses stay secure, manage risks, and comply with laws effectively.</p><blockquote><strong>4.1 — Risk Management</strong></blockquote><blockquote><strong>4.2 — yea</strong></blockquote><h3>Task 5 — Privacy and Data Protection</h3><p>Privacy and data protection laws are essential in all sectors (finance, healthcare, government, etc.) to protect people’s personal information (PII). These laws ensure data is handled responsibly, build trust, and prevent misuse.</p><h3>Important Data Protection Regulations:</h3><ol><li><strong>GDPR (General Data Protection Regulation)</strong> — A strict EU law (since 2018) that protects personal data.</li></ol><ul><li>Companies must get permission before collecting personal data.</li><li>Only necessary data should be collected.</li><li>Strong security measures must protect stored data.</li><li>Companies violating the rules face heavy fines (up to 4% of revenue or €20 million).</li></ul><p><strong>2. PCI DSS (Payment Card Industry Data Security Standard)</strong> — Ensures secure card transactions and prevents fraud.</p><ul><li>Used by businesses handling online card payments.</li><li>Requires strict security measures (firewalls, encryption, monitoring unauthorized access).</li></ul><p>These regulations help protect personal data and ensure businesses follow strict security practices.</p><blockquote><strong>5.1 — 4</strong></blockquote><blockquote><strong>5.2 — cardholder data</strong></blockquote><h3><strong>Task 6 — NIST Special Publications</strong></h3><h4>NIST 800–53</h4><p>NIST 800–53 is a security framework by the U.S. National Institute of Standards and Technology (NIST). It provides a set of rules to protect information systems from threats like cyberattacks, errors, and natural disasters. It includes <strong>20 categories (families) of security controls</strong>, helping organizations improve their security and follow regulations.</p><p><strong>Key Points:</strong></p><ul><li>Helps secure data and systems while ensuring compliance with laws.</li><li>Covers security risks like hacking, system failures, and privacy issues.</li><li>“Program Management” is a crucial part, requiring organizations to plan, implement, and monitor security programs.</li><li>Businesses must regularly check their security measures, track threats, and improve controls over time.</li></ul><h4>NIST 800–63B</h4><p>NIST 800–63B is a guide that helps organizations verify users’ identities for secure digital access. It provides rules for authentication methods like passwords, biometrics (fingerprints, face scans), and security tokens.</p><p><strong>Key Points:</strong></p><ul><li>Ensures secure login and identity verification.</li><li>Defines different levels of security based on risk.</li><li>Guides organizations on how to store and manage login credentials safely.</li></ul><p>Both frameworks help protect information and maintain cybersecurity best practices.</p><blockquote><strong>6.1 — Physical</strong></blockquote><blockquote><strong>6.2 — Administrative</strong></blockquote><blockquote><strong>6.3 — Map</strong></blockquote><h3>Task 7 — Information Security Management and Compliance</h3><p>Information Security (IS) management protects data from unauthorized access, use, or damage through planning, implementation, and monitoring of security measures. It includes risk assessment, security procedures, incident response, and awareness training. Compliance ensures organizations follow legal, industry, and regulatory security standards.</p><h3>ISO/IEC 27001</h3><p>ISO 27001 is a global standard for setting up and managing an Information Security Management System (ISMS). It includes:</p><ul><li>Defining scope and security policies</li><li>Identifying and managing risks</li><li>Implementing security controls</li><li>Conducting audits and regular reviews</li></ul><p><strong>Benefits:</strong> Helps organizations improve security, comply with regulations, and manage risks effectively.</p><h3>SOC 2 (Service Organisation Control 2)</h3><p>SOC 2 is a security and compliance framework developed by AICPA to assess data protection based on confidentiality, availability, integrity, and privacy. It helps businesses prove their security measures to customers and stakeholders.</p><p><strong>SOC 2 Audit Process:</strong></p><ul><li>Define scope and select an auditor</li><li>Review security policies and controls</li><li>Conduct audit and receive a report with findings and improvements</li></ul><p>SOC 2 ensures secure handling of sensitive data, especially for service providers dealing with customer information.</p><blockquote><strong>7.1 — Risk treatment</strong></blockquote><blockquote><strong>7.2 — Availability</strong></blockquote><h3>Task 8 — Conclusion</h3><p>This session covered the importance of an effective information security governance and regulation framework to protect an organization’s assets. It discussed key laws like GDPR and PCI DSS, the Governance, Risk Management, and Compliance (GRC) framework, and real-world implementation strategies.</p><p>It also introduced governance enablers like ISO/IEC 27001 and NIST standards, emphasizing the need for continuous security improvements due to evolving threats. While 100% security is impossible, proactive measures help mitigate risks.</p><p>Stay tuned for more sessions on security governance and policies!</p><blockquote><strong>8.1 — THM{SECURE_1001}</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=397e971ba731" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>