# MAQUINA CVE-2023-40582 (Vulnerabilidad de Inyección de Comando en find exec)

Realice un escaneo con nmap para ver los puertos abiertos:

![](/files/RS3kpCfBZGiYeAtZXWlB)

Luego use unos scripts de reconocimientos básicos para ver los servicios y sus versiones.

![](/files/g99g0mux2KjneHQTue5k)

Dentro del servidor web me tope con lo siguiente.

![](/files/tWS5jnM8a1Dq1e5pchbf)

Revisando el nombre de la maquina y realizando una búsqueda pude observar que esta vulnerabilidad se puede aprovechar de la&#x20;

`Vulnerabilidad de Inyección de Comando en find-exec.`

![](/files/BqoLoO6by4g1FVuzcsEe)

En la web observe que el juego esta utilizando el paquete find -exec 1.0.2 para ejecutar comandos en el servidor.

![](/files/cxZioI34LAUuKqYtGsux)

En la sección de la web para ejecutar comandos agregue el comando id separado por ";" mas la siguiente revershell.

![](/files/qsONWoVkog9TJDL52UZg)

![](/files/kOGfAmavDiC3uG6sJAlj)

Al ejecutar los comandos obtuve una conexión en mi kali.

![](/files/8YpfkLpsRPIYiRMk6rqK)

INFO:

<https://security.snyk.io/vuln/SNYK-JS-FINDEXEC-5876637> <https://github.com/advisories/GHSA-95rp-6gqp-6622> [https://www.vicarius.io/vsociety/posts/source-code-review-to-understand-](https://www.vicarius.io/vsociety/posts/source-code-review-to-understand-exploit-and-mitigate-command-injection-in-find-exec-cve-2023-40582) [exploit-and-mitigate-command-injection-in-find-exec-cve-2023-40582](https://www.vicarius.io/vsociety/posts/source-code-review-to-understand-exploit-and-mitigate-command-injection-in-find-exec-cve-2023-40582)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://1gnotus.gitbook.io/ignotus_pwn/proving-ground-practice-and-play/writeup/maquina-cve-2023-40582-vulnerabilidad-de-inyeccion-de-comando-en-find-exec.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
