Computer hackers who considered themselves to be "modern day pirates" led sophisticated cyber attacks on websites and systems of major institutions including the CIA, Sony, the FBI and Nintendo, a court has heard.

Britons Ryan Ackroyd, Jake Davis, Mustafa Al-Bassam and Ryan Cleary were "hactivists" with the LulzSec collective which also targeted organisations like News International, the NHS and the Serious Organised Crime Agency (Soca), the court heard.

Working from their bedrooms in 2011, they stole huge amounts of sensitive personal data including emails, online passwords and credit card details belonging to hundreds of thousands of people, Southwark Crown Court in London heard. This was then posted openly on their website and file-sharing sites like Pirate Bay.

They also carried out distributed denial of service (DDoS) attacks on many institutions, crashing their websites, the sentencing hearing was told.

Prosecutor Sandip Patel said the men lacked the political drive of groups like Anonymous, from which they had developed, and seemed to have been doing it for kicks saying: "It's clear from the evidence that they intended to achieve extensive national and international notoriety and publicity. They saw themselves as latter-day pirates."

Ex-soldier Ackroyd, 26, from Mexborough, South Yorkshire, pleaded guilty to one charge of carrying out an unauthorised act to impair the operation of a computer, contrary to the Criminal Law Act 1977. He hacked major institutions, including stealing huge amounts of data from Sony, and a hack of News International websites that led people visiting the Sun's site being redirected to a fake story about Rupert Murdoch committing suicide.

Al-Bassam, 18, from Peckham, south London, was still at school at the time and used the alias tFlow. Davis, 20, from Lerwick, Shetland, who used the alias Topiary, smirked in the dock when details of his activities were outlined to the court. He was also LulzSec's main publicist and in charge of media relations.

Both he and Al-Bassam previously pleaded guilty to hacking and launching cyber attacks on a range of organisations, including the CIA and the Serious Organised Crime Agency.

Cleary, 21, of Wickford Essex, also known as ViraL, pleaded guilty to the same two charges as well as four separate charges including hacking into US air force agency computers at the Pentagon. He also admitted possession of indecent images relating to child pornography including rape scenes found on his hard drive by police.

Davis, Al-Bassam and Ackroyd were core members of LulzSec along with a New York-based hacker, the court heard. Cleary worked with them and also made up to £2,500 a month working as a freelance hacker for third parties. Lulz is internet slang that can be interpreted as "laughs", "humour" or "amusement", and Sec refers to "security".