Dependent on usage and a few other things. The issue as a whole can be pretty hazy. In the case of consoles, however, you run the risk of being banned. On PC the regs are considerably looser. I don't advocate console modding personally, but always enjoy a good one on the PC.
People think modding and hacking are the same when modding and hacking are 2 very different things, modding isnt illegal, and 10th lobbies on mw2 are not hacks theres mods. hacking is like breaking into a database or someone elses computer, thats illegal