Federal prosecutors have charged seven people who allegedly ran a massive online-advertising fraud scheme and used malicious software to infect at least 4 million computers in more than 100 countries.

Six people from Estonia and another individual from Russia allegedly used the malicious software, or "malware," to hijack Web searches and drive traffic to other websites in order to generate "pay per click" revenue. In some cases, the software, known as DNSChanger, would replace advertising on popular websites with other ads...