A British teenager has been jailed for masterminding a cyber-hacking business that carried out more than 1.7 million attacks on websites including Sony and Microsoft, wreaking havoc worldwide.

Adam Mudd was 16 when he created the Titanium Stresser malware program, which lets users crash websites and computers by flooding them with data. The attacks were carried out against more than 650,000 victims, including websites such as Minecraft, XBox Live, and TeamSpeak, a chat tool for gamers.

Mudd, now 20, developed the distributed denial of services (DDoS) software from his bedroom in Kings Langley, Hertfordshire, according to the Daily Mail. He earned the equivalent of more than £386,000 ($495,000) in US dollars and bitcoins selling the program to cybercriminals.

Mudd, using the name ‘themuddfamily,’ also carried out nearly 600 attacks himself against 181 victims, the Old Bailey heard. One 2014 attack on West Hertfordshire College, where he studied, was so large it may have hit 70 nearby schools and universities, including the University of Cambridge.

He attacked his college four times that year, later claiming it was because he had been mugged but no action was taken.

Mudd, who lived with his parents, had undiagnosed Asperger syndrome and was more interested in status in the online gaming community than the money, the court was told.

He pleaded guilty to computer hacking and money laundering, and sentenced to two years in a young offenders’ institution. The judge rejected a plea to suspend the sentence.

Judge Michael Topolski said Mudd’s crimes had caused chaos “from Greenland to New Zealand, from Russia to Chile.” He said Mudd “knew full well this was not a game” and his sentence must have a “real element of deterrent.”

“The map of the world showing the geographical spread of these attacks which went on for 18 months is revealing, showing the truly worldwide nature.

“IP addresses from Greenland to New Zealand, from Russia to Chile, were attacked. The capacity for harm in this case was, in my judgment, very great.”

Police said when he was arrested in March 2015, Mudd was in the bedroom of his home and refused to unlock his computer until his father intervened.

During sentencing, the judge noted Mudd had come from a “perfectly loving family,” but the effect of his crimes had caused widespread damage.

“I’m entirely satisfied that you knew full well and understood completely this was not a game for fun.

“It was a serious money-making business and your software was doing exactly what you created it to do.”