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

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2024-21626 PoC — runc 安全漏洞

来源
关联漏洞
标题: runc 安全漏洞 (CVE-2024-21626)
Description:runc是一款用于根据OCI规范生成和运行容器的CLI(命令行界面)工具。 runc 1.1.12之前版本存在安全漏洞,该漏洞源于fds 内部泄漏,导致多个容器发生泄漏。
介绍
# CVE-2024-21626 

## Overview
This repository contains code examples for an app vulnerable to CVE-2024-21626 as well as an eBPF gadget to detect exploitation attempts. 

This repoistory was created as part of this [blog post]().

**The gadget program used to detect this vulnerability is for demonstration purposes only. It is not a full detection of CVE-2024-21626.**

## Vulnerability Description
CVE-2024-21626 is a vulnerability in the runc container runtime, present in versions prior to v1.1.12. It relies on the fact that runc doesn't close a "leaked" file descriptor in a timely manner when creating or executing commands inside the container, causing the container to inherit that file descriptor and gain access to the host filesystem.

There are several ways to exploit this vulnerability. This repository how this vulnerability can be exploited at runtime.

You can read more about it [here](https://github.com/advisories/GHSA-xr7r-f8xq-vfvv).


## Usage
For this demo to work, you'll need to make sure your machine is running a runc verion <= 1.1.11.

`leaky-app` is a Go app that creates a symlink to the potentially leaked file descriptor. To build the docker image:
```
make leaky-app
```

In order to build the eBPF gadget, you'll need to [`ig`] tool.
You can build the gadget using:
```
make gadget
````

Once both are built, run the gadget using:
```
IG_EXPERIMENTAL=true sudo -E ig run trace-symlink:latest
```

Open another shell and start the leaky-app container:
```
docker run --rm --name leaky-app leaky-app
```

You should see the gadget outputs the container that called the symlink syscall.

## Disclaimer
This repository contains a demonstration application designed to showcase the detection CVE-2024-21626. 
It is important to note that this demonstration is solely for educational purposes and should not be considered as a practical detection tool. 
The detection mechanisms implemented in this demo do not cover all scenarios or accurately represent the complexities of detecting this vulnerability. 


文件快照

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

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