• info@fabriziosebis.com
  • Cagliari, Sardinia, Italy
Wi-Fi
OverTheWire – Bandit Level 6 → Level 8

OverTheWire – Bandit Level 6 → Level 8

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

bandit6@bandit:~$ find / -user bandit7 -group bandit6 -size 33c 2>/dev/null
/var/lib/dpkg/info/bandit7.password
bandit6@bandit:~$ cat /var/lib/dpkg/info/bandit7.password
HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs

 

Per risolvere questo livello è stato  utilizzato find.

/ specifica a find di cercare in tutte le cartelle dalla root o radice in su,  le opzioni -user  -group e -size permettono di restringere ancora la ricerca e di trovare la password. Da notare 2>/dev/null dopo il comando find che serve a scartare gli errori di output, per capire meglio basta provare a lanciare lo stesso comando find senza 2>/dev/null . Una volta individuata la posizione della password basta un semplice cat per leggere il file.

 

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

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

Per risolvere  questo livello è stato utilizzato un nuovo comando: grep;

Il filtro grep cerca in un file un particolare insieme di caratteri e visualizza tutte le righe che contengono tale insieme. Il modello o insieme cercato nel file viene definito espressione regolare (grep sta per ricerca globale di espressione regolare e stampa).

Lascia un commento

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