

				ELFSH TESTSUITE README
				----------------------


1) You have to compile and install libelfsh before compiling the testsuite .

2) Each test has a Makefile procuding 2 executables, one of them is using libelfsh 
and modify the other one (a.out), just provided as a victim to
illustrate the concept . 

3) The modified executable is produced in the current directory , and called 'fake_aout' . 
Just launch a.out, then fake_aout, and spot the differences .


List of tests :
###############


ctors_hijack  		: 
			=> hijack the flow using .ctors entry modification .
			=> $ elfsh -f a.out -ctors
			=> $ elfsh -f fake_aout -ctors

dtors_hijack  		: 
			=> hijack the flow using .dtors entry modification .
			=> $ elfsh -f a.out -dtors
			=> $ elfsh -f fake_aout -dtors

got_hijack    		: 
			=> hijack sleep() using .got entry modification .
			=> $ elfsh -f a.out -got
			=> $ elfsh -f fake_aout -got

hash_retreive 		: 
			=> resolve a dynamic symbol name using .hash .
			
section_injection  	: 
			=> inject 2 sections (.devhell and .dhstrtab)
			=> .devhell is mapped and contains a /bin/sh shellcode .
			=> .dhstrtab is not mapped and contains some ascii strings .
			=> The entry point is modified to point on .devhell .
			=> $ elfsh -f a.out -s -e (retreive the SHT and the ELF header)
			=> $ elfsh -f fake_aout -s -e 

sht_stripping  		: 
			=> remove the section header table of the a.out executable .
			=> $ elfsh -f a.out -s -e
			=> $ elfsh -f fake_aout -s -e

symtab_extend		: 
			=> Add a symbol in .symtab (also add its name in .strtab)
			=> $ elfsh -f a.out -sym DH
			=> $ elfsh -f fake_aout -sym DH			


sht_rebuild		:
			=> rebuild the section header in a SHT stripped ELF object .
			=> $ objdump -D sht_stripped_file (see the error)
			=> $ sht_rebuilder
			=> $ objdump -D sht_rebuilt_file (see it work :)

