[gull] daemon

Pierre Maitre maitre at cdg.ch
Sun Mar 14 11:38:01 CET 2004


Marc SCHAEFER wrote:

> Exemple:
> 
>    schaefer at defian:/tmp% date > file_1
>    schaefer at defian:/tmp% ln -s file_1 blabla.truc.42
>    schaefer at defian:/tmp% cat blabla.truc.42 
>    Sat Mar 13 17:42:23 MET 2004
>    schaefer at defian:/tmp% echo > blabla.truc.42 'test'
>    schaefer at defian:/tmp% cat file_1 
>    test
> 
> Ce genre d'attaque est connu. Pour s'en prémunir, créer un répertoire:

Pourtant, si les permissions sont correctes, l'attaque est refusée (voir 
ci-dessous) ou ai-je mal compris ce que tu veux démontrer ci-dessus?

maitre at anesth1:/tmp$ su -
Password:
anesth1:~# cd /tmp
anesth1:/tmp# ls -ld
drwxrwxrwt 16 root root  4096 mar 14 11:23 .
anesth1:/tmp# date > file_1
anesth1:/tmp# ln -s file_1 blabla.truc.42
anesth1:/tmp# cat blabla.truc.42
dim mar 14 11:28:59 CET 2004
anesth1:/tmp# exit
logout
maitre at anesth1:/tmp$ cd /tmp
maitre at anesth1:/tmp$ ls -ld
drwxrwxrwt   16 root     root         4096 mar 14 11:29 .
maitre at anesth1:/tmp$ ls -l file_1  blabla.truc.42
lrwxrwxrwx 1 root root   6 mar 14 11:29 blabla.truc.42 -> file_1
-rw-r--r-- 1 root root  29 mar 14 11:28 file_1
maitre at anesth1:/tmp$ echo > blabla.truc.42 'test'
bash: blabla.truc.42: Permission denied


Pierre

-- 
Dr Pierre-O. Maitre
Privat Docent
FMH Anesthésiologie
FMH Pharmacologie Clinique
Cabinet médical / A la Joy
CH-1272 Genolier Switzerland




More information about the gull mailing list