Module: Msf::Handler::ReverseNamedPipe

Includes:
Msf::Handler
Defined in:
lib/msf/core/handler/reverse_named_pipe.rb

Overview

TODO: docs

Constant Summary

Constants included from Msf::Handler

Claimed, Unused

Instance Attribute Summary

Attributes included from Msf::Handler

#exploit_config, #parent_payload, #pending_connections, #session_waiter_event, #sessions

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Msf::Handler

#add_handler, #create_session, #handle_connection, #handler, #handler_name, #interrupt_wait_for_session, #register_session, #setup_handler, #wait_for_session, #wfs_delay

Class Method Details

.general_handler_typeObject

Returns the connection-described general handler type, in this case 'reverse'.


28
29
30
# File 'lib/msf/core/handler/reverse_named_pipe.rb', line 28

def self.general_handler_type
  "reverse"
end

.handler_typeObject

Returns the string representation of the handler type, in this case 'reverse_named_pipe'.


20
21
22
# File 'lib/msf/core/handler/reverse_named_pipe.rb', line 20

def self.handler_type
  "reverse_named_pipe"
end

Instance Method Details

#cleanup_handlerObject

Closes the listener socket if one was created.


48
49
50
# File 'lib/msf/core/handler/reverse_named_pipe.rb', line 48

def cleanup_handler
  # we're just pretending to be a handler
end

#human_nameString

A string suitable for displaying to the user

Returns:

  • (String)

55
56
57
# File 'lib/msf/core/handler/reverse_named_pipe.rb', line 55

def human_name
  "reverse named pipe"
end

#initialize(info = {}) ⇒ Object

Initializes the reverse handler and ads the options that are required for reverse named pipe payloads.


36
37
38
39
40
41
42
43
# File 'lib/msf/core/handler/reverse_named_pipe.rb', line 36

def initialize(info={})
  super

  register_options([
    OptString.new('PIPENAME', [true, 'Name of the pipe to listen on', 'msf-pipe']),
    OptString.new('PIPEHOST', [true, 'Host of the pipe to connect to', '.'])
  ], Msf::Handler::ReverseNamedPipe)
end

#start_handlerObject

Starts monitoring for an inbound connection.


62
63
64
# File 'lib/msf/core/handler/reverse_named_pipe.rb', line 62

def start_handler
  # we're just pretending to be a handler
end

#stop_handlerObject

Stops monitoring for an inbound connection.


69
70
71
# File 'lib/msf/core/handler/reverse_named_pipe.rb', line 69

def stop_handler
  # we're just pretending to be a handler
end