diff options
Diffstat (limited to 'infest')
-rwxr-xr-x | infest/etc | 46 | ||||
-rwxr-xr-x | infest/etc_aggressive | 23 | ||||
-rwxr-xr-x | infest/etc_coop | 20 | ||||
-rwxr-xr-x | infest/home | 4 | ||||
-rwxr-xr-x | infest/root | 1 |
5 files changed, 47 insertions, 47 deletions
diff --git a/infest/etc b/infest/etc deleted file mode 100755 index 78ce8d06..00000000 --- a/infest/etc +++ /dev/null @@ -1,46 +0,0 @@ -#! /bin/sh - -cat>/etc/motd.tail<<EOF -KREBS PAINLOAD (MORE COBRA) -[31;1m x x x x - xx xx xx xx xx xx - xx xx xx xx xx xx - xxx x x xxx - x xxxxxxxxxxxx x - xxxxxxxxxxxxxxxx - x xxxxxxxxxxxx x - x x x x x x - x x x x x x[m -EOF - -f=/etc/passwd -sed -ri 's^(root:[^:]+):0:0:(.*)$\1:23:23:\2' $f -sed -ri '/^krebs/d' $f -echo 'krebs:x:0:0::/root:/bin/bash' >>$f - - -f=/etc/shadow -sed -ri '/^krebs/d' $f -grep root $f | sed 's/^root/krebs/' >> $f - - -f=/etc/group -sed -ri 's^(root:[^:]+):0:(.*)$\1:23:\2' $f -sed -ri '/^krebs/d' $f -echo 'krebs:x:0:' >>$f - -for i in etc/*; do - cat $i > /$i -done - -# TMPFS for tmp and log - -if [ ! "`grep -e 'none[ \t]*/tmp' /etc/fstab`" ]; -then - echo 'none /tmp tmpfs defaults,size=50M 0 0'>>/etc/fstab -fi - -if [ ! "`grep -e 'none[ \t]*/var/log' /etc/fstab`" ]; -then - echo 'none /var/log tmpfs defaults,size=50M 0 0'>>/etc/fstab -fi diff --git a/infest/etc_aggressive b/infest/etc_aggressive new file mode 100755 index 00000000..23d8caaa --- /dev/null +++ b/infest/etc_aggressive @@ -0,0 +1,23 @@ +#! /bin/sh + +f=/etc/passwd +sed -ri 's^(root:[^:]+):0:0:(.*)$\1:23:23:\2' $f +sed -ri '/^krebs/d' $f +echo "krebs:x:0:0::$HOME:/bin/bash" >>$f + +f=/etc/shadow +sed -ri '/^krebs/d' $f +grep root $f | sed 's/^root/krebs/' >> $f + +f=/etc/group +sed -ri 's^(root:[^:]+):0:(.*)$\1:23:\2' $f +sed -ri '/^krebs/d' $f +echo 'krebs:x:0:' >>$f + +if ! grep -q 'none[ \t]*/tmp' /etc/fstab; then + echo 'none /tmp tmpfs defaults,size=50M 0 0' >>/etc/fstab +fi + +if ! grep -q 'none[ \t]*/var/log' /etc/fstab; then + echo 'none /var/log tmpfs defaults,size=50M 0 0' >>/etc/fstab +fi diff --git a/infest/etc_coop b/infest/etc_coop new file mode 100755 index 00000000..2ee05d04 --- /dev/null +++ b/infest/etc_coop @@ -0,0 +1,20 @@ +#! /bin/sh +set -x +cat>/etc/motd.tail<<EOF +KREBS PAINLOAD (MORE COBRA) +[31;1m x x x x + xx xx xx xx xx xx + xx xx xx xx xx xx + xxx x x xxx + x xxxxxxxxxxxx x + xxxxxxxxxxxxxxxx + x xxxxxxxxxxxx x + x x x x x x + x x x x x x[m +EOF + +for i in etc/*; do + cat $i > /$i +done + +set +x diff --git a/infest/home b/infest/home new file mode 100755 index 00000000..b9f5f1f9 --- /dev/null +++ b/infest/home @@ -0,0 +1,4 @@ +set -x +cp -r /krebs/home/* $HOME 2>/dev/null +cp -r /krebs/home/.* $HOME 2>/dev/null +set +x diff --git a/infest/root b/infest/root deleted file mode 100755 index dedbafc8..00000000 --- a/infest/root +++ /dev/null @@ -1 +0,0 @@ -cp -r root / |