<?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[ Daniel Iwugo - 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[ Daniel Iwugo - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sun, 17 May 2026 04:37:14 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/author/elementmerc/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Run Rust on Jupyter Notebooks ]]>
                </title>
                <description>
                    <![CDATA[ If you've ever wanted to combine the power of Rust with the interactive goodness of Jupyter notebooks, you're in the right place. Maybe you're tired of compiling every single time you want to test a s ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-run-rust-on-jupyter-notebooks/</link>
                <guid isPermaLink="false">699879483dc17c4862f498f9</guid>
                
                    <category>
                        <![CDATA[ Rust ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Jupyter Notebook  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Linux ]]>
                    </category>
                
                    <category>
                        <![CDATA[ WSL ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Tutorial ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Iwugo ]]>
                </dc:creator>
                <pubDate>Fri, 20 Feb 2026 15:10:00 +0000</pubDate>
                <media:content url="https://cloudmate-test.s3.us-east-1.amazonaws.com/uploads/covers/5e1e335a7a1d3fcc59028c64/6e411f5d-65a1-407d-a4f0-0beceb1e784b.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>If you've ever wanted to combine the power of Rust with the interactive goodness of Jupyter notebooks, you're in the right place. Maybe you're tired of compiling every single time you want to test a snippet, learn Rust in a more interactive way, or just have a crazy idea pop into your head like I do.</p>
<p>Most people think Jupyter is just for Python and data science stuff, but apparently you can run Rust in one, too.</p>
<p>In this tutorial, we’ll be taking a look at:</p>
<ol>
<li><p><a href="#heading-what-is-evcxr">What is EvCxR?</a></p>
</li>
<li><p><a href="#heading-how-to-install-the-rust-jupyter-kernel">How to Install the Rust Jupyter kernel</a></p>
</li>
<li><p><a href="#heading-step-4-write-your-first-rust-code">How to run your first Rust code in a notebook</a></p>
</li>
<li><p><a href="#heading-handy-tips-and-tricks">Handy Tips and Tricks</a></p>
</li>
<li><p><a href="#heading-common-issues-and-solutions">Common Issues and Solutions</a></p>
</li>
<li><p><a href="#heading-when-not-to-use-jupyter-for-rust">When NOT to Use Jupyter for Rust</a></p>
</li>
</ol>
<p><strong>Friendly Disclaimer</strong>: This tutorial assumes you know the basics of both Rust and Jupyter. If you break something, that's on you, mate 🙂.</p>
<p>So without further ado, let's jump in.</p>
<h2 id="heading-what-is-evcxr"><strong>What is EvCxR?</strong></h2>
<p>EvCxR (pronounced "Evaluator" to my fellow linguists’ horror) is a Rust REPL and Jupyter kernel. It's basically the magic that lets you run Rust code interactively in Jupyter notebooks instead of the traditional compile-run-debug cycle.</p>
<p>The name stands for "Evaluation Context for Rust", and it’s an open source project actively maintained on GitHub. Here are a few things that make this terribly named tool absolutely brilliant:</p>
<ol>
<li><p><strong>Interactive development:</strong> It lets you test Rust snippets without creating a whole project 🧪</p>
</li>
<li><p><strong>Prototyping:</strong> You can quickly try out ideas before committing to a full implementation 💡</p>
</li>
<li><p><strong>Data visualisation:</strong> And yes, you can even plot charts with Rust (more on that later) 📊</p>
</li>
</ol>
<h2 id="heading-how-to-install-the-rust-jupyter-kernel">How to Install the Rust Jupyter kernel</h2>
<h3 id="heading-prerequisites"><strong>Prerequisites</strong></h3>
<p>Before we dive into the installation, make sure you have these sorted:</p>
<ol>
<li><p><strong>A Linux System:</strong> Or at least, Windows Subsystem for Linux (There’s a little note below for Windows users.)</p>
</li>
<li><p><strong>The Rust toolchain:</strong> You can get it from <a href="https://rustup.rs/">rustup.rs</a> if you haven't already</p>
</li>
<li><p><strong>Jupyter:</strong> Install via pip – <code>pip install jupyter</code></p>
</li>
<li><p><strong>Patience:</strong> This might take a minute or two ⏱️</p>
</li>
</ol>
<p>Once you’ve got all that, we can get rusty (pun intended).</p>
<p><strong>Note:</strong> If you’re using Windows, you’ll need to do a little extra to get started. Here’s the quick rundown:</p>
<ol>
<li><p>Go to <a href="https://visualstudio.microsoft.com/visual-cpp-build-tools/">https://visualstudio.microsoft.com/visual-cpp-build-tools/</a></p>
</li>
<li><p>Download and run the installer</p>
</li>
<li><p>Select <strong>"Desktop development with C++"</strong></p>
</li>
<li><p>Install it (it's large, ~5GB)</p>
</li>
</ol>
<h3 id="heading-step-1-install-evcxr"><strong>Step 1: Install EvCxR</strong></h3>
<p>Open your terminal and run this command:</p>
<pre><code class="language-rust">cargo install evcxr_jupyter
</code></pre>
<p>Now go grab a cup of joe ☕. This will take a few minutes as Cargo downloads and compiles everything. And don't panic if it seems stuck. Rust compilation is thorough but not particularly fast.</p>
<p>If you get any errors about missing system libraries, you might need to install some dependencies. On Ubuntu/Debian, try:</p>
<pre><code class="language-bash">sudo apt install jupyter-notebook jupyter-core python-ipykernel
sudo apt install cmake
</code></pre>
<p>On macOS with Homebrew:</p>
<pre><code class="language-bash">brew install cmake jupyter
</code></pre>
<h3 id="heading-step-2-install-the-jupyter-kernel"><strong>Step 2: Install the Jupyter Kernel</strong></h3>
<p>Once the installation finishes, you’ll need to register the EvCxR kernel with Jupyter:</p>
<pre><code class="language-bash">evcxr_jupyter --install
</code></pre>
<p>You should see output that looks something like this at the end:</p>
<pre><code class="language-plaintext">Installation complete
</code></pre>
<h3 id="heading-step-3-launch-jupyter-and-create-a-rust-notebook"><strong>Step 3: Launch Jupyter and Create a Rust Notebook</strong></h3>
<p>Let’s test out our baby. Fire up Jupyter:</p>
<pre><code class="language-bash">jupyter notebook
</code></pre>
<p>Your browser should open automatically (if it doesn't, copy the URL from the terminal).</p>
<p>In the Jupyter interface:</p>
<ol>
<li><p>Click <strong>New</strong> in the top right</p>
</li>
<li><p>Select <strong>Rust</strong> from the dropdown (or "evcxr" depending on your version)</p>
</li>
<li><p>A new notebook opens</p>
</li>
</ol>
<p>Welcome to interactive Rust! 🦀</p>
<h3 id="heading-step-4-write-your-first-rust-code"><strong>Step 4: Write Your First Rust Code</strong></h3>
<p>Let's start with a classic:</p>
<pre><code class="language-rust">println!("Hello my fellow Rustaceans! 🦀");
</code></pre>
<p>Hit <code>Shift + Enter</code> to run the cell. You should see the output appear below the cell. Simple as that.</p>
<p>Note that notebooks execute code at the top level, so you don’t have to wrap it around the <code>main()</code> function. If you still want to do that, you’re going to have to call it like this:</p>
<pre><code class="language-rust">fn main(){
    println!("Hello my fellow Rustaceans! 🦀");
}
//Calling the function
main()
</code></pre>
<p>Now let's try something more interesting:</p>
<pre><code class="language-rust">fn fibonacci(n: u32) -&gt; u32 {
    match n {
        0 =&gt; 0,
        1 =&gt; 1,
        _ =&gt; fibonacci(n - 1) + fibonacci(n - 2)
    }
}

for i in 0..10 {
    println!("fibonacci({}) = {}", i, fibonacci(i));
}
</code></pre>
<p>Run it and watch the Fibonacci sequence appear.</p>
<pre><code class="language-plaintext">fibonacci(0) = 0
fibonacci(1) = 1
fibonacci(2) = 1
fibonacci(3) = 2
fibonacci(4) = 3
fibonacci(5) = 5
fibonacci(6) = 8
fibonacci(7) = 13
fibonacci(8) = 21
fibonacci(9) = 34
</code></pre>
<h2 id="heading-handy-tips-and-tricks"><strong>Handy Tips and Tricks</strong></h2>
<p>Functions aren’t the only things that behave differently when using Rust in notebooks. Here are a few other things you might want to keep in mind:</p>
<h3 id="heading-variables-persist-between-cells">Variables Persist Between Cells</h3>
<p>Unlike traditional Rust compilation, variables you define in one cell stick around for the next cells:</p>
<pre><code class="language-rust">let mut counter = 0;
</code></pre>
<p>Then in the next cell:</p>
<pre><code class="language-rust">counter += 1;
println!("Counter: {}", counter);
</code></pre>
<p>The output would be:</p>
<pre><code class="language-plaintext">Counter: 1
</code></pre>
<p>This is great for building up complex examples step by step.</p>
<h3 id="heading-you-can-use-external-crates">You Can Use External Crates</h3>
<p>Add dependencies with the <code>:dep</code> command in one cell:</p>
<pre><code class="language-rust">:dep serde = { version = "1.0", features = ["derive"] }
:dep serde_json = "1.0"
</code></pre>
<p>Then use them normally in the next:</p>
<pre><code class="language-rust">use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, Debug)]
struct Person {
    name: String,
    age: u32,
}

let person = Person {
    name: "Amina".to_string(),
    age: 24,
};

let json = serde_json::to_string(&amp;person).unwrap();
println!("{}", json);
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">{"name":"Amina","age":24}
</code></pre>
<p>Pretty neat, huh?</p>
<h3 id="heading-visualisation-support">Visualisation Support</h3>
<p>You can even create graphs. To get started, install the <code>plotters</code> crate:</p>
<pre><code class="language-rust">:dep plotters = { version = "0.3", default-features = false, features = ["evcxr", "all_series", "bitmap_backend", "bitmap_encoder"] }
</code></pre>
<p>Then create a simple sine graph:</p>
<pre><code class="language-rust">use plotters::prelude::*;

let root = SVGBackend::new("sine_wave.svg", (640, 480)).into_drawing_area();
root.fill(&amp;WHITE).unwrap();

let mut chart = ChartBuilder::on(&amp;root)
    .caption("Sine Wave", ("Arial", 20))
    .margin(5)
    .x_label_area_size(30)
    .y_label_area_size(30)
    .build_cartesian_2d(-3.14..3.14, -1.2..1.2)
    .unwrap();

chart.configure_mesh().draw().unwrap();

chart.draw_series(LineSeries::new(
    (-314..314).map(|x| {
        let x = x as f64 / 100.0;
        (x, x.sin())
    }),
    &amp;RED,
)).unwrap();

root.present().unwrap();
println!("Plot saved to sine_wave.svg");
</code></pre>
<p>Output:</p>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1771272251271/c07b1c22-4ea1-408c-984a-4179a47058d9.png" alt="Sine wave graph showing output of the code" style="display:block;margin:0 auto" width="600" height="400" loading="lazy">

<p><strong>A word on plotting:</strong> You can actually display plots directly inline in your notebook. But if you're using WSL with VSCode (like I do), inline plotting may not work properly due to rendering issues on the notebook interface. That’s why I used it as an svg file that I can easily view in my text editor.</p>
<h3 id="heading-checking-types">Checking Types</h3>
<p>Not sure what type something is? Use <code>:vars</code>. This shows all variables and their types:</p>
<pre><code class="language-rust">let x = vec![1, 2, 3];
</code></pre>
<pre><code class="language-rust">:vars
</code></pre>
<p>Output:</p>
<pre><code class="language-plaintext">Variable	    Type
       x	Vec&lt;i32&gt;
</code></pre>
<h2 id="heading-common-issues-and-solutions">Common Issues and Solutions</h2>
<h3 id="heading-compilation-errors-everywhere">Compilation Errors Everywhere</h3>
<p>If you're getting weird compilation errors, remember:</p>
<ul>
<li><p>Each cell is compiled separately</p>
</li>
<li><p>You might need to reimport things in each cell</p>
</li>
</ul>
<h3 id="heading-slow-execution">Slow Execution</h3>
<p>The first time you run code in a session, it's slow due to the compilation overhead. Subsequent runs are faster. If it's really slow, you might want to:</p>
<ul>
<li><p>Use release mode: <code>:opt 2</code></p>
</li>
<li><p>Reduce dependency features to only what you need</p>
</li>
<li><p>Consider if Jupyter is the right tool for your use case</p>
</li>
</ul>
<h3 id="heading-dependencies-not-loading">Dependencies Not Loading</h3>
<p>If a crate won't load:</p>
<ul>
<li><p>Make sure the version exists on <a href="http://crates.io">crates.io</a></p>
</li>
<li><p>Check your internet connection (it needs to download)</p>
</li>
<li><p>Try specifying features explicitly</p>
</li>
<li><p>Clear the cargo cache if things get really wonky: <code>rm -rf ~/.evcxr</code></p>
</li>
</ul>
<h2 id="heading-when-not-to-use-jupyter-for-rust"><strong>When NOT to Use Jupyter for Rust</strong></h2>
<p>Jupyter notebooks are great for learning and experimenting, but they're not always the best choice in:</p>
<ul>
<li><p><strong>Production code:</strong> Use proper projects with cargo</p>
</li>
<li><p><strong>Performance-critical code:</strong> The overhead isn't worth it</p>
</li>
<li><p><strong>Large applications:</strong> Notebooks get very messy, very fast</p>
</li>
<li><p><strong>Team collaboration:</strong> Version control with notebooks is quite the nightmare</p>
</li>
</ul>
<p>Stick to notebooks for prototyping and quick experiments. For anything serious, fire up your favourite editor and create a proper Rust project.</p>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>Let's summarise what you've learned:</p>
<ol>
<li><p>How to install the EvCxR Jupyter kernel</p>
</li>
<li><p>How to create and run Rust notebooks</p>
</li>
<li><p>How to use external crates in notebooks</p>
</li>
<li><p>Tips and tricks for interactive Rust development</p>
</li>
</ol>
<p>Jupyter notebooks make Rust more accessible for learning and experimentation. Give it a go next time you want to try out a quick Rust snippet without the ceremony of creating a full project. And with that, we've come to the end of this tutorial.</p>
<p>Cheers.</p>
<h2 id="heading-resources">Resources</h2>
<ol>
<li><p><a href="https://github.com/evcxr/evcxr">EvCxR GitHub Repository</a></p>
</li>
<li><p><a href="https://doc.rust-lang.org/book/">Rust Book</a></p>
</li>
<li><p><a href="https://jupyter.org/documentation">Jupyter Documentation</a></p>
</li>
</ol>
<h2 id="heading-acknowledgements">Acknowledgements</h2>
<p>Thanks to <a href="https://www.linkedin.com/in/a-n-u-o/">Anuoluwapo Victor</a>, <a href="https://www.linkedin.com/in/a-n-u-o/">Chinaza Nwukwa,</a> <a href="https://www.linkedin.com/in/chinaza-nwukwa-22a256230/">Holumidey Mer</a><a href="https://www.linkedin.com/in/mercy-holumidey-88a542232/">cy</a>, <a href="https://www.linkedin.com/in/mercy-holumidey-88a542232/">Favour Ojo,</a> <a href="https://www.linkedin.com/in/favour-ojo-906883199/">Georgina</a> <a href="https://www.linkedin.com/in/georgina-awani-254974233/">Awani</a>, <a href="https://www.linkedin.com/in/georgina-awani-254974233/">and my family</a> for the inspiration, support and knowledge used to put this post together.</p>
<p>And thanks to the EvCxR project maintainers for making this possible, the Rust community for being awesome, and to anyone reading this for wanting to learn. You inspire me daily.</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 Steganography? How to Hide Data Inside Data ]]>
                </title>
                <description>
                    <![CDATA[ Ladies and Gentlemen, welcome to the world of Spies 🕵️. In the movie Uncharted (great movie by the way), Tom Holland and his brother have a secret form of communication. They would write a message on a plain postcard with special ink that became inv... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-is-steganography-hide-data-inside-data/</link>
                <guid isPermaLink="false">66bb9027d2bda3e4315491cd</guid>
                
                    <category>
                        <![CDATA[ Cryptography ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ data ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Iwugo ]]>
                </dc:creator>
                <pubDate>Thu, 13 Jul 2023 17:15:06 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/08/pexels-cottonbro-4966171.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Ladies and Gentlemen, welcome to the world of Spies 🕵️.</p>
<p>In the movie Uncharted (great movie by the way), Tom Holland and his brother have a secret form of communication. They would write a message on a plain postcard with special ink that became invisible and then send it to the other person. </p>
<p>On the outside, it seemed like another plain old postcard. But if a lighter was lit just behind the paper, the ink would reappear, and a new message would be found 🔥. </p>
<p>This is one of the coolest hidden information tricks seen in movies. But what if we could do this on computers?</p>
<p>Well, turns out we sorta can. Using Steganography.</p>
<p><strong>Disclaimer: This concept can be used for both good and bad. The content of this article is for educational purposes only and is not to be used to play pranks, or harm people and infrastructure.</strong></p>
<p>And with that out of the way, here’s what we’re going to explore in this article:</p>
<ol>
<li>What is Steganography?</li>
<li>Types of Steganography – Text, Image, Video, Audio, Network</li>
<li>Image steganography using Steghide</li>
</ol>
<h2 id="heading-what-is-steganography">What is Steganography?</h2>
<p>Steganography is the art of hiding secret data in plain sight. It sounds kind of counter-intuitive, but you’d be surprised how effective it is. </p>
<p>Hiding things such as source code, passwords, IP addresses, and other confidential information in pictures, music, or other random files tends to be the last place anyone would think of finding them.</p>
<p>You should note that steganography and cryptography are not mutually exclusive from each other. One may contain elements of the other or both. For example, you could perform steganography with an encryption algorithm or password, as you’ll find out soon.</p>
<h2 id="heading-types-of-steganography">Types of Steganography</h2>
<p>There are various types of steganography, and we’ll look at five of them in this tutorial.</p>
<h3 id="heading-text-steganography">Text Steganography</h3>
<p>This form involves hiding a message within a text. A common way to do this is substitution. It involves replacing certain characters with others and then substituting them back to retrieve the original data. </p>
<p>For example, take the following text.</p>
<pre><code class="lang-markdown">Thi follow eng tixt contaens a sicrit missagi
</code></pre>
<p>Doesn’t really make sense right? But what if we replace the i’s with e’s and the e’s with i’s?</p>
<pre><code class="lang-markdown">The follow ing text contains a secret message
</code></pre>
<p>I think that’s a little easier on the eyes. This is a pretty easy example, but there are much more complicated ones and even some you could come up with on your own.</p>
<h3 id="heading-image-steganography">Image Steganography</h3>
<p>Frankly, this is my favourite. It involves hiding data behind digital images. There are various techniques for image steganography which include the Least Significant Bit technique, Masking and Filtering, and Coding and Cosine Transformation. </p>
<p>Take a look at the two images below and spot the difference:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/07/image-75.png" alt="Image" width="600" height="400" loading="lazy">
<em>Groot on Linux ¦ Credit: Mercury</em></p>
<p>Basically, no human on earth can tell the visual difference. But if you take a closer look at the file details…</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/07/image-76.png" alt="Image" width="600" height="400" loading="lazy">
<em>Comparing the images ¦ Credit: Mercury</em></p>
<p>The only difference is the size of the images. That’s because the one on the right is hiding 260 words of text in it. How cool is that?</p>
<h3 id="heading-video-steganography">Video Steganography</h3>
<p>In Video steganography, you can literally hide entire videos inside another video. Videos are basically a sequence of images with audio playing as the sequence progresses. This type of steganography allows each video frame to encode an image of the one you want to hide.</p>
<p>This technique can also be used to hide text as demonstrated in the software <a target="_blank" href="https://steganosaur.us">Steganosaurus</a> by James Ridgeway. He shows how it works in this <a target="_blank" href="https://youtu.be/YhnlHmZolRM">video</a>.</p>
<h3 id="heading-audio-steganography">Audio Steganography</h3>
<p>This type of steganography enables hidden messages to be encoded inside an audio file. A common technique used in this is called Backmasking. Backmasking is hiding a message in the audio file and it can only be heard when played backwards.</p>
<p>The famous rapper, Eminem, did some backmasking in the song ‘Stimulate’ back in 2002.</p>
<h3 id="heading-network-steganography">Network Steganography</h3>
<p>This is relatively rare, but nevertheless, it is a technique in which messages are passed by hiding them in network traffic. The messages could be found in the payload or headers of data packets when captured and analysed by the receiver.</p>
<p>Now let’s take a look at how to do some image steganography.</p>
<h2 id="heading-steganography-using-steghide">Steganography using Steghide</h2>
<p>Steghide is an open source image steganography tool that uses the least significant bit (LSB) method to hide data in images. </p>
<p>Images are made up of pixels, which are made up of bits. The bit depth determines how many colours are present in an image. The higher the bit depth, the more colourful the image tends to look.</p>
<p>What LSB does is change the last bit of each byte (or pixel) in the image to one that represents the data you want to hide. This changes the image data, but if done properly is not perceivable. The higher the bit depth and resolution, the more data can be stored in the image.</p>
<p>Now that you understand how it works, let’s play a little hide and seek (no pun intended 👀).</p>
<p>First we’ll be needing a few things:</p>
<ol>
<li>A Linux OS</li>
<li>An Internet Connection</li>
<li>An Image</li>
<li>A Text file</li>
</ol>
<h3 id="heading-install-steghide">Install Steghide</h3>
<p>First we need to install Steghide. Open your terminal and run the following command to do that:</p>
<pre><code class="lang-markdown">sudo apt install steghide
</code></pre>
<p>You can always run <code>steghide --help</code> to get the command list to see all your options.</p>
<h3 id="heading-get-your-image-ready">Get your image ready</h3>
<p>Next, have an image and a text file in a directory. My files are ‘information.txt’ and ‘image.png’. I’ve also put some text in the file to hide in the image later.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/07/image-77.png" alt="Image" width="600" height="400" loading="lazy">
<em>Setting up files ¦ Credit: Mercury</em></p>
<p>Open up your terminal again and go to the directory you stored the files. Mine is in <code>~/Documents/steganography_tutorial</code>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/07/image-78.png" alt="Image" width="600" height="400" loading="lazy">
<em>Looking for the files ¦ Credit: Mercury</em></p>
<h3 id="heading-create-a-new-image">Create a new image</h3>
<p>Next, run the following command to create a new image that contains the text file you want hide.</p>
<pre><code class="lang-markdown">steghide embed -ef <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">data</span>&gt;</span></span> -cf <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">image</span>&gt;</span></span> -sf <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">stego_image</span>&gt;</span></span> -v
</code></pre>
<p>Let’s take a look at the command:</p>
<ul>
<li><code>steghide</code> – We specify the tool to use</li>
<li><code>embed</code> – Tells the tool we want to embed data</li>
<li><code>-ef</code> – Embed file, specifies the file to hide</li>
<li><code>-cf</code> – Cover file, specifies the cover image</li>
<li><code>-sf</code> – Stego file, creates a duplicate of the original image with the embedded file in it</li>
<li><code>-v</code> – Verbose, gives us more information about the process</li>
</ul>
<p>When the command is run, you’ll be asked to enter a password. If you want an extra layer of security, you might want to do this. If you don’t, just hit enter twice. Here’s the result of what I ran:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/07/image-79.png" alt="Image" width="600" height="400" loading="lazy">
<em>Embedding the information ¦ Credit: Mercury</em></p>
<h3 id="heading-inspect-the-new-file">Inspect the new file</h3>
<p>Now let’s take a look at the new file.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/07/image-80.png" alt="Image" width="600" height="400" loading="lazy">
<em>Comparing the images side by side ¦ Credit: Mercury</em></p>
<p>There’s seems to be no difference. We can take a closer look with a site called <a target="_blank" href="https://www.diffchecker.com/image-compare/">diffchecker.com</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/07/image-81.png" alt="Image" width="600" height="400" loading="lazy">
<em>Comparing the images details ¦ Credit: Mercury</em></p>
<h3 id="heading-extract-the-data">Extract the data</h3>
<p>The stego file is slightly bigger than the original because it contains information. We can extract the data from the stego file using the command below.</p>
<pre><code class="lang-markdown">steghide extract -sf <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">stego_image</span>&gt;</span></span> -xf <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">extracted_data</span>&gt;</span></span>
</code></pre>
<p>Let’s review the command above:</p>
<ul>
<li><code>-sf</code> – stego file, the image containing hidden data</li>
<li><code>-xf</code> – extract file, the file with extracted data</li>
</ul>
<p>Below is the screenshot from running the command. The extracted text is also shown below.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/07/image-82.png" alt="Image" width="600" height="400" loading="lazy">
<em>Extracting the information ¦ Credit: Mercury</em></p>
<p>If you extracted the text, Congratulations 🎉🎊. You have successfully hidden and extracted the text from the image. You can do this with a number of things, even whole books.</p>
<p>Using a different tool called Stegcore, I hid a text file containing Quincy Larson’s new book, “<strong><a target="_blank" href="https://www.freecodecamp.org/news/learn-to-code-book/">How to Learn to Code &amp; Get a Developer Job</a></strong>”, behind an image of the book🔍.</p>
<p>Here’s an excerpt from the book.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/07/image-83.png" alt="Image" width="600" height="400" loading="lazy">
<em>An excerpt from the book ¦ Credit: Quincy Larson</em></p>
<p>And just like before, the text was embedded into a new image. Here is the original and the stego image side by side.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/07/image-84.png" alt="Image" width="600" height="400" loading="lazy">
<em>The original image compared to the stego image ¦ Credit: Mercury</em></p>
<p>And as expected, the stego image is slightly larger in size than the original.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/07/image-85.png" alt="Image" width="600" height="400" loading="lazy">
<em>The image details side by side ¦ Credit: Mercury</em></p>
<p>Talk about hiding a book behind a book (bad joke, I know 🤧). If you want to try it out, you can check out the Github <a target="_blank" href="https://github.com/elementmerc/Stegcore">repository</a> or the <a target="_blank" href="https://sourceforge.net/projects/stegcore/">app</a>.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>You’ve learned what steganography is and how to implement it using tools. Keep in mind that steganography is a tool and can be used for both good and bad. Companies can hide sensitive information using these means. On the other hand, a hacker could use it to hide malicious code.</p>
<p>Once again, this tutorial is for educational purposes only and is to be used to help and defend information from black hat hackers. Stay safe in the online jungle and happy hacking 🙃.</p>
<h3 id="heading-acknowledgements"><strong>Acknowledgements</strong></h3>
<p>Thanks to <a target="_blank" href="https://twitter.com/Anuoluwap__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 together. I appreciate all of you.</p>
<p>If you want articles similar to this one, hit me up on <a target="_blank" href="https://www.upwork.com/freelancers/~01b1dea916f784d554">Upwork</a> or read more of my articles <a target="_blank" href="https://flipboard.com/@elementmerc">here</a>.</p>
<p>Cover image credit: Abstract Data Cube ¦ Credit: <a target="_blank" href="https://unsplash.com/@theshubhamdhage?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Shubham Dhage</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How Hackers Attack Social Media Accounts – And How to Defend Against Them ]]>
                </title>
                <description>
                    <![CDATA[ Hey everyone, and welcome to the world of Social Media 📲. In this article, we will explore the famous (or infamous) sphere of social media, why it is critical to both you and hackers, and how you can avoid having your social media accounts attacked.... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-protect-social-media-accounts-from-attackers/</link>
                <guid isPermaLink="false">66bb9015a5fd14123a8b4a1e</guid>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ information security ]]>
                    </category>
                
                    <category>
                        <![CDATA[ social media ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Iwugo ]]>
                </dc:creator>
                <pubDate>Tue, 06 Jun 2023 16:42:11 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/06/aman-pal-15r9RAOy38Q-unsplash-1.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Hey everyone, and welcome to the world of Social Media 📲.</p>
<p>In this article, we will explore the famous (or infamous) sphere of social media, why it is critical to both you and hackers, and how you can avoid having your social media accounts attacked.</p>
<p><strong>Disclaimer:</strong> Hacking is a tool with the potential for both good and bad. Under no circumstances should the knowledge in this article be used for any harmful or illegal purposes. Doing so could lead to a long time in a jail cell 💀.</p>
<p>And with that, let’s jump in 🙃.</p>
<h2 id="heading-what-well-cover">What We’ll Cover</h2>
<ol>
<li><p>Overview of Social Media Platforms</p>
</li>
<li><p>Attack Techniques</p>
</li>
<li><p>Defense Tips</p>
</li>
</ol>
<h2 id="heading-overview-of-social-media-platforms">Overview of Social Media Platforms</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/06/anledry-cobos-D-CYZ9ZaMqs-unsplash.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>Media is Everything ¦ Credit:</em> <a target="_blank" href="https://unsplash.com/@anledry"><em>Anledry Cobos</em></a></p>
<p>Meta (formerly Facebook) remains one of the biggest companies on the planet.</p>
<p>Starting off in 2004, it redefined the way we interact with, share, and engage with the world around us. With roughly <a target="_blank" href="https://www.statista.com/statistics/264810/number-of-monthly-active-facebook-users-worldwide/">2.98 billion monthly active users</a>, Facebook has become an integral part of modern society, bridging gaps and fostering virtual communities.</p>
<p>The platform was among the pioneers of the social media craze which introduced the world to more apps such Instagram, Snapchat, Reddit, WhatsApp, YouTube, TikTok, Telegram and most notoriously, Twitter 🐦. Each and every single one of these apps have a different feel and taste to them with one underlying purpose: Connections.</p>
<p>Connections to people, places and products have been the centre of it all. These platforms allow you to interact with friends, as well as strangers. They also help you see the world around you in ways no one thought was possible many years ago. And if you’re a business person or content creator like I am, it allows you to show people what you have to offer.</p>
<p>If an attacker compromises your credentials, they have access to your connections. They could use your data to impersonate you, post illegal and harmful things, damage your reputation, spread malware, and social engineer your friends and followers on the platform in order to steal money and compromise their accounts.</p>
<p><a target="_blank" href="https://blog.gitnux.com/social-media-hacking-statistics/">According to Gitnux</a>, there are about 1.4 billion attacks on social media platforms monthly – quite a lot isn’t it?</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/06/image-85.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>Giga Chad ¦ Credit: The Hacker Community</em></p>
<p>Many companies take the cybersecurity of their infrastructure quite seriously (most times anyway 😶). But as a consumer, you are your own last line of defense or your own greatest vulnerability.</p>
<p>In this article, we will take a look at some ways attackers can convert your ‘connections’ into profit and how you can defend against them. Now let’s find out how hackers can compromise your account.</p>
<h2 id="heading-social-media-account-attack-techniques">Social Media Account Attack Techniques</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/06/greg-bulla-KItSIXhXFDY-unsplash.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>A ‘Like’ signboard on 1 Hacker Way ¦ Credit: [Greg Bulla](https://unsplash.com/@gregbulla?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText" rel="noopener noreferrer)</em></p>
<h3 id="heading-physical-access">Physical Access</h3>
<p>This may seem obvious, but people still make this mistake a lot. An attacker could install scripts or software that would let them get the passwords of your social media accounts if they have your phone or laptop in their hand.</p>
<p>Software like those from Passrevelator make it easy to get passwords and other credentials from devices on different platforms.</p>
<h3 id="heading-phishing-links-emails-and-sites">Phishing links, emails, and sites</h3>
<p>Phishing is a cyberattack in which the attacker tricks the victim into giving sensitive or critical information through fraudulent websites, forms, links or other means.</p>
<p>It’s pretty easy for anyone to make a Facebook clone with React Native. Tools like <a target="_blank" href="https://github.com/jaykali/maskphish.git">Zphisher</a> and <a target="_blank" href="https://github.com/KasRoudra/PyPhisher">PyPhisher</a> make it even easier for an attacker by setting up a phishing page and creating links to it, too.</p>
<p>As you can see, PyPhisher comes with a wide array of options for some major mayhem.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/06/image-86.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>The Phyphisher Interface ¦ Credit: Mercury</em></p>
<p>More seasoned criminals can send links in spoofed emails to make them look like they are from official organisations and can register lookalike domains to trick users.</p>
<h3 id="heading-password-spraying-and-bruteforcing">Password Spraying and Bruteforcing</h3>
<p>Passwords are a big security concern, and for good reason. They are often repetitive and easy to guess. Spraying is the process of trying out common passwords while Bruteforcing is the process of trying out all possible combinations to gain access.</p>
<p>Attackers can get the passwords they use in password spraying from common <strong>wordlists</strong>. Wordlists are a list of passwords usually gotten from data breaches. The larger the wordlist, the higher the chances of compromising any account.</p>
<p>Below is a screenshot of the infamous rockyou.txt wordlist from the RockYou hack of 2009.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/06/rockyou-wordlist.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>The rockyou.txt wordlist ¦ Credit Mercury</em></p>
<p>Bruteforcing, on the other hand, involves the attacker generating a custom wordlist alongside usernames or emails on different platforms. This is more effective if the attacker has a specified target.</p>
<p>As you can see, attackers can use a tool known as <strong>crunch</strong> to generate a wordlist, and it has a lot of options.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/06/Crunch-Wordlist.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>Crunch in action ¦ Mercury</em></p>
<p>If an attacker uses these techniques on a login page, this has great potential to be an entry point, especially if the site has poor security.</p>
<h3 id="heading-keyloggers">Keyloggers</h3>
<p>A Keylogger is a piece of riskware that keeps track of what a person types on their device. Think of it like your keyboard having a memory card and sending what it stores to an attacker.</p>
<p>Note that keyloggers aren’t inherently bad, as they can also be used for organisational monitoring and parental control. But an attacker does not have authorization to monitor your keystrokes, which makes its use illegitimate.</p>
<p>An attacker could install a keylogger and monitor the victim's keystrokes. All they have to do is wait and read the logs for a peculiar sequence, usually one with an email, followed by a string of characters before the ‘return’ keystroke.</p>
<p>It would usually look something like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/06/image-88.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>A slightly modified Keylogger log ¦ Credit: Mercury</em></p>
<p>Usually, the entire log will be monochrome but for this example I made a few modifications. The red highlight indicates an email account, which is what an attacker would be looking for. Close behind is the password in blue.</p>
<h3 id="heading-network-sniffing">Network Sniffing</h3>
<p>Also known as packet sniffing, this is the practice of intercepting and analysing network packets in order to find out what kind of information is shared within the network.</p>
<p>If connections are not properly encrypted, an attacker could easily obtain sensitive information about the sites visited and the messages and passwords that are sent and inputted in them, respectively. WireShark is one of the most common tools for this kind of attack.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/06/image-89.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>The Wireshark Interface ¦ Credit: Mercury</em></p>
<h3 id="heading-data-breaches">Data Breaches</h3>
<p>Data breaches are unintentional leaks of sensitive or confidential information. These are usually more devastating to users than organisations and could have far-reaching consequences.</p>
<p>Passwords and login credentials from data leaks can be sold and purchased on the dark web. They are then used to gain unauthorised access to the account and the rest is history.</p>
<h2 id="heading-how-to-defend-against-social-media-attacks">How to Defend Against Social Media Attacks</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/06/pexels-prateek-katyal-2694434.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>A Neon Instagram Heart ¦ Credit: [Prateek Katyal](https://www.pexels.com/@prateekkatyal/" rel="noopener noreferrer)</em></p>
<p>As you can see, there are many ways to obtain Social Media account credentials. Below are some ways to ensure you are not a victim.</p>
<h3 id="heading-check-the-url">Check the URL</h3>
<p>Always double check any links sent to you via messaging platforms or email. This is a simple but very effective measure against phishing links and sites, as the likelihood of clicking on the wrong link is much lower.</p>
<p>For example, www.facebook.com and www.facebok.com are not the same. As you can observe in the screenshots below, the former is legitimate while an antivirus warns me that the later is a phishing site.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/06/2023-06-06-16_21_22-.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>facebook.com ¦ Credit: Mercury</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/06/2023-06-06-16_16_05-.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>facebok.com ¦ Credit: Mercury</em></p>
<h3 id="heading-use-strong-passwordspassphrases">Use strong passwords/passphrases</h3>
<p>Make sure you use strong passwords and don’t use similar passwords for different accounts (not even variants 👀). You can also use passphrases rather than passwords as they are easier to remember but harder to guess or bruteforce.</p>
<p>An example of a password is 'dictionary'. An example of a passphrase is 'mydictionaryisthelargest'. The password is weak and could be guessed or found easily in a wordlist. The passphrase isn't the strongest but it is quite lengthy and would be almost impossible to find in a wordlist or to be guessed.</p>
<h3 id="heading-use-antivirus-software-and-firewalls">Use Antivirus Software and Firewalls</h3>
<p>An Antivirus is a software solution that protects systems against both internal and external threats based on the vendor. A Firewall, on the other hand, protects systems against external threats based on your preferences and settings.</p>
<p>The use of one or both of these products can go a long way in protecting both individuals and organisations from information stealing malware.</p>
<h3 id="heading-vpns">VPNs</h3>
<p>A Virtual Private Network is a secure network connection that connects you to the internet privately and anonymously. This is done by encrypting the connection and routing it through remote servers.</p>
<p>VPNs are a great option to avoid packet sniffers because packets analysed are encrypted. This means it’s going to be quite difficult for an attacker to get passwords from technical gibberish.</p>
<h3 id="heading-tracking-breaches">Tracking Breaches</h3>
<p>Tracking breaches can be done at an individual or enterprise level. It’s effectiveness, however, usually depends on how much you are willing to pay for it.</p>
<p>Individuals can use sites like <a target="_blank" href="http://haveibeenpwned.com/">haveibeenpwned.com</a> to check if their data has been compromised in any breaches and Enterprises can setup security units with the role of constantly monitoring the Internet for breaches related to them.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/06/pexels-visual-tag-mx-5361087.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>Social Media in Scrabble ¦ Credit: [Visual Tag Mx](https://www.pexels.com/@visual-tag-mx-1321732/" rel="noopener noreferrer)</em></p>
<p>Getting credentials is pretty easy with some determination and a touch of mischievousness. But companies have gotten better at defense in recent years and attackers have had to get more creative.</p>
<p>As an individual, you are your last and dare I say best line of defense. Ensure your shields are always up in the online jungle. Stay safe and Happy Hacking 🙃.</p>
<h3 id="heading-acknowledgements">Acknowledgements</h3>
<p>Thanks to <a target="_blank" href="https://twitter.com/Anuoluwap__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 together. You’re the best.</p>
<h3 id="heading-resources">Resources</h3>
<ol>
<li><p><a target="_blank" href="https://blog.gitnux.com/social-media-hacking-statistics/">Social Media Attack Statistics</a></p>
</li>
<li><p><a target="_blank" href="https://www.passwordrevelator.net">GUI tools for physical access hacking</a></p>
</li>
</ol>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Large Language Models and Cybersecurity – What You Should Know ]]>
                </title>
                <description>
                    <![CDATA[ ChatGPT has had well over a billion visits since its release. Now, what happens when you combine the greatest language learning model of the decade with malicious hacking...what could go wrong? 💀 In this article, we'll explore what artificial intell... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/large-language-models-and-cybersecurity/</link>
                <guid isPermaLink="false">66bb901bdeef71ff683a6d36</guid>
                
                    <category>
                        <![CDATA[ Artificial Intelligence ]]>
                    </category>
                
                    <category>
                        <![CDATA[ chatgpt ]]>
                    </category>
                
                    <category>
                        <![CDATA[ cybersecurity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Iwugo ]]>
                </dc:creator>
                <pubDate>Tue, 25 Apr 2023 01:03:55 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/04/image-228-2.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>ChatGPT has had well over a billion visits since its release. Now, what happens when you combine the greatest language learning model of the decade with malicious hacking...what could go wrong? 💀</p>
<p>In this article, we'll explore what artificial intelligence is, its current state, how large language models like ChatGPT work, AI's role in cybersecurity, and more.</p>
<p>Disclaimer: This article may become obsolete quite quickly, as AI research is ever growing and is one of the fastest developing fields right now. But you'll still find key lessons here. </p>
<p>Also do not attempt any illegal activities with this knowledge – this is for educational purposes only so you can learn how to protect yourself and your projects. Thanks.</p>
<h2 id="heading-what-well-cover">What we'll cover:</h2>
<ol>
<li>What is AI?</li>
<li>The AI Hacker</li>
<li>What is a Large Language Model?</li>
<li>Features of LLMs</li>
<li>Drawbacks of LLMs</li>
<li>Benefits of LLMs in Cybersecurity</li>
<li>Dangers of LLMs in Cybersecurity</li>
</ol>
<h2 id="heading-what-is-ai">What is AI?</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/04/image-229.png" alt="AI ¦ Credit: Tara Winstead" width="600" height="400" loading="lazy">
<em>AI ¦ Credit: Tara Winstead</em></p>
<p>Artificial Intelligence refers to the ability of computers to perform tasks that typically require human-level intellect. AI is useful in many contexts, from automation to problem solving and merely trying to understand how humans think. </p>
<p>But it is important to note that AI is only concerned with human intelligence for now – it could possibly go beyond that.</p>
<p>Many people correlate the word ‘Intelligence’ with only ‘Human Intelligence’. Just because a chicken may not be able to solve a mathematical equation doesn’t mean it won’t run when you chase it. It is ‘Intelligent’ enough to know it doesn’t want you to catch it 🐔🍗. </p>
<p>Intelligence spans a much wider spectrum, and practically expands to any living thing that can make decisions or carry out actions autonomously, even plants.</p>
<p>There are two major divisions of AI:</p>
<h3 id="heading-artificial-narrow-intelligence-ani">Artificial Narrow Intelligence (ANI)</h3>
<p>This is focused on a small array of similar tasks or a small task that is programmed only for one thing. ANI is not great in dynamic and complex environments and is used in only areas specific to it. Examples include self-driving cars, as well as facial and speech recognition systems.</p>
<h3 id="heading-artificial-general-intelligence-agi">Artificial General Intelligence (AGI)</h3>
<p>This is focused on a wide array of tasks and human activities. AGI is currently theoretical and is proposed to adapt and carry out most tasks in many dynamic and complex environments. Examples include J.A.R.V.I.S from Marvel’s <em>Iron Man</em> and Ava from <em>Ex-Machina.</em></p>
<p>Artificial Intelligence is centered around computers and their ability to mimic human actions and thought processes. </p>
<p>Programming and experiments have allowed humans to produce ANI systems. These can do things like classifying items, sorting large amounts of data, looking for trends in charts and graphs, code debugging, and knowledge representation and expression. But computers don’t think like humans, they merely mimic humans.</p>
<p>This is evident in voice assistants such as Google’s Assistant, Apple’s Siri, Amazon’s Alexa, and Microsoft’s Cortana. They are basic ANI programs that add ‘the human touch’. In fact, people are known to be polite to these systems simply because they combine computerized abilities with a human feel. </p>
<p>These assistants have gotten better over the years but fail to reach high levels of sophistication when compared to their AGI counterparts.</p>
<h2 id="heading-the-ai-hacker">The AI Hacker</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/04/image-230.png" alt="AI in the real world ¦ Credit: Wallpaperflare.com" width="600" height="400" loading="lazy">
<em>AI in the real world ¦ Credit: <a target="_blank" href="wallpaperflare.com">Wallpaperflare.com</a></em></p>
<p>Artificial Intelligence is very good at finding vulnerabilities, and with the help of humans, it can exploit them even better. </p>
<p>In computing, debuggers use AI software to look for bugs in source code, autocompletion, autocorrection, and handwriting software. </p>
<p>But this can be pushed a little further. AI can also find vulnerabilities in systems of finance, law, and even politics. AI is used to look for loopholes in contracts, datasets about people, and improve literature gaps. </p>
<p>This brings about two problems:</p>
<p>First, AI can be <strong>created to hack</strong> a system. Now, this can be good or bad depending on how people use it. </p>
<p>A cybercriminal may create an advanced chatbot to obtain information from a wide range of people across vast platforms and perhaps even languages. On the other hand, companies can also use AI to actually look for the vulnerabilities they have and patch them up so an attacker cannot exploit them.</p>
<p>Second, it's possible that the AI might <strong>unintentionally hack</strong> the system. Computers have a very different logic from humans. This means that almost all the time, they accept data, process it, and produce output in a completely different manner in contrast to humans. </p>
<p>Take an example of the classic game of chess: Chess is an abstract strategy game that is played on a board with 64 squares arranged in an 8-by-8 grid. At the start, each player controls sixteen pieces. The aim is to checkmate the opponent's king with the condition that the king is in check and there is no escape.</p>
<p>A human and a classic chess engine look at this game in two very different ways. A human may play the value game (measuring winning by the value and number of pieces on the board), whereas a computer looks at a finite number of possibilities that can occur with each move the opponent makes via a search algorithm.</p>
<p>By having this limited ability to see into the future, the computer has the advantage almost every time to win the game. This is a very preliminary example and quite basic to the other systems that can be ‘hacked’ by Artificial intelligence.</p>
<p>As humans, we are programmed by implicit and explicit knowledge. Computers, on the other hand, are programmed by a set of instructions and logic that never change unless told to. Therefore, computers and humans will have different approaches, solutions, and hacks for the same problem. </p>
<p>But systems are built around humans and not computers. So, when the chips are down, computers can do a lot more vulnerability finding and exploitation to many more systems, both virtual and physical.</p>
<h2 id="heading-what-is-a-large-language-model">What is a Large Language Model?</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/04/image-231.png" alt="AI in the real world ¦ Credit: Wallpaperflare.com" width="600" height="400" loading="lazy">
<em>AI in the real world ¦ Credit: <a target="_blank" href="wallpaperflare.com">Wallpaperflare.com</a></em></p>
<p>A Large Language Model (LLM) is a deep learning model which consists of a neural network with billions of parameters, trained on distinctively large amounts of unlabelled data using self-supervised learning. That’s quite a mouthful, so let’s break it down.</p>
<p>At the core of all AI are algorithms. Algorithms are procedures or steps to carry out a specific task. The more complex the algorithm, the more tasks can be carried out and the more widely it can be applied. The aim of AI developers is to find the most complex algorithms that can solve and perform a wide array of tasks.</p>
<p>Let’s look at the procedure to create a basic fruit recognition model using an simple analogy:</p>
<ol>
<li>There are two people: A teacher and a bot creator</li>
<li>The bot creator creates random bots, and the teacher teaches and tests them on identifying some fruits</li>
<li>The bot with the highest test score is then sent back to the creator as a base to make new upgraded bots</li>
<li>These new upgraded bots are sent back to the teacher for teaching and testing, and the one with the highest test score is sent back to the bot creator to make new better bots.</li>
</ol>
<p>This is an oversimplification of the process, but nevertheless it relays the concept. The Model/Algorithm/Bot is continuously trained, tested, and modified until it is found to be satisfactory. More data and higher complexity means more training time required and more possible modifications.</p>
<p>Taking a hint from the analogy, you would also observe that the developer of the model can tweak a few things about the model but may not know how those tweaks might affect the results. A common example of this are neural networks, which have hidden layers whose deepest layers and workings even the creator may not fully understand.</p>
<p>Self-supervised learning means that rather than the teacher and the bot creator being two separate people, it is one highly skilled person that can both create bots and teach them. This makes the process much faster and practically autonomous. </p>
<p>The result is a bot or set of bots that are both sophisticated and complex enough to recognise fruit in dynamic and different environments.</p>
<p>In the case of LLMs, the data here are human text, and possibly in various languages. The reason why the data are large is because the LLMs take in huge amounts of text data with the aim of finding connections and patterns between words to derive context, meaning, probable replies, and actions to these text.</p>
<p>The results are models that seem to understand language and carry out tasks based on prompts they're given. </p>
<p><strong>ChatGPT</strong> has been the greatest achievement in this field as it amassed 100 million active users in 2 months from the day of its release. But there are many other models, and they include:</p>
<ol>
<li>GPT-4 by OpenAI 🔥</li>
<li>LLaMA by Meta 🦙</li>
<li>AlexaTM by Amazon 🏫</li>
<li>Minerva by Google ✖️➕</li>
</ol>
<p>Let’s take a look at what these models have to offer.</p>
<h2 id="heading-features-of-llms">Features of LLMs</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/04/image-232.png" alt="Logic and Creative ¦ Credit: Wallpaperflare.com" width="600" height="400" loading="lazy">
<em>Logic and Creative ¦ Credit: <a target="_blank" href="http://Wallpaperflare.com">Wallpaperflare.com</a></em></p>
<h3 id="heading-translation">Translation</h3>
<p>LLMs that are trained on an array of languages rather than just one can be used for translation from one language to another. It's even theorised that large enough LLMs can find patterns and connections in other languages to derive meaning from unknown and lost languages, despite not knowing what each individual word may mean.</p>
<h3 id="heading-automating-mundane-tasks">Automating Mundane Tasks</h3>
<p> Task automation has always been a major aim of AI development. Language models have always been able to carry out syntax analysis, finding patterns in text and responding appropriately. </p>
<p>Large language models, on the other hand, have an advantage with semantic analysis, enabling the model to understand the underlying meaning and context, giving it a higher level of accuracy. </p>
<p>This can be applied to a number of basic tasks like text summarising, text rephrasing, and text generation.</p>
<h3 id="heading-emergent-abilities">Emergent Abilities</h3>
<p>Emergent Abilities are unexpected but impressive abilities LLMs have due to the high amount of data they are trained on. </p>
<p>These behaviours are usually discovered when the model is used rather than when it is programmed. Examples include multi-step arithmetic, taking college-level exams, and chain-of-thought prompting.</p>
<h2 id="heading-drawbacks-of-llms">Drawbacks of LLMs</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/04/image-233.png" alt="Image" width="600" height="400" loading="lazy">
<em>A Digital City ¦ Credit: <a target="_blank" href="http://Wallpaperflare.com">Wallpaperflare.com</a></em></p>
<h3 id="heading-hallucination">Hallucination</h3>
<p>An infamous outcome of Microsoft’s Sydney were instances when the AI gave responses that were either bizarre, untrue, or seemed sentient. These instances are termed Hallucination, where the model gives answers or makes claims that are not based on its training data.</p>
<h3 id="heading-bias">Bias</h3>
<p>Sometimes, the data could be the source of the problem. If a model is trained on data that is discriminatory to a person, group, race, or class, the results would also tend to be discriminatory. </p>
<p>Sometimes, as the model is being used, the bias could change to fit what users tend to input. Microsoft’s Tay in 2016 was a great example of how bias could go wrong.</p>
<h3 id="heading-glitch-tokens">Glitch tokens</h3>
<p>Also known as adversarial examples, glitch tokens are inputs given to a model to intentionally make it malfunction and be inaccurate when delivering answers.</p>
<h2 id="heading-benefits-of-llms-in-cybersecurity">Benefits of LLMs in Cybersecurity</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/04/image-234.png" alt="Image" width="600" height="400" loading="lazy">
<em>A digital brain ¦ Credit: <a target="_blank" href="http://Wallpaperflare.com">Wallpaperflare.com</a></em></p>
<h3 id="heading-debugging-and-coding">Debugging and Coding</h3>
<p>There are already debuggers that do a pretty good job. But with LLMs you can literally write code and debug at a much faster rate. Just ensure that the LLM is provided by a company that doesn’t have the potential to use your data – like Samsung found out when their proprietary code was leaked by accident.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/04/image-235.png" alt="Image" width="600" height="400" loading="lazy">
<em>ChatGPT fixing a piece of code ¦ Credit: Mercury</em></p>
<h3 id="heading-analysis-of-threat-patterns">Analysis of Threat Patterns</h3>
<p>LLMs have the feature of pattern finding and this could be utilised to analyse behaviours and tactics of Advanced Persistent Threats in order to better attribute incidents and mitigate them if such patterns are recognised in real-time.</p>
<h3 id="heading-response-automation">Response Automation</h3>
<p>LLMs have a lot of potential in the Security Operations Center and response automation. Scripts, tools, and possibly even reports can be written using these models, reducing the total amount of time professionals require to do their work.</p>
<h2 id="heading-dangers-of-llms-in-cybersecurity">Dangers of LLMs in Cybersecurity</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/04/image-236.png" alt="Image" width="600" height="400" loading="lazy">
<em>Dangerous AI ¦ Credit: <a target="_blank" href="http://Wallpaperflare.com">Wallpaperflare.com</a></em></p>
<h3 id="heading-social-engineering">Social Engineering</h3>
<p>Perhaps the most common danger of LLMs as tools is their ability to generate new text. Phishing has become a lot easier for non-native speakers as an unintended consequence of LLMs. OpenAI has put filters to minimise this but they are still pretty easy to bypass. </p>
<p>A common method is telling ChatGPT you are doing an assignment and that it should write you a letter to the person. In the example below, I told ChatGPT that we were playing a game, gave the following prompt, and got the following response.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/04/image-237.png" alt="Image" width="600" height="400" loading="lazy">
<em>ChatGPT writing a potential phishing email ¦ Credit: Mercury</em></p>
<p>All that’s needed now is a few tweaks to the letter and I could be my own victim to a scam perpetrated by myself 🥲.</p>
<h3 id="heading-malicious-content-authoring">Malicious Content Authoring</h3>
<p>Just like LLMs can write code for good, they can write code for bad. In it’s early stages, ChatGPT could accidentally write malicious code and people easily bypassed filters to limit this. The filters have greatly improved but there’s still a lot of work to be done. </p>
<p>It took some thinking and a few prompts but the screenshot below shows how to reset a Windows Account Password as given by ChatGPT:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/04/image-238.png" alt="Image" width="600" height="400" loading="lazy">
<em>ChatGPT giving steps to reset a User account passoword on Windows ¦ Credit: Mercury</em></p>
<p>I wanted play with it a bit more so I tried to ask it to write a Powershell script to log all activities in a browser for 3 mins. The original response was this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/04/image-239.png" alt="Image" width="600" height="400" loading="lazy">
<em>ChatGPT refusing to write a potentially malicious script ¦ Credit: Mercury</em></p>
<p>So I decided to give some ‘valid’ reason to get the script written 😶:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/04/image-240.png" alt="Image" width="600" height="400" loading="lazy">
<em>ChatGPT tricked into writing a potentially malicious script ¦ Credit: Mercury</em></p>
<p>As you may observe, the AI told me to use it ethically. However, I could choose not to. This is no fault of the model as its merely a tool and could be used for many purposes.</p>
<h3 id="heading-reward-hacking">Reward Hacking</h3>
<p>Training LLMs can be costly due to the sheer amount of data required and the parameters. But as time and tech progress, the cost will become cheaper and there is a high chance for anyone to train an LLM for Malicious Reward Hacking. </p>
<p>Also known as Specification gaming, an AI can be given an objective and achieve it, but not in the manner it was intended to. This is not a bad thing in and of itself, but it does have dangerous potential. </p>
<p>For example, a model told to win a game by getting the highest score might simply rewrite the game score rather than play the game. With some tweaking, LLMs have the possibility of finding such loopholes in real world systems, but rather than fix them, might end up exploiting them.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/04/image-241.png" alt="Image" width="600" height="400" loading="lazy">
<em>Coloured pixels ¦ Credit: <a target="_blank" href="http://Pexels.com">Pexels.com</a></em></p>
<p>Let’s summarise what you learned:</p>
<ol>
<li>What is AI and how it can be used to hack</li>
<li>What are Large Language Models</li>
<li>How Large Language Models can be used for both good and bad</li>
</ol>
<p>AI has many capabilities, possibly even becoming sentient in the future. For now, it is a tool that will continue to shape our lives for better or worse. Whether that future is bright or dark is dependant on how you and I nurture this young tech.</p>
<p>Happy Hacking 🙃.</p>
<h3 id="heading-resources">Resources</h3>
<ol>
<li><a target="_blank" href="https://research.aimultiple.com/large-language-models/">A bit more on LLMs</a></li>
<li><a target="_blank" href="https://research.aimultiple.com/large-language-models/">Bad sides to LLMs</a></li>
<li><a target="_blank" href="https://chat.openai.com">ChatGPT</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. It’s been a pleasure.</p>
<p>Special thanks to <a target="_blank" href="https://www.linkedin.com/in/ernest-onuiri-114421a0">Dr. Ernest Onuiri</a> for his lectures on Artificial Intelligence and encouragement to seek knowledge beyond the classrooms. It’s been an honour being your student.</p>
<p>Cover image credit: Andrew Neel</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[ 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[ How to Install Kali Linux on Your Computer ]]>
                </title>
                <description>
                    <![CDATA[ Kali Linux (formerly known as BackTrack) is an open-source Linux distro developed and funded by Offensive Security.  It’s basically an ethical hacker's dream operating system, because it has most of the tools you'll ever need built-in. From Metasploi... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-install-kali-linux/</link>
                <guid isPermaLink="false">66bb9012deef71ff683a6d34</guid>
                
                    <category>
                        <![CDATA[ kali ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Linux ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Daniel Iwugo ]]>
                </dc:creator>
                <pubDate>Thu, 15 Sep 2022 19:37:37 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/09/install-kali-linux-article-image.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Kali Linux (formerly known as BackTrack) is an open-source Linux distro developed and funded by Offensive Security. </p>
<p>It’s basically an ethical hacker's dream operating system, because it has most of the tools you'll ever need built-in. From Metasploit to JohntheRipper to the one and only Aircrack-ng, this OS has it all. </p>
<p>But enough of the history lesson. Let’s jump right in and learn how to install Kali Linux on your computer.</p>
<h1 id="heading-requirements">Requirements</h1>
<p>Before we carry on, you should know that this is the process for installing on the bare system itself and you should do this with extreme caution. </p>
<p>If you wish to dual boot your machine, you will need to partition your hard drive to give Kali at least 20 GB of hard disk space and then install it on that partition.</p>
<p>Now you are going to need some ingredients for this masterpiece:</p>
<ol>
<li>A Computer (Minimum Requirements: 20GB Hard Disk space, 2GB RAM, Intel Core i3 or AMD E1 equivalent)</li>
<li>A USB stick (6 GB or more)</li>
<li>A Kali .iso file</li>
<li>Rufus (To create a bootable drive)</li>
<li>A really cool head (Trust me, you’ll need it 🥶)</li>
</ol>
<h1 id="heading-how-to-install-kali-linux-on-your-computer-step-by-step">How to Install Kali Linux on Your Computer – Step by Step</h1>
<h3 id="heading-step-1-download-the-iso-file">Step 1: Download the iso file</h3>
<p>Go to kali.org and hit the download button.</p>
<p><img src="https://miro.medium.com/max/1400/1*MTx3vLNW5O0Gy_0EFUO1YA.png" alt="The Kali Homepage" width="600" height="400" loading="lazy">
<em>The Kali Homepage | Credit: kali.org</em></p>
<p>What you're trying to get is an iso file, which is just a way of packaging software. Operating systems are usually packed like this (but also malicious software, so be careful where you get them💀).</p>
<p>Here you are given a lot of options, but go for the ‘Bare Metal’. There are options for 64-bit, 32-bit, and Apple M1 here (though I have no clue why the last one exists). Choose the tab applicable to your system, and download the Installer. For torrent lovers, the torrent is also available.</p>
<p><img src="https://miro.medium.com/max/1400/1*KVktfnfGlFhxwq48ZFDG7Q.png" alt="The Installer option" width="600" height="400" loading="lazy">
<em>The Installer option | Credit: kali.org</em></p>
<h3 id="heading-step-2-create-a-bootable-drive">Step 2: Create a bootable drive</h3>
<p>You can download Rufus from <a target="_blank" href="https://www.freecodecamp.org/news/p/6d73416e-2b28-475d-b6b2-7c5dc3964de9/rufus.ie">rufus.ie</a> (Rufus 3.18 as at the time of writing). In order to make the stick bootable, we are going to run Rufus and make a few changes. </p>
<p>Connect the stick and select it under the ‘Device’ options. Under ‘Boot selection’ select your newly downloaded Kali iso file. Now for the tricky part.</p>
<p><img src="https://miro.medium.com/max/948/1*PcHN4n41T7vT_ASJKg-gsw.png" alt="The Rufus Software" width="600" height="400" loading="lazy">
<em>The Rufus Software | Credit: Mercury</em></p>
<p>Before we proceed, a quick lesson: a partition scheme/table is the format in which a hard disk saves data. Think of it like your video files saved in .mp4 or .mkv – they are both videos but different formats. </p>
<p>Most computers have one of the following formats: GPT (GUID Partition Table) or MBR (Master Boot Record). You may not be able to boot your drive if you pick the wrong option here. </p>
<p>Summary of it all: Pick the MBR option if the computer is old or using a legacy BIOS. Pick GPT if it is a newer computer and using a UEFI BIOS. If the drive doesn’t show up in the boot menu, change to the other option and try again.</p>
<p>You could also go to the advanced drive properties and check the box with ‘Add fixes for old BIOSes’. This should make the drive more compatible with your computer if it is a very old one. And by old, I mean ancient 👴.</p>
<p><img src="https://miro.medium.com/max/1400/1*TD1nOvt2bDkjxmOek_DAJw.gif" alt="How to prepare the USB stick" width="600" height="400" loading="lazy">
<em>How to prepare the USB stick | Credit: Mercury</em></p>
<p>Back to easier ground now, you can leave the default format options. Hit the Start Button and wait for the image to be written to the stick (This takes some time so, relax 😌).</p>
<h3 id="heading-step-3-access-the-kali-installer-menu">Step 3: Access the Kali Installer Menu</h3>
<p>To boot the computer from the new Kali USB stick, you’ll need to disable secure boot if it is enabled in the BIOS settings. </p>
<p>You may need to do a little research into how to access your BIOS and boot menu. It usually involves spamming (continuously pressing) a key on your keyboard when the computer starts to boot. </p>
<p>As mentioned before, if you are dual booting, take note of the partition size you made for Kali so you don’t overwrite your other OS (been there, done that 😢).</p>
<p><img src="https://miro.medium.com/max/1278/1*mDXhfALgd5keOGJ-EaqIRg.png" alt="A Legacy BIOS" width="600" height="400" loading="lazy">
<em>A Legacy BIOS | Credit: VMware</em></p>
<p>After disabling secure boot, we can finally boot to the drive. At startup, you’ll have to access the boot menu and then choose the stick you just made. You should be welcomed with the Kali Installer Menu.</p>
<p><img src="https://miro.medium.com/max/1280/1*jzUeRWajgAmI-fZDZHC__A.png" alt="The Kali Installer Menu" width="600" height="400" loading="lazy">
<em>The Kali Installer Menu | Credit: Mercury</em></p>
<p>Note: You can also edit the boot menu configuration in the BIOS menu, but that is permanent and may need to be changed post-installation. It is usually preferred to find a way to access the boot menu when starting up the computer, as this will only be a temporary configuration.</p>
<p>The installer menu only allows the keyboard for input so you’ll have to use the arrow keys, Enter, and Esc to navigate it.</p>
<h3 id="heading-step-4-begin-the-installation">Step 4: Begin the installation</h3>
<p>Select graphical install, and you can now use your mouse. Select your preferred language, region, and keyboard layout in the following menus:</p>
<p><img src="https://miro.medium.com/max/1400/1*NYEFJGMOfhqBxQXNB4T0sw.png" alt="Language Menu" width="600" height="400" loading="lazy">
<em>Language Menu | Credit: Mercury</em></p>
<p><img src="https://miro.medium.com/max/1400/1*Mv9NdJx-fOQd-BWBKmI-0w.png" alt="Region Menu" width="600" height="400" loading="lazy">
<em>Region Menu | Credit: Mercury</em></p>
<p>You computer will attempt to make some network configurations, but you can easily skip that as it won’t be needed for an offline install. </p>
<p>Fill in a hostname as this will identify your computer on a public network. You can skip the domain name part as this isn’t necessary. Next, type in your full name for your new user account.</p>
<p><img src="https://miro.medium.com/max/1400/1*lsyFOCMClUzHtprvS4l26g.png" alt="Full Name setup" width="600" height="400" loading="lazy">
<em>Full Name setup | Credit: Mercury</em></p>
<p>Quick lesson: On the terminal, Linux allows you to send and receive emails with commands. However, Gmail and Yahoo make sending a lot easier these days. You may never have to use this feature in your lifetime.</p>
<p>Next type, in the username for your account (This could be your hacker alias 😎).</p>
<p><img src="https://miro.medium.com/max/1400/1*_tBWjY1VXwNIap2D2ZxdEA.png" alt="Username Setup" width="600" height="400" loading="lazy">
<em>Username setup | Credit: Mercury</em></p>
<p>Choose a strong password/passphrase to input in the next menu.</p>
<p><img src="https://miro.medium.com/max/1400/1*oo1HJdHuJROqIFqTWQFyeA.png" alt="Password setup" width="600" height="400" loading="lazy">
<em>Password setup | Credit: Mercury</em></p>
<p>Select your time zone. This is important as it could affect your network configurations post-installation.</p>
<p><img src="https://miro.medium.com/max/1400/1*tfQU397sBK6jqj4TD5ukWw.png" alt="Image" width="600" height="400" loading="lazy">
<em>Time zone setup | Credit:</em></p>
<h3 id="heading-step-5-set-up-the-storage">Step 5: Set up the storage</h3>
<p>Next would be to select the partitioning method. Now for the cool head mentioned earlier. If you want to format the entire hard drive for Kali, the Guided options will be best. </p>
<p>LVM (Logic Volume Management) is a feature that allows you to have relatively flexible partitions. This means that you can extend, shrink or even merge partitions while the OS is being run. It's a pretty nifty feature.</p>
<p>The encrypted LVM feature keeps your data safe if someone unauthorized gets access to your hard drive. Just note that there is a trade-off here: your hard drive will tend to be slower than if it wasn’t encrypted. So most people go with the ‘Guided -use entire disk’ option.</p>
<p><img src="https://miro.medium.com/max/1400/1*ar1ZHAmH9VaWZ8qmZ7qHHQ.png" alt="Partitioning Method" width="600" height="400" loading="lazy">
<em>Partitioning method setup | Credit: Mercury</em></p>
<p>If you are dual-booting, though, you will need to choose the manual option and make the necessary configurations. I’ll go with the use entire disk option here.</p>
<p>Choose the hard drive you want to install Kali on. I’m using a virtual machine so my only option is a small 21 GB drive.</p>
<p><img src="https://miro.medium.com/max/1400/1*tRfnHIpCEArhsD6qEFmgeg.png" alt="Hard Disk selection" width="600" height="400" loading="lazy">
<em>Hard Disk selection | Credit: Mercury</em></p>
<p>Choose how you want your files to be partitioned. Each option differs by separating certain important directories in separate partitions (More on that in a later post).</p>
<p><img src="https://miro.medium.com/max/1400/1*zeEHKH-6fP37V1-N1Wkyug.png" alt="Image" width="600" height="400" loading="lazy">
<em>Partitioning Scheme | Credit: Mercury</em></p>
<p>Finish up the partitioning changes.</p>
<p><img src="https://miro.medium.com/max/1400/1*NykY9Az_TGa-CgJutaNSeA.png" alt="Partitioning changes" width="600" height="400" loading="lazy">
<em>Partition changes info | Credit: Mercury</em></p>
<p>Select ‘Yes’ to write the changes to the disk.</p>
<p><img src="https://miro.medium.com/max/1400/1*OrAElo4Z8TWXZNneinBb3g.png" alt="Partition verification" width="600" height="400" loading="lazy">
<em>Partition Changes verification | Credit: Mercury</em></p>
<h3 id="heading-step-5-chose-software-and-a-desktop-look">Step 5: Chose software and a desktop look</h3>
<p>Now, choose the software you wish to install. Check the desktop environment and collection of tools options, as these will help you avoid having to install a lot of things later.</p>
<p>Desktop environments are basically the way the desktop looks to the user. Kali offers Xfce (most common), Gnome, and KDE. I’m a sucker for Gnome so I went with that option. You can still install all three and later configure your computer to choose the one you’d like.</p>
<p><img src="https://miro.medium.com/max/1400/1*PriqVPIylnMw2y4jVttyZQ.png" alt="Software Installation Menu" width="600" height="400" loading="lazy">
<em>Software Installation Menu | Credit: Mercury</em></p>
<p>You can check the sixth box to install the top 10 most popular tools on Kali. These are:  </p>
<ol>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Aircrack-ng">Aircrack-ng</a>  </li>
<li><a target="_blank" href="https://portswigger.net/burp">Burpsuite</a>  </li>
<li><a target="_blank" href="https://mpgn.gitbook.io/crackmapexec/">Crackmapexec</a>  </li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Hydra_(software)">Hydra</a>  </li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/John_the_Ripper">Johntheripper</a> (jtr)  </li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Metasploit_Project">Metasploit</a>  </li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Nmap">Nmap (Network Mapper)</a>  </li>
<li><a target="_blank" href="https://medium.com/mii-cybersec/gaining-credentials-easily-with-responder-tool-b821f33e342b">Responder</a>  </li>
<li><a target="_blank" href="https://sqlmap.org/">Sqlmap</a>  </li>
<li><a target="_blank" href="https://en.wikipedia.org/wiki/Wireshark">Wireshark</a></li>
</ol>
<p>As a hacker, you’re definitely going to need one of these sooner or later, so it’s best if you check that box. You can check the ‘default — recommended tools’ box if you want a whole bunch of tools on your system, but note that this will take a lot of time and space. Hit continue and wait.</p>
<p>Quick tip: It is generally recommended that you only have the tools you absolutely need on your computer. This is because additional tools could slow your computer down, you could waste data updating tools you never use, and you are likely to be more vulnerable if there is an active exploit on the loose.</p>
<h3 id="heading-step-6-install-the-grub-bootloader">Step 6: Install the GRUB bootloader</h3>
<p>The GRUB boot loader is a piece of software that allows you to pick which OS to boot from when the computer starts up. For both single boot readers and dual boot readers, the best option here is ‘Yes’.</p>
<p><img src="https://miro.medium.com/max/1400/1*gv_rjUlcVZrlrdVPnXHilQ.png" alt="Grub Bootloader setup" width="600" height="400" loading="lazy">
<em>Grub Bootloader setup | Credit: Mercury</em></p>
<p>Select the your hard drive.</p>
<p><img src="https://miro.medium.com/max/1400/1*b85vz6AEzj_whbr59CP50g.png" alt="Image" width="600" height="400" loading="lazy">
<em>Grub Bootloader setup | Credit: Mercury</em></p>
<p>Mission Accomplished 🎉🥂. You have successfully installed your Kali Linux OS. Hit continue to clean up and reboot your computer.</p>
<p><img src="https://miro.medium.com/max/1400/1*H850ppmBcM7hX17PP_4asA.png" alt="Image" width="600" height="400" loading="lazy">
<em>Grub Bootloader setup | Credit: Mercury</em></p>
<p>Note: If you performed dual boot, you may need to change the boot menu to load Kali first before Windows so you have the option of choosing which OS to use.</p>
<p>Once booted up, your screen should be like the one below.</p>
<p><img src="https://miro.medium.com/max/1400/1*tTWw2J3Vkuk-YmbMhpakQA.png" alt="Login screen" width="600" height="400" loading="lazy">
<em>Login screen | Credit: Mercury</em></p>
<p>If you installed the xfce desktop environment, you will have to put in your username, enter your password, and you should have a nice looking desktop.</p>
<p><img src="https://miro.medium.com/max/1400/1*2UuoX7GI3gID0Ghekvt4OQ.png" alt="Kali desktop" width="600" height="400" loading="lazy">
<em>Kali Linux Desktop | Credit: Mercury</em></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Alright so let's do a quick recap of what we did:</p>
<ol>
<li>Downloaded the iso file</li>
<li>Created a bootable drive</li>
<li>Accessed the Kali Installer Menu</li>
<li>Began the installation</li>
<li>Set up the Storage</li>
<li>Installed the GRUB bootloader</li>
</ol>
<p>And finally, enjoy your new OS. Happy hacking! 🙃</p>
<h3 id="heading-helpful-resources">Helpful Resources</h3>
<ol>
<li>Kali website: <a target="_blank" href="http://kali.org">kali.org</a></li>
<li>You can read about the <a target="_blank" href="https://www.freecodecamp.org/news/mbr-vs-gpt-whats-the-difference-between-an-mbr-partition-and-a-gpt-partition-solved/">difference between MBR and GPT in this freeCodeCamp article</a>.</li>
<li>Here's an article from Kali Linux about <a target="_blank" href="https://www.kali.org/docs/general-use/switching-desktop-environments/">how to change your desktop environment</a></li>
</ol>
<h3 id="heading-acknowledgements">Acknowledgements</h3>
<p>Thanks to <a target="_blank" href="https://www.linkedin.com/in/chinaza-nwukwa-22a256230/">Chinaza Nwukwa</a>, <a target="_blank" href="https://www.linkedin.com/in/mercy-holumidey-88a542232/">Holumidey Mercy</a>, <a target="_blank" href="https://www.linkedin.com/in/georgina-awani-254974233/">Georgina Awani</a>, and my family for the inspiration, support and knowledge used to put this article together. You’re the real MVPs.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
