switched to x86 from ia32

git-svn-id: file:///home/svn/incoming/trunk@2745 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Matt Miller 2005-07-13 18:54:41 +00:00
parent f1691c5470
commit d4f569dddf
12 changed files with 71 additions and 23 deletions

View File

@ -11,13 +11,13 @@ module Msf
# Architecture constants
#
ARCH_ANY = '_any_'
ARCH_IA32 = 'ia32'
ARCH_X86 = 'x86'
ARCH_MIPS = 'mips'
ARCH_PPC = 'ppc'
ARCH_SPARC = 'sparc'
ARCH_TYPES =
[
ARCH_IA32,
ARCH_X86,
ARCH_MIPS,
ARCH_PPC,
ARCH_SPARC

View File

@ -173,6 +173,15 @@ class Msf::Module::Platform
private_class_method :build_child_platform_abbrev
private_class_method :find_portion
##
#
# Builtin platforms
#
##
#
# Windows
#
class Windows < Msf::Module::Platform
Rank = 100
# Windows 95
@ -279,36 +288,79 @@ class Msf::Module::Platform
end
end
#
# Linux
#
class Linux < Msf::Module::Platform
Rank = 100
Alias = "lnx"
end
#
# Solaris
#
class Solaris < Msf::Module::Platform
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
#
# OSX
#
class OSX < Msf::Module::Platform
Rank = 100
end
#
# Generic BSD
#
class BSD < Msf::Module::Platform
Rank = 100
end
#
# OpenBSD
#
class OpenBSD < Msf::Module::Platform
Rank = 100
end
#
# BSDi
#
class BSDi < Msf::Module::Platform
Rank = 100
end
#
# NetBSD
#
class NetBSD < Msf::Module::Platform
Rank = 100
end
#
# FreeBSD
#
class FreeBSD < Msf::Module::Platform
Rank = 100
end

View File

@ -2,7 +2,7 @@ require 'msf/core'
module Msf
module Encoders
module Ia32
module X86
class Call4Dword < Msf::Encoder::Xor
@ -12,7 +12,7 @@ class Call4Dword < Msf::Encoder::Xor
'Version' => '$Revision$',
'Description' => 'Call+4 Dword XOR Encoder',
'Author' => [ 'hdm', 'spoonm' ],
'Arch' => ARCH_IA32,
'Arch' => ARCH_X86,
'Decoder' =>
{
'KeySize' => 4,

View File

@ -2,7 +2,7 @@ require 'msf/core'
module Msf
module Encoders
module Ia32
module X86
class JmpCallAdditive < Msf::Encoder::XorAdditiveFeedback
@ -12,7 +12,7 @@ class JmpCallAdditive < Msf::Encoder::XorAdditiveFeedback
'Version' => '$Revision$',
'Description' => 'Jump/Call XOR Additive Feedback',
'Author' => 'skape',
'Arch' => ARCH_IA32,
'Arch' => ARCH_X86,
'Decoder' =>
{
'Stub' =>

View File

@ -2,14 +2,14 @@ require 'msf/core'
module Msf
module Nops
module Ia32
module X86
###
#
# 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.
#
###
@ -85,15 +85,15 @@ SINGLE_BYTE_SLED =
'Version' => '$Revision$',
'Description' => 'Single-byte NOP generator',
'Author' => 'spoonm',
'Arch' => ARCH_IA32)
'Arch' => ARCH_X86)
register_advanced_options(
[
OptBool.new('RandomNops', [ false, "Generate a random NOP sled", true ])
], Msf::Nops::Ia32::SingleByte)
], Msf::Nops::X86::SingleByte)
end
# Generate a single-byte NOP sled for IA32
# Generate a single-byte NOP sled for X86
def generate_sled(length, opts)
sled_hash = SINGLE_BYTE_SLED
sled_max_idx = sled_hash.length
@ -148,7 +148,3 @@ SINGLE_BYTE_SLED =
end
end end end
x = Msf::Nops::Ia32::SingleByte.new
x.generate_sled(200, {})

View File

@ -5,7 +5,7 @@ module Msf
module Payloads
module Singles
module Linux
module Ia32
module X86
module Shell
@ -18,7 +18,7 @@ module Shell
'Description' => 'Connect back to attacker and spawn a command shell',
'Author' => 'skape',
'Platform' => 'linux',
'Arch' => ARCH_IA32,
'Arch' => ARCH_X86,
'Handler' => Msf::Handler::ReverseTcp,
'Payload' =>
{

View File

@ -27,7 +27,7 @@ module AddUser
'Description' => 'Create a new user and add them to local administration group',
'Author' => 'hdm',
'Platform' => 'win',
'Arch' => ARCH_IA32,
'Arch' => ARCH_X86,
'Privileged' => true))
# Register command execution options

View File

@ -25,7 +25,7 @@ module Exec
'Description' => 'Execute an arbitrary command',
'Author' => 'vlad902',
'Platform' => 'win',
'Arch' => ARCH_IA32,
'Arch' => ARCH_X86,
'Payload' =>
{
'Offsets' =>

View File

@ -18,7 +18,7 @@ module Shell
'Description' => 'Connect back to attacker and spawn a command shell',
'Author' => 'vlad902',
'Platform' => 'win',
'Arch' => ARCH_IA32,
'Arch' => ARCH_X86,
'Handler' => Msf::Handler::ReverseTcp,
'Payload' =>
{

View File

@ -18,7 +18,7 @@ module ReverseTcp
'Description' => 'Connect back to the attacker',
'Author' => 'hdm',
'Platform' => 'win',
'Arch' => ARCH_IA32,
'Arch' => ARCH_X86,
'Handler' => Msf::Handler::ReverseTcp,
'Stager' =>
{

View File

@ -16,7 +16,7 @@ module Shell
'Description' => 'Spawn a command shell',
'Author' => 'hdm',
'Platform' => 'win',
'Arch' => ARCH_IA32,
'Arch' => ARCH_X86,
'Stage' =>
{
'Offsets' =>

View File

@ -18,7 +18,7 @@ framework.encoders.each_module { |mod|
}
framework.encoders.each_module(
'arch' => Msf::ARCH_IA32) { |mod|
'arch' => Msf::ARCH_X86) { |mod|
puts "arch filter: got encoder #{mod}"
}