Counterintelligence is a branch of the intelligence hierarchy which is concerned with keeping information out of the hands of foreign and domestic enemies. A number of different techniques are used to keep information safe and to generate misleading information which can be used to throw enemy agents off-track. Most nations have a government agency which supervises counterintelligence, and often several intelligence agencies have a counterintelligence branch which is separate from their regular operations.
Keeping potentially sensitive information out of enemy eyes is the most important goal of counterintelligence, and many counterintelligence agents work closely with security agents to ensure that information is secured and protected. As part of their mission, counterintelligence agencies gather information on foreign and enemy intelligence agencies, looking at their structures, methods of working, and known operatives. This information is used to exploit vulnerabilities and security holes on the enemy's side while protecting vital information.
In addition to protecting information, counterintelligence agencies also work to prevent subversion, assassination, sabotage, and other threats to information security and national security, using information gathered from enemy organizations to stay informed about such threats. They may also work in direct opposition to foreign operatives, performing what is known as counterespionage in an attempt to lead spies off the scent. Most counterintelligence agencies also work to deceive the enemy by planting information, making misleading plans, and so forth, in the hopes that this information will end up in the hands of the enemy, leading the enemy to make a mistake.
Espionage is a complex and fascinating field, and counterintelligence operations can be carried out in a wide range of locations. Some agents stay based in an office, working with digitized information and supervising other agents. Counterintelligence agencies also typically have departments with agents who work on decryption, data analysis, and other supporting tools to make gathered information useful. Other agents work in the field, sometimes under cover so that they can gather information about the enemy. They may also cooperate with regular intelligence agents on some missions to ensure the best possible outcome.
Many counterintelligence field agents work under cover, with some being actively recruited from within the organizations which employ them. Counterintelligence agencies take advantage of defectors, moles, and other disaffected individuals to collect sensitive information on opposing groups, governments, and agencies, and they may also use their own agents to penetrate opposing organizations with the goal of gathering information.