Skip to content

Commit 02b11af

Browse files
committed
Merge remote-tracking branch 'upstream/master' into netapi_change_passwd
Conflicts: lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_netapi32.rb
2 parents bd9b5ad + 56b165d commit 02b11af

File tree

177 files changed

+4246
-18022
lines changed

Some content is hidden

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

177 files changed

+4246
-18022
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
language: ruby
2-
env: MSF_SPOTCHECK_RECENT=1
32
before_install:
43
- rake --version
54
- sudo apt-get update -qq
65
- sudo apt-get install -qq libpcap-dev
6+
# Uncomment when we have fewer shipping msftidy warnings.
7+
# Merge committers will still be checking, just not autofailing.
8+
# See https://dev.metasploit.com/redmine/issues/8498
9+
# - ln -sf ../../tools/dev/pre-commit-hook.rb ./.git/hooks/post-merge
10+
# - ls -la ./.git/hooks
11+
# - ./.git/hooks/post-merge
712
before_script:
8-
- ./tools/msftidy.rb
913
- cp config/database.yml.travis config/database.yml
1014
- bundle exec rake --version
1115
- bundle exec rake db:create

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ and Metasploit's [Common Coding Mistakes](https://github.com/rapid7/metasploit-f
2323

2424
### Pull Requests
2525

