id: jolokia-mbean-search

info:
  name: Jolokia - Searching MBeans
  author: pussycat0x
  severity: low
  description: Unauth users can search Mbeans in Jolokia.
  reference:
    - https://thinkloveshare.com/hacking/ssrf_to_rce_with_jolokia_and_mbeans/
    - https://github.com/laluka/jolokia-exploitation-toolkit
  metadata:
    max-request: 2
  tags: jolokia,springboot,mbean,tomcat,misconfig,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/jolokia/search/*:test=test"
      - "{{BaseURL}}/actuator/jolokia/search/*:test=test"

    stop-at-first-match: true

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

      - type: word
        part: body
        words:
          - '"type":"search"'
          - '"value":'
        condition: and
# digest: 490a0046304402204d1f788d05d10175ffad1599819da4db8c3f3dc22bd319c92b2b1417f6a86e6b022017b29e7c682b9be6430d2562dc0e686d19d741db44fceedfaf8f9032acda82ff:922c64590222798bb761d5b6d8e72950