For packet injection you should probably look into API hooking (using a proxy DLL is one of the simplest ways to do this)
here is an interesting concept -
"GNU httptunnel"
UNIX only but works under win32 in a cygwin port. It opens a device, captures outgoing packets and rewrites their headers.
program -> httptunnel -> driver -> device -> wire
like I said...interesting concept, obviously UNIX > windows.
Use Ettercap/Etterfilter for MITM attacks...
Most of you have a linux box lying around, right? Say as a router for your home network?
Uhhh, you mean Ettercap + Ethereal? Yeah ettercap does some nice MITMs (ARP poisoning, ICMP redirect, DNS spoofing). Then again Cain & Abel does MITM too (only ARP poisoning, but the interface is easier to figure out).
EDIT:
That's only for sniffing, by the way - not rewriting packets dynamically (I wish I could do that...)
Packet hacking can be done several ways...
One of the easiest ways is by creating a proxy. You start by changing the IP the game connects to, to your local machines ip (127.0.0.1), and then having an application that intercepts all the packets from and to the game. Which allows you to send and receive packets...
The more complicated way is by hooking/injecting directly to the game, and using the games own calls to send and receive packets. This is also the best way because you will be able to use the games own packet send/recieve functions for encrypted packets...
Did someone delete my post?
I said EtterFilter (as in EtterCap/EtterFilter).
And yes, it's for rewriting packets dynamically.
One of the best things to do when you're the MITM is dynamic rewriting of packets (not that it's the only useful thing to do, protocol degradation is also handy if the client and server is sloppily secured)