In a chapter from their new book, Andrei Soldatov and Irinia Borogan outline how every ISP has to give access to the state

In 1998 the diminutive Vika Egorova was a 24-year-old editor at an obscure magazine. She had studied at the Moscow Engineering and Physics Institute, a preeminent school for training nuclear scientists, and had an interest in mathematics.

After graduating, she worked at a risk management company run by former KGB people, then was hired as an editor at Mir Kartochek, or World of Credit Cards. The circulation was tiny, but Egorova’s interests ranged beyond credit cards; she began learning about secret codes and developed contacts in the world of cryptology, the science of creating and deciphering clandestine messages.

What spawned Russia's 'troll army'? Experts on 'The Red Web' answer your questions Read more

In June she received a call from one of her contacts who worked for a small information security company. Egorova sensed the small company was related, somehow, to Fapsi, the Russian electronic intelligence agency modelled after the US National Security Agency.

Egorova knew that Fapsi was fighting the more powerful FSB, the main successor to the KGB. The intelligence services jostled with each other in a competition for power and money and especially fought for control over profitable businesses, such as encryption technology that the banks were required to buy from the secret services.

Egorova’s contact offered some information about credit card technology that might interest her magazine, so on June 10 she went to meet with him. He handed her several pages of documents, but when she scanned them quickly, she saw that the first page obviously had nothing to do with credit cards.

It was an official document of some kind, a draft with places for signatures — still blank. But at the very top of the draft was the word soglasovano, or “approved”.

The draft document described a government policy that would require all of Russia’s ISPs to install a device on their lines, a black box, that would connect the internet provider to the FSB. It would allow the FSB to silently and effortlessly eavesdrop on emails, which had become the main method of communication on the internet by 1998.

The device was called Sorm, an acronym in Russian for Systema Operativno-Rozysknikh Meropriatiy, or the System of Operative Search Measures. The document said that Sorm was “a system of technical means for providing investigative procedures on electronic networks”. More simply, eavesdropping on the internet.

“Do what you want with that,” her contact said of the papers, suggesting she might pass them along to her editor at the magazine or give them to an editor at Computerra, another computer weekly popular among Russian programmers.

Egorova realised the documents were a leak — a leak probably from Fapsi, intended to unmask the FSB’s plans to monitor all of the Russian internet. As she left the meeting, Egorova was uncertain what to do. But she knew she had to do something – and quickly.

She called her editor, who was out of town. She called her contact at Computerra, who was also out of town. Then she remembered Anatoly Levenchuk. She had met him only a few months beforehand, and his combative debating style had impressed her. Maybe he would know what to do with the information.

In Russia Levenchuk, then 40 years old, had become something of a legend in the early days of the internet and was a well-respected expert in the Russian stock market. But Levenchuk’s real passion was ideas. He had become a devoted follower of libertarianism, and he firmly believed in the smallest possible government intrusion into the economy.

He attempted to launch a libertarian political party in 1992, but it flopped and never got on the ballot. The ideas of libertarianism and freedom from government control were not widely or immediately grasped, and Levenchuk felt it needed to be explained to the Russian citizenry. With the arrival of the web, Levenchuk found the answer.

In 1994 he established Libertarium.ru, a website that grew into an important source of libertarian ideas, a place for debate about freedom, and a launching pad for various public campaigns for change. He was often invited to speak at conferences, and when he gave a talk, he would immediately stand up, walk onto a stage, and wave his arms for emphasis, with his sentences laden with an evocative Rostov accent, which was much more emotional than Moscow’s everyday idiom.

Egorova called Levenchuk at home and said she needed to have a “serious talk” with him. He picked up her worried tone and suggested they meet. There, she showed him the papers. “Look,” she said. “It seems I’ve got a leak, and I don’t know what to do with it. But I think you should know what to do with that piece of paper.”

She had a hard time persuading him at first; Levenchuk’s mind was wrapped up in a battle over the rules of the stock market — fighting with Fapsi, which wanted to make all stock market details as secret as possible. Levenchuk insisted that openness was essential in capital markets — it was the pillar of how a free market worked.

