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

解密

bandit6@bandit:~$ find /  -type f -size 33c -user bandit7 -group bandit6 2>&1 | grep -v denied | grep -v 'No such'
/var/lib/dpkg/info/bandit7.password
bandit6@bandit:~$ cat /var/lib/dpkg/info/bandit7.password
HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs

知识点

  1. find命令-user指定文件所属用户
  2. find命令-group指定文件所属用户组
  3. 2>&1重定向标准错误输出到标准输出
  4. grep -v用于去除匹配输出