You need a packet sniffer/editor program. You need to understand the layout of a packet datagram, which bytes mean what and where they go. You need to know which data you can alter, which you can't. you need to understand the UDP and TCP protocols on more than a beginners level. you need to know which packets contain the data you want to change, and what to change it to. You need to know how to falsify packet headers to make them look legit after you create them.
This sound like fun? Something you can learn over the weekend?
But regardless, the people hacking bnet and duping items and etc, don't know how to edit packets. Some smart programmer made them a program that does this for them. They just click and point, they're not manually editing packets by hand. Their little program intercepts the data going between their computer and bnet, alters it (or makes it's own copy with different data), and sends it on to it's destination. No brains required.