Skip to content

Commit 262b541

Browse files
committed
Merge pull request #1 from dmaloney-r7/wordpress-xmlrpc-login-scanner
Wordpress xmlrpc login scanner
2 parents c937e80 + a142e78 commit 262b541

File tree

560 files changed

+30086
-22540
lines changed

Some content is hidden

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

560 files changed

+30086
-22540
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ tags
4848
*.opensdf
4949
*.user
5050

51+
# Rails log directory
52+
/log
53+
5154
# ignore release/debug folders for exploits
5255
external/source/exploits/**/Debug
5356
external/source/exploits/**/Release

.rubocop.yml

Lines changed: 67 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,78 @@
1-
LineLength:
2-
Enabled: true
3-
Max: 180
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.
48

5-
MethodLength:
6-
Enabled: true
7-
Max: 100
9+
# inherit_from: .rubocop_todo.yml
810

911
Style/ClassLength:
12+
Description: 'Most Metasploit modules are quite large. This is ok.'
13+
Enabled: true
1014
Exclude:
11-
# Most modules are quite large and all contained in one class. This is OK.
1215
- 'modules/**/*'
1316

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+
Style/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+
Style/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+
1447
Style/NumericLiterals:
1548
Enabled: false
49+
Description: 'This often hurts readability for exploit-ish code.'
50+
51+
Style/SpaceInsideBrackets:
52+
Enabled: false
53+
Description: 'Until module template are final, most modules will fail this.'
54+
55+
Style/StringLiterals:
56+
Enabled: false
57+
Description: 'Single vs double quote fights are largely unproductive.'
58+
59+
Style/WordArray:
60+
Enabled: false
61+
Description: 'Metasploit prefers consistent use of []'
62+
63+
Style/RedundantBegin:
64+
Exclude:
65+
# this pattern is very common and somewhat unavoidable
66+
# def run_host(ip)
67+
# begin
68+
# ...
69+
# rescue ...
70+
# ...
71+
# ensure
72+
# disconnect
73+
# end
74+
# end
75+
- 'modules/**/*'
1676

1777
Documentation:
1878
Exclude:

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
env:
2+
- RAKE_TASK=cucumber
3+
- RAKE_TASK=spec
14
language: ruby
25
before_install:
36
- rake --version
@@ -14,6 +17,7 @@ before_script:
1417
- bundle exec rake --version
1518
- bundle exec rake db:create
1619
- bundle exec rake db:migrate
20+
script: "bundle exec rake $RAKE_TASK"
1721

1822
rvm:
1923
#- '1.8.7'

.yardopts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +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
810
plugins/**/*.rb

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ and Metasploit's [Common Coding Mistakes](https://github.com/rapid7/metasploit-f
3333
## Code Contributions
3434

3535
* **Do** stick to the [Ruby style guide](https://github.com/bbatsov/ruby-style-guide).
36-
* Similarly, **try** to get Rubocop passing or at least relatively quiet against the files added/modified as part of your contribution
36+
* *Do* get [Rubocop](https://rubygems.org/search?query=rubocop) relatively quiet against the code you are adding or modifying.
3737
* **Do** follow the [50/72 rule](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) for Git commit messages.
3838
* **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`.
3939

Gemfile

Lines changed: 25 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,57 @@
11
source 'https://rubygems.org'
2-
3-
# Need 3+ for ActiveSupport::Concern
4-
gem 'activesupport', '>= 3.0.0', '< 4.0.0'
5-
# Needed for some admin modules (cfme_manageiq_evm_pass_reset.rb)
6-
gem 'bcrypt'
7-
# Needed for some admin modules (scrutinizer_add_user.rb)
8-
gem 'json'
9-
# Needed for Meterpreter on Windows, soon others.
10-
gem 'meterpreter_bins', '0.0.6'
11-
# Needed by msfgui and other rpc components
12-
gem 'msgpack'
13-
# Needed by anemone crawler
14-
gem 'nokogiri'
15-
# Needed by db.rb and Msf::Exploit::Capture
16-
gem 'packetfu', '1.1.9'
17-
# Needed by JSObfu
18-
gem 'rkelly-remix', '0.0.6'
19-
# Needed by anemone crawler
20-
gem 'robots'
21-
# Needed for some post modules
22-
gem 'sqlite3'
2+
# Add default group gems to `metasploit-framework.gemspec`:
3+
# spec.add_runtime_dependency '<name>', [<version requirements>]
4+
gemspec
235

246
group :db do
257
# Needed for Msf::DbManager
268
gem 'activerecord', '>= 3.0.0', '< 4.0.0'
9+
# Metasploit::Credential database models
10+
gem 'metasploit-credential', '>= 0.9.0'
2711
# Database models shared between framework and Pro.
28-
gem 'metasploit_data_models', '0.17.0'
12+
gem 'metasploit_data_models', '~> 0.19'
2913
# Needed for module caching in Mdm::ModuleDetails
3014
gem 'pg', '>= 0.11'
3115
end
3216

33-
group :pcap do
34-
gem 'network_interface', '~> 0.0.1'
35-
# For sniffer and raw socket modules
36-
gem 'pcaprub'
37-
end
38-
3917
group :development do
40-
# Style/sanity checking Ruby code
41-
gem 'rubocop'
4218
# Markdown formatting for yard
4319
gem 'redcarpet'
4420
# generating documentation
4521
gem 'yard'
22+
# for development and testing purposes
23+
gem 'pry'
4624
end
4725

4826
group :development, :test do
4927
# supplies factories for producing model instance for specs
5028
# Version 4.1.0 or newer is needed to support generate calls without the
5129
# 'FactoryGirl.' in factory definitions syntax.
5230
gem 'factory_girl', '>= 4.1.0'
31+
# automatically include factories from spec/factories
32+
gem 'factory_girl_rails'
5333
# Make rspec output shorter and more useful
5434
gem 'fivemat', '1.2.1'
5535
# running documentation generation tasks and rspec tasks
5636
gem 'rake', '>= 10.0.0'
37+
# testing framework
38+
gem 'rspec', '>= 2.12', '< 3.0.0'
39+
# Define `rake spec`. Must be in development AND test so that its available by default as a rake test when the
40+
# environment is development
41+
gem 'rspec-rails' , '>= 2.12', '< 3.0.0'
42+
end
43+
44+
group :pcap do
45+
gem 'network_interface', '~> 0.0.1'
46+
# For sniffer and raw socket modules
47+
gem 'pcaprub'
5748
end
5849

5950
group :test do
60-
# Removes records from database created during tests. Can't use rspec-rails'
61-
# transactional fixtures because multiple connections are in use so
62-
# transactions won't work.
63-
gem 'database_cleaner'
64-
# testing framework
65-
gem 'rspec', '>= 2.12'
51+
# cucumber extension for testing command line applications, like msfconsole
52+
gem 'aruba'
53+
# cucumber + automatic database cleaning with database_cleaner
54+
gem 'cucumber-rails'
6655
gem 'shoulda-matchers'
6756
# code coverage for tests
6857
# any version newer than 0.5.4 gives an Encoding error when trying to read the source files.

Gemfile.local.example

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ end
2727

2828
# Create a custom group
2929
group :local do
30-
# Use pry to help view and interact with objects in the framework
31-
gem 'pry', '~> 0.9'
3230
# Use pry-debugger to step through code during development
3331
gem 'pry-debugger', '~> 0.2'
3432
# Add the lab gem so that the 'lab' plugin will work again

0 commit comments

Comments
 (0)