Pure and simple, the Sorm box was a backdoor to Russia’s internet, and the security service was about to open it

Facebook Twitter Pinterest An internet cafe in Moscow streams Vladimir Putin during a conference. Photograph: Denis Sinyakov/AFP/Getty Images

When Egorova said, insistently, that it was a leak — a leak from Fapsi — she finally got his attention. Levenchuk read the document and decided immediately. His experience with the internet made him particularly sensitive to what appeared to be almost unlimited powers granted to the FSB in the document.

Although they would have to get an eavesdropping warrant from the court, the FSB was not obliged to show it to anyone, not even the internet company they were tapping. The ISPs had no right to demand the FSB show it to them either, as they had no security clearance.

Who’s the true enemy of internet freedom - China, Russia, or the US? Read more

Making matters worse, the ISPs would have to pay for the black boxes, the Sorm equipment, and the installation, but they would have no access to it.

Pure and simple, the Sorm box was a backdoor to Russia’s internet, and the security service was about to open it.

Levenchuk and Egorova walked back to his residence. Libertarium.ru was hosted in his cramped, three-room apartment in southeast Moscow, in the shabby district of Kuzminki. In the kitchen was a personal computer, which had become the server for the website, and a scanner.

They scanned the document, and she helped him create hyperlinks. The next day, on June 11, 1998, Levenchuk posted the Sorm document online for the first time.

This was probably not what the leakers envisioned.

Egorova thought they wanted it passed to an editor, maybe written up as a small magazine item. Perhaps Fapsi intended it as nothing more than a shot across the bow of the FSB, a message that we know what you are doing.

But the document had come into the hands of the flamboyant and outspoken Levenchuk, who had long been struggling for more openness, and now he had a chance to do something about it. By posting the document, he thought he might force the FSB to at least adhere to their own requirement to seek a warrant before they tapped the Internet.

“I always understood these were the security services, and if they say they do it, it’s impossible to stop them,” he recalled. “I was interested in only one thing, whether they would tell the truth, whether they would comply with the rule about a warrant.”

Levenchuk didn’t stop there. He launched a public campaign to call attention to the draft and, in a larger sense, to push back against Sorm. He called all his contacts in the news media, started collecting signatures in protest, and contacted the major telecom operators, where he had high-level contacts.

He collected and posted on his website a list of questions that an ISP could ask the FSB when the security agents came to install the Sorm equipment. He also solicited — and received — feedback from some of the ISPs.

Levenchuk gleefully posted some of their feedback, maintaining the ISPs’ anonymity. The internet service providers were furious with the FSB less because of the principle of eavesdropping but because they were being asked to pay for it.

“Full, primitive caveman savagery,” one wrote. “Give them all, and more. And all at our own expense.” The provider added bitterly, “We will soon shoot each other on their orders, and bury — at our own expense.”

Levenchuk gave interviews and wrote articles, and the story of the internet black boxes was reported domestically and internationally. A few service providers used Levenchuk’s suggested questions to push back when the FSB agents called to install the black boxes.

But Levenchuk encountered something he never expected: the industry, in the end, did not resist. “It ended bitterly,” Levenchuk told us. “I won only a year. But it didn’t bring happiness to anyone. The providers, instead of resisting, they all gave up.”

Among those that installed the black boxes were the internet pioneers Demos and Relcom.

Friends passed to Levenchuk warning messages from the FSB that he should be careful, but the security service never contacted him directly.

The FSB could intercept whenever anyone on Russian soil made a phone call or checked an email

In public the government and the security services stayed out of the debate about the Sorm. In 1998 there were no social networks in Russia; the internet was mostly email, some early e-commerce, and websites.

But the internet had already changed the rules for public debate. Unlike traditional media — newspapers, radio, television — it was not a one-directional flow of information. The internet was filled with chats and discussion boards, and Levenchuk’s site posted dozens of comments and questions about the black boxes.

Many years earlier the first generation of Sorm had begun when the Soviet KGB had tapped telephones. Then it was known as Sorm-1. When it moved to the internet in the 1990s — capable of intercepting email, internet traffic, mobile calls and voice-over internet such as Skype, that was Sorm-2.

