Você está na página 1de 36

Level 0

Bandit Level 0

Level Goal
The goal of this level is for you to log into the game using SSH. The host to which you need to
connect is bandit.labs.overthewire.org, on port 2220. The username is bandit0 and the password
is bandit0. Once logged in, go to the Level 1 page to find out how to beat Level 1.

Commands you may need to solve this level


ssh

Helpful Reading Material


• Secure Shell (SSH) on Wikipedia
• How to use SSH on wikiHow
-------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------

Bandido nível 0
meta de nível

O objetivo deste nível é fazer login no jogo usando SSH. O host ao qual você precisa se conectar é b
andit.labs.overthewire.org, na porta 2220. O nome de usuário é bandit0 e a senha é bandit0.
Uma vez conectado, vá para a página do Nível 1 para descobrir como vencer o Nível 1.
Comandos que você pode precisar para resolver este nível

ssh
Material de leitura útil

Secure Shell (SSH) na Wikipedia


Como usar o SSH no wikiHow

ssh -v bandit0@bandit.labs.overthewire.org -p 2220


bandit0

1/36
Level0-1

Bandit Level 0 → Level 1

Level Goal
The password for the next level is stored in a file called readme located in the home directory. Use
this password to log into bandit1 using SSH. Whenever you find a password for a level, use SSH (on
port 2220) to log into that level and continue the game.

Commands you may need to solve this level


ls , cd , cat , file , du , find
-------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------

Bandido Nível 0 → Nível 1


meta de nível

A senha para o próximo nível é armazenada em um arquivo chamado readme localizado no diretório
inicial. Use esta senha para entrar no bandit1 usando SSH. Sempre que você encontrar uma senha
para um nível, use SSH (na porta 2220) para entrar nesse nível e continuar o jogo.
Comandos que você pode precisar para resolver este nível

ls , cd , cat , arquivo , du , localizar

ssh -v bandit0@bandit.labs.overthewire.org -p 2220


bandit0

feito “ls” no bandit0 e para encontrar o readme.

NH2SXQwcBdpmTEzi3bvBHMM9H66vVXjL

2/36
3/36
Level1-2

Bandit Level 1 → Level 2

Level Goal
The password for the next level is stored in a file called - located in the home directory

Commands you may need to solve this level


ls , cd , cat , file , du , find

Helpful Reading Material


• Google Search for “dashed filename”
• Advanced Bash-scripting Guide - Chapter 3 - Special Characters
-------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------

Bandido Nível 1 → Nível 2


meta de nível

A senha para o próximo nível é armazenada em um arquivo chamado - localizado no diretório inicial
Comandos que você pode precisar para resolver este nível

ls , cd , cat , arquivo , du , localizar


Material de leitura útil

Pesquise no Google por “nome de arquivo tracejado”


Guia Avançado de Script Bash - Capítulo 3 - Caracteres Especiais

ssh -v bandit1@bandit.labs.overthewire.org -p 2220


NH2SXQwcBdpmTEzi3bvBHMM9H66vVXjL

foi usado o “cat ./” para conseguir abrir o arquivo com nome -

4/36
rRGizSaX8Mk1RTb1CNQoXTcYZWU6lgzi

5/36
Level2-3

Bandit Level 2 → Level 3

Level Goal
The password for the next level is stored in a file called spaces in this filename located in the
home directory

Commands you may need to solve this level


ls , cd , cat , file , du , find

Helpful Reading Material


• Google Search for “spaces in filename”
-------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------

Bandido Nível 2 → Nível 3

meta de nível
A senha para o próximo nível é armazenada em um arquivo chamado spaces in this filename
localizado no diretório inicial

Comandos que você pode precisar para resolver este nível


ls , cd , cat , arquivo , du , localizar

Material de leitura útil


• Pesquisa no Google por “espaços no nome do arquivo”

ssh -v bandit2@bandit.labs.overthewire.org -p 2220


rRGizSaX8Mk1RTb1CNQoXTcYZWU6lgzi

foi feito um comando “cat” simples para ver as informações da chave

6/36
aBZ0W5EmUfAf7kHTQeOwd8bauFJ2lAiG

7/36
Level3-4

Bandit Level 3 → Level 4

Level Goal
The password for the next level is stored in a hidden file in the inhere directory.

Commands you may need to solve this level


ls , cd , cat , file , du , find
-------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------

Bandido Nível 3 → Nível 4

meta de nível
A senha para o próximo nível é armazenada em um arquivo oculto no diretório inhere.

Comandos que você pode precisar para resolver este nível


