Module: Rex::Post::Meterpreter

Defined in:
lib/rex/post/meterpreter/packet.rb,
lib/rex/post/meterpreter/client.rb,
lib/rex/post/meterpreter/channel.rb,
lib/rex/post/meterpreter/extension.rb,
lib/rex/post/meterpreter/ui/console.rb,
lib/rex/post/meterpreter/client_core.rb,
lib/rex/post/meterpreter/channels/pool.rb,
lib/rex/post/meterpreter/packet_parser.rb,
lib/rex/post/meterpreter/object_aliases.rb,
lib/rex/post/meterpreter/channels/stream.rb,
lib/rex/post/meterpreter/channel_container.rb,
lib/rex/post/meterpreter/packet_dispatcher.rb,
lib/rex/post/meterpreter/extensions/priv/fs.rb,
lib/rex/post/meterpreter/extensions/priv/tlv.rb,
lib/rex/post/meterpreter/channels/pools/file.rb,
lib/rex/post/meterpreter/extensions/stdapi/ui.rb,
lib/rex/post/meterpreter/extensions/priv/priv.rb,
lib/rex/post/meterpreter/extensions/espia/tlv.rb,
lib/rex/post/meterpreter/extensions/extapi/tlv.rb,
lib/rex/post/meterpreter/extensions/stdapi/tlv.rb,
lib/rex/post/meterpreter/inbound_packet_handler.rb,
lib/rex/post/meterpreter/extensions/sniffer/tlv.rb,
lib/rex/post/meterpreter/extensions/priv/passwd.rb,
lib/rex/post/meterpreter/extensions/espia/espia.rb,
lib/rex/post/meterpreter/packet_response_waiter.rb,
lib/rex/post/meterpreter/extensions/mimikatz/tlv.rb,
lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb,
lib/rex/post/meterpreter/extensions/stdapi/fs/dir.rb,
lib/rex/post/meterpreter/extensions/stdapi/stdapi.rb,
lib/rex/post/meterpreter/extensions/incognito/tlv.rb,
lib/rex/post/meterpreter/extensions/extapi/extapi.rb,
lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb,
lib/rex/post/meterpreter/extensions/stdapi/net/arp.rb,
lib/rex/post/meterpreter/extensions/extapi/wmi/wmi.rb,
lib/rex/post/meterpreter/extensions/networkpug/tlv.rb,
lib/rex/post/meterpreter/extensions/lanattacks/tlv.rb,
lib/rex/post/meterpreter/channels/pools/stream_pool.rb,
lib/rex/post/meterpreter/extensions/sniffer/sniffer.rb,
lib/rex/post/meterpreter/extensions/stdapi/sys/power.rb,
lib/rex/post/meterpreter/extensions/stdapi/net/route.rb,
lib/rex/post/meterpreter/extensions/extapi/adsi/adsi.rb,
lib/rex/post/meterpreter/extensions/mimikatz/mimikatz.rb,
lib/rex/post/meterpreter/extensions/stdapi/net/socket.rb,
lib/rex/post/meterpreter/extensions/stdapi/sys/thread.rb,
lib/rex/post/meterpreter/extensions/stdapi/net/config.rb,
lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/dll.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/tlv.rb,
lib/rex/post/meterpreter/extensions/stdapi/sys/process.rb,
lib/rex/post/meterpreter/extensions/stdapi/net/resolve.rb,
lib/rex/post/meterpreter/extensions/stdapi/net/netstat.rb,
lib/rex/post/meterpreter/extensions/stdapi/sys/registry.rb,
lib/rex/post/meterpreter/ui/console/interactive_channel.rb,
lib/rex/post/meterpreter/extensions/incognito/incognito.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/util.rb,
lib/rex/post/meterpreter/extensions/stdapi/fs/file_stat.rb,
lib/rex/post/meterpreter/extensions/stdapi/net/interface.rb,
lib/rex/post/meterpreter/extensions/stdapi/webcam/webcam.rb,
lib/rex/post/meterpreter/extensions/stdapi/sys/event_log.rb,
lib/rex/post/meterpreter/extensions/lanattacks/tftp/tftp.rb,
lib/rex/post/meterpreter/extensions/extapi/window/window.rb,
lib/rex/post/meterpreter/extensions/lanattacks/dhcp/dhcp.rb,
lib/rex/post/meterpreter/extensions/networkpug/networkpug.rb,
lib/rex/post/meterpreter/extensions/lanattacks/lanattacks.rb,
lib/rex/post/meterpreter/extensions/extapi/service/service.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/railgun.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/priv.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/espia.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/multicall.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_helper.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/extapi.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/mock_magic.rb,
lib/rex/post/meterpreter/extensions/extapi/clipboard/clipboard.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/buffer_item.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/sniffer.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_wrapper.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_function.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/mimikatz.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/incognito.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_ntdll.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/platform_util.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_ws2_32.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/sys.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/extapi/wmi.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/net.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_user32.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/networkpug.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/lanattacks.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/priv/passwd.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_wlanapi.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_wldap32.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_shell32.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_version.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/extapi/adsi.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_crypt32.rb,
lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/io.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/priv/elevate.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_kernel32.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_iphlpapi.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_netapi32.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_advapi32.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/type/pointer_util.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/extapi/window.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/webcam.rb,
lib/rex/post/meterpreter/extensions/stdapi/railgun/win_const_manager.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/priv/timestomp.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/extapi/service.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/lanattacks/dhcp.rb,
lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/image.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/lanattacks/tftp.rb,
lib/rex/post/meterpreter/ui/console/command_dispatcher/extapi/clipboard.rb,
lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/memory.rb,
lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/thread.rb,
lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/udp_channel.rb,
lib/rex/post/meterpreter/extensions/stdapi/sys/registry_subsystem/registry_key.rb,
lib/rex/post/meterpreter/extensions/stdapi/sys/event_log_subsystem/event_record.rb,
lib/rex/post/meterpreter/extensions/stdapi/sys/registry_subsystem/registry_value.rb,
lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/tcp_server_channel.rb,
lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/tcp_client_channel.rb,
lib/rex/post/meterpreter/extensions/stdapi/sys/registry_subsystem/remote_registry_key.rb