Facebook Twitter Pinterest People gathered outside St. Basil’s Cathedral and the Kremlin in central Moscow. Photograph: Maxim Shemetov/Reuters

In the end the security services developed a third generation — Sorm-3 — which encompassed all telecommunications.

All Russian operators and ISPs were required to install the black boxes, about the size of an old video tape recorder, which would fit on a rack of equipment, and permit connection to the regional departments of the FSB.

The result: the FSB could intercept whenever anyone on Russian soil made a phone call or checked an email. The surveillance system enhanced the power of the security services, which lacked any kind of oversight.

Levenchuk grasped this danger almost immediately and realised that the FSB intercepts would further feed kompromat (compromising materials about a public figure). It could include all kinds of misdeeds, from a target’s supposed connections with criminals to nasty details about bribery or prostitutes. At times kompromat was aimed at business rivals, prominent journalists, and politicians. But now the FSB was harvesting the raw material to manufacture kompromat.

Russia to monitor 'all communications' at Winter Olympics in Sochi Read more

For more than a decade, as investigative reporters for newspapers, we covered the Russian secret services. Andrei Soldatov wrote his first article about Sorm in July 1998. Then in 2000 we set up a website Agentura.ru, which we intended to be a watchdog of the Russian secret services.

We’ve had a section on Sorm issues ever since. We were curious about many aspects of the story that had never been fully explained.

First, we wondered why the communications industry, in the years of relative freedom in the 1990s, had been so willing to comply fully with the security services and put the black boxes on their lines?

We knew there were open debates in the United States and elsewhere about electronic surveillance, such as the 1994 Communications Assistance for Law Enforcement Act, which required telecommunications providers to make their lines available for law enforcement purposes.

Why was it different in Russia? Did Sorm signal a return to the Soviet totalitarian practice of surveillance, or was it a legitimate method of law enforcement wiretapping in the digital age?

Second, how did Sorm really begin? Was it an outgrowth of the old Soviet police state or something new? To answer the questions, we first looked at the document leaked to Egorova and posted by Levenchuk.

We noticed that it included the identity of a special research institute in charge of the technical aspects of Sorm, the Central Research Institute of the Communications Ministry. The chief of the section was listed as Vyacheslav Gusev.

When Soldatov called him, Gusev was less than helpful. He told Soldatov that all work on Sorm started in 1994 because that was when Russian communications switched over from analog lines to digital cables.

Then he said, “I’ve been doing Sorm for 30 years. I looked at your articles, our views are different, and I do not want to help you write your book.”

Later the same day he sent an angry email. “There are plenty of problems in this area, and your publication will not solve anything and only cause various squabbles. People who are engaged in Sorm do not deserve” this critical attention.

That avenue was obviously a dead end. But he exposed a serious contradiction: Gusev said that all work started in 1994 and that he had been working on it for 30 years. If Sorm started in 1994, then it was a relatively recent invention, created after the Soviet collapse. But if he had been working on it for 30 years, then perhaps it originated in the KGB.

We searched through documents of the Ministry of Communications under Yeltsin and found that the first time Sorm was mentioned was in a decree of November 11, 1994. The decree was about phone eavesdropping and said the Sorm system would be established on Russia’s communications lines.

Facebook Twitter Pinterest President Vladimir Putin wears special glasses as he visits a research facility in Gorny University in St. Petersburg on Monday in January. Photograph: Mikhail Klimentyev/AP

But the document also contained another clue: not only was the research institute in Moscow working on Sorm, but there was mention of a branch in St Petersburg as well. We knew of a scientist who was one of the most prominent Russian technical experts on Sorm, Boris Goldstein, who had provided us with comments and explanations for our investigations in the past, and it turned out he had worked at the St Petersburg branch for decades.

Irina Borogan went to see him at the University of Telecommunications on the outskirts of St Petersburg, where he teaches. When Goldstein opened the door to his study on the fifth floor of the university, she saw a tall, slim, well-mannered professor, 63 years old.

