LSM demo配置

本文介绍如何使用Linux Security Modules (LSM) 实现系统钩子,适用于本科毕设。虽然具体代码已丢失,但提供了一个LSM demo帮助理解配置流程。在内核security目录下创建test子目录,包含Makefile、Kconfig和test.c代码文件。通过修改相应Makefile和Kconfig,可以将LSM钩子集成到内核中。
摘要由CSDN通过智能技术生成

使用LSM做一个系统的钩子,是我在本科毕设的核心。具体的代码已经没有了,但是这个LSM的demo可以帮助初步的配置,之后的代码实现主要依赖于LSM提供的钩子,并且需要对task_structinode_struct有一定的理解。

/*
* Test Linux Security Module
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2, as
* published by the Free Software Foundation.
*
*/

#include <linux/security.h>
#include <linux/sysctl.h>
#include <linux/ptrace.h>
#include <linux/prctl.h>
#include <linux/ratelimit.h>
#include <linux/workqueue.h>
#include <linux/file.h>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值