<?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 Xnirkun on Medium]]></title>
        <description><![CDATA[Stories by Xnirkun on Medium]]></description>
        <link>https://medium.com/@xnirkun?source=rss-da648e66ea17------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ClrYL1hlKSnbgS-r</url>
            <title>Stories by Xnirkun on Medium</title>
            <link>https://medium.com/@xnirkun?source=rss-da648e66ea17------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 07:33:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@xnirkun/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[Walkthrough: Host & Network Penetration Testing: System/Host Based Attacks CTF 1]]></title>
            <link>https://medium.com/@xnirkun/walkthrough-host-network-penetration-testing-system-host-based-attacks-ctf-1-3e2396c857fb?source=rss-da648e66ea17------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e2396c857fb</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Xnirkun]]></dc:creator>
            <pubDate>Fri, 26 Sep 2025 16:30:43 GMT</pubDate>
            <atom:updated>2025-09-26T16:30:43.331Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Welcome to this detailed walkthrough of the “Host &amp; Network Penetration Testing: System/Host Based Attacks CTF 1.” This Capture The Flag (CTF) challenge focuses on simulating real-world penetration testing scenarios, emphasizing system and host-based attacks. Participants are tasked with identifying vulnerabilities in two target machines (target1.ine.local and target2.ine.local) within a controlled network environment. The goals include footprinting, scanning for open ports and services, brute-forcing credentials, exploiting web services like WebDAV, uploading webshells, and gaining remote access via SMB and RDP protocols to capture four flags.</p><p>This CTF is designed to test skills in reconnaissance, enumeration, exploitation, and post-exploitation phases of penetration testing. We’ll use tools like Nmap for scanning, Hydra for brute-forcing, Dirb for directory enumeration, Davtest and Cadaver for WebDAV interactions, and Metasploit for exploitation. The environment assumes a Kali Linux attacker machine at IP 10.10.38.3, with targets at 10.0.26.252 (target1) and 10.0.29.18 (target2).</p><p>Throughout this writeup, I’ll provide step-by-step instructions, explanations of why each step works, and descriptions of the vulnerabilities exploited. Flags are captured at key points, and I’ve fixed the capture details based on the notes — particularly clarifying that Flag 1 is found via WebDAV enumeration after gaining credentials, Flag 2 via webshell execution on the C: drive, Flag 3 in the root directory via a Meterpreter shell, and Flag 4 on the Administrator’s Desktop. For visual aids, I’ll indicate placeholders where images (e.g., screenshots of tool outputs) should be inserted in a Medium-style article for better readability.</p><p>Let’s dive in!</p><h3>Initial Reconnaissance: Scanning the Targets with Nmap</h3><p>Before launching any attacks, we start with footprinting and scanning to identify open ports, services, and operating systems on the targets. This helps map out potential entry points like web servers, RPC services, and remote desktop protocols.</p><h3>Scanning Target 1 (10.0.26.252)</h3><ol><li><strong>Run Nmap Scan</strong>: Execute a comprehensive scan using script scanning (-sC), version detection (-sV), OS detection (-O), all ports (-p-), and aggressive timing (-T4).</li></ol><ul><li>Command: nmap -sC -sV -O -p- -T4 target1.ine.local</li><li><strong>Explanation</strong>: This command performs a thorough enumeration. -sC runs default scripts for common vulnerabilities, -sV probes service versions, -O detects the OS, -p- scans all 65,535 ports, and -T4 speeds up the scan without being too noisy</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wk4-15iO2dyzQWh8q95M3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*htkT1oAQDyQ9aF81AkTGwA.png" /></figure><h3>Scanning Target 2 (10.0.29.18)</h3><ol><li><strong>Run Nmap Scan</strong>: Similar to Target 1, scan for ports, versions, scripts, and OS.</li></ol><ul><li>Command: nmap -sC -sV -O -p- -T4 target2.ine.local</li><li><strong>Explanation</strong>: This mirrors the previous scan to ensure consistency in reconnaissance. Target 2 shows similarities but with slight differences, indicating a Windows Server 2019 setup.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3_IyM_16JE3fRFQAldBB3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TuXjXGsMrJmmaHyWIufQAA.png" /></figure><p><strong>Key IPs for Reference</strong>:</p><ul><li>Attacker Machine: 10.10.38.3</li><li>Target 1: 10.0.26.252</li><li>Target 2: 10.0.29.18</li></ul><p>These scans highlight web services on Target 1 and SMB/RDP on both, guiding our attack paths.</p><h3>Exploiting Target 1: Web Authentication and WebDAV</h3><p>Target 1 runs IIS on port 80, suggesting a web application vulnerable to credential brute-forcing and WebDAV for file uploads/executions.</p><h3>Brute-Forcing Credentials with Hydra</h3><ol><li><strong>Target User ‘bob’</strong>: Focus on user ‘bob’ (hinted in Flag 1 description) using a common password list.</li></ol><ul><li><strong>Explanation</strong>: Hydra performs brute-force attacks. Here, -l specifies the username, -P the password list, and http-get targets HTTP GET requests for basic auth. The hint suggests ‘bob’ uses a weak password.</li></ul><pre>hydra -l bob -P /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt 10.0.26.252 http-get /</pre><p>2. <strong>Results</strong>: Valid credentials found — bob:password_123321.</p><ul><li><strong>Explanation</strong>: Weak passwords like this are common in CTFs and real misconfigurations, allowing unauthorized access.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D-3NXjKhxhkbmDdfcnPrSA.png" /></figure><h3>Directory Enumeration with Dirb</h3><ol><li><strong>Scan for Directories</strong>: Use Dirb with the obtained credentials for authenticated enumeration.</li></ol><ul><li>Command: dirb <a href="http://target1.ine.local/">http://target1.ine.local</a> -u bob:password_123321</li><li><strong>Explanation</strong>: Dirb brute-forces directories and files. Authentication (-u) ensures we access protected areas.</li></ul><pre>Using dirb http://target1.ine.local -u bob:password_123321 for directory listing with authentication</pre><p>2. <strong>Discovery</strong>: Identified /webdav directory.</p><ul><li><strong>Explanation</strong>: WebDAV (Web Distributed Authoring and Versioning) allows file management over HTTP, often misconfigured for uploads.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KtaXGcJYVEryLDyaOi7eUA.png" /></figure><h3>Testing WebDAV with Davtest</h3><ol><li><strong>Check Upload/Execution</strong>: Test file types that can be uploaded and executed.</li></ol><ul><li><strong>Explanation</strong>: Davtest automates WebDAV vulnerability checks by uploading test files and verifying execution.</li></ul><pre>davtest -url http://10.0.26.252/webdav -auth bob:password_123321</pre><p>2. <strong>Results</strong>: SHTML, HTML, ASP, and ASPX files succeed for execution.</p><ul><li><strong>Explanation</strong>: This confirms we can upload executable webshells (e.g., ASP-based) to gain command execution.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dvuNqCV3lpH1BEbNlfmRfg.png" /></figure><h3>Uploading a Webshell with Cadaver</h3><ol><li><strong>Connect to WebDAV</strong>: Use Cadaver for interactive file management.</li></ol><ul><li>Command: cadaver <a href="http://target1.ine.local/webdav">http://target1.ine.local/webdav</a></li><li><strong>Explanation</strong>: Cadaver is a command-line WebDAV client, authenticating with bob:password_123321.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ISN5LWAH93aroTLEnIEvag.png" /></figure><p>2. <strong>Upload Webshell</strong>: Upload a pre-built ASP webshell.</p><ul><li>Path: /usr/share/webshells/asp/webshell.asp</li><li>In Cadaver: Use put command to upload to /webdav.</li><li><strong>Explanation</strong>: Webshells provide remote code execution via web interfaces. ASP is chosen based on Davtest results.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nEBfATKmlFKjZMdGBYquBw.png" /></figure><p><strong>3. Access the Webshell</strong>: Browse to <a href="http://10.0.26.252/webdav/webshell.asp">http://10.0.26.252/webdav/webshell.asp</a>.</p><ul><li><strong>Explanation</strong>: Once uploaded, the webshell runs on port 80, allowing command injection.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nEBfATKmlFKjZMdGBYquBw.png" /></figure><h3>Capturing Flags on Target 1</h3><ol><li><strong>Capture Flag 1</strong>: After credential access, use Cadaver to list files in WebDAV root or browse <a href="http://target1.ine.local/">http://target1.ine.local</a> with credentials. Execute cat flag1.txt in Cadaver or view in browser.</li></ol><ul><li><strong>Hint Reference</strong>: “User ‘bob’ might not have chosen a strong password. Try common passwords to gain access to the server where the flag is located.”</li><li><strong>Explanation</strong>: Flag 1 is in the WebDAV directory, accessible post-authentication.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fVOzuAhe0fcU8C5JWuqG8w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7wL3QKb90CUiWALwuXByDg.png" /></figure><p><strong>2. Capture Flag 2</strong>: Found in C:\ (Note: The notes prefixed the IP, but the flag is the hash).</p><ul><li><strong>Explanation</strong>: Thorough exploration of the C: drive reveals hidden files like flags.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P3prhTJEl1coSkBEdUt26A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x4WR-m4D_xQps1IHEuJbhw.png" /></figure><h3>Exploiting Target 2: SMB Brute-Forcing and Remote Access</h3><p>Target 2 emphasizes SMB (port 445) for credential guessing and exploitation via Metasploit or RDP.</p><h3>Brute-Forcing SMB Credentials with Hydra</h3><ol><li><strong>Multi-User Brute-Force</strong>: Use common user and password lists.</li></ol><ul><li><strong>Explanation</strong>: Targets SMB on port 445 (-s). -L/-P for lists.</li></ul><pre>hydra -L /usr/share/metasploit-framework/data/wordlists/common_users.txt -P /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt smb://target2.ine.local -s 445</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tbA86GrPeCXAN0aiCg2IWQ.png" /></figure><p>2. <strong>Results</strong>: Valid users/credentials:</p><ul><li>Rooty:spongebob</li><li>Demo:password1</li><li>Auditor:hellokitty</li><li>Administrator:pineapple</li><li><strong>Explanation</strong>: Weak credentials enable admin access.</li></ul><h3>Gaining Shell with Metasploit (PSEXEC)</h3><ol><li><strong>Start Services and MSF</strong>: service postgresql start &amp;&amp; msfconsole</li></ol><ul><li><strong>Explanation</strong>: PostgreSQL is needed for Metasploit database; msfconsole launches the framework.</li></ul><p><strong>2. Configure PSEXEC Exploit</strong>:</p><ul><li>Search: search psexec</li><li>Use: use exploit/windows/smb/psexec</li><li>Set: set RHOSTS target2.ine.local</li><li>Set: set SMBUser administrator</li><li>Set: set SMBPass pineapple</li><li><strong>Explanation</strong>: PSEXEC exploits SMB to execute payloads with admin creds.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fUhFH8D0XCfizNtxdLz2oA.png" /></figure><p><strong>3. Exploit and Get Shell</strong>: exploit</p><ul><li><strong>Explanation</strong>: Drops a Meterpreter shell for interactive access</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wSfiFZTxwdzl2fZj0TfOTQ.png" /></figure><h3>Capturing Flags on Target 2</h3><ol><li><strong>Enumerate Root Directory</strong>: In shell, cd \ then dir.</li></ol><ul><li><strong>Explanation</strong>: Checks for files in the system root.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*-ik35ij-agta0R1J7nTlNw.png" /></figure><p><strong>2. Capture Flag 3</strong>: type flag3.txt</p><ul><li><strong>Hint Reference</strong>: “By attempting to guess SMB user credentials, you may uncover important information that could lead you to the next flag.”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*AvtmxhjqhIxWoS2rwJgS4w.png" /></figure><p><strong>3. Navigate to Desktop</strong>: cd Users, cd Administrator, cd Desktop, dir.</p><ul><li><strong>Explanation</strong>: Admin desktops often hold sensitive files.</li></ul><p><strong>4. Capture Flag 4</strong>: type flag4.txt</p><ul><li><strong>Hint Reference</strong>: “The Desktop directory might have what you’re looking for. Enumerate its contents.”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*w-TxZ06j6isyouqBos46sQ.png" /></figure><h3>Alternative: RDP Access with xFreeRDP</h3><ol><li><strong>Connect via RDP</strong>: xfreerdp /u:administrator /p:pineapple /v:target2.ine.local:3389</li></ol><ul><li><strong>Explanation</strong>: Uses admin creds for graphical access; useful for manual enumeration.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*twOW7lqi8UATiAInDRn-dQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z074YLhMDmZzVtvLLIrdDA.png" /></figure><h3>Conclusion</h3><p>This CTF demonstrates classic host-based attacks: from scanning to exploitation via weak creds and misconfigurations. Key takeaways include the importance of strong passwords, securing WebDAV/SMB, and patching Windows services.</p><p>If you’re tackling similar challenges, practice safely in labs. Thanks for reading — clap if this helped! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e2396c857fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Conquering Assessment Methodologies: Vulnerability Assessment CTF 1; A Step-by-Step Guide]]></title>
            <link>https://medium.com/@xnirkun/conquering-assessment-methodologies-vulnerability-assessment-ctf-1-a-step-by-step-guide-f57381d01218?source=rss-da648e66ea17------2</link>
            <guid isPermaLink="false">https://medium.com/p/f57381d01218</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Xnirkun]]></dc:creator>
            <pubDate>Mon, 22 Sep 2025 03:36:38 GMT</pubDate>
            <atom:updated>2025-09-22T03:36:38.123Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Vulnerability assessment is a critical skill in cybersecurity, enabling professionals to identify weaknesses in systems before malicious actors can exploit them. The <em>Assessment Methodologies: Vulnerability Assessment CTF 1</em> from INE provides a hands-on opportunity to practice footprinting and scanning techniques using tools like Nmap and Nessus. This Capture The Flag (CTF) challenge simulates real-world reconnaissance on a target system, guiding participants through the process of gathering intelligence, identifying open services, and uncovering hidden flags. In this Medium-style writeup, I’ll provide a detailed walkthrough of the challenge based on my notes, including step-by-step instructions, explanations, and placeholders for images to illustrate key steps. Whether you’re preparing for certifications like OSCP or honing your pentesting skills, this guide will help you navigate the challenge with confidence.</p><h3>Setup and Initial Reconnaissance</h3><h3>Environment Details</h3><ul><li><strong>Machine IP</strong>: 192.156.174.2 (Your local machine used to perform scans)</li><li><strong>Target IP</strong>: 192.156.174.3 (Hostname: target.ine.local)</li></ul><p>The challenge begins with footprinting, gathering as much information as possible about the target system, followed by scanning to identify open ports, services, and potential vulnerabilities.</p><h3>Nmap Scan: Footprinting the Target</h3><h3>Step 1: Running the Nmap Scan</h3><p>To gather detailed information about the target, we start with an Nmap scan using the following command:</p><pre>nmap -sC -sV -O -p- -T4 192.156.174.3</pre><ul><li><strong>Explanation</strong>:</li><li>-sC: Runs default scripts to gather additional information (e.g., HTTP enumeration, MySQL info).</li><li>-sV: Probes open ports to determine service versions.</li><li>-O: Enables OS detection.</li><li>-p-: Scans all 65,535 TCP ports.</li><li>-T4: Sets a faster scanning speed (aggressive timing).</li></ul><p>This command provides a comprehensive view of open ports, services, and the operating system running on the target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IQuklW6D0AtwcjBonalA8Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HMC9UBTsoVOJjVDDwW6Jgg.png" /></figure><h3>Scan Results</h3><p>The Nmap scan reveals two open ports:</p><h4>Port 80 (HTTP Apache httpd 2.4.7 on Ubuntu)</h4><ul><li><strong>Details</strong>:</li><li><strong>Service</strong>: Apache httpd 2.4.7 (Ubuntu)</li><li><strong>http-cookie-flags</strong>: The PHPSESSID cookie lacks the httponly flag, indicating a potential session security issue.</li><li><strong>http-robots.txt</strong>: Lists disallowed directories: passwords/, config.inc, classes/, javascript/, owasp-esapi-php/, documentation/, phpmyadmin/, includes/.</li><li><strong>http-git</strong>: A Git repository is exposed at 192.156.174.3:80/.git/, with a remote at <a href="https://github.com/fermayo/hello-world-lamp.git.">https://github.com/fermayo/hello-world-lamp.git.</a></li><li><strong>http-title</strong>: The site lacks a proper title (text/html).</li><li><strong>Explanation</strong>: The presence of a .git directory and robots.txt entries suggests misconfigurations that could expose sensitive data. The disallowed directories in robots.txt are prime targets for further exploration.</li></ul><h4>Port 3306 (MySQL 5.5.47–0ubuntu0.14.04.1)</h4><ul><li><strong>Details</strong>:</li><li><strong>Service</strong>: MySQL 5.5.47–0ubuntu0.14.04.1</li><li><strong>Protocol</strong>: 10</li><li><strong>Capabilities</strong>: Supports multiple features like transactions, compression, and authentication plugins.</li><li><strong>Status</strong>: Autocommit enabled.</li><li><strong>Auth Plugin</strong>: mysql_native_password.</li><li><strong>Explanation</strong>: An open MySQL port suggests a database that may contain sensitive information. The version (5.5.47) is outdated and potentially vulnerable to known exploits.</li></ul><h3>Nessus Scan: Identifying Vulnerabilities</h3><h3>Step 2: Running the Nessus Scan</h3><p>Nessus is a powerful vulnerability scanner that complements Nmap by identifying known vulnerabilities and misconfigurations.</p><ul><li><strong>Credentials</strong>: admin:adminpasswd</li><li><strong>Nessus URL</strong>: <a href="https://localhost:8834/">https://localhost:8834</a></li></ul><h4>Steps to Perform the Nessus Scan:</h4><ol><li>Log in to Nessus at <a href="https://localhost:8834/">https://localhost:8834</a> using the credentials admin:adminpasswd.</li><li>Create a new scan targeting 192.156.174.3.</li><li>Configure the scan to include all ports and enable plugin checks for web and database vulnerabilities.</li><li>Run the scan and review the results.</li></ol><ul><li><strong>Results</strong>:</li><li>2 Medium-severity vulnerabilities.</li><li>23 Informational findings.</li></ul><p><strong>Explanation</strong>: The medium-severity vulnerabilities likely point to misconfigurations or outdated software (e.g., Apache 2.4.7 or MySQL 5.5.47). Informational findings may include details about exposed directories or services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OE-aXpbSFzkDX3XC9jpm2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H4vEmCdO6LIPT_TeHaYFqg.png" /></figure><h3>Capturing the Flags</h3><h3>Flag 1: Exploring Hidden Directories for Version Control Artifacts</h3><p><strong>Hint</strong>: <em>Explore hidden directories for version control artifacts that might reveal valuable information.</em></p><h4>Steps:</h4><ol><li>The Nmap scan revealed an exposed .git directory at <a href="http://192.156.174.3/.git/">http://192.156.174.3/.git/.</a></li><li>Navigate to <a href="http://192.156.174.3/.git/">http://192.156.174.3/.git/</a> in a browser to explore the Git repository.</li><li>Look for files like flag.txt or other artifacts within the repository.</li><li>Download and open the flag file to retrieve <strong>Flag 1</strong>.</li></ol><p><strong>Explanation</strong>: Exposed .git directories often contain sensitive information, such as source code or configuration files. In this case, the repository directly contains the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*kBmH4oetOX1QT9cb8BKvqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*mHeZngAuN8Osv-Q2Qe23Ug.png" /></figure><h3>Flag 2: Exploiting Loose Security in Data Storage</h3><p><strong>Hint</strong>: <em>The data storage has some loose security measures. Can you find the flag hidden within it?</em></p><h4>Steps:</h4><ol><li>The robots.txt file lists /phpmyadmin/ as a disallowed directory, indicating a potential entry point.</li><li>Access <a href="http://192.156.174.3/phpmyadmin/">http://192.156.174.3/phpmyadmin/</a> in a browser.</li><li>Log in to phpMyAdmin (try default or weak credentials, as the MySQL port 3306 is open).</li><li>Explore the MySQL databases and identify a table named secret_info.</li><li>Query the secret_info table to retrieve <strong>Flag 2</strong>.</li></ol><p><strong>Explanation</strong>: phpMyAdmin is a web interface for managing MySQL databases. An exposed instance with weak credentials or misconfigurations can allow unauthorized access to sensitive data, such as the flag stored in the secret_info table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bkb0y4WQmiiDilEzwV4vUg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ISkjSwqTsFBZ2dojFzmtog.png" /></figure><h3>Flag 3: Examining a PHP File for Hidden Information</h3><p><strong>Hint</strong>: <em>A PHP file that displays server information might be worth examining. What could be hidden in plain sight?</em></p><h4>Steps:</h4><ol><li>Run an additional Nmap scan with HTTP enumeration scripts:</li></ol><pre>nmap -sV -p 80,443 --script=http-enum,http-php-version 192.156.174.3</pre><p>2. The scan may reveal a phpinfo.php file, commonly used to display PHP configuration details.</p><p>3. Access <a href="http://192.156.174.3/phpinfo.php">http://192.156.174.3/phpinfo.php</a> in a browser.</p><p>4. Inspect the page source or content for <strong>Flag 3</strong>.</p><p><strong>Explanation</strong>: The phpinfo.php file often exposes sensitive server information, including PHP version, environment variables, or even embedded flags in CTF scenarios. The additional Nmap scripts help identify such files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*jdRaQFakuI8WC1WRu0jG9g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wDbxjtSK61Y72CefQHhP-A.png" /></figure><h3>Flag 4: Searching Sensitive Directories</h3><p><strong>Hint</strong>: <em>Sensitive directories might hold critical information. Search through carefully for hidden gems.</em></p><h4>Steps:</h4><ol><li>The robots.txt file lists /passwords/ as a disallowed directory.</li><li>Navigate to <a href="http://192.156.174.3/passwords/">http://192.156.174.3/passwords/</a> in a browser.</li><li>Explore the directory and identify files like accounts.txt and flag.txt.</li><li>Open flag.txt to retrieve <strong>Flag 4</strong>.</li></ol><p><strong>Explanation</strong>: Disallowed directories in robots.txt often contain sensitive information that administrators intend to hide from search engines but fail to secure properly. The /passwords/ directory is a classic example of a misconfiguration exposing critical files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*mernOw7YepX0p5l6q9jn2A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*HPb9_y7a73R6D8kyJKZ1Wg.png" /></figure><h3>Conclusion</h3><p>The <em>Assessment Methodologies: Vulnerability Assessment CTF 1</em> is an excellent exercise in reconnaissance and vulnerability scanning. By leveraging Nmap to map out open ports and services, Nessus to identify vulnerabilities, and manual exploration of web directories and databases, we successfully captured all four flags. Key takeaways include the importance of checking for exposed .git directories, reviewing robots.txt for hidden paths, and investigating common files like phpinfo.php for sensitive information. This challenge reinforces the value of thorough footprinting and scanning in real-world penetration testing scenarios.</p><p>Happy hacking, and keep exploring those hidden directories!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f57381d01218" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Assessment Methodologies: Enumeration CTF 1]]></title>
            <link>https://medium.com/@xnirkun/assessment-methodologies-enumeration-ctf-1-7fb372c84055?source=rss-da648e66ea17------2</link>
            <guid isPermaLink="false">https://medium.com/p/7fb372c84055</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Xnirkun]]></dc:creator>
            <pubDate>Fri, 19 Sep 2025 16:42:00 GMT</pubDate>
            <atom:updated>2025-09-19T16:42:00.345Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Welcome to this detailed writeup on the “Assessment Methodologies: Enumeration CTF 1,” a hands-on challenge focused on network enumeration techniques. This CTF simulates real-world penetration testing scenarios where the goal is to discover services, vulnerabilities, and hidden flags on a target machine through systematic scanning and enumeration. It’s inspired by platforms like INE (target.ine.local hints at that), emphasizing tools like Nmap, Metasploit, and protocol-specific enumeration for SMB, FTP, and SSH.</p><p>In this guide, I’ll walk you through the process step by step, starting with initial network discovery and moving into targeted service enumeration. We’ll cover commands, explanations, and outputs, culminating in capturing all four flags. This writeup is structured for clarity, with code snippets, bullet-pointed steps, and placeholders for images (e.g., screenshots of terminal outputs or tool interfaces) to make it visually engaging, perfect for sharing on Medium. If you’re following along, ensure you have a Kali Linux setup or similar, with tools like Nmap and Metasploit installed.</p><p>Key machines involved:</p><ul><li>Attacker machine IP: 192.35.174.2</li><li>Target machine IP: 192.35.174.3 (target.ine.local)</li></ul><p>Let’s dive in!</p><h3>Network Scanning with Nmap</h3><p>Network scanning is the foundation of enumeration, helping identify live hosts, open ports, services, and OS details. We use Nmap, a powerful open-source tool for this purpose.</p><h3>Step-by-Step Instructions:</h3><ol><li><strong>Check your local network interface</strong>: Start by verifying your own IP configuration to ensure you’re on the right subnet.</li></ol><ul><li>Command: ifconfig</li><li><strong>Explanation</strong>: This displays network interfaces, IPs, and other details. We’re looking for the interface connected to the 192.35.174.0/24 network.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*KYO-o-nOsSsm1sd33cvb5w.png" /></figure><p>2. <strong>Scan the subnet for live hosts</strong>: Perform a SYN scan to discover devices on the network without completing the TCP handshake (stealthy).</p><ul><li>Command: nmap -sS 192.35.174.0/24</li><li><strong>Explanation</strong>: -sS enables SYN scanning, which is fast and less likely to be logged. The CIDR notation /24 scans the entire subnet.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*RnqujSpmbPHU1THrMEYEuQ.png" /></figure><p><strong>3.</strong> <strong>Detailed scan on the target</strong>: Run a comprehensive scan for services, versions, OS detection, and scripts.</p><ul><li>Command: nmap -sC -sV -O -p- -T4 192.35.174.3</li><li><strong>Explanation</strong>:</li><li>-sC: Runs default Nmap scripts for common vulnerabilities and info.</li><li>-sV: Probes for service versions.</li><li>-O: Enables OS detection.</li><li>-p-: Scans all 65,535 ports.</li><li>-T4: Sets aggressive timing for faster results.</li><li><strong>Output Highlights</strong>:</li><li>Port 22 (SSH): OpenSSH 8.2p1 Ubuntu 4ubuntu0.11 (Ubuntu Linux; protocol 2.0)</li><li>Port 139 (SMB): netbios-ssn Samba smbd 4.6.2</li><li>Port 445 (SMB): netbios-ssn Samba smbd 4.6.2</li><li>Port 5554 (FTP): vsftpd 2.0.8 or later</li><li>OS details: Linux 4.15–5.8</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*FdPsXIRMc3EAQf3rLApULw.png" /></figure><p>This scan reveals key services: SSH on 22, SMB on 139/445, and FTP on a non-standard port (5554). We’ll enumerate each next.</p><h3>SMB Enumeration</h3><p>SMB (Server Message Block) is used for file sharing. We enumerate shares, users, and attempt logins using tools like enum4linux and Metasploit.</p><h3>Step-by-Step Instructions:</h3><ol><li><strong>Run enum4linux for comprehensive SMB info</strong>:</li></ol><ul><li>Command: enum4linux -a 192.35.174.3</li><li><strong>Explanation</strong>: -a performs all simple enumerations (users, shares, etc.). It’s a Perl script that wraps smbclient and other tools.</li><li><strong>Output Highlights</strong>: Known usernames: josh, nancy, and bob.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*uiyBUcCEdUszUbplszhpNg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*LWMMuqLUcDe2rvhvEiEwmw.png" /></figure><p>2. <strong>Start PostgreSQL service (for Metasploit database)</strong>:</p><ul><li>Command: service postgresql start</li><li><strong>Explanation</strong>: Metasploit uses PostgreSQL for storing workspace data.</li></ul><p>3. <strong>Launch Metasploit and set up workspace</strong>:</p><ul><li>Command: msfconsole</li><li>Then: workspace -a ctf_enum (creates a new workspace for organization).</li><li>Set: set rhosts 192.35.174.3 (or set rhost 192.35.174.3 for single target).</li><li><strong>Explanation</strong>: Workspaces keep scans isolated; rhosts specifies the target.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*uRWL3K1OUxOs6g2PNMa7Eg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*iGXSSxztRRwC_coMPxPT8w.png" /></figure><p><strong>4. Scan SMB version</strong>:</p><ul><li>Command: search type:auxiliary name:smb then use auxiliary/scanner/smb/smb_version</li><li>Run: run</li><li><strong>Explanation</strong>: This module detects SMB versions and dialects.</li><li><strong>Output</strong>: SMB Detected (versions:2, 3) (preferred dialect:SMB 3.1.1) (compression capabilities:) (encryption capabilities:AES-128-GCM) (signatures:optional) (guid:{67726174–7465–0000–0000–000000000000}) (authentication domain:TARGET)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ixsh_PVqZC59mp99H5JkNg.png" /></figure><p>5. <strong>Enumerate SMB shares</strong>:</p><ul><li>Use: auxiliary/scanner/smb/smb_enumshares</li><li>Set: set ShowFiles true</li><li>Run: run</li><li><strong>Explanation</strong>: Lists shares and optionally files; ShowFiles reveals contents if accessible.</li><li><strong>Output</strong>:</li><li>[+] 192.35.174.3:445 print$ (DISK) Printer Drivers</li><li>[+] 192.35.174.3:445 IPC$ (IPC|SPECIAL) IPC Service (target server (Samba, Ubuntu))</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*An9i42gfFAcRZBQZ75ucNw.png" /></figure><p>6. <strong>Enumerate SMB users</strong>:</p><ul><li>Use: auxiliary/scanner/smb/smb_enumusers</li><li>Run: run</li><li><strong>Explanation</strong>: Attempts to list users via RID cycling or other methods.</li><li><strong>Output</strong>: Users are josh, nancy, bob.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*An9i42gfFAcRZBQZ75ucNw.png" /></figure><p>7. <strong>Brute-force SMB logins</strong>:</p><ul><li>Use: auxiliary/scanner/smb/smb_login</li><li>Set: set SMBUser josh, set PASS_FILE /root/Desktop/wordlists/unix_passwords.txt, set VERBOSE false</li><li>Run: run</li><li><strong>Output</strong>: Successful credentials: josh:purple</li><li>Repeat for nancy and bob: No successful credentials.</li><li><strong>Explanation</strong>: This module tries username/password combos; use a wordlist for efficiency.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*zvg4c-s7FJCr-gg1M7BUCA.png" /></figure><h3>FTP Enumeration</h3><p>FTP is for file transfers. We check versions and brute-force logins, noting the non-standard port (5554).</p><h3>Step-by-Step Instructions:</h3><ol><li><strong>Scan FTP version</strong>:</li></ol><ul><li>In Metasploit: use auxiliary/scanner/ftp/ftp_version</li><li>Set: set RPORT 5554</li><li>Run: run</li><li><strong>Explanation</strong>: Retrieves the FTP banner for version info.</li><li><strong>Output</strong>: FTP Banner: ‘220 Welcome to blah FTP service. Reminder to users, specifically ashley, alice and amanda to change their weak passwords immediately!!!\x0d\x0a’</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GfPWklXzLSD3FRfib5_3OA.png" /></figure><p>2. <strong>Brute-force FTP logins</strong>:</p><ul><li>Use: auxiliary/scanner/ftp/ftp_login</li><li>Set: set VERBOSE false, set USERNAME ashley, set RPORT 5554, set PASS_FILE /root/Desktop/wordlists/unix_passwords.txt</li><li>Run: run</li><li><strong>Output</strong>: No passwords for ashley; but for alice:pretty (successful).</li><li><strong>Explanation</strong>: Similar to SMB brute-force; the banner hints at weak passwords for ashley, alice, amanda. test them.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*v1BWh7Nmzb7zvU8wEe4vig.png" /></figure><h3>SSH Enumeration</h3><p>SSH is for secure remote access. We check versions and attempt logins.</p><h3>Step-by-Step Instructions:</h3><ol><li><strong>Scan SSH version</strong>:</li></ol><ul><li>In Metasploit: search ssh_version then use scanner/ssh/ssh_version</li><li>Run: run</li><li><strong>Explanation</strong>: Detects SSH server details like version and key fingerprints.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*56_EmH4lKefRwDN-XXjFZw.png" /></figure><p><strong>2. Brute-force SSH logins</strong>:</p><ul><li>Use: auxiliary/scanner/ssh/ssh_login</li><li>Set: set USER_FILE /usr/share/metasploit-framework/data/wordlists/common_users.txt, set PASS_FILE /root/Desktop/wordlists/unix_passwords.txt</li><li>Run: run</li><li><strong>Output</strong>: No successful brute-forcing.</li><li><strong>Explanation</strong>: Tries common users/passwords; failure means stronger creds or rate-limiting.</li></ul><h3>Capturing the Flags</h3><p>Now we leverage our findings to grab the flags.</p><h3>Flag 1: Anonymous Samba Share</h3><ul><li><strong>Hint</strong>: There is a samba share that allows anonymous access. Wonder what’s in there!</li></ul><h3><strong>Step-by-Step</strong>:</h3><ol><li>Inside wordlists folder, find shares.txt.</li><li>Create script: check_shares.sh</li></ol><pre>#!/bin/bash<br># Script to check anonymous access to Samba shares listed in shares.txt<br>TARGET=&quot;192.35.174.3&quot;<br>SHARES_FILE=&quot;shares.txt&quot;<br><br>while read -r share; do<br>    echo &quot;Checking share: $share&quot;<br>    smbclient -N //$TARGET/$share 2&gt;/dev/null<br>    if [ $? -eq 0 ]; then<br>        echo &quot;SUCCESS: Anonymous access to $share&quot;<br>        smbclient -N //$TARGET/$share -c &quot;ls&quot; &gt;&gt; share_contents.txt<br>    else<br>        echo &quot;FAILED: No anonymous access to $share&quot;<br>    fi<br>done &lt; &quot;$SHARES_FILE&quot;</pre><p>3. Make executable: chmod +x check_shares.sh</p><p>4. Run: ./check_shares.sh</p><p>5. Output: SUCCESS: Anonymous access to pubfiles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/412/1*mR_BPAkKI2f1MZuXGdsJ3w.png" /></figure><p>6. Connect: smbclient //192.35.174.3/pubfiles -N</p><p>7. List: ls (finds flag1.txt)</p><p>8. Download: get flag1.txt</p><p>9. View: cat flag1.txt</p><p>Explanation: Script automates checking anonymous shares from a list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*4zq4k-z1ub9P9ft4L9UPCg.png" /></figure><h3>Flag 2: Weak Samba User Password</h3><ul><li><strong>Hint</strong>: One of the samba users have a bad password. Their private share with the same name as their username is at risk!</li></ul><h3><strong>Step-by-Step</strong>:</h3><ol><li>From SMB enum: josh:purple.</li><li>Connect: smbclient //192.35.174.3/josh -U josh (password: purple)</li><li>List: ls (finds flag2.txt)</li><li>Download: get flag2.txt</li><li>View (in new terminal): cat flag2.txt</li></ol><ul><li>Hint inside: “I heard there is an ftp service running. Find it and check the banner”</li></ul><p><strong>Explanation</strong>: Private shares often match usernames; weak passwords expose them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*7o7XFmQyBiAnyICTGz_8gQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*dlhgP4DJwgspxO0th-jqFA.png" /></figure><h3>Flag 3: FTP Access</h3><ul><li><strong>Hint</strong>: Follow the hint given in the previous flag to uncover this one.</li></ul><h3><strong>Step-by-Step</strong>:</h3><ol><li>From FTP brute: alice:pretty.</li><li>Connect: ftp 192.35.174.3 5554 (username: alice, password: pretty)</li><li>List: ls (finds flag3.txt)</li><li>Download: get flag3.txt</li><li>View: cat flag3.txt</li></ol><p><strong>Explanation</strong>: Banner from FTP enum hinted at users; brute-force got access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A6vZn71_h2iOuMR9AMzyOA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5pSuWGqaxpB1ptaSU2rAFA.png" /></figure><h3>Flag 4: SSH Warning</h3><ul><li><strong>Hint</strong>: This is a warning meant to deter unauthorized users from logging in.</li></ul><h3><strong>Step-by-Step</strong>:</h3><ol><li>Attempt login: ssh 192.35.174.3</li><li><strong>Output</strong>: Reveals a banner or MOTD with the flag.</li></ol><p><strong>Explanation</strong>: SSH banners can contain warnings/flags; even failed logins show them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*iOy7onZy96PiGfCX-0zdfA.png" /></figure><h3>Conclusion</h3><p>This CTF highlights the importance of thorough enumeration starting broad with Nmap and drilling down into services. We captured all flags by combining scanning, brute-forcing, and scripting. Practice these techniques responsibly in ethical hacking scenarios. If you enjoyed this, check out more CTFs on INE or similar platforms. Questions? Drop a comment below!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7fb372c84055" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Walkthrough: Assessment Methodologies — Footprinting and Scanning CTF 1]]></title>
            <link>https://medium.com/@xnirkun/walkthrough-assessment-methodologies-footprinting-and-scanning-ctf-1-b56e06a51f18?source=rss-da648e66ea17------2</link>
            <guid isPermaLink="false">https://medium.com/p/b56e06a51f18</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[cybersecwriteup]]></category>
            <category><![CDATA[ine]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Xnirkun]]></dc:creator>
            <pubDate>Wed, 17 Sep 2025 04:51:15 GMT</pubDate>
            <atom:updated>2025-09-17T04:51:15.057Z</atom:updated>
            <content:encoded><![CDATA[<h3>Walkthrough: Assessment Methodologies — Footprinting and Scanning CTF 1</h3><h3>Introduction</h3><p>In the world of cybersecurity, footprinting and scanning are foundational steps in ethical hacking and penetration testing. They involve gathering intelligence about a target system to identify potential vulnerabilities without directly exploiting them. This CTF (Capture The Flag) challenge, titled &quot;Assessment Methodologies: Footprinting and Scanning CTF 1,&quot; simulates real-world reconnaissance techniques using tools like Nmap, FTP, and database queries. The goal is to discover four flags hidden across network services on a target machine.</p><p>This walkthrough provides a step-by-step guide based on my experience solving the challenge. We&#39;ll cover target identification, network scanning, web enumeration, anonymous FTP access, and database exploration. By the end, you&#39;ll understand how passive and active reconnaissance can reveal critical information. Note: This is for educational purposes only always ensure you have permission before scanning real systems.</p><p>Prerequisites:</p><ul><li>Basic knowledge of Linux commands.</li><li>Tools like Nmap, FTP client, and MySQL client installed.</li><li>Access to a virtual machine or lab environment (e.g., via INE&#39;s platform).</li></ul><p>Let&#39;s dive in!</p><h3>Target Identification</h3><p>The first step in any assessment is to identify the target and gather basic host information. This sets the foundation for more detailed scanning.</p><h3>Step-by-Step Instructions:</h3><ol><li>Resolve the Target Hostname: Use the provided target URL to determine the IP address.</li></ol><ul><li>Command: Implicitly resolved via host lookup or direct access.</li><li>Result: The hostname target.ine.local resolves to IP 192.122.143.3.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*IrPrLvrnxPeSqLH38AybNg.png" /></figure><p>2. Check Local Machine IPs: Verify your own network interfaces to ensure proper connectivity.</p><ul><li>Command: ifconfig</li></ul><p>Result:</p><ul><li>eth0: 10.1.0.9</li><li>eth1: 199.122.143.2 (likely the interface connected to the target’s network).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*4aiOAtFKAavW4OQGTZSUJw.png" /></figure><p>This confirms we’re on the same subnet or have routing to the target, allowing us to proceed with scanning.</p><h3>Performing a Ping Scan</h3><p>A quick ping scan helps confirm the target’s availability and maps out the subnet if needed. Here, we focus on a /24 subnet for efficiency.</p><h3>Description and Explanations:</h3><p>Ping scans use ICMP echo requests to detect live hosts. This is a lightweight way to footprint the network without deep port probing.</p><h3>Step-by-Step Instructions:</h3><ol><li>Run the Ping Scan: Target the specific IP or subnet.</li></ol><ul><li>Command: Not explicitly detailed, but implied as a basic ping or Nmap ping scan (e.g., nmap -sn 192.122.143.0/24).</li><li>Result: The target target.ine.local at 192.122.143.3 responds as live.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*S5D19VIBRfQ2eHJselp5tw.png" /></figure><p>This step verifies the target is online and ready for more intensive scanning.</p><h3>Comprehensive Nmap Scan</h3><p>Nmap is the go-to tool for port scanning and service enumeration. We use aggressive options to gather versions, OS details, and run default scripts.</p><h3>Description and Explanations:</h3><ul><li>-sC: Runs default NSE (Nmap Scripting Engine) scripts for vulnerability detection and additional info.</li><li>-sV: Probes for service versions, helping identify potential exploits.</li><li>-O: Attempts OS fingerprinting based on network responses.</li><li>-T4: Increases scan speed (aggressive timing).</li><li>-p-: Scans all 65,535 TCP ports for completeness.</li></ul><p>This combination provides a thorough footprint of the target’s services.</p><h3><strong>Step-by-Step Instructions:</strong></h3><ol><li>Execute the Nmap Scan:</li></ol><ul><li>Command: nmap -sC -sV -O -T4 -p- 192.122.143.3</li></ul><p>Output Summary:</p><ul><li>Port 21 (FTP): Anonymous login allowed; files like creds.txt and flag.txt visible.</li><li>Port 22 (SSH): OpenSSH 8.9p1 Ubuntu 3ubuntu0.10 (Ubuntu Linux; protocol 2.0).</li><li>Port 80 (HTTP): Werkzeug/3.0.6 Python/3.10.12 — Indicates a Python web server; browse to inspect.</li><li>Port 143 (IMAP): Open for email access.</li><li>Port 993 (SSL/IMAP): Secure IMAP variant.</li><li>Port 3306 (MySQL): MySQL 8.0.39–0ubuntu0.22.04.1 — Database service.</li><li>Port 33060 (MySQLX): MySQL X Protocol for modern clients.</li><li>OS Detection: Likely Linux kernel versions (e.g., 2.6.32 to 5.8), with high confidence matches.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*geHFFGuiWf9REDKm4XlvKg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nHvp53plzEPukrcDNMeLqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LyljdzPCCzw6q4YX1b3pGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*49dniedtHMuIXOvl635H5A.png" /></figure><p>Reviewing these results highlights entry points: Anonymous FTP for file access, HTTP for web content, and MySQL for potential database queries.</p><h3>Capturing Flag 1: Server Identity Revelation</h3><p><strong>Hint</strong>: “The server proudly announces its identity in every response. Look closely; you might find something unusual.”</p><h3>Description and Explanations:</h3><p>Web servers often include headers or metadata that reveal flags or misconfigurations. Inspecting network responses or page sources can uncover hidden data.</p><h3>Step-by-Step Instructions:</h3><ol><li><strong>Browse the Web Server:</strong> Open <a href="http://target.ine.local/">http://target.ine.local</a> in a browser.</li><li><strong>Inspect Network Traffic:</strong></li></ol><ul><li>Use browser developer tools (e.g., Inspect &gt; Network tab).</li><li>Reload the page and check the response for target.ine.local.</li><li>Alternatively, visible in Nmap’s HTTP script output.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t-XInWoreySkO-G5jMr-yQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BclZxPrnoslaYlhfX8cKVw.png" /><figcaption>on the right part you can see the <strong>Server Flag</strong></figcaption></figure><p>3. <strong>Extract the Flag</strong></p><h3>Capturing Flag 2: Robots.txt Enumeration</h3><p><strong>Hint</strong>: “The gatekeeper’s instructions often reveal what should remain unseen. Don’t forget to read between the lines.”</p><h3>Description and Explanations:</h3><p>robots.txt is a file that instructs web crawlers on disallowed paths, but it often leaks sensitive directories. Enumerating these can lead to hidden content.</p><h3>Step-by-Step Instructions:</h3><ol><li><strong>Access robots.txt: Browse to </strong><a href="http://target.ine.local/robots.txt."><strong>http://target.ine.local/robots.txt.</strong></a></li></ol><ul><li>It likely lists paths like /photos, /data/, and /secret-info/.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*W8x2xQN4ihfr2mRVEexF5g.png" /></figure><p>2.<strong> Test Disallowed Paths:</strong></p><ul><li>/photos and /data/: Return 404 errors.</li><li>/secret-info/: Accessible; contains flag.txt.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*moO62T6-7uoztcv74BqfIg.png" /></figure><p>3.<strong> Retrieve the Flag File:</strong></p><ul><li>URL: <a href="http://target.ine.local/secret-info/flag.txt">http://target.ine.local/secret-info/flag.txt</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*aPwYdUNhpOzvM2ATzdbaDg.png" /></figure><p>This demonstrates how footprinting web directories can reveal unintended disclosures.</p><h3>Capturing Flag 3: Anonymous FTP Exploration</h3><p><strong>Hint</strong>: “Anonymous access sometimes leads to forgotten treasures. Connect and explore the directory; you might stumble upon something valuable.”</p><h3>Description and Explanations:</h3><p>Anonymous FTP allows login without credentials, often used for public file sharing but prone to misconfigurations exposing sensitive files.</p><h3>Step-by-Step Instructions:</h3><ol><li><strong>Connect to FTP:</strong></li></ol><ul><li>Command: ftp 192.122.143.3</li><li>Username: anonymous</li><li>Password: Leave blank (or any string, as it’s ignored).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/1*vjdPUtWYkxC0FJiuqfXTRw.png" /></figure><p>2.<strong> List Directory Contents:</strong></p><ul><li>Command: ls</li><li>Files: creds.txt and flag.txt.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*ns8sfVHoKfRClxhHrhDU0w.png" /></figure><p>3.<strong> Download Files:</strong></p><ul><li>Command: mget *.txt</li><li>Exit: quit</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RrVcTIL_yQSJOelsdb8JYQ.png" /></figure><p>4.<strong> View Local Files:</strong></p><ul><li>Commands: cat creds.txt (reveals db_admin:password@123) and cat flag.txt.</li><li>Extract the flag</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*w6--A4KGao5CTLib10f24g.png" /></figure><p>The credentials hint at further access to the MySQL database spotted in Nmap.</p><h3>Capturing Flag 4: Database Configuration Peek</h3><p><strong>Hint</strong>: “A well-named database can be quite revealing. Peek at the configurations to discover the hidden treasure.”</p><h3>Description and Explanations:</h3><p>Using credentials from FTP, we connect to MySQL. Database names can be descriptive, sometimes containing flags or configs.</p><h3>Step-by-Step Instructions:</h3><ol><li><strong>Connect to MySQL:</strong></li></ol><ul><li>Command: mysql -h 192.122.143.3 -u db_admin -p</li><li>Password: password@123 (from creds.txt).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*r9V7G0i5beGHTATb-iGEyw.png" /></figure><p>2. <strong>List Databases:</strong></p><ul><li>Command: SHOW DATABASES;</li><li>Result: One database name reveals the flag.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*Af-9QWbcGmGXHST_oC68eA.png" /></figure><p>3.<strong> Extract the Flag:</strong></p><p>This step shows how chaining discoveries (FTP creds to DB access) amplifies reconnaissance.</p><h3>Conclusion</h3><p>This CTF highlights the power of footprinting and scanning in uncovering vulnerabilities through non-intrusive methods. We started with basic host info, escalated to detailed Nmap scans, and chained findings across FTP, web, and database services to capture all four flags. Key takeaways: Always check anonymous access points, enumerate web files like robots.txt, and verify service banners.</p><p>If you’re practicing on platforms like INE, try varying your scans or tools (e.g., adding -A to Nmap for more aggression). Share your thoughts or variations in the comments — happy hacking! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b56e06a51f18" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Assessment Methodologies: Information Gathering CTF 1 Writeup]]></title>
            <link>https://medium.com/@xnirkun/assessment-methodologies-information-gathering-ctf-1-writeup-af5d37aa6db6?source=rss-da648e66ea17------2</link>
            <guid isPermaLink="false">https://medium.com/p/af5d37aa6db6</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ine]]></category>
            <category><![CDATA[assessment-methodologies]]></category>
            <category><![CDATA[ctf-1]]></category>
            <category><![CDATA[ejpt]]></category>
            <dc:creator><![CDATA[Xnirkun]]></dc:creator>
            <pubDate>Sun, 14 Sep 2025 15:42:01 GMT</pubDate>
            <atom:updated>2025-09-14T15:42:01.658Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>This writeup documents the process of completing the “Assessment Methodologies: Information Gathering CTF 1” challenge. The objective is to perform reconnaissance and information gathering on a target host to discover hidden flags through various web enumeration and scanning techniques. The target host is target.ine.local with the IP address 192.81.101.3. Tools such as Nmap, Dirb, Httrack, and basic file inspection were used to uncover directories, configurations, and sensitive files. Each flag represents a key discovery, highlighting common vulnerabilities in web applications like misconfigurations, exposed backups, and directory browsing issues. The steps below provide detailed explanations of the methodology, commands executed, and findings for each flag.</p><h3>Flag 1: This tells search engines what to and what not to avoid: Robots.txt Enumeration</h3><p>Robots.txt is a file used by websites to instruct search engine crawlers on which pages or directories to index or avoid. It can sometimes reveal sensitive paths that are disallowed for crawling but accessible to direct visitors, making it a valuable target during reconnaissance.</p><p>To check for this, I accessed the /robots.txt file on the target host. The contents revealed disallowed entries, and among them was the first flag: FLAG1{b212d1448fec471bb1f26027a0c35fa5}.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*ARrf43DwAeFVGT2dDTJN2A.png" /></figure><h3>Flag 2: What website is running on the target, and what is its version?: Service Enumeration with Nmap</h3><p>Identifying the services and versions running on a target is crucial for understanding potential vulnerabilities. Nmap is a powerful tool for port scanning and service version detection.</p><p>I ran the command nmap -Pn -sC -sV -T4 -p- 192.81.101.3 to perform a full port scan with script scanning and version detection, skipping host discovery (-Pn) for efficiency. The scan revealed that a web server (likely WordPress-based, given later findings) was running on the target, along with its version details. Embedded in the output was the second flag: FL@G2{c7e215583cb641b9a9a7823142e2cf1a}.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*ohsA_6SZ0oBIg4__0V_Dkw.png" /></figure><h3>Flag 3: Directory browsing might reveal where files are stored: Directory Enumeration with Dirb</h3><p>Directory browsing vulnerabilities occur when web servers allow users to list directory contents, potentially exposing sensitive files or subdirectories. Tools like Dirb can brute-force common directory paths to uncover these.</p><p>I executed dirb <a href="http://target.ine.local/">http://target.ine.local</a> to enumerate directories. This revealed accessible paths, and navigating to /wp-content/uploads (a common WordPress upload directory) showed exposed files, including the third flag: FLAG3{170a8e3e8bf74712b67c53b68120bc27}.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*7p_ikK5QKRZ2fZGnZz-VLA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*Ukvs_HRr2OPy2omPGGo_hA.png" /></figure><h3>Flag 4: An overlooked backup file in the webroot can be problematic if it reveals sensitive configuration details: Backup File Discovery</h3><p>Backup files left in the web root, such as configuration backups, can leak sensitive information like database credentials if not properly secured. Common extensions include .bak, .zip, etc., and they are often overlooked during cleanup.</p><p>This challenge proved challenging and required patience to unravel, with the solution cleverly concealed in the prompt. Armed with fundamental understanding of WordPress platforms, search online for common locations of backup files in such environments. This will lead to a pertinent web address; visiting it triggers the download of a .bak file. Simply display its contents using the cat command to uncover the flag.</p><p>I extended the directory enumeration with dirb <a href="http://target.ine.local/">http://target.ine.local</a> -w /usr/share/dirb/wordlists/big.txt -X .bak,.tar.gz,.zip,.sql,.bak.zip to search for files with these extensions using a larger wordlist. This uncovered <a href="http://target.ine.local/wp-config.bak,">http://target.ine.local/wp-config.bak,</a> a backup of the WordPress configuration file. Downloading and viewing it with cat wp-config.bak revealed database details and the fourth flag: FLAG4{0c0a8081919d4c53aca1705aee2451ff}.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*bFdIApozb4mUTLqo-Ugi3g.png" /><figcaption><a href="http://target.ine.local/">http://target.ine.local</a> -w /usr/share/dirb/wordlists/big.txt -X .bak,.tar.gz,.zip,.sql,.bak.zip</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*C50RNSG7uvSKgdCGr9DL5Q.png" /><figcaption><a href="http://target.ine.local/wp-config.bak,">http://target.ine.local/wp-config.bak</a></figcaption></figure><h3>Flag 5: Certain files may reveal something interesting when mirrored: Website Mirroring with Httrack</h3><p>Mirroring a website creates a local copy, allowing offline analysis for hidden comments, embedded data, or overlooked files that might not be obvious during online browsing. Httrack is a tool for this purpose.</p><p>I used httrack <a href="http://target.ine.local/">http://target.ine.local</a> -O INETARGET to mirror the site into a local directory named INETARGET. Exploring the mirrored files revealed a PHP file in the root (likely part of the WordPress structure) containing interesting data. Further, using grep to search for specific keywords across the mirrored files confirmed the discovery, yielding the fifth flag: FLAG5{daab793c66604aa5a9357bf42bf9ac3b}.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*QJf1ZqBZGZ8Bs9vScobr5Q.png" /><figcaption><a href="http://target.ine.local/">http://target.ine.local</a> -O INETARGET</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*ji9lEXnUOTZnCseIrNTSbg.png" /><figcaption>INETARGET folder created by httrack</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bp4NiCVjz81DCD_rixH2-Q.png" /><figcaption>Grep -I “FLAG5” -R target.ine.local</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XpfR0kjHleOFRdxZSDjO0g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af5d37aa6db6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>