Devcoder, You really can't, especially if you buy it on-line. Only when you get it home could you run the "Microsoft Genuine" tools, but not all vendors have similar programs and tools. Counterfeit packaging has gotten so sophisticated, you probably can't even look at it and tell, only the manufacturer can. I bought razor blades, and they were fakes, but you could not tell by looking (I could tell because they did not last as long).
The best way to protect yourself is to buy software from major retailers, either locally, or on-line. If you have a problem, they will stand behind you, although that is unlikely to happen in the first place.
Another thing to go by: The prices on software almost seem like there is price fixing going on behind the scenes, so if your price is WAY off what other major retailers are selling it for, it is probably bogus. Keep in mind, there are student versions of many softwares, which are much cheaper, but make sure you really meet the license requirements. That said, a really good place to buy software is Dell. I have found that although there is not a lot of room to play with the price, they are often lower...at least somewhat.
I do stay away from eBay though, which is ironic since I will be selling some software there soon (yes it is genuine though).