Bandit Level 5
패스워드 파일을 찾을 수 있는 세 가지 단서를 제공하고 있다.
- human-readable
- 1033 bytes in size
- not executable
이 정보를 조합하여 find
명령어를 구성하여 문제를 해결할 수 있다.
-size [+파일크기/-파일크기/파일크기][b/c/k/w]
b: 블록단위 512kb, c: byte, k: kbyte, w: 2byte 워드 (default: b)
-perm [-][권한] ([-]: 최소한)
-exec [command] {} ;
bandit5@bandit:~/inhere$ ls -al
total 88
drwxr-x--- 22 root bandit5 4096 Nov 13 15:58 .
drwxr-xr-x 3 root root 4096 Nov 13 15:58 ..
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere00
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere01
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere02
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere03
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere04
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere05
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere06
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere07
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere08
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere09
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere10
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere11
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere12
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere13
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere14
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere15
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere16
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere17
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere18
drwxr-x--- 2 root bandit5 4096 Nov 13 15:58 maybehere19
bandit5@bandit:~/inhere$ find ../inhere -size 1033c -perm -040 -exec ls -al {} \;
-rw-r----- 1 root bandit5 1033 Nov 13 15:58 ../inhere/maybehere07/.file2
bandit5@bandit:~/inhere$ cat ../inhere/maybehere07/.file2
DXjZPULLxYr17uwoI01bNLQbtFemEgo7
bandit5@bandit:~/inhere$