-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
64 lines (49 loc) · 1.61 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
CCBASE = gcc -g --std=c99 -m32
NONX = -z execstack
NX = -z noexecstack
NOCAN = --no-stack-protector
CAN = --stack-protector
.PHONY: all clean aslr-off aslr-on
all: \
bomb_nonx_nocan bomb_nx_nocan bomb_nx_can \
bomb128_nonx_nocan bomb128_nx_nocan bomb128_nx_can \
server_nonx_nocan server_nx_nocan server_nx_can \
wheres_the_stack_at
clean:
rm -f \
bomb_nonx_nocan bomb_nx_nocan bomb_nx_can \
server_nonx_nocan server_nx_nocan server_nx_can \
wheres_the_stack_at \
*~
aslr-off:
@echo -n "/proc/sys/kernel/randomize_va_space was: " && \
cat /proc/sys/kernel/randomize_va_space
echo 0 > /proc/sys/kernel/randomize_va_space
@echo -n "/proc/sys/kernel/randomize_va_space is now: " && \
cat /proc/sys/kernel/randomize_va_space
aslr-on:
@echo -n "/proc/sys/kernel/randomize_va_space was: " && \
cat /proc/sys/kernel/randomize_va_space
echo 2 > /proc/sys/kernel/randomize_va_space
@echo -n "/proc/sys/kernel/randomize_va_space is now: " && \
cat /proc/sys/kernel/randomize_va_space
bomb_nonx_nocan : bomb.c
${CCBASE} ${NONX} ${NOCAN} -o $@ $<
bomb_nx_nocan : bomb.c
${CCBASE} ${NX} ${NOCAN} -o $@ $<
bomb_nx_can : bomb.c
${CCBASE} ${NX} ${CAN} -o $@ $<
bomb128_nonx_nocan : bomb128.c
${CCBASE} ${NONX} ${NOCAN} -o $@ $<
bomb128_nx_nocan : bomb128.c
${CCBASE} ${NX} ${NOCAN} -o $@ $<
bomb128_nx_can : bomb128.c
${CCBASE} ${NX} ${CAN} -o $@ $<
server_nonx_nocan : server.c
${CCBASE} ${NONX} ${NOCAN} -o $@ $<
server_nx_nocan : server.c
${CCBASE} ${NX} ${NOCAN} -o $@ $<
server_nx_can : server.c
${CCBASE} ${NX} ${CAN} -o $@ $<
wheres_the_stack_at : wheres_the_stack_at.c
${CCBASE} ${NX} ${CAN} -o $@ $<