Featured image of post OverTheWire - Bandit - Level 5

OverTheWire - Bandit - Level 5

The solution to OverTheWires Bandit, Level 5

Bandit 5

I’m so happy to have some hints, to go off of and have to figure it out now. We’re starting to get to some good stuff now.

Challenge

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

Notes

So right off the bat, I know we need to look at the find command’s switches. I’m positive we can look based on size. Let’s head over to ss64 - FIND command

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
bandit5@bandit:~/inhere$ ls -l
total 80
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere00
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere01
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere02
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere03
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere04
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere05
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere06
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere07
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere08
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere09
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere10
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere11
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere12
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere13
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere14
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere15
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere16
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere17
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere18
drwxr-x--- 2 root bandit5 4096 Feb 21 22:03 maybehere19

bandit5@bandit:~/inhere$ find . -type f -size 1033c
./maybehere07/.file2

bandit5@bandit:~/inhere$ cat ./maybehere07/.file2
FLAG_FLAG_FLAG_FLAG_FLAG
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">YISSSSS</span></span></code></pre></td></tr></table>
</div>
</div>
Built with Hugo
Theme Stack designed by Jimmy