Skip to main content

管道化

HTTP Pipelining支持已被添加,允许在同一连接上发送多个HTTP请求,灵感来自http-desync-attacks-request-smuggling-reborn 在运行基于HTTP pipelining的模板之前,请确保运行目标支持HTTP Pipeline连接,否则nuclei引擎会回退到标准HTTP请求引擎。 如果你想确认给定域名或子域名列表是否支持HTTP Pipelining,httpx有一个标志-pipeline可以做到这一点。 一个展示nuclei管道化属性的配置示例:
    unsafe: true
    pipeline: true
    pipeline-concurrent-connections: 40
    pipeline-requests-per-connection: 25000
下面提供了一个展示nuclei管道化功能的示例模板:
id: pipeline-testing
info:
  name: pipeline testing
  author: pdteam
  severity: info

http:
  - raw:
      - |+
        GET /{{path}} HTTP/1.1
        Host: {{Hostname}}
        Referer: {{BaseURL}}

    attack: batteringram
    payloads:
      path: path_wordlist.txt

    unsafe: true
    pipeline: true
    pipeline-concurrent-connections: 40
    pipeline-requests-per-connection: 25000

    matchers:
      - type: status
        part: header
        status:
          - 200

连接池

虽然早期版本的nuclei不进行连接池处理,但用户现在可以配置模板以使用或不使用HTTP连接池。这允许根据需求进行更快的扫描。 要在模板中启用连接池,可以在payloads部分中定义threads属性,指定你想要使用的线程数量。 在HTTP连接池模板中不能使用Connection: Close头,否则引擎将失败并回退到带池的标准HTTP请求。 使用HTTP连接池的示例模板:
id: fuzzing-example
info:
  name: Connection pooling example
  author: pdteam
  severity: info

http:

  - raw:
      - |
        GET /protected HTTP/1.1
        Host: {{Hostname}}
        Authorization: Basic {{base64('admin:§password§')}}

    attack: batteringram
    payloads:
      password: password.txt
    threads: 40

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 200

      - type: word
        words:
          - "Unique string"
        part: body