Skip to content

Commit 7ea3cd1

Browse files
committed
Merge pull request #1 from Meatballs1/pr4233_powerdump
Pr4233 powerdump
2 parents 830af7f + 3e0f909 commit 7ea3cd1

File tree

4,399 files changed

+172326
-99932
lines changed

Some content is hidden

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

4,399 files changed

+172326
-99932
lines changed

.gitignore

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
11
.bundle
2+
Gemfile.local
3+
Gemfile.local.lock
24
# Rubymine project directory
35
.idea
46
# Sublime Text project directory (not created by ST by default)
57
.sublime-project
68
# RVM control file, keep this to avoid backdooring Metasploit
79
.rvmrc
10+
# Allow for a local choice of (unsupported / semi-supported) ruby versions
11+
# See PR #4136 for usage, but example usage for rvm:
12+
# rvm --create --versions-conf use 2.1.4@metasploit-framework
13+
# Because rbenv doesn't use .versions.conf, to achieve this same functionality, run:
14+
# rbenv shell 2.1.4
15+
.versions.conf
816
# YARD cache directory
917
.yardoc
1018
# Mac OS X files
1119
.DS_Store
1220
# database config for testing
1321
config/database.yml
22+
# target config file for testing
23+
features/support/targets.yml
1424
# simplecov coverage data
1525
coverage
16-
data/meterpreter/ext_server_pivot.x86.dll
17-
data/meterpreter/ext_server_pivot.x64.dll
1826
doc/
1927
external/source/meterpreter/java/bin
2028
external/source/meterpreter/java/build
@@ -48,6 +56,30 @@ tags
4856
*.opensdf
4957
*.user
5058

59+
# Rails log directory
60+
/log
61+
# Rails tmp directory
62+
/tmp
63+
5164
# ignore release/debug folders for exploits
5265
external/source/exploits/**/Debug
5366
external/source/exploits/**/Release
67+
68+
# Avoid checking in Meterpreter binaries. These are supplied upstream by
69+
# the meterpreter_bins gem.
70+
data/meterpreter/elevator.*.dll
71+
data/meterpreter/ext_server_espia.*.dll
72+
data/meterpreter/ext_server_extapi.*.dll
73+
data/meterpreter/ext_server_incognito.*.dll
74+
data/meterpreter/ext_server_kiwi.*.dll
75+
data/meterpreter/ext_server_lanattacks.*.dll
76+
data/meterpreter/ext_server_mimikatz.*.dll
77+
data/meterpreter/ext_server_priv.*.dll
78+
data/meterpreter/ext_server_stdapi.*.dll
79+
data/meterpreter/metsrv.*.dll
80+
data/meterpreter/screenshot.*.dll
81+
82+
# Avoid checking in Meterpreter libs that are built from
83+
# private source. If you're interested in this functionality,
84+
# check out Metasploit Pro: http://metasploit.com/download
85+
data/meterpreter/ext_server_pivot.*.dll

.mailmap

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ bturner-r7 <bturner-r7@github> Brandon Turner <[email protected]>
22
dmaloney-r7 <dmaloney-r7@github> David Maloney <[email protected]>
33
dmaloney-r7 <dmaloney-r7@github> David Maloney <[email protected]> # aka TheLightCosine
44
ecarey-r7 <ecarey-r7@github> Erran Carey <[email protected]>
5+
farias-r7 <farias-r7@github> Fernando Arias <[email protected]>
56
hmoore-r7 <hmoore-r7@github> HD Moore <[email protected]>
67
hmoore-r7 <hmoore-r7@github> HD Moore <[email protected]>
78
jlee-r7 <jlee-r7@github> egypt <[email protected]> # aka egypt
@@ -13,14 +14,17 @@ jvazquez-r7 <jvazquez-r7@github> jvazquez-r7 <[email protected]>
1314
jvazquez-r7 <jvazquez-r7@github> jvazquez-r7 <[email protected]>
1415
limhoff-r7 <limhoff-r7@github> Luke Imhoff <[email protected]>
1516
shuckins-r7 <shuckins-r7@github> Samuel Huckins <[email protected]>
16-
tasos-r7 <tasos-r7@github> Tasos Laskos <[email protected]>
1717
todb-r7 <todb-r7@github> Tod Beardsley <[email protected]>
1818
todb-r7 <todb-r7@github> Tod Beardsley <[email protected]>
19+
todb-r7 <todb-r7@github> Tod Beardsley <[email protected]>
20+
trosen-r7 <trosen-r7@github> Trevor Rosen <[email protected]>
21+
trosen-r7 <trosen-r7@github> Trevor Rosen <[email protected]>
1922
wchen-r7 <wchen-r7@github> sinn3r <[email protected]> # aka sinn3r
2023
wchen-r7 <wchen-r7@github> sinn3r <[email protected]>
2124
wchen-r7 <wchen-r7@github> Wei Chen <[email protected]>
2225
wvu-r7 <wvu-r7@github> William Vu <[email protected]>
2326
wvu-r7 <wvu-r7@github> William Vu <[email protected]>
27+
wvu-r7 <wvu-r7@github> William Vu <[email protected]>
2428

