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

67 lines
3.3 KiB
Markdown
Raw Normal View History

2023-06-05 20:33:24 +02:00
# DotNetNuke (DNN)
{% hint style="success" %}
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2023-06-05 20:33:24 +02:00
<details>
<summary>Support HackTricks</summary>
2023-06-05 20:33:24 +02:00
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
2023-06-05 20:33:24 +02:00
</details>
{% endhint %}
2023-06-05 20:33:24 +02:00
## DotNetNuke (DNN)
Si ingresas como **administrador** en DNN, es fácil obtener RCE.
2023-06-05 20:33:24 +02:00
## RCE
### A través de SQL
2023-06-05 20:33:24 +02:00
Una consola SQL es accesible en la página de **`Settings`** donde puedes habilitar **`xp_cmdshell`** y **ejecutar comandos del sistema operativo**.
2023-06-05 20:33:24 +02:00
Usa estas líneas para habilitar **`xp_cmdshell`**:
2023-06-05 20:33:24 +02:00
```sql
EXEC sp_configure 'show advanced options', '1'
RECONFIGURE
EXEC sp_configure 'xp_cmdshell', '1'
2023-06-05 20:33:24 +02:00
RECONFIGURE
```
Y presiona **"Run Script"** para ejecutar esas sentencias SQL.
2023-06-05 20:33:24 +02:00
Luego, usa algo como lo siguiente para ejecutar comandos del sistema operativo:
2023-06-05 20:33:24 +02:00
```sql
xp_cmdshell 'whoami'
```
### A través de ASP webshell
2023-06-05 20:33:24 +02:00
En `Settings -> Security -> More -> More Security Settings` puedes **agregar nuevas extensiones permitidas** en `Allowable File Extensions`, y luego hacer clic en el botón `Save`.
2023-06-05 20:33:24 +02:00
Agrega **`asp`** o **`aspx`** y luego en **`/admin/file-management`** sube un **asp webshell** llamado `shell.asp`, por ejemplo.
2023-06-05 20:33:24 +02:00
Luego accede a **`/Portals/0/shell.asp`** para acceder a tu webshell.
### Escalación de privilegios
2023-06-05 20:33:24 +02:00
Puedes **escalar privilegios** usando **Potatoes** o **PrintSpoofer**, por ejemplo.&#x20;
2023-06-05 20:33:24 +02:00
{% hint style="success" %}
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2023-06-05 20:33:24 +02:00
<details>
<summary>Support HackTricks</summary>
2023-06-05 20:33:24 +02:00
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
2023-06-05 20:33:24 +02:00
</details>
{% endhint %}