Windows Manage Webcam - Metasploit


This page contains detailed information about how to use the post/windows/manage/webcam metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: Windows Manage Webcam
Module: post/windows/manage/webcam
Source code: modules/post/windows/manage/webcam.rb
Disclosure date: -
Last modification time: 2021-10-06 13:43:31 +0000
Supported architecture(s): -
Supported platform(s): Windows
Target service / protocol: -
Target network port(s): -
List of CVEs: -

This module will allow the user to detect installed webcams (with the LIST action) or take a snapshot (with the SNAPSHOT) action.

Module Ranking and Traits


Module Ranking:

  • normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.

Basic Usage


There are two ways to execute this post module.

From the Meterpreter prompt

The first is by using the "run" command at the Meterpreter prompt. It allows you to run the post module against that specific session:

meterpreter > run post/windows/manage/webcam

From the msf prompt

The second is by using the "use" command at the msf prompt. You will have to figure out which session ID to set manually. To list all session IDs, you can use the "sessions" command.

msf > use post/windows/manage/webcam
msf post(webcam) > show options
    ... show and set options ...
msf post(webcam) > set SESSION session-id
msf post(webcam) > exploit

If you wish to run the post against all sessions from framework, here is how:

1 - Create the following resource script:


framework.sessions.each_pair do |sid, session|
  run_single("use post/windows/manage/webcam")
  run_single("set SESSION #{sid}")
  run_single("run")
end

2 - At the msf prompt, execute the above resource script:

msf > resource path-to-resource-script

Required Options


  • SESSION: The session to run this module on.

Go back to menu.

Msfconsole Usage


Here is how the windows/manage/webcam post exploitation module looks in the msfconsole:

msf6 > use post/windows/manage/webcam

msf6 post(windows/manage/webcam) > show info

       Name: Windows Manage Webcam
     Module: post/windows/manage/webcam
   Platform: Windows
       Arch: 
       Rank: Normal

Provided by:
  sinn3r <[email protected]>

Compatible session types:
  Meterpreter

Available actions:
  Name      Description
  ----      -----------
  LIST      Show a list of webcams
  SNAPSHOT  Take a snapshot with the webcam

Basic options:
  Name     Current Setting  Required  Description
  ----     ---------------  --------  -----------
  INDEX    1                no        The index of the webcam to use
  QUALITY  50               no        The JPEG image quality
  SESSION                   yes       The session to run this module on.

Description:
  This module will allow the user to detect installed webcams (with 
  the LIST action) or take a snapshot (with the SNAPSHOT) action.

Module Options


This is a complete list of options available in the windows/manage/webcam post exploitation module:

msf6 post(windows/manage/webcam) > show options

Module options (post/windows/manage/webcam):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   INDEX    1                no        The index of the webcam to use
   QUALITY  50               no        The JPEG image quality
   SESSION                   yes       The session to run this module on.

Post action:

   Name  Description
   ----  -----------
   LIST  Show a list of webcams

Advanced Options


Here is a complete list of advanced options supported by the windows/manage/webcam post exploitation module:

msf6 post(windows/manage/webcam) > show advanced

Module advanced options (post/windows/manage/webcam):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   VERBOSE    false            no        Enable detailed status messages
   WORKSPACE                   no        Specify the workspace for this module

Post Actions


This is a list of all post exploitation actions which the windows/manage/webcam module can do:

msf6 post(windows/manage/webcam) > show actions

Post actions:

   Name      Description
   ----      -----------
   LIST      Show a list of webcams
   SNAPSHOT  Take a snapshot with the webcam

Evasion Options


Here is the full list of possible evasion options supported by the windows/manage/webcam post exploitation module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 post(windows/manage/webcam) > show evasion

Module evasion options:

   Name  Current Setting  Required  Description
   ----  ---------------  --------  -----------

Go back to menu.

Error Messages


This module may fail with the following error messages:

Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.

Invalid session ID selected. Make sure the host isn't dead.


Here is a relevant code snippet related to the "Invalid session ID selected. Make sure the host isn't dead." error message:

35:	    )
36:	  end
37:	
38:	  def run
39:	    if client.nil?
40:	      print_error("Invalid session ID selected. Make sure the host isn't dead.")
41:	      return
42:	    end
43:	
44:	    if not action
45:	      print_error("Invalid action")

Invalid action


Here is a relevant code snippet related to the "Invalid action" error message:

40:	      print_error("Invalid session ID selected. Make sure the host isn't dead.")
41:	      return
42:	    end
43:	
44:	    if not action
45:	      print_error("Invalid action")
46:	      return
47:	    end
48:	
49:	    case action.name
50:	    when /^list$/i

<RHOST> - No webcams found


Here is a relevant code snippet related to the "<RHOST> - No webcams found" error message:

60:	
61:	  def snapshot
62:	    webcams = list_webcams
63:	
64:	    if webcams.empty?
65:	      print_error("#{rhost} - No webcams found")
66:	      return
67:	    end
68:	
69:	    if not webcams[datastore['INDEX'] - 1]
70:	      print_error("#{rhost} - No such index: #{datastore['INDEX'].to_s}")

<RHOST> - No such index: <VALUE>


Here is a relevant code snippet related to the "<RHOST> - No such index: <VALUE>" error message:

65:	      print_error("#{rhost} - No webcams found")
66:	      return
67:	    end
68:	
69:	    if not webcams[datastore['INDEX'] - 1]
70:	      print_error("#{rhost} - No such index: #{datastore['INDEX'].to_s}")
71:	      return
72:	    end
73:	
74:	    buf = nil
75:	

Go back to menu.


Go back to menu.

See Also


Check also the following modules related to this module:

Authors


  • sinn3r

Version


This page has been produced using Metasploit Framework version 6.1.24-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.