Skip to content

🔫 lkm module for emergency binary/script execution

Notifications You must be signed in to change notification settings

cedriczirtacic/emerg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

emerg

Purpose

Playing around with loadable kernel modules. Got the idea from @jarun keysniffer and @hephaest0s usbkill to make a tool that will be always runing in the background (from kernel-space) and when you type a "secret" phrase it will execute whatever was specified. NOTE: this works with standard terminals (tty) not with pseudo (pty).

Usage

Is simple, actually, but you will need to have superuser access to the GNU/Linux machine.

Clone the code:

    $ git clone https://github.com/cedriczirtacic/emerg.git
    $ cd emerg/

Compile the module:

    $ make

Then install the kernel module:

    $ sudo insmod emerg.ko phrase="test" exec="/root/binary"

Module parameters

The module has two parameters: one for the phrase (be careful with this one) and the second will be the path to an executable.

  1. phrase: typing this phrase will be the trigger so chose wisely
  2. exec: file to be executed (it can be a binary or script, just chmod +x the thing...)

Remove the module

Use the Makefile:

    $ make remove

About

🔫 lkm module for emergency binary/script execution

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published