id: npm-anonymous-cli

info:
  name: NPM Anonymous CLI Metrics Exposure
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/maurosoria/dirsearch/blob/master/db/dicc.txt
  metadata:
    verified: true
    max-request: 2
    shodan-query: html:"anonymous-cli-metrics.json"
  tags: exposure,npm,config,files,vuln

http:
  - method: GET
    path:
      - '{{BaseURL}}/.npm/anonymous-cli-metrics.json'
      - '{{BaseURL}}/anonymous-cli-metrics.json'

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"metricId":'
          - '"metrics":'
          - '"successfulInstalls":'
        condition: and

      - type: word
        part: header
        words:
          - "application/json"
# digest: 4a0a00473045022011d151fe2857625dde76882273e16ad8dc244117e0101945bb113d3612a2c956022100f49ff53713035a9fddfd9c725d18a50dd922ab30ed3b104f082e594b31a2049f:922c64590222798bb761d5b6d8e72950