ls , cd , cat , arquivo , du , localizar

ssh -v bandit3@bandit.labs.overthewire.org -p 2220


aBZ0W5EmUfAf7kHTQeOwd8bauFJ2lAiG

foi feito o comando ls com o -a para ver o arquivo oculto e ver a chave.

8/36
2EW7BBsr6aMMoJ2HjW067dm8EgX26xNe

9/36
Level4-5

Bandit Level 4 → Level 5

Level Goal
The password for the next level is stored in the only human-readable file in the inhere directory. Tip:
if your terminal is messed up, try the “reset” command.

Commands you may need to solve this level


ls , cd , cat , file , du , find
-------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------

Bandido Nível 4 → Nível 5

meta de nível
A senha para o próximo nível é armazenada no único arquivo legível por humanos no diretório inhe
re. Dica: se o seu terminal estiver bagunçado, tente o comando “reset”.

Comandos que você pode precisar para resolver este nível


ls , cd , cat , arquivo , du , localizar

ssh -v bandit4@bandit.labs.overthewire.org -p 2220


2EW7BBsr6aMMoJ2HjW067dm8EgX26xNe

foi feito um comando “cat ./-file0*" para abrir todos documento e ver qual era legíviel e depois abrir
o correto.

10/36
lrIWWI6bB37kxfiCQZqUdOIYfr6eEeqR

11/36
Level5-6

Bandit Level 5 → Level 6

Level Goal
The password for the next level is stored in a file somewhere under the inhere directory and has all
of the following properties:
• human-readable
• 1033 bytes in size
• not executable

Commands you may need to solve this level


ls , cd , cat , file , du , find
-------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------

Bandido Nível 5 → Nível 6

meta de nível
A senha para o próximo nível é armazenada em um arquivo em algum lugar no diretório inhere e
possui todas as seguintes propriedades:
• legível por humanos
• 1033 bytes de tamanho
• não executável

Comandos que você pode precisar para resolver este nível


ls , cd , cat , arquivo , du , localizar

ssh -v bandit5@bandit.labs.overthewire.org -p 2220


lrIWWI6bB37kxfiCQZqUdOIYfr6eEeqR

duas formas que encontrei de localizar a chave.

12/36
P4L4vucdmLnm8I7Vl7jG1ApGSfjYKqJU

fontes de pesquisa
https://linuxconfig.org/how-to-use-find-command-to-search-for-files-based-on-file-size
https://www.guiafoca.org/guiaonline/iniciante/ch08s06.html
bandit5@bandit:~/inhere$ man find

13/36
Level6-7

Bandit Level 6 → Level 7

Level Goal
The password for the next level is stored somewhere on the server and has all of the following
properties:
• owned by user bandit7
• owned by group bandit6
• 33 bytes in size

Commands you may need to solve this level


ls , cd , cat , file , du , find , grep
-------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------

Bandido Nível 6 → Nível 7

meta de nível
A senha para o próximo nível é armazenada em algum lugar no servidor e possui todas as seguintes
propriedades:
• propriedade do usuário bandit7
• propriedade do grupo bandit6
• 33 bytes de tamanho

Comandos que você pode precisar para resolver este nível


ls , cd , cat , file , du , find , grep

ssh -v bandit6@bandit.labs.overthewire.org -p 2220


P4L4vucdmLnm8I7Vl7jG1ApGSfjYKqJU

foi usado o comando “find” junto com o “2>/dev/null” para filtrar os arquivos com permissão
negada.

14/36
z7WtoNQU2XfjmMtWA8u5rN4vzqu4v99S

também foi encontrar uma senha em outro arquivo procurando só em grupo mas é a mesma senha
do Level 5

P4L4vucdmLnm8I7Vl7jG1ApGSfjYKqJU

procurando só por usuário foi encontrado outro com permissão negada.

arquivo em comum em todas as pesquisas é o /var/lib/dpkg/info/bandit7.password

15/36
Level7-8

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


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

Bandido Nível 7 → Nível 8

meta de nível
A senha para o próximo nível é armazenada no arquivo data.txt ao lado da palavra millionth

Comandos que você pode precisar para resolver este nível


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

ssh -v bandit7@bandit.labs.overthewire.org -p 2220


z7WtoNQU2XfjmMtWA8u5rN4vzqu4v99S

foi usado o comando “cat” junto com o “grep” para filtrar a palavra millionth

TESKZC0XvTetK0S9xNwm25STk5iWrBvP

16/36
Level8-9

Bandit Level 8 → Level 9

