Code Monkey home page Code Monkey logo

reveng007 / reveng_rtkit Goto Github PK

View Code? Open in Web Editor NEW
209.0 7.0 45.0 7.09 MB

Linux Loadable Kernel Module (LKM) based rootkit (ring-0), capable of hiding itself, processes/implants, rmmod proof, has ability to bypass infamous rkhunter antirootkit.

Home Page: https://reveng007.github.io/blog/2022/03/08/reveng_rkit_detailed.html

License: MIT License

Makefile 0.55% C 99.45%
c linux-kernel linux-device-driver linux-kernel-module kernel-mode-rootkit malware antirootkit-bypass rkhunter-antirootkit backdoor security

reveng_rtkit's Issues

Bypassing chkrootkit antirootkit

Goal:
Our reveng_rtkit is getting detected by chkrootkit antirootkit. till now, under chkproc section.
To evade/bypass that, we have to manipulate or get around the mechanism present in chkproc.c file, ig!?

Surviving system reboot

Goal:
Once our reveng_rtkit is loaded into the kernel, it should be impossible for defenders/admins to remove our LKM rootkit even after system reboot.

Adding system() C function alike function in Linux Kernel programming, in order to open a new bash/sh prompt

This rootkit is capable of providing rootshell to only bash and sh shell, not others. Although, it is possible for other shells as well but with some tricks. We can use system() C function alike function in Linux Kernel programming, so that we 1st trigger a bash/sh shell then offer rootshell to the attacker. I haven't got that type of kernel function till now, but as soon as I get it, I will add it up. If anybody viewing this know about this, or interested to contribute, are most welcome to make a pull request.

Breaking `kernel_src/reveng_rtkit.c`

Breaking the main kernel c code kernel_src/reveng_rtkit.c into smaller files (or logical blocks).
Based on that, Makefile and README.md must be edited accordingly.

Surviving system reboot

Goal:
Once our reveng_rtkit is loaded into the kernel, it should be impossible for defenders/admins to remove our LKM rootkit even after system reboot.

[*] Contributing on the TODO LIST

Hello! @reveng007
First of, nice project I have to say! Many great links and well structured ๐Ÿ‘๐Ÿป.

Overview

I plan on contributing to this project, that is - I saw (both the Issues, and the TODO-List) you have made, some of them:

  • system() like function (but in kernel)
  • sockets (this one was a bit broad/confusing) - do you want it to be a reverse shell..?
  • Among others.

I plan on contributing to all the TODO's, (as by the time writing, each Issue and TODO you have listed does not really seem impossible for me to achieve). Like, the adding a system() like function.

TODO 4# Sockets

This TODO I need to request some details before I dive in. It is unclear what you want to achieve.

Adding Linux Kernel Sockets to this LKM rootkit, so that this rootkit acts as an all-rounder. Both, as a LKM rootkit as well as stealthy C2 Server.

on both of these, what exactly do you want to achieve here?:

  • "stealthy C2 Server."
  • "this rootkit acts as an all-rounder."

TODO 5# Persistence

As well as, this one got me specifically interested into contributing, since this would be a great exercise:

Additional Idea

I have thought of some things to add to your project, some of them is included (but not lim. To):

  • Cryptography, Obfuscation and Steganography.
    • Cryptography - encryption & decryption (like, encrypting the sockets so it's not sent in plain text..)
    • Obfuscation - This is pretty self explanatory.
    • Steganography - if required by the user (that controls the rootkit), he or she will be able to choose to use Steganography as a extra-additional step for security. That is, when exfiltrating something (data, which might be a reverse shell, or something on those lines) It could work by hiding it in, normal pictures or just something else.

Note these would take longer time to make but , still wanted to point them out.

Edit: I also thought of adding something related to kernel-mode shellcode execution, as it is something I have been working on now for some time. I will see if I have the time; if this would be something of interest.

have a great day! If any comments,thoughts,problems or concerns rise - please point them out!

Linux Kernel Sockets

Adding Linux Kernel Sockets to this LKM rootkit, so that this rootkit acts as an all-rounder. Both, as a LKM rootkit as well as stealthy C2 Server.

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.