switched to x86 from ia32
git-svn-id: file:///home/svn/incoming/trunk@2745 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
f1691c5470
commit
d4f569dddf
|
@ -11,13 +11,13 @@ module Msf
|
||||||
# Architecture constants
|
# Architecture constants
|
||||||
#
|
#
|
||||||
ARCH_ANY = '_any_'
|
ARCH_ANY = '_any_'
|
||||||
ARCH_IA32 = 'ia32'
|
ARCH_X86 = 'x86'
|
||||||
ARCH_MIPS = 'mips'
|
ARCH_MIPS = 'mips'
|
||||||
ARCH_PPC = 'ppc'
|
ARCH_PPC = 'ppc'
|
||||||
ARCH_SPARC = 'sparc'
|
ARCH_SPARC = 'sparc'
|
||||||
ARCH_TYPES =
|
ARCH_TYPES =
|
||||||
[
|
[
|
||||||
ARCH_IA32,
|
ARCH_X86,
|
||||||
ARCH_MIPS,
|
ARCH_MIPS,
|
||||||
ARCH_PPC,
|
ARCH_PPC,
|
||||||
ARCH_SPARC
|
ARCH_SPARC
|
||||||
|
|
|
@ -173,6 +173,15 @@ class Msf::Module::Platform
|
||||||
private_class_method :build_child_platform_abbrev
|
private_class_method :build_child_platform_abbrev
|
||||||
private_class_method :find_portion
|
private_class_method :find_portion
|
||||||
|
|
||||||
|
##
|
||||||
|
#
|
||||||
|
# Builtin platforms
|
||||||
|
#
|
||||||
|
##
|
||||||
|
|
||||||
|
#
|
||||||
|
# Windows
|
||||||
|
#
|
||||||
class Windows < Msf::Module::Platform
|
class Windows < Msf::Module::Platform
|
||||||
Rank = 100
|
Rank = 100
|
||||||
# Windows 95
|
# Windows 95
|
||||||
|
@ -279,36 +288,79 @@ class Msf::Module::Platform
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#
|
||||||
|
# Linux
|
||||||
|
#
|
||||||
class Linux < Msf::Module::Platform
|
class Linux < Msf::Module::Platform
|
||||||
Rank = 100
|
Rank = 100
|
||||||
Alias = "lnx"
|
Alias = "lnx"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#
|
||||||
|
# Solaris
|
||||||
|
#
|
||||||
class Solaris < Msf::Module::Platform
|
class Solaris < Msf::Module::Platform
|
||||||
Rank = 100
|
Rank = 100
|
||||||
|
class V4
|
||||||
|
Rank = 100
|
||||||
|
Alias = "4"
|
||||||
|
end
|
||||||
|
class V5
|
||||||
|
Rank = 200
|
||||||
|
Alias = "5"
|
||||||
|
end
|
||||||
|
class V6
|
||||||
|
Rank = 300
|
||||||
|
Alias = "6"
|
||||||
|
end
|
||||||
|
class V7
|
||||||
|
Rank = 400
|
||||||
|
Alias = "7"
|
||||||
|
end
|
||||||
|
class V8
|
||||||
|
Rank = 400
|
||||||
|
Alias = "7"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#
|
||||||
|
# OSX
|
||||||
|
#
|
||||||
class OSX < Msf::Module::Platform
|
class OSX < Msf::Module::Platform
|
||||||
Rank = 100
|
Rank = 100
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#
|
||||||
# Generic BSD
|
# Generic BSD
|
||||||
|
#
|
||||||
class BSD < Msf::Module::Platform
|
class BSD < Msf::Module::Platform
|
||||||
Rank = 100
|
Rank = 100
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#
|
||||||
|
# OpenBSD
|
||||||
|
#
|
||||||
class OpenBSD < Msf::Module::Platform
|
class OpenBSD < Msf::Module::Platform
|
||||||
Rank = 100
|
Rank = 100
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#
|
||||||
|
# BSDi
|
||||||
|
#
|
||||||
class BSDi < Msf::Module::Platform
|
class BSDi < Msf::Module::Platform
|
||||||
Rank = 100
|
Rank = 100
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#
|
||||||
|
# NetBSD
|
||||||
|
#
|
||||||
class NetBSD < Msf::Module::Platform
|
class NetBSD < Msf::Module::Platform
|
||||||
Rank = 100
|
Rank = 100
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#
|
||||||
|
# FreeBSD
|
||||||
|
#
|
||||||
class FreeBSD < Msf::Module::Platform
|
class FreeBSD < Msf::Module::Platform
|
||||||
Rank = 100
|
Rank = 100
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,7 @@ require 'msf/core'
|
||||||
|
|
||||||
module Msf
|
module Msf
|
||||||
module Encoders
|
module Encoders
|
||||||
module Ia32
|
module X86
|
||||||
|
|
||||||
class Call4Dword < Msf::Encoder::Xor
|
class Call4Dword < Msf::Encoder::Xor
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ class Call4Dword < Msf::Encoder::Xor
|
||||||
'Version' => '$Revision$',
|
'Version' => '$Revision$',
|
||||||
'Description' => 'Call+4 Dword XOR Encoder',
|
'Description' => 'Call+4 Dword XOR Encoder',
|
||||||
'Author' => [ 'hdm', 'spoonm' ],
|
'Author' => [ 'hdm', 'spoonm' ],
|
||||||
'Arch' => ARCH_IA32,
|
'Arch' => ARCH_X86,
|
||||||
'Decoder' =>
|
'Decoder' =>
|
||||||
{
|
{
|
||||||
'KeySize' => 4,
|
'KeySize' => 4,
|
||||||
|
|
|
@ -2,7 +2,7 @@ require 'msf/core'
|
||||||
|
|
||||||
module Msf
|
module Msf
|
||||||
module Encoders
|
module Encoders
|
||||||
module Ia32
|
module X86
|
||||||
|
|
||||||
class JmpCallAdditive < Msf::Encoder::XorAdditiveFeedback
|
class JmpCallAdditive < Msf::Encoder::XorAdditiveFeedback
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ class JmpCallAdditive < Msf::Encoder::XorAdditiveFeedback
|
||||||
'Version' => '$Revision$',
|
'Version' => '$Revision$',
|
||||||
'Description' => 'Jump/Call XOR Additive Feedback',
|
'Description' => 'Jump/Call XOR Additive Feedback',
|
||||||
'Author' => 'skape',
|
'Author' => 'skape',
|
||||||
'Arch' => ARCH_IA32,
|
'Arch' => ARCH_X86,
|
||||||
'Decoder' =>
|
'Decoder' =>
|
||||||
{
|
{
|
||||||
'Stub' =>
|
'Stub' =>
|
||||||
|
|
|
@ -2,14 +2,14 @@ require 'msf/core'
|
||||||
|
|
||||||
module Msf
|
module Msf
|
||||||
module Nops
|
module Nops
|
||||||
module Ia32
|
module X86
|
||||||
|
|
||||||
###
|
###
|
||||||
#
|
#
|
||||||
# SingleByte
|
# SingleByte
|
||||||
# ----------
|
# ----------
|
||||||
#
|
#
|
||||||
# This class implements single-byte NOP generation for IA32. It takes from
|
# This class implements single-byte NOP generation for X86. It takes from
|
||||||
# ADMmutate and from spoonfu.
|
# ADMmutate and from spoonfu.
|
||||||
#
|
#
|
||||||
###
|
###
|
||||||
|
@ -85,15 +85,15 @@ SINGLE_BYTE_SLED =
|
||||||
'Version' => '$Revision$',
|
'Version' => '$Revision$',
|
||||||
'Description' => 'Single-byte NOP generator',
|
'Description' => 'Single-byte NOP generator',
|
||||||
'Author' => 'spoonm',
|
'Author' => 'spoonm',
|
||||||
'Arch' => ARCH_IA32)
|
'Arch' => ARCH_X86)
|
||||||
|
|
||||||
register_advanced_options(
|
register_advanced_options(
|
||||||
[
|
[
|
||||||
OptBool.new('RandomNops', [ false, "Generate a random NOP sled", true ])
|
OptBool.new('RandomNops', [ false, "Generate a random NOP sled", true ])
|
||||||
], Msf::Nops::Ia32::SingleByte)
|
], Msf::Nops::X86::SingleByte)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Generate a single-byte NOP sled for IA32
|
# Generate a single-byte NOP sled for X86
|
||||||
def generate_sled(length, opts)
|
def generate_sled(length, opts)
|
||||||
sled_hash = SINGLE_BYTE_SLED
|
sled_hash = SINGLE_BYTE_SLED
|
||||||
sled_max_idx = sled_hash.length
|
sled_max_idx = sled_hash.length
|
||||||
|
@ -148,7 +148,3 @@ SINGLE_BYTE_SLED =
|
||||||
end
|
end
|
||||||
|
|
||||||
end end end
|
end end end
|
||||||
|
|
||||||
x = Msf::Nops::Ia32::SingleByte.new
|
|
||||||
|
|
||||||
x.generate_sled(200, {})
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ module Msf
|
||||||
module Payloads
|
module Payloads
|
||||||
module Singles
|
module Singles
|
||||||
module Linux
|
module Linux
|
||||||
module Ia32
|
module X86
|
||||||
|
|
||||||
module Shell
|
module Shell
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ module Shell
|
||||||
'Description' => 'Connect back to attacker and spawn a command shell',
|
'Description' => 'Connect back to attacker and spawn a command shell',
|
||||||
'Author' => 'skape',
|
'Author' => 'skape',
|
||||||
'Platform' => 'linux',
|
'Platform' => 'linux',
|
||||||
'Arch' => ARCH_IA32,
|
'Arch' => ARCH_X86,
|
||||||
'Handler' => Msf::Handler::ReverseTcp,
|
'Handler' => Msf::Handler::ReverseTcp,
|
||||||
'Payload' =>
|
'Payload' =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,7 @@ module AddUser
|
||||||
'Description' => 'Create a new user and add them to local administration group',
|
'Description' => 'Create a new user and add them to local administration group',
|
||||||
'Author' => 'hdm',
|
'Author' => 'hdm',
|
||||||
'Platform' => 'win',
|
'Platform' => 'win',
|
||||||
'Arch' => ARCH_IA32,
|
'Arch' => ARCH_X86,
|
||||||
'Privileged' => true))
|
'Privileged' => true))
|
||||||
|
|
||||||
# Register command execution options
|
# Register command execution options
|
||||||
|
|
|
@ -25,7 +25,7 @@ module Exec
|
||||||
'Description' => 'Execute an arbitrary command',
|
'Description' => 'Execute an arbitrary command',
|
||||||
'Author' => 'vlad902',
|
'Author' => 'vlad902',
|
||||||
'Platform' => 'win',
|
'Platform' => 'win',
|
||||||
'Arch' => ARCH_IA32,
|
'Arch' => ARCH_X86,
|
||||||
'Payload' =>
|
'Payload' =>
|
||||||
{
|
{
|
||||||
'Offsets' =>
|
'Offsets' =>
|
||||||
|
|
|
@ -18,7 +18,7 @@ module Shell
|
||||||
'Description' => 'Connect back to attacker and spawn a command shell',
|
'Description' => 'Connect back to attacker and spawn a command shell',
|
||||||
'Author' => 'vlad902',
|
'Author' => 'vlad902',
|
||||||
'Platform' => 'win',
|
'Platform' => 'win',
|
||||||
'Arch' => ARCH_IA32,
|
'Arch' => ARCH_X86,
|
||||||
'Handler' => Msf::Handler::ReverseTcp,
|
'Handler' => Msf::Handler::ReverseTcp,
|
||||||
'Payload' =>
|
'Payload' =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,7 @@ module ReverseTcp
|
||||||
'Description' => 'Connect back to the attacker',
|
'Description' => 'Connect back to the attacker',
|
||||||
'Author' => 'hdm',
|
'Author' => 'hdm',
|
||||||
'Platform' => 'win',
|
'Platform' => 'win',
|
||||||
'Arch' => ARCH_IA32,
|
'Arch' => ARCH_X86,
|
||||||
'Handler' => Msf::Handler::ReverseTcp,
|
'Handler' => Msf::Handler::ReverseTcp,
|
||||||
'Stager' =>
|
'Stager' =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,7 +16,7 @@ module Shell
|
||||||
'Description' => 'Spawn a command shell',
|
'Description' => 'Spawn a command shell',
|
||||||
'Author' => 'hdm',
|
'Author' => 'hdm',
|
||||||
'Platform' => 'win',
|
'Platform' => 'win',
|
||||||
'Arch' => ARCH_IA32,
|
'Arch' => ARCH_X86,
|
||||||
'Stage' =>
|
'Stage' =>
|
||||||
{
|
{
|
||||||
'Offsets' =>
|
'Offsets' =>
|
||||||
|
|
|
@ -18,7 +18,7 @@ framework.encoders.each_module { |mod|
|
||||||
}
|
}
|
||||||
|
|
||||||
framework.encoders.each_module(
|
framework.encoders.each_module(
|
||||||
'arch' => Msf::ARCH_IA32) { |mod|
|
'arch' => Msf::ARCH_X86) { |mod|
|
||||||
puts "arch filter: got encoder #{mod}"
|
puts "arch filter: got encoder #{mod}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue