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 4 to Level 5

Description:

Level Goal
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.
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 bandit4@bandit.labs.overthewire.org
    ...
    bandit4@bandit.labs.overthewire.org's password: pIwrPrtPN36QITSp3EQaw936yaFoFgAB
  3. [Comment] Using ls command to list directory contents
  4. bandit4@melinda:~$ ls
    inhere
  5. [Comment] Using cd command to change the shell working directory
  6. bandit4@melinda:~$ cd inhere/
  7. bandit4@melinda:~/inhere$ ls
    -file00  -file01  -file02  -file03  -file04  -file05  -file06  -file07  -file08  -file09
  8. [Comment] Using for loop and cat command to output all file contents
  9. bandit4@melinda:~/inhere$ for f in ./*; do cat $f; done;
    �S�U� �&� �?�?ɦ�7 ��n�| ����/�$�Q�J
    ��NO2���s�� =\�� 1�OF��
    4��<�o�l�����՚�~{b�W�$�s<��~(����Å�8��b
                                           dhz��c�
                                                  g7�!�x �Ӈ��Eo[� �B�
                                                                       ���& 6] �U �w޽RZ!N�o�h��)�'߳e�l�?-p#��s ���~�$�������<��Dj�N#C � �0�|���T����G�@���koReBOKuIDDepwhWk7jZC0RTdopnAYKh
    ��d C�g�b�.< ��"Q 2B����{����3S�~і�����|�M�^߮�-%ƌ
  10. [Comment] Using exit command to disconnect connection to server
  11. bandit4@melinda:~$ exit
    logout
    Connection to bandit.labs.overthewire.org closed.
  12. [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

2 comments:

  1. Or you could use ' file ./-* ' to get the filetypes of all the files in the directory, then just open the only text file.

    ReplyDelete