2529
# Above this line are current Rapid7 employees. Below this paragraph are
2630
# volunteers, former employees, and potential Rapid7 employees who, at
@@ -72,9 +76,18 @@ OJ <oj@github> OJ Reeves <[email protected]>
7276
OJ <oj@github> OJ <[email protected]>
7377
r3dy <r3dy@github> Royce Davis <[email protected]>
7478
r3dy <r3dy@github> Royce Davis <[email protected]>
79+
Rick Flores <[email protected]> Rick Flores (nanotechz9l) <[email protected]>
7580
rsmudge <rsmudge@github> Raphael Mudge <[email protected]> # Aka `butane
7681
schierlm <schierlm@github> Michael Schierl <[email protected]> # Aka mihi
7782
scriptjunkie <scriptjunkie@github> Matt Weeks <[email protected]>
7883
skape <skape@???> Matt Miller <[email protected]>
7984
spoonm <spoonm@github> Spoon M <[email protected]>
8085
swtornio <swtornio@github> Steve Tornio <[email protected]>
86+
Tasos Laskos <[email protected]> Tasos Laskos <[email protected]>
87+
TrustedSec <[email protected]> trustedsec <[email protected]>
88+
89+
# Aliases for utility author names. Since they're fake, typos abound
90+
91+
Tab Assassin <[email protected]> Tabasssassin <[email protected]>
92+
Tab Assassin <[email protected]> Tabassassin <[email protected]>
93+
Tab Assassin <[email protected]> TabAssassin <[email protected]>

.rspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
--color
22
--format Fivemat
3+
--require spec_helper

.rubocop.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# This list was intially created by analyzing the last three months (51
2+
# modules) committed to Metasploit Framework. Many, many older modules
3+
# will have offenses, but this should at least provide a baseline for
4+
# new modules.
5+
#
6+
# Updates to this file should include a 'Description' parameter for any
7+
# explaination needed.
8+
9+
# inherit_from: .rubocop_todo.yml
10+
11+
Metrics/ClassLength:
12+
Description: 'Most Metasploit modules are quite large. This is ok.'
13+
Enabled: true
14+
Exclude:
15+
- 'modules/**/*'
16+
17+
Style/Documentation:
18+
Enabled: true
19+
Description: 'Most Metasploit modules do not have class documentation.'
20+
Exclude:
21+
- 'modules/**/*'
22+
23+
Style/Encoding:
24+
Enabled: true
25+
Description: 'We prefer binary to UTF-8.'
26+
EnforcedStyle: 'when_needed'
27+
28+
Metrics/LineLength:
29+
Description: >-
30+
Metasploit modules often pattern match against very
31+
long strings when identifying targets.
32+
Enabled: true
33+
Max: 180
34+
35+
Metrics/MethodLength:
36+
Enabled: true
37+
Description: >-
38+
While the style guide suggests 10 lines, exploit definitions
39+
often exceed 200 lines.
40+
Max: 300
41+
42+
# Basically everything in metasploit needs binary encoding, not UTF-8.
43+
# Disable this here and enforce it through msftidy
44+
Style/Encoding:
45+
Enabled: false
46+
47+
# %q() is super useful for long strings split over multiple lines and
48+
# is very common in module constructors for things like descriptions
49+
Style/UnneededPercentQ:
50+
Enabled: false
51+
52+
Style/NumericLiterals:
53+
Enabled: false
54+
Description: 'This often hurts readability for exploit-ish code.'
55+
56+
Style/SpaceInsideBrackets:
57+
Enabled: false
58+
Description: 'Until module template are final, most modules will fail this.'
59+
60+
Style/StringLiterals:
61+
Enabled: false
62+
Description: 'Single vs double quote fights are largely unproductive.'
63+
64+
Style/WordArray:
65+
Enabled: false
66+
Description: 'Metasploit prefers consistent use of []'
67+
68+
Style/RedundantBegin:
69+
Exclude:
70+
# this pattern is very common and somewhat unavoidable
71+
# def run_host(ip)
72+
# begin
73+
# ...
74+
# rescue ...
75+
# ...
76+
# ensure
77+
# disconnect
78+
# end
79+
# end
80+
- 'modules/**/*'
81+
82+
Documentation:
83+
Exclude:
84+
- 'modules/**/*'

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.9.3-p484
1+
1.9.3-p551

.simplecov

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ SimpleCov.configure do
3939
# Other library groups
4040
#
4141

