Day 28 Log

27 Jul , 2023 - Uncategorised

  • Linux commands learning more.
  • Made documents of the different levels and what I did to overcome the challenge, which command we I used.

Bandit Level 0

The login details were provided:

Login: Bandit0

Password: Bandit0

Bandit Level 0 – 1

Question:

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.

Answer

I used the ( ls -al ) command which it shows everything in the directory.
Then it shows me that there is a text file called readme. After that I used the command ( cat ) which reads and prints the text out in the terminal to show you what is in the file.

Bandit Level 1 – 2

Question:

The password for the next level is stored in a file called  located in the home directory

Answer:

The answer was located in the home directory as stated by the question.

All I did was access the home directory and listed everything that is in that folder and I found the file that I was looking for, so I used the command ( cat ./-) to gain access to the file. The reason for the way I accessed the file was because a ( – ) by itself is an argument or option for the command in this case it was a file so I needed to make a normal file. The two ways we can do it is be putting ( ~/ ) before it or the one I used in this case ( ./ ) so it let me access it with with cat.

Bandit Level 2 – 3

Question:

The password for the next level is stored in a file called spaces in this filename located in the home directory

Answer

All i did was list what was in the directory and then used the ( cat) command to read what was in the file.

Bandit Level 3 – 4

Question:

The password for the next level is stored in a hidden file in the inhere directory.

Answer

I gained access then typed ( ls -al) which lists all files in the directory and then I found the ( inhere ) directory and the did the same thing in listing all the files by running the command ( ls -al ), then I found the hidden file and printed what was in it to the terminal by using the command ( cat ).

Bandit Level 4 – 5

Question:

The password for the next level is stored in the only human-readable file in the inhere directory. Tip: if your terminal is messed up, try the “reset” command.

Answer

Here as you can see I needed to find the only human-readable file among the many files.
So what I did, was I went into the ( inhere ) directory and typed the command ( file ./* )
which means that it looks for files in this current directory and lists the types of files that they are and the data within each of the files.

Bandit Level 5

Question:

The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties:

  • human-readable
  • 1033 bytes in size
  • not executable

Answer:

Used the find command to solve this one:

  • find /home/bandit5/inhere/ – This shows the path of where I am looking
  • -type f – Shows I am looking for a file in the directory
  • – readable – Shows only the human-readable directories
  • ! executable – No executable files shown.
  • -size – Size of file in human readable form
  • -cat – Outputs the result in text

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Day 62 Log

23 Oct , 2023 - Uncategorised

Day 61 Log

18 Oct , 2023 - Uncategorised