POC详情: 75a49413c1be85d0dc0c2dda0e440251725fba5a

来源
关联漏洞
标题: Joyent Node.js 代码问题漏洞 (CVE-2017-5941)
描述:Joyent Node.js是美国Joyent公司的一套建立在Google V8 JavaScript引擎之上的网络应用平台。该平台主要用于构建高度可伸缩的应用程序,以及编写能够处理数万条且同时连接到一个物理机的连接代码。 Joyent Node.js中的node-serialize模块的unserialize()函数存在代码问题漏洞,该漏洞源于该函数未对外部调用的代码进行有效检测。远程攻击者可通过将恶意数据传入该函数利用该漏洞执行任意代码。
介绍
# CVE-2017-5941 — node-serialize Untrusted Deserialization (RCE) PoC

> ⚠️ For **lab / self-assessment** only. Use **only on systems you own or are authorized to test**.

This repository provides:

- A minimal PoC script to reproduce **CVE-2017-5941** against a vulnerable Node.js app that uses `node-serialize <= 0.0.4`.
- Two vectors:
  - **POST** `/api/deserialize` (default)
  - **Cookie** `profile` for `/profile` (Base64-encoded; server must decode before `unserialize()`)

## What is CVE-2017-5941?

- **Component:** `node-serialize` (≤ 0.0.4)
- **Weakness:** Untrusted deserialization (CWE-502)
- **Behavior:** During `unserialize()`, any string value that begins with `"_$$ND_FUNC$$_"` is treated as executable JavaScript (evaluated).
- **Impact:** If untrusted input reaches `unserialize()`, it leads to **Remote Code Execution**.

Example of a malicious value:

```json
{ "p": "_$$ND_FUNC$$_function(){ require('child_process').exec('id') }()" }
```
文件快照

[4.0K] /data/pocs/75a49413c1be85d0dc0c2dda0e440251725fba5a ├── [4.0K] app │   ├── [ 193] Dockerfile │   ├── [ 360] package.json │   ├── [ 29K] package-lock.json │   └── [2.0K] server.js ├── [ 304] docker-compose.yml ├── [4.4K] poc_cve_2017_5941.py └── [ 969] README.md 1 directory, 7 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。