Skip to content

Commit 01bdf54

Browse files
committed
Merge branch 'upstream/master' into dynamic-transport
2 parents 02383d4 + 24171a1 commit 01bdf54

File tree

102 files changed

+4712
-1295
lines changed

Some content is hidden

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

102 files changed

+4712
-1295
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Thanks for your interest in making Metasploit -- and therefore, the
44
world -- a better place!
55

66
Are you about to report a bug? Sorry to hear it. Here's our [Issue tracker].
7-
Please try to be as specific as you can about your problem, include steps
8-
to reproduce (cut and paste from your console output if it's helpful), and
7+
Please try to be as specific as you can about your problem; include steps
8+
to reproduce (cut and paste from your console output if it's helpful) and
99
what you were expecting to happen.
1010

1111
Are you about to report a security vulnerability in Metasploit itself?
@@ -18,7 +18,7 @@ Metasploit module? If so, read on...
1818

1919
# Contributing to Metasploit
2020

21-
What you see here in CONTRIBUTING.md is a bullet-point list of the do's
21+
What you see here in CONTRIBUTING.md is a bullet point list of the do's
2222
and don'ts of how to make sure *your* valuable contributions actually
2323
make it into Metasploit's master branch.
2424

@@ -27,7 +27,7 @@ closed. Sorry!
2727

2828
This is intended to be a **short** list. The [wiki] is much more
2929
exhaustive and reveals many mysteries. If you read nothing else, take a
30-
look at the standard [development environment setup] guide,
30+
look at the standard [development environment setup] guide
3131
and Metasploit's [Common Coding Mistakes].
3232

3333
## Code Contributions
@@ -52,7 +52,7 @@ Pull requests [PR#2940] and [PR#3043] are a couple good examples to follow.
5252
#### New Modules
5353

5454
* **Do** run `tools/msftidy.rb` against your module and fix any errors or warnings that come up.
55-
- Even better would be to set up `msftidy.rb` as a [pre-commit hook].
55+
- It would be even better to set up `msftidy.rb` as a [pre-commit hook].
5656
* **Do** use the many module mixin [API]s. Wheel improvements are welcome; wheel reinventions, not so much.
5757
* **Don't** include more than one module per pull request.
5858

@@ -80,19 +80,19 @@ Pull requests [PR#2940] and [PR#3043] are a couple good examples to follow.
8080
* **Do** report vulnerabilities in Rapid7 software directly to [email protected].
8181
* **Do** write a detailed description of your bug and use a descriptive title.
8282
* **Do** include reproduction steps, stack traces, and anything else that might help us verify and fix your bug.
83-
* **Don't** file duplicate reports - search for your bug before filing a new report.
83+
* **Don't** file duplicate reports; search for your bug before filing a new report.
8484

8585
If you need some more guidance, talk to the main body of open
86-
source contributors over on the [Freenode IRC channel]
87-
or e-mail us at [metasploit-hackers] mailing list.
86+
source contributors over on the [Freenode IRC channel],
87+
or e-mail us at the [metasploit-hackers] mailing list.
8888

8989
Also, **thank you** for taking the few moments to read this far! You're
9090
already way ahead of the curve, so keep it up!
9191

9292
[Issue Tracker]:http://r-7.co/MSF-BUGv1
9393
[PGP key]:http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x2380F85B8AD4DB8D
9494
[wiki]:https://github.com/rapid7/metasploit-framework/wiki
95-
[scripts]: https://github.com/rapid7/metasploit-framework/tree/master/scripts
95+
[scripts]:https://github.com/rapid7/metasploit-framework/tree/master/scripts
9696
[development environment setup]:http://r-7.co/MSF-DEV
9797
[Common Coding Mistakes]:https://github.com/rapid7/metasploit-framework/wiki/Common-Metasploit-Module-Coding-Mistakes
9898
[Ruby style guide]:https://github.com/bbatsov/ruby-style-guide
@@ -104,10 +104,10 @@ already way ahead of the curve, so keep it up!
104104
[PR#2940]:https://github.com/rapid7/metasploit-framework/pull/2940
105105
[PR#3043]:https://github.com/rapid7/metasploit-framework/pull/3043
106106
[pre-commit hook]:https://github.com/rapid7/metasploit-framework/blob/master/tools/dev/pre-commit-hook.rb
107-
[API]:https://rapid7.github.io/metasploit-framework/api/
108-
[RSpec]:http://rspec.info/
109-
[Better Specs]:http://betterspecs.org/
110-
[YARD]:http://yardoc.org/
107+
[API]:https://rapid7.github.io/metasploit-framework/api
108+
[RSpec]:http://rspec.info
109+
[Better Specs]:http://betterspecs.org
110+
[YARD]:http://yardoc.org
111111
[Issues]:https://github.com/rapid7/metasploit-framework/issues
112112
[Freenode IRC channel]:http://webchat.freenode.net/?channels=%23metasploit&uio=d4
113113
[metasploit-hackers]:https://lists.sourceforge.net/lists/listinfo/metasploit-hackers

Gemfile.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ PATH
2424
activerecord (>= 3.2.21, < 4.0.0)
2525
metasploit-credential (~> 0.14.3)
2626
metasploit-framework (= 4.11.0.pre.dev)
27-
metasploit_data_models (~> 0.23.0)
27+
metasploit_data_models (~> 0.23.2)
2828
pg (>= 0.11)
2929
metasploit-framework-pcap (4.11.0.pre.dev)
3030
metasploit-framework (= 4.11.0.pre.dev)
@@ -101,11 +101,11 @@ GEM
101101
gherkin (2.11.6)
102102
json (>= 1.7.6)
103103
hike (1.2.3)
104-
i18n (0.6.11)
104+
i18n (0.7.0)
105105
journey (1.0.4)
106106
jsobfu (0.2.1)
107107
rkelly-remix (= 0.0.6)
108-
json (1.8.1)
108+
json (1.8.2)
109109
mail (2.5.4)
110110
mime-types (~> 1.16)
111111
treetop (~> 1.4.8)
@@ -123,7 +123,7 @@ GEM
123123
metasploit-model (0.29.0)
124124
activesupport
125125
railties (< 4.0.0)
126-
metasploit_data_models (0.23.1)
126+
metasploit_data_models (0.23.2)
127127
activerecord (>= 3.2.13, < 4.0.0)
128128
activesupport
129129
arel-helpers
@@ -135,11 +135,11 @@ GEM
135135
meterpreter_bins (0.0.17)
136136
method_source (0.8.2)
137137
mime-types (1.25.1)
138-
mini_portile (0.6.1)
138+
mini_portile (0.6.2)
139139
msgpack (0.5.11)
140140
multi_json (1.0.4)
141141
network_interface (0.0.1)
142-
nokogiri (1.6.5)
142+
nokogiri (1.6.6.2)
143143
mini_portile (~> 0.6.0)
144144
packetfu (1.1.9)
145145
pcaprub (0.11.3)
@@ -154,7 +154,7 @@ GEM
154154
rack (>= 0.4)
155155
rack-ssl (1.3.4)
156156
rack
157-
rack-test (0.6.2)
157+
rack-test (0.6.3)
158158
rack (>= 1.0)
159159
rails (3.2.21)
160160
actionmailer (= 3.2.21)
@@ -175,7 +175,7 @@ GEM
175175
rb-readline-r7 (0.5.2.0)
176176
rdoc (3.12.2)
177177
json (~> 1.4)
178-
recog (1.0.16)
178+
recog (1.0.24)
179179
nokogiri
180180
redcarpet (3.1.2)
181181
rkelly-remix (0.0.6)
@@ -219,7 +219,7 @@ GEM
219219
treetop (1.4.15)
220220
polyglot
221221
polyglot (>= 0.3.1)
222-
tzinfo (0.3.42)
222+
tzinfo (0.3.43)
223223
xpath (2.0.0)
224224
nokogiri (~> 1.3)
225225
yard (0.8.7.4)

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Metasploit [![Build Status](https://travis-ci.org/rapid7/metasploit-framework.pn
33
The Metasploit Framework is released under a BSD-style license. See
44
COPYING for more details.
55

6-
The latest version of this software is available from https://metasploit.com/
6+
The latest version of this software is available from: https://metasploit.com
77

88
Bug tracking and development information can be found at:
99
https://github.com/rapid7/metasploit-framework
@@ -20,8 +20,8 @@ Questions and suggestions can be sent to:
2020
Installing
2121
--
2222

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

@@ -34,10 +34,10 @@ resources](https://metasploit.github.io), or the [wiki].
3434

3535
Contributing
3636
--
37-
See the [Dev Environment Setup][wiki-devenv] guide on GitHub which will
38-
walk you through the whole process starting from installing all the
37+
See the [Dev Environment Setup][wiki-devenv] guide on GitHub, which will
38+
walk you through the whole process from installing all the
3939
dependencies, to cloning the repository, and finally to submitting a
40-
pull request. For slightly more info, see
40+
pull request. For slightly more information, see
4141
[Contributing](https://github.com/rapid7/metasploit-framework/blob/master/CONTRIBUTING.md).
4242

4343

data/exploits/CVE-2015-0313/msf.swf

17.5 KB
Binary file not shown.

data/meterpreter/meterpreter.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def tlv_pack(*args):
267267
data = struct.pack('>II', 9, tlv['type']) + bytes(chr(int(bool(tlv['value']))), 'UTF-8')
268268
else:
269269
value = tlv['value']
270-
if sys.version_info[0] < 3 and isinstance(value, __builtins__['unicode']):
270+
if sys.version_info[0] < 3 and value.__class__.__name__ == 'unicode':
271271
value = value.encode('UTF-8')
272272
elif not is_bytes(value):
273273
value = bytes(value, 'UTF-8')
@@ -396,11 +396,17 @@ def debug_print(self, msg):
396396
print(msg)
397397

398398
def driver_init_http(self):
399+
opener_args = []
400+
scheme = HTTP_CONNECTION_URL.split(':', 1)[0]
401+
if scheme == 'https' and ((sys.version_info[0] == 2 and sys.version_info >= (2,7,9)) or sys.version_info >= (3,4,3)):
402+
import ssl
403+
ssl_ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
404+
ssl_ctx.check_hostname=False
405+
ssl_ctx.verify_mode=ssl.CERT_NONE
406+
opener_args.append(urllib.HTTPSHandler(0, ssl_ctx))
399407
if HTTP_PROXY:
400-
proxy_handler = urllib.ProxyHandler({'http': HTTP_PROXY})
401-
opener = urllib.build_opener(proxy_handler)
402-
else:
403-
opener = urllib.build_opener()
408+
opener_args.append(urllib.ProxyHandler({scheme: HTTP_PROXY}))
409+
opener = urllib.build_opener(*opener_args)
404410
if HTTP_USER_AGENT:
405411
opener.addheaders = [('User-Agent', HTTP_USER_AGENT)]
406412
urllib.install_opener(opener)

db/schema.rb

Lines changed: 81 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,62 @@
1111
#
1212
# It's strongly recommended to check this file into your version control system.
1313

14-
ActiveRecord::Schema.define(:version => 20150212214222) do
14+
ActiveRecord::Schema.define(:version => 20150326183742) do
1515

1616
create_table "api_keys", :force => true do |t|
1717
t.text "token"
1818
t.datetime "created_at", :null => false
1919
t.datetime "updated_at", :null => false
2020
end
2121

22+
create_table "automatic_exploitation_match_results", :force => true do |t|
23+
t.integer "match_id"
24+
t.integer "run_id"
25+
t.string "state", :null => false
26+
t.datetime "created_at", :null => false
27+
t.datetime "updated_at", :null => false
28+
end
29+
30+
add_index "automatic_exploitation_match_results", ["match_id"], :name => "index_automatic_exploitation_match_results_on_match_id"
31+
add_index "automatic_exploitation_match_results", ["run_id"], :name => "index_automatic_exploitation_match_results_on_run_id"
32+
33+
create_table "automatic_exploitation_match_sets", :force => true do |t|
34+
t.integer "workspace_id"
35+
t.integer "user_id"
36+
t.datetime "created_at", :null => false
37+
t.datetime "updated_at", :null => false
38+
end
39+
40+
add_index "automatic_exploitation_match_sets", ["user_id"], :name => "index_automatic_exploitation_match_sets_on_user_id"
41+
add_index "automatic_exploitation_match_sets", ["workspace_id"], :name => "index_automatic_exploitation_match_sets_on_workspace_id"
42+
43+
create_table "automatic_exploitation_matches", :force => true do |t|
44+
t.integer "module_detail_id"
45+
t.string "state"
46+
t.integer "nexpose_data_vulnerability_definition_id"
47+
t.datetime "created_at", :null => false
48+
t.datetime "updated_at", :null => false
49+
t.integer "match_set_id"
50+
t.string "matchable_type"
51+
t.integer "matchable_id"
52+
t.text "module_fullname"
53+
end
54+
55+
add_index "automatic_exploitation_matches", ["module_detail_id"], :name => "index_automatic_exploitation_matches_on_ref_id"
56+
add_index "automatic_exploitation_matches", ["module_fullname"], :name => "index_automatic_exploitation_matches_on_module_fullname"
57+
58+
create_table "automatic_exploitation_runs", :force => true do |t|
59+
t.integer "workspace_id"
60+
t.integer "user_id"
61+
t.integer "match_set_id"
62+
t.datetime "created_at", :null => false
63+
t.datetime "updated_at", :null => false
64+
end
65+
66+
add_index "automatic_exploitation_runs", ["match_set_id"], :name => "index_automatic_exploitation_runs_on_match_set_id"
67+
add_index "automatic_exploitation_runs", ["user_id"], :name => "index_automatic_exploitation_runs_on_user_id"
68+
add_index "automatic_exploitation_runs", ["workspace_id"], :name => "index_automatic_exploitation_runs_on_workspace_id"
69+
2270
create_table "clients", :force => true do |t|
2371
t.integer "host_id"
2472
t.datetime "created_at"
@@ -155,19 +203,22 @@
155203
end
156204

157205
create_table "loots", :force => true do |t|
158-
t.integer "workspace_id", :default => 1, :null => false
206+
t.integer "workspace_id", :default => 1, :null => false
159207
t.integer "host_id"
160208
t.integer "service_id"
161-
t.string "ltype", :limit => 512
162-
t.string "path", :limit => 1024
209+
t.string "ltype", :limit => 512
210+
t.string "path", :limit => 1024
163211
t.text "data"
164-
t.datetime "created_at", :null => false
165-
t.datetime "updated_at", :null => false
212+
t.datetime "created_at", :null => false
213+
t.datetime "updated_at", :null => false
166214
t.string "content_type"
167215
t.text "name"
168216
t.text "info"
217+
t.integer "module_run_id"
169218
end
170219

220+
add_index "loots", ["module_run_id"], :name => "index_loots_on_module_run_id"
221+
171222
create_table "macros", :force => true do |t|
172223
t.datetime "created_at", :null => false
173224
t.datetime "updated_at", :null => false
@@ -359,6 +410,26 @@
359410
add_index "module_refs", ["detail_id"], :name => "index_module_refs_on_module_detail_id"
360411
add_index "module_refs", ["name"], :name => "index_module_refs_on_name"
361412

413+
create_table "module_runs", :force => true do |t|
414+
t.datetime "attempted_at"
415+
t.text "fail_detail"
416+
t.string "fail_reason"
417+
t.text "module_fullname"
418+
t.integer "port"
419+
t.string "proto"
420+
t.integer "session_id"
421+
t.string "status"
422+
t.integer "trackable_id"
423+
t.string "trackable_type"
424+
t.integer "user_id"
425+
t.string "username"
426+
t.datetime "created_at", :null => false
427+
t.datetime "updated_at", :null => false
428+
end
429+
430+
add_index "module_runs", ["session_id"], :name => "index_module_runs_on_session_id"
431+
add_index "module_runs", ["user_id"], :name => "index_module_runs_on_user_id"
432+
362433
create_table "module_targets", :force => true do |t|
363434
t.integer "detail_id"
364435
t.integer "index"
@@ -481,13 +552,16 @@
481552
t.integer "port"
482553
t.string "platform"
483554
t.text "datastore"
484-
t.datetime "opened_at", :null => false
555+
t.datetime "opened_at", :null => false
485556
t.datetime "closed_at"
486557
t.string "close_reason"
487558
t.integer "local_id"
488559
t.datetime "last_seen"
560+
t.integer "module_run_id"
489561
end
490562

563+
add_index "sessions", ["module_run_id"], :name => "index_sessions_on_module_run_id"
564+
491565
create_table "tags", :force => true do |t|
492566
t.integer "user_id"
493567
t.string "name", :limit => 1024

external/source/exploits/CVE-2015-0311/Main.as

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// 2. Be support to support 16.0 as target-player (flex-config.xml).
44
// 3. Download the Flex SDK (4.6)
55
// 4. Copy the Flex SDK libs (<FLEX_SDK>/framework/libs) to the AIRSDK folder (<AIR_SDK>/framework/libs)
6+
// (all of them, also, subfolders, specially mx, necessary for the Base64Decoder)
67
// 5. Build with: mxmlc -o msf.swf Main.as
78

89
// Original code by @hdarwin89 // http://blog.hacklab.kr/flash-cve-2015-0311-%EB%B6%84%EC%84%9D/

0 commit comments

Comments
 (0)