Giter Site home page Giter Site logo

linux-kernel-patch-guard's Introduction

linux-kernel-patch-guard

TL;DR

Minimal patch guard for Linux kernel.

Depends on systemd and kallsyms which means it will work on most of Linux distros except embedded systems which still use init.

Tested on Linux kernel version: 4.19.91.

How it works

Calculate hash of critical data structures and when a change occurs halt the computer with MALWARE DETECTED message.

The module has hiding mechanism for proc fs (/proc/modules) and sysfs (/sys/modules).

The module has self protect mechanism which protects from anyone to patch its binary on the disk or patch the module memory.

The module has persistency mechanism, which utilizes systemd kernel module loading. The module ensures to be the first module to load by manipulating systemd module order method. It will also write itself to the reboot notifier list and it will ensure to be the last one to be called at shutdown or reboot in order to ensure its persistency (by manipulating the reboot notifier list).

The data structures which currently supported are:

  • Interrupt descriptor table
  • Global descriptor table
  • System call table

Limitations

There are a lot of limitations and techniques to bypass my little patch guard. However, it's not easy at all.

Usage

cp patch_guard.ko /lib/modules/`uname -r`

insmod patch_guard.ko

DONE!!!

linux-kernel-patch-guard's People

Contributors

rhydon1337 avatar

Stargazers

ccdroid avatar Mohamed Saher avatar 布丁 avatar BaSs_HaXoR avatar Eyal Abramovitch avatar Nir Chachamovitz avatar Ofir Balassiano avatar  avatar itamar maouda avatar  avatar  avatar yimingqpa avatar  avatar  avatar  avatar Amit avatar Phil avatar Ilya V. Matveychikov avatar  avatar KuperGit avatar  avatar darkangel avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.