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

67 lines
3.3 KiB
Markdown
Raw Normal View History

2022-10-02 15:25:27 +00: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)
<details>
<summary>Support HackTricks</summary>
* 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.
</details>
{% endhint %}
## DotNetNuke (DNN)
2023-06-06 18:56:34 +00:00
Se você entrar como **administrador** no DNN, é fácil obter RCE.
2022-10-02 15:25:27 +00:00
## RCE
### Via SQL
Um console SQL é acessível na página **`Settings`** onde você pode habilitar **`xp_cmdshell`** e **executar comandos do sistema operacional**.
2022-10-02 15:25:27 +00:00
2023-06-06 18:56:34 +00:00
Use estas linhas para habilitar **`xp_cmdshell`**:
2022-10-02 15:25:27 +00:00
```sql
EXEC sp_configure 'show advanced options', '1'
RECONFIGURE
EXEC sp_configure 'xp_cmdshell', '1'
2022-10-02 15:25:27 +00:00
RECONFIGURE
```
E pressione **"Run Script"** para executar essas sentenças SQL.
2022-10-02 15:25:27 +00:00
Em seguida, use algo como o seguinte para executar comandos do SO:
2022-10-02 15:25:27 +00:00
```sql
xp_cmdshell 'whoami'
```
### Via ASP webshell
2022-10-02 15:25:27 +00:00
Em `Settings -> Security -> More -> More Security Settings` você pode **adicionar novas extensões permitidas** em `Allowable File Extensions`, e então clicar no botão `Save`.
2022-10-02 15:25:27 +00:00
Adicione **`asp`** ou **`aspx`** e então em **`/admin/file-management`** faça o upload de um **asp webshell** chamado `shell.asp`, por exemplo.
2022-10-02 15:25:27 +00:00
Então acesse **`/Portals/0/shell.asp`** para acessar seu webshell.
2022-10-02 15:25:27 +00:00
### Privilege Escalation
2022-10-02 15:25:27 +00:00
2023-06-06 18:56:34 +00:00
Você pode **escalar privilégios** usando o **Potatoes** ou **PrintSpoofer**, por exemplo.&#x20;
2022-10-02 15:25:27 +00: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)
2022-10-02 15:25:27 +00:00
<details>
<summary>Support HackTricks</summary>
2022-10-02 15:25:27 +00: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.
2022-10-02 15:25:27 +00:00
</details>
{% endhint %}