Hermes/Dyforge is a program written in c++ allows you to inject a dll that can analyze all processes in a program, can be used for mod and reverse engeneering
| 1 | # DyHexInject - DyMain injector |
| 2 | |
| 3 | DyHexInject è un modulo C per l'iniezione e la comunicazione con DyMain.dll. È progettato per essere utilizzato da DyForge come componente di iniezione. |
| 4 | |
| 5 | ## Caratteristiche |
| 6 | |
| 7 | - Iniezione DLL sicura e modulare |
| 8 | - Gestione dei processi target |
| 9 | - Sistema di comunicazione con la DLL iniettata |
| 10 | - Logging di debug integrato |
| 11 | - API C pulita e documentata |
| 12 | |
| 13 | ## Requisiti |
| 14 | |
| 15 | - Windows 7 o superiore |
| 16 | - Visual Studio 2019 o superiore |
| 17 | - Windows SDK 10.0 o superiore |
| 18 | |
| 19 | ## Compilazione |
| 20 | |
| 21 | 1. Aprire il prompt dei comandi di Visual Studio |
| 22 | 2. Navigare alla directory del progetto |
| 23 | 3. Eseguire `build.bat` |
| 24 | |
| 25 | ## Utilizzo |
| 26 | |
| 27 | ```c |
| 28 | #include "DyHexInject.h" |
| 29 | |
| 30 | // Inizializza DyHexInject |
| 31 | DyHexInjectError error = DyHexInject_Initialize(); |
| 32 | if (error != DYHEXINJECT_SUCCESS) { |
| 33 | // Gestisci l'errore |
| 34 | } |
| 35 | |
| 36 | // Apri il processo target |
| 37 | DyHexInjectProcessInfo processInfo; |
| 38 | error = DyHexInject_OpenProcess(processId, &processInfo); |
| 39 | if (error != DYHEXINJECT_SUCCESS) { |
| 40 | // Gestisci l'errore |
| 41 | } |
| 42 | |
| 43 | // Configura l'iniezione |
| 44 | DyHexInjectConfig config = { |
| 45 | .waitForInjection = true, |
| 46 | .hideInjection = true, |
| 47 | .enableDebugLogging = true |
| 48 | }; |
| 49 | wcscpy_s(config.dllPath, MAX_PATH, L"path/to/DyMain.dll"); |
| 50 | |
| 51 | // Inietta la DLL |
| 52 | error = DyHexInject_InjectDll(&processInfo, &config); |
| 53 | if (error != DYHEXINJECT_SUCCESS) { |
| 54 | // Gestisci l'errore |
| 55 | } |
| 56 | |
| 57 | // Avvia la comunicazione |
| 58 | HANDLE communicationHandle; |
| 59 | error = DyHexInject_StartCommunication(&processInfo, &communicationHandle); |
| 60 | if (error != DYHEXINJECT_SUCCESS) { |
| 61 | // Gestisci l'errore |
| 62 | } |
| 63 | |
| 64 | // Invia comandi |
| 65 | error = DyHexInject_SendCommand(communicationHandle, "START_ANALYSIS", strlen("START_ANALYSIS")); |
| 66 | if (error != DYHEXINJECT_SUCCESS) { |
| 67 | // Gestisci l'errore |
| 68 | } |
| 69 | |
| 70 | // Ricevi risposte |
| 71 | char responseBuffer[1024]; |
| 72 | size_t bytesReceived; |
| 73 | error = DyHexInject_ReceiveResponse(communicationHandle, responseBuffer, sizeof(responseBuffer), &bytesReceived); |
| 74 | if (error != DYHEXINJECT_SUCCESS) { |
| 75 | // Gestisci l'errore |
| 76 | } |
| 77 | |
| 78 | // Pulizia |
| 79 | DyHexInject_CloseProcess(&processInfo); |
| 80 | DyHexInject_Cleanup(); |
| 81 | ``` |
| 82 | |
| 83 | ## Integrazione con DyForge |
| 84 | |
| 85 | DyHexInject è progettato per essere utilizzato come componente di DyForge. Per integrare: |
| 86 | |
| 87 | 1. Includi `DyHexInject.h` nel tuo progetto |
| 88 | 2. Collega con `DyHexInject.lib` |
| 89 | 3. Copia `DyHexInject.dll` nella directory di output |
| 90 | |
| 91 | ## Note di Sicurezza |
| 92 | |
| 93 | - L'iniezione DLL richiede privilegi elevati |
| 94 | - Utilizzare sempre `hideInjection = true` in produzione |
| 95 | - Gestire sempre gli errori e pulire le risorse |
| 96 | - Non esporre l'API direttamente all'utente finale |
| 97 | |
| 98 | ## Licenza |
| 99 | |
| 100 | Questo progetto è rilasciato sotto la licenza MIT. |