/service/* stays up

This commit is contained in:
Neale Pickett 2011-09-23 16:57:26 -06:00
parent 8f009026a7
commit c86c2c59b7
30 changed files with 38 additions and 68 deletions

View File

@ -22,7 +22,7 @@ $(IRCD_BUILDDIR)/source: $(IRCD_TAR)
ircd-build: $(IRCD_BUILDDIR)/built
$(IRCD_BUILDDIR)/built: $(IRCD_BUILDDIR)/source
cd $(IRCD_SRCDIR) && ./configure $(CONFIG_XCOMPILE_FLAGS)
cd $(IRCD_SRCDIR) && ./configure $(CONFIG_XCOMPILE_FLAGS) --enable-ipv6
$(MAKE) -C $(IRCD_SRCDIR)
touch $@

View File

@ -0,0 +1,4 @@
#! /bin/sh
IP=$(cat ip.txt)
ip addr del $IP dev eth0

View File

@ -0,0 +1 @@
fd84:b410:3441::6/64

View File

@ -1,7 +1,11 @@
[Global]
Name = irc.ctf
Info = CTF IRC
AdminInfo1 = CTF IRC Server
AdminInfo2 = The table at the front of the room
AdminEmail = zephyr@dirtbags.net
MotdPhrase = "welcome datacomp"
Listen = fd84:b410:3441::6
[Operator]
Name = oper

View File

@ -2,6 +2,11 @@
exec 2>&1
ip addr add fd84:b410:3441::6 label eth0:ircd dev eth0
IP=$(cat ip.txt)
ip addr add $IP label eth0:ircd dev eth0
ip monitor | grep -q $IP
exec /opt/ircd/bin/ngircd --config ./ngircd.conf --nodaemon
adduser -S -H -u 65534 nobody
adduser -S -H irc
exec setuidgid irc /opt/ircd/bin/ngircd --config ./ngircd.conf --nodaemon

View File

@ -1 +1 @@
10.0.0.14/24
fd84:b410:3441::07a6/64

View File

@ -22,4 +22,4 @@ done
mkdir -p sites
cd sites
ln -sf /var/www default
exec tcpsvd -u ctf $IP 80 /opt/mcp/bin/fnord-cgi
exec tcpsvd -u ctf ${IP%/*} 80 /opt/mcp/bin/fnord-cgi

View File

@ -19,8 +19,8 @@
<a href="scoring.html">About scoring</a>
</li>
<li>
<a href="irc://10.0.0.2/ctf"
title="IRC on 10.0.0.2, channel #ctf">Contest chat</a>
<a href="irc://[fd84:b410:3441::6]/ctf"
title="IRC on fd84:b410:3441::6, channel #ctf">Contest chat</a>
carries important announcements, and sometimes clues and
puzzles.
</li>
@ -42,16 +42,13 @@
<h2>Rules</h2>
<ul>
<li>
No ARP-level attacks: this includes IP spoofing.
</li>
<li>
No DoS attacks.
</li>
<li>
Do not attack machines outside the contest network
(10.<i>x</i>.<i>x</i>.<i>x</i>). Low ports (under 1024) do not
run contest categories.
Do not attack machines outside <samp>fd84:b410:3441::/48</samp>.
Low ports (under 1024) do not run contest categories, don't
waste your time.
</li>
<li>
Consider the contest network hostile. It is up to you to

View File

@ -6,8 +6,6 @@ printf-install: printf-build
mkdir -p $(PRINTF_PKGDIR)/bin/
$(MAKE) -C packages/printf/src install DESTDIR=$(CURDIR)/$(PRINTF_PKGDIR)
$(call COPYTREE, packages/printf/tokens, $(PRINTF_PKGDIR)/tokens)
$(call COPYTREE, packages/printf/service, $(PRINTF_PKGDIR)/service)
printf-clean:

View File

@ -1 +1 @@
10.0.0.91
fd84:b410:3441::2329/64

View File

@ -3,7 +3,8 @@
exec 2>&1
IP=$(cat ip.txt)
ip addr add $IP label eth0:printf dev eth0
ip addr add $IP dev eth0
ip monitor | grep -q $IP
# So I say to him, "Alex, what's a good high port number for a CTF category?"
# And he says, "6"

View File

@ -1,8 +1,3 @@
#! /bin/sh
chpst -u 9001 -/ /opt/printf/bin ./printf \
3< /var/lib/ctf/tokens/printf0 \
4< /var/lib/ctf/tokens/printf1 \
5< /var/lib/ctf/tokens/printf2 \
6< /var/lib/ctf/tokens/printf3 \
7< /var/lib/ctf/tokens/printf4
exec chpst -u 9001 -/ /opt/printf/bin ./printf

View File

@ -5,7 +5,7 @@ TARGETS = printf
all: build
build: $(TARGETS)
printf: printf.o token.o
printf: printf.o
install: $(TARGETS)
install -m 0755 $(TARGETS) $(DESTDIR)/bin

View File

@ -1,7 +1,6 @@
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include "token.h"
void
record(char *buf) {
@ -19,40 +18,24 @@ record(char *buf) {
fputc('\n', stderr);
}
uint8_t const key[] = {0x98, 0x37, 0x92, 0x7d,
0xa5, 0x6d, 0xc9, 0x61,
0xca, 0x97, 0xf8, 0xa5,
0xfe, 0x0f, 0xf6, 0xfc};
/* Storage space for tokens */
char token[5][TOKEN_MAX];
char *token[5] = {
"printf:xylep-radar-nanox",
"printf:xylep-radar-nanox",
"printf:xylep-radar-nanox",
"printf:xylep-radar-nanox",
"printf:xylep-radar-nanox"
};
/* Make this global so the stack isn't gigantic */
char global_fmt[8000] = {0};
/* Since this runs in a chroot jail, and setting up all the symlinks is
* a pain in the butt, we just read from file discriptors passed in.
* Pipes are the best thing. :D
*/
void
read_tokens()
{
int i;
ssize_t len;
for (i = 0; i < sizeof(token)/sizeof(*token); i += 1) {
len = read_token_fd(i + 3, key, sizeof(key), token[i], sizeof(token[i]));
if (len >= sizeof(token[i])) abort();
token[i][len] = '\0';
}
}
int
main(int argc, char *argv[], char *env[])
{
char *t0 = token[0];
int t1[TOKEN_MAX];
int t1[100];
char *fmt = global_fmt;
char *datacomp = "welcome datacomp";
int token4_flag = 0;
@ -64,8 +47,6 @@ main(int argc, char *argv[], char *env[])
/* So the compiler won't complain about unused variables */
i = datacomp[0] ^ t0[0];
read_tokens();
/* Token 0 just hangs out on the stack */
/* Set up token 1 (%c%c%c%c...) */

View File

@ -1 +0,0 @@
printf

View File

@ -1 +0,0 @@
偦轎奫^,5嗥贠教

View File

@ -1 +0,0 @@
<EFBFBD>7<EFBFBD>}<7D>m<EFBFBD><61><CA97><EFBFBD><0F><>

View File

@ -1 +0,0 @@
printf

View File

@ -1 +0,0 @@
偦轎奫^,5嗥贠教

View File

@ -1 +0,0 @@
<EFBFBD>7<EFBFBD>}<7D>m<EFBFBD><61><CA97><EFBFBD><0F><>

View File

@ -1 +0,0 @@
printf

View File

@ -1 +0,0 @@
偦轎奫^,5嗥贠教

View File

@ -1 +0,0 @@
<EFBFBD>7<EFBFBD>}<7D>m<EFBFBD><61><CA97><EFBFBD><0F><>

View File

@ -1 +0,0 @@
printf

View File

@ -1 +0,0 @@
偦轎奫^,5嗥贠教

View File

@ -1 +0,0 @@
<EFBFBD>7<EFBFBD>}<7D>m<EFBFBD><61><CA97><EFBFBD><0F><>

View File

@ -1 +0,0 @@
printf

View File

@ -1 +0,0 @@
偦轎奫^,5嗥贠教

View File

@ -1 +0,0 @@
<EFBFBD>7<EFBFBD>}<7D>m<EFBFBD><61><CA97><EFBFBD><0F><>

View File

@ -1,7 +1,7 @@
TANKS_PKGDIR = $(TARGET)/tanks
TANKS_CACHE = $(CACHE)/tanks.git
TANKS_BUILDDIR = $(BUILD)/tanks
TANKS_URL = "http://woozle.org/~neale/projects/ctanks"
TANKS_URL = "http://dirtbags.net/projects/tanks"
$(TANKS_CACHE):
git clone --bare $(TANKS_URL) $@
@ -23,7 +23,6 @@ tanks-install: tanks-build
$(call COPYTREE, packages/tanks/html, $(TANKS_PKGDIR)/html)
cp packages/mcp/www/ctf.css $(TANKS_PKGDIR)/html/style.css
cp packages/mcp/www/grunge.png $(TANKS_PKGDIR)/html
cp $(TANKS_BUILDDIR)/nav.html.inc $(TANKS_PKGDIR)/html
cp $(TANKS_BUILDDIR)/tanks.js $(TANKS_PKGDIR)/html
cp $(TANKS_BUILDDIR)/forf.html $(TANKS_PKGDIR)/html