In the most common sense, of course, "this is a method that affects the behavior of a program in a way that its authors did not intend to" (wiki).
Then, all reflections and type builders using methods can also be called "code injection," but no one does.
When I always thought that “code injection” was something like “runtime”: how to start a thread in another process to get some interesting data, I was surprised how Reflexil understood this: “convert C # instructions to IL on” ', save the edited assembly and replace the old assembly with a new one "(10%, which I missed something).
So now I wonder what methods in .NET are called with the term "code injection"?
BTW. I am interested to know: is it possible to replace the "pointer to a virtual method" in the "table of virtual methods" with a very, very private, several times nested system class, with a pointer to my own method at runtime. Pure code injection from my understanding.
source
share