Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /home1/fabrizi4/public_html/blog/wp-content/plugins/revslider/includes/output.class.php on line 1912
OverTheWire – Bandit Level 8 → Level 9 – Into the net
  • info@fabriziosebis.com
  • Cagliari, Sardinia, Italy
Wi-Fi
OverTheWire – Bandit Level 8 → Level 9

OverTheWire – Bandit Level 8 → Level 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

Come sempre per accedere al livello si esegue  il comando ssh seguito dal nome utente @ host alla quale ci si vuole collegare e con -p si specifica la porta logica.

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

cvX2JJa4CFALtqS87jk27qwqGhBM9plV

Appena entrati partiamo subito con ls -la ( un precisazione: –la sono opzioni che uso per abitudine ma non sono necessarie in questo contesto) per individuare il file data.txt e una volta assicurati che il file sia presente, con cat proviamo a leggere il contenuto che genera taaante stringhe o meglio tante password, solo una è quella giusta.
Andarla a cercare manualmente sarebbe più facile se le righe fossero ordinate, ma si può fare di meglio con il suggerimento di Helpful Reading Material Piping and Redirection .

bandit8@bandit:~$ ls -la
total 56
drwxr-xr-x  2 root    root     4096 May  7  2020 .
drwxr-xr-x 41 root    root     4096 May  7  2020 ..
-rw-r--r--  1 root    root      220 May 15  2017 .bash_logout
-rw-r--r--  1 root    root     3526 May 15  2017 .bashrc
-rw-r-----  1 bandit9 bandit8 33033 May  7  2020 data.txt
-rw-r--r--  1 root    root      675 May 15  2017 .profile
bandit8@bandit:~$ cat data.txt
VkBAEWyIibVkeURZV5mowiGg6i3m7Be0
zdd2ctVveROGeiS2WE3TeLZMeL5jL7iM
sYSokIATVvFUKU4sAHTtMarfjlZWWj5i
ySvsTwlMgnUF0n86Fgmn2TNjkSOlrV72
NLWvtQvL7EaqBNx2x4eznRlQONULlCYZ
LfrBHfAh0pP9bgGAZP4QrVkut3pysAYC
U0NYdD3wHZKpfEg9qGQOLJimAJy6qxhS
flyKxCbHB8uLTaIB5LXqQNuJj3yj00eh
TThRArdF2ZEXMO47TIYkyPPLtvzzLcDf
cIPbot7oYveUPNxDMhv1hiri50CqpkTG
kJTBMD8k9OHyXwZ2aJMQkV23u0gyuoIO
J6Lzp6ZqTJsOuJRTXcvhwKfM0KK3Xtbl
NLWvtQvL7EaqBNx2x4eznRlQONULlCYZ

Le mettiamo in ordine con il semplice comando sort e poi usando pipe, ovvero | ,possiamo usare uniq -u che stampa le righe uniche (ordinate con sort), nel nostro caso l’unica password per andare al livello successivo.

bandit8@bandit:~$ sort data.txt | uniq -u
UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *