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

目标: 1000 元 · 已筹: 1336

100%

CVE-2024-54152 PoC — Angular 代码注入漏洞

来源
关联漏洞
标题: Angular 代码注入漏洞 (CVE-2024-54152)
Description:Angular是一个开发平台。用于使用 Typescript / JavaScript 和其他语言构建移动和桌面 Web 应用程序。 Angular 1.4.2及之前版本存在代码注入漏洞,该漏洞源于攻击者可以编写恶意表达式来突破沙箱,从而在系统上执行任意代码。
介绍
# ⚙️🔨 IN PROGRESS

## CVE-2024-54152 POC  

Angular Expressions provides expressions for the Angular.JS web framework as a standalone module. Prior to version 1.4.3, an attacker can write a malicious expression that escapes the sandbox to execute arbitrary code on the system. With a more complex (undisclosed) payload, one can get full access to Arbitrary code execution on the system. The problem has been patched in version 1.4.3 of Angular Expressions. Two possible workarounds are available. One may either disable access to `__proto__` globally or make sure that one uses the function with just one argument.

### Proof of Concept

To demonstrate the vulnerability, we have created a simple Node.js application that uses the vulnerable version of Angular Expressions. The application exposes an endpoint `/parse` that evaluates user-provided expressions.

#### Running the Vulnerable Application

1. **Clone the repository**:
    ```sh
    git clone https://github.com/example/CVE-2024-54152-poc.git
    cd CVE-2024-54152-poc
    ```

2. **Build and run the Docker container**:
    ```sh
    docker build -t vulnerable-app .
    docker run -p 8080:8080 vulnerable-app
    ```

3. **Send the malicious payload**:
    You can use either the provided Go or Python script to send the payload.

    - Using Go:
        ```sh
        go run poc.go
        ```

    - Using Python:
        ```sh
        python3 poc.py
        ```

#### Expected Output

The server should execute the payload and return the result of the `id` command, demonstrating arbitrary code execution.

### Mitigation

To mitigate this vulnerability, update Angular Expressions to version 1.4.3 or later. Alternatively, you can disable access to `__proto__` globally or ensure that the function is used with only one argument.

### References

- [Angular Expressions GitHub Repository](https://github.com/peerigon/angular-expressions)
- [CVE-2024-54152 Details](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-54152)


文件快照

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

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