Skip to content

Commit

Permalink
Make mitigation-disabling more granular in the CMakeLists, and disabl…
Browse files Browse the repository at this point in the history
…e canaries in the the rop_exit lecture example.
  • Loading branch information
aweinstock314 committed Jul 16, 2015
1 parent 0bbe1eb commit f2aa114
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ include_directories("./include")

# Settings
set(MBE_FLAGS "-m32 -O0 -fno-inline-functions")
set(NO_MITS_FLAGS "-z execstack -z norelro -fno-stack-protector")
set(DISABLE_DEP_FLAG "-z execstack")
set(DISABLE_RELRO_FLAG "-z norelro")
set(DISABLE_CANARY_FLAG "-fno-stack-protector")
set(NO_MITS_FLAGS "${DISABLE_DEP_FLAG} ${DISABLE_RELRO_FLAG} ${DISABLE_CANARIES_FLAG}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MBE_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MBE_FLAGS}")

Expand Down
1 change: 1 addition & 0 deletions src/lecture/rop/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.8)

# Adds an executable target
add_executable(rop_exit rop_exit.c)
SET_FLAGS(rop_exit "${DISABLE_CANARY_FLAG}")

add_executable(rop_pivot rop_pivot.c)
SET_FLAGS(rop_pivot "-static")
Expand Down

0 comments on commit f2aa114

Please sign in to comment.