# Searching Exploits

No es solo encontrar el CVE, es encontrar el código que funciona.

## 1. Searchsploit (Exploit-DB Offline)

La base de datos local de Kali.

* **Básico**: `searchsploit wordpress 5.0`
* **Filtrado por Título**: `searchsploit -t apache 2.4`
* **Copiar Exploit**: `searchsploit -m 12345.py`
* **Examinar**: `searchsploit -x 12345.py`

## 2. Google Horking (Google Dorks)

A veces Exploit-DB no tiene lo último. Usa Google.

* `"app name version" exploit github` (Mina de oro)
* `"CVE-2023-xxxx" poc` (Proof of Concept)
* `site:rapid7.com "vulnerability name"` (Para ver si hay módulo Metasploit)

## 3. Vulnerability Scanners (Nessus/OpenVAS)

En el OSCP están limitados o prohibidos en ciertas máquinas, pero en la vida real son vitales.

* Usa el scanner para **confirmar**, no para descubrir.
* Valida siempre manualmente un hallazgo de Nessus.

## 4. Compilando Exploits (C/C++)

Muchos exploits de Kernel vienen en C.

* **Linux (GCC)**:

  ```bash
  gcc -o exploit exploit.c
  ```

  *Si falta librería*: Busca flags de compilación en el código fuente (comentarios al inicio).
* **Windows (MinGW en Kali)**:

  ```bash
  i686-w64-mingw32-gcc exploit.c -o exploit.exe -lws2_32
  ```

  *Nota*: `-lws2_32` es vital para sockets en Windows.

## 5. Python Scripts & Fixing

La mayoría de scripts viejos en Python 2 fallan hoy.

* Usa `2to3` para convertir.
* Añade paréntesis a `print`.
* Revisa hardcoded IPs o puertos en el código y cámbialos.


---

# 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://jotatito05.gitbook.io/la-bitacora-de-jotatito05/03.-vulnerability-analysis/searching-exploits.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.
