US authorities have charged seven people on Wednesday with infecting computers, including the space agency NASA machines, with malware as part of an Internet advertising scam that raked in at least $14m.

Six of them, who are Estonians have been arrested, while the seventh one, a Russian, remains at large.

They said to have spread software across four million computers in 100 countries that redirected users towards online advertisements.

About 5,00,000 of the affected computers were in the US, of which 130 were at NASA, where the malicious software was discovered first.

According to Manhattan US Attorney Preet Bharara, it was the first case of its kind because the suspects had set up their own servers to secretly direct the users of infected computers who click on search results to websites different from the ones they were looking for.