Mersive Solstice Pods(由 Mersive Technologies Inc. 设计的无线协作和演示平台)在运行早于 2.8.4 版本的固件时,存在一个(远程)(经过身份验证的)(盲注)操作系统命令注入漏洞,正如供应商网站上所承认/报告的那样(见下方截图)。因此,经过身份验证的攻击者可以通过发送特制的 HTTP 请求,在存在漏洞的 Mersive Solstice Pods 上以 root 权限执行任意命令。

此漏洞的存在是由于服务端对输入/参数缺乏验证。一些用户控制的输入/参数被直接传递给 public static String runShellCommand(String command) 方法,该方法设计用于在 root 用户的上下文中执行操作系统命令。这种不安全的配置将使攻击者能够完全攻破存在漏洞的设备。
Mitre CVE 参考:
供应商变更日志:
运行早于 2.8.4 版本固件的 Mersive Solstice Pods。
com/mersive/solstice/server/EthernetInterface.java:static void SetPrefixLength(int prefixLength) {
int value = -1 << (32 - prefixLength);
try {
Log.d("Ethernet", "complete: " + ServerDisplay.runShellCommand("ifconfig eth0 netmask " + InetAddress.getByAddress(new byte[]{(byte) (value >>> 24), (byte) ((value >> 16) & 255), (byte) ((value >> 8) & 255), (byte) (value & 255)}).getHostAddress()));
} catch (Exception e) {
e.printStackTrace();
}
}
static void SetGateway(String gateway) {
if (!gateway.equals(GetGateway())) {
Log.d("Ethernet", "complete: " + ServerDisplay.runShellCommand("ip route del default"));
Log.d("Ethernet", "complete: " + ServerDisplay.runShellCommand("ip route add default via " + gateway + " dev " + ETH0));
}
}
static void SetStaticIP(String ipAddr) {
Log.d("Ethernet", "complete: " + ServerDisplay.runShellCommand("ifconfig eth0 " + ipAddr));
}
com/mersive/solstice/server/ServerDisplay.java:public static String runShellCommand(String command) {
return runShellCommand(command, true);
}
public static String runShellCommand(String command, boolean wait) {
Log.d("Shell Command", command);
try {
Process process = Runtime.getRuntime().exec("shell-tunnel --client");
DataOutputStream stdin = new DataOutputStream(process.getOutputStream());
InputStream is = process.getInputStream();
stdin.writeBytes(command + "\n");
stdin.flush();
stdin.writeBytes("exit\n");
stdin.flush();
if (wait) {
process.waitFor();
}
byte[] buffer = new byte[1024];
Arrays.fill(buffer, 0);
return new String(buffer, 0, is.read(buffer));
} catch (Exception e) {
e.printStackTrace();
return "";
}
}
要利用此漏洞,经过身份验证的攻击者需要向运行存在漏洞固件版本(早于 2.8.4)的设备发送一个特制的请求。此请求可以直接从设备 Web 界面(通过“设置静态 IP 地址”表单)发送,也可以使用命令行工具(如 cURL)发送。
无论哪种情况,载荷都需要以特殊字符(例如 ; 或 & 字符)开头,以指示 /bin/sh 在原始/合法命令执行完毕后连续运行后续命令。
staticIP 参数(以及 gateway 参数)是多个存在漏洞的参数之一,该参数未在服务端进行验证,而是直接传递给 static void SetStaticIP(String ipAddr) 方法,该方法又将其传递给 public static String runShellCommand(String command) 方法。
这种配置允许经过身份验证的攻击者在 root 用户的上下文中,在存在漏洞的设备上运行任意命令。
版权所有(C)2019 Alexandre Teyar
根据 Apache 许可证 2.0 版(“许可证”)授权; 除非遵守许可证,否则您不得使用此文件。 您可以在以下位置获取许可证副本:
http://www.apache.org/licenses/LICENSE-2.0
除非适用法律要求或书面同意,否则根据许可证分发的软件按“原样”分发, 不附带任何明示或暗示的保证或条件。 请参阅许可证以了解 governing permissions and limitations under the License。