Level 6 - Find password in a file with certain properties inside inhere directory (Misc)
Description
The goal of this level is to get the password for the next level stored in a file with certain properties inside the inhere directory.
The properties are
- human-readable
- 1033 bytes
- not executable
Tech used
- cat
- cd
- find
- file
- grep
Solutions
Run ssh bandit5@bandit.labs.overthewire.org -p 2220. Password is 4oQYVPkxZOOEOO5pTW81FB8j8lxXGUQw
- Determine the file with ASCII text and print its output
- Run
cd inhere - Run
find -type f ! -executable -size 1033c -exec file {} + | grep "ASCII" - Run
cat ./<file>where<file>is the filtered file from the above command
- Run
Notes
- Find is pretty powerful for any file search, prefer using it over grepped ls or similar commands. Has operators like !, -and, -or, etc for better filtering.
findmanual page