2023.02.19
홈 디렉토리 spaces in this filename 파일에 비밀번호.
bandit2@bandit:~$ cat spaces\ in\ this\ filename
aBZ0W5EmUfAf7kHTQeOwd8bauFJ2lAiG
이스케이프 문자 사용을 생각하고 낸 문제로 보이는데 s누르고 탭눌러서 해결.
접속완료.
inhere 디렉토리 안의 파일에 숨겨져있다.
bandit3@bandit:~$ cd inhere/
bandit3@bandit:~/inhere$ ls
bandit3@bandit:~/inhere$
bandit3@bandit:~/inhere$
bandit3@bandit:~/inhere$ ll
total 12
drwxr-xr-x 2 root root 4096 Jan 11 19:19 ./
drwxr-xr-x 3 root root 4096 Jan 11 19:19 ../
-rw-r----- 1 bandit4 bandit3 33 Jan 11 19:19 .hidden
bandit3@bandit:~/inhere$ cat .hidden
2EW7BBsr6aMMoJ2HjW067dm8EgX26xNe
흠.. 숨어있는지는 모르겠는데 찾았다.
inhere 디렉토리에 human-readable 파일에 숨어있다.
drwxr-xr-x 2 root root 4096 Jan 11 19:19 ./
drwxr-xr-x 3 root root 4096 Jan 11 19:19 ../
-rw-r----- 1 bandit5 bandit4 33 Jan 11 19:19 -file00
-rw-r----- 1 bandit5 bandit4 33 Jan 11 19:19 -file01
-rw-r----- 1 bandit5 bandit4 33 Jan 11 19:19 -file02
-rw-r----- 1 bandit5 bandit4 33 Jan 11 19:19 -file03
-rw-r----- 1 bandit5 bandit4 33 Jan 11 19:19 -file04
-rw-r----- 1 bandit5 bandit4 33 Jan 11 19:19 -file05
-rw-r----- 1 bandit5 bandit4 33 Jan 11 19:19 -file06
-rw-r----- 1 bandit5 bandit4 33 Jan 11 19:19 -file07
-rw-r----- 1 bandit5 bandit4 33 Jan 11 19:19 -file08
-rw-r----- 1 bandit5 bandit4 33 Jan 11 19:19 -file09
bandit4@bandit:~/inhere$ cat ./-file07
lrIWWI6bB37kxfiCQZqUdOIYfr6eEeqR
bandit4@bandit:~/inhere$
파일 하나하나 열어보면서 패스워드를 찾았다.
사람이 읽을 수 있는 1033사이즈 크기의 파일.
실행불가.
bandit5@bandit:~/inhere$ ls
maybehere00 maybehere04 maybehere08 maybehere12 maybehere16
maybehere01 maybehere05 maybehere09 maybehere13 maybehere17
maybehere02 maybehere06 maybehere10 maybehere14 maybehere18
maybehere03 maybehere07 maybehere11 maybehere15 maybehere19
저 많은 디렉토리에서 찾으라고 하는거 보니 find 명령어를 쓰라고 하는것 같다.
bandit5@bandit:~/inhere$ find . -size 1033c
./maybehere07/.file2
bandit5@bandit:~/inhere$ cd maybehere07
cat ./.file2
P4L4vucdmLnm8I7Vl7jG1ApGSfjYKqJU