<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lakindu Mansara</title>
    <description>The latest articles on DEV Community by Lakindu Mansara (@lakindu_mansara).</description>
    <link>https://dev.to/lakindu_mansara</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4026322%2Fe1562d6c-5d19-4f92-a924-00d0c1bb928c.png</url>
      <title>DEV Community: Lakindu Mansara</title>
      <link>https://dev.to/lakindu_mansara</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lakindu_mansara"/>
    <language>en</language>
    <item>
      <title>OverTheWire Bandit Level 13 to Level 15 Walk-through</title>
      <dc:creator>Lakindu Mansara</dc:creator>
      <pubDate>Tue, 14 Jul 2026 11:12:11 +0000</pubDate>
      <link>https://dev.to/lakindu_mansara/overthewire-bandit-level-13-to-level-15-walk-through-4lk0</link>
      <guid>https://dev.to/lakindu_mansara/overthewire-bandit-level-13-to-level-15-walk-through-4lk0</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this part of my OverTheWire Bandit journey, I solved Level 13 and Level 14. These levels introduced two important cybersecurity concepts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using SSH keys for authentication&lt;/li&gt;
&lt;li&gt;Connecting to services using network tools&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Bandit Level 13 → Level 14
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Objective
&lt;/h3&gt;

&lt;p&gt;The password for the next level is stored in a file called sshkey.private.&lt;/p&gt;

&lt;p&gt;Unlike previous levels, this time we are not given a password. Instead, we receive a private SSH key that can be used to log into the next account.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Check the Files
&lt;/h3&gt;

&lt;p&gt;After connecting to the Bandit server, always check files in your current directory. It always help a lot to me.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F98cwo5n40bc2ivzxdgsa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F98cwo5n40bc2ivzxdgsa.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Interesting!&lt;br&gt;
In here, we have a file, named &lt;strong&gt;sshkey.private&lt;/strong&gt;.&lt;br&gt;
To see the content of that file, I used the &lt;code&gt;cat&lt;/code&gt; command.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 2: Copy the File
&lt;/h3&gt;

&lt;p&gt;As the result showed, it is a private SSH key. Then i logout from the bandit server and used &lt;code&gt;scp&lt;/code&gt; command to copy the ssh key file to my local machine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;scp &lt;span class="nt"&gt;-P&lt;/span&gt; 2220 bandit13@bandit.labs.overthewire.org:~/sshkey.private &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-P&lt;/code&gt; = Used to mention the port&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;bandit13@bandit.labs.overthewire.org&lt;/code&gt; = [user]@[host]&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;~/sshkey.private&lt;/code&gt; = Used to mention the location of the file I want to copy&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.&lt;/code&gt; = Used to copy that file to my current directory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then enter the password, which is you owned from the previous level.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fowlxd6ffllc5zlpvnny2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fowlxd6ffllc5zlpvnny2.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Theory
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;scp&lt;/code&gt; stands for "Secure Copy Protocol". In Linux it is a command-line utility used to securely copy files and directories between different hosts over a network. Use &lt;code&gt;man scp&lt;/code&gt; command for more details.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcmbn8j683kcfzivg2xev.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcmbn8j683kcfzivg2xev.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Successfully copied!&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Login to the Next Level
&lt;/h3&gt;

&lt;p&gt;I used &lt;code&gt;ssh -i&lt;/code&gt; command for this. Since I have the SSH private key. I tried to login to the bandit14 host server using it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ssh"&gt;&lt;code&gt;&lt;span class="k"&gt;ssh&lt;/span&gt; -i ~/sshkey.private bandit14@bandit.labs.overthewire.org -p &lt;span class="m"&gt;2220&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-i&lt;/code&gt; = Identity file path&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;~/sshkey.private&lt;/code&gt; = File path&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;bandit14@bandit.labs.overthewire.org&lt;/code&gt; = [user]@[Host]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feh1xk6glogfaweif2ses.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feh1xk6glogfaweif2ses.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unexpected error!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Sometimes things do not work the way we think they will. A command that seems correct may give an unexpected error, and that is part of the learning process.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It says the private key is unprotected. So, I channge the file mode using &lt;code&gt;chmod&lt;/code&gt; command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;600 ~/sshkey.private
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I used the 600 for the numeric number, also you can use 400 for this I guess!&lt;/p&gt;

