Delete RequiredCmd for unix cmd encoders, favor EncoderType

bug/bundler_fix
jvazquez-r7 2014-10-06 18:42:21 -05:00
parent f6f8d7b993
commit 212762e1d6
9 changed files with 23 additions and 25 deletions

View File

@ -128,10 +128,17 @@ class Encoder < Module
#
PrintfPHPMagicQuotes = "printf_php_mq"
#
# Generic Bourne shell substituion encoder, which tries both echo and perl
# encoding. It's there for back compatibility.
# perl encoding.
#
GenericSh = "generic_sh"
CmdUnixPerl = 'perl'
#
# Bourne shell echo encoding.
#
CmdUnixEcho = 'echo'
#
# Bourne shell IFS encoding.
#
CmdUnixIfs = 'ifs'
end
#

View File

@ -471,7 +471,7 @@ class Module
return false
end
mcnt += 1 if mv.include?(x) || mv.include?("*")
mcnt += 1 if mv.include?(x)
end
# No values matched, reject this module

View File

@ -20,7 +20,7 @@ class Metasploit3 < Msf::Encoder
'Author' => 'hdm',
'Arch' => ARCH_CMD,
'Platform' => 'unix',
'RequiredCmd' => 'echo-e')
'EncoderType' => Msf::Encoder::Type::CmdUnixEcho)
end

View File

@ -20,9 +20,7 @@ class Metasploit3 < Msf::Encoder
},
'Author' => 'hdm',
'Arch' => ARCH_CMD,
'Platform' => 'unix',
'RequiredCmd' => 'generic',
'EncoderType' => Msf::Encoder::Type::GenericSh)
'Platform' => 'unix')
end

View File

@ -23,7 +23,7 @@ class Metasploit3 < Msf::Encoder
'Author' => 'egypt',
'Arch' => ARCH_CMD,
'Platform' => 'unix',
'RequiredCmd' => '*')
'EncoderType' => Msf::Encoder::Type::CmdUnixIfs)
end

View File

@ -20,7 +20,7 @@ class Metasploit3 < Msf::Encoder
'Author' => 'hdm',
'Arch' => ARCH_CMD,
'Platform' => 'unix',
'RequiredCmd' => 'perl')
'EncoderType' => Msf::Encoder::Type::CmdUnixPerl)
end

View File

@ -31,8 +31,7 @@ class Metasploit3 < Msf::Encoder
'Author' => 'jduck',
'Arch' => ARCH_CMD,
'Platform' => 'unix',
'EncoderType' => Msf::Encoder::Type::PrintfPHPMagicQuotes,
'RequiredCmd' => 'printf')
'EncoderType' => Msf::Encoder::Type::PrintfPHPMagicQuotes)
end

View File

@ -39,15 +39,12 @@ class Metasploit4 < Msf::Exploit::Remote
'Payload' =>
{
'BadChars' => "\x0d\x0a",
# Be sure the echo encoder is used (back compatibility)
# https://github.com/rapid7/metasploit-framework/pull/3561
'EncoderType' => Msf::Encoder::Type::CmdUnixEcho
},
'Arch' => ARCH_CMD,
'Platform' => 'unix',
'Compat' =>
{
'Encoder' => {
'RequiredCmd' => 'generic'
}
},
'Targets' =>
[
[ 'Ubuntu 13.04 32bit - nginx 1.4.0', {

View File

@ -32,18 +32,15 @@ class Metasploit3 < Msf::Exploit::Remote
'Space' => 8000, # Payload sent on the user agent, long enough to fit any payload
'DisableNops' => true,
'BadChars' => (0x00..0x1f).to_a.pack("C*"), # not a big deal, we're working with ARCH_CMD payloads
# Be sure the echo encoder is used (back compatibility)
# https://github.com/rapid7/metasploit-framework/pull/3561
'EncoderType' => Msf::Encoder::Type::CmdUnixEcho,
'Compat' =>
{
'PayloadType' => 'cmd',
'RequiredCmd' => 'generic openssl'
}
},
'Compat' =>
{
'Encoder' => {
'RequiredCmd' => 'generic'
}
},
'Platform' => ['unix'],
'Arch' => ARCH_CMD,
'References' =>