And he had a very good memory. Goldstein recalled Soviet times, when KGB officers eavesdropped on the telephone system. They connected wires from the phone exchanges to hidden rooms where the monitoring took place.

“Big, old-fashioned tape recorders turned on at the beginning of a conversation and started recording,” he recalled. “All of this was done in secret.”

Russia’s eavesdropping on phone calls examined by Strasbourg court Read more

Goldstein described a critical difference between the western and Russian approaches to intercepting communications. In the west, he said, the phone company or ISP gets an order to begin the interception, receives the identity of the target, and provides access. But in the Russian system the phone company or service provider has no idea who is being tapped.

As Goldstein explained it, the Russian security agencies do not trust the operators – they only want the backdoor to the information. Sorm was the backdoor.

Then Goldstein clarified why Sorm was carried out in such secrecy. The black box installed at the provider is just one part of the system. The cable connects it to a second part at the office of the FSB, and these second devices are the work of the FSB’s own secret research institutes and are manned by the FSB.

Goldstein made one thing very clear: it was not difficult for the authorities to shift from monitoring telephones, in Sorm-1, to monitoring the internet, in Sorm-2. “Technically there was nothing new,” he said. To scoop up the data, “you didn’t need anything very special, just to mirror the traffic.”

In some respects, Goldstein said, monitoring data was even easier than voices. After talking to Goldstein we realised that Sorm probably had roots in the long Soviet practice of tapping telephones. When the technology changed, the black boxes simply adjusted.

The birthplace of Sorm was behind the walls at Kuchino, the oldest research facility of the Soviet police state

Still, not all of the pieces of the puzzle were fitting together. To get a better picture of how Sorm began, we continued to scrutinise the Ministry of Communications documents in the 1990s, searching for clues in names, organisations, and facilities.

Soon we discovered the name Sergei Mishenkov. He was chief of the scientific department in the Ministry of Communications at the time. In some documents he was identified as the official in charge of supervising Sorm research “at the request and with the financial support” of the Russian security services. It seemed he might know a lot about Sorm.

Soldatov found him one day on the fourth floor of the Ministry of Communications in Moscow. Cheerful, paunchy, and with unruly hair, Mishenkov was a radio enthusiast from his youth – his e-mail address is his radio call sign — who filled his inner office with old radio sets made in Soviet times.

He was an engineer who devoted his career to Moscow’s radio network and was recruited into the government in the 1990s to bring more discipline to the ministry’s research institutes.

They were accustomed to years of government subsidies, but now Mishenkov had to press them for real results. They also needed money. Mishenkov needed to find funds, and that is how he got involved with Sorm: the FSB paid for the research on the black boxes.

Mishenkov explained to Soldatov that the ministry’s central research institute in Moscow had traditionally been responsible for intercity phone lines, so naturally they got the assignment to handle the Sorm black boxes for those. The St Petersburg institute historically worked on local phone stations, so of course they were assigned the black boxes for local phones.

When cell phones appeared, a third institute was put in charge of intercepting cell phone calls. All of it was to help the FSB snoop on anybody.

After Gusev’s hostile reaction, Soldatov didn’t have high expectations for his conversation with Mishenkov. But he had one small fact in the back of his mind: he had heard from another source that the real history of the Sorm system could be traced to a place that Mishenkov had, so far, neglected to mention — the KGB’s top-secret research institute at Kuchino.

“Kuchino?” Soldatov asked Mishenkov, almost casually, probing for more information about the black boxes. Much to his surprise, Mishenkov nodded affirmatively.

All the other institutes had done some research, but the birthplace of Sorm was behind the walls at Kuchino, about 12 miles east of Moscow. Kuchino was the oldest research facility of the Soviet police state, and it had been in service as far back as 1929 for Stalin’s NKVD, a forerunner to the KGB.

Facebook Twitter Pinterest A live broadcast call-in attended by Russian President Vladimir Putin in Moscow April 16, 2015. Photograph: Ria Novosti/Reuters

Kuchino had a storied history of accomplishments, such as figuring out how to intercept a human voice from the vibrations of a window. Even today the facility is heavily guarded and the engineers carry the rank of officers in the FSB.

