I have a customer who wants me to "restore" his Wordpress page. I looked a little bit deeper in the codes and found the following code a few times in different files:


I'm not an expert in IT Security but for me this looks pretty much as "encrypted" code that does not belong to Wordpress.

How can I analyze what this code does? I really need to know what it is before I can "clean" it. I'm interested to learn something about it so I'm very thankful for explanations what it is, what is does, where it (might) comes from and how to remove it.

Thanks in advance!

  • It seems as if there needs to be another part that kind of "executes" (eval()) the code but I don't know where to search.
    – Daniel K.
    Jul 18, 2014 at 19:39
  • Used: find . -type f -name '*.php' | xargs grep -l "eval *(" - nothing found that is related to that.
    – Daniel K.
    Jul 18, 2014 at 19:52
  • 2
    I think this is rather highly obfuscated than encrypted. But still - working out what it does will take a few hours.
    – marstato
    Jul 18, 2014 at 21:13
  • What research have you done? There's lots written on analyzing obfuscated Javascript. Depending on your experience level, the answer might be "you don't know enough to make analyzing the code a worthwhile avenue to pursue".
    – D.W.
    Jul 23, 2014 at 23:32

1 Answer 1


The best solution would be to use a local PHP server on a computer without Internet if you want to be safe.

Download PHP, put this text in a .php file, COMMENT OUT ALL THE PARTS YOU DON'T UNDERSTAND YET, and run 'php -S localhost:80' (or even better, take this version I cleaned a little)

Then just add 'echo $variable' to see what's going on, and uncomment lines when you think you understand what it does.

EDIT: This doesn't seem to be heavily obfuscated, the only lines you might be afraid of are the very last ones.

SECOND EDIT: The eval is in the hex string at the end


"' /* gfquyopwxy / eval(str_replace(chr((137-100)), chr((601-509)), edqhoaquqp($sgjkpbrqdo, $criypjwnmi))); / aamrieptwu */ '"


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .