Skip to contentSkip to conversation

exec-shield vs. paxtest 0.9.5 horrible results

test Gabor MICSKO 3 participants 3 messages Dec 22, 2003

lore
Share & tools
lore
#0 lore raw
gmicsko03:/home/trey/devel/exploit/paxtest-0.9.5# uname -a
Linux gmicsko03 2.6.0 #1 Thu Dec 18 12:32:44 CET 2003 i686 GNU/Linux
gmicsko03:/home/trey/devel/exploit/paxtest-0.9.5# echo 2 >
/proc/sys/kernel/exec-shield
gmicsko03:/home/trey/devel/exploit/paxtest-0.9.5# cat
/proc/sys/kernel/exec-shield
2
gmicsko03:/home/trey/devel/exploit/paxtest-0.9.5# ./paxtest
PaXtest - Copyright(c) 2003 by Peter Busser <[email protected]>
Released under the GNU Public Licence version 2 or later

It may take a while for the tests to complete
Test results:
PaXtest - Copyright(c) 2003 by Peter Busser <[email protected]> Released under the GNU Public Licence version 2 or later

Executable anonymous mapping             : Vulnerable
Executable bss                           : Vulnerable
Executable data                          : Vulnerable
Executable heap                          : Vulnerable
Executable stack                         : Vulnerable
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)        : 14 bits (guessed)
Heap randomisation test (ET_DYN)         : 13 bits (guessed)
Main executable randomisation (ET_EXEC)  : No randomisation
Main executable randomisation (ET_DYN)   : 12 bits (guessed)
Shared library randomisation test        : 12 bits (guessed)
Stack randomisation test (SEGMEXEC)      : 17 bits (guessed)
Stack randomisation test (PAGEEXEC)      : 17 bits (guessed)
Return to function (strcpy)              : Vulnerable
Return to function (strcpy, RANDEXEC)    : Return to function
(memcpy)              : Vulnerable
Return to function (memcpy, RANDEXEC)    : Vulnerable
Executable shared library bss            : Vulnerable
Executable shared library data           : Vulnerable
Writable text segments                   : Vulnerable

gmicsko03:/home/trey/devel/exploit/paxtest-0.9.5#

Any idea?

#1 lore raw
Quoted 2 lines · Gabor MICSKO
gmicsko03:/home/trey/devel/exploit/paxtest-0.9.5# uname -a
Linux gmicsko03 2.6.0 #1 Thu Dec 18 12:32:44 CET 2003 i686 GNU/Linux

applications have the option to disable exec-shield themselves for them. pax-test at one point did this deliberately (in order to simulate glibc 2.2 behavior according to the author); are you using a version of paxtest that does this ?

#2 lore raw
In reply to Gabor MICSKO
Quoted 1 line · Gabor MICSKO

Any idea?

yes. Undo the patch below. The paxtest author decided to add this pointless mprotect(stackptr, PROT_EXEC) to make sure the test lists exec-shield as 'vulnerable' while listing PaX as non-vulnerable. I sent the fix but (not surprisingly) it was not added. Marketing via testsuite eh?

Ingo

body.c +1 -0
@@ -29,6 +29,7 @@
 	fflush( stdout );
 
 	if( fork() == 0 ) {
+		do_mprotect((unsigned long)argv & ~4095U, 4096, PROT_READ|PROT_WRITE|PROT_EXEC);
 		doit();
 	} else {
 		wait( &status );