Countersurveillance refers to measures undertaken to prevent surveillance, including covert surveillance. Countersurveillance may include electronic methods such as bug sweeping, the process of detecting surveillance devices, including covert listening devices, visual surveillance devices as well as Countersurveillance software to thwart unwanted attempts by cyber crooks to access computing and mobile devices for various nefarious reasons (e.g. theft of financial, personal or corporate data). More often than not, countersurveillance will employ a set of actions (countermeasures) that, when followed, reduce the risk of surveillance. Countersurveillance should not be confused with sousveillance (inverse surveillance) as the latter does not necessarily aim to prevent or reduce surveillance.
Most bugs emit some form of electromagnetic radiation, usually radio waves. The standard counter-measure for bugs is therefore to "sweep" for them with a receiver, looking for the radio emissions. Professional sweeping devices are very expensive. Low-tech sweeping devices are available through amateur electrical magazines, or they may be built from circuit designs on the Internet.
Sweeping is not foolproof. Advanced bugs can be remotely operated to switch on and off, and some even rapidly switch frequencies according to a predetermined pattern in order to make location with sweepers more difficult. A bug that has run out of power may not show up during a sweep, which means that the sweeper will not be alerted to the surveillance. Also some devices have no active parts, an example is the Great Seal given to the US Ambassador to Moscow which hid a device (the Thing).
Amidst concerns over privacy, software countermeasures have emerged to prevent cyber-intrusion, the un-authorized act of spying, snooping, and stealing personally identifiable information or other proprietary assets (e.g. images) through cyberspace.