Bandit Level 6 -> Level 7
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
Comandos Utilizados
cd /
find ./ --size 33c -user bandit7 -group bandit6 2>/dev/null
Output
bandit6@bandit:/home$ cd .. bandit6@bandit:/$ find . -size 33c -user bandit7 -group bandit6 2>/dev/null ./var/lib/dpkg/info/bandit7.password bandit6@bandit:/$ cat /var/lib/dpkg/info/bandit7.password morbNTDkSW6jIlUc0ymOdMaLnOlFVAaj
Help do Find
-user uname
File is owned by user uname (numeric user ID allowed).
-group gname
File belongs to group gname (numeric group ID allowed).
-size n[cwbkMG]
File uses less than, more than or exactly n units of space, rounding up. The following suffixes
can be used:
`b' for 512-byte blocks (this is the default if no suffix is used)
`c' for bytes
🧠 Explicaca
Este foi um pouco dificil pois nao pensei que a senha estaria no diretorio raiz, e fiquei testando no home, que ja estava cheio de diretorios, fiquei nessa por um tempo, achando que o problema estava nos comandos do find, que eu tava usando a sintaxe errada, ate tentar o find no diretorio raiz e ele me retornar a senha do proximo nivel.
Last updated