{"id":13367077,"url":"https://github.com/anhkgg/SuperDllHijack","last_synced_at":"2025-03-12T18:31:52.329Z","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":934,"open_issues_count":5,"forks_count":263,"subscribers_count":44,"default_branch":"master","last_synced_at":"2025-03-05T19:30:19.745Z","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-03-03T10:41:10.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":243271410,"owners_count":20264451,"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-07-30T00:01:38.019Z","updated_at":"2025-03-12T18:31:51.752Z","avatar_url":"https://github.com/anhkgg.png","language":"C++","funding_links":[],"categories":["C++","C++ (225)","逆向破解"],"sub_categories":[],"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"}