Giter Club home page Giter Club logo

fumo_loader's Introduction

fumo loader

All-in-one kernel-based DLL injector

Features

  • Manual map a DLL into kernel memory and expose it to user mode via page table manipulation
  • Re-generate a unique, encrypted executable each time it is run and delete the old one
  • Store the target DLL in an encrypted form on disk (.fumo file)
  • Tray icon and notifications that tell you about the status of the loader and allow you to abort the injection process
  • Wait for certain modules to be loaded in the target process before injecting
  • No running processes during injection (injects itself into a different process, explorer.exe by default)
  • No open handles to the target process
  • No new threads in the target process (injects using APCs from the kernel)
  • Compatible with:
    • Windows 10 20H1 to Windows 11 22H2 (x64) (in theory, only tested on W11 22H2)
    • Secure boot
    • PatchGuard
    • Driver Signature Enforcement
    • Vulnerable driver blocklist

Limitations

  • NOT Compatible with:
    • 32-bit Windows and 32-bit processes
    • Hypervisor code integrity (HVCI)
    • KVA Shadowing (aka the Meltdown mitigation). Modern CPUs aren't affected, disable Meltdown protection on older ones.
    • Good anti-cheats (this is designed for defeating user-mode anti-cheats)
    • Probably a bunch of anti-virus software
    • Old versions of Windows (before 20H1)
  • Target DLL MUST NOT have:
    • Thread-local storage (TLS)
    • Vectored exception handlers (VEH) (adding a global handler manually is fine though)

Caveats

  • (Currently) it does not clean any traces of the vulnerable driver
    • Reboot before loading any "decent" anti-cheat if you don't feel like being insta banned
  • The target process needs to have a thread that we can schedule APCs on (this is usually not an issue outside of very simple hello world programs that only have one thread)
  • You might get random DEP violations because memory above 0x7FFF'FFFFFFFF is technically not valid user-mode memory (at least as far as Windows APIs are concerned, your CPU doesn't care and will happily execute it, that's the whole idea behind this loader)
    • You will have to register an exception handler in your DLL that will catch the exception and return EXCEPTION_CONTINUE_EXECUTION whenever it encounters a DEP violation above 0x7FFF'FFFFFFFF

Usage

Prepare the .fumo file

  1. Download the latest release or build it yourself
  2. Drag and drop a DL onto fumo_encoder.exe
  3. Fill out the process name
  4. Fill out what DLL(s) to wait for before injecting

Inject

  1. Drag and drop the generated .fumo file onto fumo.exe
  2. Wait for the success notification or error message box
  3. Open the target process
  4. Wait for the target DDL(s) to be loaded
  5. ...
  6. Profit

Building

Requirements

  • Visual Studio 2022 build tools (lower might work, but not tested)
  • Windows Driver Kit 10 (WDK)
  • CMake

Configure and build

# configure the x64-windows preset
cmake --preset=x64-windows
# build the project
cmake --build --preset=Release

Or use the CMake integration built into your IDE of choice

TODO (feel free to contribute)

  • Add support for TLS
  • Add support for VEH
  • Add support for KVA Shadowing
  • Do some trace cleaning

Credits

Libraries and tools used

  • KDU - the driver vulnerable mapper
  • libKDU - My wrapper around KDU that turns it into a static library
  • lazy_importer - inlined import resolution (used for position-independent code)
  • xorstr - inlined and encrypted strings (also used for position-independent code)
  • FindWDK - CMake module for building Windows drivers
  • CMake - amazing build system
  • @slnchyt - the tray icon

Inspiration

  • ThePerfectInjector - the original idea for this injection method
  • Blackbone - well-written kernel code that I used as a reference (and stole some code from)

License

MIT

Number of Pasters Star History

Star History Chart

fumo_loader's People

Contributors

dumbaspl avatar oszku 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.