shell bypass 403

Cubjrnet7 Shell

: /usr/src/file_protector-1.1-1572/ [ drwxr-xr-x ]

name : module.c
/**
@file
@brief    Linux kernel 'module'
@details  Copyright (c) 2017 Acronis International GmbH
@author   Mikhail Krivtsov ([email protected])
@since    $Id: $
*/

#include "debug.h"		// DPRINTF
#include "file_contexts.h"
#include "ftrace_hooks/fsnotify_listener.h"
#include "module_rundown_protection.h"
#include "syscall_common.h"
#include "task_info_map.h"
#include "tracepoints.h"
#include "transport.h"

#include <linux/rcupdate.h>
#include <linux/module.h>
#include <linux/version.h>	// LINUX_VERSION_CODE, KERNEL_VERSION()

#ifdef __DEBUG_LEVEL__
#ifdef DEFAULT_LOGGER_DEBUG_LEVEL
unsigned int logger_debug_level = DEFAULT_LOGGER_DEBUG_LEVEL;
#else
unsigned int logger_debug_level = 0;
#endif
#endif
/*
    Initialization order is very important.
    'transport' depends on 'pid_bw_list'
    'syscall_hooks' and 'tracepoints' depend on 'transport'
*/
static int __init module_init_impl(void)
{
	int ret;

	IPRINTF("DRIVER_VERSION=%s", DRIVER_VERSION_STRING);
	IPRINTF("LINUX_VERSION_CODE=%u.%u.%u", LINUX_VERSION_CODE >> 16,
		(LINUX_VERSION_CODE >> 8) & 0xFF, LINUX_VERSION_CODE & 0xFF);
#if defined RHEL_RELEASE_CODE
	IPRINTF("RHEL_RELEASE_CODE=%u.%u",
		RHEL_RELEASE_CODE >> 8, RHEL_RELEASE_CODE & 0xFF);
#endif

	compat_init();
	ret = memory_init();
	if (ret) {
		EPRINTF("'%s()' failure %i", "memory_init", ret);
		return ret;
	}

	ret = task_info_maps_init();
	if (ret) {
		EPRINTF("'%s()' failure %i", "task_info_maps_init", ret);
		goto fail_task_info_maps;
	}

	ret = file_contexts_init();
	if (ret) {
		EPRINTF("'%s()' failure %i", "file_contexts_init", ret);
		goto fail_file_contexts;
	}

	ret = fsnotify_events_listener_global_init();
	if (ret) {
		EPRINTF("'%s()' failure %i", "fsnotify_events_listener_global", ret);
		goto fail_fsnotify_events_listener;
	}

	mod_rundown_protection_init(false /*not ready*/);

	ret = transport_mod_init();
	if (ret) {
		EPRINTF("'%s()' failure %i", "transport_mod_init", ret);
		goto fail_transport_mod;
	}

	DPRINTF("ret=%i", ret);
	return ret;

fail_transport_mod:
	fsnotify_events_listener_global_init_fail_free();
fail_fsnotify_events_listener:
	file_contexts_init_fail_free();
fail_file_contexts:
	task_info_maps_init_fail_free();
fail_task_info_maps:
	memory_deinit();
	return ret;
}

static void __exit module_down_impl(void)
{
	IPRINTF("module unload started");
	transport_mod_down();
	fsnotify_events_listener_global_deinit();
	task_info_maps_deinit();
	file_contexts_deinit();
	memory_deinit();
	IPRINTF("module unload finished");
}

MODULE_AUTHOR("Acronis International GmbH");
MODULE_DESCRIPTION("APL (Active Protection for Linux)");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRIVER_VERSION_STRING);
module_init(module_init_impl);
module_exit(module_down_impl);

© 2025 Cubjrnet7