I am looking for a way to sniff network packets and encode them with C# (in summary: alter network traffic).
I don't know how to explain my request but I need something like "Keyboard Hook".
Is there any library or software in .net or Windows API?
I don't think this is possible by default. But there are plenty of third party libraries that enable you to do that. Take a look at