# Khaos Httpx H2 Operations

> Use httpx-h2 only on observed in-scope HTTPS endpoints to detect HTTP/2-only paths and h1/h2 header differences; treat output as a protocol fingerprint, not an exploitability proof.

- Skill: `henriqqw/khaos-httpx-h2-operations` (Agent Skill)
- Install (CLI): `npx get-skill add henriqqw/khaos-httpx-h2-operations`
- Raw SKILL.md: https://api.skillmd.com/api/skills/henriqqw/khaos-httpx-h2-operations/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: henriqqw (https://skillmd.com/u/henriqqw)
- Updated: 2026-11-18
- Page: https://skillmd.com/skills/henriqqw/khaos-httpx-h2-operations

---


# Operacao do httpx-h2 no Khaos

O adapter Khaos para httpx-h2 executa httpx com a flag `-h2` forcando negociacao HTTP/2 via TLS ALPN. Detecta endpoints que respondem apenas via h2, diferencas de headers entre h1/h2, e caminhos de upgrade h2c.

## Pre-condicoes obrigatorias

- **Stage da task:** `enumeration` ou `vuln`.
- **Endpoint:** URL HTTPS observada e confirmada in-scope (HTTP/2 requer TLS).
- **Estado do assessment:** `executing_stage`.
- Use apos httpx padrao para comparar comportamentos h1 vs h2.

## Fluxo correto de execucao

```
1. POST /assessments/{id}/operator/tasks/{taskId}/claim
   {"owner": "<owner>", "lease_seconds": 180}

2. POST /assessments/{id}/operator/events
   {"event": "action_proposed", "data": {
     "action_id": "<uuid-novo>",
     "task_id":   "<taskId>",
     "owner":     "<owner>",
     "tool_id":   "httpx-h2",
     "title":     "httpx-h2 protocol probe: <endpoint>"
   }}

3. POST /assessments/{id}/operator/events
   {"event": "action_decision", "data": {
     "action_id": "<mesmo-uuid>",
     "task_id":   "<taskId>",
     "owner":     "<owner>",
     "tool_id":   "httpx-h2",
     "allowed":   true
   }}

4. POST /tools/httpx-h2/run
   {"target_id": "<id>", "assessment_id": "<id>",
    "endpoint_url": "<url>",
    "execute": true, "confirm": true,
    "action_id": "<mesmo-uuid>", "task_id": "<taskId>", "owner": "<owner>"}
```

## O que o wrapper executa

Flags usadas: `-u <url> -h2 -json -silent -threads 1 -rl 1 -td -irr`. Retorna JSONL com codigo de status, headers, tecnologias detectadas e indicacao de suporte a HTTP/2.

## Interpretar sem superafirmar

| Campo JSONL | Uso |
|---|---|
| `status_code` | Comparar com resposta HTTP/1.1 — divergencia pode indicar smuggling ou config incorreta |
| `failed` | Endpoint recusou negociacao HTTP/2 |
| `technologies` | Fingerprint de stack para hipoteses de CVE |
| Headers ausentes em h2 | Possivel bypass de seguranca dependente de protocolo |

Diferenca de comportamento h1/h2 nao e automaticamente uma vulnerabilidade. Use as diferencas para formular hipoteses especificas (request smuggling, header injection, bypass de WAF).

