Skip to main content

Bandit Level 7 → 8

Shubham
Cybersecurity Enthusiast

Login : ssh bandit6@bandit.labs.overthewire.org -p 2220
password : morbNTDkSW6jIlUc0ymOdMaLnOlFVAaj

task

Get the password from a file, next to the word millionth

theory lil bit

  1. grep <pattern> prints lines that match <pattern>.
  2. Use the pipe | to send output from one command into another (e.g. cat data.txt | grep millionth), though grep can read files directly: grep millionth data.txt.
  3. For very large files, grep is much faster than manually inspecting with less or cat.

solution

bandit7@bandit:~$ ls
data.txt
bandit7@bandit:~$ du -b data.txt
4184396 data.txt
bandit7@bandit:~$ cat data.txt | grep millionth
millionth dfwvzFQi4mU0wfNbFOe9RoWskMLg7eEc
bandit7@bandit:~$

<!-- truncate -->