📕 FIELD MANUAL 11.1: AUTOMATION & CI/CD (SCALED ARMAMENT)
Classification: RED TEAM EYES ONLY
Classification: RED TEAM EYES ONLY
Objective: We will implement continuous attack capabilities and integrate advanced offensive tools into automated workflows.
MITRE ATT&CK: T1558, T1595 (Active Scanning).
1. INTEL & RECON: MODERN ARSENAL
Sección titulada «1. INTEL & RECON: ARSENAL MODERNO»The old sqlmap manual is slow to scan thousands of assets. We need speed and evasion.
TOOL: NUCLEI (The Speed)
Sección titulada «HERRAMIENTA: NUCLEI (La Velocidad)»Template-based YAML scanner. Allows defining the exact vulnerability and launching it against 10,000 hosts in minutes.
YAML Template for Error-Based SQLi:
id: error-based-sqliinfo: name: Error Based SQL Injection severity: criticalrequests: - method: GET path: - "{{BaseURL}}/product?id=1'" matchers: - type: word words: - "You have an error in your SQL syntax" part: bodyTOOL: GHAURI (The Evasion)
Sección titulada «HERRAMIENTA: GHAURI (La Evasión)»A modern alternative to SQLMap written in Python.
- Advantage: It is specifically optimized for WAF Evasion and handling complex HTTP headers.
- Usage: It is similar to SQLMap but with better heuristics to detect difficult injections.
ghauri -u "http://target.com/?id=1" --dbs
TOOL: SQLMap API (The Integration)
Sección titulada «HERRAMIENTA: SQLMap API (La Integración)»We won't run SQLMap from the terminal. We'll run it as a REST service so our own scripts can orchestrate attacks.
- Start Server:
sqlmapapi -s - Create Task:
POST /task/new - Launch Scan:
POST /scan/<task_id>/start - Read Data:
GET /scan/<task_id>/data
2. ARMAMENT: CI/CD INTEGRATION
Sección titulada «2. ARMAMENTO: INTEGRACIÓN CI/CD»We will transform the attack into a development phase (“Purple Teaming Pipeline”).
GitHub Actions Workflow (Example):
Every time the development team performs a “Push” to staging, we will attack.
name: Offensive Pipelineon: [push]jobs: security-test: runs-on: ubuntu-latest steps: - name: Deploy App run: ./deploy_staging.sh
- name: Nuclei Scan run: nuclei -u [https://staging-app.com](https://staging-app.com) -t sqli-templates/ -o vulnerabilities.txt
- name: Ghauri Deep Scan if: steps.nuclei.outputs.found == 'true' run: ghauri -u [https://staging-app.com/vuln-endpoint](https://staging-app.com/vuln-endpoint) --dbs3. PURPLE TEAM VISION (DEFENSE)
Sección titulada «3. VISIÓN DEL EQUIPO PURPLE (DEFENSA)»- Feedback Loop: If Nuclei finds a flaw in the pipeline, the “Build” must fail automatically.
- False Positives: We will adjust the
matchersof the Nuclei templates to reduce noise based on the specific error messages from our technology stack.

