Commit 4d4faaac by Marcin Bury

Fixing false positives Officeconnect RCE

parent 6a60de9d
...@@ -7,6 +7,7 @@ from routersploit import ( ...@@ -7,6 +7,7 @@ from routersploit import (
http_request, http_request,
mute, mute,
validators, validators,
random_text,
) )
...@@ -65,11 +66,14 @@ class Exploit(exploits.Exploit): ...@@ -65,11 +66,14 @@ class Exploit(exploits.Exploit):
def check(self): def check(self):
url = "{}:{}/utility.cgi?testType=1&IP=aaa".format(self.target, self.port) url = "{}:{}/utility.cgi?testType=1&IP=aaa".format(self.target, self.port)
response = http_request(method="GET", url=url) response1 = http_request(method="GET", url=url)
if response is None: if response1 is None:
return False # target is not vulnerable return False # target is not vulnerable
if response.status_code == 200: if response1.status_code == 200:
url = "{}:{}/{}.cgi".format(self.target, self.port, random_text(32))
response2 = http_request(method="GET", url=url)
if response2 is None or response1.text != response2.text:
return True # target is vulnerable return True # target is vulnerable
return False # target is not 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