id: jolokia-info-disclosure

info:
  name: Jolokia - Information disclosure
  author: pussycat0x
  severity: medium
  description: Jolokia - Information is exposed.
  reference:
    - https://thinkloveshare.com/hacking/ssrf_to_rce_with_jolokia_and_mbeans/
    - https://github.com/laluka/jolokia-exploitation-toolkit
  metadata:
    max-request: 16
  tags: jolokia,springboot,mbean,misconfig,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}{{jolokia_paths}}{{mbean_paths}}"

    attack: clusterbomb
    payloads:
      jolokia_paths:
        - "/jolokia"
        - "/actuator/jolokia"

      mbean_paths:
        - "/read/JMImplementation:type=MBeanServerDelegate/ImplementationName"
        - "/read/JMImplementation:type=MBeanServerDelegate/ImplementationVendor"
        - "/read/JMImplementation:type=MBeanServerDelegate/ImplementationVersion"
        - "/read/JMImplementation:type=MBeanServerDelegate/MBeanServerId"
        - "/read/JMImplementation:type=MBeanServerDelegate/SpecificationName"
        - "/read/JMImplementation:type=MBeanServerDelegate/SpecificationVendor"
        - "/read/JMImplementation:type=MBeanServerDelegate/SpecificationVersion"
        - "/read/java.lang:type=Memory"

    matchers-condition: or
    matchers:
      - type: word
        name: memory
        words:
          - '"mbean":"java.lang:type=Memory"'

      - type: word
        name: implementation-vendor
        words:
          - '"attribute":"ImplementationVendor"'

      - type: word
        name: implementation-version
        words:
          - '"attribute":"ImplementationVersion"'

      - type: word
        name: implementation-name
        words:
          - '"attribute":"ImplementationName"'

      - type: word
        name: specification-vendor
        words:
          - '"attribute":"SpecificationVendor"'

      - type: word
        name: mbean-serverid
        words:
          - '"attribute":"MBeanServerId"'

      - type: word
        name: specification-name
        words:
          - '"attribute":"SpecificationName"'

      - type: word
        name: specification-version
        words:
          - '"attribute":"SpecificationVersion'
# digest: 4a0a0047304502210081110e24d71c59e6138074d8fbe93f59b7e90cd38bd7181fbe93602525c424a002207af6c2d23b7d147a7df582a24b05267a4e6696ea2faeb67756bb56a96395025e:922c64590222798bb761d5b6d8e72950