Defined Under Namespace

Modules: ChannelContainer, Channels, Extensions, InboundPacketHandler, ObjectAliasesContainer, PacketDispatcher, Ui Classes: Channel, Client, ClientCore, Extension, GroupTlv, ObjectAliases, Packet, PacketParser, PacketResponseWaiter, RequestError, Stream, Tlv

Constant Summary collapse

PACKET_TYPE_REQUEST =

Constants

0
PACKET_TYPE_RESPONSE =
1
PACKET_TYPE_PLAIN_REQUEST =
10
PACKET_TYPE_PLAIN_RESPONSE =
11
TLV_META_TYPE_NONE =

TLV Meta Types

0
TLV_META_TYPE_STRING =
(1 << 16)
TLV_META_TYPE_UINT =
(1 << 17)
TLV_META_TYPE_RAW =
(1 << 18)
TLV_META_TYPE_BOOL =
(1 << 19)
TLV_META_TYPE_QWORD =
(1 << 20)
TLV_META_TYPE_COMPRESSED =
(1 << 29)
TLV_META_TYPE_GROUP =
(1 << 30)
TLV_META_TYPE_COMPLEX =
(1 << 31)
TLV_META_MASK =

Exclude compressed from the mask since other meta types (e.g. RAW) can also be compressed

(
  TLV_META_TYPE_STRING |
  TLV_META_TYPE_UINT |
  TLV_META_TYPE_RAW |
  TLV_META_TYPE_BOOL |
  TLV_META_TYPE_QWORD |
  TLV_META_TYPE_GROUP |
  TLV_META_TYPE_COMPLEX
)
TLV_RESERVED =

TLV base starting points

