From 08f622b0ce3d72277518a10e1c552aae6df25891 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Wed, 17 Jan 2018 17:24:15 -0600 Subject: [PATCH 1/5] update version --- Gemfile.lock | 8 ++++---- lib/metasploit/framework/version.rb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e3e2924b28..d828da1f14 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - metasploit-framework (4.16.32) + metasploit-framework (5.0.0) actionpack (~> 4.2.6) activerecord (~> 4.2.6) activesupport (~> 4.2.6) @@ -182,13 +182,13 @@ GEM activesupport (~> 4.2.6) railties (~> 4.2.6) metasploit-payloads (1.3.25) - metasploit_data_models (2.0.15) + metasploit_data_models (2.0.16) activerecord (~> 4.2.6) activesupport (~> 4.2.6) arel-helpers metasploit-concern metasploit-model - pg + pg (= 0.20.0) postgres_ext railties (~> 4.2.6) recog (~> 2.0) @@ -203,7 +203,7 @@ GEM nessus_rest (0.1.6) net-ssh (4.2.0) network_interface (0.0.2) - nexpose (7.1.1) + nexpose (7.2.0) nokogiri (1.8.1) mini_portile2 (~> 2.3.0) octokit (4.8.0) diff --git a/lib/metasploit/framework/version.rb b/lib/metasploit/framework/version.rb index 23cb056f87..cfb44957ea 100644 --- a/lib/metasploit/framework/version.rb +++ b/lib/metasploit/framework/version.rb @@ -30,7 +30,7 @@ module Metasploit end end - VERSION = "4.16.32" + VERSION = "5.0.0" MAJOR, MINOR, PATCH = VERSION.split('.').map { |x| x.to_i } PRERELEASE = 'dev' HASH = get_hash From 035cdb1bca6c47105520cfb0cf7bcaf3f6534e2a Mon Sep 17 00:00:00 2001 From: Matthew Kienow Date: Wed, 17 Jan 2018 16:06:15 -0500 Subject: [PATCH 2/5] Add v5 under construction banner --- data/logos/under-construction-v5.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 data/logos/under-construction-v5.txt diff --git a/data/logos/under-construction-v5.txt b/data/logos/under-construction-v5.txt new file mode 100644 index 0000000000..cdb4fa1a3c --- /dev/null +++ b/data/logos/under-construction-v5.txt @@ -0,0 +1,25 @@ +%clr%red .;lxO0KXXXK0Oxl:. + ,o0WMMMMMMMMMMMMMMMMMMKd, + 'xNMMMMMMMMMMMMMMMMMMMMMMMMMWx, + :KMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK: + .KMMMMMMMMMMMMMMMWNNNWMMMMMMMMMMMMMMMX, + lWMMMMMMMMMMMXd:.. ..;dKMMMMMMMMMMMMo + xMMMMMMMMMMWd. .oNMMMMMMMMMMk + oMMMMMMMMMMx. dMMMMMMMMMMx +.WMMMMMMMMM: :MMMMMMMMMM, +xMMMMMMMMMo lMMMMMMMMMO +NMMMMMMMMW ,cccccoMMMMMMMMMWlccccc; +MMMMMMMMMX ;KMMMMMMMMMMMMMMMMMMX: +NMMMMMMMMW. ;KMMMMMMMMMMMMMMX: +xMMMMMMMMMd ,0MMMMMMMMMMK; +.WMMMMMMMMMc 'OMMMMMM0, + lMMMMMMMMMMk. .kMMO' + dMMMMMMMMMMWd' .. + cWMMMMMMMMMMMNxc'.%clr%whi ##########%clr +%red .0MMMMMMMMMMMMMMMMWc%clr%whi #+# #+#%clr +%red ;0MMMMMMMMMMMMMMMo.%clr%whi +:+%clr +%red .dNMMMMMMMMMMMMo%clr +%whi#+%clr+:++#+ +%red 'oOWMMMMMMMMo%clr +:+ +%red .,cdkO0K;%clr :+: :+: + :::::::+: + %whiMetasploit%clr %yelUnder Construction%clr \ No newline at end of file From cbd1a2a505f8abff254f71471525b4440341467e Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Wed, 17 Jan 2018 21:59:53 -0600 Subject: [PATCH 3/5] update default startup with version info --- lib/msf/ui/console/command_dispatcher/core.rb | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/lib/msf/ui/console/command_dispatcher/core.rb b/lib/msf/ui/console/command_dispatcher/core.rb index 85cd12da4a..3b8eb636f6 100644 --- a/lib/msf/ui/console/command_dispatcher/core.rb +++ b/lib/msf/ui/console/command_dispatcher/core.rb @@ -231,22 +231,17 @@ class Core avdwarn = nil - banner_trailers = { - :version => "%yelmetasploit v#{Metasploit::Framework::VERSION}%clr", - :exp_aux_pos => "#{framework.stats.num_exploits} exploits - #{framework.stats.num_auxiliary} auxiliary - #{framework.stats.num_post} post", - :pay_enc_nop => "#{framework.stats.num_payloads} payloads - #{framework.stats.num_encoders} encoders - #{framework.stats.num_nops} nops", - :free_trial => "Free Metasploit Pro trial: http://r-7.co/trymsp", - :padding => 48 - } + stats = framework.stats + version = "%yelmetasploit v#{Metasploit::Framework::VERSION}%clr", + exp_aux_pos = "#{stats.num_exploits} exploits - #{stats.num_auxiliary} auxiliary - #{stats.num_post} post", + pay_enc_nop = "#{stats.num_payloads} payloads - #{stats.num_encoders} encoders - #{stats.num_nops} nops", + dev_note = "** This is Metasploit 5 development branch **" + padding = 48 - banner << (" =[ %-#{banner_trailers[:padding]+8}s]\n" % banner_trailers[:version]) - banner << ("+ -- --=[ %-#{banner_trailers[:padding]}s]\n" % banner_trailers[:exp_aux_pos]) - banner << ("+ -- --=[ %-#{banner_trailers[:padding]}s]\n" % banner_trailers[:pay_enc_nop]) - - # TODO: People who are already on a Pro install shouldn't see this. - # It's hard for Framework to tell the difference though since - # license details are only in Pro -- we can't see them from here. - banner << ("+ -- --=[ %-#{banner_trailers[:padding]}s]\n" % banner_trailers[:free_trial]) + banner << (" =[ %-#{padding+8}s]\n" % version) + banner << ("+ -- --=[ %-#{padding}s]\n" % exp_aux_pos) + banner << ("+ -- --=[ %-#{padding}s]\n" % pay_enc_nop) + banner << ("+ -- --=[ %-#{padding}s]\n" % dev_note) if ::Msf::Framework::EICARCorrupted avdwarn = [] From facecb40d77ccbb3ce28081a01975ad9ad5f8167 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Wed, 17 Jan 2018 22:01:34 -0600 Subject: [PATCH 4/5] change default prompt for users who use '-q' --- lib/msf/ui/console/driver.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/msf/ui/console/driver.rb b/lib/msf/ui/console/driver.rb index 46c5caad95..818cfdc6bf 100644 --- a/lib/msf/ui/console/driver.rb +++ b/lib/msf/ui/console/driver.rb @@ -23,7 +23,7 @@ class Driver < Msf::Ui::Driver ConfigCore = "framework/core" ConfigGroup = "framework/ui/console" - DefaultPrompt = "%undmsf%clr" + DefaultPrompt = "%undmsf5%clr" DefaultPromptChar = "%clr>" # From 06459e2dee81c4b6583aba170f8777104ff0dec7 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Wed, 17 Jan 2018 22:01:56 -0600 Subject: [PATCH 5/5] cowardly continue using ~/.msf4 until we have an actual reason to switch --- lib/msf/base/config.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/msf/base/config.rb b/lib/msf/base/config.rb index ca31d16d87..d1fa415459 100644 --- a/lib/msf/base/config.rb +++ b/lib/msf/base/config.rb @@ -33,20 +33,24 @@ class Config < Hash return val end + # XXX Update this when there is a need to break compatibility + config_dir_major = 4 + config_dir = ".msf#{config_dir_major}" + # Windows-specific environment variables ['HOME', 'LOCALAPPDATA', 'APPDATA', 'USERPROFILE'].each do |dir| val = Rex::Compat.getenv(dir) if (val and File.directory?(val)) - return File.join(val, ".msf#{Metasploit::Framework::Version::MAJOR}") + return File.join(val, config_dir) end end begin # First we try $HOME/.msfx - File.expand_path("~#{FileSep}.msf#{Metasploit::Framework::Version::MAJOR}") + File.expand_path("~#{FileSep}#{config_dir}") rescue ::ArgumentError # Give up and install root + ".msfx" - InstallRoot + ".msf#{Metasploit::Framework::Version::MAJOR}" + InstallRoot + config_dir end end