{"id":28521715,"url":"https://github.com/dumitory-dev/dll-injector","last_synced_at":"2025-09-10T12:32:48.877Z","repository":{"id":121358958,"uuid":"297916476","full_name":"dumitory-dev/DLL-Injector","owner":"dumitory-dev","description":"This simple injector is for injecting DLL into processes.","archived":false,"fork":false,"pushed_at":"2020-09-24T08:57:57.000Z","size":36,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-04T00:37:01.176Z","etag":null,"topics":["c","dll-injection","injection"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dumitory-dev.png","metadata":{"files":{"readme":"README.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-09-23T09:17:13.000Z","updated_at":"2024-04-29T06:25:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed712db6-cab4-4bed-bea6-c4e34b105506","html_url":"https://github.com/dumitory-dev/DLL-Injector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dumitory-dev/DLL-Injector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dumitory-dev%2FDLL-Injector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dumitory-dev%2FDLL-Injector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dumitory-dev%2FDLL-Injector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dumitory-dev%2FDLL-Injector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dumitory-dev","download_url":"https://codeload.github.com/dumitory-dev/DLL-Injector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dumitory-dev%2FDLL-Injector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274462708,"owners_count":25290111,"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","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["c","dll-injection","injection"],"created_at":"2025-06-09T08:13:27.040Z","updated_at":"2025-09-10T12:32:48.845Z","avatar_url":"https://github.com/dumitory-dev.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple DLL Injector\n\n### Appointment\nThis simple injector is for injecting DLL into processes.\n\n###  Functionality\n1. Checking administrator rights. (If the process has administrator rights, then the rights are set. It is also possible to use an injector without administrator rights (then DLL injection will be possible only in the processes of the current session)).\n2. X64 injector can inject DLL into X64 and X86 processes.\n3. X86 injector can inject DLL into X86 processes.\n\n###  Implementation details\nThe injector uses the offset of the virtual address to find the Wow64 address of the LoadLibrary function.\u003cbr\u003e\n-   Approximate order of actions:  \n    -   64 bit Injector retrieves address of kernel32.dll loaded by 32 bit target using EnumProcessModulesEx().\n    -   Get filename of that kernel32.dll, parse the PE header and get the RVA of LoadLibraryA.\n    -   At this point, we know where kernel32.dll is loaded in the 32 bit target and the address of the function from this DLL.\n    -   64 bit Injector starts remote thread in 32 bit target with ImageBase + Function RVA.\n    \nSupported OS: Win7 - Win10 x86 x64\n\n# Using\n\n``` c++\n#include \u003ciostream\u003e\n#include \u003cmemory\u003e\n\n#include \u003cWindows.h\u003e\n\nusing inject_func = BOOL(__cdecl*)(char const* dllPath, DWORD pid);\nusing error_func = DWORD(__cdecl*)();\n\nint main() {\n\t\n\ttry\n\t{\n\t\tstd::unique_ptr\u003cHINSTANCE__, decltype(\u0026::FreeLibrary)\u003e const p_library\n\t\t{\n\t\t\t::LoadLibrary(TEXT(\"Injector.dll\")),\n\t\t\t::FreeLibrary\n\t\t};\n\n\t\tif (!p_library)\n\t\t{\n\t\t\treturn EXIT_FAILURE;\n\t\t}\n\n\t\tauto const inject = reinterpret_cast\u003cinject_func\u003e(::GetProcAddress(p_library.get(), \"inject\"));\n\t\tauto const get_error = reinterpret_cast\u003cerror_func\u003e(::GetProcAddress(p_library.get(), \"getError\"));\n\n\t\tif(!inject || !get_error)\n\t\t{\n\t\t\treturn EXIT_FAILURE;\n\t\t}\n\n\t\tif (!inject(\"path_to_dll\", 0))\n\t\t{\n\t\t\tstd::cerr \u003c\u003c get_error() \u003c\u003c std::endl;\n\t\t\treturn EXIT_FAILURE;\n\t\t}\n\t}\n\tcatch (std::exception const\u0026 error)\n\t{\n\t\tstd::cerr \u003c\u003c error.what() \u003c\u003c std::endl;\n\t}\n\t\n}\n\n\n```\n\n\n# License\nInjector is licensed under the MIT License. Dependencies are under their respective licenses.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdumitory-dev%2Fdll-injector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdumitory-dev%2Fdll-injector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdumitory-dev%2Fdll-injector/lists"}