2018-10-07 12:08:00 +00:00
|
|
|
# out-of-tree called make with four arguments:
|
|
|
|
# - KERNEL: kernel headers path
|
|
|
|
# - TARGET_EXPLOIT: name of exploit binary that MUST be produced by makefile.
|
|
|
|
# - TARGET_TEST: name of test binary that MUST be produced by makefile
|
|
|
|
# and it's will be runned on a LPE stage. TARGET_TEST MUST accept two argument:
|
|
|
|
# - Path to exploit binary
|
|
|
|
# - File that MUST be created with exploit. It uses for test that exploit works
|
|
|
|
# correctly.
|
|
|
|
# - VMLINUZ: path to vmlinuz
|
|
|
|
#
|
|
|
|
# e.g.:
|
|
|
|
# make KERNEL=/lib/modules/4.8.0-58-generic/build \
|
|
|
|
# TARGET_EXPLOIT=nyan-exploit \
|
|
|
|
# TARGET_TEST=nyan-exploit-test
|
|
|
|
# VMLINUZ=/boot/vmlinuz-4.8.0-58-generic
|
|
|
|
|
2018-10-07 16:35:54 +00:00
|
|
|
TARGET_EXPLOIT := CVE-2016-5195
|
2018-10-07 12:08:00 +00:00
|
|
|
TARGET_TEST := CVE-2016-5195_test
|
|
|
|
|
|
|
|
all:
|
|
|
|
gcc CVE-2016-5195.c -o $(TARGET_EXPLOIT)
|
|
|
|
gcc CVE-2016-5195_test.c -o $(TARGET_TEST)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(TARGET_EXPLOIT)
|
|
|
|
rm -f $(TARGET_TEST)
|