Skip to content

Commit

Permalink
2016 DEF CON CTF Qualifier
Browse files Browse the repository at this point in the history
  • Loading branch information
gynophage committed May 22, 2016
0 parents commit 880f6e5
Show file tree
Hide file tree
Showing 281 changed files with 97,164 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Glados/COMPILING
@@ -0,0 +1,6 @@
gcc 4.8.4 was compiled with ../gcc-4.8.4/configure --disable-libssp --disable-threads --prefix=/home/lightning/gcc-custom CFLAGS="-fPIC -fpic" CXXFLAGS="-fPIC -fpic" --enable-languages=c,c++ --disable-bootstrap --disable-nls

gcc 4.8.4 was installed
The two patches were applied to uClibc and uClibc++ appropriately
The custom build of libsupc++.a was copied to the src/abi/libsupc folder of uClibc++ to allow for a fPIC version to be available
Final compiled libaries and custom gcc used to compile Glados to allow for moving the stacic binary without hard locations being set by the compiler
32 changes: 32 additions & 0 deletions Glados/Makefile
@@ -0,0 +1,32 @@
ROOT=/home/lightning
CC=$(ROOT)/gcc-custom/bin/gcc
CPP=$(ROOT)/gcc-custom/bin/g++
UCLIBC=$(ROOT)/uClibc
UCLIBCPLUS=$(ROOT)/uClibc++
MODE=64
CCFLAGS=-fPIC -fpic -O2 -m$(MODE) -std=c99 -Wall
CPPFLAGS=-fPIC -fpic -Wno-sign-compare -Wno-unused-result -Wno-write-strings -O2 -m$(MODE) -std=c++11 -Wall -D_FORTIFY_SOURCE=0

O_FILES = main.o classes.o in_out.o init.o

all : $(O_FILES)
$(CPP) $(CPPFLAGS) -o glados $(O_FILES) $(UCLIBC)/usr/lib/crt1.o -nostdlib -static -lc -L$(UCLIBC)/usr/lib -L$(UCLIBCPLUS)/lib -luClibc++ -lc
strip -g -S -d glados
strip -s glados
strip -x glados
strip -X glados

# dependency stuff, see: http://www.cs.berkeley.edu/~smcpeak/autodepend/autodepend.html
# pull in dependency info for *existing* .o files
-include $(O_FILES:.o=.d)

.SUFFIXES : .o .c .cpp

.cpp.o :
$(CPP) $(CPPFLAGS) -c $<

.c.o :
$(CC) $(CCFLAGS) -c $<

clean:
rm -f glados *.o *.d
141 changes: 141 additions & 0 deletions Glados/cavejohnson.h

Large diffs are not rendered by default.

0 comments on commit 880f6e5

Please sign in to comment.