Move SMB mixins into their own directory
parent
ede804e6af
commit
4703278183
|
@ -21,7 +21,7 @@ module Exploit::Remote::DCERPC
|
||||||
DCERPCPacket = Rex::Proto::DCERPC::Packet
|
DCERPCPacket = Rex::Proto::DCERPC::Packet
|
||||||
DCERPCClient = Rex::Proto::DCERPC::Client
|
DCERPCClient = Rex::Proto::DCERPC::Client
|
||||||
DCERPCResponse = Rex::Proto::DCERPC::Response
|
DCERPCResponse = Rex::Proto::DCERPC::Response
|
||||||
DCERPCUUID = Rex::Proto::DCERPC::UUID
|
DCERPCUUID = Rex::Proto::DCERPC::UUID
|
||||||
NDR = Rex::Encoder::NDR
|
NDR = Rex::Encoder::NDR
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ require 'rex/proto/ntlm'
|
||||||
require 'rex/proto/dcerpc'
|
require 'rex/proto/dcerpc'
|
||||||
require 'rex/encoder/ndr'
|
require 'rex/encoder/ndr'
|
||||||
|
|
||||||
|
|
||||||
module Msf
|
module Msf
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -18,7 +17,8 @@ module Msf
|
||||||
|
|
||||||
module Exploit::Remote::SMB
|
module Exploit::Remote::SMB
|
||||||
|
|
||||||
require 'msf/core/exploit/psexec'
|
require 'msf/core/exploit/smb/authenticated'
|
||||||
|
require 'msf/core/exploit/smb/psexec'
|
||||||
|
|
||||||
include Exploit::Remote::Tcp
|
include Exploit::Remote::Tcp
|
||||||
include Exploit::Remote::NTLM::Client
|
include Exploit::Remote::NTLM::Client
|
||||||
|
@ -35,20 +35,6 @@ module Exploit::Remote::SMB
|
||||||
DCERPCUUID = Rex::Proto::DCERPC::UUID
|
DCERPCUUID = Rex::Proto::DCERPC::UUID
|
||||||
NDR = Rex::Encoder::NDR
|
NDR = Rex::Encoder::NDR
|
||||||
|
|
||||||
# Mini-mixin for making SMBUser/SMBPass/SMBDomain regular options vs advanced
|
|
||||||
# Included when the module needs credentials to function
|
|
||||||
module Authenticated
|
|
||||||
def initialize(info = {})
|
|
||||||
super
|
|
||||||
register_options(
|
|
||||||
[
|
|
||||||
OptString.new('SMBUser', [ false, 'The username to authenticate as', '']),
|
|
||||||
OptString.new('SMBPass', [ false, 'The password for the specified username', '']),
|
|
||||||
OptString.new('SMBDomain', [ false, 'The Windows domain to use for authentication', 'WORKGROUP']),
|
|
||||||
], Msf::Exploit::Remote::SMB::Authenticated)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def initialize(info = {})
|
def initialize(info = {})
|
||||||
super
|
super
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
# -*- coding: binary -*-
|
||||||
|
|
||||||
|
module Msf
|
||||||
|
|
||||||
|
# Mini-mixin for making SMBUser/SMBPass/SMBDomain regular options vs advanced
|
||||||
|
# Included when the module needs credentials to function
|
||||||
|
module Exploit::Remote::SMB::Authenticated
|
||||||
|
|
||||||
|
include Msf::Exploit::Remote::SMB
|
||||||
|
|
||||||
|
def initialize(info = {})
|
||||||
|
super
|
||||||
|
register_options(
|
||||||
|
[
|
||||||
|
OptString.new('SMBUser', [ false, 'The username to authenticate as', '']),
|
||||||
|
OptString.new('SMBPass', [ false, 'The password for the specified username', '']),
|
||||||
|
OptString.new('SMBDomain', [ false, 'The Windows domain to use for authentication', 'WORKGROUP']),
|
||||||
|
], Msf::Exploit::Remote::SMB::Authenticated)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
|
@ -1,3 +1,4 @@
|
||||||
|
# -*- coding: binary -*-
|
||||||
require 'msf/core'
|
require 'msf/core'
|
||||||
require 'msf/core/exploit/dcerpc'
|
require 'msf/core/exploit/dcerpc'
|
||||||
|
|
||||||
|
@ -11,10 +12,10 @@ module Msf
|
||||||
# and runing a binary.
|
# and runing a binary.
|
||||||
####
|
####
|
||||||
|
|
||||||
module Exploit::Remote::Psexec
|
module Exploit::Remote::SMB::Psexec
|
||||||
|
|
||||||
include Msf::Exploit::Remote::DCERPC
|
include Msf::Exploit::Remote::DCERPC
|
||||||
include Msf::Exploit::Remote::SMB
|
include Msf::Exploit::Remote::SMB::Authenticated
|
||||||
|
|
||||||
# Retrives output from the executed command
|
# Retrives output from the executed command
|
||||||
#
|
#
|
|
@ -5,9 +5,7 @@ require 'msf/core'
|
||||||
class Metasploit3 < Msf::Auxiliary
|
class Metasploit3 < Msf::Auxiliary
|
||||||
|
|
||||||
include Msf::Exploit::Remote::DCERPC
|
include Msf::Exploit::Remote::DCERPC
|
||||||
include Msf::Exploit::Remote::SMB
|
include Msf::Exploit::Remote::SMB::Psexec
|
||||||
include Msf::Exploit::Remote::SMB::Authenticated
|
|
||||||
include Msf::Exploit::Remote::Psexec
|
|
||||||
include Msf::Auxiliary::Report
|
include Msf::Auxiliary::Report
|
||||||
include Msf::Auxiliary::Scanner
|
include Msf::Auxiliary::Scanner
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue