<?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: Micheal Mac Donnacha</title>
    <description>The latest articles on DEV Community by Micheal Mac Donnacha (@mmacdonnacha).</description>
    <link>https://dev.to/mmacdonnacha</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%2F600819%2Fd0f94f10-3b84-41e4-bbce-192df3923bcf.png</url>
      <title>DEV Community: Micheal Mac Donnacha</title>
      <link>https://dev.to/mmacdonnacha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mmacdonnacha"/>
    <language>en</language>
    <item>
      <title>Overthewire.org Bandit Level 3 -&gt; 4</title>
      <dc:creator>Micheal Mac Donnacha</dc:creator>
      <pubDate>Tue, 31 Aug 2021 20:06:31 +0000</pubDate>
      <link>https://dev.to/mmacdonnacha/overthewire-org-bandit-level-3-4-p77</link>
      <guid>https://dev.to/mmacdonnacha/overthewire-org-bandit-level-3-4-p77</guid>
      <description>&lt;p&gt;A walkthrough for Overthewire.org &lt;a href="https://overthewire.org/wargames/bandit/bandit4.html"&gt;Bandit Level 3 -&amp;gt; 4&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;The password for the next level is stored in a hidden file in the &lt;code&gt;inhere&lt;/code&gt; directory.&lt;/p&gt;




&lt;h2&gt;
  
  
  Walkthrough
&lt;/h2&gt;

&lt;p&gt;Login to the server using the password obtained from the previous level Bandit level 2 -&amp;gt; 3. &lt;/p&gt;

&lt;p&gt;username: &lt;code&gt;bandit3&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh bandit3@bandit.labs.overthewire.org &lt;span class="nt"&gt;-p&lt;/span&gt; 2220
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Change directory into &lt;code&gt;inhere&lt;/code&gt;, running &lt;code&gt;ls&lt;/code&gt; command will show no files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bandit3@bandit:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;inhere
bandit3@bandit:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;inhere/
bandit3@bandit:~/inhere&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt;  

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running &lt;code&gt;ls -a&lt;/code&gt; will let us see all files including hidden files.&lt;br&gt;&lt;br&gt;
&lt;code&gt;-a&lt;/code&gt; for all files (do not ignore entries starting with &lt;code&gt;.&lt;/code&gt;)&lt;br&gt;&lt;br&gt;
We can then see a file named &lt;code&gt;.hidden&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
The you can print to screen using &lt;code&gt;cat&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;bandit3@bandit:~/inhere&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt;
&lt;span class="nb"&gt;.&lt;/span&gt;  ..  .hidden
bandit3@bandit:~/inhere&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; ./.hidden
pIwrPr##########################
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>linux</category>
    </item>
    <item>
      <title>Overthewire.org Bandit Level 2 -&gt; 3</title>
      <dc:creator>Micheal Mac Donnacha</dc:creator>
      <pubDate>Tue, 31 Aug 2021 19:59:42 +0000</pubDate>
      <link>https://dev.to/mmacdonnacha/overthewire-org-bandit-level-2-3-309p</link>
      <guid>https://dev.to/mmacdonnacha/overthewire-org-bandit-level-2-3-309p</guid>
      <description>&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt; &lt;br&gt;
A walkthrough for &lt;a href="https://overthewire.org/wargames/bandit/bandit3.html"&gt;Bandit Level 2 → Level 3&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;The password for the next level is stored in a file called &lt;code&gt;spaces in this filename&lt;/code&gt; located in the home directory&lt;/p&gt;
&lt;h2&gt;
  
  
  Walkthrough
&lt;/h2&gt;

&lt;p&gt;Login to the server using the password obtained from the previous level Bandit level 1 -&amp;gt; 2. &lt;/p&gt;

&lt;p&gt;username: &lt;code&gt;bandit2&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh bandit2@bandit.labs.overthewire.org &lt;span class="nt"&gt;-p&lt;/span&gt; 2220
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This time there is a file with spaces in the name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bandit2@bandit:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls 
&lt;/span&gt;spaces &lt;span class="k"&gt;in &lt;/span&gt;this filename 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running &lt;code&gt;cat spaces in the filename&lt;/code&gt; will cause errors as it will think each word in &lt;code&gt;spaces in the filename&lt;/code&gt; is its own separate file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bandit2@bandit:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;spaces &lt;span class="k"&gt;in &lt;/span&gt;this filename
&lt;span class="nb"&gt;cat&lt;/span&gt;: spaces: No such file or directory 
&lt;span class="nb"&gt;cat&lt;/span&gt;: &lt;span class="k"&gt;in&lt;/span&gt;: No such file or directory 
&lt;span class="nb"&gt;cat&lt;/span&gt;: this: No such file or directory
&lt;span class="nb"&gt;cat&lt;/span&gt;: filename: No such file or directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Printing the contents of the file can be done 2 ways.&lt;br&gt;&lt;br&gt;
One using &lt;code&gt;\&lt;/code&gt; before each space to indicate to the terminal that the filename continues and the other is surrounding the file name with quotes &lt;code&gt;'&lt;/code&gt; or &lt;code&gt;"&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bandit2@bandit:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="s1"&gt;'spaces in this filename'&lt;/span&gt;
UmHadQ##########################
bandit2@bandit:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;spaces&lt;span class="se"&gt;\ &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="se"&gt;\ &lt;/span&gt;this&lt;span class="se"&gt;\ &lt;/span&gt;filename
UmHadQ##########################
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Overthewire.org Bandit Level 1 -&gt; 2</title>
      <dc:creator>Micheal Mac Donnacha</dc:creator>
      <pubDate>Mon, 22 Mar 2021 22:32:10 +0000</pubDate>
      <link>https://dev.to/mmacdonnacha/overthewire-org-bandit-level-1-2-6k5</link>
      <guid>https://dev.to/mmacdonnacha/overthewire-org-bandit-level-1-2-6k5</guid>
      <description>&lt;p&gt;This is the second in a series that will show how I solve the overthewire.org Bandit puzzles as I am completing them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://overthewire.org/wargames/bandit/bandit2.html"&gt;Bandit Level 1 → Level&amp;nbsp;2&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Level Goal
&lt;/h1&gt;

&lt;p&gt;The password for the next level is stored in a file called &lt;strong&gt;-&lt;/strong&gt; located in the home directory&lt;/p&gt;

&lt;h1&gt;
  
  
  Walkthrough
&lt;/h1&gt;

&lt;p&gt;This level similar to the first one is to just read the contents of a file to get the password. Login using the password obtained from the first 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="nv"&gt;$ &lt;/span&gt;ssh bandit1@bandit.labs.overthewire.org &lt;span class="nt"&gt;-p&lt;/span&gt; 2220
bandit0@bandit.labs.overthewire.org&lt;span class="s1"&gt;'s password:
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once logged in I found a file named - . Running the command 'cat -' does not work as the cat command thinks your entering an option rather then the file name being '-'. &lt;br&gt;
To read the file '-' I entered the the path to the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bandit1@bandit:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt;
-
bandit0@bandit:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; ./-
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output from the &lt;strong&gt;cat&amp;nbsp;./-&lt;/strong&gt; command is the password for the next level.&lt;br&gt;
That's the second level completed.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Overthewire.org Bandit Level 0 -&gt; 1</title>
      <dc:creator>Micheal Mac Donnacha</dc:creator>
      <pubDate>Sun, 21 Mar 2021 21:15:18 +0000</pubDate>
      <link>https://dev.to/mmacdonnacha/overthewire-org-bandit-level-0-1-2bcl</link>
      <guid>https://dev.to/mmacdonnacha/overthewire-org-bandit-level-0-1-2bcl</guid>
      <description>&lt;p&gt;This is the first in a series that will show how I solve the overthewire.org Bandit puzzles as I am completing them and learning how to better navigate and use linux terminal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://overthewire.org/wargames/bandit/bandit1.html"&gt;Bandit level 0 -&amp;gt; level 1&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Bandit Level 0 → Level 1
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Level Goal
&lt;/h2&gt;

&lt;p&gt;The password for the next level is stored in a file called readme located in the home directory. Use this password to log into bandit1 using SSH. Whenever you find a password for a level, use SSH (on port 2220) to log into that level and continue the game.&lt;br&gt;
Walkthrough&lt;/p&gt;

&lt;p&gt;This level is simple enough just login to the server using given username and password.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~$ ssh bandit0@bandit.labs.overthewire.org -p 2220
bandit0@bandit.labs.overthewire.org's password: bandit0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once logged in I only needed to read the contents of the readme file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bandit0@bandit:~$ ls
readmebandit0@bandit:~$ cat readme
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output from the cat readme command is the password for the next level.&lt;/p&gt;

&lt;p&gt;First level is simple enough all that is needed is to read a file.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