Level Goal
The password for the next level is stored in the file data.txt and is the only line of text that occurs
only once

Commands you may need to solve this level


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

Helpful Reading Material


• Piping and Redirection
-------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------

Bandido Nível 8 → Nível 9

meta de nível
A senha para o próximo nível é armazenada no arquivo data.txt e é a única linha de texto que
ocorre apenas uma vez

Comandos que você pode precisar para resolver este nível


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

Material de leitura útil


• Tubulação e Redirecionamento

ssh -v bandit8@bandit.labs.overthewire.org -p 2220


TESKZC0XvTetK0S9xNwm25STk5iWrBvP

foi usado o comando “sort” para ordenar as linhas do arquivo, o "uniq -u" para mostrar somente a
linha que não se repete.

EN632PlfYiZbn3PhVK3XOGSlNInNE00t

17/36
Level9-10

Bandit Level 9 → Level 10

Level Goal
The password for the next level is stored in the file data.txt in one of the few human-readable
strings, preceded by several ‘=’ characters.

Commands you may need to solve this level


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

Bandido Nível 9 → Nível 10

meta de nível
A senha para o próximo nível é armazenada no arquivo data.txt em uma das poucas strings
legíveis por humanos, precedida por vários caracteres ‘=’.

Comandos que você pode precisar para resolver este nível


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

ssh -v bandit9@bandit.labs.overthewire.org -p 2220


EN632PlfYiZbn3PhVK3XOGSlNInNE00t

foi usado o editor de texto “vi” e o comando / para localizar dentro do arquivo.

G7w8LIi6J3kTb8A7j9LgrywtEUlyyp6s

18/36
também foi usado o comando cat e pesquisei voltando até achar algo parecido com o padrão dos
password

G7w8LIi6J3kTb8A7j9LgrywtEUlyyp6s

19/36
Level10-11

Bandit Level 10 → Level 11

Level Goal
The password for the next level is stored in the file data.txt, which contains base64 encoded data

Commands you may need to solve this level


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

Helpful Reading Material


• Base64 on Wikipedia

Bandido Nível 10 → Nível 11

meta de nível
A senha para o próximo nível é armazenada no arquivo data.txt, que contém dados codificados em
base64

Comandos que você pode precisar para resolver este nível


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

Material de leitura útil


• Base64 na Wikipédia

ssh -v bandit10@bandit.labs.overthewire.org -p 2220


G7w8LIi6J3kTb8A7j9LgrywtEUlyyp6s

senha em base64

VGhlIHBhc3N3b3JkIGlzIDZ6UGV6aUxkUjJSS05kTllGTmI2blZDS3pwaGxYSEJNCg==

usado o comando “base64 --decode” para ver o password.

20/36
6zPeziLdR2RKNdNYFNb6nVCKzphlXHBM

21/36
Level11-12

Bandit Level 11 → Level 12

Level Goal
The password for the next level is stored in the file data.txt, where all lowercase (a-z) and uppercase
(A-Z) letters have been rotated by 13 positions

Commands you may need to solve this level


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

Helpful Reading Material


• Rot13 on Wikipedia
-------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------

Bandido Nível 11 → Nível 12

meta de nível
A senha para o próximo nível é armazenada no arquivo data.txt, onde todas as letras minúsculas
(a-z) e maiúsculas (A-Z) foram rotacionadas em 13 posições

Comandos que você pode precisar para resolver este nível


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

Material de leitura útil


• Rot13 na Wikipédia

ssh -v bandit11@bandit.labs.overthewire.org -p 2220


6zPeziLdR2RKNdNYFNb6nVCKzphlXHBM

foi encontrado password como diz o enunciado criptografado em Rot13.

22/36
Gur cnffjbeq vf WIAOOSFzMjXXBC0KoSKBbJ8puQm5lIEi

acessei o site do rot13 e decodifiquei

JVNBBFSmZwKKOP0XbFXOoW8chDz5yVRv

23/36
Level12-13

Bandit Level 12 → Level 13

Level Goal
The password for the next level is stored in the file data.txt, which is a hexdump of a file that has
been repeatedly compressed. For this level it may be useful to create a directory under /tmp in which
you can work using mkdir. For example: mkdir /tmp/myname123. Then copy the datafile using cp,
and rename it using mv (read the manpages!)

Commands you may need to solve this level


grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd, mkdir, cp, mv, file

Helpful Reading Material


• Hex dump on Wikipedia
-------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------

Bandido Nível 12 → Nível 13

