HyperDbg/hyperdbg/linux/mock
2026-02-13 15:25:45 +01:00
..
Makefile change dummy file header location and some changes in makefile 2026-02-13 12:25:26 +03:30
mock.c add information for current state of supporting linux 2026-02-13 15:25:45 +01:00
README.md add README 2026-02-13 12:25:26 +03:30

HyperDbg Linux Kernel Module

This directory contains a Linux kernel module that demonstrates and tests the
cross-platform memory management APIs (PlatformMem.c) from the HyperDbg project.

The module provides a simple test harness (mock.c) that exercises memory
allocation, copy, and deallocation functions in kernel space


Prerequisites

Before building the module, ensure you have the necessary development tools
and kernel headers installed:

# Install build essentials and kernel module utilities  
sudo apt-get update  
sudo apt-get install build-essential kmod  
  
# Install kernel headers for your running kernel  
sudo apt-get install linux-headers-`uname -r`  

project structure

hyperdbg/
 ├── include/
 │    └── platform/
 │         └── kernel/
 │              ├── header/
 │              └── code/
 └── linux/
      └── mock/
           ├── Makefile
           ├── mock.c
           └── HyperDbg.ko


Build the Module

cd hyperdbg/linux/mock```  
then build module:  
```bash  
make  

If successful, this will generate:

HyperDbg.ko  

Load the Module

to insert the module into the kernel:

sudo insmod HyperDbg.ko

Verify Module Loaded Successfully

you can use lsmod :

lsmod | grep HyperDbg

or you can inspect kernel module:

sudo dmesg | tail -10

Remove the Module

sudo rmmod HyperDbg

finally you can clean project:

make clean