The November attack hijacked about 900,000 routers and briefly stopped their owners getting online, affecting about 1.25 million customers.
Photograph: Dado Ruvic/Reuters

A 29-year-old British man has confessed to carrying out a cyber-attack on Deutsche Telekom’s routers last year, claiming he had acted on behalf of a Liberian telecommunications company but that his mission had got out of hand.

Speaking via a translator at a court in Cologne, the man, who was arrested under a European arrest warrant at Luton airport in February, described it as the “biggest mistake of my life”.

The November attack hijacked about 900,000 routers and briefly stopped their owners getting online, affecting about 1.25 million Deutsche Telekom customers. The Bonn-based company estimated the cost of the attack to have been more than €2m (£1.79m).

The man, who goes under the online pseudonym “Spiderman”, said he had taken on the commission for a fee of $10,000 (£7,700) because he wanted to marry his fiancee and needed money for a “good start into married life”.

The Liberian telecommunications company that commissioned the attack had not asked him to hack Deutsche Telekom, the man said, but wanted to create a “botnet”, a worldwide network of hijacked machines, with which to knock out a competing business via a further attack.

So-called “distributed denial of service” attacks are designed to knock sites and servers offline by sending them more data than they can handle.

The man claimed he had only found out via the media that routers in Germany had switched themselves off after the attack.

Even though “Spiderman” has had no specialist IT training, he said in court he was the sole architect of the attack and that another person had helped him cover his traces online afterwards.

The 29-year-old, who grew up and went to high school in Israel, said he had merely done “a couple of programming courses” but not completed a degree on the subject.

In the aftermath of the hacking attacking in November 2016, a spokesperson for Deutsche Telekom said: “The malware was badly programmed, it didn’t function properly and didn’t do what it was meant to do. Otherwise the consequences of the attack would have been a lot worse.”

The “Spiderman” case is the most recent of a number of issues involving cybersecurity to have gained prominence in Germany before its general election in September.

In a report published on Friday, the German IT industry association Bitkom said more than half of German companies have been affected by espionage, sabotage or data theft over the last two years.

A second witness in the trial will appear at the Cologne criminal court on 28 July, possibly followed by a verdict on the same day. According to a court spokesperson, the accused could face a prison sentence of between six months and 10 years.

Friday’s hearing had to be interrupted briefly because the 29-year-old has diabetes and describes his own condition as “unstable”.