Assemblies Modification
We can arbitrarily modify assemblies, by using this technique to add debugging statements to a log file or alter an assembly’s attributes in order to better debug our target application.
In order to demonstrate this technique, we will need to first Decompile our custom executable file and edit it using dnSpy. Let’s right-click Program and choose Edit Class.
Then we’ll change “Your answer was: “ to “You said: “ (Figure 40).
And finally, we’ll click Compile, then File > Save All to overwrite the original version of the executable file.
If we return to our command prompt and re-run test.exe, the second print statement is now “You said: “