&lt;h2&gt;
  
  
  Theory
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhmsogpnul7plg2hv6af2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhmsogpnul7plg2hv6af2.png" alt=" " width="346" height="305"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After changing the mode of my file, I retried to login.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn9sb2yohuly0z7ohca8j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn9sb2yohuly0z7ohca8j.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Mission successful!&lt;/p&gt;

&lt;h1&gt;
  
  
  Bandit Level 14 → Level 15
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Objective
&lt;/h3&gt;

&lt;p&gt;The password for Bandit Level 15 is obtained by connecting to a service&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;running on: local host&lt;/li&gt;
&lt;li&gt;on port: 30000&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 1: Get the Password of the Previous Level
&lt;/h3&gt;

&lt;p&gt;As always I checked for any files.&lt;br&gt;
Next I directly read the password using &lt;code&gt;cat&lt;/code&gt; command and the location which is mentioned in the previous level.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /etc/bandit_pass/bandit14
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Connect to the Service
&lt;/h3&gt;

&lt;p&gt;At this level, I needed to connect to a service that running on port 30000 and send the current password to it. I needed a tool that could create a direct connection to a specific port, and this is where Netcat (&lt;code&gt;nc&lt;/code&gt;) became useful. &lt;strong&gt;Netcat allows us to communicate with network services by opening a TCP connection&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A normal command like &lt;code&gt;ssh&lt;/code&gt; is not suitable because we are not trying to log into another account. We are simply sending data to a service.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nc bandit.labs.overthewire.org 30000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;nc&lt;/code&gt; = Netcat&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;bandit.labs.overthewire.org&lt;/code&gt; = Host&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;30000&lt;/code&gt; = Port&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 3: Send the current password
&lt;/h3&gt;

&lt;p&gt;After pressing Enter there is only blank.&lt;br&gt;
In that blank you have to enter the password we found and then press the Enter.&lt;/p&gt;

&lt;p&gt;Congratulations!&lt;br&gt;
You Found the flag and completed the level with lots of new knowledge.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Completing these levels helped me understand more about SSH authentication, private keys, and network communication using Netcat. More importantly, I learned that cybersecurity is not only about finding the correct answer — it is about exploring, making mistakes, troubleshooting, and improving step by step.&lt;/p&gt;

&lt;p&gt;I am still a beginner in cybersecurity, and this blog is a place where I document my learning journey. I am sharing what I learn, the challenges I face, and the knowledge I gain along the way. Every level is a small step toward becoming better.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I have no special talents. I am only passionately curious."&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Albert Einstein -&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Curiosity is what keeps me learning, experimenting, and continuing this journey.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>programming</category>
      <category>learning</category>
      <category>linux</category>
    </item>
    <item>
      <title>OverTheWire Bandit Level 12 to Level 13: From Hex Dump to Password!</title>
      <dc:creator>Lakindu Mansara</dc:creator>
      <pubDate>Mon, 13 Jul 2026 10:42:29 +0000</pubDate>
      <link>https://dev.to/lakindu_mansara/overthewire-bandit-level-12-to-level-13-from-hex-dump-to-password-1pm2</link>
      <guid>https://dev.to/lakindu_mansara/overthewire-bandit-level-12-to-level-13-from-hex-dump-to-password-1pm2</guid>
      <description>&lt;p&gt;Welcome back to my &lt;strong&gt;OverTheWire Bandit&lt;/strong&gt; series! In the previous article, we solved &lt;strong&gt;Bandit Level 0 → Level 12&lt;/strong&gt;, where we learned lots of techniques in Linux.&lt;/p&gt;

&lt;p&gt;In this article, we'll tackle &lt;strong&gt;Bandit Level 12 → Level 13&lt;/strong&gt;, one of the most engaging levels in the Bandit wargame. This challenge introduces us to &lt;strong&gt;hex dumps&lt;/strong&gt;, file identification, and extracting data from multiple layers of compressed archives using essential Linux command-line tools. Instead of relying on guesses, we'll learn how to analyze files methodically and uncover the password step by step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A little note before we begin&lt;/strong&gt;: I am also a beginner who is learning Linux and cybersecurity step by step. This walk-through is based on my own learning experience while solving the OverTheWire Bandit challenges.&lt;/p&gt;

