OverTheWire: Bandit Level 7 → Level 8


Level Goal

The password for the next level is stored in the file data.txt next to the word millionth

Commands you may need to solve this level

grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd

> whatis grep
grep (1) - print lines that match patterns
> whatis sort
sort (1) - sort lines of text files
> whatis uniq
uniq (1) - report or omit repeated lines
> whatis strings
strings (1) - print the sequences of printable characters in files
> whatis base64
base64 (1) - base64 encode/decode data and print to standard output
> whatis tr
tr (1) - translate or delete characters
> whatis tar
tar (1) - an archiving utility
> whatis gzip
gzip (1) - compress or expand files
> whatis bzip2
bzip2 (1) - a block-sorting file compressor, v1.0.8
> whatis xxd
xxd (1) - make a hexdump or do the reverse.

Note : All commands don’t have to be used to complete level

Helpful Reading Material


View the contents of the current working directory

bandit7@bandit:~$ ls

Peek at the data that is present in the file. This can be achieved using the head command

bandit7@bandit:~$ head -n 10 data.txt 
binning WnfnFPqkuhl2nwHBohzn2C4L5W0gwcLq
abuts v8PAwDdkGDdp5NsJ7ZFM5A7TJ5MkYDbm
fathead wBhCy0fqvbQdexz5kMKBtGoSWgXw7s0H
attacks 3GzwnGiZnBDdVuHivJk1pEfOOYu7uOTa
lopping H9hzviFp1QO4WF8EzcQNl5MDz5r1bzUC
tyrannosaurus WxtYXVar4sgInHp7YUpTzOjdUw1Ww0x8
reservists QDidoX6BN1MDTi0QwA6Vt82L9Rb64cm3
atrophy's mSpCwP9VgcGRn1SCD8R9bb9cPBl2yqkW
bolt's 726RB3lt2RmeCtbWEQ8lhUAxVBJfepy0
Klondikes wVh3ILxQAsKg8WNnFHp8GxtnSu213GbR

(The -n flag allows us to specify how many lines to print from start of the file. We can use the tail command to look at the last n lines of a file)

We know the password is next to the word “millionth” in the file. We can look for this pattern by using the grep command

bandit7@bandit:~$ grep millionth data.txt 
millionth cvX2JJa4CFALtqS87jk27qwqGhBM9plV

We have found the password for the next level !!

Logout of current session and use password of user bandit8 to access next level

> ssh bandit8@bandit.labs.overthewire.org -p 2220
This is a OverTheWire game server. More information on http://www.overthewire.org/wargames
bandit8@bandit.labs.overthewire.org's password: cvX2JJa4CFALtqS87jk27qwqGhBM9plV




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Alvin’s Dew Drop Daily — Issue #151


Eth 2.0 Dev Update #51— v0.12 testnet on the horizon

Cloudflare Access: Sharing our single-sign on plugin for Atlassian

[CI/CD] Github Deploy to Cloud Run

1. Intrinsic vs. Extrinsic motivation (Things I wish I knew before learning to code)

Using Jupyter Notebook in Google Cloud Platform (GCP)

How to automate your AWS infrastructure using Ansible and Terraform?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
David Varghese

David Varghese

More from Medium

Learn the basics of Operating systems for Devops

“Google Hacking” — The way you retrieve data from Google

Nitty-Gritty Of Linux Commands

How to create a LVM in linux