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


비밀번호는 서버 어딘가에 존재한다. 해당 파일속성은 다음과같다.

  • 소유자는 bandit7
  • 소유그룹은 bandit6
  • 크기는 33byte

 

bandit6@bandit:~$ find / -size 33c -user bandit7 -group bandit6 -exec sh -c "file {};" \; 2>/dev/null
/var/lib/dpkg/info/bandit7.password: ASCII text
bandit6@bandit:~$ cat /var/lib/dpkg/info/bandit7.password
z7WtoNQU2XfjmMtWA8u5rN4vzqu4v99S

 

find / -size 33c -user bandit7 -group bandit6 -exec sh -c "file {};" \; 2>/dev/null

  • -user bandit7: 소유자가 bandit7인 데이터를 찾는다.
  • -grup bandit6: 소유그룹이 bandit6인 데이터를 찾는다.
  • 2>/dev/null: permission denied와 같은 에러는 표시하지 않는다.

+ Recent posts