Modify TD5 to extract stack informations

Segfault on my machine...
This commit is contained in:
Yorick Barbanneau 2023-03-10 19:20:08 +01:00
parent dd60e51f37
commit 99e7388994
2 changed files with 107 additions and 4 deletions

View file

@ -1,5 +1,5 @@
CC = gcc
CFLAGS = -Wall -Wextra -O0 -no-pie -lm -g -std=c99 -zexecstack
# CC = gcc
CFLAGS = -g -zexecstack
SRC = $(wildcard *.c)
TGT = $(subst .c,,$(SRC))
BUILD_DIR = build
@ -27,7 +27,7 @@ PHONY: gdb
gdb: build/exploit build/anodin configure
./$(BUILD_DIR)/exploit > hack.txt &
PYTHONPATH=${PWD}/pframe${PYTHONPATH:+:${PYTHONPATH}} \
setarch -R gdb ./$(BUILD_DIR)/anodin --command=$(subst gdb_,,$@).gdb
setarch -R gdb ./$(BUILD_DIR)/anodin --command=anodin.gdb
rm hack.txt
PHONY: clean