> The variable 'result' is (visibly) untouched
Actually it is invisibily touched by that call to unescape(). The assembly code in the comments is what is generated by the interpreter, and that's where the trick happens.
Actually it is invisibily touched by that call to unescape(). The assembly code in the comments is what is generated by the interpreter, and that's where the trick happens.
There is no obvious attempt to actually get the JS engine to do anything out of the ordinary. The string '%u31C9%u5589%uE55D%u2EF8%uC390%u9090'
is simply the unicode escaped version of the assembly above. The goal of this exploit would be to get the interpreter to set PC to the address of that string. There is no obvious attempt to do that.
Just compare the decoded opcodes in the DISASM comment to the contents of the string.
See my analysis: http://news.ycombinator.com/item?id=4246338