目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2021-29440 PoC — Grav 代码注入漏洞

来源
关联漏洞
标题: Grav 代码注入漏洞 (CVE-2021-29440)
Description:Grav是一套可扩展的用于个人博客、小型内容发布平台和单页产品展示的CMS(内容管理系统)。 Grav 存在代码注入漏洞,攻击者可利用该漏洞任意代码执行和提升实例上的特权。
Description
Unsafe Twig processing of static pages leading to RCE in Grav CMS 1.7.10
介绍
# CVE-2021-29440
Unsafe Twig processing of static pages leading to RCE in Grav CMS 1.7.10

- Grav is a file based Web-platform. Twig processing of static pages can be enabled in the front matter by any administrative user allowed to create or edit pages. As the Twig processor runs unsandboxed, this behavior can be used to gain arbitrary code execution and elevate privileges on the instance. 

## Explanation
- You need a user who has access to /admin dashboard with page creation privileges.
- Front matter block supports a directive named **process.twig**, which will apply a Twig rendering pass on the content before serving the page.
- While this behavior is disabled by default, users with basic page creation privileges enable this feature in the front matter
- We create a page with content `{{ system("id") }}` and then enabling twig rendering : `Advanced --> Process --> Twig (enable)`
- Visiting the created page to see the output of our command

## Usage
- Edit the username, password and url variable and then run the script
```bash
python3 exploit.py
```

## Environment
- Run environment.sh to setup Grav CMS 1.7.10 on apache.

## Credits
- https://blog.sonarsource.com/grav-cms-code-execution-vulnerabilities


文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →