From 06fd1a2c877168ec34c31a16233861ed17109576 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Wed, 7 Oct 2009 22:57:32 -0600 Subject: [PATCH] Potential new pwnables image --- {heartbeatd => pollster}/in.heartbeatd | 0 {heartbeatd => pollster}/run.heartbeatd | 0 pwnables/Makefile | 12 +----- pwnables/fingerd/Makefile | 1 - pwnables/fingerd/in.fingerd.c | 38 ------------------- pwnables/fingerd/run | 3 -- pwnables/skel/home/flag/.plan | 1 + pwnables/{ => skel/usr/lib/www}/cat.cgi | 0 pwnables/skel/var/lib/cat/flag | 1 + pwnables/skel/var/lib/notes/flag | 1 + pwnables/skel/var/lib/tftp/flag | 1 + .../skel/var/service/heartbeat/run | 0 pwnables/tftpd/run | 3 -- 13 files changed, 6 insertions(+), 55 deletions(-) rename {heartbeatd => pollster}/in.heartbeatd (100%) rename {heartbeatd => pollster}/run.heartbeatd (100%) delete mode 100644 pwnables/fingerd/Makefile delete mode 100644 pwnables/fingerd/in.fingerd.c delete mode 100755 pwnables/fingerd/run create mode 100644 pwnables/skel/home/flag/.plan rename pwnables/{ => skel/usr/lib/www}/cat.cgi (100%) create mode 100644 pwnables/skel/var/lib/cat/flag create mode 100644 pwnables/skel/var/lib/notes/flag create mode 100644 pwnables/skel/var/lib/tftp/flag rename heartbeatd/run.heartbeat => pwnables/skel/var/service/heartbeat/run (100%) delete mode 100755 pwnables/tftpd/run diff --git a/heartbeatd/in.heartbeatd b/pollster/in.heartbeatd similarity index 100% rename from heartbeatd/in.heartbeatd rename to pollster/in.heartbeatd diff --git a/heartbeatd/run.heartbeatd b/pollster/run.heartbeatd similarity index 100% rename from heartbeatd/run.heartbeatd rename to pollster/run.heartbeatd diff --git a/pwnables/Makefile b/pwnables/Makefile index 154b3a8..7eca8ef 100644 --- a/pwnables/Makefile +++ b/pwnables/Makefile @@ -5,9 +5,9 @@ TARGET = $(CURDIR)/target FAKE = fakeroot -s $(CURDIR)/fake -i $(CURDIR)/fake INSTALL = $(FAKE) install -all: 99-pwnables.tce +all: pwnables.tce -99-pwnables.tce: target +pwnables.tce: target $(FAKE) sh -c 'cd target && tar -czf - --exclude=placeholder --exclude=*~ .' > $@ target: @@ -17,13 +17,5 @@ target: $(MAKE) -C daemons TARGET=$(TARGET) install - $(INSTALL) -d $(TARGET)/usr/lib/www - $(INSTALL) $(CGI) $(TARGET)/usr/lib/www - - $(INSTALL) -D flag $(TARGET)/var/lib/tftp/flag - $(INSTALL) -D flag $(TARGET)/var/lib/notes/flag - $(INSTALL) -D flag $(TARGET)/home/flag/.plan - - clean: rm -rf target diff --git a/pwnables/fingerd/Makefile b/pwnables/fingerd/Makefile deleted file mode 100644 index 74a0f1b..0000000 --- a/pwnables/fingerd/Makefile +++ /dev/null @@ -1 +0,0 @@ -all: in.fingerd diff --git a/pwnables/fingerd/in.fingerd.c b/pwnables/fingerd/in.fingerd.c deleted file mode 100644 index cb5d9e7..0000000 --- a/pwnables/fingerd/in.fingerd.c +++ /dev/null @@ -1,38 +0,0 @@ -#include - -int -main(int argc, char *argv) -{ - char user[256]; - char path[512]; - char *data; - FILE *f; - size_t count; - int i; - - if (NULL == gets(user)) { - return 0; - } - for (data = user; *data; data += 1) { - if ('\r' == *data) { - *data = 0; - } - } - if (0 == user[0]) { - printf("Nobody's home.\n"); - return 0; - } - - sprintf(path, "/home/%s/.plan", user); - f = fopen(path, "r"); - if (NULL == f) { - printf("No such user.\n"); - return 0; - } - - data = path; - while (count = fread(data, sizeof(*data), 1, f)) { - fwrite(data, count, 1, stdout); - } - return 0; -} diff --git a/pwnables/fingerd/run b/pwnables/fingerd/run deleted file mode 100755 index 4088271..0000000 --- a/pwnables/fingerd/run +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec tcpsvd 0 79 /usr/sbin/in.fingerd diff --git a/pwnables/skel/home/flag/.plan b/pwnables/skel/home/flag/.plan new file mode 100644 index 0000000..a69e835 --- /dev/null +++ b/pwnables/skel/home/flag/.plan @@ -0,0 +1 @@ +dirtbags diff --git a/pwnables/cat.cgi b/pwnables/skel/usr/lib/www/cat.cgi similarity index 100% rename from pwnables/cat.cgi rename to pwnables/skel/usr/lib/www/cat.cgi diff --git a/pwnables/skel/var/lib/cat/flag b/pwnables/skel/var/lib/cat/flag new file mode 100644 index 0000000..a69e835 --- /dev/null +++ b/pwnables/skel/var/lib/cat/flag @@ -0,0 +1 @@ +dirtbags diff --git a/pwnables/skel/var/lib/notes/flag b/pwnables/skel/var/lib/notes/flag new file mode 100644 index 0000000..a69e835 --- /dev/null +++ b/pwnables/skel/var/lib/notes/flag @@ -0,0 +1 @@ +dirtbags diff --git a/pwnables/skel/var/lib/tftp/flag b/pwnables/skel/var/lib/tftp/flag new file mode 100644 index 0000000..a69e835 --- /dev/null +++ b/pwnables/skel/var/lib/tftp/flag @@ -0,0 +1 @@ +dirtbags diff --git a/heartbeatd/run.heartbeat b/pwnables/skel/var/service/heartbeat/run similarity index 100% rename from heartbeatd/run.heartbeat rename to pwnables/skel/var/service/heartbeat/run diff --git a/pwnables/tftpd/run b/pwnables/tftpd/run deleted file mode 100755 index bcba031..0000000 --- a/pwnables/tftpd/run +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/sh - -exec udpsvd 0 69 tftpd /var/lib/tftp