Routeros Mikrotik Upnp Igd Attack
Mikrotik RouterOS's UPnP IGD implementation lets any local-network client create a port forward pointing at a different host than the requester, and lets any local client delete port forwards created by others. An attacker on the LAN could redirect inbound traffic to a host of their choosing or wipe all UPnP port forwards.
Published on systemweakness.com
Mikrotik RouterOS implements UPnP protocol with IGD. This protocol is used for automatic port forwarding.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the UPnP IGD service does not validate that the requesting client's source address matches the target host in add and delete requests.
Impact
Any host on the local network could redirect inbound port forwards to another host, including one on a different internal interface, or remove all UPnP port forwards.
What the attacker needed
Access to the local network; UPnP enabled on the router
How it was found
- Enable UPnP and mark the WAN interface as external and the LAN interface as internal.
- From a LAN client, send a UPnP port-forward request naming a different LAN host as the target.
- Observe the router's NAT table now forwards the WAN port to that other host.
- From a LAN client, send a UPnP delete request for a port forward created by someone else.
- Observe the router removes the entry without checking the requester.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
UPnP is a feature that lets devices on your home network ask the router to open a port so outside traffic can reach them. The router here does not check who is asking, so any device on the network can open a door to another device, or close doors other people opened. That means one compromised device on the network can quietly redirect or block incoming connections.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.