Is UPnP a Social Risk? Router and Switch Settings.

Loading

UPnP is enabled by default on many new routers. At one point, the FBI and other security experts recommended disabling UPnP for security reasons. But how safe is UPnP today? Are we trading security for convenience when we use UPnP?

Animal repellent with a loudspeaker and control unit
Repellents (or deterrents) are chemical substances, mixtures, or electronic and mechanical devices designed to repel or deter unwanted animals, insects and other pests, or prevent their access to a defined area. Their main purpose is to protect human dwellings, gardens, crops or property in a humane way, without the need to kill or injure the animal. They work by creating unpleasant stimuli that prompt pests to leave the protected area voluntarily.

UPnP stands for “Universal Plug and Play”. With UPnP, an application can automatically forward a port on your router, saving you the trouble of forwarding ports manually. Let us look at the reasons people recommend disabling UPnP to get a clear picture of the security risks.

Malware on Your Network Can Use UPnP

A virus, Trojan, worm or other malicious program that manages to infect a computer on your local network can use UPnP just like legitimate programs. While a router normally blocks incoming connections, preventing malicious access, UPnP can allow a malicious program to bypass the firewall completely. For example, a Trojan could install a remote-control program on your computer and open a hole for it in your router’s firewall, allowing continuous access to your computer from the Internet. If UPnP were disabled, the program could not open the port, although it could bypass the firewall in other ways and phone home.

Is this a problem? Yes. There is no getting around it: UPnP assumes that local programs are trustworthy and allows them to forward ports. If preventing malware from forwarding ports matters to you, you should disable UPnP.

The FBI Recommends That People Stop Using UPnP

At the end of 2001, the FBI’s National Infrastructure Protection Center recommended that all users disable UPnP because of a buffer overflow in Windows XP. A security patch fixed this bug. NIPC actually issued a correction to this advice later, when it realized that the problem was not with UPnP itself.

Is this a problem? No. Although some people may remember NIPC’s advice and have a negative opinion of UPnP, that advice was misleading at the time, and the specific issue was resolved by a Windows XP patch more than ten years ago.

The Flash UPnP Attack

UPnP does not require any kind of authentication from the user. Any application running on your computer can ask the router to forward a port through UPnP, which is why the malware described above can abuse it. You might assume that you are safe as long as no local device is running malware, but you are probably wrong.

The Flash UPnP Attack was discovered in 2008. A specially crafted Flash applet running on a web page in your web browser can send a UPnP request to your router and ask it to forward ports. For example, the applet can ask the router to forward ports 1-65535 to your computer, effectively exposing it to the entire Internet. The attacker would then still have to exploit a vulnerability in a network service running on your computer, however; using a firewall on your computer will protect you.

Unfortunately, it gets worse: on some routers, a Flash applet can change the primary DNS server with a UPnP request. Port forwarding would be the least of your worries: a malicious DNS server could redirect traffic to other websites. For example, it could direct Facebook.com to a completely different IP address. Your browser’s address bar would say Facebook.com, but you would be using a site set up by a malicious organization.

Is this a problem? Yes. I cannot find any indication that this has ever been fixed. Even if it were fixed (which would be difficult, because this is a problem with the UPnP protocol itself), many routers still in use would remain vulnerable.

Advertisements

Poor UPnP Implementations on Routers

The UPnP Hacks website contains a detailed list of security issues in the ways various routers implement UPnP. These are not necessarily problems with UPnP itself; the problems are often in its implementation. For example, many router UPnP implementations do not validate input properly. A malicious application can ask the router to forward network traffic to remote IP addresses on the Internet (instead of local IP addresses), and the router would comply. On some Linux-based routers, UPnP can be exploited to execute commands on the router. (Source) The website contains many other similar issues.

Is this a problem? Yes! Millions of routers in the wild are vulnerable. Many router manufacturers have not done a good job of securing their UPnP implementations.

Should You Turn UPnP Off?

When I started writing this post, I expected to conclude that UPnP’s flaws were fairly minor, a simple matter of trading a little security for convenience. Unfortunately, UPnP appears to have many problems. If you do not use applications that need port forwarding, such as peer-to-peer applications, game servers and many VoIP programs, you may be better off disabling UPnP entirely. Heavy users of these applications will want to consider whether they are prepared to give up some security. You can still forward ports without UPnP; it is just a little more work. Read our guide to port forwarding.

On the other hand, these router flaws are not being actively exploited in the wild, so the actual chance of encountering malicious software that exploits weaknesses in your router’s UPnP implementation is fairly low. Some malware uses UPnP to forward ports (the Conficker worm, for example), but I have not come across an example of malware that exploits these router flaws.

How do I turn it off? If your router supports UPnP, you will find an option to disable it in its web interface. Consult your router’s manual for more information.

Advertisements
AliExpress

Leave a Reply

Your email address will not be published. Required fields are marked *