Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- citadel:paxtest-freebsd-master ac$ ./paxtest kiddie
- PaXtest - Copyright(c) 2003,2004 by Peter Busser <peter@adamantix.org>
- Released under the GNU Public Licence version 2 or later
- Writing output to paxtest.log
- It may take a while for the tests to complete
- Test results:
- PaXtest - Copyright(c) 2003,2004 by Peter Busser <peter@adamantix.org>
- Released under the GNU Public Licence version 2 or later
- Mode: kiddie
- Darwin citadel.local 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64
- Executable anonymous mapping : Killed
- Executable bss : Killed
- Executable data : Killed
- Executable heap : Killed
- Executable stack : Killed
- Executable anonymous mapping (mprotect) : Vulnerable
- Executable bss (mprotect) : Vulnerable
- Executable data (mprotect) : Vulnerable
- Executable heap (mprotect) : Vulnerable
- Executable shared library bss (mprotect) : Vulnerable
- Executable shared library data (mprotect): Vulnerable
- Executable stack (mprotect) : Vulnerable
- Anonymous mapping randomisation test : 16 bits (guessed)
- Heap randomisation test (ET_EXEC) : 15 bits (guessed)
- Main executable randomisation (ET_EXEC) : 16 bits (guessed)
- ./getshlib: Undefined error: 0
- Shared library randomisation test :
- Stack randomisation test (SEGMEXEC) : 16 bits (guessed)
- Stack randomisation test (PAGEEXEC) : 16 bits (guessed)
- Arg/env randomisation test (SEGMEXEC) : 17 bits (guessed)
- Arg/env randomisation test (PAGEEXEC) : 16 bits (guessed)
- Return to function (strcpy) : paxtest: return address contains a NULL byte.
- Return to function (strcpy, PIE) : paxtest: return address contains a NULL byte.
- Return to function (memcpy) : Killed
- Return to function (memcpy, PIE) : Killed
- Executable shared library bss : Killed
- Executable shared library data : Killed
- Writable text segments : Vulnerable
- citadel:paxtest-freebsd-master ac$ ./paxtest blackhat
- PaXtest - Copyright(c) 2003,2004 by Peter Busser <peter@adamantix.org>
- Released under the GNU Public Licence version 2 or later
- Writing output to paxtest.log
- It may take a while for the tests to complete
- Test results:
- PaXtest - Copyright(c) 2003,2004 by Peter Busser <peter@adamantix.org>
- Released under the GNU Public Licence version 2 or later
- Mode: blackhat
- Darwin citadel.local 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64
- Executable anonymous mapping : Killed
- Executable bss : Killed
- Executable data : Killed
- Executable heap : Killed
- Executable stack : Killed
- Executable anonymous mapping (mprotect) : Vulnerable
- Executable bss (mprotect) : Vulnerable
- Executable data (mprotect) : Vulnerable
- Executable heap (mprotect) : Vulnerable
- Executable shared library bss (mprotect) : Vulnerable
- Executable shared library data (mprotect): Vulnerable
- Executable stack (mprotect) : Vulnerable
- Anonymous mapping randomisation test : 16 bits (guessed)
- Heap randomisation test (ET_EXEC) : 15 bits (guessed)
- Main executable randomisation (ET_EXEC) : 16 bits (guessed)
- ./getshlib: Undefined error: 0
- Shared library randomisation test :
- Stack randomisation test (SEGMEXEC) : 16 bits (guessed)
- Stack randomisation test (PAGEEXEC) : 16 bits (guessed)
- Arg/env randomisation test (SEGMEXEC) : 16 bits (guessed)
- Arg/env randomisation test (PAGEEXEC) : 16 bits (guessed)
- Return to function (strcpy) : paxtest: return address contains a NULL byte.
- Return to function (strcpy, PIE) : paxtest: return address contains a NULL byte.
- Return to function (memcpy) : Killed
- Return to function (memcpy, PIE) : Killed
- Executable shared library bss : Killed
- Executable shared library data : Killed
- Writable text segments : Vulnerable
- citadel:paxtest-freebsd-master ac$
- diff -urN paxtest-freebsd-master/Makefile paxtest-freebsd-master.osx/Makefile
- --- paxtest-freebsd-master/Makefile 2014-03-24 03:52:17.000000000 +0200
- +++ paxtest-freebsd-master.osx/Makefile 2015-07-26 18:00:11.000000000 +0300
- @@ -1,4 +1,4 @@
- -#!/usr/bin/make
- +#!/usr/bin/env gmake
- #
- # PaXtest master makefile
- # Copyright(c) 2003 by Peter Busser <peter@adamantix.org>
- @@ -22,6 +22,9 @@
- freebsd:
- make -f Makefile.FreeBSD
- +osx:
- + make -f Makefile.OSX
- +
- clean:
- make -f Makefile.FreeBSD clean
- diff -urN paxtest-freebsd-master/Makefile.OSX paxtest-freebsd-master.osx/Makefile.OSX
- --- paxtest-freebsd-master/Makefile.OSX 1970-01-01 02:00:00.000000000 +0200
- +++ paxtest-freebsd-master.osx/Makefile.OSX 2015-07-26 17:35:00.000000000 +0300
- @@ -0,0 +1,188 @@
- +#!/usr/bin/gmake
- +
- +CC=gcc
- +CFLAGS=
- +LDFLAGS=
- +ifndef RUNDIR
- +RUNDIR=.
- +endif
- +
- +CFLAGS+=-DRUNDIR=\"${RUNDIR}\" -fno-stack-protector #-ftrampolines
- +LDFLAGS+=-lpthread
- +
- +
- +TESTS= anonmap \
- + execbss \
- + execdata \
- + execheap \
- + execstack \
- + mprotanon \
- + mprotbss \
- + mprotdata \
- + mprotheap \
- + mprotshbss \
- + mprotshdata \
- + mprotstack \
- + randamap \
- + randheap1 \
- + randmain1 \
- + randshlib \
- + randstack1 \
- + randstack2 \
- + randarg1 \
- + randarg2 \
- + rettofunc1 \
- + rettofunc1x \
- + rettofunc2 \
- + rettofunc2x \
- + shlibbss \
- + shlibdata \
- + writetext
- +
- +UTILS= getamap \
- + getheap1 \
- + getheap2 \
- + getmain1 \
- + getmain2 \
- + getshlib \
- + getstack1 \
- + getstack2 \
- + getarg1 \
- + getarg2
- +
- +SHLIBS= shlibtest.so \
- + shlibtest2.so
- +
- +all: $(SHLIBS) $(TESTS) $(UTILS) paxtest
- +
- +clean:
- + -rm -f *.o *.s *~ core
- + -rm -f $(SHLIBS) $(TESTS) $(UTILS)
- + -rm -f paxtest paxtest.log a.out
- +
- +ifdef DESTDIR
- +ifdef BINDIR
- +ifdef RUNDIR
- +install: all
- + mkdir -p $(DESTDIR)/$(RUNDIR)
- + cp $(SHLIBS) $(TESTS) $(UTILS) $(DESTDIR)/$(RUNDIR)
- + mkdir -p $(DESTDIR)/$(BINDIR)
- + cp paxtest $(DESTDIR)/$(BINDIR)
- + chmod 755 $(DESTDIR)/$(BINDIR)/paxtest
- +endif
- +endif
- +endif
- +
- +paxtest: $(TESTS) genpaxtest
- + sh genpaxtest $(TESTS)
- +
- +anonmap: body.o anonmap.o
- +
- +execbss: body.o execbss.o
- +
- +execdata: body.o execdata.o
- +
- +execheap: body.o execheap.o
- +
- +execstack: body.o execstack.o
- +
- +getheap1: getheap.o
- + $(CC) $(LDFLAGS) -o $@ $+
- +
- +getheap2: getheap.o
- + $(CC) -shared -o $@ $+
- +
- +getheap.o: getheap.c
- + $(CC) $(CFLAGS) -fPIC -o $@ -c $<
- +
- +getamap.o: getamap.c
- +
- +getmain1: getmain.o
- + $(CC) $(LDFLAGS) -o $@ $+
- +
- +getmain2: getmain2.o
- + $(CC) -shared -o $@ $+
- +
- +getmain2.o: getmain.c
- + $(CC) $(CFLAGS) -fPIC -o $@ -c $<
- +
- +getshlib: getshlib.o
- +
- +getstack1: getstack.o
- + $(CC) $(LDFLAGS) -o $@ $+
- +
- +getstack2: getstack1
- + rm -f $@
- + cp getstack1 $@
- + chmod +x $@
- +
- +getarg1: getarg.o
- + $(CC) $(LDFLAGS) -o $@ $+
- +
- +getarg2: getarg1
- + rm -f $@
- + cp getarg1 $@
- + chmod +x $@
- +
- +mprotanon: body.o mprotanon.o
- +
- +mprotbss: body.o mprotbss.o
- +
- +mprotheap: body.o mprotheap.o
- +
- +mprotdata: body.o mprotdata.o
- +
- +mprotshbss: body.o mprotshbss.o shlibtest.so
- +
- +mprotshdata: body.o mprotshdata.o shlibtest.so
- +
- +mprotstack: body.o mprotstack.o
- +
- +randamap: randbody.o randamap.o
- +
- +randarg1: randbody.o randarg1.o
- +
- +randarg2: randbody.o randarg2.o
- +
- +randheap1: randbody.o randheap1.o
- +
- +randheap2: randbody.o randheap2.o
- +
- +randmain1: randbody.o randmain1.o
- +
- +randmain2: randbody.o randmain2.o
- +
- +randshlib: randbody.o randshlib.o
- +
- +randstack1: randbody.o randstack1.o
- +
- +randstack2: randbody.o randstack2.o
- +
- +rettofunc1: body.o rettofunc1.o
- +
- +rettofunc1x: body.o rettofunc1x.o
- + $(CC) $(LDFLAGS) -o $@ $+
- +
- +rettofunc2: body.o rettofunc2.o
- +
- +rettofunc2x: body.o rettofunc2x.o
- + $(CC) $(LDFLAGS) -o $@ $+
- +
- +shlibtest.o: shlibtest.c
- + $(CC) $(CFLAGS) -fPIC -c $< -o $@
- +
- +shlibtest2.o: shlibtest2.c
- + $(CC) $(CFLAGS) -fPIC -c $< -o $@
- +
- +shlibtest.so: shlibtest.o
- + $(CC) $(SHLDFLAGS) -shared -o $@ $+
- +
- +shlibtest2.so: shlibtest2.o
- + $(CC) $(SHLDFLAGS) -shared -o $@ $+
- +
- +shlibbss: body.o shlibbss.o shlibtest.so shlibtest2.so
- +
- +shlibdata: body.o shlibdata.o shlibtest.so shlibtest2.so
- +
- +writetext: body.o writetext.o shlibtest.so
- +
- diff -urN paxtest-freebsd-master/body.c paxtest-freebsd-master.osx/body.c
- --- paxtest-freebsd-master/body.c 2014-03-24 03:52:17.000000000 +0200
- +++ paxtest-freebsd-master.osx/body.c 2015-07-26 17:41:40.000000000 +0300
- @@ -16,6 +16,7 @@
- #include <sys/wait.h>
- #include <pthread.h>
- #include <unistd.h>
- +#include <string.h>
- extern int doit( void );
- extern const char testname[];
- @@ -26,6 +27,11 @@
- return NULL;
- }
- +#if 1
- +/* Dummy nested function */
- +void dummy(void) {}
- +#endif
- +
- int main( int argc, char *argv[] )
- {
- int status;
- @@ -36,8 +42,10 @@
- */
- int paxtest_mode = 1;
- +#if 0
- /* Dummy nested function */
- void dummy(void) {}
- +#endif
- mode = getenv( "PAXTEST_MODE" );
- if( mode == NULL ) {
- diff -urN paxtest-freebsd-master/targets paxtest-freebsd-master.osx/targets
- --- paxtest-freebsd-master/targets 2014-03-24 03:52:17.000000000 +0200
- +++ paxtest-freebsd-master.osx/targets 2015-07-26 17:26:53.000000000 +0300
- @@ -8,5 +8,7 @@
- freebsd FreeBSD
- +osx OS X
- +
- clean Clean up
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement