Security researchers have shown how two widely used technologies could be exploited to control a user's web browser.

Adrian Pastor and Petko Petkov, have published code that exploits features in the Universal Plug and Play (UPnP) protocol (which is used by many operating systems to make it easier for them to work with devices on a network), and Adobe Flash.

By tricking a victim into viewing a malicious Flash file, an attacker could use UPnP to change the primary DNS server used by the router to find other computers on the Internet. This would give the attacker a virtually undetectable way to redirect the victim to fake websites. For example, a victim with a compromised router could be taken to the attacker's web server, even if he typed, say, direct into the web browser navigation bar.

"The most malicious of all malicious things is to change the primary DNS server," the researchers wrote. "That will effectively turn the router and the network it controls into a zombie which the attacker can take advantage of whenever they feel like it."

Because so many routers support UPnP, the researchers believe that "ninety nine percent of home routers are vulnerable to this attack."

In fact, many other types of UPnP devices, such as printers, digital entertainment systems and cameras are also potentially at risk, they added an FAQ page explaining their research.

The attack is particularly worrisome because it is cross-platform - any operating system that supports Flash is susceptible - and because it is based on features of UPnP and Flash, not bugs that could be easily fixed by Adobe or the router vendors.

Users could avoid this attack by turning UPnP off on their routers, where it is normally enabled by default, but this would cause a variety of popular applications, such as IM software, games and Skype, to break and require manual configuration on the router.

Adobe could make changes to Flash to mitigate the problem, but attackers could most likely also launch this attack using another technique, known as DNS pinning, said Aviv Raff, a researcher who has also blogged about the attack.

"This is a critical issue," he said. "People should turn off UPnP in their devices, and vendors should put UPnP disabled by default in the devices they deliver."

Although this could make life difficult for nontechnical users, Raff believes it would be worth the effort. "It's better than having your traffic owned by malicious people," he said.

However, another security expert said that turning off UPnP would be overkill, considering that online criminals have not even begun using this attack. "Look... if you get hit by a meteor, it's devastating," said Roger Thompson, chief research officer with Grisoft, via IM. "But no one goes around building meteor shelters."