Monday, May 19, 2008

arguments.callee.toString()

argument.callee in javascript shows the entire function where this instruction is being called.
It includes the code and the format it was written.

For example:
=============================================
function ShowMe() { alert(arguments.callee.toString());}
=============================================




is different from

=========================================
function ShowMe()
{
alert(arguments.callee.toString());
}
=========================================



This instruction (arguments.callee) can be used to make sure that the script had not been tampered.

So where am I going here ...
(I need to show you how this instruction is used by javascript malware writers to create an obstacle in analyzing them ... thats where ...)

Ok thats it for now ... next I will show you how this instruction is used by javascript malwares and how we can overcome it.

No comments: