Git Product home page Git Product logo

fengjixuchui / superdllhijack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anhkgg/superdllhijack

0.0 1.0 0.0 669 KB

SuperDllHijack:A general DLL hijack technology, don't need to manually export the same function interface of the DLL, so easy! 一种通用Dll劫持技术,不再需要手工导出Dll的函数接口了

Home Page: qq-group:753894145

License: Apache License 2.0

C++ 73.57% C 26.43%

superdllhijack's Introduction

SuperDllHijack

中文版

A general DLL hijack technology, don't need to manually export the same function interface of the DLL, so easy!

Usage:

Create a DLL with the same name of the hijacked DLL(such as,target.dll), and rename the hijacked DLL to other name(such as, target.dll.1), then call SuperDllHijack function to do the hajick work.

Update:

2020-4-4

  1. fixed the bug of getting peb in x64。Thanks for @yves-yl@kiwings@6769

You can see more details in the example code.

VOID DllHijack1(HMODULE hMod)
{
	TCHAR tszDllPath[MAX_PATH] = { 0 };

	GetModuleFileName(hMod, tszDllPath, MAX_PATH);
	PathRemoveFileSpec(tszDllPath);
	PathAppend(tszDllPath, TEXT("target.dll.1"));

	SuperDllHijack(L"target.dll", tszDllPath);
}

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
                     )
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
		DllHijack(hModule); break;
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

There are the related articles about the technology:

  1. https://anhkgg.com/dllhijack/
  2. https://mp.weixin.qq.com/s/Nx4C2mx94V9vhvU8Eqfobg
  3. https://bbs.pediy.com/thread-248050.htm

Support me

img

superdllhijack's People

Contributors

anhkgg avatar fengjixuchui avatar

Watchers

 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.