id: fastjson-version

info:
  name: Fastjson Version Detection
  author: yuansec
  severity: info
  description: If the server returns an exception to the client,The fastjson version will be retrieved,Fastjson versions greater than 1.2.41,Contains the latest version(1.2.76).
  reference:
    - https://blog.csdn.net/caiqiiqi/article/details/107907489
  metadata:
    max-request: 1
  tags: fastjson,tech,discovery

http:
  - raw:
      - |
        POST / HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {"@type":"java.lang.AutoCloseable"

    matchers:
      - type: word
        words:
          - 'fastjson-version'

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - 'fastjson-version.*([0-9]\.[0-9]+\.[0-9]+)'
# digest: 4a0a00473045022077d58b224996e6dad7d0c49f527d2b2eb88617731a7eb01e73cb9bbdc3fa8ef0022100bbfbf335cacd10bf696f7325451307bb3880224e992536c80d04e30a0ec4b936:922c64590222798bb761d5b6d8e72950