FS#15746 - [kismet] should be built "make suidinstall"
Attached to Project:
Arch Linux
Opened by orbisvicis (orbisvicis) - Friday, 31 July 2009, 19:21 GMT
Last edited by Angel Velasquez (angvp) - Saturday, 14 May 2011, 07:08 GMT
Opened by orbisvicis (orbisvicis) - Friday, 31 July 2009, 19:21 GMT
Last edited by Angel Velasquez (angvp) - Saturday, 14 May 2011, 07:08 GMT
|
Details
Description:
From http://www.kismetwireless.net/documentation.shtml#readme: make suidinstall creates and extra binary, kismet_capture, which can only be run by members of the "kismet" group and is reposonsible for configuring the card. This significantly reduces attack vectors. "...Distributions are strongly encouraged to use this method..." I think it would be a good idea to provide this build of kismet. Additional info: extra/kismet 2009_06_R1-1 |
This task depends upon
suidinstall needs to change permissions of kismet_capture to the "kismet" group; to do this the "kismet" group must already be present and it is not possible to add a group in fakeroot. I can think of two workarounds. Similarly pacman clients can't install files owned by nonexistent users, though this can be worked around by the pre_install (or whatever) hook.
first:
A bootstrap package that create the kismet group: nothing more that a kismet-bootstrap.install and PKGBUILD.
The actual kismet package makedepends() and depends() on this kismet-bootstrap package
second:
kismet ./configure suidgroup="some-common-group". Afterwards, in post_install (or whatever) the ownership of the kismet_capture binary can be changed. I'm not sure if this will work, though: possibly the suidgroup configuration does more than set the ownership of one file.
third:
any other ideas?
Possibly because of the lookup in /etc/passwd involved, while chown will not accept nonexistent group/user names, it does accept nonexistent IDs.
So, reserve a numerical group id for kismet
then ./configure --with-suidgroup=reserved_id
and in post_install() groupadd kismet -g reserved_id
*This works but generates a groupadd error.
The only difference between "install" and "suidinstall" is the binsuidinstall dependency which does nothing but install one file, kismet_capture. I believe that is the only way that SUIDGROUP is used. This seems pretty simple:
./configure --with-suidgroup=root
post_install() groupadd kismet; chown /usr/bin/kismet_capture root:kismet
The PKGBUILD has been *really* cleaned out. It will also install kismet suid as well as provide the default plugin set that kismet ships.
kismet.install (1.1 KiB)
Anyway… I think that's the way to go for kismet package.