Giter Club home page Giter Club logo

kernel-module-fun's Introduction

Kernel module fun

Motivation

I didn't know at all how kernel modules worked. This is me learning how. This is all tested using the 3.5.0-18 kernel.

Contents

hello.c: a simple "hello world" module

hello-packet.c: logs every time your computer receives a packet. This one could easily be modified to drop packets 50% of the time.

rootkit.c: A simple rootkit. blog post explaining it more

Compiling them

I'm running Linux 3.5.0-18. (run uname -r) to find out what you're using. This almost certainly won't work with a 2.x kernel, and I don't know enough. It is unlikely to do any lasting damage to your computer, but I can't guarantee anything.

I have my kernel sources set up in /lib/modules/3.5.0-18-generic. I think I only needed to run

sudo apt-get install linux-headers-3.5.0-18-generic

but I don't remember for sure. If you try this out, I'd love to hear.

To compile them, just run

make

Inserting into your kernel (at your own risk!)

sudo insmod hello.ko
dmesg | tail

should display the "hello world" message

kernel-module-fun's People

Contributors

jvns avatar pbouamriou avatar avar 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.