[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Autoclean /var/tmp ?



Peter Jordan schrieb:

> Manfred Schmitt, 03/26/08 14:59:
> 
> > Das noexec einen bewanderten Nutzer nicht davon abhaelt irgendwelche
> > Programme zu starten ist Dir soweit bekannt?
> > sh ./programm_auf_noexec_partition
> 
> main12:/tmp # mount | grep /tmp
> /dev/mapper/tmp on /tmp type ext3 (rw,noexec,acl)
> main12:/tmp # cp /bin/date ./
> main12:/tmp # ls -l date
> -rwxr-x--- 1 root root 55052 2008-03-27 08:39 date
> main12:/tmp # ./date
> bash: ./date: Permission denied
> main12:/tmp # sh ./date
> ./date: ./date: cannot execute binary file
> main12:/tmp # /lib/ld-linux.so.2 ./date
> ./date: error while loading shared libraries: ./date: failed to map
> segment from shared object: Operation not permitted
> 
> Was gibt es noch für Möglichkeiten?
> 
OK, das ganze ist wohl doch etwas komplizierter:

desktop:/dev/shm# mount -o remount,noexec /dev/shm
desktop:/dev/shm# mount | grep shm
tmpfs on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
desktop:/dev/shm# echo "echo yep" > test5
desktop:/dev/shm# sh ./test5 
yep

Packe ich ein Skript das z.B. wget aufruft auf die noexec-Partition klappt 
es auch. Und zumindest bei statisch gelinkten binarys duerfte die Ausfuehrung 
wohl ebenso klappen.

Und wech,
Manne

P.S.: Ach wie scheon, liszt.debian.org laeuft wohl wieder :-)


Reply to: