LONDON, U.K. - In a massive hacking of dozens of secure government websites in the U.K., hackers infected thousands of pages with Bitcoin-like mining software.

Reports revealed that the hackers infected U.K. government websites in such a way that users who visit the hacked sites would immediately have their computers’ processing power hijacked to mine virtual coins.

The hacking would potentially net thousands for those responsible for the cyber attack.

According to reports, the secret code was found on pages for NHS trusts, councils, and incidentally, even on the Information Commissioner's Office, an office that deals with security breaches.

Experts later revealed that the software - known as 'Coinhive' - will run in the background until the webpage is closed.

Scott Helme, a security researcher said that he discovered the hack when a pal mentioned getting antivirus alerts on a U.K. Government website.

He explained in a statement, "This type of attack isn't new - but this is the biggest I've seen. A single company being hacked has meant thousands of sites impacted across the U.K., Ireland and the United States. Someone just messaged me to say their local government website in Australia is using the software as well."

Reports noted that an estimated 5,000 websites were estimated to be affected - which intensified fears that details entered when paying council tax or student loans could have been stolen in the hacking.

Following the discovery, Whitehall IT experts battled for hours to defeat the code.