&lt;p&gt;I am documenting my journey to help other beginners who are starting from the same point. If you are also new to Linux, command-line tools, or cybersecurity, I hope my explanations make these challenges easier to understand.&lt;/p&gt;

&lt;p&gt;Let's learn and improve together!&lt;/p&gt;

&lt;p&gt;First things first, login to the bandit server using:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ssh bandit12@bandit.labs.overthewire.org -p 2220&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;and previous level flag as the password.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: List the Files
&lt;/h2&gt;

&lt;p&gt;After logging in to the Bandit server, I always start by listing the files in the current directory using &lt;code&gt;ls&lt;/code&gt; command. This simple habit helps me understand what files are available and where I should begin.&lt;/p&gt;

&lt;p&gt;In here, there is a single file named &lt;strong&gt;data.txt&lt;/strong&gt;. This file contains the challenge data that we'll work with throughout this level. I tried to read the file using &lt;code&gt;cat&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpzbghc3ibk93uchp9wmv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpzbghc3ibk93uchp9wmv.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, this file is a hex dump of another file.&lt;br&gt;
This means we have to work with this file many times.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Create a Temporary Directory
&lt;/h2&gt;

&lt;p&gt;Since we will be modifying and extracting the file multiple times, it is better to work inside a temporary directory. Linux provides the &lt;code&gt;mktemp&lt;/code&gt; command for creating temporary files and directories safely.&lt;/p&gt;

&lt;p&gt;In this case I created a temporary directory using:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;mktemp -d&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;and change current directory to that temporary directory.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cd {directory}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feoz0kcgl3oh5brujeayo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feoz0kcgl3oh5brujeayo.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Copy the Original File
&lt;/h2&gt;

&lt;p&gt;I created a copy of the original file in this directory.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cp ~/data.txt .&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In here the '&lt;strong&gt;.&lt;/strong&gt;' means current directory. So, this means I created a copy of the &lt;strong&gt;data.txt&lt;/strong&gt; file, which is located in root directory, into my current directory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq3ync16iyuoalfv0ihim.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq3ync16iyuoalfv0ihim.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I changed the file name to "&lt;strong&gt;hexdump&lt;/strong&gt;" for better view.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6c536wq7le5ksgbelspb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6c536wq7le5ksgbelspb.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Reversing the Hex Dump File
&lt;/h2&gt;

&lt;p&gt;In this case, we have to use the xxd tool to reverse the hexdump file to its original form (Binary form).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;xxd -r hexdump {new_name}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcfc0eolpqragks97k7ax.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcfc0eolpqragks97k7ax.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see here, there is a new file and it is the original binary form of this file. But it is still compressed!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;xxd&lt;/code&gt; - tool for creating and reading hex dumps.&lt;br&gt;
&lt;code&gt;-r&lt;/code&gt; - reverse the hex dump back into binary.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 5: Decompress the File (gzip)
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo0sxm5vayks5mxkn01lw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo0sxm5vayks5mxkn01lw.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking at the first line, we see that these are the first bytes of the file. Quick google search told me that this is a &lt;strong&gt;gzip compressed file&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F04jbajlk4fjwluimykvb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F04jbajlk4fjwluimykvb.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For decompress this file We have to add the correct ending to the file. In here it is &lt;strong&gt;.gz&lt;/strong&gt;. So, I renamed the file and decompress it using &lt;code&gt;gzip -d&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0cz9ogq68ak1fftfpp1j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0cz9ogq68ak1fftfpp1j.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Decompress the File Again (bzip2)
&lt;/h2&gt;

&lt;p&gt;I read the new hex dump using &lt;code&gt;xxd&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm2xufwiipvn7lydwjl8k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm2xufwiipvn7lydwjl8k.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After searching the first bytes on the google, shows that it is a &lt;strong&gt;bzip version 2 compressed file&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo1hq5bbqi0n9riwuznxv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo1hq5bbqi0n9riwuznxv.png" alt=" " width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Again we have to change the file name with the correct ending to decompress this, in here it is &lt;strong&gt;.bz2&lt;/strong&gt;. For decompressing I used &lt;strong&gt;bzip2 -d&lt;/strong&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo8t9hfholx49vb1qir29.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo8t9hfholx49vb1qir29.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 7: Decompress the File Again (gzip)
&lt;/h2&gt;

