diff --git a/lib/msf/core/exploit/dcerpc.rb b/lib/msf/core/exploit/dcerpc.rb index c9db4cb0c4..657f7e2c9c 100644 --- a/lib/msf/core/exploit/dcerpc.rb +++ b/lib/msf/core/exploit/dcerpc.rb @@ -18,13 +18,28 @@ module Exploit::Remote::DCERPC def initialize(info = {}) super + # OptInt.new('FragSize', [ 1, 'Set the DCERPC packet fragmentation size', 127]) + # OptBool.new('MultiBind', [ 0, 'Configure multi-context bind calls', 'T' ]) register_options( [ Opt::RHOST, - Opt::RPORT(135) + Opt::RPORT(135), ], Msf::Exploit::Remote::DCERPC) end + # Connect to the host/port specified by datastore['RHOST'], datastore['RPORT'] + # Returns the context id on success and nil on failure + def connect_bind (uuid, vers) + + # 1. Create the socket and connect to the target system + + # 2. Call Rex::Proto::DCERPC to generate the BIND packet(s) + + # 3. Send the BIND packets and parse the response + + # 4. Return the context id back to the calling function + end + end end diff --git a/lib/rex/text.rb b/lib/rex/text.rb index 1dc28918b9..cc00e5b244 100644 --- a/lib/rex/text.rb +++ b/lib/rex/text.rb @@ -135,6 +135,12 @@ module Text return output end - + + def self.rand_text(len) + buff = "" + len.times { || buff += [ rand(256) ].pack('C') } + return buff + end + end end