CVE-2020–25988 has been published completely on 2nd December, 2020.
Product: Genexis Platinum 4410 Router v2.1
Version Affected: P4410-v2.1.34H
Base Score: 6.5 Medium
While playing around with the ‘Genexis Platinum 4410 Router V2.1.34H’, it was found that network-adjacent attackers could fetch the credentials of the ‘admin’ user and use it to login to the router panel by querying the upnp service running on port 5555. The ‘X_GetAccess’ action leaks the ‘admin’ user’s credentials in plaintext.
UPnP is a set of networking protocols that permits networked devices, such as personal computers, printers, Internet gateways, Wi-Fi access points and mobile devices to seamlessly discover each other’s presence on the network and establish functional network services for data sharing, communications, and entertainment. UPnP is intended primarily for residential networks without enterprise-class devices. 
The upnp stack has 6 layers:
- Presentation 
and it uses the following protocols:
- SSDP: Simple Service Discovery Protocol, for discovering UPnP devices on the local network.
- SCPD: Service Control Point Definition, for defining the actions offered by the various services.
- SOAP: Simple Object Access Protocol, for actually calling actions. 
Once a device (personal computers, printers, Internet gateways, Wi-Fi access points and mobile devices) has been assigned an IP Address and the upnp services are enumerated, the description of the available UPnP services can be fetched (in XML format).
A user can then fetch the router details (eg. External facing IP Address, DNS Server IPs etc) by querying the UPnP service actions, using crafted POST messages based on the SOAP.
The description of a devices’ upnp services contains the possible ‘actions’ (similar to function calls) and in this case, one of the ‘actions’ that any adjacent network user could perform is ‘X_GetAccess’ , to view the credentials of the ‘admin’ user. This does seem like a functionality at the beginning, but this can be abused since anyone on the same network (wireless or physical) can fetch the ‘admin’ user’s credentials.
On looking around for tools related to UPnP testing, I found a tool ‘UPnP-Pentest Toolkit’ opensourced by the NCC Group .
Using the tool, one can discover devices that are based on UPnP and enumerate the device description. The device description is populated in an XML file and using the SOAP protocol, an attacker on the adjacent network  can request for and fetch the credentials of the ‘admin’ user.
The action of interest is ‘X_GetAccess’ and the request and response look like this (admin:idontwantyoutoseethis) -
The above script is adapted from upnpy module and works when there’s only one UPnP device on the network. (Well, you can specify which upnp device do you want to look into).
An network adjacent attacker can fetch the cleartext credentials of ‘admin’ account and login to the router’s admin panel by sending a POST request to the UPnP Service running on port 5555 in Genexis Platinum 4410 Router V2.1.34H.
Uncheck the ‘Enable UPnP’, which is enabled by default out of the box. However, ISPs use UPnP remotely to upgrade firmwares, perform maintenance and troubleshooting tasks.
There are two CVEs on the same product but for an older version:
- Authentication Bypass on login page due to client side validation: https://nvd.nist.gov/vuln/detail/CVE-2020-6170
- Remotely change the WIFI access point’s password (CSRF): https://nvd.nist.gov/vuln/detail/CVE-2020-25015
As you may have noticed, the above two issues do not discuss the UPnP service and the second one is based on a 1-Click Password change. Upon checking for the above two security issues on the router that I had, none were found in the updated version.
Throughout the process of finding things on Google, I learned that UPnP is more of a feature but then, it has been abused by botnets and in amplification attacks. I stumbled upon great content from Bsides and learned and fetched my zeroth CVE.
So, what do you do when you have a router in your home?
Drink all the juice and hack all the things!
~ A Tiny Speck of Dust, trying his shot. [After all, we’re all alike.]