back

Bandit 04 - writeups

Sharing this writeups by following overthewire rules. This writing is for Level 4.

Bandit Level 4 → Level 5

ssh bandit4@bandit.labs.overthewire.org -p 2220
found password: 3Wmrjklmq3IPxneAaMGhap0xfnf3NJ

bandit4@bandit:~$ ls
inhere

bandit4@bandit:~$ cd inhere

bandit4@bandit:~/inhere$ ls
-file00  -file01  -file02  -file03  -file04  -file05  -file06  -file07  -file08  -file09

bandit4@bandit:~/inhere$ file ./*
./-file00: data
./-file01: data
./-file02: data
./-file03: data
./-file04: data
./-file05: data
./-file06: data
./-file07: ASCII text
./-file08: data
./-file09: data

bandit4@bandit:~/inhere$ cat ./-file07
4eQYVPkxZOOEOO5phW81FB8j8lxYHGT5

bandit4@bandit:~/inhere$ exit
logout
Connection to bandit.labs.overthewire.org closed.

Explanation:
cd inhere enters it.   ls lists 10 files with leading dashes (-file00 to -file09).
file ./* identifies types: most “data” (binary), ./-file07 is “ASCII text” (readable).
cat ./-file07 displays contents ( ./ handles leading dash).

Copyright © 2026 Mahidul Haque. This post is licensed under a CC BY-NC-ND 4.0 license. You may read, learn, and share links to this post for non‑commercial, educational purposes, as long as you give appropriate attribution. You may not copy, reproduce, adapt, distribute, or use this work commercially without explicit permission.