meta de nível
A senha para o próximo nível é armazenada no arquivo data.txt, que é um hexdump de um arquivo
que foi compactado repetidamente. Para este nível pode ser útil criar um diretório em /tmp no qual
você pode trabalhar usando mkdir. Por exemplo: mkdir /tmp/meunome123. Em seguida, copie o
arquivo de dados usando cp e renomeie-o usando mv (leia as páginas de manual!)

Comandos que você pode precisar para resolver este nível


grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd, mkdir, cp, mv, arquivo

Material de leitura útil


• Despejo hexadecimal na Wikipédia

ssh -v bandit12@bandit.labs.overthewire.org -p 2220


JVNBBFSmZwKKOP0XbFXOoW8chDz5yVRv

foi criado a pasta como dito no enunciado e copiado o arquivo para lá e verificando o tipo de arquivo
com o comando “file” depois o “mv” para renomear e depois usando vários tipos de extensões de
compactação de arquivo até chegar no arquivo do password.

24/36
25/36
26/36
27/36
28/36
29/36
wbWdlBxEir4CaE8LaPhauuOo6pwRmrDw

verifiquei que na pasta “tmp” não tenho permissão pra listar mas como sou o usuário logado e
tenho permissão de criar pasta então posso entrar em qualquer pasta, basta saber o nome da pasta
que alguma outra pessoa que também está fazendo as flags possa ter criado, então encontrei uma
pasta “teste” que por acaso já estava como a senha resolvida. O mesmo para pasta mais obvia
“level12”.

30/36
31/36
32/36
Level13-14

Bandit Level 13 → Level 14

Level Goal
The password for the next level is stored in /etc/bandit_pass/bandit14 and can only be read by
user bandit14. For this level, you don’t get the next password, but you get a private SSH key that
can be used to log into the next level. Note: localhost is a hostname that refers to the machine you
are working on

Commands you may need to solve this level


ssh, telnet, nc, openssl, s_client, nmap

Helpful Reading Material


• SSH/OpenSSH/Keys
-------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------

Bandido Nível 13 → Nível 14

meta de nível
A senha para o próximo nível é armazenada em /etc/bandit_pass/bandit14 e só pode ser lida pelo
usuário bandit14. Para este nível, você não obtém a próxima senha, mas obtém uma chave SSH
privada que pode ser usada para fazer login no próximo nível. Nota: localhost é um nome de host
que se refere à máquina em que você está trabalhando

Comandos que você pode precisar para resolver este nível


ssh, telnet, nc, openssl, s_client, nmap

Material de leitura útil


• SSH/OpenSSH/Chaves

ssh -v bandit13@bandit.labs.overthewire.org -p 2220


wbWdlBxEir4CaE8LaPhauuOo6pwRmrDw

Entrei no bandit13, encontrei a chave porém não aceitava entrar de dentro do usuário bandit13 e
nem trocar sua permissão, então copiei os dados da chave, criei uma no meu terminal mas também
não ia. Então dei permissão 700 para acessar.

33/36
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAxkkOE83W2cOT7IWhFc9aPaaQmQDdgzuXCv+ppZHa++buSkN+
gg0tcr7Fw8NLGa5+Uzec2rEg0WmeevB13AIoYp0MZyETq46t+jk9puNwZwIt9XgB
ZufGtZEwWbFWw/vVLNwOXBe4UWStGRWzgPpEeSv5Tb1VjLZIBdGphTIK22Amz6Zb

34/36
ThMsiMnyJafEwJ/T8PQO3myS91vUHEuoOMAzoUID4kN0MEZ3+XahyK0HJVq68KsV
ObefXG1vvA3GAJ29kxJaqvRfgYnqZryWN7w3CHjNU4c/2Jkp+n8L0SnxaNA+WYA7
jiPyTF0is8uzMlYQ4l1Lzh/8/MpvhCQF8r22dwIDAQABAoIBAQC6dWBjhyEOzjeA
J3j/RWmap9M5zfJ/wb2bfidNpwbB8rsJ4sZIDZQ7XuIh4LfygoAQSS+bBw3RXvzE
pvJt3SmU8hIDuLsCjL1VnBY5pY7Bju8g8aR/3FyjyNAqx/TLfzlLYfOu7i9Jet67
xAh0tONG/u8FB5I3LAI2Vp6OviwvdWeC4nOxCthldpuPKNLA8rmMMVRTKQ+7T2VS
nXmwYckKUcUgzoVSpiNZaS0zUDypdpy2+tRH3MQa5kqN1YKjvF8RC47woOYCktsD
o3FFpGNFec9Taa3Msy+DfQQhHKZ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