Espionage
The United States, like most nations, conducts espionage against other nations, under the control of the National Clandestine Service. Britain's espionage activities are controlled by the Secret Intelligence Service.

Technology and techniques: Source:

Organization: A spy is a person employed to seek out top secret information from a source. Within the United States Intelligence Community, "asset" is more common usage. A case officer or Special Agent, who may have diplomatic status (i.e., official cover or non-official cover), supports and directs the human collector. Cut-outs are couriers who do not know the agent or case officer but transfer messages. A safe house is a refuge for spies. Spies often seek to obtain secret information from another source.
In larger networks, the organization can be complex with many methods to avoid detection, including clandestine cell systems. Often the players have never met. Case officers are stationed in foreign countries to recruit and supervise intelligence agents, who in turn spy on targets in the countries where they are assigned. A spy need not be a citizen of the target country and hence does not automatically commit treason when operating within it. While the more common practice is to recruit a person already trusted with access to sensitive information, sometimes a person with a well-prepared synthetic identity (cover background), called a legend in tradecraft, may attempt to infiltrate a target organization.
These agents can be moles (who are recruited before they get access to secrets), defectors (who are recruited after they get access to secrets and leave their country) or defectors in place (who get access but do not leave).
A legend is also employed for an individual who is not an illegal agent, but is an ordinary citizen who is "relocated", for example, a "protected witness". Nevertheless, such a non-agent very likely will also have a case officer who will act as a controller. As in most, if not all synthetic identity schemes, for whatever purpose (illegal or legal), the assistance of a controller is required.
Spies may also be used to spread disinformation in the organization in which they are planted, such as giving false reports about their country's military movements, or about a competing company's ability to bring a product to market. Spies may be given other roles that also require infiltration, such as sabotage.
Many governments spy on their allies as well as their enemies, although they typically maintain a policy of not commenting on this. Governments also employ private companies to collect information on their behalf such as SCG International Risk, International Intelligence Limited and others.
Many organizations, both national and non-national, conduct espionage operations. It should not be assumed that espionage is always directed at the most secret operations of a target country. National and terrorist organizations and other groups are also targeted. This is because governments want to retrieve information that they can use to be proactive in protecting their nation from potential terrorist attacks.
Communications both are necessary to espionage and clandestine operations, and also a great vulnerability when the adversary has sophisticated SIGINT detection and interception capability. Spies rely on COVCOM or covert communication through technically advanced spy devices. Agents must also transfer money securely.

Industrial espionage: Reportedly Canada is losing $12 billion and German companies are estimated to be losing about €50 billion ($87 billion) and 30,000 jobs to industrial espionage every year.

Agents in espionage: In espionage jargon, an "agent" is the person who does the spying. They may be a citizen of a country recruited by that country to spy on another; a citizen of a country recruited by that country to carry out false flag assignments disrupting his own country; a citizen of one country who is recruited by a second country to spy on or work against his own country or a third country, and more.
In popular usage, this term is sometimes confused with an intelligence officer, intelligence operative, or case officer who recruits and handles agents.
Among the most common forms of agent are:

Agent provocateur: instigates trouble or provides information to gather as many people as possible into one location for an arrest.
Intelligence agent: provides access to sensitive information through the use of special privileges. If used in corporate intelligence gathering, this may include gathering information of a corporate business venture or stock portfolio. In economic intelligence, "Economic Analysts may use their specialized skills to analyze and interpret economic trends and developments, assess and track foreign financial activities, and develop new econometric and modelling methodologies." This may also include information of trade or tariff.
Agent-of-influence: provides political influence in an area of interest, possibly including publications needed to further an intelligence service agenda. The use of the media to print a story to mislead a foreign service into action, exposing their operations while under surveillance.
Double agent: engages in clandestine activity for two intelligence or security services (or more in joint operations), who provides information about one or about each to the other, and who wittingly withholds significant information from one on the instructions of the other or is unwittingly manipulated by one so that significant facts are withheld from the adversary. Peddlers, fabricators, and others who work for themselves rather than a service are not double agents because they are not agents. The fact that double agents have an agent relationship with both sides distinguishes them from penetrations, who normally are placed with the target service in a staff or officer capacity."
Redoubled agent: forced to mislead the foreign intelligence service after being caught as a double agent.
Unwitting double agent: offers or is forced to recruit as a double or redoubled agent and in the process is recruited by either a third-party intelligence service or his own government without the knowledge of the intended target intelligence service or the agent. This can be useful in capturing important information from an agent that is attempting to seek allegiance with another country. The double agent usually has knowledge of both intelligence services and can identify operational techniques of both, thus making third-party recruitment difficult or impossible. The knowledge of operational techniques can also affect the relationship between the operations officer (or case officer) and the agent if the case is transferred by an operational targeting officer] to a new operations officer, leaving the new officer vulnerable to attack. This type of transfer may occur when an officer has completed his term of service or when his cover is blown.
Sleeper agent: recruited to wake up and perform a specific set of tasks or functions while living undercover in an area of interest. This type of agent is not the same as a deep cover operative, who continually contacts a case officer to file intelligence reports. A sleeper agent is not in contact with anyone until activated.
Triple agent: works for three intelligence services.
Less common or lesser known forms of agent include:

Access agent: provides access to other potential agents by providing offender profiling information that can help lead to recruitment into an intelligence service.
Confusion agent: provides misleading information to an enemy intelligence service or attempts to discredit the operations of the target in an operation.
Facilities agent: provides access to buildings, such as garages or offices used for staging operations, resupply, etc.
Illegal agent: lives in another country under false credentials and does not report to a local station. A nonofficial cover operative can be dubbed an "illegal" when working in another country without diplomatic protection.
Principal agent: functions as a handler for an established network of agents, usually considered "blue chip".

Law: Espionage against a nation is a crime under the legal code of many nations. In the United States, it is covered by the Espionage Act of 1917. The risks of espionage vary. A spy violating the host country's laws may be deported, imprisoned, or even executed. A spy violating its own country's laws can be imprisoned for espionage or/and treason (which in the United States and some other jurisdictions can only occur if they take up arms or aids the enemy against their own country during wartime), or even executed, as the Rosenbergs were. For example, when Aldrich Ames handed a stack of dossiers of U.S. Central Intelligence Agency (CIA) agents in the Eastern Bloc to his KGB-officer "handler", the KGB "rolled up" several networks, and at least ten people were secretly shot. When Ames was arrested by the U.S. Federal Bureau of Investigation (FBI), he faced life in prison; his contact, who had diplomatic immunity, was declared persona non grata and taken to the airport. Ames' wife was threatened with life imprisonment if her husband did not cooperate; he did, and she was given a five-year sentence. Hugh Francis Redmond, a CIA officer in China, spent nineteen years in a Chinese prison for espionage—and died there—as he was operating without diplomatic cover and immunity.
In United States law, treason, espionage, and spying are separate crimes. Treason and espionage have graduated punishment levels.
The United States in World War I passed the Espionage Act of 1917. Over the years, many spies, such as the Soble spy ring, Robert Lee Johnson, the Rosenberg ring, Aldrich Hazen Ames, Robert Philip Hanssen, Jonathan Pollard, John Anthony Walker, James Hall III, and others have been prosecuted under this law.

History of espionage laws: From ancient times, the penalty for espionage in many countries was execution. This was true right up until the era of World War II; for example, Josef Jakobs was a Nazi spy who parachuted into Great Britain in 1941 and was executed for espionage.
In modern times, many people convicted of espionage have been given penal sentences rather than execution.