PoC Monitor
← All CVEs
CVE-2022-24990published 7 Feb 2023 00:00 UTCData: JSON · API

TerraMaster OS

TerraMaster OS Remote Command Execution Vulnerability

Edge device · NAS / storageknown edge product: TerraMaster TerraMaster OS TerraMaster OS Remote Command (high confidence)

TerraMaster NAS 4.2.29 and earlier allows remote attackers to discover the administrative password by sending "User-Agent: TNAS" to module/api.php?mobile/webNasIPS and then reading the PWD field in the response.

First public PoC 336 days beforebefore publication · 8 Mar 2022 · nuclei template
Public PoCs86 on GitHub · 2 Exploit-DB, Metasploit or nuclei
CVSS9.8critical · scored by CISA ADP · CWE-306
CISA KEV 10 Feb 20233 days after publication · ransomware use known

Timeline

Days relative to CVE publication
-300-240-180-120-60t=0First public PoC8 Mar 2022 · t−336dCVE published7 Feb 2023 · t = 0Added to CISA KEV10 Feb 2023 · t+3d

First public PoC 336 days before publication; added to CISA KEV 3 days after publication. First PoC: nuclei template: TerraMaster TOS < 4.2.30 Server Information Disclosure (nuclei template, 8 Mar 2022).

PoC repositories

Found on GitHub.

6 PoCs · 1 suspicious or fake

PoCs 6
RepositoryCreatedStarsAssessment
Jaky5155/CVE-2022-24990-TerraMaster-TOS--PHP- 8 Mar 2022 −336 d 2 PoC via PoC Index
0xf4n9x/CVE-2022-24990 20 Mar 2022 −324 d 12 PoC
lishang520/CVE-2022-24990 20 Mar 2022 −324 d 38 PoC
ZZ-SOCMAP/CVE-2022-24990 12 Apr 2022 −301 d 3 PoC
antx-code/CVE-2022-24990 12 Apr 2022 −301 d 3 PoC
jsongmax/terraMaster-CVE-2022-24990 17 Oct 2022 −113 d 4 PoC
Suspicious or fake 1
RepositoryCreatedStarsAssessment
VVeakee/CVE-2022-24990-POC 10 Mar 2022 −334 d 4 Fake

Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.

Other public exploits

Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.

PoC characteristics

What to hunt for in your logs · from 6 PoC repos

POST /module/api.php

Query
mobile/webNasIPS= mobile/createRaid=
Key headers
Authorization: $1$2kc1Zqe8$gi6hkBlDDDFHpG3RkZtws1 Signature: 473a6d90ede9392eebd8a7995a0471fe Timestamp: 1642335373
Body markers
raidtype=;echo '<?php @eval({var}[" diskstring=XXXX raidtype=;id>/tmp/a.txt; raidtype=;echo "<?php phpinfo();?>">vuln1.php in application/x-www-form-urlencoded
Ports
8080
PoC User-Agent
TNAS
Seen in
3 repos: 0xf4n9x/CVE-2022-24990, Jaky5155/CVE-2022-24990-TerraMaster-TOS--PHP-, lishang520/CVE-2022-24990
Evidence
0xf4n9x/CVE-2022-24990/CVE-2022-24990.py:79 Jaky5155/CVE-2022-24990-TerraMaster-TOS--PHP-/POC.md:7 lishang520/CVE-2022-24990/TerraMaster TOS 信息泄露漏洞+RCE.py:60

Regex

Generated from PoC characteristics; not yet reviewed. Matches the request path and query.

POST /module/api.php
(?i)^/module/api\.php\?(?:.*&)?mobile/webNasIPS=.*mobile/createRaid=
GET /module/api.php
(?i)^/module/api\.php\?(?:.*&)?mobile/webNasIPS=

Suricata

Template generated from PoC characteristics. Review before deploying.

POST /module/api.php
alert http any any -> $HOME_NET [8080] (msg:"GG PoC-Monitor CVE-2022-24990 TerraMaster TerraMaster OS exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/module/api.php"; http.uri; content:"mobile/webNasIPS="; http.uri; content:"mobile/createRaid="; http.header; content:"Authorization: $1$2kc1Zqe8$gi6hkBlDDDFHpG3RkZtws1"; nocase; http.header; content:"Signature: 473a6d90ede9392eebd8a7995a0471fe"; nocase; http.header; content:"Timestamp: 1642335373"; nocase; http.request_body; content:"raidtype=|3b|echo '<?php @eval("; http.request_body; content:"diskstring=XXXX"; http.request_body; content:"raidtype=|3b|id>/tmp/a.txt|3b|"; http.request_body; content:"raidtype=|3b|echo |22|<?php phpinfo()|3b|?>|22|>vuln1.php"; reference:url,poc.griffinguard.io/cve/CVE-2022-24990; classtype:web-application-attack; sid:9264357; rev:1;)
GET /module/api.php
alert http any any -> $HOME_NET [8080] (msg:"GG PoC-Monitor CVE-2022-24990 TerraMaster TerraMaster OS exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/module/api.php"; http.uri; content:"mobile/webNasIPS="; reference:url,poc.griffinguard.io/cve/CVE-2022-24990; classtype:web-application-attack; sid:9634925; rev:1;)

Sigma

Template generated from PoC characteristics. Review before deploying.

POST /module/api.php
title: TerraMaster TerraMaster OS exploit attempt (CVE-2022-24990)
id: gg-pocmon-cve-2022-24990-9264357
status: experimental
description: Request pattern taken from public PoCs for CVE-2022-24990. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2022-24990
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/module/api.php'
    cs-uri-query|contains|all:
      - 'mobile/webNasIPS='
      - 'mobile/createRaid='
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2022.24990
GET /module/api.php
title: TerraMaster TerraMaster OS exploit attempt (CVE-2022-24990)
id: gg-pocmon-cve-2022-24990-9634925
status: experimental
description: Request pattern taken from public PoCs for CVE-2022-24990. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2022-24990
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/module/api.php'
    cs-uri-query|contains|all:
      - 'mobile/webNasIPS='
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2022.24990