mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-10-29 18:07:27 +01:00
Revert "Land #3446 -- Meterpreter bins gem switch" due to build failures
This reverts commitbba8bd3498
, reversing changes made to002234993f
.
This commit is contained in:
parent
3ed7050b67
commit
9b35b0e13a
33
.gitignore
vendored
33
.gitignore
vendored
@ -15,6 +15,8 @@ Gemfile.local.lock
|
||||
config/database.yml
|
||||
# simplecov coverage data
|
||||
coverage
|
||||
data/meterpreter/ext_server_pivot.x86.dll
|
||||
data/meterpreter/ext_server_pivot.x64.dll
|
||||
doc/
|
||||
external/source/meterpreter/java/bin
|
||||
external/source/meterpreter/java/build
|
||||
@ -51,34 +53,3 @@ tags
|
||||
# ignore release/debug folders for exploits
|
||||
external/source/exploits/**/Debug
|
||||
external/source/exploits/**/Release
|
||||
|
||||
# Avoid checking in Meterpreter binaries. These are supplied upstream by
|
||||
# the meterpreter_bins gem.
|
||||
data/meterpreter/elevator.x64.dll
|
||||
data/meterpreter/elevator.x86.dll
|
||||
data/meterpreter/ext_server_espia.x64.dll
|
||||
data/meterpreter/ext_server_espia.x86.dll
|
||||
data/meterpreter/ext_server_extapi.x64.dll
|
||||
data/meterpreter/ext_server_extapi.x86.dll
|
||||
data/meterpreter/ext_server_incognito.x64.dll
|
||||
data/meterpreter/ext_server_incognito.x86.dll
|
||||
data/meterpreter/ext_server_kiwi.x64.dll
|
||||
data/meterpreter/ext_server_kiwi.x86.dll
|
||||
data/meterpreter/ext_server_lanattacks.x64.dll
|
||||
data/meterpreter/ext_server_lanattacks.x86.dll
|
||||
data/meterpreter/ext_server_mimikatz.x64.dll
|
||||
data/meterpreter/ext_server_mimikatz.x86.dll
|
||||
data/meterpreter/ext_server_priv.x64.dll
|
||||
data/meterpreter/ext_server_priv.x86.dll
|
||||
data/meterpreter/ext_server_stdapi.x64.dll
|
||||
data/meterpreter/ext_server_stdapi.x86.dll
|
||||
data/meterpreter/metsrv.x64.dll
|
||||
data/meterpreter/metsrv.x86.dll
|
||||
data/meterpreter/screenshot.x64.dll
|
||||
data/meterpreter/screenshot.x86.dll
|
||||
|
||||
# Avoid checking in Meterpreter libs that are built from
|
||||
# private source. If you're interested in this functionality,
|
||||
# check out Metasploit Pro: http://metasploit.com/download
|
||||
data/meterpreter/ext_server_pivot.x86.dll
|
||||
data/meterpreter/ext_server_pivot.x64.dll
|
||||
|
2
Gemfile
2
Gemfile
@ -6,8 +6,6 @@ gem 'activesupport', '>= 3.0.0', '< 4.0.0'
|
||||
gem 'bcrypt'
|
||||
# Needed for some admin modules (scrutinizer_add_user.rb)
|
||||
gem 'json'
|
||||
# Needed for Meterpreter on Windows, soon others.
|
||||
gem 'meterpreter_bins', '0.0.6'
|
||||
# Needed by msfgui and other rpc components
|
||||
gem 'msgpack'
|
||||
# Needed by anemone crawler
|
||||
|
@ -26,7 +26,6 @@ GEM
|
||||
activerecord (>= 3.2.13)
|
||||
activesupport
|
||||
pg
|
||||
meterpreter_bins (0.0.6)
|
||||
mini_portile (0.5.1)
|
||||
msgpack (0.5.5)
|
||||
multi_json (1.0.4)
|
||||
@ -71,7 +70,6 @@ DEPENDENCIES
|
||||
fivemat (= 1.2.1)
|
||||
json
|
||||
metasploit_data_models (~> 0.17.0)
|
||||
meterpreter_bins (= 0.0.6)
|
||||
msgpack
|
||||
network_interface (~> 0.0.1)
|
||||
nokogiri
|
||||
|
BIN
data/meterpreter/elevator.x64.dll
Normal file
BIN
data/meterpreter/elevator.x64.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/elevator.x86.dll
Normal file
BIN
data/meterpreter/elevator.x86.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/ext_server_espia.x64.dll
Normal file
BIN
data/meterpreter/ext_server_espia.x64.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/ext_server_espia.x86.dll
Normal file
BIN
data/meterpreter/ext_server_espia.x86.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/ext_server_extapi.x64.dll
Normal file
BIN
data/meterpreter/ext_server_extapi.x64.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/ext_server_extapi.x86.dll
Normal file
BIN
data/meterpreter/ext_server_extapi.x86.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/ext_server_incognito.x64.dll
Normal file
BIN
data/meterpreter/ext_server_incognito.x64.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/ext_server_incognito.x86.dll
Normal file
BIN
data/meterpreter/ext_server_incognito.x86.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/ext_server_kiwi.x64.dll
Normal file
BIN
data/meterpreter/ext_server_kiwi.x64.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/ext_server_kiwi.x86.dll
Normal file
BIN
data/meterpreter/ext_server_kiwi.x86.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/ext_server_lanattacks.x64.dll
Normal file
BIN
data/meterpreter/ext_server_lanattacks.x64.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/ext_server_lanattacks.x86.dll
Normal file
BIN
data/meterpreter/ext_server_lanattacks.x86.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/ext_server_mimikatz.x64.dll
Normal file
BIN
data/meterpreter/ext_server_mimikatz.x64.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/ext_server_mimikatz.x86.dll
Normal file
BIN
data/meterpreter/ext_server_mimikatz.x86.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/ext_server_priv.x64.dll
Normal file
BIN
data/meterpreter/ext_server_priv.x64.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/ext_server_priv.x86.dll
Normal file
BIN
data/meterpreter/ext_server_priv.x86.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/ext_server_stdapi.x64.dll
Normal file
BIN
data/meterpreter/ext_server_stdapi.x64.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/ext_server_stdapi.x86.dll
Normal file
BIN
data/meterpreter/ext_server_stdapi.x86.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/metsrv.x64.dll
Normal file
BIN
data/meterpreter/metsrv.x64.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/metsrv.x86.dll
Normal file
BIN
data/meterpreter/metsrv.x86.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/screenshot.x64.dll
Normal file
BIN
data/meterpreter/screenshot.x64.dll
Normal file
Binary file not shown.
BIN
data/meterpreter/screenshot.x86.dll
Normal file
BIN
data/meterpreter/screenshot.x86.dll
Normal file
Binary file not shown.
@ -1,5 +1,4 @@
|
||||
# -*- coding: binary -*-
|
||||
|
||||
require 'meterpreter_bins'
|
||||
require 'rex/post/meterpreter/client'
|
||||
require 'rex/post/meterpreter/ui/console'
|
||||
|
@ -149,8 +149,7 @@ class ClientCore < Extension
|
||||
end
|
||||
# Get us to the installation root and then into data/meterpreter, where
|
||||
# the file is expected to be
|
||||
modname = "ext_server_#{mod.downcase}"
|
||||
path = MeterpreterBinaries.path(modname, client.binary_suffix)
|
||||
path = ::File.join(Msf::Config.data_directory, 'meterpreter', 'ext_server_' + mod.downcase + ".#{client.binary_suffix}")
|
||||
|
||||
if (opts['ExtensionPath'])
|
||||
path = opts['ExtensionPath']
|
||||
@ -222,7 +221,7 @@ class ClientCore < Extension
|
||||
|
||||
# Create the migrate stager
|
||||
migrate_stager = c.new()
|
||||
migrate_stager.datastore['DLL'] = MeterpreterBinaries.path('metsrv',binary_suffix)
|
||||
migrate_stager.datastore['DLL'] = ::File.join( Msf::Config.data_directory, "meterpreter", "metsrv.#{binary_suffix}" )
|
||||
|
||||
blob = migrate_stager.stage_payload
|
||||
|
||||
|
@ -45,7 +45,7 @@ class Priv < Extension
|
||||
|
||||
elevator_name = Rex::Text.rand_text_alpha_lower( 6 )
|
||||
|
||||
elevator_path = MeterpreterBinaries.path(elevator, client.binary_suffix)
|
||||
elevator_path = ::File.join( Msf::Config.data_directory, "meterpreter", "elevator.#{client.binary_suffix}" )
|
||||
|
||||
elevator_path = ::File.expand_path( elevator_path )
|
||||
|
||||
|
@ -156,7 +156,7 @@ class UI < Rex::Post::UI
|
||||
request.add_tlv( TLV_TYPE_DESKTOP_SCREENSHOT_QUALITY, quality )
|
||||
# include the x64 screenshot dll if the host OS is x64
|
||||
if( client.sys.config.sysinfo['Architecture'] =~ /^\S*x64\S*/ )
|
||||
screenshot_path = MeterpreterBinaries.path('screenshot','x64.dll')
|
||||
screenshot_path = ::File.join( Msf::Config.data_directory, 'meterpreter', 'screenshot.x64.dll' )
|
||||
screenshot_path = ::File.expand_path( screenshot_path )
|
||||
screenshot_dll = ''
|
||||
::File.open( screenshot_path, 'rb' ) do |f|
|
||||
@ -166,7 +166,7 @@ class UI < Rex::Post::UI
|
||||
request.add_tlv( TLV_TYPE_DESKTOP_SCREENSHOT_PE64DLL_LENGTH, screenshot_dll.length )
|
||||
end
|
||||
# but allways include the x86 screenshot dll as we can use it for wow64 processes if we are on x64
|
||||
screenshot_path = MeterpreterBinaries.path('screenshot','x86.dll')
|
||||
screenshot_path = ::File.join( Msf::Config.data_directory, 'meterpreter', 'screenshot.x86.dll' )
|
||||
screenshot_path = ::File.expand_path( screenshot_path )
|
||||
screenshot_dll = ''
|
||||
::File.open( screenshot_path, 'rb' ) do |f|
|
||||
|
@ -417,15 +417,12 @@ class Console::CommandDispatcher::Core
|
||||
case opt
|
||||
when "-l"
|
||||
exts = []
|
||||
msf_path = MeterpreterBinaries.metasploit_data_dir
|
||||
gem_path = MeterpreterBinaries.local_dir
|
||||
[msf_path, gem_path].each do |path|
|
||||
::Dir.entries(path).each { |f|
|
||||
if (::File.file?(::File.join(path, f)) && f =~ /ext_server_(.*)\.#{client.binary_suffix}/ )
|
||||
exts.push($1) unless exts.include?($1)
|
||||
end
|
||||
}
|
||||
end
|
||||
path = ::File.join(Msf::Config.data_directory, 'meterpreter')
|
||||
::Dir.entries(path).each { |f|
|
||||
if (::File.file?(::File.join(path, f)) && f =~ /ext_server_(.*)\.#{client.binary_suffix}/ )
|
||||
exts.push($1)
|
||||
end
|
||||
}
|
||||
print(exts.sort.join("\n") + "\n")
|
||||
|
||||
return true
|
||||
@ -465,17 +462,14 @@ class Console::CommandDispatcher::Core
|
||||
|
||||
def cmd_load_tabs(str, words)
|
||||
tabs = []
|
||||
msf_path = MeterpreterBinaries.metasploit_data_dir
|
||||
gem_path = MeterpreterBinaries.local_dir
|
||||
[msf_path, gem_path].each do |path|
|
||||
path = ::File.join(Msf::Config.data_directory, 'meterpreter')
|
||||
::Dir.entries(path).each { |f|
|
||||
if (::File.file?(::File.join(path, f)) && f =~ /ext_server_(.*)\.#{client.binary_suffix}/ )
|
||||
if (not extensions.include?($1))
|
||||
tabs.push($1) unless tabs.include?($1)
|
||||
tabs.push($1)
|
||||
end
|
||||
end
|
||||
}
|
||||
end
|
||||
return tabs
|
||||
end
|
||||
|
||||
|
@ -39,7 +39,7 @@ module Metasploit3
|
||||
end
|
||||
|
||||
def library_path
|
||||
MeterpreterBinaries.path('metsrv','x86.dll')
|
||||
File.join(Msf::Config.data_directory, "meterpreter", "metsrv.x86.dll")
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -41,7 +41,7 @@ module Metasploit3
|
||||
end
|
||||
|
||||
def library_path
|
||||
MeterpreterBinaries.path('metsrv','x86.dll')
|
||||
File.join(Msf::Config.data_directory, "meterpreter", "metsrv.x86.dll")
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -34,7 +34,7 @@ module Metasploit3
|
||||
end
|
||||
|
||||
def library_path
|
||||
MeterpreterBinaries.path('metsrv','x64.dll')
|
||||
File.join( Msf::Config.data_directory, "meterpreter", "metsrv.x64.dll" )
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -1,53 +0,0 @@
|
||||
require 'spec_helper'
|
||||
require 'rex/post/meterpreter/client_core'
|
||||
|
||||
describe Rex::Post::Meterpreter::ClientCore do
|
||||
|
||||
it "should be available" do
|
||||
expect(described_class).to eq(Rex::Post::Meterpreter::ClientCore)
|
||||
end
|
||||
|
||||
describe "#use" do
|
||||
|
||||
before(:each) do
|
||||
@response = double("response")
|
||||
allow(@response).to receive(:result) { 0 }
|
||||
allow(@response).to receive(:each) { [:help] }
|
||||
@client = double("client")
|
||||
allow(@client).to receive(:binary_suffix) { "x64.dll" }
|
||||
allow(@client).to receive(:capabilities) { {:ssl => false, :zlib => false } }
|
||||
allow(@client).to receive(:response_timeout) { 1 }
|
||||
allow(@client).to receive(:send_packet_wait_response) { @response }
|
||||
allow(@client).to receive(:add_extension) { true }
|
||||
end
|
||||
|
||||
let(:client_core) {described_class.new(@client)}
|
||||
it 'should respond to #use' do
|
||||
expect(client_core).to respond_to(:use)
|
||||
end
|
||||
|
||||
context 'with a gemified module' do
|
||||
let(:mod) {"kiwi"}
|
||||
it 'should be available' do
|
||||
expect(client_core.use(mod)).to be_true
|
||||
end
|
||||
end
|
||||
|
||||
context 'with a local module' do
|
||||
let(:mod) {"sniffer"}
|
||||
it 'should be available' do
|
||||
expect(client_core.use(mod)).to be_true
|
||||
end
|
||||
end
|
||||
|
||||
context 'with a missing a module' do
|
||||
let(:mod) {"eaten_by_av"}
|
||||
it 'should be available' do
|
||||
expect { client_core.use(mod) }.to raise_error(TypeError)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
@ -1,41 +0,0 @@
|
||||
require 'spec_helper'
|
||||
require 'rex/post/meterpreter/extension'
|
||||
require 'rex/post/meterpreter/extensions/priv/priv'
|
||||
|
||||
describe Rex::Post::Meterpreter::Extensions::Priv::Priv do
|
||||
|
||||
it "should be available" do
|
||||
expect(described_class).to eq(Rex::Post::Meterpreter::Extensions::Priv::Priv)
|
||||
end
|
||||
|
||||
describe "#getsystem" do
|
||||
before(:each) do
|
||||
@client = double("client")
|
||||
allow(@client).to receive(:register_extension_aliases) { [] }
|
||||
end
|
||||
|
||||
let(:priv) {described_class.new(@client)}
|
||||
it 'should respond to #getsystem' do
|
||||
expect(priv).to respond_to(:getsystem)
|
||||
end
|
||||
|
||||
it 'should return itself' do
|
||||
expect(priv).to be_kind_of(described_class)
|
||||
end
|
||||
|
||||
it 'should have some instance variables' do
|
||||
expect(priv.instance_variables).to include(:@client)
|
||||
expect(priv.instance_variables).to include(:@name)
|
||||
expect(priv.instance_variables).to include(:@fs)
|
||||
end
|
||||
|
||||
it 'should respond to fs' do
|
||||
expect(priv).to respond_to(:fs)
|
||||
end
|
||||
|
||||
it 'should have a name of priv' do
|
||||
expect(priv.name).to eq("priv")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
@ -1,33 +0,0 @@
|
||||
require 'spec_helper'
|
||||
require 'rex/post/meterpreter'
|
||||
require 'rex/post/meterpreter/extensions/stdapi/ui'
|
||||
|
||||
describe Rex::Post::Meterpreter::Extensions::Stdapi::UI do
|
||||
|
||||
it "should be available" do
|
||||
expect(described_class).to eq(Rex::Post::Meterpreter::Extensions::Stdapi::UI)
|
||||
end
|
||||
|
||||
describe "#screenshot" do
|
||||
|
||||
before(:each) do
|
||||
@client = double("client")
|
||||
end
|
||||
|
||||
let(:ui) { described_class.new(@client) }
|
||||
it 'should respond to #screenshot' do
|
||||
expect(ui).to respond_to(:screenshot)
|
||||
end
|
||||
|
||||
it 'should return itself' do
|
||||
expect(ui).to be_kind_of(described_class)
|
||||
end
|
||||
|
||||
it 'should have an instance variable' do
|
||||
expect(ui.instance_variables).to include(:@client)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -1,8 +0,0 @@
|
||||
require 'spec_helper'
|
||||
require 'rex/post/meterpreter'
|
||||
|
||||
describe MeterpreterBinaries do
|
||||
it 'is available' do
|
||||
expect(described_class).to eq(MeterpreterBinaries)
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user