Headquarters (aka Lubianka) of the Federal Security Service (FSB), the former KGB in Moscow, taken on 12 July 2007 MAXIM MARMUR/AFP/Getty Images

Ruslan Stoyanov, a top investigator at Russian cybersecurity firm Kaspersky Lab who was detained and accused of treason by the country's security services last December, has slammed the Kremlin's policy of working closely with cybercriminals to further national interests.

This week (12 April) an independent television station called "Dozhd" published a letter formally dictated by Stoyanov to his legal team. In it, he criticised how the state offers criminals "impunity" to hack abroad in exchange for protection and stolen data.

"The worst scenario is to give cybercriminals immunity from retaliation for stealing money in other countries in exchange for intelligence. If this happens, a whole layer of 'patriotic thieves' will appear, violating the principles of the rule of law and [avoiding] punishment," he wrote.

According to Stoyanov, the partnership is not built to last – especially when it comes to those capable of hacking into corporations and banks. The Kaspersky Lab expert said the inevitable breakdown in relationships will lead to a "wave of crimes" inside Russia.

"I was thrown into the most severe prison on charges of treason. Everything was kept secret," he said. "If only my affairs did not undermine the stability of the posts and merits of the generals, and also did not harm the business of 'patriot-thieves'," he complained.

While working at Kaspersky, a global anti-virus and computer security organisation, Stoyanov was an incident response manager specialising in distributed denial of service (DDoS) cases.

He held a cybersecurity position at Moscow's Ministry of Interior between 2000 and 2006.

Prior to his arrest at the hands of the Federal Security Service (FSB), he worked with the Kremlin to disrupt cybercrime gangs. One notable takedown was of the "Lurk" gang, which was responsible for stealing millions of rubles from banks and financial firms in the region.

Russian investigators in the case, according to local media (some state-funded), detained Stoyanov alongside two cybercrime experts from the FSB called Sergei Mikhailov and Dmitry Dokuchayev. Members of a hacking unit called Shaltai Boltai were also rounded up.

Sources have claimed that the men accused of treason shared sensitive intelligence information with "foreign" cybersecurity firms, which later provided them to the US government and – by extension – its intelligence agencies. The exact details, however, remain murky.

Kaspersky, his employer since 2012, confirmed the arrest but distanced itself from the ongoing probe. "This case is not related to Kaspersky Lab," a spokesperson told IBTimes UK in a statement. "Ruslan Stoyanov is under investigation for a period predating his employment," it added.