Tuesday, June 7, 2022

Bandit2






bandit level 2

ssh server: bandit.labs.overthewire.org port 2220

username: bandit2

password: CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9




connect to the ssh server



by listing the bandit2 home directory we face a file named "spaces in this filename", regularly if we typed in the file name as it is cat command deals with every word as a separate file that's why it will respond with 

cat: spaces: No such file or directory

cat: in: No such file or directory

cat: this: No such file or directory

cat: filename: No such file or directory




so we need to find out a workaround, which is else using single or double quotes or use forward slash

$ cat spaces\ in\ this\ filename

OR

$ cat 'spaces in this filename'

OR

$ cat "spaces in this filename"




 all the previse methods will print out the contents of the file with spaces in its name which is the password for the next challenge bandit3

meet you in bandit3


Your comments and feedback are highly appreciated

Thank You

 Bandit1







bandit level 1

ssh server: bandit.labs.overthewire.org port 2220

username: bandit1

password: boJ9jbbUNNfktd78OOpsqOltutMc3MY1


connect to the ssh server




The bandit1 home directory contains nothing else a file with name dash "-", Linux uses -'s to add command arguments which means that the file can not be directly be read by the cat command

the work around is to not add the - direct next to the cat command, this could be dome in several ways

 

$ cat ./-

this means print out the contents of the file named - which in the root of current directory

OR

$ cat /home/bandit1/-

this means print out the contents of the file named - which in the bath /home/bandit1

OR

$ cat < -

direct the contents of the file -  to be printed

OR

$ dd if=- 1>/div/stdout

convert and copy the Input File named - to the standard output (the screen)

this prints some unneeded data, that's why we use the next format


$ dd if=- 2>/dev/null


convert and copy the Input File named - to the standard output (the screen), but direct the unneeded data to a null device




all the previse methods will print out the contents of the file "-" which is the password for the next challenge bandit2

lets meet in bandit2

Your comments and feedback are highly appreciated

Thank You

Monday, June 6, 2022

 

Bandit0



 




bandit level 0

ssh server: bandit.labs.overthewire.org port 2220

username: bandit0

password: bandit0





Connect to the bandit labs ssh server

 








where bandit0 is the username and 2220 is the ssh port for the gamming server

 

 

then we will submit bandit0 as the password

 

 

Finally, we are into the server, once we are into the server

 


Listing the files in the home directory of bandit0 will show a file named readme with read write access for bandit1 as a user, and only read access for bandit0 group

 






Reading the readme file will revile the bandit1 password

 



That was cool and easy meet you in the next challenge bandit1

 

 

Your comments and feedback are highly appreciated

Thank You

 





Bandit26

  Bandit26 bandit level26 ssh server: bandit.labs.overthewire.org port 2220 username:  bandit26 password:  c7GvcKlw9mC7aUQaPx7nwFstuAIBw1o1 ...