id: nuget-package-config

info:
  name: NuGet Package.config File Disclosure
  author: DhiyaneshDK
  severity: info
  reference:
    - https://learn.microsoft.com/en-us/nuget/reference/packages-config
    - https://github.com/maurosoria/dirsearch/blob/master/db/dicc.txt
  classification:
    cpe: cpe:2.3:a:microsoft:nuget:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: microsoft
    product: nuget
    shodan-query: html:"packages.config"
  tags: exposure,sass,devops,cicd,nuget,files,vuln

http:
  - method: GET
    path:
      - '{{BaseURL}}/packages.config'
      - '{{BaseURL}}/.nuget/packages.config'

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '<?xml version="1.0" encoding="utf-8"?>'
          - '<packages>'
          - '</packages>'
        condition: and

      - type: status
        status:
          - 200
# digest: 4a0a0047304502200a253ee2f65a1aa0817f0f76827cf418e888a0c5a83059143c981341239cab1a022100d8c6087781221730659ae30b9269670f22b271a8289ebecea195dfe05cc6ef78:922c64590222798bb761d5b6d8e72950