26+
* **Do** target your pull request to the **master branch**. Not staging, not develop, not release.
2627
* **Do** specify a descriptive title to make searching for your pull request easier.
2728
* **Do** include [console output](https://help.github.com/articles/github-flavored-markdown#fenced-code-blocks), especially for witnessable effects in `msfconsole`.
2829
* **Do** list [verification steps](https://help.github.com/articles/writing-on-github#task-lists) so your code is testable.
@@ -34,14 +35,15 @@ Pull requests [#2940](https://github.com/rapid7/metasploit-framework/pull/2940)
3435
#### New Modules
3536

3637
* **Do** run `tools/msftidy.rb` against your module and fix any errors or warnings that come up. Even better would be to set up `msftidy.rb` as a [pre-commit hook](https://github.com/rapid7/metasploit-framework/blob/master/tools/dev/pre-commit-hook.rb).
37-
* **Do** use the [API](https://dev.metasploit.com/documents/api/). Wheel improvements are welcome; wheel reinventions, not so much.
38+
* **Do** use the [many module mixin APIs](https://dev.metasploit.com/documents/api/). Wheel improvements are welcome; wheel reinventions, not so much.
3839
* **Don't** include more than one module per pull request.
3940

4041
#### Library Code
4142

4243
* **Do** write [RSpec](http://rspec.info/) tests - even the smallest change in library land can thoroughly screw things up.
4344
* **Do** follow [Better Specs](http://betterspecs.org/) - it's like the style guide for specs.
4445
* **Do** write [YARD](http://yardoc.org/) documentation - this makes it easier for people to use your code.
46+
* **Don't** fix a lot of things in one pull request. Small fixes are easier to validate.
4547

4648
#### Bug Fixes
4749

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ gem 'json'
1010
gem 'msgpack'
1111
# Needed by anemone crawler
1212
gem 'nokogiri'
13+
# Needed by JSObfu
14+
gem 'rkelly-remix', '0.0.6'
1315
# Needed by anemone crawler
1416
gem 'robots'
1517
# Needed by db.rb and Msf::Exploit::Capture

Gemfile.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ GEM
3737
pg (0.16.0)
3838
rake (10.1.0)
3939
redcarpet (3.0.0)
40+
rkelly-remix (0.0.6)
4041
robots (0.10.1)
4142
rspec (2.14.1)
4243
rspec-core (~> 2.14.0)
@@ -76,6 +77,7 @@ DEPENDENCIES
7677
pg (>= 0.11)
7778
rake (>= 10.0.0)
7879
redcarpet
80+
rkelly-remix (= 0.0.6)
7981
robots
8082
rspec (>= 2.12)
8183
shoulda-matchers

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ The mailing list archives are available from:
2424

2525
Installing
2626
--
27-
Generally, you should use the installer which contains all dependencies
28-
and will get you up and running with a few clicks. See the [Dev
29-
Environment Setup][wiki-devenv] if you'd like to deal with dependencies
30-
on your own.
27+
28+
Generally, you should use [the free installer](https://www.metasploit.com/download)
29+
which contains all dependencies and will get you up and running with a
30+
few clicks. See the [Dev Environment Setup](http://r-7.co/MSF-DEV) if
31+
you'd like to deal with dependencies on your own.
3132

3233
Using Metasploit
3334
--

data/exploits/cve-2014-1761.rtf

Lines changed: 183 additions & 0 deletions
Large diffs are not rendered by default.

data/js/detect/misc_addons.js

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,53 @@ window.misc_addons_detect.hasSilverlight = function () {
4646
return found;
4747
}
4848

49+
/**
50+
* Returns the Adobe Flash version
51+
**/
52+
window.misc_addons_detect.getFlashVersion = function () {
53+
var foundVersion = null;
54+
55+
//
56+
// Gets the Flash version by using the GetVariable function via ActiveX
57+
//
58+
try {
59+
var ax = new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').toString();
60+
foundVersion = ax.match(/[\d,]+/g)[0].replace(/,/g, '.')
61+
} catch (e) {}
62+
63+
//
64+
// This should work fine for most non-IE browsers
65+
//
66+
if (foundVersion == null) {
67+
var mimes = window.navigator.mimeTypes;
68+
for (var i=0; i<mimes.length; i++) {
69+
var pluginDesc = mimes[i].enabledPlugin.description.toString();
70+
var m = pluginDesc.match(/Shockwave Flash [\d\.]+/g);
71+
if (m != null) {
72+
foundVersion = m[0].match(/\d.+/g)[0];
73+
break;
74+
}
75+
}
76+
}
77+
78+
//
79+
// Detection for Windows + Firefox
80+
//
81+
if (foundVersion == null) {
82+
var pluginsCount = navigator.plugins.length;
83+
for (i=0; i < pluginsCount; i++) {
84+
var pluginName = navigator.plugins[i].name;
85+
var pluginVersion = navigator.plugins[i].version;
86+
if (/Shockwave Flash/.test(pluginName) && pluginVersion != undefined) {
87+
foundVersion = navigator.plugins[i].version;
88+
break;
89+
}
90+
}
91+
}
92+
93+
return foundVersion;
94+
}
95+
4996
/**
5097
* Returns the Java version
5198
**/

data/js/detect/os.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -945,11 +945,18 @@ window.os_detect.getVersion = function(){
945945
if (!ua_version) {
946946
// The ScriptEngine functions failed us, try some object detection
947947
if (document.documentElement && (typeof document.documentElement.style.maxHeight)!="undefined") {
948-
// IE 10 detection using nodeName
948+
// IE 11 detection, see: http://msdn.microsoft.com/en-us/library/ie/bg182625(v=vs.85).aspx
949949
try {
950-
var badNode = document.createElement && document.createElement("badname");
951-
if (badNode && badNode.nodeName === "BADNAME") { ua_version = "10.0"; }
952-
} catch(e) {}
950+
if (document.__proto__ != undefined) { ua_version = "11.0"; }
951+
} catch (e) {}
952+
953+
// IE 10 detection using nodeName
954+
if (!ua_version) {
955+
try {
956+
var badNode = document.createElement && document.createElement("badname");
957+
if (badNode && badNode.nodeName === "BADNAME") { ua_version = "10.0"; }
958+
} catch(e) {}
959+
}
953960

954961
// IE 9 detection based on a "Object doesn't support property or method" error
955962
if (!ua_version) {

data/js/memory/explib2/lib/explib2.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,6 @@ ExpLib = (function() {
354354
this.arr2_base = this.base + 0x1000;
355355
this.arr2_member_base = this.arr2_base + 0x20;
356356

357-
358-
var target_arr = new Array( 1, 2, 3, 4, 5 );
359-
var target_arr_addr = this.leakAddress(target_arr);
360-
var target_arr_vftable = this.read32(target_arr_addr);
361-
362357
var func_addr = this.leakAddress(ActiveXObject);
363358
var script_engine_addr = this.read32(this.read32(func_addr + 0x1c) + 4);
364359

lib/metasm/metasm.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ module Metasm
3636
'Ia32' => 'cpu/ia32', 'MIPS' => 'cpu/mips', 'PowerPC' => 'cpu/ppc', 'ARM' => 'cpu/arm',
3737
'X86_64' => 'cpu/x86_64', 'Sh4' => 'cpu/sh4', 'Dalvik' => 'cpu/dalvik', 'ARC' => 'cpu/arc',
3838
'Python' => 'cpu/python', 'Z80' => 'cpu/z80', 'CY16' => 'cpu/cy16', 'BPF' => 'cpu/bpf',
39+
'MSP430' => 'cpu/msp430',
3940
'C' => 'compile_c',
4041
'MZ' => 'exe_format/mz', 'PE' => 'exe_format/pe',
4142
'ELF' => 'exe_format/elf', 'COFF' => 'exe_format/coff',

0 commit comments

Comments
 (0)