42-
add_group 'Fastlib', 'lib/fastlib'
4342
add_group 'Metasm', 'lib/metasm'
4443
add_group 'PacketFu', 'lib/packetfu'
4544
add_group 'Rex', 'lib/rex'

.travis.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,34 @@
1+
env:
2+
- RAKE_TASK=cucumber
3+
- RAKE_TASK=cucumber:boot
4+
- RAKE_TASK=spec SPEC_OPTS="--tag content"
5+
- RAKE_TASK=spec SPEC_OPTS="--tag ~content"
6+
17
language: ruby
8+
matrix:
9+
fast_finish: true
210
before_install:
11+
- rake --version
312
- sudo apt-get update -qq
413
- sudo apt-get install -qq libpcap-dev
14+
# Uncomment when we have fewer shipping msftidy warnings.
15+
# Merge committers will still be checking, just not autofailing.
16+
# See https://dev.metasploit.com/redmine/issues/8498
17+
# - ln -sf ../../tools/dev/pre-commit-hook.rb ./.git/hooks/post-merge
18+
# - ls -la ./.git/hooks
19+
# - ./.git/hooks/post-merge
520
before_script:
621
- cp config/database.yml.travis config/database.yml
7-
- rake db:create
8-
- rake db:migrate
22+
- bundle exec rake --version
23+
- bundle exec rake db:create
24+
- bundle exec rake db:migrate
25+
script:
26+
# fail build if db/schema.rb update is not committed
27+
- git diff --exit-code && bundle exec rake $RAKE_TASK
928

1029
rvm:
11-
#- '1.8.7'
1230
- '1.9.3'
31+
- '2.1'
1332

1433
notifications:
1534
irc: "irc.freenode.org#msfnotify"

.yardopts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
--exclude \.ut\.rb/
44
--exclude \.ts\.rb/
55
--files CONTRIBUTING.md,COPYING,HACKING,LICENSE
6+
app/**/*.rb
67
lib/msf/**/*.rb
8+
lib/metasploit/**/*.rb
79
lib/rex/**/*.rb
10+
plugins/**/*.rb

CONTRIBUTING.md

