linux-rootkit

Feature-rich interactive rootkit that targets Linux kernel 4.19, accompanied by a dynamic kernel memory analysis GDB plugin for in vivo introspection (e.g. using QEMU)
git clone git://git.deurzen.net/linux-rootkit
Log | Files | Refs

commit 35ea10791820cf9c278770bbb89ee5059cc8200f
parent 2961f1a76b44a0eae6fd3c34fcf001eb2e0a232d
Author: deurzen <m.deurzen@tum.de>
Date:   Sat, 21 Nov 2020 06:58:55 +0100

updates make process

Diffstat:
MMakefile | 45+++++++++++++++++++++++++++++++++++----------
1 file changed, 35 insertions(+), 10 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,21 +1,46 @@ TARGET := g7 KERNELDIR := /lib/modules/$(shell uname -r)/build -src_files := $(wildcard $(src)/src/*.c) -src_files += $(wildcard $(src)/src/$(TARGET)/*.c) -src_files := $(src_files:$(src)/%=%) +DEBUG_CFLAGS := -DDEBUG + +SRC_FILES := $(wildcard $(src)/src/*.c) +SRC_FILES += $(wildcard $(src)/src/$(TARGET)/*.c) +SRC_FILES := $(SRC_FILES:$(src)/%=%) obj-m += $(TARGET).o -$(TARGET)-objs := $(src_files:%.c=%.o) +$(TARGET)-objs := $(SRC_FILES:%.c=%.o) + +ccflags-y := -std=gnu99 -Wno-declaration-after-statement + +all: test + +debug: clean + @make -C $(KERNELDIR) M=$(PWD) ccflags-y="-DDEBUG" modules -all: - make -C $(KERNELDIR) M=$(PWD) modules +release: clean build + +build: + @make -C $(KERNELDIR) M=$(PWD) modules clean: - make -C $(KERNELDIR) M=$(PWD) clean + @make -C $(KERNELDIR) M=$(PWD) clean + +test: debug +test: remove +test: clear_dmesg +test: install +test: dmesg -install: - sudo insmod ./$(TARGET).ko +install: remove + @sudo insmod ./$(TARGET).ko remove: - sudo rmmod $(TARGET) + @sudo rmmod $(TARGET) + +.PHONY: clear_dmesg +clear_dmesg: + @sudo dmesg -c >/ + +.PHONY: dmesg +dmesg: + @dmesg