在 Linux 上查找具有功能集的文件

Ole*_*Ole 2 linux security find

我可以复制/bin/cat/tmp/test运行sudo setcap cap_dac_read_search+ep /tmp/test。然后我将拥有一个可以读取任何其他文件(例如/etc/shadow)的文件。

如何在文件系统中搜索具有功能集的文件,以查看是否已创建任何此类文件?

qui*_*tic 5

你会使用getcap(顾名思义setcap)。

$ getcap -r /
/bin/foo = cap_bar+ep
/usr/bin/bar = cap_foo+eip
Run Code Online (Sandbox Code Playgroud)