Finding someone in the FSB to explain more about how Sorm worked and began was nearly impossible. For years the FSB had been closed and inaccessible to journalists.

The press office stopped responding to media requests; they didn’t care about public opinion anymore. After all, the rise of President Vladimir Putin had given the FSB a huge lift in power and resources.

Russian data law fuels web surveillance fears Read more

We noticed in the documents the signature of Andrei Bykov, who was deputy director of the FSB from 1992 to 1996, holding the rank of colonel-general. Before 1992 he had been head of the KGB Operative-Technical Department, in charge of bugging, interception, and technical surveillance operations.

It was Bykov whom the chairman of the KGB ordered on December 5, 1991, to hand over to the United States the documents that confirmed the bugging of the new US Embassy building in Moscow.

In the 1990s Bykov’s signature was on most of the Sorm documents. When he left the FSB, Bykov followed the path of many former security officers – he went to work at a private company, in this case a communications business.

Soldatov tried to call, then sent an email leaving his cell phone number. That same day Soldatov’s cell phone rang. He answered it. A few minutes later, looking shocked, he hung up. “What happened?” asked Borogan. “You know who it was? It was Bykov!” he said. “I’ve never had a colonel-general of the FSB call me back!” “What did he say?” Borogan asked.

“He offered to meet in person,” Soldatov replied. “He said the topic of Sorm is not a phone conversation.”

Bykov offered to meet the next morning at 10am on Lubyanka Square, near the monument to victims of repressions. “There is usually nobody there in the morning, so we won’t miss each other,” he told Soldatov and then hung up the phone.

The next morning it was raining, and Soldatov went early, walked to the nearest café, ordered a cup of coffee and a cup of tea, and carried them to the rendezvous point.

Lubyanka Square is rectangular. On one side is the new luxury St Regis Nikolskaya Hotel, on another the Detsky Mir department store, and three huge buildings of the FSB stand clockwise nearby; first, the so-called new building constructed in the early 1980s, then the main building – the most famous – headquarters of the central apparatus of the Soviet and Russian secret police, and finally the angular building built in the mid-1980s to house the Computation Center of the KGB, now the Center for Information Security of the FSB.

On the south side of the square there is a small rectangular park lined by trees. To get to it requires walking through an underpass, beneath the busy traffic above. In the part facing the FSB there is a large, raw stone on a small pedestal and a tiny space before it.

In October 1990 the stone was brought from the prison camp, Solovki, which was part of the gulag system, to honour victims of Stalin’s repressions. The space before the monument is usually empty but fills up every October when Muscovites gather to read aloud the names of victims in a commemoration ceremony.

It was there Bykov chose to meet. When Soldatov exited the underpass near the stone, he saw a small, round-shouldered figure in an oversized gray suit that hung loosely on him.

Bykov had gray hair combed back, sunken cheeks, and held an umbrella. As Soldatov feared, he refused to walk to a coffee shop. Bykov also refused to have the coffee or tea Soldatov brought.

Soldatov didn’t know what to do with the two cups, so he put them on the bench facing the monument. Bykov firmly declined the offer to sit down, saying, “We can have a walk around,” and the two of them circled the bench as they talked.

“My office was in the new building,” said Bykov, pointing to the edifice on the left. Bykov, an engineer by training, studied at the Moscow State Technical University in Department No 6, which focused on small arms research.

Within three years after graduation he was recruited by the KGB. In 1966 he entered the KGB’s OperativeTechnical Department and rose up through its ranks to become department chief.

The department in earlier years had supervised sharashkas (prison camps) in Marfino and Kuchino. Bykov spent his career developing new kinds of weapons and special equipment, including listening devices.

The Twelfth Department of the KGB, which conducted eavesdropping, was beyond Bykov’s reach during the Soviet years. This was because the Twelfth Department had been always directly subordinated to the KGB chairman due to its sensitivity, and the chief of the section had been chosen for loyalty, not professionalism.

But after the August coup attempt and the Soviet collapse, Bykov took over the Twelfth Department, incorporating it into his domain, and he became deputy director of the new Russian security service.

