chapter 6, installing kernel headers

Richard Lightman richard at nezumi.plus.com
Fri Jan 17 03:29:36 PST 2003


* Timothy Bauscher <timothy at linuxfromscratch.org> [2003-01-17 08:19]:
> On Fri, Jan 17, 2003 at 01:58:24AM +0100, Axel wrote:
> > I think wrong ownerships of this files could lead to damage system
> > integrity if an user take profit of that and IMHO it should be relevant to the
> > book to prevent that and to TELL (not just advice) to chown the kernel
> > tree.
>
> Newer versions of tar support the --no-same-user option,
> so user/group permissions are automagically set accordingly.
> That's one more reason to put tar-1.13.25 in the book.
>
Better still, do not ever extract tar archives as root:

[root at urusai root]# echo -e '#! /bin/bash\necho Not trojanned' >/bin/trojan
[root at urusai root]# chmod 755 /bin/trojan
[root at urusai root]# trojan
Not trojanned
[root at urusai root]# tar -t </var/tmp/crack.tar
crack/
crack/bin
crack/bin/trojan
[root at urusai root]# tar -x </var/tmp/crack.tar
[root at urusai root]# trojan
#! /bin/cat

This is the trojanned version
[root at urusai root]#


That could just as easily install a static ps or ls that installs a
root kit.

Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crack.tar
Type: application/x-tar
Size: 10240 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20030117/ff8571e1/attachment.tar>


More information about the lfs-dev mailing list