Giter Site home page Giter Site logo

theori-io / gooroom-interpreters-lock Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ultract/gooroom-interpreters-lock

0.0 1.0 0.0 18 KB

Restricting interpreters and script files in the Linux system

License: GNU General Public License v2.0

Makefile 1.01% Shell 1.27% C 97.73%

gooroom-interpreters-lock's Introduction

gooroom-interpreters-lock

Intro

  • To control unauthorized execution of interpreters and script files e.g. Python and Perl
  • Hooking sys_execve(), sys_execveat(), bprm_change_interp() in the Linux kernel (Referred to ftrace-hook)
  • IMA-EVM or noexec mount option required

Test environment

  • Debian 9 (Stretch), Debian 10 (Buster), Debian 11 (Bullseye)
  • Ubuntu 20.04 (Focal Fossa)

Build and install

$ sudo apt install build-essential linux-headers-$(uname -r) 
$ ./build_run.sh
$ ./build_debug.sh # only for debugging

Details

Etc

Enable/Disable via sysfs

$ sudo /bin/bash -c 'echo "0" > /sys/fs/interp_lock/lock_state' # Disable
$ sudo /bin/bash -c 'echo "1" > /sys/fs/interp_lock/lock_state' # Enable

Auto-loading at booting

$ sudo cp ./gooroom_interp_lock.ko /lib/modules/$(uname -r)/kernel/drivers/
$ echo 'gooroom_interp_lock' | sudo tee -a /etc/modules
$ sudo depmod

Acknowledgments

This program has been developed for the security of the Gooroom platform which is an open-source project. This work was supported by Institute for Information & communications Technology Promotion (IITP) grant funded by the Korea government (MSIP) (No.R0236-15-1006, Open Source Software Promotion).

gooroom-interpreters-lock's People

Contributors

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