41 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# DotNetNuke (DNN)
{{#include ../../banners/hacktricks-training.md}}
## 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
```
І натисніть **"Run Script"**, щоб виконати ці SQL речення.
Потім використовуйте щось подібне до наступного, щоб виконати команди ОС:
```sql
xp_cmdshell 'whoami'
```
### Via ASP webshell
В `Settings -> Security -> More -> More Security Settings` ви можете **додати нові дозволені розширення** в `Allowable File Extensions`, а потім натиснути кнопку `Save`.
Додайте **`asp`** або **`aspx`**, а потім у **`/admin/file-management`** завантажте **asp webshell** під назвою `shell.asp`, наприклад.
Потім отримайте доступ до **`/Portals/0/shell.asp`**, щоб отримати доступ до вашого webshell.
### Privilege Escalation
Ви можете **підвищити привілеї** за допомогою **Potatoes** або **PrintSpoofer**, наприклад.
{{#include ../../banners/hacktricks-training.md}}