Module: Msf::Handler::ReverseNamedPipe

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

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'.



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

def self.general_handler_type
  "reverse"
end

.handler_typeObject

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



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

def self.handler_type
  "reverse_named_pipe"
end

Instance Method Details

#cleanup_handlerObject

Closes the listener socket if one was created.



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

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

#human_nameString

A string suitable for displaying to the user

Returns:

  • (String)


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

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.



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

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.



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

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

#stop_handlerObject

Stops monitoring for an inbound connection.



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

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