唉,一开始在纠结起个什么名字,感觉名字常常的很装逼,于是起了个这《手把手教你写LKM rookit》

  我觉得:手把手教你写LKM rookit! 之 第一个lkm程序及模块隐藏(一) 你们觉得:手把手教你写LKM rookit! 之 第一个lkm程序及模块隐藏(一)。。。。。。

       开始之前,我们先来理解一句话:一切的操作都是系统调用。系统通过陷入或者库的方式,让你跟内核的函数交互。当然啦,平时我们都处在用户态的情况下,系统调用调用的是内核态的函数,ps:这个系列完了,我们从内核级的rookit脱离出来,升级到bios级别的rootkit,哇卡卡~~

      那么我在这傻了吧唧的讲了半天,什么是LKM,Loadable Kernel Modules,翻译过来就是“可加载内核模块程序”。

      系统调用一般来处理什么I/O请求啦,进程管理啦,内存管理啊之类的,你想想原来你原来程序有个函数a,调用的是底层的函数b,你把函数b拦截了替换了一个函数c。。。。

      我的系统调用号的定义在 /usr/include/asm-generic/unistd.h 文件中

#include <asm/bitsperlong.h>

/*
 * This file contains the system call numbers, based on the
 * layout of the x86-64 architecture, which embeds the
 * pointer to the syscall in the table.
 *
 * As a basic principle, no duplication of functionality
 * should be added, e.g. we don't use lseek when llseek
 * is present. New architectures should use this file
 * and implement the less feature-full calls in user space.
 */

#ifndef __SYSCALL
#define __SYSCALL(x, y)
#endif

#if __BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)
#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _32)
#else
View Code

相关文章:

  • 2021-12-19
  • 2022-12-23
  • 2021-11-11
  • 2022-12-23
  • 2021-06-13
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-27
  • 2022-12-23
  • 2021-10-31
  • 2021-07-13
  • 2022-01-11
  • 2021-09-16
相关资源
相似解决方案