From 24d5e986cc4c7ac3843e6555d6d6630a717983c1 Mon Sep 17 00:00:00 2001 From: Matt Miller Date: Sun, 5 Jun 2005 05:42:43 +0000 Subject: [PATCH] helper mixins for exploits git-svn-id: file:///home/svn/incoming/trunk@2577 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/core/exploit/dcerpc.rb | 26 ++++++++++++++++++++++++++ lib/msf/core/exploit/tcp.rb | 25 +++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 lib/msf/core/exploit/dcerpc.rb create mode 100644 lib/msf/core/exploit/tcp.rb diff --git a/lib/msf/core/exploit/dcerpc.rb b/lib/msf/core/exploit/dcerpc.rb new file mode 100644 index 0000000000..a685818b4f --- /dev/null +++ b/lib/msf/core/exploit/dcerpc.rb @@ -0,0 +1,26 @@ +module Msf + +### +# +# DCERPC +# ------ +# +# This mixin provides utility methods for interacting with a DCERPC service on +# a remote machine. These methods may generally be useful in the context of +# exploitation. This mixin extends the Tcp exploit mixin. +# +### +module Exploit::Remote::DCERPC + include Exploit::Remote::Tcp + + def initialize(info) + super(merge_info(info, + 'Options' => + [ + Opt::RHOST, + Opt::RPORT(135) + ])) + end +end + +end diff --git a/lib/msf/core/exploit/tcp.rb b/lib/msf/core/exploit/tcp.rb new file mode 100644 index 0000000000..fda2ce6290 --- /dev/null +++ b/lib/msf/core/exploit/tcp.rb @@ -0,0 +1,25 @@ +module Msf + +### +# +# Tcp +# --- +# +# This module provides methods for establish a connection to a remote host and +# communicating with it. +# +### +module Exploit::Remote::Tcp + + def initialize(info) + super(merge_info(info, + 'Options' => + [ + Opt::RHOST, + Opt::RPORT + ])) + end + +end + +end