A surveillance device, most commonly a hidden microphone or other concealed listening device (piezo sensors, for example), is also referred to as a bug. This may stem from the concept of being a fly on the wall, or the notion that an concealed listening device was like a bug, unwanted and hiding.

From Die.net:
: tap a telephone or telegraph wire to get information; "The FBI was tapping the phone line of the suspected spy"; "Is this hotel room bugged?" syn: wiretap, tap, intercept

http://dict.die.net/bug/