I managed to "infect" my test device, so I decided to try out some of meterpreter custom commands. This tool is awesome: I can copy, download, upload and manipulate the infected device, spy through countless peripherals etc. At first, everything seemed to be just fine, but when I tried to take a snapshot through my webcam, this happened:

meterpreter > webcam_snap
[*] Starting...
[*] Stopped
[-] webcam_start: Operation failed: 14007

I'm particularly interested in the error documentation (if you can provide any, that would be very helpful). Even after 3 hours of searching I haven't been able to track down any similar recorded occurrence. I backtracked a bit, and found another error:

meterpreter > run webcam

[!] Meterpreter scripts are deprecated. Try post/windows/manage/webcam.
[!] Example: run post/windows/manage/webcam OPTION=value [...]
[*] Starting webcam 1: PS3Eye Camera
[-] Error: Rex::Post::Meterpreter::RequestError webcam_start: Operation failed: 14007 ["/usr/share/metasploit-framework/lib/rex/post/meterpreter/extensions/stdapi/webcam/webcam.rb:41:in `webcam_start'", "/usr/share/metasploit-framework/lib/rex/script/base.rb:120:in `run'", "/usr/share/metasploit-framework/lib/rex/script/base.rb:44:in `eval'", "/usr/share/metasploit-framework/lib/rex/script/base.rb:44:in `run'", "/usr/share/metasploit-framework/lib/msf/base/sessions/meterpreter.rb:227:in `execute_file'", "/usr/share/metasploit-framework/lib/msf/base/sessions/scriptable.rb:173:in `execute_script'", "/usr/share/metasploit-framework/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb:1152:in `cmd_run'", "/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:430:in `run_command'", "/usr/share/metasploit-framework/lib/rex/post/meterpreter/ui/console.rb:105:in `run_command'", "/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:392:in `block in run_single'", "/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:386:in `each'", "/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:386:in `run_single'", "/usr/share/metasploit-framework/lib/rex/post/meterpreter/ui/console.rb:68:in `block in interact'", "/usr/share/metasploit-framework/lib/rex/ui/text/shell.rb:195:in `run'", "/usr/share/metasploit-framework/lib/rex/post/meterpreter/ui/console.rb:66:in `interact'", "/usr/share/metasploit-framework/lib/msf/base/sessions/meterpreter.rb:481:in `_interact'", "/usr/share/metasploit-framework/lib/rex/ui/interactive.rb:49:in `interact'", "/usr/share/metasploit-framework/lib/msf/ui/console/command_dispatcher/core.rb:1378:in `cmd_sessions'", "/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:430:in `run_command'", "/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:392:in `block in run_single'", "/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:386:in `each'", "/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:386:in `run_single'", "/usr/share/metasploit-framework/lib/msf/ui/console/command_dispatcher/exploit.rb:141:in `cmd_exploit'", "/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:430:in `run_command'", "/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:392:in `block in run_single'", "/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:386:in `each'", "/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:386:in `run_single'", "/usr/share/metasploit-framework/lib/rex/ui/text/shell.rb:205:in `run'", "/usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'", "/usr/share/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'", "/usr/bin/msfconsole:48:in `<main>'"]

I followed the advice, but nothing changed:

meterpreter > run post/windows/manage/webcam OPTION=1

Webcam List

Index  Name
-----  ----
1      PS3Eye Camera

meterpreter > webcam_snap
[*] Starting...
[*] Stopped
[-] webcam_start: Operation failed: 14007
meterpreter > 

I don't know if this is due to the fact that my camera is PS3Eye (manufactured by Sony and therefore can't run on PC without illegal software) or the deprecation of some of my commands. What is very interesting though is that I can record audio from the PS3Eye device (with record_mic command), so the problem probably lies within webcam's drivers.

I should also inform you that I plugged in my webcam after Meterpreter created first session (that is after I successfully ran the infected .bat file on my test computer; the latter is NOT a virtual machine, rather physical). Maybe this is the source of the problem (Meterpreter successfully detected it though).

Any comments, criticism and helpful answers are warmly welcome. Thank you in advance.


It sounds like a driver issue and meterpreter's inability to interface with the video driver for your Sony cam.

I'd have a look at the source code for the Meterpreter webcam module if you want to investigate further and confirm that the video driver is not supported.

This is where i'd start looking for any signs that would point to an incompatibility:

  • 1
    Yeah, I was thinking the same thing. I'll try this exact method on a webcam that actaully doesn't require illegal drivers to operate on PC. Then, the problem will be more clear. I also ask you to provide any sort of documentation regarding the error number (14007) if you have any. Thank you for your effort in answering. I posted a similar question on GitHub and I'll even go so far as declare this question as a bounty tomorrow if things don't get resolved. Nonetheless a big thumbs up for your effort! – Gregor Perčič Jul 17 '17 at 20:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.