&lt;p&gt;This is a tricky one. Because after check the file using &lt;code&gt;xxd&lt;/code&gt;, it shows again this is a &lt;strong&gt;gzip compressed file&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1ylq0z97ld7yb7fn2ndp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1ylq0z97ld7yb7fn2ndp.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Here's the thing. This file is compressed multiple times, not only once. So you have to rename and decompress using correct tool every time until you reach the end point.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fztjl2mixp3vxtyp1047u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fztjl2mixp3vxtyp1047u.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 8: Extract the File
&lt;/h2&gt;

&lt;p&gt;After decompress all the way to the end. I get an &lt;code&gt;tar&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbph0h4ke9vocdt87msk2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbph0h4ke9vocdt87msk2.png" alt=" " width="800" height="593"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Again I renamed the filename to the correct ending form, which is &lt;strong&gt;.tar&lt;/strong&gt; and extract the file using &lt;code&gt;tar -xf&lt;/code&gt; command. After extracting I listed the files using &lt;code&gt;ls&lt;/code&gt; and found a new file called &lt;strong&gt;data5.bin&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3ow2pzk2oi51jpgs63mg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3ow2pzk2oi51jpgs63mg.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then again I read the hex dump using &lt;code&gt;xxd&lt;/code&gt; command and found it is also a &lt;strong&gt;tar&lt;/strong&gt; file. Rename again with &lt;strong&gt;.tar&lt;/strong&gt; and used &lt;code&gt;tar -xf&lt;/code&gt; command to extract it. After extracting, another file named &lt;strong&gt;data6.bin&lt;/strong&gt; appeared.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fveo7tsg24tryf0n6e023.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fveo7tsg24tryf0n6e023.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 9: Decompress the New File (bzip2)
&lt;/h2&gt;

&lt;p&gt;Then I read the hex dump of the new data6.bin file using &lt;code&gt;xxd&lt;/code&gt; command and found that it is a &lt;strong&gt;bzip version 2 compressed file&lt;/strong&gt; again.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F58s4xwijevea4f15muad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F58s4xwijevea4f15muad.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then I renamed the filename to &lt;strong&gt;data6.bz2&lt;/strong&gt; and decompressed it using &lt;code&gt;bzip2 -d&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff29q9gzr19eitkuagrns.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff29q9gzr19eitkuagrns.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then I checked again the hex dump value of the decompressed file and it is a &lt;strong&gt;tar file&lt;/strong&gt; again.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa8ww2f3kwitsy1imd5ki.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa8ww2f3kwitsy1imd5ki.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 10: Extract the File Again
&lt;/h2&gt;

&lt;p&gt;Renamed the filename to &lt;strong&gt;data6.tar&lt;/strong&gt; and extracted it using &lt;code&gt;tar -xf&lt;/code&gt; command. It created a new file named &lt;strong&gt;data8.bin&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1s6q937jbnpuzmlhegkl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1s6q937jbnpuzmlhegkl.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 11: Decompress the New File (gzip)
&lt;/h2&gt;

&lt;p&gt;Again read the hex dumb of the new file and it was a &lt;strong&gt;gzip compressed file&lt;/strong&gt; again. So, I repeated the same method I used before.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6657ycymexfikne5levq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6657ycymexfikne5levq.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 12: Final Step
&lt;/h2&gt;

&lt;p&gt;After decompressing, I read the hex dump of the file again and finally our file is fully decompressed to the end!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcifxqgy2m5mbetr178jz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcifxqgy2m5mbetr178jz.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;cat&lt;/code&gt; command to read the file!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6zmujg1fh9v8paalidtc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6zmujg1fh9v8paalidtc.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;In this level, we learned how to work with a file that was stored as a &lt;strong&gt;hex dump&lt;/strong&gt;. We first created a temporary workspace, copied the file, and then converted the hex dump back into its original binary format using &lt;code&gt;xxd -r&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;After restoring the file, we used first 8 bytes of the hex dump to identify its type and extracted multiple layers of compressed data until we found the password for the next level.&lt;/p&gt;

