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.
Timeline
Days relative to CVE publicationFirst 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
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| 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
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| 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.| Source | Title | Published | Found by us |
|---|---|---|---|
| Metasploit | Metasploit exploit: TerraMaster TOS 4.2.29 or lower - Unauthenticated RCE chaining CVE-2022-24990 and CVE-2022-24989 (exploit/linux/http/terramaster_unauth_rce_cve_2022_24990) | 10 Jun 2023 | 14 Nov 2026 |
| nuclei template | nuclei template: TerraMaster TOS < 4.2.30 Server Information Disclosure | 8 Mar 2022 | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 6 PoC reposPOST /module/api.php
- Query
mobile/webNasIPS=mobile/createRaid=- Key headers
Authorization: $1$2kc1Zqe8$gi6hkBlDDDFHpG3RkZtws1Signature: 473a6d90ede9392eebd8a7995a0471feTimestamp: 1642335373- Body markers
raidtype=;echo '<?php @eval({var}["diskstring=XXXXraidtype=;id>/tmp/a.txt;raidtype=;echo "<?php phpinfo();?>">vuln1.phpinapplication/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
GET /module/api.php
- Query
mobile/webNasIPS=- Ports
- 8080
- PoC User-Agent
TNAS- Seen in
- 2 repos: 0xf4n9x/CVE-2022-24990, lishang520/CVE-2022-24990
- Evidence
- 0xf4n9x/CVE-2022-24990/CVE-2022-24990.py:49 lishang520/CVE-2022-24990/TerraMaster TOS 信息泄露漏洞+RCE.py:39
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/module/api\.php\?(?:.*&)?mobile/webNasIPS=.*mobile/createRaid=
(?i)^/module/api\.php\?(?:.*&)?mobile/webNasIPS=
Suricata
Template generated from PoC characteristics. Review before deploying.
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;)
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.
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
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