{"id":22890062,"url":"https://github.com/adamhlt/iat-hooking","last_synced_at":"2025-08-13T20:06:20.846Z","repository":{"id":132610115,"uuid":"459555472","full_name":"adamhlt/IAT-Hooking","owner":"adamhlt","description":"IAT Hooking POC (x86 / x64) - Hook functions through the IAT","archived":false,"fork":false,"pushed_at":"2024-07-29T17:32:24.000Z","size":1005,"stargazers_count":33,"open_issues_count":0,"forks_count":12,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-02T21:01:47.761Z","etag":null,"topics":["cpp","hook","iat","winapi"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamhlt.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":"2022-02-15T11:46:25.000Z","updated_at":"2025-07-28T15:48:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"34d48d25-31f0-461a-8acf-f2ac5089c945","html_url":"https://github.com/adamhlt/IAT-Hooking","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adamhlt/IAT-Hooking","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamhlt%2FIAT-Hooking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamhlt%2FIAT-Hooking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamhlt%2FIAT-Hooking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamhlt%2FIAT-Hooking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamhlt","download_url":"https://codeload.github.com/adamhlt/IAT-Hooking/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamhlt%2FIAT-Hooking/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270305159,"owners_count":24562087,"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-08-13T02:00:09.904Z","response_time":66,"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":["cpp","hook","iat","winapi"],"created_at":"2024-12-13T21:58:12.389Z","updated_at":"2025-08-13T20:06:20.798Z","avatar_url":"https://github.com/adamhlt.png","language":"C++","readme":"```\n                          _______  ______   __  __            __   _            \n                         /  _/   |/_  __/  / / / /___  ____  / /__(_)___  ____ _ \n                         / // /| | / /    / /_/ / __ \\/ __ \\/ //_/ / __ \\/ __ `/\n                       _/ // ___ |/ /    / __  / /_/ / /_/ / ,\u003c / / / / / /_/ / \n                      /___/_/  |_/_/    /_/ /_/\\____/\\____/_/|_/_/_/ /_/\\__, /\n                                                                       /____/ \n                                                                          \n                                                                          \n                                     IAT Hooking POC (x86 / x64)\n                                    Hook functions through the IAT\n```\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/language-C%2B%2B-%23f34b7d.svg?style=for-the-badge\u0026logo=appveyor\" alt=\"C++\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/platform-Windows-0078d7.svg?style=for-the-badge\u0026logo=appveyor\" alt=\"Windows\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/arch-x86-red.svg?style=for-the-badge\u0026logo=appveyor\" alt=\"x86\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/arch-x64-green.svg?style=for-the-badge\u0026logo=appveyor\" alt=\"x64\"\u003e\n\u003c/p\u003e\n\n## :open_book: Project Overview :\n\nThis project have been created to show how IAT hooking works. \n\nYou can easily hook any functions in the IAT, you can also change the module you want to target.\n\n\u003e **Note** \u003cbr\u003e\n\u003e This project can be compiled for x86 and x64 architecture.\n\n## :rocket: Getting Started\n\n### Visual Studio :\n\n1. Open the solution file (.sln).\n2. Build the project in Release (x86 or x64)\n\nBuild for x86 / x64 (Debug and Realese).\n\n## :test_tube: Example\n\n#### MessageBoxA Hook\n\n```cpp\nusing MessageBoxPtr = int(WINAPI*)(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType);\nMessageBoxPtr MessageBoxTest;\n\n//MessageBoxA function hook.\nint WINAPI MessageBoxHook(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType)\n{\n\tprintf(\"MessageBoxA have been called !\\n\");\n\n\treturn MessageBoxTest(nullptr, \"This function have been hooked !\", \"test\", 0);\n}\n\nint main()\n{\n\t//Hook the MessageBoxA function\n\tconst LPVOID lpOrgFunction = IAT::Hook(\"user32.dll\", \"MessageBoxA\", \u0026MessageBoxHook);\n\tif (lpOrgFunction == nullptr)\n\t\treturn -1;\n\n\tMessageBoxTest = (MessageBoxPtr)lpOrgFunction;\n\n\tMessageBoxA(nullptr, \"This will never be displayed !\", \"test\", 0);\n\n\t//Unhook the MessageBoxA function\n\tIAT::Hook(\"user32.dll\", \"MessageBoxA\", lpOrgFunction);\n\n\tMessageBoxA(nullptr, \"This function have been unhooked !\", \"test\", 0);\n\n\treturn 0;\n}\n```\n\nhttps://user-images.githubusercontent.com/48086737/164978507-009e19fa-ecb8-4b09-a39b-0ba1bafddfc7.mp4\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamhlt%2Fiat-hooking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamhlt%2Fiat-hooking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamhlt%2Fiat-hooking/lists"}