This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[color] | |
branch = auto | |
diff = auto | |
grep = auto | |
interactive = auto | |
status = auto | |
[alias] | |
br = branch | |
ca = commit -a | |
cm = commit -m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
obj-m := kprobe.o | |
all: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
clean: | |
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/kernel.h> | |
#include <linux/module.h> | |
#include <linux/kprobes.h> | |
#include <linux/kallsyms.h> | |
struct kprobe kp; | |
static int hander_pre(struct kprobe *p, struct pt_regs *regs) | |
{ | |
printk("Hit it\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# clear rule | |
iptables -F | |
iptables -X | |
iptables -Z | |
# default policy | |
iptables -P INPUT DROP | |
iptables -P OUTPUT ACCEPT |