The arrangement lasted only for a few years, then the Twelfth Department was raised to the level of a directorate inside the FSB. Its emblem proudly displays an owl. And it is this directorate that is in charge of Sorm black boxes all over Russia.

Bykov told Soldatov that in 1991 his most immediate problem had been to withdraw the KGB’s technical equipment and secret documentation from the Baltics to Moscow.

Facebook Twitter Pinterest Soviet president Mikhail Gorbachev addresses the Nation to announce his resignation on December 25, 1991. Photograph: TV GRAB/AFP/Getty Images

The Soviet Union fell apart, and all of the KGB’s surveillance and eavesdropping equipment had been manufactured by two factories, Kommutator and Alfa, in Riga, the capital of newly independent Latvia.

When he managed to get everything out, he had to respond to criticism of the KGB’s eavesdropping practices from dissidents and journalists. Legally the KGB’s eavesdropping was regulated by an order, No 0050, signed by Soviet leader Yuri Andropov in 1979, but it had only one principal rule: it directly banned eavesdropping on party officials.

Bykov came up with the idea of “sanctioned surveillance.” The new system required some outside body to approve surveillance in advance — entirely a defensive move to fend off the criticism. Initially the security services toyed with the idea of having sanctions approved by the prosecutor’s office, but in 1995 it was decided that a court warrant would be required for advance approval.

But the technical method of full, unrestricted access to all communications, developed at Kuchino in the 1980s, was not altered according to the new requirement.

In practice it meant that the Russian secret service would get the court’s approval and then do whatever surveillance it wished. Bykov was confident the procedure would not hinder the way the surveillance was technically organized.

[The Americans] also sniff all information from the servers. It was proved by Assange and the like Andrei Bykov

This was different from in the United States, where the authorities would have to request internet or phone operators to tap a line after a court-approved warrant is issued.

When Soldatov asked why they didn’t follow the American example, Bykov simply waved the question away. “Ah, they also sniff all information from the servers. It was proved by [Julian] Assange and the like, and it didn’t start yesterday.”

As Bykov walked round and round the little park area with Soldatov, the real situation became clear. The court-approved warrant — the procedure Bykov had created — didn’t mean very much. The Russian legislation requires an FSB officer to get the warrant, but the officer is not allowed to show it to the operator. He can make the interception on his own.

In other words, the methods of Sorm directly descended from when no one thought of court-approved warrants — from the Soviet system of phone wiretapping.

We searched hard to find someone who had experience back then, in the secret KGB recording chambers, sitting in front of the whirring tape recorders in the earlier days of phone wiretapping, the days when Sorm eavesdropping began.

The trail eventually led to a café in Moscow, but once again we found the truth hard to ascertain. It was a woman’s job — to sit for long hours, facing metal stands with reel-to-reel tape recorders on the wall, mostly a West German brand, Uher Royal de Luxe, later replaced by eight-channel devices converted from video tape recorders.

The women appeared to be similar to phone operators, with headphones ready on the table, and there was indeed a telephone switchboard in the room. But there were also a few officer-technicians in the large room, and the women were not operators but rather “controllers” of the Twelfth Department of the KGB.

Their rank was usually an ensign, the lowest possible rank in the KGB, and it was not up to them but to an officer at the switchboard, also a woman, to decide which stand to choose to connect the phone number marked for control.

The job of controller was, in this sense, relatively easy — just make sure all reels moved properly and replace the tape when a reel was full. Sometimes the controllers were ordered to conduct “auditory control”: when they put on their headphones and grabbed the work notebooks to scribble notes.

The women were trained in typing and stenography. They also were trained to remember more than 50 voices and to recognise instantly who was calling.

For these skills they received a handsome Soviet salary of 300 roubles per month (an engineer or scientist earned around 180 rubles), with the real possibility they might become deaf in 15 years.

Soldatov found one of these controllers. We met at the café Nikolai on Staraya Basmannaya Street, 200m away from her current job, a pro-Kremlin website called Pravda.ru. A small woman in her early 50s, with black hair, black eyes, and wearing a modest business suit, she sat at a table in a corner of the café and looked around nervously.

