Germany's foreign intelligence agency plans to spend hundreds of millions of euros on surveillance technology designed to monitor foreign social networks, local media reported, citing a confidential document.

The Federal Intelligence Service (BND) will spend €28 million, in 2015 alone, on its Strategic Technical Initiative (SIT), the Sueddeutsche Zeitung newspaper reported.

According to a confidential report seen by the newspaper, the agency asked the Bundestag's Budget Committee for a total of €300 million ($375 million) for the SIT program between 2015 and 2020.

The BND plans to set up an early warning system for cyber attacks, the report said.

Government spokesman Steffen Seibert was quoted as saying that the aim of SIT is to create an early warning system so that Germany can identify attacks on German IT infrastructure.

He confirmed to the dpa news agency that the BND had teamed up with Vupen, a French information security company, which has a reputation for discovering the so-called "zero-day" hidden vulnerabilities in software. There is a high demand for zero-day exploits on the grey market among hackers and security researchers.

READ MORE: Thousands of Germans rally to end government spying

The Federal Intelligence Service reportedly wants to spend €4.5 million to help it find security holes in the Secure Sockets Layer (SSL) protocol used by web services to protect personal information. The program to crack SSL, codenamed Nitidezza, would also target the HTTPS protocol, used by a number of banks, online shops and social networks.

Many slammed the government for supporting the market looking for security holes, saying it's a "very bad idea." Activist hacker collective, the Chaos Computer Club (CCC), released a statement describing the plans as "a serious and unacceptable attack on our fundamental rights."

Green Party leader Anton Hofreiter told Passau Neue Presse: "It is totally ironic that vulnerabilities are deliberately left open and retained, rather than to inform the public about them."

The head of the Left Party, Bernd Riexinger, demanded a ban on such practices, calling on the Budget Committee to "to immediately block" the project funding.

German Pirate Party president Stefan Körner said: "If this is the strategy of the government for our security, we should fear them and their intelligence agencies more than the danger of cyber-terror that they're always hyping."