From 426b0d1883a4c83ba862ec7b3ffed7154a63d494 Mon Sep 17 00:00:00 2001 From: toni Date: Fri, 8 Mar 2013 18:21:01 +0100 Subject: some exploitable modules added --- Makefile | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c9c42dc..5e03700 100644 --- a/Makefile +++ b/Makefile @@ -1,25 +1,31 @@ RM := rm +CC := gcc +CFLAGS = -Wall -g3 +OCFLAGS = -m32 -mpreferred-stack-boundary=2 -z execstack -fno-stack-protector +BINS = exploit +OBINS = overflow overflow_minimal overflow_function exploit all: exploit overflow exploit: - @echo 'building exploit' - gcc -Wall -g exploit.c -o exploit + @echo 'building exploits' + for file in $(BINS); do \ + $(CC) $(CFLAGS) exploit.c -o exploit; \ + done overflow: - @echo 'building overflow' - gcc -Wall -m32 -mpreferred-stack-boundary=2 -g -fno-stack-protector overflow.c -o overflow - -test: overflow - @if [ -x /usr/bin/python ]; then \ - ./overflow `python -c 'print "A"*5000'`; \ - else \ - echo 'Missing PYTHON; not testing'; \ - fi - @echo 'TEST FAILED: ./overflow not segfaulting' + @echo 'building exploitable binaries' + for file in $(OBINS); do \ + $(CC) $(CFLAGS) $(OCFLAGS) $$file.c -o $$file; \ + done clean: - -$(RM) -f overflow exploit - -@echo ' ' + for file in $(BINS); do \ + $(RM) -f $$file; \ + done + for file in $(OBINS); do \ + $(RM) -f $$file; \ + done + @echo ' ' .PHONY: all clean -- cgit v1.2.3