Lines changed: 86 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,88 @@
1+
# Hello, World!
2+
3+
Thanks for your interest in making Metasploit -- and therefore, the
4+
world -- a better place!
5+
6+
Are you about to report a bug? Sorry to hear it.
7+
8+
Here's our [Issue tracker](https://github.com/rapid7/metasploit-framework/issues).
9+
Please try to be as specific as you can about your problem, include steps
10+
to reproduce (cut and paste from your console output if it's helpful), and
11+
what you were expecting to happen.
12+
13+
Are you about to report a security vulnerability in Metasploit itself?
14+
How ironic! Please take a look at Rapid7's [Vulnerability
15+
Disclosure Policy](https://www.rapid7.com/disclosure.jsp), and send
16+
your report to [email protected] using [our PGP key](http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x2380F85B8AD4DB8D).
17+
18+
Are you about to contribute some new functionality, a bug fix, or a new
19+
Metasploit module? If so, read on...
20+
121
# Contributing to Metasploit
222

3-
## Reporting Bugs
4-
5-
If you would like to report a bug, please take a look at [our Redmine
6-
issue
7-
tracker](https://dev.metasploit.com/redmine/projects/framework/issues?query_id=420)
8-
-- your bug may already have been reported there! Simply [searching](https://dev.metasploit.com/redmine/projects/framework/search) for some appropriate keywords may save everyone a lot of hassle.
9-
10-
If your bug is new and you'd like to report it you will need to
11-
[register
12-
first](https://dev.metasploit.com/redmine/account/register). Don't
13-
worry, it's easy and fun and takes about 30 seconds.
14-
15-
When you file a bug report, please include your **steps to reproduce**,
16-
full copy-pastes of Ruby stack traces, and any relevant details about
17-
your environment. Without repro steps, your bug will likely be closed.
18-
With repro steps, your bugs will likely be fixed.
19-
20-
## Contributing Metasploit Modules
21-
22-
If you have an exploit that you'd like to contribute to the Metasploit
23-
Framework, please familiarize yourself with the
24-
**[HACKING](https://github.com/rapid7/metasploit-framework/blob/master/HACKING)**
25-
document in the
26-
Metasploit-Framework repository. There are many mysteries revealed in
27-
HACKING concerning code style and content.
28-
29-
[Pull requests](https://github.com/rapid7/metasploit-framework/pulls)
30-
should corellate with modules at a 1:1 ratio
31-
-- there is rarely a good reason to have two, three, or ten modules on
32-
one pull request, as this dramatically increases the review time
33-
required to land (commit) any of those modules.
34-
35-
Pull requests tend to be very collaborative for Metasploit -- do not be
36-
surprised if your pull request to rapid7/metasploit-framework triggers a
37-
pull request back to your own fork. In this way, we can isolate working
38-
changes before landing your PR to the Metasploit master branch.
39-
40-
To save yourself the embarrassment of committing common errors, you will
41-
want to symlink the `msftidy.rb` utility to your pre-commit hooks by
42-
running `ln -s ../../tools/dev/pre-commit-hook.rb .git/hooks/pre-commit`
43-
from the top-level directory of your metasploit-framework clone. This
44-
will prevent you from committing modules that raise WARNINGS or ERRORS.
23+
What you see here in CONTRIBUTING.md is a bullet-point list of the do's
24+
and don'ts of how to make sure *your* valuable contributions actually
25+
make it into Metasploit's master branch.
26+
27+
If you care not to follow these rules, your contribution **will** be
28+
closed (*Road House* style). Sorry!
29+
30+
This is intended to be a **short** list. The
31+
[wiki](https://github.com/rapid7/metasploit-framework/wiki) is much more
32+
exhaustive and reveals many mysteries. If you read nothing else, take a
33+
look at the standard [development environment setup
34+
guide](https://github.com/rapid7/metasploit-framework/wiki/Setting-Up-a-Metasploit-Development-Environment)
35+
and Metasploit's [Common Coding Mistakes](https://github.com/rapid7/metasploit-framework/wiki/Common-Metasploit-Module-Coding-Mistakes).
36+
37+
## Code Contributions
38+
39+
* **Do** stick to the [Ruby style guide](https://github.com/bbatsov/ruby-style-guide).
40+
* **Do** get [Rubocop](https://rubygems.org/search?query=rubocop) relatively quiet against the code you are adding or modifying.
41+
* **Do** follow the [50/72 rule](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) for Git commit messages.
42+
* **Don't** use the default merge messages when merging from other
43+
branches.
44+
* **Do** create a [topic branch](http://git-scm.com/book/en/Git-Branching-Branching-Workflows#Topic-Branches) to work on instead of working directly on `master`.
45+
46+
### Pull Requests
47+
48+
* **Do** target your pull request to the **master branch**. Not staging, not develop, not release.
49+
* **Do** specify a descriptive title to make searching for your pull request easier.
50+
* **Do** include [console output](https://help.github.com/articles/github-flavored-markdown#fenced-code-blocks), especially for witnessable effects in `msfconsole`.
51+
* **Do** list [verification steps](https://help.github.com/articles/writing-on-github#task-lists) so your code is testable.
52+
* **Don't** leave your pull request description blank.
53+
* **Don't** abandon your pull request. Being responsive helps us land your code faster.
54+
55+
Pull requests [#2940](https://github.com/rapid7/metasploit-framework/pull/2940) and [#3043](https://github.com/rapid7/metasploit-framework/pull/3043) are a couple good examples to follow.
56+
57+
#### New Modules
58+
59+
* **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).
60+
* **Do** use the [many module mixin APIs](https://dev.metasploit.com/api/). Wheel improvements are welcome; wheel reinventions, not so much.
61+
* **Don't** include more than one module per pull request.
62+
63+
#### Library Code
64+
65+
* **Do** write [RSpec](http://rspec.info/) tests - even the smallest change in library land can thoroughly screw things up.
66+
* **Do** follow [Better Specs](http://betterspecs.org/) - it's like the style guide for specs.
67+
* **Do** write [YARD](http://yardoc.org/) documentation - this makes it easier for people to use your code.
68+
* **Don't** fix a lot of things in one pull request. Small fixes are easier to validate.
69+
70+
#### Bug Fixes
71+
72+
* **Do** include reproduction steps in the form of verification steps.
73+
* **Do** include a link to any corresponding [Issue](https://github.com/rapid7/metasploit-framework/issues) in the format of `See #1234` in your commit description.
74+
75+
## Bug Reports
76+
77+
* **Do** report vulnerabilities in Rapid7 software directly to [email protected].
78+
* **Do** write a detailed description of your bug and use a descriptive title.
79+
* **Do** include reproduction steps, stack traces, and anything else that might help us verify and fix your bug.
80+
* **Don't** file duplicate reports - search for your bug before filing a new report.
81+
82+
If you need some more guidance, talk to the main body of open
83+
source contributors over on the [Freenode IRC channel](http://webchat.freenode.net/?channels=%23metasploit&uio=d4)
84+
or e-mail us at [metasploit-hackers](https://lists.sourceforge.net/lists/listinfo/metasploit-hackers)
85+
mailing list.
86+
87+
Also, **thank you** for taking the few moments to read this far! You're
88+
already way ahead of the curve, so keep it up!

COPYING

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (C) 2006-2013, Rapid7 Inc.
1+
Copyright (C) 2006-2014, Rapid7, Inc.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,

0 commit comments

Comments
 (0)