0
TLV_EXTENSIONS =
20000
TLV_USER =
40000
TLV_TEMP =
60000
TLV_TYPE_ANY =

TLV Specific Types

TLV_META_TYPE_NONE   |   0
TLV_TYPE_METHOD =
TLV_META_TYPE_STRING |   1
TLV_TYPE_REQUEST_ID =
TLV_META_TYPE_STRING |   2
TLV_TYPE_EXCEPTION =
TLV_META_TYPE_GROUP  |   3
TLV_TYPE_RESULT =
TLV_META_TYPE_UINT   |   4
TLV_TYPE_STRING =
TLV_META_TYPE_STRING |  10
TLV_TYPE_UINT =
TLV_META_TYPE_UINT   |  11
TLV_TYPE_BOOL =
TLV_META_TYPE_BOOL   |  12
TLV_TYPE_LENGTH =
TLV_META_TYPE_UINT   |  25
TLV_TYPE_DATA =
TLV_META_TYPE_RAW    |  26
TLV_TYPE_FLAGS =
TLV_META_TYPE_UINT   |  27
TLV_TYPE_CHANNEL_ID =
TLV_META_TYPE_UINT   |  50
TLV_TYPE_CHANNEL_TYPE =
TLV_META_TYPE_STRING |  51
TLV_TYPE_CHANNEL_DATA =
TLV_META_TYPE_RAW    |  52
TLV_TYPE_CHANNEL_DATA_GROUP =
TLV_META_TYPE_GROUP  |  53
TLV_TYPE_CHANNEL_CLASS =
TLV_META_TYPE_UINT   |  54
TLV_TYPE_CHANNEL_PARENTID =
TLV_META_TYPE_UINT   |  55
TLV_TYPE_SEEK_WHENCE =
TLV_META_TYPE_UINT   |  70
TLV_TYPE_SEEK_OFFSET =
TLV_META_TYPE_UINT   |  71
TLV_TYPE_SEEK_POS =
TLV_META_TYPE_UINT   |  72
TLV_TYPE_EXCEPTION_CODE =
TLV_META_TYPE_UINT   | 300
TLV_TYPE_EXCEPTION_STRING =
TLV_META_TYPE_STRING | 301
TLV_TYPE_LIBRARY_PATH =
TLV_META_TYPE_STRING | 400
TLV_TYPE_TARGET_PATH =
TLV_META_TYPE_STRING | 401
TLV_TYPE_MIGRATE_PID =
TLV_META_TYPE_UINT   | 402
TLV_TYPE_MIGRATE_LEN =
TLV_META_TYPE_UINT   | 403
TLV_TYPE_MIGRATE_PAYLOAD =
TLV_META_TYPE_STRING | 404
TLV_TYPE_MIGRATE_ARCH =
TLV_META_TYPE_UINT   | 405
TLV_TYPE_CIPHER_NAME =
TLV_META_TYPE_STRING | 500
TLV_TYPE_CIPHER_PARAMETERS =
TLV_META_TYPE_GROUP  | 501
LOAD_LIBRARY_FLAG_ON_DISK =

Core flags

(1 << 0)
LOAD_LIBRARY_FLAG_EXTENSION =
(1 << 1)
LOAD_LIBRARY_FLAG_LOCAL =
(1 << 2)
CHANNEL_CLASS_STREAM =

The various types of channels

1
CHANNEL_CLASS_DATAGRAM =
2
CHANNEL_CLASS_POOL =
3
CHANNEL_FLAG_SYNCHRONOUS =

The various flags that can affect how the channel operates

CHANNEL_FLAG_SYNCHRONOUS
   Specifies that I/O requests on the channel are blocking.

CHANNEL_FLAG_COMPRESS
   Specifies that I/O requests on the channel have their data zlib compressed.
(1 << 0)
CHANNEL_FLAG_COMPRESS =
(1 << 1)
CHANNEL_DIO_READ =

The core types of direct I/O requests

'read'
CHANNEL_DIO_WRITE =
'write'
CHANNEL_DIO_CLOSE =
'close'