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

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: 490a0046304402204df02b64c801bbc5fc6857e7a37f0a56dc08cad7d6678678c8eb154404b9299d02203b24c0926be03b7f78e951d1669159321cb42bc8526839a5daafa46026d99007:922c64590222798bb761d5b6d8e72950