The 29-year-old described as "the worst mistake of my life" the attack that knocked more than a million German households offline in November and added his motivation was money.
The defendant, who was not named, was arrested in February at London's Luton airport on a European arrest warrant for attempted computer sabotage and extradited to Germany.
German police said the goal was to infect users' computers with a "botnet" - a network of web-connected machines that can be manipulated with malware and used to attack other online targets.
The Briton told the court he was paid $10,000 (about €8,500) by a Liberian telecom company which wanted to use the botnet to damage a rival company.
He said he had taught himself IT skills and attended a few programming courses, testifying with the help of a translator.
The verdict was expected on Friday, July 28th. If found guilty, he faces up to ten years' jail in Germany.
Around a million of Deutsche Telekom's 20 million customers were unable to connect to its network for several hours last November.
The attack, which the company said caused about €2 million of damage, ended when it advised customers to disconnect their routers and restart them after a software update.
The large-scale strike fuelled concerns over cyber security in Germany and officials have warned that more online assaults are possible ahead of a general election in September.
The country has already been the victim of repeated hacking attacks in recent years.
In 2015, hackers targeted Germany's lower house of parliament in an attack that security services have since blamed on Russia.
Germany has also anxiously eyed the impact of leaked documents obtained by hackers during last year's US presidential campaign.