&lt;p&gt;This challenge helped us understand the importance of analyzing files step by step instead of guessing. We learned how Linux tools like &lt;code&gt;xxd&lt;/code&gt; and different extraction commands can be used together for file analysis.&lt;/p&gt;

&lt;p&gt;This is a walk-through by a real beginner, for beginners. I hope my learning process and explanations help you understand the challenges and improve your own skills. If you find any mistakes or have suggestions for improvement, please let me know. I am still learning, and your feedback helps me grow.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>programming</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>OverTheWire Bandit Walk-through for Beginners: Level 0 to Level 12</title>
      <dc:creator>Lakindu Mansara</dc:creator>
      <pubDate>Mon, 13 Jul 2026 04:27:54 +0000</pubDate>
      <link>https://dev.to/lakindu_mansara/overthewire-bandit-walk-through-for-beginners-level-0-12-46i9</link>
      <guid>https://dev.to/lakindu_mansara/overthewire-bandit-walk-through-for-beginners-level-0-12-46i9</guid>
      <description>&lt;p&gt;For anyone building a foundation in cybersecurity, comfort with the Linux command line is non-negotiable. &lt;a href="https://overthewire.org/wargames/bandit/" rel="noopener noreferrer"&gt;OverTheWire's Bandit wargame&lt;/a&gt; is widely recommended as a starting point. Because each level of this CTF introduces one core concept, building progressively toward more advanced skills.&lt;/p&gt;

&lt;p&gt;This post documents my progress through Level 0 to 11, with an short explanation behind each command rather than just the command themselves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Level 0: Connecting to the server
&lt;/h2&gt;

&lt;p&gt;Every level Begins with logging in via &lt;a href="https://en.wikipedia.org/wiki/Secure_Shell" rel="noopener noreferrer"&gt;SSH&lt;/a&gt;. Bandit runs its SSH service on a non-standard port, which means the connection command has to specify it explicitly.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ssh bandit0@bandit.labs.overthwire.org -p 2200&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It's a minor point, but useful early reminder that not every service runs on its default port.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqh2f1tt3ciy4t4jqzq90.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqh2f1tt3ciy4t4jqzq90.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enter &lt;strong&gt;bandit0&lt;/strong&gt; for the password!&lt;/p&gt;

&lt;h2&gt;
  
  
  Level 0 → Level 1
&lt;/h2&gt;

&lt;p&gt;The password for next level was stored in a file named &lt;strong&gt;readme&lt;/strong&gt; in home directory. Use &lt;code&gt;ls&lt;/code&gt; to confirm the file's presence, followed by &lt;code&gt;cat&lt;/code&gt; to read its content.Very simple, but this pairing the basis of nearly everything that follows!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fys5rozozslj21liaehk9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fys5rozozslj21liaehk9.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Level 1 → Level 2
&lt;/h2&gt;

&lt;p&gt;This level introduced a small but important obstacle. The target file was name '-'.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5fpoc9xvdtgl739n0v5x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5fpoc9xvdtgl739n0v5x.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can't use &lt;em&gt;cat&lt;/em&gt; command to read this file, because the shell thinks '-' as an option flag rather than a filename. So, the command doesn't work as intended.&lt;/p&gt;

&lt;p&gt;The solution is simple. We can tells the shell to treat it as a file in the current directory using './' before the filename(-).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F219p0g1mt1q89aiftwbs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F219p0g1mt1q89aiftwbs.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Level 2 → Level 3
&lt;/h2&gt;

&lt;p&gt;In this level things get bit tricky. The password file in here was named &lt;strong&gt;--spaces in this filename&lt;/strong&gt; with actual spaces in the name and starting with '-'.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxh08jk4bu50uq9owh2nf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxh08jk4bu50uq9owh2nf.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By default, the shell treats each space as a separator between arguments, which cause it to misread this as several distinct filenames. To fix this we have two options here.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Escape each space with a backslash(). This tells the shell to treat spaces as literal character.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using " " to cover the filename. This also tells the shell to Treat spaces as literal characters rather than delimiters.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I used the second method, because it's very clean. But in here we have another problem. Filename starts with '-', and it leads the shell to think this is an option flag. So we have to use the previous method to pass it.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cat "./--spaces in this filename--"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fawn6fndh5dy4gy302kps.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fawn6fndh5dy4gy302kps.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Level 3 → Level 4
&lt;/h2&gt;

