DotNetNuke
DNN
(formerly DotNetNuke
) is an open-source Content Management System (CMS)
, written in C#
and based on the .NET
framework. A number of core features can be expended through a large panel of third-party (or in-house) apps and modules to extend the CMS
basic functionalities.
Identification and discovery
Version disclosure
The /Documentation/License.txt
file, if present, may hold information about the release year of the DotNetNuke
version being used by the webserver.
Robots.txt
By default, DotNetNuke
installation configure a verbose robots.txt
entry, listing a number of built-in locations.
Known vulnerabilities
ExploitDB exploits (as of 2021-08-08)
Cookie Deserialization Remote Code Execution (CVE-2017-9822)
A deserialization vulnerability is present in the DotNetNuke (DNN)
CMS, versions 5.0.0
to 9.3.0-RC
, which can be leveraged to remotely execute code on the underlying system without authentication. The vulnerability lies in the deserialization of the DNNPersonalization
cookie (XML
format), used to store (authenticated or unauthenticated) user's preferences. This cookie is notably processed during handling of 404
errors if the built-in default DNN
's missing page is used.
While the object type
to deserialize is user-controlled in the DNNPersonalization
cookie, the XmlSerializer
class (used by CNN
for the processing) cannot be used to serialize / deserialize types with interface members. As stated in the original research paper, the ObjectDataProvider
class can be used in combination with one of the following methods:
XamlReader.Load(String)
, leading to remote code execution.ObjectStateFormatter.Deserialize(String)
, leading to remote code execution.DotNetNuke.Common.Utilities.FileSystemUtils.PullFile(String)
, for arbitrary file write (for example to upload awebshell
if a writable path can be found).DotNetNuke.Common.Utilities.FileSystemUtils.WriteFile(String)
, for arbitrary file read.
Note that the usable types may be limited to DotNetNuke.*
classes (and thus to arbitrary file read / write).
The initial vulnerability is identified by CVE-2017-9822
, with a number of bypass of the attempts at fixing the initial bug identified as CVE-2018-15811
, CVE-2018-15812
, CVE-2018-15825
, and CVE-2018-15826
.
The following DotNetNuke
versions are vulnerable:
5.0.0 to 9.1.0
(CVE-2017-9822)9.1.1
(CVE-2018-15811)9.2 to 9.2.1
(CVE-2018-15811)9.2.2 to 9.3.0-RC
(CVE-2018-15825 and CVE-2018-15825)
Metasploit module (for pre and post CVE-2017-9822 patching exploit)
The Metasploit
's exploit/windows/http/dnn_cookie_deserialization_rce
module can be used to exploit the deserialization remote code execution vulnerability, prior to the initial patching CVE-2017-9822
and using the subsequent bypass.
The "How to exploit the DotNetNuke Cookie Deserialization" blog post can be consulted for information on how to exploit the vulnerability using metasploit
depending on the targeted version.
Pre-patching exploitation (CVE-2017-9822) using ysoserial
ysoserial.net
can be used to generate DotNetNuke
cookies that will result in the execution of the specified command or arbitrary read / write of the given file against DotNetNuke
version 5.0.0 to 9.1.0
.
The generated serialized cookie can then be sent to a non-existing page using, for example, the curl
utility:
References
https://www.blackhat.com/docs/us-17/thursday/us-17-Munoz-Friday-The-13th-Json-Attacks.pdf https://www.exploit-db.com/exploits/48336 https://pentest-tools.com/blog/exploit-dotnetnuke-cookie-deserialization/
Last updated