Giter VIP home page Giter VIP logo

activationcontexthook's Introduction

Hook ActivationContext

This is simple tool to hook and force process to load redirected DLL.

To build and test code you will need Visual Studio Build tools 2013, 2015 or 2017, either standalone or one integrated with Visual Studio, and cmake:

Code is manipulating Activation Context DLL redirection in 2 ways. One method would be to fake AssemblyDirectory to point to the fake folder where you would store your fake DLL. For this attack sxsoaps.dll is used which is at the same time present in the SystemDefaultActivationContextData.

Another attack is to add new DLL redirection which will cause call LoadLibrary("meh.dll") to load redirecteddll.dll, and this attack can be used against the remote process to fake path of a system dll. In this case I chose to attack advapi32.dll loading.

Of course, next steps would be COM redirection for example, or window class hijacking, but that can be left as an exercise.

Code also gives ability to debug child process with --debug flag.

actctx.exe --debug

This will cause process to run in infinite loop at the LdrInitializeThunk thus debugger can be attached and ActivationContext data parsing can be debugged if needed.

Similar code for LdrDebug break you may find at ReWolf's code repository if you intend to do stand alone debugging from the very start of the process.

activationcontexthook's People

Contributors

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