GithubHelp home page GithubHelp logo

yougar0 / driploader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xuanxuan0/driploader

0.0 0.0 0.0 384 KB

Evasive shellcode loader for bypassing event-based injection detection (PoC)

Home Page: https://blog.redbluepurple.io/offensive-research/bypassing-injection-detection

License: MIT License

C++ 96.96% C 1.18% Assembly 1.86%

driploader's Introduction

DripLoader (PoC)

msbuild

Evasive shellcode loader for bypassing event-based injection detection, without necessarily suppressing event collection. The project is aiming to highlight limitations of event-driven injection identification, and show the need for more advanced memory scanning and smarter local agent software inventories in EDR.

image

DripLoader evades common EDRs by:

  • using the most risky APIs possible like NtAllocateVirtualMemory and NtCreateThreadEx
  • blending in with call arguments to create events that vendors are forced to drop or log&ignore due to volume
  • avoiding multi-event correlation by introducing delays

What does DripLoader do

  • Identifies a base address suitable for our payload
  • Reserves enough AllocationGranularity (64kB) sized, NO_ACCESS memory segments at the base address
  • Loops over those
    • Allocating PageSize (4kB) sized, writable segments
    • Writing shellcode
    • Reprotecting as RX
  • Overwrites prologue of one ntdll function in the remote process memory space with a jmp to our base
  • Drops a thread on that trampoline

I'll explain some of the thinking here: https://blog.redbluepurple.io/offensive-research/bypassing-injection-detection

And so

  • It's able to fully bypass many EDR injection detections, including Defender ATP.
  • Bypasses simple thread-centric scanners like Get-InjectedThread. Persisting within a process is another story, and this is up to the payload author.
  • It is sRDI-compatible, but if your payload creates another local thread you will lose the benefit of thread start address in ntdll.

To test it out of the box

  • compile/download
  • XOR your binary shellcode blob file with default key 0x08, name it blob.bin
  • place both files in the same directory
  • run it and follow the prompts or ./DripLoader.exe <target_pid> <delay_per_step_ms>

I attached an example MessageBox blob for your pleasure, be aware though it's size is unrealistically small for a payload.

driploader's People

Contributors

xuanxuan0 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.