- Go to your unity folder. Example:
Program Files (x86)\Steam\steamapps\common\7 Days To Die
- Go to your managed folder. Example
Program Files (x86)\Steam\steamapps\common\7DaysToDie_Data\Managed
- In here you will find many dlls, you need to find one that the game references but doesn't initialise with. System dlls and 3rd party dlls work well. I am using:
0Harmony.dll
- Edit the dll for an entry point. Open it in dnspy and fully expand down to the module class:
9. Now you have a nice compiled dll which contains your payload you can just edit the game name and registry directory for the game to place it in the location for the game and then call the load function to load it.
10. Now its installed in place the next time the game is ran all your malicious code will run.
Note that to implement this correctly you should implement an internal byte array into the referenced module for your payload. So it is a single file that initialises the payload.