Her first name was Lyubov, and Soldatov just showed her the report signed with her name, which we had discovered in a small-circulation book published in 1995.

Facebook Twitter Pinterest (FILES) A picture taken in 1990 shows Soviet police officers standing in front of the KGB building. Photograph: Alexander Nemenov/AFP/Getty Images

A KGB document about the surveillance of Yeltsin’s people during the August coup showed that Lyubov was then a KGB senior lieutenant, an “interpreter of special purpose” of the Twelfth Department.

She confirmed that was indeed a KGB “controller,” and in her report she described how, on the evening of August 20, 1991, the second day of the putsch, she eavesdropped on the conversations of Vitaly Urazhtsev, a democratic deputy of the Supreme Soviet and a Yeltsin supporter.

Urazhtsev, a lieutenant colonel of the Soviet Army, became well known in 1989 when he was expelled from the Communist Party for his ideas about democratising the army. In the early morning of the first day of the putsch he was arrested at a bus stop and interrogated by KGB officers who asked him whether he was planning to oppose the putsch.

They urged him to support the coup, but he refused. In a few hours he was released. However, the next day he was put under surveillance of the KGB’s Twelfth Department. Silently listening to his conversations was Lyubov.

She was a 1984 graduate of the best university in the country, Moscow State University, with a degree in geography. She pursued work as a specialist economic geographer and Portuguese interpreter, but she didn’t remain a geographer; the KGB recruited her to join the Twelfth Department as an interpreter.

If the KGB needed to eavesdrop on the Portuguese, Brazilians, or Angolans, Lyubov got the job. The rest of the time she listened to whomever was of interest to the KGB.

In the days of the putsch this meant eavesdropping on the parliamentarian Urazhtsev. Now, in January 2015, Lyubov looked worriedly at her report, published in the 1995 book, How Could It Have Happened?

She looked at the once-secret report lying there, in the open. “It’s our internal things,” she said. “It should be secret.” She clearly didn’t know what to say: in the first line of a report written at the time for the investigation, Lyubov acknowledged that on August 20, 1991, she took part in the “anticonstitutional, unlawful operation” to eavesdrop on Yeltsin’s people.

She wrote that she was ready to take responsibility. She even offered to reorganise the activities of the Twelfth Department to make it lawful. At that time she seemed contrite for what had happened.

“Despite all I wrote here, I’m a patriot!” she said nervously. We both knew in January 2015 her critical words about the way KGB surveillance had been organised had gone out of fashion.

Soldatov persuaded her to meet him again in the café, hoping to learn more. But she seemed edgy, nervous, and unsettled, only staying long enough to say that the FSB were the best people in the country — and then she was gone.

From other sources we learned somewhat more about the history and scope of Sorm. The Twelfth Department had 164 control points arrayed across Moscow.

Tape recorders were rolling in district KGB offices, at the central listening point on Varsonofyevsky Lane, and in city telephone stations, where there was room for KGB controllers to hide and do their work. Foreign embassy phone lines were eavesdropped separately.

It was called “object control”, which meant that each major embassy had its own surveillance team stationed permanently in nearby buildings, with KGB operatives at the ready in case someone of interest made a call to the embassy and would have to be apprehended before reaching the gates.

All in all, until the breakup of the Soviet Union more than 900 people served in the Twelfth Department of the KGB in Moscow, with 400 in Leningrad. Even so, it wasn’t always that effective.

At most, the department could simultaneously wiretap no more than 300 people. Twenty-four hours of eavesdropping produced between eight and 11 hours of recordings, but one hour of recording required seven hours of transcribing by controllers.

The existence of 164 control points was actually a sign of weakness; the KGB needed so many points to direct the traffic by hand because the quality of phone lines was poor, and phone stations in Moscow were of all different types, some dating back to the 1930s.

The underground communication lines were awful; in some cases it was physically impossible to get lines connected to the central listening point. In our investigation we learned that Moscow had extensively borrowed technology and know-how from the feared secret police in East Germany.

As Sochi Olympic venues are built, so are Kremlin's surveillance networks Read more

