Pwnables working again, no more syslog

This commit is contained in:
Neale Pickett 2011-02-08 17:04:08 -07:00
parent 3bdcb69e9f
commit d82e06f413
19 changed files with 26 additions and 22 deletions

View File

@ -1,4 +1,6 @@
#! /bin/sh #! /bin/sh -e
PATH=/bin:/opt/ctfbase/bin; export PATH
while true; do while true; do
# Get new tokens # Get new tokens
@ -7,8 +9,8 @@ while true; do
puzzle=$(basename $dn) puzzle=$(basename $dn)
category=$(cat $dn/category) category=$(cat $dn/category)
busybox nc 10.0.0.2 1 \ busybox nc 10.0.0.2 1 \
-e /opt/tokens/bin/tokencli $category $dn/category.key 3>&1 | \ -e tokencli $category $dn/category.key 3>&1 | \
/opt/tokens/bin/arc4 $dn/enc.key > /var/lib/ctf/tokens/$puzzle arc4 $dn/enc.key > /var/lib/ctf/tokens/$puzzle
done done
# Fetch list of teams # Fetch list of teams

View File

@ -1,3 +1,4 @@
#! /bin/sh #! /bin/sh
exec logger -t tokencli exec svlogd -tt $PWD

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
exec logger -t ircd exec svlogd -tt $PWD

View File

@ -1,4 +1,3 @@
#! /bin/sh #! /bin/sh
# I'm sorry this is confusing. exec svlogd -tt $PWD
exec logger -t logger

View File

@ -3,4 +3,4 @@
exec 2>&1 exec 2>&1
IP=$(cat ip.txt) IP=$(cat ip.txt)
ip addr add $IP label eth0:logger dev eth0 ip addr add $IP label eth0:logger dev eth0
exec tcpsvd ${IP#/*} 1958 /opt/logger/bin/logger exec tcpsvd ${IP%/*} 1958 /opt/logger/bin/logger

View File

@ -1,5 +1,7 @@
#! /bin/sh -e #! /bin/sh -e
PATH=/bin:/opt/ctfbase/bin
if [ $# -ne 1 ]; then if [ $# -ne 1 ]; then
echo "Usage: $0 TEAM" 1>&2 echo "Usage: $0 TEAM" 1>&2
exit 64 exit 64
@ -51,5 +53,5 @@ echo "$color" > $base/teams/colors/$hash
echo "Registered with hash: $hash" echo "Registered with hash: $hash"
# Create encrypted listing of teams # Create encrypted listing of teams
ls $base/teams/names | KEY="Too much cheese." /opt/mcp/bin/arc4 > $www/teams.txt.$$ ls $base/teams/names | KEY="Too much cheese." arc4 > $www/teams.txt.$$
mv $www/teams.txt.$$ $www/teams.txt mv $www/teams.txt.$$ $www/teams.txt

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
exec logger -t httpd exec svlogd -tt $PWD

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
exec logger -t mcp exec svlogd -tt $PWD

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
exec logger -t puzzles exec svlogd -tt $PWD

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
exec logger -t tokend exec svlogd -tt $PWD

View File

@ -2,4 +2,4 @@
IP=$(cat ../octopus/ip.txt) IP=$(cat ../octopus/ip.txt)
sv s octopus >/dev/null || exit 1 sv s octopus >/dev/null || exit 1
exec tcpsvd ${IP#/*} 8888 ./octopus-redirect exec tcpsvd ${IP%/*} 8888 ./octopus-redirect

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
exec logger -t octopus exec svlogd -tt $PWD

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
exec logger -t printf exec svlogd -tt $PWD

View File

@ -11,4 +11,4 @@ ip addr add $IP label eth0:printf dev eth0
# And he says, "how about 9001, because that's bigger than 9000" # And he says, "how about 9001, because that's bigger than 9000"
# Okay. # Okay.
exec tcpsvd ${IP#/*} 9001 ./run-printf exec tcpsvd ${IP%/*} 9001 ./run-printf

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
exec logger -t pwnables exec svlogd -tt $PWD

View File

@ -39,4 +39,4 @@ for puzzle in gimmie ltraceme straceme killme; do
ln -sf /mnt/pwnables-root/var/lib/ctf/tokens/$puzzle /var/lib/ctf/tokens/$puzzle ln -sf /mnt/pwnables-root/var/lib/ctf/tokens/$puzzle /var/lib/ctf/tokens/$puzzle
done done
exec tcpsvd -C 5:"Let's not be greedy" 0 23 /sbin/telnetd -l ./pwnie exec tcpsvd -C 5:"Let's not be greedy" ${IP%/*} 23 /sbin/telnetd -l ./pwnie

View File

@ -7,4 +7,4 @@ ip addr add $IP label eth0:rlyeh dev eth0
dir=/var/lib/ctf/rlyeh dir=/var/lib/ctf/rlyeh
install -o nobody -d $dir install -o nobody -d $dir
exec setuidgid nobody tcpsvd ${IP#/*} 1928 ./rlyeh-ctf exec setuidgid nobody tcpsvd ${IP%/*} 1928 ./rlyeh-ctf

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
exec logger -t sshd exec svlogd -tt $PWD

View File

@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
exec logger -t tanks exec svlogd -tt $PWD