GithubHelp home page GithubHelp logo

anthrax3 / flare-kscldr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mandiant/flare-kscldr

0.0 2.0 0.0 16 KB

FLARE Kernel Shellcode Loader

Home Page: https://www.fireeye.com/blog/threat-research/2018/04/loading-kernel-shellcode.html

License: Apache License 2.0

Batchfile 0.08% C 98.80% Makefile 1.12%

flare-kscldr's Introduction

Kernel Shellcode Loader

FLARE kernel shellcode loader. For discussion and example usage, see the blog: Loading Kernel Shellcode.

Build

Building the Driver

  1. Open a WDK build prompt
  2. Run ez.cmd to build and sign the driver and build the user-space app
  3. Output files will be in the bin directory

The user-space executable will install the driver if it is not already installed.

Building the User-Space Application Without msvcrt (optional)

  1. Open a Visual Studio build prompt
  2. Change to this directory
  3. Type rc.exe resource.rc
  4. Type cl.exe /Fekscldr.exe /I..\inc kscldr_u.c resource.res

Target Setup

One-time setup:

  1. Run bcdedit /set testsigning on
  2. Set up kernel debugging (likely entails bcdedit /set debug on).
  3. Not essential, but if you want to see debug output, be sure to adjust the following setting:
    [HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter]
    "DEFAULT"=dword:00000008
    
    The setting is literally named DEFAULT (as opposed to the (Default) value that is present under all registry keys). For details, see: Getting DbgPrint Output To Appear In Vista and Later
  4. Reboot.
  5. Copy the user-space executable kscldr.exe to the target machine. It will install the driver when you run it.

Optional Target Setup

Sure, you can install the driver manually if you really want to:

sc create kscldr type= kernel start= demand binPath= %CD%\kscldr.sys

The spaces after the equals are important, alas.

Running It

  1. Open either SysInternals' DbgView or your kernel debugger
  2. Run kscldr.exe your_kernel_shellcode.bin

If compiled with CFG_EN_ENFORCE_BREAKPOINT disabled (see inc\config.h), then the tool requires an additional requirement indicating whether to issue a kernel breakpoint prior to entering the shellcode.

flare-kscldr's People

Contributors

mikesiko avatar strictlymike 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.