Giter VIP home page Giter VIP logo

escalator's Introduction

escalator

Sudo after the fact!

Note: This repository is mainly hosted on GitLab. To raise issues and contribute, please go there.

Why?

We've all been there. We opened a file in an editor, spent 5 hours editing it and... "Dammit, didn't sudo..."

Not again! Use escalator to sudo the editor after the fact!

What does it do?

This little kernel module will take the task_struct of the passed process, get it's cred & real_cred and patch them to be root. While in my tests that works awesome, here be dragons and it might not work for you! It was developed towards a 4.18.12-arch1-1-ARCH kernel on Arch Linux. Your results may vary on other kernels.

Usage

Note: /sys/kernel/escalate_process is only writable by root!

# Compile
make # You need kernel headers installed!

# Install via
sudo make install
modprobe escalator pid=<pid of process to escalate - Optional>

# Load without install via
sudo insmod ./escalator.ko pid=<pid of process to escalate - Optional>

# Use with helper script:
escalator <pid ...>

# Use manually:
echo <pid> | sudo tee /sys/kernel/escalate_process

TODOs

  • pkill like 'escalate all processes that match X'
  • set capabilities
  • set any UID/GID desired instead of always setting 0 (root)

Is it any good?

Yes

License

GPL2.0

escalator's People

Contributors

t4cc0re avatar

Watchers

 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.