What is it? @.@

Here is the place where I record some tactics about wargame, systems, and other security issues.

2014-01-23

OverTheWire - Bandit - Level 5 to Level 6

Description:

Level Goal
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
Commands you may need to solve this level
ls, cd, cat, file, du, find
Solution:
  1. [Comment] Using SSH to connect the server
  2. sp@simple-plan:~|=> ssh bandit5@bandit.labs.overthewire.org
    ...
    bandit5@bandit.labs.overthewire.org's password: koReBOKuIDDepwhWk7jZC0RTdopnAYKh
  3. [Comment] Using ls command to list directory contents
  4. bandit5@melinda:~$ ls
    inhere
  5. [Comment] Using cd command to change the shell working directory
  6. bandit5@melinda:~$ cd inhere/
  7. bandit5@melinda:~/inhere$ ls
    maybehere00  maybehere02  maybehere04  maybehere06  maybehere08  maybehere10
    maybehere12  maybehere14  maybehere16  maybehere18
    maybehere01  maybehere03  maybehere05  maybehere07  maybehere09  maybehere11
    maybehere13  maybehere15  maybehere17  maybehere19
  8. [Comment] Using find command to find the specific file
  9. [Comment] human-readable : -readable option
  10. [Comment] 1033 bytes in size : -size 1033c option
  11. [Comment] not executable : ! -executable option
  12. bandit5@melinda:~/inhere$ find -readable -size 1033c ! -executable
    ./maybehere07/.file2
  13. [Comment] Using cat command to output file's contents
  14. bandit5@melinda:~/inhere$ cat ./maybehere07/.file2
    DXjZPULLxYr17uwoI01bNLQbtFemEgo7
  15. [Comment] Using exit command to disconnect connection to server
  16. bandit5@melinda:~/inhere$ exit
    logout
    Connection to bandit.labs.overthewire.org closed.
  17. [Comment] It's done! Saving the password for next level.
Reference:
sshhttp://linuxcommand.org/man_pages/ssh1.html
lshttp://linuxcommand.org/man_pages/ls1.html
cathttp://linuxcommand.org/man_pages/cat1.html
exithttp://linuxcommand.org/man_pages/logout1.html
cdhttp://linuxcommand.org/lc3_man_pages/cdh.html
findhttp://linuxcommand.org/man_pages/find1.html

No comments:

Post a Comment