gpt4 book ai didi

linux - Linux 上有效的 suid/sgid 可执行文件列表?

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:31:23 31 4
gpt4 key购买 nike

谁能告诉我在哪里可以找到 Linux(最好是 Ubuntu)上的有效 suid/guid 程序列表?

注意我可以使用 find 来获取我机器上的 suid/sgid 程序列表,但我想知道它们是否是真正有效的程序;有没有我可以比较它们的列表?

最佳答案

一个答案(来自 Rmano on askubuntu , )复制如下:

一个想法 - 但需要在脚本方面做一些工作 --- 做我的客人 ;-)

Find a suid/sgid file; let's call it scommand

Check from which package has been installed:

dpkg -S /full/path/to/scommand

Compare its permission with the original deb package, by firstly downloading the package:

apt-get download package

Check if the command should have the suid set in the package with

dpkg -c package*deb | grep /full/path/to/scommand

cleanup, rinse, repeat.

例子:

[罗马音:~/tmp] % ls -l/bin/passwdls: 无法访问/bin/passwd: 没有那个文件或目录[罗马诺:~/tmp] 2% ls -l/usr/bin/passwd-rwsr-xr-x 1 root root 47032 2014 年 2 月 17 日/usr/bin/passwd[罗马音:~/tmp] % dpkg -S/usr/bin/passwd密码:/usr/bin/密码[romano:~/tmp] % apt-get 下载密码获取:1 http://archive.ubuntu.com/ubuntu/可信/主密码 amd64 1:4.1.5.1-1ubuntu9 [755 kB]在 1 秒内获取 755 kB (487 kB/s)[罗马音:~/tmp] % dpkg -c passwd*.deb| grep/usr/bin/密码-rwsr-xr-x root/root 47032 2014-02-17 03:42 ./usr/bin/passwd

关于linux - Linux 上有效的 suid/sgid 可执行文件列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26800188/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com