id: antsword-backdoor

info:
  name: AntSword Backdoor Detection
  author: ffffffff0x
  severity: critical
  description: An AntSword application backdoor shell was discovered.
  remediation: Reinstall AnstSword on a new system due to the target system's compromise. Follow best practices for securing PHP servers/applications via the php.ini and other mechanisms.
  reference:
    - https://github.com/AntSwordProject/AntSword-Labs/tree/master/bypass_disable_functions/9
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
    cvss-score: 10
    cwe-id: CWE-553
  metadata:
    max-request: 1
  tags: backdoor,antsword

http:
  - method: POST
    path:
      - "{{BaseURL}}/.antproxy.php"

    headers:
      Content-Type: application/x-www-form-urlencoded

    body: 'ant=echo md5("antproxy.php");'

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "951d11e51392117311602d0c25435d7f"

      - type: status
        status:
          - 200

# digest: 490a0046304402200f629c604d4fd264aab585760907a8d86b3366e52ce07e24da74006ff235664f02202df6576916a5c7fa998e2cf4423ee390de8473de48345e0693e9bc1cd2b8eeb4:922c64590222798bb761d5b6d8e72950
