Giter Site home page Giter Site logo

informramiz / linux-systemcalltable-hooking Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 4.0 256 KB

This a Loadable Kernel Module (LKM) for System Call Table Hooking along with a user space C++ program to communicate and control it. I coded it almost 4 years back. Just pushing it Github for a memory.

License: Apache License 2.0

C++ 16.07% C 83.93%

linux-systemcalltable-hooking's Introduction

Linux-SystemCallTable-Hooking

This a Loadable Kernel Module (LKM) for System Call Table Hooking along with a user space C++ program to communicate and control it. I coded it almost 4 years back. Just pushing it Github for a memory.

This LKM when enabled checks type of every file opened on any Linux based system like Ubuntue, Android and if instructed by user space program driver.cpp blocks all files of specific type. So for example, if LKM file:proc.c is loaded and user space program driver.cpp instructs it to block all files of type PDF then no one will be able to read or write any file of type PDF. As file type is saved as a magic code in first few characters of each file so this LKM is not that expensive in terms of comparsion but there is definitely a cost in terms of file IO.

I wrote this program when I was studying Linux System Programming and Linux Operating System. As I knew how files were saved and opened and how system calls were executed when a call is received from user space to kernel space so it was a fun project at the time. Here is how call flow looks like.

system-call-flow

I also deployed it to Android and also developed an Android application to control this LKM through an Android app. Below are some screenshots of the app and how it allowed user to control LKM.

android-screenshots

linux-systemcalltable-hooking's People

Contributors

informramiz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.