Login

  • ssh : ssh bandit6@bandit.labs.overthewire -p 2220
  • password : HWasnPhtq9AVKe0dmk45nxy20cvUa6EG

Task :

  • the goal is to find a file locate somewhere on the server

Solution

  • as the previous level I used the command find but first we need to go to the root directory , cus there is no hints about the file’s location
cd /
  • after that I used the find command with the following parameters :
    • -user <user> : to specify the owner of the file
    • -group <group> to specify the group that the files belongs to
    • -size <size><unit> : to specify the file size

I run this command from the root directory and since there is a lot of files that we can’t access the screen will be full of permission denied messages, to get rid of them we gonna use the [[Linux Commands#the errors stream (stderr)|stderr]] to redirect them to /dev/null file to clean the screen and catch the wanted file

find -user bandit7 -group bandit6 -size 33c 2> /dev/null