{"id":13537977,"url":"https://github.com/anhkgg/superdllhijack","last_synced_at":"2025-04-13T00:46:04.769Z","repository":{"id":41967533,"uuid":"159637135","full_name":"anhkgg/SuperDllHijack","owner":"anhkgg","description":"SuperDllHijack：A general DLL hijack technology, don't need to manually export the same function interface of the DLL, so easy! 一种通用Dll劫持技术，不再需要手工导出Dll的函数接口了","archived":false,"fork":false,"pushed_at":"2021-11-10T14:40:55.000Z","size":668,"stargazers_count":938,"open_issues_count":5,"forks_count":263,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-04-13T00:45:51.961Z","etag":null,"topics":["dllhijack","hook","inject"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anhkgg.png","metadata":{"files":{"readme":"README-zh_CN.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-29T09:01:50.000Z","updated_at":"2025-04-09T06:08:18.000Z","dependencies_parsed_at":"2022-08-12T00:50:50.267Z","dependency_job_id":null,"html_url":"https://github.com/anhkgg/SuperDllHijack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anhkgg%2FSuperDllHijack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anhkgg%2FSuperDllHijack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anhkgg%2FSuperDllHijack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anhkgg%2FSuperDllHijack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anhkgg","download_url":"https://codeload.github.com/anhkgg/SuperDllHijack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650420,"owners_count":21139672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dllhijack","hook","inject"],"created_at":"2024-08-01T09:01:05.456Z","updated_at":"2025-04-13T00:46:04.694Z","avatar_url":"https://github.com/anhkgg.png","language":"C++","funding_links":[],"categories":["\u003ca id=\"9eee96404f868f372a6cbc6769ccb7f8\"\u003e\u003c/a\u003e新添加的","\u003ca id=\"9eee96404f868f372a6cbc6769ccb7f8\"\u003e\u003c/a\u003e工具","\u003ca id=\"89f963773ee87e2af6f9170ee60a7fb2\"\u003e\u003c/a\u003eDLL"],"sub_categories":["\u003ca id=\"31185b925d5152c7469b963809ceb22d\"\u003e\u003c/a\u003e新添加的","\u003ca id=\"f39e40e340f61ae168b67424baac5cc6\"\u003e\u003c/a\u003eDLL劫持"],"readme":"# SuperDllHijack\n\n一种通用Dll劫持技术，不再需要手工导出Dll的函数接口了，so easy！\n\n使用方法：\n\n编写一个和劫持目标Dll同名的dll（如target.dll），原始dll改名为其他名字（如target.dll.1)，在DllMain种调用SuperDllHijack接口完成劫持。\n\n## 更新：\n\n2020年4月4日\n1. 修正x64获取peb的bug。感谢[@yves-yl](https://github.com/yves-yl)、[@kiwings](https://github.com/kiwings)、[@6769](https://github.com/6769)。\n\n**更多使用请看`example`代码。**\n\n```\nVOID DllHijack1(HMODULE hMod)\n{\n\tTCHAR tszDllPath[MAX_PATH] = { 0 };\n\n\tGetModuleFileName(hMod, tszDllPath, MAX_PATH);\n\tPathRemoveFileSpec(tszDllPath);\n\tPathAppend(tszDllPath, TEXT(\"target.dll.1\"));\n\n\tSuperDllHijack(L\"target.dll\", tszDllPath);\n}\n\nBOOL APIENTRY DllMain( HMODULE hModule,\n                       DWORD  ul_reason_for_call,\n                       LPVOID lpReserved\n                     )\n{\n    switch (ul_reason_for_call)\n    {\n    case DLL_PROCESS_ATTACH:\n\t\tDllHijack(hModule); break;\n    case DLL_THREAD_ATTACH:\n    case DLL_THREAD_DETACH:\n    case DLL_PROCESS_DETACH:\n        break;\n    }\n    return TRUE;\n}\n```\n\n技术细节请看博客：[https://anhkgg.com/dllhijack/](https://anhkgg.com/dllhijack/)\n\n[https://mp.weixin.qq.com/s/Nx4C2mx94V9vhvU8Eqfobg](https://mp.weixin.qq.com/s/Nx4C2mx94V9vhvU8Eqfobg)\u003cbr/\u003e\n[https://bbs.pediy.com/thread-248050.htm](https://bbs.pediy.com/thread-248050.htm)\u003cbr/\u003e\n\n# 支持作者\n\n![img](pay.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanhkgg%2Fsuperdllhijack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanhkgg%2Fsuperdllhijack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanhkgg%2Fsuperdllhijack/lists"}