Exploit database

Vulnerability

CVE-2021-45839

Vulnerability details

Score
6.5
Severity
medium

CVSS 3.1 · NVD

Vector string

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Description

It is possible to obtain the first administrator's hash set up on the system in Terramaster F4-210, F2-210 TOS 4.2.X (4.2.15-2107141517) as well as other information such as MAC address, internal IP address etc. by performing a request to the /module/api.php?mobile/webNasIPS endpoint.

CVE Program

Showing saved CVE details. Refresh is temporarily unavailable.

Exploit source choices

1 source
TerraMaster TOS 4.2.15 or lower - RCE chain from unauthenticated to root via session crafting.
MSF-linux--http--terramaster_unauth_rce_cve_2021_45837MetasploitLinux,Unix / remotePreferred

Terramaster chained exploit that performs session crafting to achieve escalated privileges that allows an attacker to access vulnerable code execution flaws. TOS versions 4.2.15 and below are affected. CVE-2021-45839 is exploited to obtain the first administrator's hash set up on the system as well as other information such as MAC address, by performing a request to the `/module/api.php?mobile/webNasIPS` endpoint. This information is used to craft an unauthenticated admin session using CVE-2021-45841 where an attacker can self-sign session cookies by knowing the target MAC address and the user password hash. Guest users (disabled by default) can be abused using a null/empty hash and allow an unauthenticated attacker to login as guest. Finally, CVE-2021-45837 is exploited to execute arbitrary commands as root by sending a specifically crafted input to vulnerable endpoint `/tos/index.php?app/del`.

2021-12-24terramaster_unauth_rce_cve_2021_45837.rb