The Ministry of State Security, known as the Stasi, started working on a national system of wiretapping in East Germany in 1956, at that time called “Systema-A”. By the end of the 1960s Stasi introduced a more efficient, centralised system, known as Centrales Kontrollsystem, or Ceko, which became operational in 1973.

This allowed Stasi to eavesdrop simultaneously on 4,000 phone numbers, out of a total of eight million in the country. In the early 1980s the system was updated once again, which became known as Ceko-2, with a very advanced and elaborate system, from the phone lines to tape recorders. Ceko-2 was equipped with tape recorders of the brand “Elektronik”, specially designed for the Stasi, the only security service in the Eastern bloc that enjoyed its own tape recorders.

All technical hubs of Ceko-2, in 209 territorial departments of Stasi, were connected with 15 district departments. In Berlin Ceko-2 had 18 specially built stations. Central Berlin’s point of Ceko-2 on Frankfurter Allee had four huge communications racks with 1,100 control points.

Special cables were laid from Ceko-2 stations to the switchboard of the nearest phone station, and Stasi “controllers” could listen to conversations directly. Over 70% of connections were done on the main switchboard.

This was possible because the underground communication system in Berlin, built in Hitler’s times, had largely survived the battle for Berlin in 1945.

The KGB learned at the knee of the Stasi officers, envying the technical level of Stasi surveillance. Nikolai Kalyagin, a major-general of the KGB, was in charge of relations with East German secret services for 12 years, first as chief of the KGB station in Bonn and then as chief of the section responsible for cooperation with Stasi.

Levenchuk had lost his battle against Sorm, and he lost it to a new director of the FSB. His name was Vladimir Putin

We found his home phone number, and Kalyagin himself answered the call. Kalyagin told us that there were indeed technical officers of the KGB permanently stationed in Berlin, always interested in German know-how in surveillance.

Evidence from our source who served in Germany in the 1980s supported this confirmation.

Kalyagin was helpful, and then Soldatov asked him, “Do I understand correctly that the control of phone lines was better organised in Berlin than in Moscow? And that sometimes Germans overtook us in technical means, especially in phone control?”

“Yes, you understand this right,” said Kalyagin. The Stasi possessed what the KGB so badly wanted — a national system of eavesdropping on communications.

Sorm was designed to fill this gap, to provide the Soviet KGB with a system built in Moscow and then replicated in all Russian regions.

At the time the Soviet Union fell apart, the KGB was working on it but had not fulfilled its goal. After a few years the new Russian secret service, the FSB, took over, and this time new digital technologies helped make the system quite sophisticated.

When, on a summer day of 2014, Soldatov walked into the tall building on Butlerova Street in Moscow that houses M9, he saw for the first time the mammoth crossroads for traffic moving between the Russian internet providers.

The Red Web by Andrei Soldatov and Irina Borogan review – Russia’s attack on internet freedoms Read more

Nearly a decade ago a single internet exchange point, MSK-IX, had started in a corner of the 12th floor of this building. Now it expanded to seven floors, filled with hundreds of communications racks.

With the help of some engineers, Soldatov got a pass into the restricted building. Every floor has a special door with a separate code requiring a key to get through. Soldatov’s contacts had a key for the eighth floor.

The heavy metal door was opened, and Soldatov quietly stepped inside a small room, packed with equipment on the racks. One of them had a small black box. It was labeled Sorm. It had a few cables and a few lights.

Soldatov was told that when the small green lamp was illuminated on the box, the FSB guys on the eighth floor have something to do. As he looked down, Soldatov saw the small green lamp winking.

In 1998 and 1999 Levenchuk had done much to bring Sorm to public attention, but when none of the big ISPs resisted, he felt deflated and discouraged. He gave up his involvement in politics. Levenchuk had lost his battle against Sorm, and he lost it to a new director of the FSB. His name was Vladimir Putin.

To order The Red Web for £15.19 (RRP £18.99) go to bookshop.theguardian.com or call 0330 333 6846. Free UK p&p over £10, online orders only. Phone orders min p&p of £1.99.