0% found this document useful (0 votes)
14 views3 pages

Overthewire

The document provides a series of commands and instructions for navigating and manipulating files in a Linux environment, specifically for a series of challenges related to the Bandit game. It covers various commands such as ls, cat, find, strings, sort, uniq, grep, and base64 for different tasks like finding hidden files, reading binary files, and decoding Base64 data. Each section corresponds to different levels of the Bandit game, detailing the necessary steps to obtain passwords and complete challenges.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views3 pages

Overthewire

The document provides a series of commands and instructions for navigating and manipulating files in a Linux environment, specifically for a series of challenges related to the Bandit game. It covers various commands such as ls, cat, find, strings, sort, uniq, grep, and base64 for different tasks like finding hidden files, reading binary files, and decoding Base64 data. Each section corresponds to different levels of the Bandit game, detailing the necessary steps to obtain passwords and complete challenges.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 3

Bandit0: bandit0

Bandit1: NH2SXQwcBdpmTEzi3bvBHMM9H66vVXjL

Bandit2: rRGizSaX8Mk1RTb1CNQoXTcYZWU6lgzi .

Bandit3: aBZ0W5EmUfAf7kHTQeOwd8bauFJ2lAiG .
Use ls -a to find hidden file. Open file cat ./-

Bandit4: 2EW7BBsr6aMMoJ2HjW067dm8EgX26xNe .
Open hidden file: cat ./.’name_of_file’

Bandit5: lrIWWI6bB37kxfiCQZqUdOIYfr6eEeqR .
For binary file use: xxd -b ./’name_of_file’. For hex file use: xxd ./’name_of_file’. Or a simpler
way is use strings commands which will output only human readable content.

strings ./inhere/-file07

Bandi6: P4L4vucdmLnm8I7Vl7jG1ApGSfjYKqJU

.
Using command when at home directory: find inhere – readable -size 1033c ! -executable. This
will show with exact 1033 bytes including readable property and with ! (mean exclude) executable
property.
Using file command: file ./inhere/maybehere07/.file2 to show whether the file is human readable.
The result is ASCII text which is human readable.

Also, we can use Ctrl + Shift + F to search through the text in terminal.
Using command: ls * -ls will list all the file in subfolder.

Bandit7: z7WtoNQU2XfjmMtWA8u5rN4vzqu4v99S .
The instruction is
• owned by user bandit7
• owned by group bandit6
• 33 bytes in size
To understand about user and group in Linux. This string of letters, drwxrwxrwx, represents the
permissions that are set for this folder. (Note that these are often called attributes by FTP
programs.) Let’s explain what each of these letters means

The string of letters breaks down into 3 sections of 3 letters each, representing each of the types of
users (the owner, members of the group, and everyone else). There is also a “d” attribute on the left,
which tells us if this is a file or a directory (folder).
If any of these letters is replaced with a hyphen (-), it means that permission is not granted. For
example:

drwxr-xr-x
A folder which has read, write and execute permissions for the owner, but only read and
execute permissions for the group and for other users.
-rw-rw-rw-
A file that can be read and written by anyone, but not executed at all.
-rw-r--r--
A file that can be read and written by the user, but only read by the group and everyone else.

We have to use comand that search by user and by group and in size. Using command:
find / -user bandit7 -group bandit6 -size 33c 2>/dev/null

‘/’ : mean the root folder. In case we cd to the root folder. We can use ‘.’ which means current folder
to find
‘2>/dev/null’: will transfer all the error result to trash so the result is clearer

Bandit8: TESKZC0XvTetK0S9xNwm25STk5iWrBvP
This level we can use less command to skim through the data.txt file on bandi7 folder. Using / and
type the keyword millionth to search for password.

Or we can use cat command then combine with Ctrl+Shift+F to search for millionth

Bandi9: EN632PlfYiZbn3PhVK3XOGSlNInNE00t
This level ask for unique text in a file. To find unique pattern we can use uniq command. However,
uniq command only check adjacent lines so we need to use sort command to sort the text first then
using piping with uniq command. We use flag -u to show only unique lines.
sort data.txt | uniq -u

Bandit10: G7w8LIi6J3kTb8A7j9LgrywtEUlyyp6s
This level also has binary file which we will use strings command to display readable text, then we
use grep command which is to search for particular patter using piping. The command is
strings data.txt | grep ==

Bandit11: 6zPeziLdR2RKNdNYFNb6nVCKzphlXHBM
This level has Base64 format which is needed to decode. Base64 is used to encode data as printable
text. This allows you to transport binary over protocols or mediums that cannot handle binary data
formats and require simple text. Base64 format has following properties:

• The length of a Base64-encoded string is always a multiple of 4


• Only these characters are used by the encryption: “A” to “Z”, “a” to “z”, “0” to “9”, “+” and
“/”
• The end of a string can be padded up to two times using the “=”-character (this character is
allowed in the end only)

The file in this level fit the properties value


Using command: base64 -d data.txt

Bandit12:
To quickly find the location of the find but we don’t know which folder. For example, in this case
‘data.txt’. We can use command: find . - name filename

You might also like