diff --git a/doc/ideas.txt b/doc/ideas.txt index 52954ed..6f3bb73 100644 --- a/doc/ideas.txt +++ b/doc/ideas.txt @@ -14,7 +14,8 @@ Ideas for puzzles * Broken startup scripts, when fixed award more points * Lots of remote exploits * "qemu -net socket" vpn thingy and then... -* sfxrar packed with upx. Change an instruction so it won't actually execute. +* sfxrar packed with upx. Change an instruction so it won't actually + execute. Capture the Packet diff --git a/packages/mcp/src/puzzler.cgi.c b/packages/mcp/src/puzzler.cgi.c index 4c71c5c..2fdbe36 100644 --- a/packages/mcp/src/puzzler.cgi.c +++ b/packages/mcp/src/puzzler.cgi.c @@ -49,7 +49,7 @@ main(int argc, char *argv[]) char *p; for (p = category; *p; p += 1) { - if (! isalnum(*p)) { + if ((! isalnum(*p)) && ('-' != *p)) { cgi_page("Invalid category", ""); } } diff --git a/packages/mcp/www/ctf.css b/packages/mcp/www/ctf.css index 8bc503b..90fff8a 100644 --- a/packages/mcp/www/ctf.css +++ b/packages/mcp/www/ctf.css @@ -162,4 +162,6 @@ table.pollster thead { font-weight: bold; } - +table.scoreboard { + height: 400px; +} diff --git a/packages/octopus/solution.sh b/packages/octopus/solution.sh index 3745ab0..a3b938e 100755 --- a/packages/octopus/solution.sh +++ b/packages/octopus/solution.sh @@ -1,14 +1,15 @@ #! /bin/sh port=8888 +host=10.0.0.10 blooper=$(tempfile) trap "rm $blooper" 0 -echo foo | socat -t 0.01 STDIO UDP:127.0.0.1:8888 | tail -n +4 > $blooper +echo foo | socat -t 0.01 STDIO UDP:$host:$port | tail -n +4 > $blooper for i in $(seq 8); do - result=$(socat -t 0.01 STDIO UDP:127.0.0.1:$port < $blooper | awk -F': ' '(NF > 1) {print $2; exit;}') + result=$(socat -t 0.01 STDIO UDP:$host:$port < $blooper | awk -F': ' '(NF > 1) {print $2; exit;}') port=$(echo "ibase=8; $result" | bc) echo $port done diff --git a/packages/pwnables/service/eth0.pwn/run b/packages/pwnables/service/eth0.pwn/run index a6b4415..c5aeb14 100755 --- a/packages/pwnables/service/eth0.pwn/run +++ b/packages/pwnables/service/eth0.pwn/run @@ -1,8 +1,10 @@ #! /bin/sh -if ! [ -d /opt/mcp ]; then - hostname pwnables - ifconfig eth0 10.0.0.10 netmask 255.0.0.0 +if [ -d /opt/mcp ]; then + sv d . + exit fi +hostname pwnables +ifconfig eth0 10.0.0.10 netmask 255.0.0.0 exec inotifyd true $(pwd):x diff --git a/pwnables/service/sshd.pwn/run b/pwnables/service/sshd.pwn/run index 491adf6..1100af4 100755 --- a/pwnables/service/sshd.pwn/run +++ b/pwnables/service/sshd.pwn/run @@ -1,8 +1,10 @@ #! /bin/sh exec 2>&1 + if [ -d /opt/mcp ]; then sv d . exit fi + exec dropbear -r ./rsa.key -E -F