Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dynamic extractor + payloads edgecase by sending req sequentially #5016

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

tarunKoyalwar
Copy link
Member

@tarunKoyalwar tarunKoyalwar commented Apr 8, 2024

Proposed Changes

template

id: wazuh-default-login

info:
  name: Wazuh - Default Login
  author: theamanrawat
  severity: high
  description: |
    Wazuh contains default credentials. An attacker can obtain access to user accounts and access sensitive information, modify data, and/or execute unauthorized operations.
  reference:
    - https://documentation.wazuh.com/current/user-manual/user-administration/password-management.html
    - https://wazuh.com
  metadata:
    verified: true
    max-request: 4
    shodan-query: title:"Wazuh"
  tags: wazuh,default-login

http:
  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}

      - |
        POST /auth/login HTTP/1.1
        Host: {{Hostname}}
        Osd-Version: {{osd}}
        Content-Type: application/json

        {"username":"{{username}}","password":"{{password}}"}

    attack: pitchfork
    payloads:
      username:
        - "admin"
        - "wazuh"
      password:
        - "admin"
        - "wazuh"
    stop-at-first-match: true

    matchers:
      - type: status
        status:
          - 200

    extractors:
      - type: regex
        name: osd
        internal: true
        part: body
        group: 1
        regex:
          - "<h1>(.*)</h1>"

example run ( in verbose mode)

$  ./nuclei -u https://example.com -t ./a.yaml  -v

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.2.3

		projectdiscovery.io

[VER] Started metrics server at localhost:9092
[wazuh-default-login] Setting thread count to 0 because dynamic extractors are not supported with payloads yet
[INF] Current nuclei version: v3.2.3 (latest)
[INF] Current nuclei-templates version: v9.8.0 (latest)
[WRN] Scan results upload to cloud is disabled.
[INF] New templates added in latest release: 85
[INF] Templates loaded for current scan: 1
[WRN] Loading 1 unsigned templates for scan. Use with caution.
[INF] Targets loaded for current scan: 1
[VER] [wazuh-default-login] Sent HTTP request to https://example.com
[wazuh-default-login] [http] [high] https://example.com [password="admin",username="admin"]

@tarunKoyalwar tarunKoyalwar self-assigned this Apr 8, 2024
@tarunKoyalwar tarunKoyalwar changed the title explicitly handle edgecase #4993 instead of hot fix fix dynamic extractor + payloads edgecase by sending req sequentially Apr 8, 2024
@tarunKoyalwar tarunKoyalwar marked this pull request as ready for review April 8, 2024 13:13
@ehsandeep ehsandeep merged commit f159e8f into dev Apr 8, 2024
9 of 12 checks passed
@ehsandeep ehsandeep deleted the issue-5015-blacklist branch April 8, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Erroneous extractor logic - 28 checks failing to detect issues
3 participants