&lt;p&gt;In here we have a directory, which is named &lt;strong&gt;inhere&lt;/strong&gt;. We can change the directory using &lt;code&gt;cd&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cd inhere&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;But in this directory, there is no files we can see.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxd4cpda1n38g1cojpivb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxd4cpda1n38g1cojpivb.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;File is located in here, but it is hidden from us!&lt;br&gt;
To see all the files in a directory, including hidden files, we can use &lt;code&gt;ls -la&lt;/code&gt; command. Then you can read the file using &lt;code&gt;cat&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8kd438fgvpwwojiwylfk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8kd438fgvpwwojiwylfk.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Level 4 → Level 5
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;inhere&lt;/strong&gt; directory in this level contained several files. But only one file is human-readable. Rather than inspecting each file manually, I used &lt;code&gt;file ./*&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd7s6d5rzhv791ywbvt9s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd7s6d5rzhv791ywbvt9s.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;file&lt;/code&gt; command examines a file's actual content to determine its type, independent of its name or extension. One file was identified as &lt;strong&gt;ASCII text&lt;/strong&gt;, which turned out to be the target.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flr1arkuelkqyd24imndv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flr1arkuelkqyd24imndv.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;One habit worth building early:&lt;/strong&gt;&lt;br&gt;
Whenever you're unsure what a command does or which flags are available, run it with &lt;code&gt;--help&lt;/code&gt; (Ex:- &lt;code&gt;find --help&lt;/code&gt;, &lt;code&gt;cd --help&lt;/code&gt;). Most core Linux utilities support this flag, and it's often faster and more reliable than searching online. You can also use &lt;code&gt;man&lt;/code&gt; command to get help (Ex:- &lt;code&gt;man find&lt;/code&gt;).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Level 5 → Level 6
&lt;/h2&gt;

&lt;p&gt;This level is little bit harder than previous ones. Because this level provided no filename or directory. It only provided a set of properties.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;human-readable&lt;/li&gt;
&lt;li&gt;exactly 1033 bytes&lt;/li&gt;
&lt;li&gt;not executable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I used &lt;code&gt;find&lt;/code&gt;command to find files which fulfill these properties.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;find ./ -type f -size 1033c ! -executable&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After this I used the &lt;code&gt;cat&lt;/code&gt; command to read the file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3ya7wet3g8n1heyl5g5g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3ya7wet3g8n1heyl5g5g.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Theory&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;'&lt;code&gt;-type f&lt;/code&gt;' restricts results to regular files.&lt;/li&gt;
&lt;li&gt;'&lt;code&gt;-size 1033c&lt;/code&gt;' matches files of exactly 1033 bytes. &lt;strong&gt;c&lt;/strong&gt; stands for bytes.&lt;/li&gt;
&lt;li&gt;'&lt;code&gt;! -executable&lt;/code&gt;' negates the executable condition.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Level 6 → Level 7
&lt;/h2&gt;

&lt;p&gt;Also this level follows the similar logic of the previous level. I used &lt;code&gt;-user&lt;/code&gt; and &lt;code&gt;-group&lt;/code&gt; flags for filter the file.&lt;/p&gt;

&lt;p&gt;find ./ -type f -size 33c -user bandit7 -group bandit6&lt;/p&gt;

&lt;p&gt;But if you pass a command like this, it gives you bunch of "Permission denied" results. It is called &lt;strong&gt;spamming stderr&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjlncv7gltbakykzle4d9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjlncv7gltbakykzle4d9.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I used &lt;code&gt;2&amp;lt;/dev/null&lt;/code&gt; to move error files to the &lt;em&gt;dev/null&lt;/em&gt; file. So I can see results which are not given an error.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fca7nqbtok7g4njugcnoy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fca7nqbtok7g4njugcnoy.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Level 7 → Level 8
&lt;/h2&gt;

&lt;p&gt;This level marked a meaningful step up in complexity. The &lt;strong&gt;data.txt&lt;/strong&gt; file contained a large volume of text, with the password located next to the word "&lt;strong&gt;millionth&lt;/strong&gt;". Manually searching through this file for the password is not practical. So I used:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sort data.txt | grep millionth&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9ab2hqqow9g5zphk67s9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9ab2hqqow9g5zphk67s9.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was my first use of the pipe(|).&lt;br&gt;
It passes the output of one command directly into another.&lt;br&gt;
&lt;code&gt;sort&lt;/code&gt; orders the file's content and &lt;code&gt;grep millionth&lt;/code&gt; filters the result down to the relevant line.&lt;/p&gt;

&lt;h2&gt;
  
  
  Level 8 → Level 9
&lt;/h2&gt;

&lt;p&gt;This is tricky one. Because the object here was to find the single line in &lt;strong&gt;data.txt&lt;/strong&gt; that appeared exactly once. I already know that i need to use &lt;code&gt;uniq&lt;/code&gt; command. But here's the thing, &lt;code&gt;uniq&lt;/code&gt; only identifies duplicate lines only when they are adjacent. So you have to sort the data first.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sort data.txt | uniq -u&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;-u&lt;/code&gt; flag isolates lines that accur exactly once.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1o31l4egmmpt302zy1jb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1o31l4egmmpt302zy1jb.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Level 9 → Level 10
&lt;/h2&gt;

&lt;p&gt;In here &lt;strong&gt;data.txt&lt;/strong&gt; consisted largely of binary content, with the password appearing as one of a small number of readable strings, marked by a series of "=" characters.&lt;br&gt;
So, I used string command to extracts readable text from the file. It disregarding non-printable binary data. Piping this into &lt;code&gt;grep =&lt;/code&gt; given me the result that i am looking for.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj9yg1lnm593v1ett2xp6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj9yg1lnm593v1ett2xp6.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Level 10 → Level 11
&lt;/h2&gt;

&lt;p&gt;The password for the next level is stored in the file &lt;strong&gt;data.txt&lt;/strong&gt;, which contains base64 encoded data. So this is the next hard level I faced as &lt;strong&gt;a beginner&lt;/strong&gt; for this.&lt;/p&gt;

&lt;p&gt;I quickly searched on the google and found that there is a command named &lt;code&gt;base64&lt;/code&gt;, and i have to enter the command with &lt;code&gt;-d&lt;/code&gt; flag to decode the encoded data.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cat data.txt | base64 -d&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fugilvawb152gu2ht7k3y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fugilvawb152gu2ht7k3y.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Base64 coding appears frequently across security-related contexts, from web traffic to malware analysis.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Level 11 → Level 12
&lt;/h2&gt;

&lt;p&gt;This is also a hard one for me as &lt;strong&gt;a beginner&lt;/strong&gt;!!&lt;br&gt;
Flag is stored in the file &lt;strong&gt;data.txt&lt;/strong&gt;, where all lowercase(a-z) and uppercase(A-Z) letters have been rotated by 13 positions. It is called &lt;strong&gt;Rot13&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Quick google search helped me to find that you need to use &lt;code&gt;tr&lt;/code&gt; command to reverse the rotation process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F34w8avpumxghvomcnad1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F34w8avpumxghvomcnad1.png" alt=" " width="800" height="596"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwct0xsx4wtp1z4xlietl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwct0xsx4wtp1z4xlietl.png" alt=" " width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick Summary
&lt;/h3&gt;

&lt;p&gt;In this post, I worked through Level 0 → 12 of OverTheWire's Bandit wargame, covering some foundational Linux skills: connecting via SSH, reading and locating files, handling unusual filenames, searching by file properties, usage of find, and chaining commands with pipes to filter, sort, and decode data. Each level builds from basic navigation to problem-solving on the command line.&lt;/p&gt;

&lt;p&gt;I'm still early in my own cybersecurity journey, so this series is as much about documenting my learning as it is about helping others starting out. If you're also new I'd like to hear where you're at.Feel free to share your thoughts and which level gave you the most trouble. Level 12+ coming soon, so follow along if you like to learn alongside me!&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>programming</category>
      <category>beginners</category>
      <category>security</category>
    </item>
  </channel>
</rss>
